Merge "Upgrade curl to curl-7_78_0" am: a883f21446

Original change: https://android-review.googlesource.com/c/platform/external/curl/+/1792488

Change-Id: Ia789227948176fedc71b38fc1c9d86d729a64bd6
diff --git a/CHANGES b/CHANGES
index b5bc305..3842d91 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,7447 +6,8086 @@
 
                                   Changelog
 
-Version 7.73.0 (14 Oct 2020)
+Version 7.78.0 (21 Jul 2021)
 
-Daniel Stenberg (14 Oct 2020)
+Daniel Stenberg (21 Jul 2021)
 - RELEASE-NOTES: synced
   
-  for 7.73.0
+  curl 7.78.0 release
 
-- THANKS: from 7.73.0 and .mailmap fixes
+- winbuild/MakefileBuild.vc: bump copyright year
 
-- mailmap: fixups of some contributors
-
-- projects/build-wolfssl.bat: fix the copyright year range
-
-Marc Hoersken (14 Oct 2020)
-- [Sergei Nikulov brought this change]
-
-  CI/tests: fix invocation of tests for CMake builds
+Jay Satiro (21 Jul 2021)
+- docs: mention max-filesize options also apply to MQTT transfers
   
-  Update appveyor.yml to set env variable TFLAGS and run tests
-  Remove curly braces due to CMake error (${TFLAGS} -> $TFLAGS)
-  Move testdeps build to build step (per review comments)
+  Also make it clearer that the caveat 'if the file size is unknown it
+  the option will have no effect' may apply to protocols other than FTP
+  and HTTP.
   
-  Reviewed-by: Marc Hörsken
+  Reported-by: Josh Soref
   
-  Closes #6066
-  Fixes #6052
+  Fixes https://github.com/curl/curl/issues/7453
 
-- tests/server/util.c: fix support for Windows Unicode builds
-  
-  Detected via #6066
-  Closes #6070
+- [Josh Soref brought this change]
 
-Daniel Stenberg (13 Oct 2020)
-- [Jay Satiro brought this change]
+  docs/cmdline: fix grammar and typos
 
-  strerror: Revert to local codepage for Windows error string
-  
-  - Change get_winapi_error() to return the error string in the local
-    codepage instead of UTF-8 encoding.
-  
-  Two weeks ago bed5f84 fixed get_winapi_error() to work on xbox, but it
-  also changed the error string's encoding from local codepage to UTF-8.
-  
-  We return the local codepage version of the error string because if it
-  is output to the user's terminal it will likely be with functions which
-  expect the local codepage (eg fprintf, failf, infof).
-  
-  This is essentially a partial revert of bed5f84. The support for xbox
-  remains but the error string is reverted back to local codepage.
-  
-  Ref: https://github.com/curl/curl/pull/6005
-  
-  Reviewed-by: Marcel Raad
-  Closes #6065
+- [Josh Soref brought this change]
 
-Marc Hoersken (13 Oct 2020)
-- CI/tests: use verification curl for test reporting APIs
-  
-  Avoid using our own, potentially installed, curl for
-  the test reporting APIs in case it is broken.
-  
-  Reviewed-by: Daniel Stenberg
+  dump-header.d: Drop suggestion to use for cookie storage
   
-  Preparation for #6049
-  Closes #6063
-
-Viktor Szakats (12 Oct 2020)
-- windows: fix comparison of mismatched types warning
+  Since --cookie-jar is the preferred way to store cookies, no longer
+  suggest using --dump-header to do so.
   
-  clang 10, mingw-w64:
-  ```
-  vtls/openssl.c:2917:33: warning: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long')
-        [-Wsign-compare]
-                if(GetLastError() != CRYPT_E_NOT_FOUND)
-                   ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~
-  ```
+  Co-authored-by: Daniel Stenberg
   
-  Approved-by: Daniel Stenberg
-  Closes #6062
+  Closes https://github.com/curl/curl/issues/7414
 
-Daniel Stenberg (11 Oct 2020)
-- [Viktor Szakats brought this change]
+- [Josh Soref brought this change]
 
-  src/Makefile.m32: fix undefined curlx_dyn_* errors
-  
-  by linking `lib/dynbuf.c` when building a static curl binary.
-  Previously this source file was only included when building
-  a dynamic curl binary. This was likely possibly because no
-  functions from the `src/Makefile.inc` / `CURLX_CFILES` sources
-  were actually required for a curl tool build. This has
-  recently changed with the introduction of `curlx_dyn_*()`
-  memory functions and their use by the tool sources.
+  doc/cmdline: fix grammar and typos
   
-  Closes #6060
-
-- HISTORY: curl verifies SSL certs by default since version 7.10
+  Closes https://github.com/curl/curl/pull/7454
+  Closes https://github.com/curl/curl/pull/7455
+  Closes https://github.com/curl/curl/pull/7456
+  Closes https://github.com/curl/curl/pull/7459
+  Closes https://github.com/curl/curl/pull/7460
+  Closes https://github.com/curl/curl/pull/7461
+  Closes https://github.com/curl/curl/pull/7462
+  Closes https://github.com/curl/curl/pull/7463
 
-Marc Hoersken (8 Oct 2020)
-- runtests.pl: use $LIBDIR variable instead of hardcoded path
+Daniel Stenberg (20 Jul 2021)
+- vtls: fix connection reuse checks for issuer cert and case sensitivity
   
-  Reviewed-by: Daniel Stenberg
-  Closes #6051
-
-Daniel Stenberg (7 Oct 2020)
-- checksrc: detect // comments on column 0
-  
-  Spotted while working on #6045
-  
-  Closes #6048
-
-- [Frederik Wedel-Heinen brought this change]
-
-  mbedtls: add missing header when defining MBEDTLS_DEBUG
-  
-  Closes #6045
-
-- curl: make sure setopt CURLOPT_IPRESOLVE passes on a long
-  
-  Previously, it would pass on a define (int) which could make libcurl
-  read junk as a value - which prevented the CURLOPT_IPRESOLVE option to
-  "take". This could then make test 2100 do two DoH requests instead of
-  one!
-  
-  Fixes #6042
-  Closes #6043
-
-- RELEASE-NOTES: synced
-
-- scripts/release-notes.pl: don't "embed" $ in format string for printf()
-  
-  ... since they might contain %-codes that mess up the output!
-
-Jay Satiro (5 Oct 2020)
-- [M.R.T brought this change]
-
-  build-wolfssl: fix build with Visual Studio 2019
-  
-  Closes https://github.com/curl/curl/pull/6033
-
-Daniel Stenberg (4 Oct 2020)
-- runtests: add %repeat[]% for test files
-  
-  ... and use this new keywords in all the test files larger than 50K to reduce
-  their sizes and make them a lot easier to read and understand.
-  
-  Closes #6040
-
-- [Emil Engler brought this change]
-
-  --help: move two options from the misc category
-  
-  The cmdline opts delegation and suppress-connect-headers
-  fit better into auth and proxy rather than misc.
-  
-  Follow-up to aa8777f63febc
-  Closes #6038
-
-- [Samanta Navarro brought this change]
-
-  docs/opts: fix typos in two manual pages
-  
-  Closes #6039
-
-- ldap: reduce the amount of #ifdefs needed
-  
-  Closes #6035
-
-- runtests: provide curl's version string as %VERSION for tests
-  
-  ... so that we can check HTTP requests for User-Agent: curl/%VERSION
-  
-  Update 600+ test cases accordingly.
-  
-  Closes #6037
-
-- checksrc: warn on space after exclamation mark
-  
-  Closes #6034
-
-- test1465: verify --libcurl with binary POST data
-
-- runtests: allow generating a binary sequence from hex
-
-- tool_setopt: escape binary data to hex, not octal
-
-- curl: make --libcurl show binary posts correctly
-  
-  Reported-by: Stephan Mühlstrasser
-  Fixes #6031
-  Closes #6032
-
-Jay Satiro (1 Oct 2020)
-- strerror: fix null deref on winapi out-of-memory
-  
-  Follow-up to bed5f84 from several days ago.
-  
-  Ref: https://github.com/curl/curl/pull/6005
-
-Daniel Stenberg (1 Oct 2020)
-- [Kamil Dudka brought this change]
-
-  vtls: deduplicate some DISABLE_PROXY ifdefs
-  
-  ... in the code of gtls, nss, and openssl
-  
-  Closes #5735
-
-- RELEASE-NOTES: synced
-
-- [Emil Engler brought this change]
-
-  TODO: Add OpenBSD libtool notice
-  
-  See #5862
-  Closes #6030
-
-- tests/unit/README: convert to markdown
-  
-  ... and add to dist!
-  
-  Closes #6028
-
-- tests/README: convert to markdown
-  
-  Closes #6028
-
-- include/README: convert to markdown
-  
-  Closes #6028
-
-- examples/README: convert to markdown
-  
-  Closes #6028
-
-- configure: don't say HTTPS-proxy is enabled when disabled!
-  
-  Reported-by: Kamil Dudka
-  Reviewed-by: Kamil Dudka
-  Bug: https://github.com/curl/curl/pull/5735#issuecomment-701376388
-  Closes #6029
-
-Daniel Gustafsson (30 Sep 2020)
-- src: Consistently spell whitespace without whitespace
-  
-  Whitespace is spelled without a space between white and space, so
-  make sure to consistently spell it that way across the codebase.
-  
-  Closes #6023
-  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
-  Reviewed-by: Emil Engler <me@emilengler.com>
-
-- MANUAL: update examples to resolve without redirects
-  
-  www.netscape.com is redirecting to a cookie consent form on Aol, and
-  cool.haxx.se isn't responding to FTP anymore. Replace with examples
-  that resolves in case users try out the commands when reading the
-  manual.
-  
-  Closes #6024
-  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
-  Reviewed-by: Emil Engler <me@emilengler.com>
-
-Daniel Stenberg (30 Sep 2020)
-- HISTORY: add some 2020 events
-
-- sectransp: make it build with --disable-proxy
-  
-  Follow-up from #5466 and f3d501dc678d80
-  Reported-by: Javier Navarro
-  Fixes #6025
-  Closes #6026
-
-- ECH: renamed from ESNI in docs and configure
-  
-  Encrypted Client Hello (ECH) is the current name.
-  
-  Closes #6022
-
-- configure: use "no" instead of "disabled" for the end summary
-  
-  ... for consistency but also to make them more distinctly stand out next
-  to the "enabled" lines.
-
-- TODO: SSH over HTTPS proxy with more backends
-  
-  ... as right now only the libssh2 backend supports it.
-
-- libssh2: handle the SSH protocols done over HTTPS proxy
-  
-  Reported-by: Robin Douine
-  Fixes #4295
-  Closes #6021
-
-- [Emil Engler brought this change]
-
-  memdebug: remove 9 year old unused debug function
-  
-  There used to be a way to have memdebug fill allocated memory. 9 years
-  later this has no value there (valgrind and ASAN etc are way better). If
-  people need to know about it they can have a look at VCS logs.
-  
-  Closes #5973
-
-- sendf: move Curl_sendf to dict.c and make it static
-  
-  ... as the only remaining user of that function. Also fix gopher.c to
-  instead use Curl_write()
-  
-  Closes #6020
-
-- ROADMAP: updates and cleanups
-  
-  Fix the HSTS PR
-  
-  Remove DoT, thread-safe init and hard-coded localhost. I feel very
-  little interest for these with users so I downgrade them to plain "TODO"
-  entries again.
-
-- schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root
-  
-  This matches what is returned in other TLS backends in the same
-  situation.
-  
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Emil Engler
-  Follow-up to 5a3efb1
-  Reported-by: iammrtau on github
-  Fixes #6003
-  Closes #6018
-
-- RELEASE-NOTES: synced
-
-- ftp: make a 552 response return CURLE_REMOTE_DISK_FULL
-  
-  Added test 348 to verify. Added a 'STOR' command to the test FTP
-  server to enable test 348. Documented the command in FILEFORMAT.md
-  
-  Reported-by: Duncan Wilcox
-  Fixes #6016
-  Closes #6017
-
-- pause: only trigger a reread if the unpause sticks
-  
-  As an unpause might itself get paused again and then triggering another
-  reread doesn't help.
-  
-  Follow-up from e040146f22608fd9 (shipped since 7.69.1)
-  
-  Bug: https://curl.haxx.se/mail/lib-2020-09/0081.html
-  Patch-by: Kunal Chandarana
-  Fixes #5988
-  Closes #6013
-
-- test163[12]: require http to be built-in to run
-  
-  ... as speaking over an HTTPS proxy implies http!
-  
-  Closes #6014
-
-- ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX define
-  
-  Closes #6012
-
-- [Javier Blazquez brought this change]
-
-  strerror: honor Unicode API choice on Windows
-  
-  Closes #6005
-
-- imap: make imap_send use dynbuf for the send buffer management
-  
-  Reuses the buffer and thereby reduces number of mallocs over a transfer.
-  
-  Closes #6010
-
-- Curl_send: return error when pre_receive_plain can't malloc
-  
-  ... will probably trigger some false DEAD CODE positives on non-windows
-  code analyzers for the conditional code.
-  
-  Closes #6011
-
-- ftp: separate FTPS from FTP over "HTTPS proxy"
-  
-  When using HTTPS proxy, SSL is used but not in the view of the FTP
-  protocol handler itself so separate the connection's use of SSL from the
-  FTP control connection's sue.
-  
-  Reported-by: Mingtao Yang
-  Fixes #5523
-  Closes #6006
-
-Dan Fandrich (23 Sep 2020)
-- tests/data: Fix some mismatched XML tags in test cases
-  
-  This allows these test files to pass xmllint.
-
-Daniel Stenberg (23 Sep 2020)
-- pingpong: use a dynbuf for the *_pp_sendf() function
-  
-  ... reuses the same dynamic buffer instead of doing repeated malloc/free
-  cycles.
-  
-  Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls
-  after this change in my test setup (132 => 125), curl 7.72.0 needed 140
-  calls for this.
-  
-  Test case 103 makes 9 less allocations now (130). Down from 149 in
-  7.72.0.
-  
-  Closes #6004
-
-- dynbuf: add Curl_dyn_vaddf
-  
-  Closes #6004
-
-- dynbuf: make *addf() not require extra mallocs
-  
-  ... by introducing a printf() function that appends directly into a
-  dynbuf: Curl_dyn_vprintf(). This avoids the mandatory extra malloc so if
-  the buffer is already big enough it can just printf directly into it.
-  
-  Since this less-malloc version requires tthe use of a library internal
-  printf function, we only provide this version when building libcurl and
-  not for the dynbuf code that is used when building the curl tool.
-  
-  Closes #5998
-
-- KNOWN_BUGS: Unable to use PKCS12 certificate with Secure Transport
-  
-  Closes #5403
-
-- pingpong: remove a malloc per Curl_pp_vsendf call
-  
-  This typically makes 7-9 fewer mallocs per FTP transfer.
-  
-  Closes #5997
-
-- symbian: drop support
-  
-  The OS is deprecated. I see no traces of anyone having actually built
-  curl for Symbian after 2012.
-  
-  The public headers are unmodified.
-  
-  Closes #5989
-
-- RELEASE-NOTES: synced
-
-- curl_krb5.h: rename from krb5.h
-  
-  Follow-up from f4873ebd0be32cf
-  
-  Turns out some older openssl installations go bananas otherwise.
-  Reported-by: Tom van der Woerdt
-  Fixes #5995
-  Closes #5996
-
-- test1297: verify GOT_NOTHING with http proxy tunnel
-
-- http_proxy: do not count proxy headers in the header bytecount
-  
-  ... as that counter is subsequently used to detect if nothing was
-  returned from the peer. This made curl return CURLE_OK when it should
-  have returned CURLE_GOT_NOTHING.
-  
-  Fixes #5992
-  Reported-by: Tom van der Woerdt
-  Closes #5994
-
-- setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument
-  
-  Fixed two return code mixups. CURLE_UNKNOWN_OPTION is saved for when the
-  option is, yeah, not known. Clarified this in the setopt man page too.
-  
-  Closes #5993
-
-- krb5: merged security.c and krb specific FTP functions in here
-  
-  These two files were always tightly connected and it was hard to
-  understand what went into which. This also allows us to make the
-  ftpsend() function static (moved from ftp.c).
-  
-  Removed security.c
-  Renamed curl_sec.h to krb5.h
-  
-  Closes #5987
-
-- Curl_handler: add 'family' to each protocol
-  
-  Makes get_protocol_family() faster and it moves the knowledge about the
-  "families" to each protocol handler, where it belongs.
-  
-  Closes #5986
-
-- parsedate: tune the date to epoch conversion
-  
-  By avoiding an unnecessary error check and the temp use of the tm
-  struct, the time2epoch conversion function gets a little bit faster.
-  When repeating test 517, the updated version is perhaps 1% faster (on
-  one particular build on one particular architecture).
-  
-  Closes #5985
-
-- cmake: remove scary warning
-  
-  Remove the text saying
-  
-  "the curl cmake build system is poorly maintained. Be aware"
-  
-  ... not because anything changed just now, but to encourage users to use
-  it and subsequently improve it.
-  
-  Closes #5984
-
-- docs/MQTT: remove outdated paaragraphs
-
-- docs/MQTT: not experimental anymore
-  
-  Follow-up to e37e4468688d8f
-
-- docs/RESOURCES: remove
-  
-  This document is not maintained and rather than trying to refresh it,
-  let's kill it. A more up-to-date document with relevant RFCs is this
-  page on the curl website: https://curl.haxx.se/rfc/
-  
-  Closes #5980
-
-- docs/TheArtOfHttpScripting: convert to markdown
-  
-  Makes it easier to browse on github etc. Offers (better) links.
-  
-  It should be noted that this document is already mostly outdated and
-  "Everything curl" at https://ec.haxx.se/ is a better resource and
-  tutorial.
-  
-  Closes #5981
-
-- BUGS: convert document to markdown
-  
-  Closes #5979
-
-- --help: strdup the category
-  
-  ... since it is converted and the original pointer is freed on Windows
-  unicode handling.
-  
-  Follow-up to aa8777f63febc
-  Fixes #5977
-  Closes #5978
-  Reported-by: xwxbug on github
-
-- CHECKSRC: document two missing warnings
-
-- RELEASE-NOTES: synced
-
-- ftp: avoid risk of reading uninitialized integers
-  
-  If the received PASV response doesn't match the expected pattern, we
-  could end up reading uninitialized integers for IP address and port
-  number.
-  
-  Issue pointed out by muse.dev
-  Closes #5972
-
-- [Quentin Balland brought this change]
-
-  easy_reset: clear retry counter
-  
-  Closes #5975
-  Fixes #5974
-
-- ftp: get rid of the PPSENDF macro
-  
-  The use of such a macro hides some of what's actually going on to the
-  reader and is generally disapproved of in the project.
-  
-  Closes #5971
-
-- man pages: switch to https://example.com URLs
-  
-  Since HTTPS is "the new normal", this update changes a lot of man page
-  examples to use https://example.com instead of the previous "http://..."
-  
-  Closes #5969
-
-- github: remove the duplicate "Security vulnerability" entry
-  
-  ... since github adds an entry automatically by itself.
-  
-  Closes #5970
-
-- [Emil Engler brought this change]
-
-  github: use new issue template feature
-  
-  This helps us to avoid getting feature requests as well as security
-  bugs reported into the issue tracker.
-  
-  Closes #5936
-
-- [Emil Engler brought this change]
-
-  urlapi: use more Curl_safefree
-  
-  Closes #5968
-
-Marc Hoersken (17 Sep 2020)
-- multi: align WinSock mask variables in Curl_multi_wait
-  
-  Also skip pre-checking sockets to set timeout_ms to 0
-  after the first socket has been detected to be ready.
-  
-  Reviewed-by: rcombs on github
-  Reviewed-by: Daniel Stenberg
-  
-  Follow up to #5886
-
-- multi: reuse WinSock events variable in Curl_multi_wait
-  
-  Since the struct is quite large (1 long and 10 ints) we
-  declare it once at the beginning of the function instead
-  of multiple times inside loops to avoid stack movements.
-  
-  Reviewed-by: Viktor Szakats
-  Reviewed-by: Daniel Stenberg
-  
-  Closes #5886
-
-Daniel Stenberg (16 Sep 2020)
-- TODO: dynamically decide to use socketpair
-  
-  Suggested-by: Anders Bakken
-  
-  Closes #4829
-
-- TODO: add PR reference for native IDN support on macOS
-  
-  As there was work started on this that never got completed.
-  
-  Closes #5371
-
-- tool_help.h: update copyright year range
-  
-  Follow-up from aa8777f63febca
-
-- CI/azure: disable test 571 in the msys2 builds
-  
-  It's just too flaky there
-  
-  Reviewed-by: Marc Hoersken
-  Closes #5954
-
-- tool_writeout: protect fputs() from NULL
-  
-  When the code was changed to do fputs() instead of fprintf() it got
-  sensitive for NULL pointers; add checks for that.
-  
-  Follow-up from 0c1e767e83ec66
-  
-  Closes #5963
-
-- test3015: verify stdout "as text"
-  
-  Follow-up from 0c1e767e83e to please win32 tests
-  
-  Closes #5962
-
-- travis: use libressl v3.1.4 instead of master
-  
-  ... as their git master seems too fragile to use (and 3.2.1 which is the
-  latest has a build failure).
-  
-  Closes #5964
-
-- tests/FILEFORMAT: document type=shell for <command>
-
-- tests/FILEFORMAT: document nonewline support for <file>
-  
-  The one in <client>, that creates files.
-  
-  Follow-up from b83947c8df7
-
-- [anio brought this change]
-
-  tool_writeout: add new writeout variable, %{num_headers}
-  
-  This variable gives the number of headers.
-  
-  Closes #5947
-
-- tool_urlglob: fix compiler warning "unreachable code"
-  
-  (On Windows builds.)
-  
-  Follow-up to 70a3b003d9
-
-- [Gergely Nagy brought this change]
-
-  vtls: deduplicate client certificates in ssl_config_data
-  
-  Closes #5629
-
-- ftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUND
-  
-  This is primarily interesting for cases where CURLOPT_NOBODY is set as
-  previously curl would not return an error for this case.
-  
-  MDTM getting 550 now also returns this error (it returned
-  CURLE_FTP_COULDNT_RETR_FILE before) in order to unify return codes for
-  missing files across protocols and specific FTP commands.
-  
-  libcurl already returns error on a 550 as a MDTM response (when
-  CURLOPT_FILETIME is set). If CURLOPT_NOBODY is not set, an error would
-  happen subsequently anyway since the RETR command would fail.
-  
-  Add test 1913 and 1914 to verify. Updated several tests accordingly due
-  to the updated SIZE behavior.
-  
-  Reported-by: Tomas Berger
-  Fixes #5953
-  Closes #5957
-
-- curl: make checkpasswd use dynbuf
-  
-  Closes #5952
-
-- curl: make glob_match_url use dynbuf
-  
-  Closes #5952
-
-- curl: make file2memory use dynbuf
-  
-  Closes #5952
-
-- curl: make file2string use dynbuf
-  
-  Closes #5952
-
-- [Antarpreet Singh brought this change]
-
-  imap: set cselect_bits to CURL_CSELECT_IN initially
-  
-  ... when continuing a transfer from a FETCH response.
-  
-  When the size of the file was small enough that the entirety of the
-  transfer happens in a single go and schannel buffers holds the entire
-  data. However, it wasn't completely read in Curl_pp_readresp since a
-  line break was found before that could happen. So, by the time we are in
-  imap_state_fetch_resp - there's data in buffers that needs to be read
-  via Curl_read but nothing to read from the socket. After we setup a
-  transfer (Curl_setup_transfer), curl just waits on the socket state to
-  change - which doesn't happen since no new data ever comes.
-  
-  Closes #5961
-
-- RELEASE-NOTES: synced
-
-- test434: test -K use in a single line without newline
-  
-  Closes #5946
-
-- runtests: allow creating files without newlines
-  
-  Closes #5946
-
-- curl: use curlx_dynbuf for realloc when loading config files
-  
-  ... fixes an integer overflow at the same time.
-  
-  Reported-by: ihsinme on github
-  Assisted-by: Jay Satiro
-  
-  Closes #5946
-
-- dynbuf: provide curlx_ names for reuse by the curl tool
-  
-  Closes #5946
-
-- dynbuf: make sure Curl_dyn_tail() zero terminates
-  
-  Closes #5959
-
-- tests: add test1912 to the dist
-  
-  Follow-up to 70984ce1be4cab6c
-
-- docs/LICENSE-MIXING: remove
-  
-  This document is not maintained and I feel that it doesn't provide much
-  value to users anymore (if it ever did).
-  
-  Closes #5955
-
-- [Laramie Leavitt brought this change]
-
-  http: consolidate nghttp2_session_mem_recv() call paths
-  
-  Previously there were several locations that called
-  nghttp2_session_mem_recv and handled responses slightly differently.
-  Those have been converted to call the existing
-  h2_process_pending_input() function.
-  
-  Moved the end-of-session check to h2_process_pending_input() since the
-  only place the end-of-session state can change is after nghttp2
-  processes additional input frames.
-  
-  This will likely fix the fuzzing error. While I don't have a root cause
-  the out-of-bounds read seems like a use after free, so moving the
-  nghttp2_session_check_request_allowed() call to a location with a
-  guaranteed nghttp2 session seems reasonable.
-  
-  Also updated a few nghttp2 callsites to include error messages and added
-  a few additional error checks.
-  
-  Closes #5648
-
-- HISTORY: mention alt-svc added in 2019
-  
-  ... and make 1996 the first year subtitle
-
-- base64: also build for pop3 and imap
-  
-  Follow-up to the fix in 20417a13fb8f83
-  
-  Reported-by: Michael Olbrich
-  Fixes #5937
-  Closes #5948
-
-- base64: enable in build with SMTP
-  
-  The oauth2 support is used with SMTP and it uses base64 functions.
-  
-  Reported-by: Michael Olbrich
-  Fixes #5937
-  Closes #5938
-
-- curl_mime_headers.3: fix the example's use of curl_slist_append
-  
-  Reported-by: sofaboss on github
-  Fixes #5942
-  Closes #5943
-
-- lib583: fix enum mixup
-  
-  grrr the previous follow-up to 17fcdf6a31 was wrong
-
-- libtest: fix build errors
-  
-  Follow-up from 17fcdf6a310d4c8076
-
-- lib: fix -Wassign-enum warnings
-  
-  configure --enable-debug now enables -Wassign-enum with clang,
-  identifying several enum "abuses" also fixed.
-  
-  Reported-by: Gisle Vanem
-  Bug: https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553
-  
-  Closes #5929
-
-- RELEASE-NOTES: synced
-
-- [Diven Qi brought this change]
-
-  url: use blank credentials when using proxy w/o username and password
-  
-  Fixes proxy regression brought in commit ad829b21ae (7.71.0)
-  
-  Fixed #5911
-  Closes #5914
-
-- travis: add a build using libressl (from git master)
-  
-  The v3.2.1 tag (latest release atm) results in a broken build.
-  
-  Closes #5932
-
-- configure: let --enable-debug set -Wenum-conversion with gcc >= 10
-  
-  Unfortunately, this option is not detecting the same issues as clang's
-  -Wassign-enum flag, but should still be useful to detect future
-  mistakes.
-  
-  Closes #5930
-
-- openssl: consider ALERT_CERTIFICATE_EXPIRED a failed verification
-  
-  If the error reason from the lib is
-  SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED, libcurl will return
-  CURLE_PEER_FAILED_VERIFICATION and not CURLE_SSL_CONNECT_ERROR.
-  
-  This unifies the libcurl return code and makes libressl run test 313
-  (CRL testing) fine.
-  
-  Closes #5934
-
-- FAQ: refreshed some very old language
-
-- cmake: make HTTP_ONLY also disable MQTT
-  
-  ... and alphasort the order of disabling protocols to make it easier to
-  browse.
-  
-  Closes #5931
-
-- libtest: remove lib1541 leftovers
-  
-  Caused automake errors.
-  
-  Follow-up to 8ca54a03ea08a
-
-- tests/libtests: remove test 1900 and 2033
-  
-  We already remove the test files, now remove the libtest codes as well.
-  
-  Follow-up to e50a877df74
-
-Marc Hoersken (7 Sep 2020)
-- CI/azure: add test number to title for display in analytics
-  
-  To ease identification of tests the test number is added to
-  the test case title in order to have it on the Azure DevOps
-  Analytics pages and reports which currently do not show it.
-  
-  Bump test case revision to make Azure DevOps update titles.
-  
-  Closes #5927
-
-Daniel Stenberg (6 Sep 2020)
-- altsvc: clone setting in curl_easy_duphandle
-  
-  The cache content is not duplicated, like other caches, but the setting
-  and specified file name are.
-  
-  Test 1908 is extended to verify this somewhat. Since the duplicated
-  handle gets the same file name, the test unfortunately overwrites the
-  same file twice (with different contents) which makes it hard to check
-  automatically.
-  
-  Closes #5923
-
-- test1541: remove since it is a known bug
-  
-  A shared connection cache is not thread-safe is a known issue. Stop
-  testing this until we believe this issue is addressed. Reduces
-  occasional test failures we don't care about.
-  
-  The test code in lib1541.c is left in git to allow us to restore it when
-  we get to fix this.
-  
-  Closes #5922
-
-- tests: remove pipelining tests
-  
-  Remove the tests 530, 584, 1900, 1901, 1902, 1903 and 2033. They were
-  previously disabled.
-  
-  The Pipelining code was removed from curl in commit 2f44e94efb3df8e,
-  April 2019.
-  
-  Closes #5921
-
-- curl: retry delays in parallel mode no longer sleeps blocking
-  
-  The previous sleep for retries would block all other concurrent
-  transfers. Starting now, the retry will instead be properly marked to
-  not get restarted until after the delay time but other transfers can
-  still continue in the mean time.
-  
-  Closes #5917
-
-- curl:parallel_transfers: make sure retry readds the transfer
-  
-  Reported-by: htasta on github
-  Fixes #5905
-  Closes #5917
-
-- build: drop support for building with Watcom
-  
-  These files are not maintained, they seem to have no users, Watcom
-  compilers look like not having users nor releases anymore.
-  
-  Closes #5918
-
-- winbuild/rundebug.cmd: remove
-  
-  Seems to have been added by mistake? Not included in dists.
-  
-  Closes #5919
-
-- curl: in retry output don't call all problems "transient"
-  
-  ... because when --retry-all-errors is used, the error isn't necessarily
-  transient at all.
-  
-  Closes #5916
-
-- easygetopt: pass a valid enum to avoid compiler warning
-  
-  "integer constant not in range of enumerated type 'CURLoption'"
-  
-  Reported-by: Gisle Vanem
-  Bug: https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843
-  
-  Closes #5915
-
-- [Emil Engler brought this change]
-
-  tests: Add tests for new --help
-  
-  This commit is a part of "--help me if you can"
-  
-  Closes #5680
-
-- [Emil Engler brought this change]
-
-  tool: update --help with categories
-  
-  This commit is a part of "--help me if you can"
-  
-  Closes #5680
-
-- [Emil Engler brought this change]
-
-  docs: add categories to all cmdline opts
-  
-  Adapted gen.pl with 'listcats'
-  
-  This commit is a part of "--help me if you can"
-  
-  Closes #5680
-
-- RELEASE-NOTES: synced
-
-- [ihsinme brought this change]
-
-  connect.c: remove superfluous 'else' in Curl_getconnectinfo
-  
-  Closes #5912
-
-- [Samuel Marks brought this change]
-
-  CMake: remove explicit `CMAKE_ANSI_CFLAGS`
-  
-  This variable was removed from cmake in commit
-  https://gitlab.kitware.com/cmake/cmake/commit/5a834b0bb0bc288. A later
-  CMake commit removes the variable from the tests, claiming that it was
-  removed in CMake 2.6
-  
-  Reviewed-By: Peter Wu
-  Closes #5439
-
-- [cbe brought this change]
-
-  libssh2: pass on the error from ssh_force_knownhost_key_type
-  
-  Closes #5909
-
-- scripts/delta: add diffstat summary
-  
-  ... and make output more table-like
-
-- [Martin Bašti brought this change]
-
-  http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set
-  
-  ... in case NO_PROXY takes an effect
-  
-  Without this patch, the following command crashes:
-  
-      $ GIT_CURL_VERBOSE=1 NO_PROXY=github.com HTTPS_PROXY=https://example.com \
-          git clone https://github.com/curl/curl.git
-  
-  Minimal libcurl-based reproducer:
-  
-      #include <curl/curl.h>
-  
-      int main() {
-        CURL *curl = curl_easy_init();
-        if(curl) {
-          CURLcode ret;
-          curl_easy_setopt(curl, CURLOPT_URL, "https://github.com/");
-          curl_easy_setopt(curl, CURLOPT_PROXY, "example.com");
-          /* set the proxy type */
-          curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
-          curl_easy_setopt(curl, CURLOPT_NOPROXY, "github.com");
-          curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
-          ret = curl_easy_perform(curl);
-          curl_easy_cleanup(curl);
-          return ret;
-        }
-        return -1;
-      }
-  
-  Assisted-by: Kamil Dudka
-  Bug: https://bugzilla.redhat.com/1873327
-  Closes #5902
-
-- travis: add a CI job with openssl3 (from git master)
-  
-  Closes #5908
-
-- openssl: avoid error conditions when importing native CA
-  
-  The code section that is OpenSSL 3+ specific now uses the same logic as
-  is used in the version < 3 section. It caused a compiler error without
-  it.
-  
-  Closes #5907
-
-- setopt: avoid curl_ on local variable
-  
-  Closes #5906
-
-- mqtt.c: avoid curl_ prefix on local variable
-  
-  Closes #5906
-
-- wildcard: strip "curl_" prefix from private symbols
-  
-  Closes #5906
-
-- vtls: make it 'struct Curl_ssl_session'
-  
-  Use uppercase C for internal symbols.
-  
-  Closes #5906
-
-- curl_threads: make it 'struct Curl_actual_call'
-  
-  Internal names should not be prefixed "curl_"
-  
-  Closes #5906
-
-- schannel: make it 'struct Curl_schannel*'
-  
-  As internal global names should use captical C.
-  
-  Closes #5906
-
-- hash: make it 'struct Curl_hash'
-  
-  As internal global names should use captical C.
-  
-  Closes #5906
-
-- llist: make it "struct Curl_llist"
-  
-  As internal global names should use captical C.
-  
-  Closes #5906
-
-Marc Hoersken (2 Sep 2020)
-- telnet.c: depend on static requirement of WinSock version 2
-  
-  Drop dynamic loading of ws2_32.dll and instead rely on the
-  imported version which is now required to be at least 2.2.
-  
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Viktor Szakats
-  
-  Closes #5854
-
-- win32: drop support for WinSock version 1, require version 2
-  
-  IPv6, telnet and now also the multi API require WinSock
-  version 2 which is available starting with Windows 95.
-  
-  Therefore we think it is time to drop support for version 1.
-  
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Viktor Szakats
-  
-  Follow up to #5634
-  Closes #5854
-
-- select: align poll emulation to return all relevant events
-  
-  The poll emulation via select already consumes POLLRDNORM,
-  POLLWRNORM and POLLRDBAND as input events. Therefore it
-  should also return them as output events if signaled.
-  
-  Also fix indentation in input event handling block.
-  
-  Assisted-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  
-  Replaces #5852
-  Closes #5883
-
-- CI/azure: MQTT is now enabled by default
-  
-  Reviewed-by: Daniel Stenberg
-  
-  Follow up to #5858
-  Closes #5903
-
-Daniel Stenberg (2 Sep 2020)
-- copyright.pl: ignore buildconf
-
-- test971: show test mismatches "inline"
-
-- lib/Makefile.am: bump VERSIONINFO due to new functions
-  
-  ... we're generally bad at this, but we are adding new functions for
-  this release.
-  
-  Closes #5899
-
-- optiontable: use DEBUGBUILD
-  
-  Follow-up to commit 6e18568ba38 (#5877)
-
-- cmdline-opts/gen.pl: generate nicer "See Also" in curl.1
-  
-  If there are more than two items in the list, use commas for all but the
-  last separator which is set to 'and'. Reads better.
-  
-  Closes #5898
-
-- curl.1: add see also no-progress-meter on two spots
-  
-  Ref: #5894
-  
-  Closes #5897
-
-- RELEASE-NOTES: synced
-
-- mqtt: enable by default
-  
-  No longer considered experimental.
-  
-  Closes #5858
-
-- [Michael Baentsch brought this change]
-
-  tls: add CURLOPT_SSL_EC_CURVES and --curves
-  
-  Closes #5892
-
-- url: remove funny embedded comments in Curl_disonnect calls
-
-- [Chris Paulson-Ellis brought this change]
-
-  conn: check for connection being dead before reuse
-  
-  Prevents incorrect reuse of an HTTP connection that has been prematurely
-  shutdown() by the server.
-  
-  Partial revert of 755083d00deb16
-  
-  Fixes #5884
-  Closes #5893
-
-Marc Hoersken (29 Aug 2020)
-- buildconf: exec autoreconf to avoid additional process
-  
-  Also make buildconf exit with the return code of autoreconf.
-  
-  Reviewed-by: Daniel Stenberg
-  
-  Follow up to #5853
-  Closes #5890
-
-- CI/azure: no longer ignore results of test 1013
-  
-  Follow up to #5771
-  Closes #5889
-
-- docs: add description about CI platforms to CONTRIBUTE.md
-  
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Jay Satiro
-  
-  Closes #5882
-
-Daniel Stenberg (29 Aug 2020)
-- tests/getpart: use MIME::Base64 instead of home-cooked
-  
-  Since we already use the base64 package since a while back, we can just
-  as well switch to that here too.
-  
-  It also happens to use the exact same function name, which otherwise
-  causes a run-time warning.
-  
-  Reported-by: Marc Hörsken
-  Fixes #5885
-  Closes #5887
-
-Marcel Raad (29 Aug 2020)
-- ntlm: fix condition for curl_ntlm_core usage
-  
-  `USE_WINDOWS_SSPI` without `USE_WIN32_CRYPTO` but with any other DES
-  backend is fine, but was excluded before.
-  
-  This also fixes test 1013 as the condition for SMB support in
-  configure.ac didn't match the condition in the source code. Now it
-  does.
-  
-  Fixes https://github.com/curl/curl/issues/1262
-  Closes https://github.com/curl/curl/pull/5771
-
-- AppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode
-  
-  The Schannel builds are the most useful to verify as they make the most
-  use of the Windows API. Classic MinGW doesn't support Unicode at all,
-  only MinGW-w64 and MSVC do.
-  
-  Closes https://github.com/curl/curl/pull/5843
-
-- CMake: add option to enable Unicode on Windows
-  
-  As already existing for winbuild.
-  
-  Closes https://github.com/curl/curl/pull/5843
-
-Marc Hoersken (29 Aug 2020)
-- select: simplify return code handling for poll and select
-  
-  poll and select already return -1 on error according to POSIX,
-  so there is no need to perform a <0 to -1 conversion in code.
-  
-  Also we can just use one check with <= 0 on the return code.
-  
-  Assisted-by: Daniel Stenberg
-  Reviewed-by: Jay Satiro
-  
-  Replaces #5852
-  Closes #5880
-
-Daniel Stenberg (28 Aug 2020)
-- RELEASE-NOTES: synced
-
-- [Jeroen Ooms brought this change]
-
-  tests: add test1912 with typechecks
-  
-  Validates that gcc-typecheck macros match the new option type API.
-  
-  Closes #5873
-
-- easyoptions: provide debug function when DEBUGBUILD
-  
-  ... not CURLDEBUG as they're not always set in conjunction.
-  
-  Follow-up to 6ebe63fac23f38df
-  
-  Fixes #5877
-  Closes #5878
-
-Marc Hoersken (28 Aug 2020)
-- sockfilt: handle FD_CLOSE winsock event on write socket
-  
-  Learn from the way Cygwin handles and maps the WinSock events
-  to simulate correct and complete poll and select behaviour
-  according to Richard W. Stevens Network Programming book.
-  
-  Follow up to #5867
-  Closes #5879
-
-- multi: handle connection state winsock events
-  
-  Learn from the way Cygwin handles and maps the WinSock events
-  to simulate correct and complete poll and select behaviour
-  according to Richard W. Stevens Network Programming book.
-  
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Marcel Raad
-  
-  Follow up to #5634
-  Closes #5867
-
-Daniel Stenberg (28 Aug 2020)
-- Curl_pgrsTime - return new time to avoid timeout integer overflow
-  
-  Setting a timeout to INT_MAX could cause an immediate error to get
-  returned as timeout because of an overflow when different values of
-  'now' were used.
-  
-  This is primarily fixed by having Curl_pgrsTime() return the "now" when
-  TIMER_STARTSINGLE is set so that the parent function will continue using
-  that time.
-  
-  Reported-by: Ionuț-Francisc Oancea
-  Fixes #5583
-  Closes #5847
-
-- TLS: fix SRP detection by using the proper #ifdefs
-  
-  USE_TLS_SRP will be true if *any* selected TLS backend can use SRP
-  
-  HAVE_OPENSSL_SRP is defined when OpenSSL can use it
-  
-  HAVE_GNUTLS_SRP is defined when GnuTLS can use it
-  
-  Clarify in the curl_verison_info docs that CURL_VERSION_TLSAUTH_SRP is
-  set if at least one of the supported backends offers SRP.
-  
-  Reported-by: Stefan Strogin
-  Fixes #5865
-  Closes #5870
-
-- [Dan Kenigsberg brought this change]
-
-  docs: SSLCERTS: fix English syntax
-  
-  Signed-off-by: Dan Kenigsberg <danken@redhat.com>
-  
-  Closes #5876
-
-- [Alessandro Ghedini brought this change]
-
-  docs: non-existing macros in man pages
-  
-  As reported by man(1) when invoked as:
-  
-    man --warnings -E UTF-8 -l -Tutf8 -Z <file> >/dev/null
-  
-  Closes #5846
-
-- [Alessandro Ghedini brought this change]
-
-  curl.1: fix typo invokved -> invoked
-  
-  Closes #5846
-
-- buildconf: invoke 'autoreconf -fi' instead
-  
-  The custom script isn't necessary anymore - but remains for simplicity
-  and just invokes autoreconf.
-  
-  Closes #5853
-
-- [Emil Engler brought this change]
-
-  lib: make Curl_gethostname accept a const pointer
-  
-  The address of that variable never gets changed, only the data in it so
-  why not make it a "char * const"?
-  
-  Closes #5866
-
-- docs/libcurl: update "Added in" version for curl_easy_option*
-  
-  Follow-up to 6ebe63fac23f38
-
-- scripts: improve the "get latest curl release tag" logic
-  
-  ... by insiting on it matching "^curl-".
-
-- configure: added --disable-get-easy-options
-  
-  To allow disabling of the curl_easy_option APIs in a build.
-  
-  Closes #5365
-
-- options: API for meta-data about easy options
-  
-   const struct curl_easyoption *curl_easy_option_by_name(const char *name);
-  
-   const struct curl_easyoption *curl_easy_option_by_id (CURLoption id);
-  
-   const struct curl_easyoption *
-   curl_easy_option_next(const struct curl_easyoption *prev);
-  
-  The purpose is to provide detailed enough information to allow for
-  example libcurl bindings to get option information at run-time about
-  what easy options that exist and what arguments they expect.
-  
-  Assisted-by: Jeroen Ooms
-  Closes #5365
-
-- [Eric Curtin brought this change]
-
-  HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29
-  
-  Closes #5871
-
-- RELEASE-NOTES: synced
-
-Jay Satiro (26 Aug 2020)
-- openssl: Fix wincrypt symbols conflict with BoringSSL
-  
-  OpenSSL undefines the conflicting symbols but BoringSSL does not so we
-  must do it ourselves.
-  
-  Reported-by: Samuel Tranchet
-  Assisted-by: Javier Blazquez
-  
-  Ref: https://bugs.chromium.org/p/boringssl/issues/detail?id=371
-  Ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_1g/include/openssl/ossl_typ.h#L66-L73
-  
-  Fixes https://github.com/curl/curl/issues/5669
-  Closes https://github.com/curl/curl/pull/5857
-
-Daniel Stenberg (26 Aug 2020)
-- socketpair: allow CURL_DISABLE_SOCKETPAIR
-  
-  ... to completely disable the use of socketpair
-  
-  Closes #5850
-
-- curl_get_line: build only if cookies or alt-svc are enabled
-  
-  Closes #5851
-
-- [fullincome brought this change]
-
-  schannel: fix memory leak when using get_cert_location
-  
-  The get_cert_location function allocates memory only on success.
-  Previously get_cert_location was able to allocate memory and return
-  error. It wasn't obvious and in this case the memory wasn't
-  released.
-  
-  Fixes #5855
-  Closes #5860
-
-- [Emil Engler brought this change]
-
-  git: ignore libtests in 3XXX area
-  
-  Currently the file tests/libtest/lib3010 is not getting
-  ignored by git. This fixes it by adding the 3XXX area to
-  the according .gitignore file.
-  
-  Closes #5859
-
-- [Emil Engler brought this change]
-
-  doh: add error message for DOH_DNS_NAME_TOO_LONG
-  
-  When this error code was introduced in b6a53fff6c1d07e8a9, it was
-  forgotten to be added in the errors array and doh_strerror function.
-  
-  Closes #5863
-
-- ngtcp2: adapt to the new pkt_info arguments
-  
-  Guidance-by: Tatsuhiro Tsujikawa
-  
-  Closes #5864
-
-- winbuild/README.md: make <options> visible
-  
-  Follow-up to be753add31c2d8c
-
-- winbuild: convert the instruction text to README.md
-  
-  Closes #5861
-
-- lib1560: verify "redirect" to double-slash leading URL
-  
-  Closes #5849
-
-Marc Hoersken (25 Aug 2020)
-- multi: expand pre-check for socket readiness
-  
-  Check readiness of all sockets before waiting on them
-  to avoid locking in case the one-time event FD_WRITE
-  was already consumed by a previous wait operation.
-  
-  More information about WinSock network events:
-  https://docs.microsoft.com/en-us/windows/win32/api/
-     winsock2/nf-winsock2-wsaeventselect#return-value
-  
-  Closes #5634
-
-- [rcombs brought this change]
-
-  multi: implement wait using winsock events
-  
-  This avoids using a pair of TCP ports to provide wakeup functionality
-  for every multi instance on Windows, where socketpair() is emulated
-  using a TCP socket on loopback which could in turn lead to socket
-  resource exhaustion.
-  
-  A previous version of this patch failed to account for how in WinSock,
-  FD_WRITE is set only once when writing becomes possible and not again
-  until after a send has failed due to the buffer filling. This contrasts
-  to how FD_READ and FD_OOB continue to be set until the conditions they
-  refer to no longer apply. This meant that if a user wrote some data to
-  a socket, but not enough data to completely fill its send buffer, then
-  waited on that socket to become writable, we'd erroneously stall until
-  their configured timeout rather than returning immediately.
-  
-  This version of the patch addresses that issue by checking each socket
-  we're waiting on to become writable with select() before the wait, and
-  zeroing the timeout if it's already writable.
-  
-  Assisted-by: Marc Hörsken
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Daniel Stenberg
-  Tested-by: Gergely Nagy
-  Tested-by: Rasmus Melchior Jacobsen
-  Tested-by: Tomas Berger
-  
-  Replaces #5397
-  Reverts #5632
-  Closes #5634
-
-- select: reduce duplication of Curl_poll in Curl_socket_check
-  
-  Change Curl_socket_check to use select-fallback in Curl_poll
-  instead of implementing it in Curl_socket_check and Curl_poll.
-  
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Jay Satiro
-  
-  Replaces #5262 and #5492
-  Closes #5707
-
-- select: fix poll-based check not detecting connect failure
-  
-  This commit changes Curl_socket_check to use POLLPRI to
-  check for connect failure on the write socket, because
-  POLLPRI maps to fds_err. This is in line with select(2).
-  
-  The select-based socket check correctly checks for connect
-  failures by adding the write socket also to fds_err.
-  
-  The poll-based implementation (which internally can itself
-  fallback to select again) did not previously check for
-  connect failure by using POLLPRI with the write socket.
-  
-  See the follow up commit to this for more information.
-  
-  This commit makes sure connect failures can be detected
-  and handled if HAVE_POLL_FINE is defined, eg. on msys2-devel.
-  
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Jay Satiro
-  
-  Replaces #5509
-  Prepares #5707
-
-- select.h: make socket validation macros test for INVALID_SOCKET
-  
-  With Winsock the valid range is [0..INVALID_SOCKET-1] according to
-  https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2
-  
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Daniel Stenberg
-  
-  Closes #5760
-
-Daniel Stenberg (24 Aug 2020)
-- docs: --output-dir is added in 7.73.0, nothing else
-  
-  Follow-up to 5620d2cc78c0
-
-- curl: add --output-dir
-  
-  Works with --create-dirs and with -J
-  
-  Add test 3008, 3009, 3011, 3012 and 3013 to verify.
-  
-  Closes #5637
-
-- configure: fix pkg-config detecting wolfssl
-  
-  When amending the include path with "/wolfssl", this now properly strips
-  off all whitespace from the path variable! Previously this would lead to
-  pkg-config builds creating bad command lines.
-  
-  Closes #5848
-
-- [Michael Musset brought this change]
-
-  sftp: add the option CURLKHSTAT_FINE_REPLACE
-  
-  Replace the old fingerprint of the host with a new.
-  
-  Closes #5685
-
-- RELEASE-NOTES: synced
-  
-  The next release is now to become 7.73.0
-
-- checksrc: verify do-while and spaces between the braces
-  
-  Updated mprintf.c to comply
-  
-  Closes #5845
-
-- curl: support XDG_CONFIG_HOME to find .curlrc
-  
-  Added test433 to verify. Updated documentation.
-  
-  Reviewed-by: Jay Satiro
-  Suggested-by: Eli Schwartz
-  Fixes #5829
-  Closes #5837
-
-- etag: save and use the full received contents
-  
-  ... which makes it support weak tags and non-standard etags too!
-  
-  Added test case 347 to verify blank incoming ETag:
-  
-  Fixes #5610
-  Closes #5833
-
-- setopt: if the buffer exists, refuse the new BUFFERSIZE
-  
-  The buffer only exists during transfer and then we shouldn't change the
-  size (the setopt is not documented to work then).
+  CVE-2021-22924
   
   Reported-by: Harry Sintonen
-  Closes #5842
+  Bug: https://curl.se/docs/CVE-2021-22924.html
 
-- [COFFEETALES brought this change]
-
-  sftp: add new quote commands 'atime' and 'mtime'
+- sectransp: check for client certs by name first, then file
   
-  Closes #5810
-
-- CURLE_PROXY: new error code
+  CVE-2021-22926
   
-  Failures clearly returned from a (SOCKS) proxy now causes this return
-  code. Previously the situation was not very clear as what would be
-  returned and when.
+  Bug: https://curl.se/docs/CVE-2021-22926.html
   
-  In addition: when this error code is returned, an application can use
-  CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
-  returns a value from the new 'CURLproxycode' enum.
-  
-  Closes #5770
+  Assisted-by: Daniel Gustafsson
+  Reported-by: Harry Sintonen
 
-- runtests: make cleardir() erase dot files too
+- telnet: fix option parser to not send uninitialized contents
   
-  Because test cases might use dot files.
+  CVS-2021-22925
   
-  Closes #5838
+  Reported-by: Red Hat Product Security
+  Bug: https://curl.se/docs/CVE-2021-22925.html
 
-- KNOWN_BUGS:  'no_proxy' string-matches IPv6 numerical addreses
+Jay Satiro (20 Jul 2021)
+- connect: fix wrong format specifier in connect error string
   
-  Also: the current behavior is now documented in the curl.1 and
-  CURLOPT_NOPROXY.3 man pages.
+  0842175 (not in any release) used the wrong format specifier (long int)
+  for timediff_t. On an OS such as Windows libcurl's timediff_t (usually
+  64-bit) is bigger than long int (32-bit). In 32-bit Windows builds the
+  upper 32-bits of the timediff_t were erroneously then used by the next
+  format specifier. Usually since the timeout isn't larger than 32-bits
+  this would result in null as a pointer to the string with the reason for
+  the connection failing. On other OSes or maybe other compilers it could
+  probably result in garbage values (ie crash on deref).
   
-  Reported-by: Andrew Barnes
-  Closes #5745
-  Closes #5841
-
-Viktor Szakats (22 Aug 2020)
-- Makefile.m32: add ability to override zstd libs [ci skip]
-  
-  Similarly to brotli, where this was already possible.
-  E.g. it allows to link zstd statically to libcurl.dll.
+  Before:
+  Failed to connect to localhost port 12345 after 1201 ms: (nil)
   
-  Ref: https://github.com/curl/curl-for-win/issues/12
-  Ref: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89
+  After:
+  Failed to connect to localhost port 12345 after 1203 ms: Connection refused
   
-  Closes https://github.com/curl/curl/pull/5840
+  Closes https://github.com/curl/curl/pull/7449
 
-Daniel Stenberg (21 Aug 2020)
-- runtests: avoid 'fail to start' repeated messages in attempt loops
+- winbuild: support alternate nghttp2 static lib name
   
-  Closes #5834
-
-- runtests: clear pid variables when failing to start a server
+  - Support both nghttp2.lib and nghttp2_static.lib for static nghttp2.
   
-  ... as otherwise the parent doesn't detect the failure and believe it
-  actually worked to start.
+  nghttp2 briefly changed its static lib name to nghttp2_static, but then
+  made the _static suffix optional.
   
-  Reported-by: Christian Weisgerber
-  Bug: https://curl.haxx.se/mail/lib-2020-08/0018.html
-  Closes #5834
-
-- TODO: Virtual external sockets
+  Ref: https://github.com/nghttp2/nghttp2/pull/1394
+  Ref: https://github.com/nghttp2/nghttp2/pull/1418
+  Ref: https://github.com/nghttp2/nghttp2/issues/1466
   
-  Closes #5835
-
-- [Don J Olmstead brought this change]
-
-  dist: add missing CMake Find modules to the distribution
+  Reported-by: Pierre Yager
   
-  Closes #5836
+  Fixes https://github.com/curl/curl/issues/7446
+  Closes https://github.com/curl/curl/pull/7447
 
-- RELEASE-NOTES: synced
-  
-  ... and version bumped to 7.72.1
+- [Josh Soref brought this change]
 
-- tls: provide the CApath verbose log on its own line
+  docs/cmdline: fix grammar and typos
   
-  ... not newline separated from the previous line. This makes it output
-  asterisk prefixed properly like other verbose putput!
-  
-  Reported-by: jmdavitt on github
-  Fixes #5826
-  Closes #5827
+  Closes https://github.com/curl/curl/pull/7432
+  Closes https://github.com/curl/curl/pull/7436
+  Closes https://github.com/curl/curl/pull/7438
+  Closes https://github.com/curl/curl/pull/7440
+  Closes https://github.com/curl/curl/pull/7445
 
-Version 7.72.0 (19 Aug 2020)
+- [Josh Soref brought this change]
 
-Daniel Stenberg (19 Aug 2020)
-- RELEASE-NOTES: synced
+  delegation.d: mention what happens when used multiple times
   
-  The curl 7.72.0 release
+  Closes https://github.com/curl/curl/pull/7408
 
-- THANKS: add names from curl 7.72.0 release
+- [Josh Soref brought this change]
 
-Jay Satiro (18 Aug 2020)
-- KNOWN_BUGS: Schannel TLS 1.2 handshake bug in old Windows versions
+  create-file-mode.d: mention what happens when used multiple times
   
-  Reported-by: plujon@users.noreply.github.com
-  
-  Closes https://github.com/curl/curl/issues/5488
+  Closes https://github.com/curl/curl/pull/7407
 
-Daniel Stenberg (17 Aug 2020)
-- Curl_easy: remember last connection by id, not by pointer
-  
-  CVE-2020-8231
-  
-  Bug: https://curl.haxx.se/docs/CVE-2020-8231.html
-  
-  Reported-by: Marc Aldorasi
-  Closes #5824
-
-- examples/rtsp.c: correct the copyright year
-
-- RELEASE-PROCEDURE.md: add more future release dates
-
-- [H3RSKO brought this change]
+- [Josh Soref brought this change]
 
-  docs: change "web site" to "website"
+  config.d: split comments and option-per line
   
-  According to wikipedia:
-  
-   While "web site" was the original spelling, this variant has become
-   rarely used, and "website" has become the standard spelling
-  
-  Closes #5822
+  Closes https://github.com/curl/curl/pull/7405
 
-- [Bevan Weiss brought this change]
+Daniel Stenberg (19 Jul 2021)
+- misc: copyright year range updates
 
-  CMake: don't complain about missing nroff
-  
-  The curl_nroff_check() was always being called, and complaining if
-  *NROFF wasn't found, even when not making the manual.
-  
-  Only check for nroff (and complain) if actually making the manual
-  
-  Closes #5817
+- mailmap: add Tobias and Timur
 
-- [Brian Inglis brought this change]
+Daniel Gustafsson (18 Jul 2021)
+- [Josh Soref brought this change]
 
-  libtest/Makefile.am: add -no-undefined for libstubgss for Cygwin
+  docs: spell out directories instead of dirs in create-dirs
   
-  copy the LDFLAGS approach for adding same option with `libhostname` in
-  `libtest/Makefile.am`:
+  Write out directories rather than using the dirs abbrevation. Also
+  use plural form consistently, even if the code in the end might just
+  create a single directory.
   
-  - init `libstubgss_la_LDFLAGS_EXTRA` variable,
-  - add option to variable inside conditional,
-  - use variable in `libstubgss_la_LDFLAGS`
-  
-  Fixes #5819
-  Closes #5820
+  Closes #7406
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
 
-- docs: clarify MAX_SEND/RECV_SPEED functionality
-  
-  ... in particular what happens if the maximum speed limit is set to a
-  value that's smaller than the transfer buffer size in use.
-  
-  Reported-by: Tomas Berger
-  Fixes #5788
-  Closes #5813
+- [Tobias Nyholm brought this change]
 
-- test1140: compare stdout
+  docs: correct spelling errors and a broken link
   
-  To make problems more immediately obvious when tests fail.
+  Update grammar and spelling in docs and source code comments.
   
-  Closes #5814
-
-- asyn-ares: correct some bad comments
-  
-  Closes #5812
-
-- [Emil Engler brought this change]
-
-  docs: Add video link to docs/CONTRIBUTE.md
-  
-  Closes #5811
-
-- curl-config: ignore REQUIRE_LIB_DEPS in --libs output
-  
-  Fixes a curl-config issue on cygwin by making sure REQUIRE_LIB_DEPS is
-  not considered for the --libs output.
-  
-  Reported-by: ramsay-jones on github
-  Assisted-by: Brian Inglis and Ken Brown
-  Fixes #5793
-  Closes #5808
-
-- copyright: update/correct the year range on a few files
-
-- scripts/copyright.pl: ignore .muse files
-
-- [Emil Engler brought this change]
-
-  multi: Remove 10-year old out-commented code
-  
-  The code hasn't been touched since 2010-08-18
-  
-  Closes #5805
-
-- KNOWN_BUGS: A shared connection cache is not thread-safe
-  
-  Closes #4915
-  Closes #5802
-
-- CONTRIBUTE: extend git commit message description
-  
-  In particular how the first line works.
-  
-  Closes #5803
-
-- RELEASE-NOTES: synced
-
-- [Stefan Yohansson brought this change]
-
-  transfer: move retrycount from connect struct to easy handle
-  
-  This flag was applied to the connection struct that is released on
-  retry.  These changes move the retry counter into Curl_easy struct that
-  lives across retries and retains the new connection.
-  
-  Reported-by: Cherish98 on github
-  Fixes #5794
-  Closes #5800
-
-- libssh2: s/ssherr/sftperr/
-  
-  The debug output used ssherr instead of sftperr which not only outputs
-  the wrong error code but also casues a warning on Windows.
-  
-  Follow-up to 7370b4e39f1
-  
-  Reported-by: Gisle Vanem
-  Bug: https://github.com/curl/curl/commit/7370b4e39f1390e701f5b68d910c619151daf72b#r41334700
-  Closes #5799
-
-- ftp: don't do ssl_shutdown instead of ssl_close
-  
-  The shutdown function is for downgrading a connection from TLS to plain,
-  and this is not requested here.
-  
-  Have ssl_close reset the TLS connection state.
-  
-  This partially reverts commit f002c850d98d
-  
-  Reported-by: Rasmus Melchior Jacobsen
-  Reported-by: Denis Goleshchikhin
-  Fixes #5797
-
-Marc Hoersken (9 Aug 2020)
-- CI/azure: fix test outcome values and use latest API version
-  
-  This makes sure that tests ignored or skipped are not shown
-  just in the category "Other", but with their correct state.
-  
-  Closes #5796
-
-- CI/azure: show runtime stats to investigate slowness
-  
-  Also avoid naming conflict of TFLAGS env and tflags variables.
-  
-  Closes #5776
-
-Daniel Stenberg (8 Aug 2020)
-- TLS naming: fix more Winssl and Darwinssl leftovers
-  
-  The CMake option is now called CMAKE_USE_SCHANNEL
-  
-  The winbuild flag is USE_SCHANNEL
-  
-  The CI jobs and build scripts only use the new names and the new name
-  options
-  
-  Tests now require 'Schannel' (when necessary)
-  
-  Closes #5795
-
-- smtp_parse_address: handle blank input string properly
-  
-  Closes #5792
-
-- runtests: run the DICT server on a random port number
-  
-  Removed support for -b (base port number)
-  
-  Closes #5783
-
-- RELEASE-NOTES: synced
-
-- runtests: move the TELNET server to a dynamic port
-  
-  Rename the port variable to TELNETPORT to better match the existing
-  pattern.
-  
-  Closes #5785
-
-- ngtcp2: adapt to error code rename
-  
-  Closes #5786
-
-- runtests: move the smbserver to use a dynamic port number
-  
-  Closes #5782
-
-- runtests: run the http2 tests on a random port number
-  
-  Closes #5779
-
-- gtls: survive not being able to get name/issuer
-  
-  Closes #5778
-
-- runtests: move the gnutls-serv tests to a dynamic port
-  
-  Affects test 320, 321, 322 and 324.
-  
-  Closes #5778
-
-- runtests: support dynamicly base64 encoded sections in tests
-  
-  This allows us to make test cases to use base64 at run-time and still
-  use and verify information determined at run-time, such as the IMAP test
-  server's port number in test 842.
-  
-  This change makes 12 tests run again that basically never ran since we
-  moved to dynamic port numbers.
-  
-  ftpserver.pl is adjusted to load test instructions and test number from
-  the preprocessed test file.
-  
-  FILEFORMAT.md now documents the new base64 encoding syntax.
-  
-  Reported-by: Marcel Raad
-  Fixes #5761
-  Closes #5775
-
-- curl.1: add a few missing valid exit codes
-  
-  93 - 96 can be returned as well.
-  
-  Closes #5777
-
-- TODO: Use multiple parallel transfers for a single download
-  
-  Closes #5774
-
-- TODO: Set the modification date on an uploaded file
-  
-  Closes #5768
-
-- [Thomas M. DuBuisson brought this change]
-
-  CI: Add muse CI config
-  
-  Closes #5772
-
-- [Thomas M. DuBuisson brought this change]
-
-  travis/script.sh: fix use of `-n' with unquoted envvar
-  
-  Shellcheck tells us "-n doesn't work with unquoted arguments. quote or
-  use [[ ]]."
-  
-  And testing shows:
-  
-  ```
-  docker run --rm -it ubuntu bash
-  root@fe85ce156856:/# [ -n $DOES_NOT_EXIST ] && echo "I ran"
-  I ran
-  root@fe85ce156856:/# [ -n "$DOES_NOT_EXIST" ] && echo "I ran"
-  root@fe85ce156856:/#
-  ```
-  
-  Closes #5773
-
-- h2: repair trailer handling
-  
-  The previous h2 trailer fix in 54a2b63 was wrong and caused a
-  regression: it cannot deal with trailers immediately when read since
-  they may be read off the connection by the wrong 'data' owner.
-  
-  This change reverts the logic back to gathering all trailers into a
-  single buffer, like before 54a2b63.
-  
-  Reported-by: Tadej Vengust
-  Fixes #5663
-  Closes #5769
-
-Viktor Szakats (3 Aug 2020)
-- windows: disable Unix Sockets for old mingw
-  
-  Classic mingw and 10y+ old versions of mingw-w64 don't ship with
-  Windows headers having the typedef necessary for Unix Sockets
-  support, so try detecting these environments to disable this
-  feature.
-  
-  Ref: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/cf6afc57179a5910621215f8f4037d406892072c/
-  
-  Reviewed-by: Daniel Stenberg
-  
-  Fixes #5674
-  Closes #5758
-
-Marcel Raad (3 Aug 2020)
-- test1908: treat file as text
-  
-  Fixes the line endings on Windows.
-  
-  Closes https://github.com/curl/curl/pull/5767
-
-- TrackMemory tests: ignore realloc and free in getenv.c
-  
-  These are only called for WIN32.
-  
-  Closes https://github.com/curl/curl/pull/5767
-
-Daniel Stenberg (3 Aug 2020)
-- tests/FILEFORMAT.md: mention %HTTP2PORT
-
-- RELEASE-NOTES: synced
-
-- tlsv1.3.d. only for TLS-using connections
-  
-  ... and rephrase that "not all" TLS backends support it.
-  
-  Closes #5764
-
-- tls-max.d: this option is only for TLS-using connections
-  
-  Ref: #5763
-  Closes #5764
-
-Marcel Raad (2 Aug 2020)
-- [Cameron Cawley brought this change]
-
-  tool_doswin: Simplify Windows version detection
-  
-  Closes https://github.com/curl/curl/pull/5754
-
-- [Cameron Cawley brought this change]
-
-  win32: Add Curl_verify_windows_version() to curlx
-  
-  Closes https://github.com/curl/curl/pull/5754
-
-- runtests.pl: treat LibreSSL and BoringSSL as OpenSSL
-  
-  This makes the tests that require the OpenSSL feature also run for
-  those two compatible libraries.
-  
-  Closes https://github.com/curl/curl/pull/5762
-
-Daniel Stenberg (1 Aug 2020)
-- multi: Condition 'extrawait' is always true
-  
-  Reported by Codacy.
-  
-  Reviewed-by: Marcel Raad
-  Closes #5759
-
-Marcel Raad (1 Aug 2020)
-- openssl: fix build with LibreSSL < 2.9.1
-  
-  `SSL_CTX_add0_chain_cert` and `SSL_CTX_clear_chain_certs` were
-  introduced in LibreSSL 2.9.1 [0].
-  
-  [0] https://github.com/libressl-portable/openbsd/commit/0db809ee178457c8170abfae3931d7bd13abf3ef
-  
-  Closes https://github.com/curl/curl/pull/5757
-
-Daniel Stenberg (1 Aug 2020)
-- [Marc Aldorasi brought this change]
-
-  multi_remove_handle: close unused connect-only connections
-  
-  Previously any connect-only connections in a multi handle would be kept
-  alive until the multi handle was closed.  Since these connections cannot
-  be re-used, they can be marked for closure when the associated easy
-  handle is removed from the multi handle.
-  
-  Closes #5749
-
-- checksrc: invoke script with -D to find .checksrc proper
-  
-  Without the -D command line option, checksrc.pl won't know which
-  directory to load the ".checksrc" file from when building out of the
-  source tree.
-  
-  Reported-by: Marcel Raad
-  Fixes #5715
-  Closes #5755
-
-- [Carlo Marcelo Arenas Belón brought this change]
-
-  buildconf: retire ares buildconf invocation
-  
-  no longer needed after 4259d2df7dd95637a4b1e3fb174fe5e5aef81069
-
-- [Carlo Marcelo Arenas Belón brought this change]
-
-  buildconf: excempt defunct reference to ACLOCAL_FLAGS
-  
-  retired with 09f278121e815028adb24d228d8092fc6cb022aa but kept around as
-  the name is generic enough that it might be in use and relied upon from
-  the environment.
-
-- [Carlo Marcelo Arenas Belón brought this change]
-
-  buildconf: avoid array concatenation in die()
-  
-  reported as error SC2145[1] by shellcheck, but not expected to cause
-  any behavioural differences otherwise.
-  
-  [1] https://github.com/koalaman/shellcheck/wiki/SC2145
-  
-  Closes #5701
-
-- travis: add ppc64le and s390x builds
-  
-  Closes #5752
-
-Marc Hoersken (31 Jul 2020)
-- connect: remove redundant message about connect failure
-  
-  Reviewed-by: Daniel Stenberg
-  
-  Closes #5708
-
-- tests/sshserver.pl: fix compatibility with OpenSSH for Windows
-  
-  Follow up to #5721
-
-- CI/azure: install libssh2 for use with msys2-based builds
-  
-  This enables building and running the SFTP tests.
-  Unfortunately OpenSSH for Windows does not support SCP (yet).
-  
-  Reviewed-by: Daniel Stenberg
-  
-  Closes #5721
-
-- CI/azure: increase Windows job timeout once again
-  
-  Avoid aborted jobs due to performance issues on Azure DevOps.
-  
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Jay Satiro
-  
-  Closes #5738
-
-Jay Satiro (30 Jul 2020)
-- TODO: Schannel: 'Add option to allow abrupt server closure'
-  
-  We should offer an option to allow abrupt server closures (server closes
-  SSL transfer without sending a known termination point such as length of
-  transfer or close_notify alert). Abrupt server closures are usually
-  because of misconfigured or very old servers.
-  
-  Closes https://github.com/curl/curl/issues/4427
-
-- url: fix CURLU and location following
-  
-  Prior to this change if the user set a URL handle (CURLOPT_CURLU) it was
-  incorrectly used for the location follow, resulting in infinite requests
-  to the original location.
-  
-  Reported-by: sspiri@users.noreply.github.com
-  
-  Fixes https://github.com/curl/curl/issues/5709
-  Closes https://github.com/curl/curl/pull/5713
-
-Daniel Stenberg (30 Jul 2020)
-- RELEASE-NOTES: synced
-
-- [divinity76 brought this change]
-
-  docs: add date of 7.20 to CURLM_CALL_MULTI_PERFORM mentions
-  
-  it helps make it obvious that most developers don't have to care about
-  the CURLM_CALL_MULTI_PERFORM value (last release using it is nearly 11
-  years old, November 4 2009)
-  
-  Closes #5744
-
-Jay Satiro (29 Jul 2020)
-- tool_cb_wrt: fix outfile mode flags for Windows
-  
-  - Use S_IREAD and S_IWRITE mode permission flags to create the file
-    on Windows instead of S_IRUSR, S_IWUSR, etc.
-  
-  Windows only accepts a combination of S_IREAD and S_IWRITE. It does not
-  acknowledge other combinations, for which it may generate an assertion.
-  
-  This is a follow-up to 81b4e99 from yesterday, which improved the
-  existing file check with -J.
-  
-  Ref: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen#remarks
-  Ref: https://github.com/curl/curl/pull/5731
-  
-  Closes https://github.com/curl/curl/pull/5742
-
-Daniel Stenberg (28 Jul 2020)
-- checksrc: ban gmtime/localtime
-  
-  They're not thread-safe so they should not be used in libcurl code.
-  
-  Explictly enabled when deemed necessary and in examples and tests
-  
-  Reviewed-by: Nicolas Sterchele
-  Closes #5732
-
-- transfer: fix data_pending for builds with both h2 and h3 enabled
-  
-  Closes #5734
-
-- curl_multi_setopt: fix compiler warning "result is always false"
-  
-  On systems with 32 bit long the expression is always false. Avoid
-  the warning.
-  
-  Reported-by: Gisle Vanem
-  Bug: https://github.com/curl/curl/commit/61a08508f6a458fe21bbb18cd2a9bac2f039452b#commitcomment-40941232
-  Closes #5736
-
-- curl: improve the existing file check with -J
-  
-  Previously a file that isn't user-readable but is user-writable would
-  not be properly avoided and would get overwritten.
-  
-  Reported-by: BrumBrum on hackerone
-  Assisted-by: Jay Satiro
-  Bug: https://hackerone.com/reports/926638
-  Closes #5731
-
-- [Jonathan Nieder brought this change]
-
-  multi: update comment to say easyp list is linear
-  
-  Since 09b9fc900 (multi: remove 'Curl_one_easy' struct, phase 1,
-  2013-08-02), the easy handle list is not circular but ends with
-  ->next pointing to NULL.
-  
-  Reported-by: Masaya Suzuki <masayasuzuki@google.com>
-  Closes #5737
-
-- CURLOPT_NOBODY.3: fix the syntax for referring to options
-  
-  As test 1140 fails otherwise!
-  
-  Follow-up to e1bac81cc815
-
-- ngtcp2: store address in sockaddr_storage
-  
-  Reported-by: Tatsuhiro Tsujikawa
-  Closes #5733
-
-- CURLOPT_NOBODY.3: clarify what setting to 0 means
-  
-  ... and mention that HTTP with other methods than HEAD might get a body and
-  there's no option available to stop that.
-  
-  Closes #5729
-
-- setopt: unset NOBODY switches to GET if still HEAD
-  
-  Unsetting CURLOPT_NOBODY with 0L when doing HTTP has no documented
-  action but before 7.71.0 that used to switch back to GET and with this
-  change (assuming the method is still set to HEAD) this behavior is
-  brought back.
-  
-  Reported-by: causal-agent on github
-  Fixes #5725
-  Closes #5728
-
-- [Ehren Bendler brought this change]
-
-  configure: cleanup wolfssl + pkg-config conflicts when cross compiling.
-  
-  Also choose a different wolfSSL function to test for NTLM support.
-  
-  Fixes #5605
-  Closes #5682
-
-- configure: show zstd "no" in summary when built without it
-  
-  Reported-by: Marc Hörsken
-  Fixes #5720
-  Closes #5730
-
-- quiche: handle calling disconnect twice
-  
-  Reported-by: lilongyan-huawei on github
-  Fixes #5726
-  Closes #5727
-
-- [Nicolas Sterchele brought this change]
-
-  getinfo: reset retry-after value in initinfo
-  
-  - Avoid re-using retry_after value from preceding request
-  - Add libtest 3010 to verify
-  
-  Reported-by: joey-l-us on github
-  Fixes #5661
-  Closes #5672
-
-Marcel Raad (27 Jul 2020)
-- WIN32: stop forcing narrow-character API
-  
-  Except where the results are only used for character output.
-  getenv is not touched because it's part of the public API, and having
-  it return UTF-8 instead of ANSI would be a breaking change.
-  
-  Fixes https://github.com/curl/curl/issues/5658
-  Fixes https://github.com/curl/curl/issues/5712
-  Closes https://github.com/curl/curl/pull/5718
-
-Jay Satiro (27 Jul 2020)
-- [Tobias Stoeckmann brought this change]
-
-  mprintf: Fix stack overflows
-  
-  Stack overflows can occur with precisions for integers and floats.
-  
-  Proof of concepts:
-  - curl_mprintf("%d, %.*1$d", 500, 1);
-  - curl_mprintf("%d, %+0500.*1$f", 500, 1);
-  
-  Ideally, compile with -fsanitize=address which makes this undefined
-  behavior a bit more defined for debug purposes.
-  
-  The format strings are valid. The overflows occur due to invalid
-  arguments. If these arguments are variables with contents controlled
-  by an attacker, the function's stack can be corrupted.
-  
-  Also see CVE-2016-9586 which partially fixed the float aspect.
-  
-  Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-  
-  Closes https://github.com/curl/curl/pull/5722
-
-- [Tobias Stoeckmann brought this change]
-
-  mprintf: Fix dollar string handling
-  
-  Verify that specified parameters are in range. If parameters are too
-  large, fail early on and avoid out of boundary accesses.
-  
-  Also do not read behind boundaries of illegal format strings.
-  
-  These are defensive measures since it is expected that format strings
-  are well-formed. Format strings should not be modifiable by user
-  input due to possible generic format string attacks.
-  
-  Closes https://github.com/curl/curl/pull/5722
-
-Daniel Stenberg (26 Jul 2020)
-- ntlm: free target_info before (re-)malloc
-  
-  OSS-Fuzz found a way this could get called again with the pointer still
-  pointing to a malloc'ed memory, leading to a leak.
-  
-  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24379
-  
-  Closes #5724
-
-Marcel Raad (26 Jul 2020)
-- CI/macos: set minimum macOS version
-  
-  This enables some deprecation warnings.
-  Previously, autotools defaulted to 10.8.
-  
-  Closes https://github.com/curl/curl/pull/5723
-
-Daniel Stenberg (26 Jul 2020)
-- RELEASE-NOTES: synced
-
-Marcel Raad (25 Jul 2020)
-- CI/macos: enable warnings as errors for CMake builds
-  
-  Closes https://github.com/curl/curl/pull/5716
-
-- CMake: fix test for warning suppressions
-  
-  GCC doesn't warn for unknown `-Wno-` options, except if there are other
-  warnings or errors [0]. This was problematic with `CURL_WERROR` as that
-  warning-as-error cannot be suppressed. Notably, this always happened
-  with `-Wno-pedantic-ms-format` when not targeting Windows. So test for
-  the positive form of the warning instead, which should always result in
-  a diagnostic if unknown.
-  
-  [0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
-  
-  Closes https://github.com/curl/curl/pull/5714
-
-Jay Satiro (23 Jul 2020)
-- curl.h: update CURLINFO_LASTONE
-  
-  CURLINFO_LASTONE should have been updated when
-  CURLINFO_EFFECTIVE_METHOD was added.
-  
-  Reported-by: xwxbug@users.noreply.github.com
-  
-  Fixes https://github.com/curl/curl/issues/5711
-
-Marc Hoersken (22 Jul 2020)
-- CI/azure: unconditionally enable warnings-as-errors with autotools
-  
-  Reviewed-by: Marcel Raad
-  
-  Follow up to #5694
-  Closes #5706
-
-Marcel Raad (21 Jul 2020)
-- doh: remove redundant cast
-  
-  Closes https://github.com/curl/curl/pull/5704
-
-- CI/macos: unconditionally enable warnings-as-errors with autotools
-  
-  Previously, warnings were only visible in the output for most jobs.
-  
-  Closes https://github.com/curl/curl/pull/5694
-
-- util: silence conversion warnings
-  
-  timeval::tv_usec might be a 32-bit integer and timespec::tv_nsec might
-  be a 64-bit integer. This is the case when building for recent macOS
-  versions, for example. Just treat tv_usec as an int, which should
-  hopefully always be sufficient on systems with
-  `HAVE_CLOCK_GETTIME_MONOTONIC`.
-  
-  Closes https://github.com/curl/curl/pull/5695
-
-- md(4|5): don't use deprecated macOS functions
-  
-  They are marked as deprecated for -mmacosx-version-min >= 10.15,
-  which might result in warnings-as-errors.
-  
-  Closes https://github.com/curl/curl/pull/5695
-
-Daniel Stenberg (18 Jul 2020)
-- strdup: remove the odd strlen check
-  
-  It confuses code analyzers with its use of -1 for unsigned value. Also,
-  a check that's not normally used in strdup() code - and not necessary.
-  
-  Closes #5697
-
-- [Alessandro Ghedini brought this change]
-
-  travis: update quiche builds for new boringssl layout
-  
-  This is required after https://github.com/cloudflare/quiche/pull/593
-  moved BoringSSL around slightly.
-  
-  This also means that Go is not needed to build BoringSSL anymore (the
-  one provided by quiche anyway).
-  
-  Closes #5691
-
-Marcel Raad (17 Jul 2020)
-- configure: allow disabling warnings
-  
-  When using `--enable-warnings`, it was not possible to disable warnings
-  via CFLAGS that got explicitly enabled. Now warnings are not enabled
-  anymore if they are explicitly disabled (or enabled) in CFLAGS. This
-  works for at least GCC, clang, and TCC as they have corresponding
-  `-Wno-` options for every warning.
-  
-  Closes https://github.com/curl/curl/pull/5689
-
-Daniel Stenberg (16 Jul 2020)
-- ngtcp2: adjust to recent sockaddr updates
-  
-  Closes #5690
-
-- page-header: provide protocol details in the curl.1 man page
-  
-  Add protocol and version specific information about all protocols curl
-  supports.
-  
-  Fixes #5679
-  Reported-by: tbugfinder on github
-  Closes #5686
-
-Daniel Gustafsson (16 Jul 2020)
-- docs: Update a few leftover mentions of DarwinSSL
-  
-  Commit 76a9c3c4be10b3d4d379d5b23ca76806bbae536a renamed DarwinSSL to the
-  more correct/common name Secure Transport, but a few mentions in the docs
-  remained.
-  
-  Closes #5688
+  Closes: #7427
   Reviewed-by: Daniel Stenberg <daniel@haxx.se>
 
-Daniel Stenberg (16 Jul 2020)
-- file2memory: use a define instead of -1 unsigned value
+Marc Hoersken (18 Jul 2021)
+- CI/cirrus: install impacket from PyPI instead of FreeBSD packages
   
-  ... to use the maximum value for 'size_t' when detecting integer overflow.
-  Changed the limit to max/4 as already that seems unreasonably large.
+  Availability of impacket as FreeBSD package is too flaky.
   
-  Codacy didn't like the previous approach.
-  
-  Closes #5683
-
-- CURL_PUSH_ERROROUT: allow the push callback to fail the parent stream
-  
-  ... by adding support for a new dedicated return code.
-  
-  Suggested-by: Jonathan Cardoso
-  Assisted-by: Erik Johansson
-  URL: https://curl.haxx.se/mail/lib-2020-06/0099.html
-  Closes #5636
-
-- [Baruch Siach brought this change]
-
-  nss: fix build with disabled proxy support
-  
-  Avoid reference to fields that do not exist when CURL_DISABLE_PROXY is
-  defined.
-  
-  Closes #5667
-
-- test1139: make it display the difference on test failures
-
-- test1119: verify stdout in the test
-  
-  So that failures will be displayed in the terminal, as it makes test failures
-  visually displayed easier and faster.
-  
-  Closes #5644
-
-- curl: add %{method} to the -w variables
-  
-  Gets the CURLINFO_EFFECTIVE_METHOD from libcurl.
-  
-  Added test 1197 to verify.
-
-- CURLINFO_EFFECTIVE_METHOD: added
-  
-  Provide the HTTP method that was used on the latest request, which might
-  be relevant for users when there was one or more redirects involved.
-  
-  Closes #5511
-
-Viktor Szakats (14 Jul 2020)
-- windows: add unicode to feature list
-  
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Marc Hörsken
-  
-  Closes #5491
-
-Daniel Stenberg (14 Jul 2020)
-- multi: remove two checks always true
-  
-  Detected by Codacy
-  Closes #5676
-
-Marc Hoersken (13 Jul 2020)
-- workflows: limit what branches to run CodeQL on
-  
-  Align CodeQL action with existing CI actions:
-  - Update branch filter to avoid duplicate CI runs.
-  - Shorten workflow name due to informative job name.
+  Stick to legacy version of cryptography which still
+  supports OpenSSL version 1.0.2 due to FreeBSD 11.
   
   Reviewed-by: Daniel Stenberg
   
-  Closes #5660
+  Closes #7418
 
-- appveyor: collect libcurl.dll variants with prefix or suffix
-  
-  On some platforms libcurl is build with a platform-specific
-  prefix and/or a version number suffix.
-  
-  Assisted-by: Jay Satiro
-  
-  Closes #5659
+Daniel Stenberg (18 Jul 2021)
+- [Josh Soref brought this change]
 
-Daniel Stenberg (12 Jul 2020)
-- [ihsinme brought this change]
+  docs/cmdline: mention what happens when used multiple times
+  
+  For --dns-ipv4-addr, --dns-ipv6-addr and --dns-servers
+  
+  Closes #7410
+  Closes #7411
+  Closes #7412
 
-  socks: use size_t for size variable
-  
-  Use the unsigned type (size_t) in the arithmetic of pointers. In this
-  context, the signed type (ssize_t) is used unnecessarily.
-  
-  Authored-by: ihsinme on github
-  Closes #5654
+- [MAntoniak brought this change]
 
-- RELEASE-NOTES: synced
+  lib: fix compiler warnings with CURL_DISABLE_NETRC
   
-  ... and bumped to 7.72.0 as the next release version number
+  warning C4189: 'netrc_user_changed': local variable is initialized but
+  not referenced
+  
+  warning C4189: 'netrc_passwd_changed': local variable is initialized but
+  not referenced
+  
+  Closes #7423
 
-- [Gilles Vollant brought this change]
+- disable-epsv.d: remove duplicate "(FTP)"
+  
+  ... since the tooling adds that to the output based on the "Protocols:"
+  tag.
 
-  content_encoding: add zstd decoding support
-  
-  include zstd curl patch for Makefile.m32 from vszakats
-  and include Add CMake support for zstd from Peter Wu
-  
-  Helped-by: Viktor Szakats
-  Helped-by: Peter Wu
-  Closes #5453
+- [Max Zettlmeißl brought this change]
 
-- asyn.h: remove the Curl_resolver_getsock define
+  docs: make the documentation for --etag-save match the program behaviour
   
-   - not used
-   - used the wrong number of arguments
-   - confused the Codeacy code analyzer
+  When using curl with the option `--etag-save` I expected it to save the
+  ETag without its surrounding quotes, as stated by the documentation in
+  the repository and by the generated man pages.
   
-  Closes #5647
+  My first endeavour was to fix the program, but while investigating the
+  history of the relevant parts, I discovered that curl once saved the
+  ETag without the quotes.  This was undone by Daniel Stenberg in commit
+  `98c94596f5928840177b6bd3c7b0f0dd03a431af`, therefore I decided that in
+  this case the documentation should be adjusted to match the behaviour of
+  curl.
+  
+  The changed save behaviour also made parts of the `--etag-compare`
+  documentation wrong or superfluous, so I adjusted those accordingly.
+  
+  Closes #7429
 
-- [Nicolas Sterchele brought this change]
+- [Josh Soref brought this change]
 
-  configure.ac: Sort features name in summary
+  write-out.d: add missing periods
   
-  - Same as protocols
-  
-  Closes #5656
+  Closes #7404
 
-- [Matthias Naegler brought this change]
+- [Josie Huddleston brought this change]
 
-  cmake: fix windows xp build
+  easy: during upkeep, attach Curl_easy to connections in the cache
   
-  Reviewed-by: Marcel Raad
-  Closes #5662
+  During the protocol-specific parts of connection upkeep, some code
+  assumes that the data->conn pointer already is set correctly.  However,
+  there's currently no guarantee of that in the code.
+  
+  This fix temporarily attaches each connection to the Curl_easy object
+  before performing the protocol-specific connection check on it, in a
+  similar manner to the connection checking in extract_if_dead().
+  
+  Fixes #7386
+  Closes #7387
+  Reported-by: Josie Huddleston
 
-- ngtcp2: update to modified qlog callback prototype
-  
-  Closes #5675
+- [Josh Soref brought this change]
 
-- transfer: fix memory-leak with CURLOPT_CURLU in a duped handle
+  cleanup: spell DoH with a lowercase o
   
-  Added test case 674 to reproduce and verify the bug report.
+  Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
   
-  Fixes #5665
-  Reported-by: NobodyXu on github
-  Closes #5673
+  Closes #7413
 
-- [Baruch Siach brought this change]
+- [Josh Soref brought this change]
 
-  bearssl: fix build with disabled proxy support
+  TheArtOfHttpScripting: polish
   
-  Avoid reference to fields that do not exist when CURL_DISABLE_PROXY is
-  defined.
+  - add missing backticks and comma
   
-  Reviewed-by: Nicolas Sterchele
-  Closes #5666
+  - fix proxy description:
+  
+  * example proxy isn't local
+  * locally doesn't really make sense
+  
+  Closes #7416
+
+- [Josh Soref brought this change]
+
+  form.d: add examples of `,`/`;` for file[name]
+  
+  Fixes #7415
+  Closes #7417
+
+- [MAntoniak brought this change]
+
+  mbedtls: Remove unnecessary include
+  
+  - curl_setup.h: all references to mbedtls_md4* functions and structures
+    are in the md4.c. This file already includes the <mbedtls/md4.h> file
+    along with the file existence control (defined (MBEDTLS_MD4_C))
+  
+  - curl_ntlm_core.c: unnecessary include - repeated below
+  
+  Closes #7419
 
 - RELEASE-NOTES: synced
 
-Jay Satiro (11 Jul 2020)
-- [Carlo Marcelo Arenas Belón brought this change]
+Jay Satiro (16 Jul 2021)
+- [User Sg brought this change]
 
-  cirrus-ci: upgrade 11-STABLE to 11.4
+  multi: fix crash in curl_multi_wait / curl_multi_poll
   
-  Meant to be the last of the 11 series and so make sure that all
-  other references reflect all 11 versions so they can be retired
-  together later.
+  Appears to have been caused by 51c0ebc (precedes 7.77.0) which added a
+  VALID_SOCK check to one of the loops through the sockets but not the
+  other.
   
-  Closes https://github.com/curl/curl/pull/5668
+  Reported-by: sylgal@users.noreply.github.com
+  Authored-by: sylgal@users.noreply.github.com
+  
+  Fixes https://github.com/curl/curl/issues/7379
+  Closes https://github.com/curl/curl/pull/7389
 
-- [Filip Salomonsson brought this change]
+- [Daniel Gustafsson brought this change]
 
-  CURLINFO_CERTINFO.3: fix typo
+  tool_help: remove unused define
   
-  Closes https://github.com/curl/curl/pull/5655
+  The PRINT_LINES_PAUSE macro is no longer used, and has been mostly
+  cleaned out but one occurrence remained.
+  
+  Closes https://github.com/curl/curl/pull/7380
 
-Daniel Stenberg (4 Jul 2020)
-- http2: only do the *done() cleanups for HTTP
-  
-  Follow-up to ef86daf4d3
-  
-  Closes #5650
-  Fixes #5646
+- [Sergey Markelov brought this change]
 
-- [Alex Kiernan brought this change]
+  build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS
+  
+  fix compiler warnings about unused variables and parameters when
+  built with --disable-verbose.
+  
+  Closes https://github.com/curl/curl/pull/7377
 
-  gnutls: repair the build with `CURL_DISABLE_PROXY`
-  
-  `http_proxy`/`proxy_ssl`/`tunnel_proxy` will not be available in `conn`
-  if `CURL_DISABLE_PROXY` is enabled.  Repair the build with that
-  configuration.
-  
-  Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
-  Closes #5645
+- [Andrea Pappacoda brought this change]
 
-Alex Kiernan (3 Jul 2020)
-- gnutls: Fetch backend when using proxy
+  build: fix IoctlSocket FIONBIO check
   
-  Fixes: 89865c149 ("gnutls: remove the BACKEND define kludge")
-  Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+  Prior to this change HAVE_IOCTLSOCKET_CAMEL_FIONBIO mistakenly checked
+  for (lowercase) ioctlsocket when it should have checked for IoctlSocket.
+  
+  Closes https://github.com/curl/curl/pull/7375
 
-Daniel Stenberg (3 Jul 2020)
-- [Laramie Leavitt brought this change]
+- [Timur Artikov brought this change]
 
-  http2: close the http2 connection when no more requests may be sent
+  configure: fix nghttp2 library name for static builds
   
-  Well-behaving HTTP2 servers send two GOAWAY messages. The first
-  message is a warning that indicates that the server is going to
-  stop accepting streams. The second one actually closes the stream.
+  Don't hardcode the nghttp2 library name,
+  because it can vary, be "nghttp2_static" for example.
   
-  nghttp2 reports this state (and the other state of no more stream
-  identifiers) via the call nghttp2_session_check_request_allowed().
-  In this state the client should not create more streams on the
-  session (tcp connection), and in curl this means that the server
-  has requested that the connection is closed.
-  
-  It would be also be possible to put the connclose() call into the
-  on_http2_frame_recv() function that triggers on the GOAWAY message.
-  
-  This fixes a bug seen when the client sees the following sequence of
-  frames:
-  
-  // advisory GOAWAY
-  HTTP2 GOAWAY [stream-id = 0, promised-stream-id = -1]
-  ... some additional frames
-  
-  // final GOAWAY
-  HTTP2 GOAWAY [stream-id = 0, promised-stream-id = N ]
-  
-  Before this change, curl will attempt to reuse the connection even
-  after the last stream, will encounter this error:
-  
-  * Found bundle for host localhost: 0x5595f0a694e0 [can multiplex]
-  * Re-using existing connection! (#0) with host localhost
-  * Connected to localhost (::1) port 10443 (#0)
-  * Using Stream ID: 9 (easy handle 0x5595f0a72e30)
-  > GET /index.html?5 HTTP/2
-  > Host: localhost:10443
-  > user-agent: curl/7.68.0
-  > accept: */*
-  >
-  * stopped the pause stream!
-  * Connection #0 to host localhost left intact
-  curl: (16) Error in the HTTP2 framing layer
-  
-  This error may posion the connection cache, causing future requests
-  which resolve to the same curl connection to go through the same error
-  path.
-  
-  Closes #5643
+  Fixes https://github.com/curl/curl/issues/7367
+  Closes https://github.com/curl/curl/pull/7368
 
-- ftpserver: don't verify SMTP MAIL FROM names
-  
-  Rely on tests asking the names to get refused instead - test servers
-  should be as dumb as possible. Edited test 914, 955 and 959 accordingly.
-  
-  Closes #5639
+Gisle Vanem (16 Jul 2021)
+- [PellesC] fix _lseeki64() macro
 
-- curl_version_info.3: CURL_VERSION_KERBEROS4 is deprecated
+- [SChannel] Use '_tcsncmp()' instead
   
-  This came up in #5640. It make sense to clarify this in the docs!
+  Revert previous change for PellesC.
   
-  Reminded-by: Kamil Dudka
-  Closes #5642
+  Instead replace all use of `_tcsnccmp()` with `_tcsncmp()`.
 
-Kamil Dudka (3 Jul 2020)
-- tool_getparam: make --krb option work again
+- [PellesC] missing '_tcsnccmp'
   
-  It was disabled by mistake in commit curl-7_37_1-23-ge38ba4301.
-  
-  Bug: https://bugzilla.redhat.com/1833193
-  Closes #5640
+  PellesC compiler does not have this macro in it's `<tchar.h>`
 
-Daniel Stenberg (2 Jul 2020)
-- [Jeremy Maitin-Shepard brought this change]
+Daniel Gustafsson (14 Jul 2021)
+- TODO: add mention of mbedTLS 3 incompatibilities
+  
+  Wyatt OʼDay reported in #7385 that mbedTLS isn't backwards compatible
+  and curl no longer builds with it. Document the need to fix our support
+  until so has been done.
+  
+  Closes #7390
+  Fixes #7385
+  Reported-by: Wyatt OʼDay
+  Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
 
-  http2: fix nghttp2_strerror -> nghttp2_http2_strerror in debug messages
+- docs: fix inconsistencies in EGDSOCKET documentation
   
-  Confusingly, nghttp2 has two different error code enums:
+  Only the OpenSSL backend actually use the EGDSOCKET, and also use
+  TLS consistently rather than mixing SSL and TLS. While there, also
+  fix a minor spelling nit.
   
-  - nghttp2_error, to be used with nghttp2_strerror
-  - nghttp2_error_code, to be used with nghttp2_http2_strerror
-  
-  Closes #5641
+  Closes: #7391
+  Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
 
-Marcel Raad (2 Jul 2020)
-- url: silence MSVC warning
-  
-  Since commit f3d501dc678, if proxy support is disabled, MSVC warns:
-  url.c : warning C4701: potentially uninitialized local variable
-  'hostaddr' used
-  url.c : error C4703: potentially uninitialized local pointer variable
-  'hostaddr' used
-  
-  That could actually only happen if both `conn->bits.proxy` and
-  `CURL_DISABLE_PROXY` were enabled.
-  Initialize it to NULL to silence the warning.
-  
-  Closes https://github.com/curl/curl/pull/5638
+- [Борис Верховский brought this change]
 
-Daniel Stenberg (1 Jul 2020)
-- RELEASE-NOTES: synced
-
-Version 7.71.1 (30 Jun 2020)
-
-Daniel Stenberg (30 Jun 2020)
-- RELEASE-NOTES: curl 7.71.1
-
-- THANKS: add contributors to 7.71.1
-
-- scripts/copyright.pl: skip .dcignore
-
-- Revert "multi: implement wait using winsock events"
+  docs: document missing arguments to commands
   
-  This reverts commit 8bc25c590e530de87595d1bb3577f699eb1309b9.
+  This is a followup to commit f410b9e538129e77607fef1 fixing a few
+  more commands which takes arguments.
   
-  That commit (from #5397) introduced a regression in 7.71.0.
-  
-  Reported-by: tmkk on github
-  Fixes #5631
-  Closes #5632
+  Closes #7382
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
 
-- TODO: Add flag to specify download directory
+- [Randolf J brought this change]
 
-- TODO: return code to CURLMOPT_PUSHFUNCTION to fail connection
+  docs: fix incorrect argument name reference
+  
+  The documentation for the read callback was erroneously referencing
+  the nitems argument by nmemb.  The error was introduced in commit
+  ce0881edee3c7.
+  
+  Closes #7383
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
 
-- cirrus-ci: disable FreeBSD 13 (again)
-  
-  It has been failing for a good while again. This time we better leave it
-  disabled until we have more reason to believe it behaves.
-  
-  Closes #5628
+- [Борис Верховский brought this change]
 
-- ngtcp2: sync with current master
+  tool_help: Document that --tlspassword takes a password
   
-  ngtcp2 added two new callbacks
-  
-  Reported-by: Lucien Zürcher
-  Fixes #5624
-  Closes #5627
+  Closes #7378
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
 
-- examples/multithread.c: call curl_global_cleanup()
+- scripts: Fix typo in release-notes instructions
   
-  Reported-by: qiandu2006 on github
-  Fixes #5622
-  Closes #5623
-
-- vtls: compare cert blob when finding a connection to reuse
-  
-  Reported-by: Gergely Nagy
-  Fixes #5617
-  Closes #5619
+  The command to run had a typo in the pathname which prevented copy
+  pasting it to work, which has annoyed me enough to fix this now.
 
 - RELEASE-NOTES: synced
 
-- terminology: call them null-terminated strings
+Jay Satiro (10 Jul 2021)
+- write-out.d: Clarify urlnum is not unique for de-globbed URLs
   
-  Updated terminology in docs, comments and phrases to refer to C strings
-  as "null-terminated". Done to unify with how most other C oriented docs
-  refer of them and what users in general seem to prefer (based on a
-  single highly unscientific poll on twitter).
+  Reported-by: Коваленко Анатолий Викторович
   
-  Reported-by: coinhubs on github
-  Fixes #5598
-  Closes #5608
+  Fixes https://github.com/curl/curl/issues/7342
+  Closes https://github.com/curl/curl/pull/7369
 
-- http: fix proxy auth with blank password
-  
-  Regression in 7.71.0
-  
-  Added test case 346 to verify.
-  
-  Reported-by: Kristoffer Gleditsch
-  Fixes #5613
-  Closes #5616
+Daniel Gustafsson (3 Jul 2021)
+- [William Desportes brought this change]
 
-- .dcignore: ignore tests and docs directories
+  docs: Fix typos
   
-  This is a config file for deepcode.ai, a static code analyzer.
+  Closes: #7370
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
 
-Jay Satiro (26 Jun 2020)
-- tool_cb_hdr: Fix etag warning output and return code
-  
-  - Return 'failure' on failure, to follow the existing style.
-  
-  - Put Warning: and the warning message on the same line.
-  
-  Ref: https://github.com/curl/curl/issues/5610
-  
-  Closes https://github.com/curl/curl/pull/5612
+Daniel Stenberg (8 Jul 2021)
+- [Jonathan Wernberg brought this change]
 
-Daniel Stenberg (26 Jun 2020)
-- CURLOPT_READFUNCTION.3: provide the upload data size up front
+  Revert "ftp: Expression 'ftpc->wait_data_conn' is always false"
   
-  Assisted-by: Jay Satiro
-  Closes #5607
+  The reverted commit introduced a logic error in code that was
+  correct.
+  
+  The client using libcurl would notice the error since FTP file
+  uploads in active transfer mode would somtimes complete with
+  success despite no transfer having been performed and the
+  "uploaded" file thus not being on the remote server afterwards.
+  
+  The FTP server would notice the error because it receives a
+  RST on the data connection it has established with the client
+  before any data was transferred at all.
+  
+  The logic error happens if the STOR response from the server have
+  arrived by the time ftp_multi_statemach() in the affected code path
+  is called, but the incoming data connection have not arrived yet.
+  In that case, the processing of the STOR response will cause
+  'ftpc->wait_data_conn' to be set to TRUE, contradicting the comment
+  in the code. Since 'complete' will also be set, later logic would
+  believe the transfer was done.
+  
+  In most cases, the STOR response will not have arrived yet when
+  the affected code path is executed, or the incoming connection will
+  also have arrived, and thus the error would not express itself.
+  But if the speed difference of the device using libcurl and the
+  FTP server is exactly right, the error may happen as often as in
+  one out of hundred file transfers.
+  
+  This reverts commit 49f3117a238b6eac0e22a32f50699a9eddcb66ab.
+  
+  Bug: https://curl.se/mail/lib-2021-07/0025.html
+  Closes #7362
 
-- test1539: do a HTTP 1.0 POST without a set size (fails)
+- msnprintf: return number of printed characters excluding null byte
   
-  Attempt to reproduce #5593. Test case 1514 is very similar but uses
-  HTTP/1.1 and thus switches to chunked.
+  ... even when the output is "capped" by the maximum length argument.
   
-  Closes #5595
+  Clarified in the docs.
+  
+  Closes #7361
 
-- [Baruch Siach brought this change]
+- infof: remove newline from format strings, always append it
+  
+  - the data needs to be "line-based" anyway since it's also passed to the
+    debug callback/application
+  
+  - it makes infof() work like failf() and consistency is good
+  
+  - there's an assert that triggers on newlines in the format string
+  
+  - Also removes a few instances of "..."
+  
+  - Removes the code that would append "..." to the end of the data *iff*
+    it was truncated in infof()
+  
+  Closes #7357
 
-  mbedtls: fix build with disabled proxy support
+- examples/multi-single: fix scan-build warning
   
-  Don't reference fields that do not exist. Fixes build failure:
+  warning: Value stored to 'mc' during its initialization is never read
   
-  vtls/mbedtls.c: In function 'mbed_connect_step1':
-  vtls/mbedtls.c:249:54: error: 'struct connectdata' has no member named 'http_proxy'
+  Follow-up to ae8e11ed5fd2ce
   
-  Closes #5615
+  Closes #7360
 
-- codeql-analysis.yml: fix the 'languages' setting
+- wolfssl: failing to set a session id is not reason to error out
   
-  It needs a 'with:' in front of it.
+  ... as it is *probably* just timed out.
+  
+  Reported-by: Francisco Munoz
+  
+  Closes #7358
 
-GitHub (26 Jun 2020)
-- [Daniel Stenberg brought this change]
+- docs/examples: use curl_multi_poll() in multi examples
+  
+  The API is soon two years old and deserves being shown as the primary
+  way to drive multi code as it makes it much easier to write code.
+  
+  multi-poll: removed
+  
+  multi-legacy: add to show how we did multi API use before
+  curl_multi_wait/poll.
+  
+  Closes #7352
 
-  gtihub: codeql-analysis.yml
+- KNOWN_BUGS: flaky Windows CI builds
   
-  enables code security scanning with github actions
-
-Daniel Stenberg (25 Jun 2020)
-- tests: verify newline in username and password for HTTP
-  
-  test 1296 is a simply command line test
-  
-  test 1910 is a libcurl test including a redirect
-
-- url: allow user + password to contain "control codes" for HTTP(S)
-  
-  Reported-by: Jon Johnson Jr
-  Fixes #5582
-  Closes #5592
-
-- escape: make the URL decode able to reject only %00 bytes
-  
-  ... or all "control codes" or nothing.
-  
-  Assisted-by: Nicolas Sterchele
-
-- http2: set the correct URL in pushed transfers
-  
-  ...previously CURLINFO_EFFECTIVE_URL would report the URL of the
-  original "mother transfer", not the actually pushed resource.
-  
-  Reported-by: Jonathan Cardoso Machado
-  Fixes #5589
-  Closes #5591
-
-Jay Satiro (25 Jun 2020)
-- [Javier Blazquez brought this change]
-
-  openssl: Fix compilation on Windows when ngtcp2 is enabled
-  
-  - Include wincrypt before OpenSSL includes so that the latter can
-    properly handle any conflicts between the two.
-  
-  Closes https://github.com/curl/curl/pull/5606
-
-Daniel Stenberg (25 Jun 2020)
-- test543: extended to verify zero length input
-  
-  As was reported in #5601
-
-- escape: zero length input should return a zero length output
-  
-  Regression added in 7.71.0.
-  
-  Fixes #5601
-  Reported-by: Kristoffer Gleditsch
-  Closes #5602
-
-- Curl_inet_ntop: always check the return code
-  
-  Reported-by: Siva Sivaraman
-  Fixes #5412
-  Closes #5597
-
-- sendf: improve the message on client write errors
-  
-  Replace "Failed writing body (X != Y)" with
-  "Failure writing output to destination". Possibly slightly less cryptic.
-  
-  Reported-by: coinhubs on github
-  Fixes #5594
-  Closes #5596
+  Closes #6972
 
 - RELEASE-NOTES: synced
 
-- curlver: start working on 7.71.1
-
-- [Denis Baručić brought this change]
-
-  DYNBUF.md: fix a typo: trail => tail
+- test1147: hyper doesn't allow "crazy" request headers like built-in
   
-  Closes #5599
-
-Version 7.71.0 (23 Jun 2020)
-
-Daniel Stenberg (23 Jun 2020)
-- RELEASE-NOTES: curl 7.71.0 release
-
-- THANKS: curl 7.71.0 additions
-
-- url: make sure pushed streams get an allocated download buffer
+  ... so strip that from the test.
   
-  Follow-up to c4e6968127e876b0
-  
-  When a new transfer is created, as a resuly of an acknowledged push,
-  that transfer needs a download buffer allocated.
-  
-  Closes #5590
+  Closes #7349
 
-Jay Satiro (22 Jun 2020)
-- openssl: Don't ignore CA paths when using Windows CA store
+- c-hyper: bail on too long response headers
   
-  This commit changes the behavior of CURLSSLOPT_NATIVE_CA so that it does
-  not override CURLOPT_CAINFO / CURLOPT_CAPATH, or the hardcoded default
-  locations. Instead the CA store can now be used at the same time.
+  To match with built-in behaviors. Makes test 1154 work.
   
-  The change is due to the impending release. The issue is still being
-  discussed. The behavior of CURLSSLOPT_NATIVE_CA is subject to change and
-  is now documented as experimental.
-  
-  Ref: bc052cc (parent commit)
-  Ref: https://github.com/curl/curl/issues/5585
+  Closes #7350
 
-- tool_operate: Don't use Windows CA store as a fallback
+- test1151: added missing CRLF to work with hyper
+  
+  Closes #7350
+
+- c-hyper: add support for transfer-encoding in the request
+  
+  Closes #7348
+
+- [Andrea Pappacoda brought this change]
+
+  cmake: remove libssh2 feature checks
+  
+  libssh2 features are detected based on version since commit
+  9dbbba997608f7c3c5de1c627c77c8cd2aa85b73
+  
+  Closes #7343
+
+- test1116: hyper doesn't pass through "surprise-trailers"
+  
+  Closes #7344
+
+- socks4: scan for the IPv4 address in resolve results
+  
+  Follow-up to 84d2839740 which changed the resolving to always resolve
+  both address families, but since SOCKS4 only supports IPv4 it should
+  scan for and use the first available IPv4 address.
+  
+  Reported-by: shithappens2016 on github
+  Fixes #7345
+  Closes #7346
+
+Jay Satiro (5 Jul 2021)
+- proto.d: fix formatting for paragraphs after margin changes
+  
+  Closes https://github.com/curl/curl/pull/7341
+
+- pinnedpubkey.d: fix formatting for version support lists
+  
+  Closes https://github.com/curl/curl/pull/7340
+
+Daniel Stenberg (2 Jul 2021)
+- TODO: "Support in-memory certs/ca certs/keys" done
+  
+  Has been suppored for a while now with the *BLOB options.
+
+- examples: safer and more proper read callback logic
+  
+  The same callback code is used in:
+  
+   imap-append.c
+   smtp-authzid.c
+   smtp-mail.c
+   smtp-multi.c
+   smtp-ssl.c
+   smtp-tls.c
+  
+  It should not assume that it can copy full lines into the buffer as it
+  will encourage sloppy coding practices. Instead use byte-wise logic and
+  check/acknowledge the buffer size appropriately.
+  
+  Reported-by: Harry Sintonen
+  Fixes #7330
+  Closes #7331
+
+- test1519: adjusted to work with hyper
+  
+  Closes #7333
+
+- test1518: adjusted to work with hyper
+  
+  ... by making sure the stdout output doesn't look like HTTP headers.
+  
+  Closes #7333
+
+- test1514: add a CRLF to the response to make it correct
+  
+  Makes hyper accept it fine instead returning HYPERE_UNEXPECTED_EOF on
+  us.
+  
+  Closes #7334
+
+- formdata: avoid "Argument cannot be negative" warning
+  
+  ... when converting a curl_off_t to size_t, by using
+  CURL_ZERO_TERMINATED before passing the argument to the function.
+  
+  Detected by Coverity CID 1486590.
+  
+  Closes #7328
+  Assisted-by: Daniel Gustafsson
+
+- lib: more %u for port and int for %*s fixes
+  
+  Detected by Coverity
+  
+  Closes #7329
+
+- doh: (void)-prefix call to curl_easy_setopt
+
+- lib: fix type of len passed to *printf's %*s
+  
+  ... it needs to be 'int'. Detected by Coverity CID 1486611 (etc)
+  
+  Closes #7326
+
+- lib: use %u instead of %ld for port number printf
+  
+  Follow-up to 764c6bd3bf which changed the type of some port number
+  fields. Detected by Coverity (CID 1486624) etc.
+  
+  Closes #7325
+
+- version: turn version number functions into returning void
+  
+  ... as we never use the return codes from them.
+  
+  Reviewed-by: Daniel Gustafsson
+  Closes #7319
+
+- mqtt: extend the error message for no topic
+  
+  ... and mention that it needs URL encoding.
+  
+  Reported-by: Peter Körner
+  Fixes #7316
+  Closes #7317
+
+- formdata: correct typecast in curl_mime_data call
+  
+  Coverity pointed out it the mismatch. CID 1486590
+  
+  Closes #7327
+
+- url: (void)-prefix a curl_url_get() call
+  
+  Coverity (CID 1486645) pointed out a use of curl_url_get() in the
+  parse_proxy function where the return code wasn't checked. A
+  (void)-prefix makes the intention obvious.
+  
+  Closes #7320
+
+- glob: pass an 'int' as len when using printf's %*s
+  
+  Detected by Coverity CID 1486629.
+  
+  Closes #7324
+
+- vtls: use free() not curl_free()
+  
+  curl_free() is provided for users of the API to free returned data,
+  there's no need to use it internally.
+  
+  Closes #7318
+
+- zuul: use the new rustls directory name
+  
+  Follow-up to 6d972c8b1cbb3 which missed updating this directory name.
+  
+  Also no longer call it crustls in the docs and bump to rusttls-ffi 0.7.1
+  
+  Closes #7311
+
+Jay Satiro (29 Jun 2021)
+- http: fix crash in rate-limited upload
+  
+  - Don't set the size of the piece of data to send to the rate limit if
+    that limit is larger than the buffer size that will hold the piece.
+  
+  Prior to this change if CURLOPT_MAX_SEND_SPEED_LARGE
+  (curl tool: --limit-rate) was set then it was possible that a temporary
+  buffer used for uploading could be written to out of bounds. A likely
+  scenario for this would be a non-trivial amount of post data combined
+  with a rate limit larger than CURLOPT_UPLOAD_BUFFERSIZE (default 64k).
+  
+  The bug was introduced in 24e469f which is in releases since 7.76.0.
+  
+  perl -e "print '0' x 200000" > tmp
+  curl --limit-rate 128k -d @tmp httpbin.org/post
+  
+  Reported-by: Richard Marion
+  
+  Fixes https://github.com/curl/curl/issues/7308
+  Closes https://github.com/curl/curl/pull/7315
+
+Daniel Stenberg (29 Jun 2021)
+- copyright: add boiler-plate headers to CI config files
+  
+  And whitelist .zuul.ignore
+  
+  Closes #7314
+
+- CI: remove travis details
+  
+  Rename still used leftovers to "zuul" as that's now the CI using them.
+  
+  Closes #7313
+
+- RELEASE-NOTES: synced
+
+- openssl: avoid static variable for seed flag
+  
+  Avoid the race condition risk by instead storing the "seeded" flag in
+  the multi handle. Modern OpenSSL versions handle the seeding itself so
+  doing the seeding once per multi-handle instead of once per process is
+  less of an issue.
+  
+  Reported-by: Gerrit Renker
+  Fixes #7296
+  Closes #7306
+
+- configure: inhibit the implicit-fallthrough warning on gcc-12
+  
+  ... since it no longer acknowledges the comment markup we use for that
+  purpose.
+  
+  Reported-by: Younes El-karama
+  Fixes #7295
+  Closes #7307
+
+Daniel Gustafsson (28 Jun 2021)
+- [Andrei Rybak brought this change]
+
+  misc: fix typos in comments which repeat a word
+  
+  Fix typos in code comments which repeat various words.  In trivial
+  cases, just delete the repeated word.  Reword the affected sentence in
+  "lib/url.c" for it to make sense.
+  
+  Closes #7303
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
+
+Daniel Stenberg (27 Jun 2021)
+- lib677: make it survive torture testing
+  
+  Follow-up to a5ab72d5edd7
+  
+  Closes #7300
+
+- [Tommy Chiang brought this change]
+
+  docs/BINDINGS: fix outdated links
+  
+  * luacurl page is now not accessible, fix it with wayback machine page
+  * Scheme one seems not providing https now, change it back to http one
+  
+  Closes #7301
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  curstls: bump crustls version and use new URL
+  
+  crustls moved to https://github.com/rustls/rustls-ffi. This also bumps
+  the expected version to 0.7.0.
+  
+  Closes #7297
+
+- RELEASE-NOTES: synced
+
+- examples: length-limit two sscanf() uses of %s
+  
+  Reported-by: Jishan Shaikh
+  Fixes #7293
+  Closes #7294
+
+- [Richard Whitehouse brought this change]
+
+  multi: alter transfer timeout ordering
+  
+  - Check whether a connection has succeded before checking whether it's
+    timed out.
+  
+    This means if we've connected quickly, but subsequently been
+    descheduled, we allow the connection to succeed. Note, if we timeout,
+    but between checking the timeout, and connecting to the server the
+    connection succeeds, we will allow it to go ahead. This is viewed as
+    an acceptable trade off.
+  
+  - Add additional failf logging around failed connection attempts to
+    propogate the cause up to the caller.
+  
+  Co-Authored-by: Martin Howarth
+  Closes #7178
+
+- test677: IMAP CONNECT_ONLY, custom command and then exit
+  
+  Adjusted ftpserver.pl to add support for the IMAP IDLE command
+  
+  Adjusted test 660 to sync with the fix
+
+- multi: do not switch off connect_only flag when closing
+  
+  ... as it made protocol specific disconnect commands wrongly get used.
+  
+  Bug: https://curl.se/mail/lib-2021-06/0024.html
+  Reported-by: Aleksander Mazur
+  Closes #7288
+
+- http: make the haproxy support work with unix domain sockets
+  
+  ... it should then pass on "PROXY UNKNOWN" since it doesn't know the
+  involved IP addresses.
+  
+  Reported-by: Valentín Gutiérrez
+  Fixes #7290
+  Closes #7291
+
+- [Xiang Xiao brought this change]
+
+  curl.h: include sys/select.h for NuttX RTOS
+  
+  Closes #7287
+
+- [Bin Meng brought this change]
+
+  curl.h: remove the execution bit
+  
+  The execution bit of curl.h file was wrongly added:
+  
+    commit 2621025d6f96 ("curl.h: <sys/select.h> is supported by VxWorks7")
+  
+  and should be removed.
+  
+  Follow-up to 2621025d6f96 ("curl.h: <sys/select.h> is supported by VxWorks7")
+  Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
+  Closes #7286
+
+- [Bin Lan brought this change]
+
+  curl.h: <sys/select.h> is supported by VxWorks7
+  
+  Closes #7285
+
+- [Bachue Zhou brought this change]
+
+  quiche: use send() instead of sendto() to avoid macOS issue
+  
+  sendto() always returns "Socket is already connected" error on macos
+  
+  Closes #7260
+
+- [Li Xinwei brought this change]
+
+  cmake: fix support for UnixSockets feature on Win32
+  
+  Move the definition of sockaddr_un struct from config-win32.h to
+  curl_setup.h, so that it could be shared by all build systems.
+  
+  Add ADDRESS_FAMILY typedef for old mingw, now old mingw can also use
+  unix sockets.
+  
+  Also fix the build of tests/server/sws.c on Win32 when USE_UNIX_SOCKETS
+  is defined.
+  
+  Closes #7034
+
+- [Gregory Muchka brought this change]
+
+  hostip: (macOS) free returned memory of SCDynamicStoreCopyProxies
+  
+  From Apples documentation on SCDynamicStoreCopyProxies, "Return Value: A
+  dictionary of key-value pairs that represent the current internet proxy
+  settings, or NULL if no proxy settings have been defined or if an error
+  occurred. You must release the returned value."
+  
+  Failure to release the returned value of SCDynamicStoreCopyProxies can
+  result in a memory leak.
+  
+  Source: https://developer.apple.com/documentation/systemconfiguration/1517088-scdynamicstorecopyproxies
+  
+  Closes #7265
+
+- RELEASE-NOTES: synced
+
+Jay Satiro (21 Jun 2021)
+- vtls: fix warning due to function prototype mismatch
+  
+  b09c8ee changed the function prototype. Caught by Visual Studio.
+
+- curl_multibyte: Remove local encoding fallbacks
+  
+  - If the UTF-8 to UTF-16 conversion fails in Windows Unicode builds then
+    no longer fall back to assuming the string is in a local encoding.
   
   Background:
   
-  148534d added CURLSSLOPT_NATIVE_CA to use the Windows OS certificate
-  store in libcurl w/ OpenSSL on Windows. CURLSSLOPT_NATIVE_CA overrides
-  CURLOPT_CAINFO if both are set. The curl tool will fall back to
-  CURLSSLOPT_NATIVE_CA if it could not find a certificate bundle to set
-  via CURLOPT_CAINFO.
+  Some functions in Windows Unicode builds must convert UTF-8 to UTF-16 to
+  pass to the Windows CRT API wide-character functions since in Windows
+  UTF-8 is not a valid locale (or at least 99% of the time right now).
   
-  Problem:
+  Prior to this change if the Unicode encoding conversion failed then
+  libcurl would assume, for backwards compatibility with applications that
+  may have written their code for non-Unicode builds, attempt to convert
+  the string from local encoding to UTF-16.
   
-  libcurl may be built with hardcoded paths to a certificate bundle or
-  directory, and if CURLSSLOPT_NATIVE_CA is used then those paths are
-  ignored.
+  That type of "best effort" could theoretically cause some type of
+  security or other problem if a string that was locally encoded was also
+  valid UTF-8, and therefore an unexpected UTF-8 to UTF-16 conversion
+  could occur.
   
-  Solution:
+  Ref: https://github.com/curl/curl/pull/7246
   
-  A solution is still being discussed but since there's an impending
-  release this commit removes using CURLSSLOPT_NATIVE_CA in the curl tool.
-  
-  Ref: https://github.com/curl/curl/issues/5585
+  Closes https://github.com/curl/curl/pull/7257
 
-- openssl: Fix CA fallback logic for OpenSSL 3.0 build
+Daniel Stenberg (20 Jun 2021)
+- curl_endian: remove the unused Curl_write64_le function
   
-  Prior to this change I assume a build error would occur when
-  CURL_CA_FALLBACK was used.
+  The last usage was removed in cca455a36
   
-  Closes https://github.com/curl/curl/pull/5587
+  Closes #7280
 
-Daniel Stenberg (22 Jun 2020)
-- copyright: update mismatched copyright years
-
-- test1460: verify that -Ji is not ok
-
-- tool_getparam: -i is not OK if -J is used
+- vtls: only store TIMER_APPCONNECT for non-proxy connect
   
-  Reported-by: sn on hackerone
-  Bug: https://curl.haxx.se/docs/CVE-2020-8177.html
-
-- [Peter Wu brought this change]
-
-  CMake: ignore INTERFACE_LIBRARY targets for pkg-config file
+  Introducing a 'isproxy' argument to the connect function so that it
+  knows wether to store the time stamp or not.
   
+  Reported-by: Yongkang Huang
+  Fixes #7274
+  Closes #7274
+
+- gnutls: set the preferred TLS versions in correct order
+  
+  Regression since 781864bedbc57 (curl 7.77.0)
+  
+  Reported-by: civodul on github
+  Assisted-by: Nikos Mavrogiannopoulos
+  Fixes #7277
+  Closes #7278
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove checks for unused inet_ntoa and inet_ntoa_r
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove unused define HAVE_PERROR
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure: remove unused check for gai_strerror
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove unused define HAVE_FREEIFADDRS
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove unused define HAVE_FORK
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove unused define HAVE_FDOPEN
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove checks for unused sgtty.h
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove remaining checks for rsa.h
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove remaining checks for err.h
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove remaining checks for crypto.h
+  
+  Closes #7276
+
+- [Gergely Nagy brought this change]
+
+  configure/cmake: remove checks for unused getservbyport_r
+  
+  Closes #7276
+
+- --socks4[a]: clarify where the host name is resolved
+  
+  Closes #7273
+
+- libcurl-security.3: mention file descriptors and forks
+  
+  ... and move the security report section last.
+  
+  Reported-by: Harry Sintonen
+  Closes #7270
+
+- [Alex Xu (Hello71) brought this change]
+
+  configure.ac: make non-executable
+  
+  it needs to be processed by autoconf or autoreconf, and doesn't have a
+  suitable shebang to be directly executed. other projects normally set
+  configure.ac -x.
+  
+  Closes #7272
+
+- configure: do not strip out debug flags
+  
+  To allow users to set them when invoking configure without using
+  --with-debug.
+  
+  Reported-by: Alex Xu
+  Fixes #7216
+  Closes #7267
+
+- libssh2: limit time a disconnect can take to 1 second
+  
+  Closes #7271
+
+- TLS: prevent shutdown loops to get stuck
+  
+  ... by making sure the loops are only allowed to read the shutdown
+  traffic a limited number of times.
+  
+  Reported-by: Harry Sintonen
+  Closes #7271
+
+- hyper: propagate errors back up from read callbacks
+  
+  Makes test 513 work with hyper
+  
+  Closes #7266
+
+- KNOWN_BUGS: Negotiate on Windows fails
+  
+  Closes #5881
+
+- KNOWN_BUGS: renames instead of locking for atomic operations
+  
+  Closes #6882
+  Closes #6884
+
+- zuul: add two missing CI jobs
+  
+  ... that were configured, just not run
+  
+  Closes #7261
+
+Viktor Szakats (15 Jun 2021)
+- idn: fix libidn2 with windows unicode builds
+  
+  Unicode Windows builds use UTF-8 strings internally in libcurl,
+  so make sure to call the UTF-8 flavour of the libidn2 API. Also
+  document that Windows builds with libidn2 and UNICODE do expect
+  CURLOPT_URL as an UTF-8 string.
+  
+  Reported-by: dEajL3kA on github
+  Assisted-by: Jay Satiro
   Reviewed-by: Marcel Raad
-  Fixes #5512
-  Closes #5517
+  Closes #7246
+  Fixes #7228
 
-- [Valentyn Korniienko brought this change]
-
-  multibyte: Fixed access-> waccess to file for Windows Plarform
+Daniel Stenberg (15 Jun 2021)
+- curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE
   
-  Reviewed-by: Marcel Raad
-  Closes #5580
-
-- altsvc: bump to h3-29
+  They were never officially allowed and slipped in only due to sloppy
+  parsing. Spaces (ascii 32) should be correctly encoded (to %20) before
+  being part of a URL.
   
-  Closes #5584
-
-- urlglob: treat literal IPv6 addresses with zone IDs as a host name
+  The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl
+  allow spaces.
   
-  ... and not as a "glob". Now done by passing the supposed host to the
-  URL parser which supposedly will do a better job at identifying "real"
-  numerical IPv6 addresses.
+  Updated test 1560 to verify.
   
-  Reported-by: puckipedia on github
-  Fixes #5576
-  Closes #5579
-
-- test1179: verify error message for non-existing cmdline option
-
-- tool_getparam: repair the error message for unknown flag
-  
-  Follow-up to 9e5669f3880674
-  Detected by Coverity CID 1464582 ("Logically dead code")
-  
-  Closes #5577
-
-- FILEFORMAT: describe verify/stderr
-
-- connect: improve happy eyeballs handling
-  
-  For QUIC but also for regular TCP when the second family runs out of IPs
-  with a failure while the first family is still trying to connect.
-  
-  Separated the timeout handling for IPv4 and IPv6 connections when they
-  both have a number of addresses to iterate over.
-
-- ngtcp2: never call fprintf() in lib code in release version
-
-- ngtcp2: fix happy eyeballs quic connect crash
-  
-  Reported-by: Peter Wu
-  Fixes #5565
-  Closes #5568
-
-- select: remove the unused ELAPSED_MS() macro
-  
-  Closes #5573
-
-Marc Hoersken (17 Jun 2020)
-- [rcombs brought this change]
-
-  multi: implement wait using winsock events
-  
-  This avoids using a pair of TCP ports to provide wakeup functionality
-  for every multi instance on Windows, where socketpair() is emulated
-  using a TCP socket on loopback which could in turn lead to socket
-  resource exhaustion.
-  
-  Reviewed-by: Gergely Nagy
-  Reviewed-by: Marc Hörsken
-  
-  Closes #5397
-
-Daniel Stenberg (17 Jun 2020)
-- manpage: add three missing environment variables
-  
-  CURL_SSL_BACKEND, QLOGDIR and SSLKEYLOGFILE
-  
-  Closes #5571
-
-- RELEASE-NOTES: synced
-
-- configure: for wolfSSL, check for the DES func needed for NTLM
-  
-  Also adds pkg-config support for the wolfSSL detection.
-
-- [Ruurd Beerstra brought this change]
-
-  ntlm: enable NTLM support with wolfSSL
-  
-  When wolfSSL is built with its OpenSSL API layer, it fetures the same DES*
-  functions that OpenSSL has. This change take advantage of that.
-  
-  Co-authored-by: Daniel Stenberg
-  Closes #5556
-  Fixes #5548
-
-- http: move header storage to Curl_easy from connectdata
-  
-  Since the connection can be used by many independent requests (using
-  HTTP/2 or HTTP/3), things like user-agent and other transfer-specific
-  data MUST NOT be kept connection oriented as it could lead to requests
-  getting the wrong string for their requests. This struct data was
-  lingering like this due to old HTTP1 legacy thinking where it didn't
-  mattered..
-  
-  Fixes #5566
-  Closes #5567
-
-- CODE_REVIEW.md: how to do code reviews in curl
-  
-  Assisted-by: Daniel Gustafsson
-  Assisted-by: Rich Salz
-  Assisted-by: Hugo van Kemenade
-  Assisted-by: James Fuller
-  Assisted-by: Marc Hörsken
-  Assisted-by: Jay Satiro
-  
-  Closes #5555
-
-- altsvc: remove the num field from the altsvc struct
-  
-  It was superfluous since we have the list.size alredy
-  
-  Reported-by: Jay Satiro
-  Fixes #5553
-  Closes #5563
-
-- version.d: expanded and alpha-sorted
-  
-  Added a few missing features not previously mentioned. Ordered them
-  alphabetically.
-  
-  Closes #5558
-
-- ABI.md: rename to .md and polish the markdown
-  
-  Closes #5562
-
-- HELP-US: add a section for "smaller tasks"
-  
-  The point of this section is to meet the CII Best Practices gold level
-  critera:
-  
-   "The project MUST clearly identify small tasks that can be performed by
-    new or casual contributors"
-  
-  Closes #5560
-
-- TODO: retry on the redirected-to URL
-  
-  Closes #5462
-
-- mailmap: Nicolas Sterchele
-
-- [Nicolas Sterchele brought this change]
-
-  TODO: remove 19.3 section title
-  
-  Follow-up to ad6416986755e417c66e2c6, which caused wrong formatting on
-  curl documentation website
-  
-  Closes #5561
-
-- [Martin V brought this change]
-
-  test1560: avoid possibly negative association in wording
-  
-  Closes #5549
-
-- share: don't set the share flag it something fails
-  
-  When asking for a specific feature to be shared in the share object,
-  that bit was previously set unconditionally even if the shared feature
-  failed or otherwise wouldn't work.
-  
-  Closes #5554
-
-- buildconf: remove -print from the find command that removes files
-  
-  It's just too annoying and unnecessary to get a long list of files shown
-
-- RELEASE-NOTES: synced
-
-- wording: avoid blacklist/whitelist stereotypes
-  
-  Instead of discussing if there's value or meaning (implied or not) in
-  the colors, let's use words without the same possibly negative
-  associations.
-  
-  Closes #5546
-
-Jay Satiro (9 Jun 2020)
-- tool_getparam: fix memory leak in parse_args
-  
-  Prior to this change in Windows Unicode builds most parsed options would
-  not be freed.
-  
-  Found using _CrtDumpMemoryLeaks().
-  
-  Ref: https://github.com/curl/curl/issues/5545
-
-Daniel Stenberg (8 Jun 2020)
-- socks: detect connection close during handshake
-  
-  The SOCKS4/5 state machines weren't properly terminated when the proxy
-  connection got closed, leading to a busy-loop.
-  
-  Reported-By: zloi-user on github
-  Fixes #5532
-  Closes #5542
-
-- [James Fuller brought this change]
-
-  multi: add defensive check on data->multi->num_alive
-  
-  Closes #5540
-
-- Curl_addrinfo: use one malloc instead of three
-  
-  To reduce the amount of allocations needed for creating a Curl_addrinfo
-  struct, make a single larger malloc instead of three separate smaller
-  ones.
-  
-  Closes #5533
-
-- [Alessandro Ghedini brought this change]
-
-  quiche: update SSLKEYLOGFILE support
-  
-  quiche now requires the application to explicitly set the keylog path
-  for each connection, rather than reading the environment variable
-  itself.
-  
-  Closes #5541
-
-- tests: add two simple tests for --login-options
-  
-  Test 895 and 896 - as a follow-up to a3e972313b
-  
-  Closes #5539
-
-- ngtcp2: update with recent API changes
-  
-  Syncs with ngtcp2 commit 7e9a917d386d98 merged June 7 2020.
-  
-  Assisted-by: Tatsuhiro Tsujikawa
-  Closes #5538
-
-- [James Fuller brought this change]
-
-  socks: remove unreachable breaks in socks.c and mime.c
-  
-  Closes #5537
-
-- tool_cfgable: free login_options at exit
-  
-  Memory leak
-  Reported-by: Geeknik Labs
-  Fixes #5535
-  Closes #5536
-
-- libssh2: keep sftp errors as 'unsigned long'
-  
-  Remove weird work-around for storing the SFTP errors as int instead of
-  the "unsigned long" that libssh2 actually returns for SFTP errors.
-  
-  Closes #5534
-
-Marc Hoersken (6 Jun 2020)
-- timeouts: move ms timeouts to timediff_t from int and long
-  
-  Now that all functions in select.[ch] take timediff_t instead
-  of the limited int or long, we can remove type conversions
-  and related preprocessor checks to silence compiler warnings.
-  
-  Avoiding conversions from time_t was already done in 842f73de.
-  
-  Based upon #5262
-  Supersedes #5214, #5220 and #5221
-  Follow up to #5343 and #5479
-  Closes #5490
-
-Daniel Stenberg (6 Jun 2020)
-- [François Rigault brought this change]
-
-  openssl: set FLAG_TRUSTED_FIRST unconditionally
-  
-  On some systems, openssl 1.0.x is still the default, but it has been
-  patched to contain all the recent security fixes. As a result of this
-  patching, it is possible for macro X509_V_FLAG_NO_ALT_CHAINS to be
-  defined, while the previous behavior of openssl to not look at trusted
-  chains first, remains.
-  
-  Fix it: ensure X509_V_FLAG_TRUSTED_FIRST is always set, do not try to
-  probe for the behavior of openssl based on the existence ofmacros.
-  
-  Closes #5530
-
-- server/util: fix logmsg format using curl_off_t argument
-  
-  ... this caused segfaults on armv7.
-  
-  Regression added in dd0365d560aea5a (7.70.0)
-  
-  Reviewed-by: Jay Satiro
-  Closes #5529
-
-- RELEASE-NOTES: synced
-
-- [Cherish98 brought this change]
-
-  socks: fix expected length of SOCKS5 reply
-  
-  Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the
-  reply ATYP is X'01'. This resulted in erroneously expecting more bytes
-  when the request length is greater than the reply length (e.g., when
-  remotely resolving the hostname).
-  
-  Closes #5527
-
-Marc Hoersken (5 Jun 2020)
-- .gitignore: add directory containing the stats repo
-  
-  Since the new curl/stats repository is designed to be
-  checked out into the curl repository working tree as stats/
-  it should be on the ignore list to aid in commit staging.
-
-Daniel Stenberg (5 Jun 2020)
-- [Adnan Khan brought this change]
-
-  HTTP3.md: clarify cargo build directory
-  
-  Cargo needs to be called from within the 'quiche' directory.
-  
-  Closes #5522
-
-- user-agent.d: spell out what happens given a blank argument
-  
-  Closes #5525
-
-- trailers: switch h1-trailer logic to use dynbuf
-  
-  In the continued effort to remove "manual" realloc schemes.
-  
-  Closes #5524
-
-- CURLINFO_ACTIVESOCKET.3: clarify the description
-  
-  Reported-by: Jay Satiro
-  Fixes #5299
-  Closes #5520
-
-- mailmap: Don J Olmstead
-
-- configure: only strip first -L from LDFLAGS
-  
-  In the logic that works out if a given OpenSSL path works, it stripped
-  off a possibly leading -L flag using an incorrect sed pattern which
-  would remove all instances of -L in the string, including if the path
-  itself contained that two-letter sequence!
-  
-  The same pattern was used and is now updated in multiple places. Now it
-  only removes -L if it starts the strings.
-  
-  Reported-by: Mohamed Osama
-  Fixes #5519
-  Closes #5521
-
-Peter Wu (4 Jun 2020)
-- quiche: advertise draft 28 support
-  
-  Fix the verbose message while at it, quiche currently supports draft
-  27 and draft 28 simultaneously.
-  
-  Closes #5518
-
-Daniel Stenberg (4 Jun 2020)
-- KNOWN_BUGS: RTSP authentication breaks without redirect support
-  
-  Closes #4750
-
-Jay Satiro (4 Jun 2020)
-- projects: Add crypt32.lib to dependencies for all OpenSSL configs
-  
-  Windows project configurations that use OpenSSL with USE_WIN32_CRYPTO
-  need crypt32.
-  
-  Follow-up to 148534d which added CURLSSLOPT_NATIVE_CA for 7.71.0.
-  
-  The changes that are in this commit were made by script.
-  
-  Ref: https://gist.github.com/jay/a1861b50ecce2b32931237180f856e28
-  
-  Closes https://github.com/curl/curl/pull/5516
-
-Marc Hoersken (3 Jun 2020)
-- CI/macos: fix 'is already installed' errors by using bundle
-  
-  Avoid failing CI builds due to nghttp2 being already installed.
-  
-  Closes #5513
-
-Daniel Stenberg (3 Jun 2020)
-- altsvc: fix 'dsthost' may be used uninitialized in this function
-
-- RELEASE-NOTES: synced
-
-- urldata: let the HTTP method be in the set.* struct
-  
-  When the method is updated inside libcurl we must still not change the
-  method as set by the user as then repeated transfers with that same
-  handle might not execute the same operation anymore!
-  
-  This fixes the libcurl part of #5462
-  
-  Test 1633 added to verify.
-  
-  Closes #5499
-
-- hostip: fix the memory-leak introduced in 67d2802
-  
-  Fixes #5503
-  Closes #5504
-
-- test970: make it require proxy support
-  
-  This test verifies the -w %json output and the test case includes a full
-  generated "blob". If there's no proxy support built into libcurl, it
-  will return an error for proxy related info variables and they will not
-  be included in the json, thus causing a mismatch and this test fails.
-  
-  Reported-by: Marc Hörsken
-  Fixes #5501
-  Closes #5502
-
-- [Radoslav Georgiev brought this change]
-
-  examples/http2-down/upload: add error checks
-  
-  If `index.html` does not exist in the directory from which the example
-  is invoked, the fopen(upload, "rb") invocation in `setup` would fail,
-  returning NULL.  This value is subsequently passed as the FILE* argument
-  of the `fread` invocation in the `read_callback` function, which is the
-  actual cause of the crash (apparently `fread` assumes that argument to
-  be non-null).
-  
-  In addition, mitigate some possible crashes of similar origin.
-  
-  Closes #5463
-
-- [kotoriのねこ brought this change]
-
-  examples/ephiperfifo: turn off interval when setting timerfd
-  
-  Reported-by: therealhirudo on github
-  Fixes #5485
-  Closes #5497
-
-- [Saleem Abdulrasool brought this change]
-
-  vtls: repair the build with `CURL_DISABLE_PROXY`
-  
-  `http_proxy` will not be available in `conndata` if `CURL_DISABLE_PROXY`
-  is enabled.  Repair the build with that configuration.
-  
-  Follow-up to f3d501dc67
-  
-  Closes #5498
-
-- transfer: remove k->str NULL check
-  
-  "Null-checking k->str suggests that it may be null, but it has already
-  been dereferenced on all paths leading to the check" - and it can't
-  legally be NULL at this point. Remove check.
-  
-  Detected by Coverity CID 1463884
-  
-  Closes #5495
-
-Marc Hoersken (1 Jun 2020)
-- select: always use Sleep in Curl_wait_ms on Win32
-  
-  Since Win32 almost always will also have USE_WINSOCK,
-  we can reduce complexity and always use Sleep there.
-  
-  Assisted-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  
-  Follow up to #5343
-  Closes #5489
-
-Daniel Stenberg (31 May 2020)
-- conncache: download buffer needs +1 size for trailing zero
-  
-  Follow-up to c4e6968127e
-  Detected by OSS-Fuzz: https://oss-fuzz.com/testcase-detail/5727799779524608
-
-Marc Hoersken (31 May 2020)
-- azure: use matrix strategy to avoid configuration redundancy
-  
-  This also includes the following changes:
-  
-  - Use the same timeout for all jobs on Linux (60 minutes)
-    and Windows (90 minutes)
-  - Use CLI stable apt-get install -y instead of apt install
-    which warns about that and run apt-get update first
-  - Enable MQTT for Windows msys2 builds instead of
-    legacy msys1 builds
-  - Add ./configure --prefix parameter to the msys2 builds
-  - The MSYSTEM environment variable is now preset inside
-    the container images for the msys2 builds
-  
-  Note: on Azure Pipelines the matrix strategy is basically
-  just a simple list of job copies and not really a matrix.
-  
-  Closes #5468
-
-Daniel Stenberg (30 May 2020)
-- build: disable more code/data when built without proxy support
-  
-  Added build to travis to verify
-  
-  Closes #5466
-
-- url: alloc the download buffer at transfer start
-  
-  ... and free it as soon as the transfer is done. It removes the extra
-  alloc when a new size is set with setopt() and reduces memory for unused
-  easy handles.
-  
-  In addition: the closure_handle now doesn't use an allocated buffer at
-  all but the smallest supported size as a stack based one.
-  
-  Closes #5472
-
-- timeouts: change millisecond timeouts to timediff_t from time_t
-  
-  For millisecond timers we like timediff_t better. Also, time_t can be
-  unsigned so returning a negative value doesn't work then.
-  
-  Closes #5479
-
-Marc Hoersken (30 May 2020)
-- select: add overflow checks for timeval conversions
-  
-  Using time_t and suseconds_t if suseconds_t is available,
-  long on Windows (maybe others in the future) and int elsewhere.
-  
-  Also handle case of ULONG_MAX being greater or equal to INFINITE.
-  
-  Assisted-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  
-  Part of #5343
-
-- select: use timediff_t instead of time_t and int for timeout_ms
-  
-  Make all functions in select.[ch] take timeout_ms as timediff_t
-  which should always be large enough and signed on all platforms
-  to take all possible timeout values and avoid type conversions.
-  
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  
-  Replaces #5107 and partially #5262
-  Related to #5240 and #5286
-  Closes #5343
-
-- unit1604.c: fix implicit conv from 'SANITIZEcode' to 'CURLcode'
-  
-  GCC 10 warns about this with warning: implicit conversion
-    from 'SANITIZEcode' to 'CURLcode' [-Wenum-conversion]
-  
-  Since 'expected_result' is not really of type 'CURLcode' and
-  it is not exposed in any way, we can just use 'SANITIZEcode'.
-  
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Marcel Raad
-  
-  Closes #5476
-
-- tests/libtest: fix undefined reference to 'curlx_win32_fopen'
-  
-  Since curl_setup.h now makes use of curlx_win32_fopen for Win32
-  builds with USE_WIN32_LARGE_FILES or USE_WIN32_SMALL_FILES defined,
-  we need to include the relevant files for tests using fopen,
-  because the libtest sources are also including curl_setup.h
-  
-  Reviewed-by: Marcel Raad
-  Reviewed-by: Daniel Stenberg
-  
-  Follow up to #3784 (ffdddb45d9)
-  Closes #5475
-
-- appveyor: add non-debug plain autotools-based build
-  
-  This should enable us to catch linking issues with the
-  testsuite early, like the one described/fixed in #5475.
-  
-  Reviewed-by: Daniel Stenberg
-  Reviewed-by: Marcel Raad
-  
-  Closes #5477
-
-Daniel Stenberg (29 May 2020)
-- RELEASE-NOTES: synced
-
-- Revert "buildconf: use find -execdir"
-  
-  This partially reverts commit c712009838f44211958854de431315586995bc61.
-  
-  Keep the ares_ files removed but bring back the older way to run find,
-  to make it work with busybox's find, as apparently that's being used.
-  
-  Reported-by: Max Peal
-  Fixes #5483
-  Closes #5484
-
-- server/sws: fix asan warning on use of uninitialized variable
-
-- libssh2: improved error output for wrong quote syntax
-  
-  Reported-by: Werner Stolz
-  
-  Closes #5474
-
-- mk-lib1521: generate code for testing BLOB options as well
-  
-  Follow-up to cac5374298b3
-  
-  Closes #5478
-
-- configure: repair the check if argv can be written to
-  
-  Due to bad escaping of the test code, the test wouldn't build and thus
-  result in a negative test result, which would lead to the unconditional
-  assumption that overwriting the arguments doesn't work and thus curl
-  would never hide credentials given in the command line, even when it
-  would otherwise be possible.
-  
-  Regression from commit 2d4c2152c (7.60.0)
-  
-  Reported-by: huzunhao on github
-  Fixes #5470
-  Closes #5471
-
-Peter Wu (28 May 2020)
-- CMake: rebuild Makefile.inc.cmake when Makefile.inc changes
-  
-  Otherwise the build might fail due to missing source files, as
-  demonstrated by the recent keylog.c addition on an existing build dir.
-  
-  Closes #5469
-
-Daniel Stenberg (28 May 2020)
-- urldata: fix comments: Curl_done() is called multi_done() now
-  
-  ... since 575e885db
-
-Peter Wu (27 May 2020)
-- ngtcp2: use common key log routine for better thread-safety
-  
-  Tested with ngtcp2 built against the OpenSSL library. Additionally
-  tested with MultiSSL (NSS for TLS and ngtcp2+OpenSSL for QUIC).
-  
-  The TLS backend (independent of QUIC) may or may not already have opened
-  the keylog file before. Therefore Curl_tls_keylog_open is always called
-  to ensure the file is open.
-
-- wolfssl: add SSLKEYLOGFILE support
-  
-  Tested following the same curl and tshark commands as in commit
-  "vtls: Extract and simplify key log file handling from OpenSSL" using
-  WolfSSL v4.4.0-stable-128-g5179503e8 from git master built with
-  `./configure --enable-all --enable-debug CFLAGS=-DHAVE_SECRET_CALLBACK`.
-  
-  Full support for this feature requires certain wolfSSL build options,
-  see "Availability note" in lib/vtls/wolfssl.c for details.
-  
-  Closes #5327
-
-- vtls: Extract and simplify key log file handling from OpenSSL
-  
-  Create a set of routines for TLS key log file handling to enable reuse
-  with other TLS backends. Simplify the OpenSSL backend as follows:
-  
-   - Drop the ENABLE_SSLKEYLOGFILE macro as it is unconditionally enabled.
-   - Do not perform dynamic memory allocation when preparing a log entry.
-     Unless the TLS specifications change we can suffice with a reasonable
-     fixed-size buffer.
-   - Simplify state tracking when SSL_CTX_set_keylog_callback is
-     unavailable. My original sslkeylog.c code included this tracking in
-     order to handle multiple calls to SSL_connect and detect new keys
-     after renegotiation (via SSL_read/SSL_write). For curl however we can
-     be sure that a single master secret eventually becomes available
-     after SSL_connect, so a simple flag is sufficient. An alternative to
-     the flag is examining SSL_state(), but this seems more complex and is
-     not pursued. Capturing keys after server renegotiation was already
-     unsupported in curl and remains unsupported.
-  
-  Tested with curl built against OpenSSL 0.9.8zh, 1.0.2u, and 1.1.1f
-  (`SSLKEYLOGFILE=keys.txt curl -vkso /dev/null https://localhost:4433`)
-  against an OpenSSL 1.1.1f server configured with:
-  
-      # Force non-TLSv1.3, use TLSv1.0 since 0.9.8 fails with 1.1 or 1.2
-      openssl s_server -www -tls1
-      # Likewise, but fail the server handshake.
-      openssl s_server -www -tls1 -Verify 2
-      # TLS 1.3 test. No need to test the failing server handshake.
-      openssl s_server -www -tls1_3
-  
-  Verify that all secrets (1 for TLS 1.0, 4 for TLS 1.3) are correctly
-  written using Wireshark. For the first and third case, expect four
-  matches per connection (decrypted Server Finished, Client Finished, HTTP
-  Request, HTTP Response). For the second case where the handshake fails,
-  expect a decrypted Server Finished only.
-  
-      tshark -i lo -pf tcp -otls.keylog_file:keys.txt -Tfields \
-          -eframe.number -eframe.time -etcp.stream -e_ws.col.Info \
-          -dtls.port==4433,http -ohttp.desegment_body:FALSE \
-          -Y 'tls.handshake.verify_data or http'
-  
-  A single connection can easily be identified via the `tcp.stream` field.
-
-Daniel Stenberg (27 May 2020)
-- FILEFORMAT: add more features that tests can depend on
-
-- [Michael Kaufmann brought this change]
-
-  transfer: close connection after excess data has been read
-  
-  For HTTP 1.x, it's a protocol error when the server sends more bytes
-  than announced. If this happens, don't reuse the connection, because the
-  start position of the next response is undefined.
-  
-  Closes #5440
-
-- [Estanislau Augé-Pujadas brought this change]
-
-  Revert "ssh: ignore timeouts during disconnect"
-  
-  This reverts commit f31760e63b4e9ef1eb25f8f211390f8239388515. Shipped in
-  curl 7.54.1.
-  
-  Bug: https://curl.haxx.se/mail/lib-2020-05/0068.html
-  Closes #5465
-
-- urldata: connect related booleans live in struct ConnectBits
-  
-  And remove a few unused booleans!
-  
-  Closes #5461
-
-- hostip: on macOS avoid DoH when given a numerical IP address
-  
-  When USE_RESOLVE_ON_IPS is set (defined on macOS), it means that
-  numerical IP addresses still need to get "resolved" - but not with DoH.
-  
-  Reported-by: Viktor Szakats
-  Fixes #5454
-  Closes #5459
-
-- ngtcp2: cleanup memory when failing to connect
-  
-  Reported-by: Peter Wu
-  Fixes #5447 (the ngtcp2 side of it)
-  Closes #5451
-
-- quiche: clean up memory properly when failing to connect
-  
-  Addresses the quiche side of #5447
-  Reported-by: Peter Wu
-  Closes #5450
-
-- cleanup: use a single space after equals sign in assignments
-
-- url: accept "any length" credentials for proxy auth
-  
-  They're only limited to the maximum string input restrictions, not to
-  256 bytes.
-  
-  Added test 1178 to verify
-  
-  Reported-by: Will Roberts
-  Fixes #5448
-  Closes #5449
-
-- [Maksim Stsepanenka brought this change]
-
-  test1167: fixes in badsymbols.pl
-  
-  Closes #5442
-
-- altsvc: fix parser for lines ending with CRLF
-  
-  Fixed the alt-svc parser to treat a newline as end of line.
-  
-  The unit tests in test 1654 were done without CRLF and thus didn't quite
-  match the real world. Now they use CRLF as well.
-  
-  Reported-by: Peter Wu
-  Assisted-by: Peter Wu
-  Assisted-by: Jay Satiro
-  Fixes #5445
-  Closes #5446
-
-Viktor Szakats (25 May 2020)
-- all: fix codespell errors
-  
-  Reviewed-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  Closes https://github.com/curl/curl/pull/5452
-
-Peter Wu (25 May 2020)
-- ngtcp2: fix build with current ngtcp2 master implementing draft 28
-  
-  Based on client.cc changes from ngtcp2. Tested with current git master,
-  ngtcp2 commit c77d5731ce92, nghttp3 commit 65ff479d4380.
-  
-  Fixes #5444
-  Closes #5443
-
-Daniel Stenberg (25 May 2020)
-- RELEASE-NOTES: synced
-  
-  moved the new setopts up to a "change"
-
-- RELEASE-NOTES: synced
-
-- copyright: updated year ranges out of sync
-  
-  ... and whitelisted a few more files in the the copyright.pl script.
-
-- [Gilles Vollant brought this change]
-
-  setopt: add CURLOPT_PROXY_ISSUERCERT(_BLOB) for coherency
-  
-  Closes #5431
-
-- curl: remove -J "informational" written on stdout
-  
-  curl would previously show "curl: Saved to filename 'name from header'"
-  if -J was used and a name was picked from the Content-Disposition
-  header. That output could interfer with other stdout output, such as -w.
-  
-  This commit removes that output line.
-  Bug: https://curl.haxx.se/mail/archive-2020-05/0044.html
-  Reported-by: Коваленко Анатолий Викторович
-  Closes #5435
-
-Peter Wu (22 May 2020)
-- travis: simplify quiche build instructions wrt boringssl
-  
-  quiche builds boringssl as static library, reuse that instead of
-  building another shared library.
-  
-  Closes #5438
-
-- configure: fix pthread check with static boringssl
-  
-  A shared boringssl/OpenSSL library requires -lcrypto only for linking.
-  A static build additionally requires `-ldl -lpthread`. In the latter
-  case `-lpthread` is added to LIBS which prevented `-pthread` from being
-  added to CFLAGS. Clear LIBS to fix linking failures for libtest tests.
-
-Daniel Stenberg (22 May 2020)
-- Revert "sendf: make failf() use the mvsnprintf() return code"
-  
-  This reverts commit 74623551f306990e70c7c5515b88972005604a74.
-  
-  Instead mark the function call with (void). Getting the return code and
-  using it instead triggered Coverity warning CID 1463596 because
-  snprintf() can return a negative value...
-  
-  Closes #5441
-
-- typecheck-gcc.h: CURLINFO_PRIVATE does not need a 'char *'
-  
-  Reported-by: Billyzou0741326 on github
-  Fixes #5432
-  Closes #5436
-
-- tests/server/util.h: add extern to silence compiler warning
-  
-  Follow-up from a3b0699d5c1
-
-- typecheck-gcc.h: fix the OFF_T check
-  
-  The option number also needs to be less than CURLOPTTYPE_BLOB.
-  
-  Follow-up to cac5374298
-  Reported-by: Jeroen Ooms
-  Bug: https://github.com/curl/curl/pull/5365#issuecomment-631084114
-
-- TODO: --dry-run
-  
-  Closes #5426
-
-- TODO: Ratelimit or wait between serial requests
-  
-  Closes #5406
-
-- tool_paramhlp: fixup C89 mistake
-  
-  Follow-up to c5f0a9db22.
-
-- [Siva Sivaraman brought this change]
-
-  tool_paramhlp: fixed potentially uninitialized strtol() variable
-  
-  Seems highly unlikely to actually be possible, but better safe than
-  sorry.
-  
-  Closes #5417
-
-- [Siva Sivaraman brought this change]
-
-  tool_operate: fixed potentially uninitialized variables
-  
-  ... in curl_easy_getinfo() calls. They're harmless but clearing the
-  variables makes the code safer and comforts the reader.
-  
-  Closes #5416
-
-- sha256: move assign to the declaration line
-  
-  Follow-up to fae30656. Should've been squashed with that commit...
-
-- [Siva Sivaraman brought this change]
-
-  sha256: fixed potentially uninitialized variable
-  
-  Closes #5414
-
-- sendf: make failf() use the mvsnprintf() return code
-  
-  ... and avoid a strlen() call. Fixes a MonocleAI warning.
-  
-  Reported-by: MonocleAI
-  Fixes #5413
-  Closes #5420
-
-- hostip: make Curl_printable_address not return anything
-  
-  It was not used much anyway and instead we let it store a blank buffer
-  in case of failure.
-  
-  Reported-by: MonocleAI
-  Fixes #5411
-  Closes #5418
-
-- ftp: mark return-ignoring calls to Curl_GetFTPResponse with (void)
-  
-  They're done on purpose, make that visible in the code.
-  Reported-by: MonocleAI
-  Fixes #5412
-  Closes #549
-
-- TODO: forbid TLS post-handshake auth and do TLS record padding
-  
-  Closes #5396
-  Closes #5398
-
-- RELEASE-NOTES: synced
-
-- dynbuf: return NULL when there's no buffer length
-  
-  ... as returning a "" is not a good idea as the string is supposed to be
-  allocated and returning a const string will cause issues.
-  
-  Reported-by: Brian Carpenter
-  Follow-up to ed35d6590e72c
-  Closes #5405
-
-Peter Wu (16 May 2020)
-- travis: upgrade to bionic, clang-9, improve readability
-  
-  Changes, partially to reduce build failures from external dependencies:
-   - Upgrade Ubuntu and drop unnecessary third-party repos.
-   - Properly clone apt config to ensure retries.
-   - Upgrade to clang-9 from the standard repos.
-   - Use Ubuntu 20.04 focal for the libssh build, use of ssh_get_publickey
-     fails on -Werror=deprecated-declarations in Ubuntu 18.04. Do not use
-     focal everywhere yet since Travis CI has not documented this option.
-     In focal, python-impacket (Py2.7) has been removed, leaving only
-     python3-impacket. Since it is only needed for SMB tests and not SSH,
-     skip it for the libssh job since it might need more work.
-   - apt: Remove gcc-8 and libstdc++-8-dev, already installed via g++-8.
-  
-  Non-functional cleanups:
-   - Simplify test matrix, drop redundant os and compiler keys.
-   - Deprecation fixes: remove sudo, rename matrix -> jobs.
-   - Every job has an 'env' key, put this key first in a list item.
-  
-  Closes #5370
-
-- travis: whitespace-only changes for consistency
-  
-  Automatically apply a consistent indentation with:
-  
-      python3 -c 'from ruamel.yaml import YAML;y=YAML();d=y.load(open(".travis.yml"));y.width=500;y.dump(d,open(".travis.yml.new","w"))'
-  
-  followed by manually re-indenting three comments.
-  
-  Closes #5370
-
-- CMake: add libssh build support
-  
-  Closes #5372
-
-Daniel Stenberg (15 May 2020)
-- KNOWN_BUGS: wolfssh: publickey auth doesn't work
-  
-  Closes #4820
-
-- KNOWN_BUGS: OS400 port requires deprecated IBM library
-  
-  Closes #5176
-
-- [Vyron Tsingaras brought this change]
-
-  http2: keep trying to send pending frames after req.upload_done
-  
-  Fixes #1410
-  Closes #5401
-
-- [Gilles Vollant brought this change]
-
-  setopt: support certificate options in memory with struct curl_blob
-  
-  This change introduces a generic way to provide binary data in setopt
-  options, called BLOBs.
-  
-  This change introduces these new setopts:
-  
-  CURLOPT_ISSUERCERT_BLOB, CURLOPT_PROXY_SSLCERT_BLOB,
-  CURLOPT_PROXY_SSLKEY_BLOB, CURLOPT_SSLCERT_BLOB and CURLOPT_SSLKEY_BLOB.
-  
-  Reviewed-by: Daniel Stenberg
-  Closes #5357
-
-- source cleanup: remove all custom typedef structs
-  
-   - Stick to a single unified way to use structs
-   - Make checksrc complain on 'typedef struct {'
-   - Allow them in tests, public headers and examples
-  
-   - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
-     typedef different types/structs depending on build conditions.
-  
-  Closes #5338
-
-- travis: remove the .checksrc fiddling
-
-- ftp: make domore_getsock() return the secondary socket properly
-  
-  Previously, after PASV and immediately after the data connection has
-  connected, the function would only return the control socket to wait for
-  which then made the data connection simply timeout and not get polled
-  correctly. This become obvious when running test 1631 and 1632 event-
-  based.
-
-- test1632: verify FTP through HTTPS-proxy with connection re-use
-
-- test1631: verify FTP download through HTTPS-proxy
-
-- sws: as last resort, get test number from server cmd file
-  
-  If it can't be found in the request. Also support --cmdfile to set it to
-  a custom file name.
-  
-  runtests.pl always writes this file with the test number in it since a
-  while back.
-
-- ftp: shut down the secondary connection properly when SSL is used
-  
-  Reported-by: Neal Poole
-  Fixes #5340
-  Closes #5385
-
-Marcel Raad (14 May 2020)
-- KNOWN_BUGS: adapt 5.5 to recent changes
-  
-  It only applies to non-Unicode builds now.
-  Also merge 5.10 into it as it's effectively a duplicate.
-  
-  Closes https://github.com/curl/curl/pull/3784
-
-- curl_setup: support Unicode functions to open files on Windows
-  
-  Use them only if `_UNICODE` is defined, in which case command-line
-  arguments have been converted to UTF-8.
-  
-  Closes https://github.com/curl/curl/pull/3784
-
-- tool: support UTF-16 command line on Windows
-  
-  - use `wmain` instead of `main` when `_UNICODE` is defined [0]
-  - define `argv_item_t` as `wchar_t *` in this case
-  - use the curl_multibyte gear to convert the command-line arguments to
-    UTF-8
-  
-  This makes it possible to pass parameters with characters outside of
-  the current locale on Windows, which is required for some tests, e.g.
-  the IDN tests. Out of the box, this currently only works with the
-  Visual Studio project files, which default to Unicode, and winbuild
-  with the `ENABLE_UNICODE` option.
-  
-  [0] https://devblogs.microsoft.com/oldnewthing/?p=40643
-  
-  Ref: https://github.com/curl/curl/issues/3747
-  Closes https://github.com/curl/curl/pull/3784
-
-- curl_multibyte: add to curlx
-  
-  This will also be needed in the tool and tests.
-  
-  Ref: https://github.com/curl/curl/pull/3758#issuecomment-482197512
-  Closes https://github.com/curl/curl/pull/3784
-
-Daniel Stenberg (14 May 2020)
-- url: make the updated credentials URL-encoded in the URL
-  
-  Found-by: Gregory Jefferis
-  Reported-by: Jeroen Ooms
-  Added test 1168 to verify. Bug spotted when doing a redirect.
-  Bug: https://github.com/jeroen/curl/issues/224
-  Closes #5400
-
-- tests: add https-proxy support to the test suite
-  
-  Initial test 1630 added with basic HTTPS-proxy use. HTTPS-proxy is like
-  HTTP proxy but with a full TLS connection to the proxy.
-  
-  Closes #5399
-
-- mailmap: James Fuller
-
-- [Major_Tom brought this change]
-
-  vauth/cleartext: fix theoretical integer overflow
-  
-  Fix theoretical integer overflow in Curl_auth_create_plain_message.
-  
-  The security impact of the overflow was discussed on hackerone. We
-  agreed this is more of a theoretical vulnerability, as the integer
-  overflow would only be triggerable on systems using 32-bits size_t with
-  over 4GB of available memory space for the process.
-  
-  Closes #5391
-
-Jay Satiro (13 May 2020)
-- curl.1: Quote globbed URLs
-  
-  - Quote the globbing example URLs that contain characters [] {} since
-    otherwise they may be interpreted as shell metacharacters.
-  
-  Bug: https://github.com/curl/curl/issues/5388
-  Reported-by: John Simpson
-  
-  Closes https://github.com/curl/curl/pull/5394
-
-Daniel Stenberg (14 May 2020)
-- checksrc: enhance the ASTERISKSPACE and update code accordingly
-  
-  Fine: "struct hello *world"
-  
-  Not fine: "struct hello* world" (and variations)
-  
-  Closes #5386
-
-- docs/options-in-versions: which version added each cmdline option
-  
-  Added test 971 to verify that the list is in sync with the files in
-  cmdline-opts. The check also verifies that .d-files that uses Added:
-  specify the same version number as the options-in-versions file does.
-  
-  Closes #5381
-
-- docs: unify protocol lists
-  
-  We boast support for 25 transfer protocols. Make sure the lists are
-  consistent
-  
-  Closes #5384
-
-- OpenSSL: have CURLOPT_CRLFILE imply CURLSSLOPT_NO_PARTIALCHAIN
-  
-  ... to avoid an OpenSSL bug that otherwise makes the CRL check to fail.
-  
-  Reported-by: Michael Kaufmann
-  Fixes #5374
-  Closes #5376
-
-- tls13-ciphers.d: shorten the Arg
-
-- sasl-authzid.d: add Arg: and shorten the desc
-
-- cert-type.d: mention the available types in the desc
-
-- tool: shorten 3 --help descriptions
-  
-  --happy-eyeballs-timeout-ms, --resolve and --ssl-revoke-best-effort
-  
-  gen.pl already warned about these lines but we didn't listen
-  
-  Closes #5379
-
-- configure: the wolfssh backend does not provide SCP
-  
-  Closes #5387
-
-- RELEASE-NOTES: synced
-
-- url: reject too long input when parsing credentials
-  
-  Since input passed to libcurl with CURLOPT_USERPWD and
-  CURLOPT_PROXYUSERPWD circumvents the regular string length check we have
-  in Curl_setstropt(), the input length limit is enforced in
-  Curl_parse_login_details too, separately.
-  
-  Reported-by: Thomas Bouzerar
-  Closes #5383
-
-- list-only.d: this option existed already in 4.0
-
-Jay Satiro (12 May 2020)
-- retry-all-errors.d: Shorten the summary line
-  
-  Follow-up to b995bb5 from a few moments ago.
-  
-  Reported-by: Daniel Stenberg
-  
-  Ref: https://github.com/curl/curl/commit/b995bb5#r39108929
-
-- [denzor brought this change]
-
-  easy: fix dangling pointer on easy_perform fail
-  
-  Closes https://github.com/curl/curl/pull/5363
-
-- tool: Add option --retry-all-errors to retry on any error
-  
-  The "sledgehammer" of retrying.
-  
-  Closes https://github.com/curl/curl/pull/5185
-
-Daniel Stenberg (12 May 2020)
-- [James Le Cuirot brought this change]
-
-  libcurl.pc: Merge Libs.private into Libs for static-only builds
-  
-  A project being built entirely statically will call pkg-config with
-  --static, which utilises the Libs.private field. Conversely it will
-  not use --static when not being built entirely statically, even if
-  there is only a static build of libcurl available. This will most
-  likely cause the build to fail due to underlinking unless we merge the
-  Libs fields.
-  
-  Consider that this is what the Meson build system does when it
-  generates pkg-config files.
-  
-  I have also reflected this in the --libs argument of curl-config even
-  though REQUIRE_LIB_DEPS always seems to be "yes" anyway.
-  
-  Closes #5373
-
-- [Peter Wu brought this change]
-
-  CMake: fix runtests.pl with CMake, add new test targets
-  
-    * runtests.pl:
-      - Fix out-of-tree build under CMake when srcdir is not set. Default
-        srcdir to the location of runtests.pl.
-      - Add a hack to allow CMake to use the TFLAGS option as documented
-        in tests/README and used in scripts/travis/script.sh.
-    * Bump CMake version to 3.2 for USES_TERMINAL, dropping Debian Jessie
-      support (no one should care, it is already EOL.).
-    * Remove CTest since it defines its own 'test' target with no tests
-      since all unittests are already broken and not built by default.
-    * Add new test targets based on the options from Makefile.am. Since
-      new test targets are rarely added, I opted for duplicating the
-      runtests.pl options as opposed to creating a new Makefile.inc file.
-      Use top-level target names (test-x) instead of x-test since that is
-      used by CI and others.
-  
-  Closes #5358
-
-- [Peter Wu brought this change]
-
-  CMake: do not build test programs by default
-  
-  The default target should only build libcurl and curl. Add a dedicated
-  'testdeps' target which will be used later when running tests. Note that
-  unittests are currently broken in CMake and already excluded.
-  
-  Closes #5368
-
-- FILEFORMAT: moved up the variables section and further polished
-
-- runtests: remove ftp2 support, not used
-  
-  We once supported two separate ftp instances in the test suite. Has not
-  been used the last decade.
-  
-  Closes #5375
-
-- url: sort the protocol schemes in rough popularity order
-  
-  When looking for a protocol match among supported schemes, check the
-  most "popular" schemes first. It has zero functionality difference and
-  for all practical purposes a speed difference will not be measureable
-  but it still think it makes sense to put the least likely matches last.
-  
-  "Popularity" based on the 2019 user survey.
-  
-  Closes #5377
-
-Marc Hoersken (11 May 2020)
-- test1238: avoid tftpd being busy for tests shortly following
-  
-  The tftpd server may still be busy if the total timeout of
-  25 seconds has not been reached or no sread error was received
-  during or after the execution of the timeout test 1238.
-  
-  Once the next TFTP test comes around (eg. 1242 or 1243),
-  those will fail because the tftpd server is still waiting
-  on data from curl due to the UDP protocol being stateless
-  and having no connection close. On Linux this error may not
-  happen, because ICMP errors generated due to a swrite error
-  can also be returned async on the next sread call instead.
-  
-  Therefore we will now just kill the tftpd server after test
-  1238 to make sure that the following tests are not affected.
-  
-  This enables us to no longer ignore tests 1242, 1243, 2002
-  and 2003 on the CI platforms CirrusCI and AppVeyor.
-  
-  Assisted-by: Peter Wu
-  Closes #5364
-
-Daniel Stenberg (11 May 2020)
-- write-out.d: added "response_code"
-
-- KNOWN_BUGS: Build with staticly built dependency
-  
-  I rewrote the item 5.4 to be more generic about static dependencies.
-
-- ROADMAP: remove old entries
-  
-  MQTT - the start has already landed
-  
-  tiny-curl - also mostly landed and is a continuous work
-  
-  make menuconfig - basically no interest from users, not pushing there
-
-- [Peter Wu brought this change]
-
-  travis: Add ngtcp2 and quiche tests for CMake
-  
-  To avoid an explosion of jobs, extend the existing CMake tests with
-  ngtcp2 and quiche support. macOS was previously moved to GitHub actions,
-  so the non-Linux case can be dropped.
-
-- [Peter Wu brought this change]
-
-  CMake: add ENABLE_ALT_SVC option
-  
-  Tested alt-svc with quiche. While at it, add missing MultiSSL reporting
-  (not tested).
-
-- [Peter Wu brought this change]
-
-  CMake: add HTTP/3 support (ngtcp2+nghttp3, quiche)
-  
-  Add three new CMake Find modules (using the curl license, but I grant
-  others the right to apply the CMake BSD license instead).
-  
-  This CMake config is simpler than the autotools one because it assumes
-  ngtcp2 and nghttp3 to be used together. Another difference is that this
-  CMake config checks whether QUIC is actually supported by the TLS
-  library (patched OpenSSL or boringssl) since this can be a common
-  configuration mistake that could result in build errors later.
-  
-  Unlike autotools, CMake does not warn you that the features are
-  experimental. The user is supposed to already know that and read the
-  documentation. It requires a very special build environment anyway.
-  
-  Tested with ngtcp2+OpenSSL+nghttp3 and quiche+boringssl, both built from
-  current git master. Use `LD_DEBUG=files src/curl |& grep need` to figure
-  out which features (libldap-2.4, libssh2) to disable due to conflicts
-  with boringssl.
-  
-  Closes #5359
-
-Marc Hoersken (10 May 2020)
-- tests/server/tftpd.c: fix include and enhance debug logging
-  
-  setjmp.h should only be included if HAVE_SETJMP_H is defined.
-  
-  Add additional log statements to see wether reads and writes
-  are blocking or finishing before an alarm signal is received.
-  
-  Assisted-by: Peter Wu
-  Part of #5364
-
-Daniel Stenberg (10 May 2020)
-- tool_operate: only set CURLOPT_SSL_OPTIONS if SSL support is present
-  
-  Reported-by: Marcel Raad
-  Follow-up to 148534db5
-  Fixes #5367
-  Closes #5369
-
-Marc Hoersken (9 May 2020)
-- appveyor: update comments to be clear about toolchain
-  
-  - CMake-based MSYS builds use mingw-w64 to cross-compile.
-  - autotools-based builds are compiled using msys2-devel.
-  
-  The difference is that the later ones are not cross-compiled
-  to Windows and instead require the msys2 runtime to be present.
-  
-  At the moment only the Azure Pipelines CI builds actually
-  run autotools-based cross-compilation builds for Windows.
-
-- TODO: update regarding missing Schannel features
-  
-  Some aspects have already been implemented over the years.
-  
-  15.1 Client certificates are now supported:
-  
-  - System stores via e35b0256eb34f1fe562e3e2a2615beb50a391c52
-  - PKCS#12 files via 0fdf96512613574591f501d63fe49495ba40e1d5
-  
-  15.2 Ciphers can now be specified through:
-  
-  - Algorithms via 9aefbff30d280c60fc9d8cc3e0b2f19fc70a2f28
-  
-  Reviewed-by: Daniel Stenberg and Marcel Raad
-  Closes #5358
-
-Daniel Stenberg (8 May 2020)
-- checksrc: close the .checksrc file handle when done reading
+  Closes #7073
 
 - RELEASE-NOTES: synced
   
-  And bumped next version to 7.71.0
+  ... and bump to version 7.78.0 for the next planned release.
 
-- [Gilles Vollant brought this change]
-
-  CURLOPT_SSL_OPTIONS: add *_NATIVE_CA to use Windows CA store (with openssl)
+Jay Satiro (15 Jun 2021)
+- docs: Remove outdated curl tool limitation
   
-  Closes #4346
-
-- TODO: native IDN support on macOS
-
-- urlapi: accept :: as a valid IPv6 address
+  - Document that HTTP/2 multiplexing is supported by the curl tool when
+    parallel transfers are used.
   
-  Text 1560 is extended to verify.
+  Supported since 7.66.0 via --parallel, but the doc wasn't updated.
   
-  Reported-by: Pavel Volgarev
-  Fixes #5344
-  Closes #5351
+  Closes https://github.com/curl/curl/pull/7259
 
-- THANKS-filter: Peter Wang
+- http2: Clarify 'Using HTTP2' verbose message
+  
+  - Change phrasing from multi-use to multiplexing since the former may
+    not be as well understood.
+  
+  Before: * Using HTTP2, server supports multi-use
+  
+  After: * Using HTTP2, server supports multiplexing
+  
+  Bug: https://github.com/curl/curl/discussions/7255
+  Reported-by: David Hu
+  
+  Closes https://github.com/curl/curl/pull/7258
 
-- [Peter Wang brought this change]
+Daniel Stenberg (14 Jun 2021)
+- winbuild/README: VC should be set to 6 'or larger'
+  
+  Previously it listed all versions up to 15 (missing 16) but this new
+  phrasing is more open ended.
+  
+  Reported-by: Hugh Macdonald
+  Fixes #7253
+  Closes #7254
 
-  *_sspi: fix bad uses of CURLE_NOT_BUILT_IN
-  
-  Return CURLE_AUTH_ERROR instead of CURLE_NOT_BUILT_IN for other
-  instances of QuerySecurityPackageInfo failing, as in
-  commit 2a81439553286f12cd04a4bdcdf66d8e026d8201.
-  
-  Closes #5355
+- [Jacob Hoffman-Andrews brought this change]
 
-- docs/HTTP3: add qlog to the quiche build instruction
+  rustls: remove native_roots fallback
+  
+  For the commandline tool, we expect to be passed
+  SSL_CONN_CONFIG(CAfile); for library use, the use should pass a set of
+  trusted roots (like in other TLS backends).
+  
+  This also removes a dependency on Security.framework when building on
+  macOS.
+  
+  Closes #7250
 
-- ngtcp2: introduce qlog support
-  
-  If the QLOGDIR environment variable is set, enable qlogging.
-  
-  ... and create Curl_qlogdir() in the new generic vquic/vquic.c file for
-  QUIC functions that are backend independent.
-  
-  Closes #5353
+- [Albin Vass brought this change]
 
-- ntlm_sspi: fix bad use of CURLE_NOT_BUILT_IN
+  travis: remove jobs that have migrated to zuul
   
-  That return code is reserved for build-time conditional code not being
-  present while this was a regular run-time error from a Windows API.
-  
-  Reported-by: wangp on github
-  Fixes #5349
-  Closes #5350
+  Closes #7245
 
-- runtests: show elapsed test time with higher precision (ms)
+- [Mohammed Naser brought this change]
+
+  CI: add jobs using Zuul
+  
+  It also includes a few changes to get the builds going:
+  - Added autoconf to common dependencies
+  - Added automake to common dependencies
+  - Added libtool to common dependencies
+  - Added libssl-dev to common dependencies
+  
+  Co-authored-by: Albin Vass
+  
+  Closes #7245
+
+- netrc: skip 'macdef' definitions
+  
+  Add test 494 to verify
+  
+  Reported-by: Harry Sintonen
+  Fixes #7238
+  Closes #7244
+
+- multi: add scan-build-6 work-around in curl_multi_fdset
+  
+  scan-build-6 otherwise warns, saying: warning: The left operand of '>='
+  is a garbage value otherwise, which is false.
+  
+  Later scan-builds don't claim this on the same code.
+  
+  Closes #7248
+
+- asyn-ares: remove check for 'data' in Curl_resolver_cancel
+  
+  It implied it would survive a NULL in there which it won't. Instead do
+  an assert.
+  
+  Pointed out by scan-build.
+  
+  Closes #7248
+
+- url.c: remove two variable assigns that are never read
+  
+  Pointed out by scan-build
+  
+  Closes #7248
+
+- [Gealber Morales brought this change]
+
+  mqtt: add support for username and password
+  
+  Minor-edits-by: Daniel Stenberg
+  Added test 2200 to 2205
+  
+  Closes #7243
+
+- travis: remove the arm job
+  
+  We do it on circle CI instead
+
+- CI: add .circleci/config.yml
+  
+  Assisted-by: Gabriel Simmer
+  
+  Closes #7239
 
 - RELEASE-NOTES: synced
 
-- http2: simplify and clean up trailer handling
-  
-  Triggered by a crash detected by OSS-Fuzz after the dynbuf introduction in
-  ed35d6590e72. This should make the trailer handling more straight forward and
-  hopefully less error-prone.
-  
-  Deliver the trailer header to the callback already at receive-time. No
-  longer caches the trailers to get delivered at end of stream.
-  
-  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22030
-  Closes #5348
+- runtests: init $VERSION to avoid warnings when using -l
 
-Marc Hoersken (7 May 2020)
-- appveyor: disable test 1139 instead of ignoring it
+- openssl: don't remove session id entry in disassociate
   
-  Spending time on manpage checking makes no sense
-  for these builds due to lacking manpage support.
+  When a connection is disassociated from a transfer, the Session ID entry
+  should remain.
+  
+  Regression since 7f4a9a9 (shipped in libcurl 7.77.0)
+  Reported-by: Gergely Nagy
+  Reported-by: Paul Groke
+  
+  Fixes #7222
+  Closes #7230
 
-- appveyor: disable flaky test 1501 and ignore broken 1056
+- single_transfer: ignore blank --output-dir
   
-  Test 1501 is flaky on Windows CI due to being time sensitive
-  and the testsuite relying on taskkill.exe to check for the
-  existance of processes which can take to much time itself.
+  ... as otherwise it creates a rather unexpected target directory with a
+  leading slash.
   
-  Test 1056 is broken in autotools-based Windows builds due
-  to scope ID support missing in these builds at the moment.
+  Reported-by: Harry Sintonen
+  Fixes #7218
+  Closes #7233
 
-- test613.pl: make tests 613 and 614 work with OpenSSH for Windows
+- tests: update README about servers and port numbers
   
-  OpenSSH for Windows shows group and other/world permissions as *,
-  because those concepts do not exist on Windows. It also does not
-  show the current or parent directory, so we just ignore those.
-  
-  Reviewed-by: Daniel Stenberg
-  Closes #5328
+  Closes #7242
 
-Daniel Stenberg (6 May 2020)
-- runtests: set +x mode again
+- conn_shutdown: if closed during CONNECT cleanup properly
+  
+  Reported-by: Alex Xu
+  Reported-by: Phil E. Taylor
+  
+  Fixes #7236
+  Closes #7237
 
-- libssh2: convert over to use dynbuf
-  
-  In my very basic test that lists sftp://127.0.0.1/tmp/, this patched
-  code makes 161 allocations compared to 194 in git master. A 17%
-  reduction.
-  
-  Closes #5336
+- [Christian Weisgerber brought this change]
 
-- travis: add "qlog" as feature in the quiche build
+  sws: malloc request struct instead of using stack
+  
+  ... 2MB requests is otherwise just too big for some systems.
+  
+  (The allocations are not freed properly.)
+  
+  Bug: https://curl.se/mail/lib-2021-06/0018.html
+  
+  Closes #7235
 
-- quiche: enable qlog output
-  
-  quiche has the potential to log qlog files. To enable this, you must
-  build quiche with the qlog feature enabled `cargo build --features
-  qlog`. curl then passes a file descriptor to quiche, which takes
-  ownership of the file. The FD transfer only works on UNIX.
-  
-  The convention is to enable logging when the QLOGDIR environment is
-  set. This should be a path to a folder where files are written with the
-  naming template <SCID>.qlog.
-  
-  Co-authored-by: Lucas Pardue
-  Replaces #5337
-  Closes #5341
+- [Mark Swaanenburg brought this change]
 
-- urldata.h: remove #define HEADERSIZE, not used anymore
+  lib: don't compare fd to FD_SETSIZE when using poll
   
-  Follow-up to ed35d6590e72c
+  FD_SETSIZE is irrelevant when using poll. So ensuring that the file
+  descriptor is smaller than FD_SETSIZE in VALID_SOCK, can cause
+  multi_wait to ignore perfectly valid file descriptors and simply wait
+  for 1s to avoid hammering the CPU in a busy loop.
+  
+  Fixes #7240
+  Closes #7241
 
-- ngtcp2: convert to dynbuf
-  
-  Closes #5335
+- [zhangxiuhua brought this change]
 
-- connect: make happy eyeballs work for QUIC (again)
+  doh: fix wrong DEBUGASSERT for doh private_data
   
-  Follow-up from dbd16c3e256c6c (regression in 7.70.0)
-  
-  Closes #5334
+  Closes #7227
 
-- connect: add two asserts to clue code analyzers in a little
+- [yb999 brought this change]
 
-- http_proxy: ported to use dynbuf instead of a static size buffer
+  tests: update README.md with a missing single quote
   
-  Removes a 16K static buffer from the easy handle. Simplifies the code.
+  Closes #7231
 
-- dynbuf: introduce internal generic dynamic buffer functions
+- GHA: run all tests for hyper too
   
-  A common set of functions instead of many separate implementations for
-  creating buffers that can grow when appending data to them. Existing
-  functionality has been ported over.
+  As it lists disabled ones in DISABLED now
   
-  In my early basic testing, the total number of allocations seem at
-  roughly the same amount as before, possibly a few less.
-  
-  See docs/DYNBUF.md for a description of the API.
-  
-  Closes #5300
+  Closes #7209
 
-- runtests: remove sleep calls
+- tests/data/DISABLED: add tests not working with hyper
   
-  Remove many one second sleeps that were done *after* each newly started
-  test server already has been verified. They should not have any purpose
-  there.
+  The goal is to remove them all from here over time.
   
-  Closes #5323
+  Closes #7209
 
-- asyn-*: remove support for never-used NULL entry pointers
+- runtests: also find the last test in Makefile.inc
   
-  ... and instead convert those to asserts to make sure they are truly
-  never NULL.
-  
-  Closes #5324
+  Closes #7209
 
-- [Emil Engler brought this change]
+- test3010: work with hyper mode
+  
+  Closes #7209
 
-  doc: Rename VERSIONS to VERSIONS.md as it already has Markdown syntax
+- configure: disable RTSP when hyper is selected
   
-  Closes #5325
+  Makes test 1013 work
+  
+  Closes #7209
 
-Jay Satiro (2 May 2020)
-- asyn-thread: fix cppcheck warning
+- test1594/1595/1596: fix to work in hyper mode
   
-  - Check for NULL entry parameter before attempting to deref entry in
-    Curl_resolver_is_resolved, like is already done in asyn-ares.
-  
-  This is to silence cppcheck which does not seem to understand that
-  asyn-ares and asyn-thread have separate Curl_resolver_is_resolved
-  and those units are mutually exclusive. Prior to this change it warned
-  of a scenario where asyn-thread's Curl_resolver_is_resolved is called
-  with a NULL entry from asyn-ares, but that couldn't happen.
-  
-  Reported-by: rl1987@users.noreply.github.com
-  
-  Fixes https://github.com/curl/curl/issues/5326
+  Closes #7209
 
-- select: fix overflow protection in Curl_socket_check
+- test1438/1457: add HTTP keyword to make hyper mode work
   
-  Follow-up to a96c752 which changed the timeout_ms type from time_t to
-  timediff_t.
-  
-  Ref: https://github.com/curl/curl/pull/5240
-  
-  Closes https://github.com/curl/curl/pull/5286
+  Closes #7209
 
-Marc Hoersken (2 May 2020)
-- sockfilt: make select_ws stop waiting on exit signal event
+- test1340/1341: adjusted for hyper mode
   
-  This makes sure that select_ws behaves similar to real select
-  which stops waiting on a signal handler being triggered.
-  
-  This makes it possible to gracefully stop sockfilt.exe on
-  Windows with taskkill /IM sockfilt.exe (without /F force flag).
-  
-  Reviewed-by: Jay Satiro
-  Part of #5260
+  Closes #7209
 
-- tests/server/util.[ch]: add exit event to stop waiting on Windows
+- test1218: adjusted for hyper mode
   
-  This commit adds a global exit event to the test servers that
-  Windows-specific wait routines can use to get triggered if the
-  program was signaled to be terminated, eg. select_ws in sockfilt.c
-  
-  The exit event will be managed by the signal handling code and is
-  set to not reset automatically to support multiple wait routines.
-  
-  Reviewed-by: Jay Satiro
-  Closes #5260
+  Closes #7209
 
-- tests/server/util.c: fix thread handle not being closed
+- test1216: adjusted for hyper mode
   
-  Reviewed-by: Jay Satiro
-  Part of #5260
+  Closes #7209
 
-- tests/server/util.c: use raise instead of calling signal handler
+- test1230: adjust to work in hyper mode
   
-  Use raise to trigger signal handler instead of calling it
-  directly and causing potential unexpected control flow.
-  
-  Reviewed-by: Jay Satiro
-  Part of #5260
+  Closes #7209
 
-- tests: add support for SSH server variant specific transfer paths
+- c-hyper: abort CONNECT response reading early on non 2xx responses
   
-  OpenSSH for Windows requires paths in the format of /C:/
-  instead of the pseudo-POSIX paths /cygdrive/c/ or just /c/
+  Fixes test 493
   
-  Reviewed-by: Daniel Stenberg
-  Closes #5298
+  Closes #7209
 
-Daniel Stenberg (2 May 2020)
+- test434: add HTTP keyword
+  
+  Closes #7209
+
+- test599: adjusted to work in hyper mode
+  
+  Closes #7209
+
+- c-hyper: fix the uploaded field in progress callbacks
+  
+  Makes test 578 work
+  
+  Closes #7209
+
+- test566: adjust to work with hyper mode
+  
+  Closes #7209
+
+- [Fawad Mirza brought this change]
+
+  CURLOPT_WRITEFUNCTION.3: minor update of the example
+  
+  Safely avoid chunk.size garbage value if declared non globally.
+  
+  Closes #7219
+
+- [Bastian Krause brought this change]
+
+  configure: rename get-easy-option configure option to get-easy-options
+  
+  "get-easy-options" is the configure option advertised by the help text
+  anyway, so use that.
+  
+  Fixes #7211
+  Closes #7213
+  
+  Follow-up to ad691b191 ("configure: added --disable-get-easy-options")
+  Suggested-by: Daniel Stenberg <daniel@haxx.se>
+  Signed-off-by: Bastian Krause <bst@pengutronix.de>
+
+- runtests: skip disabled tests unless -f is used
+  
+  To make it easier to write ranges like '115 to 229' without that
+  explicitly enabling tests that are listed in DISABLED, this makes
+  runtests always skip disabled tests unless the -f command line option is
+  used.
+  
+  Previously the code attempted to not run such tests, but didn't do it
+  correctly.
+  
+  Closes #7212
+
+- [Jun-ya Kato brought this change]
+
+  ngtcp2: disable TLSv1.3 compatible mode when using GnuTLS
+  
+  The latest GnuTLS-3.7.2 implements disable switch for TLSv1.3 compatible
+  mode for middle box but it is enabled by default, which is unnecessary
+  for QUIC.
+  
+  Fixes #6896
+  Closes #7202
+
+- test644: remove as duplicate of test 587
+  
+  Closes #7208
+
+Daniel Gustafsson (8 Jun 2021)
 - RELEASE-NOTES: synced
 
-- libssh2: set the expected total size in SCP upload init
+- cookies: track expiration in jar to optimize removals
   
-  ... as otherwise the progress callback gets called without that
-  information, making the progress meter have less info.
+  Removing expired cookies needs to be a fast operation since we want to
+  be able to perform it often and speculatively. By tracking the timestamp
+  of the next known expiration we can exit early in case the timestamp is
+  in the future.
   
-  Reported-by: Murugan Balraj
-  Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html
-  Closes #5317
+  Closes: #7172
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
 
-- runtests: make the logmsg from the ssh server only show in verbose
+Daniel Stenberg (7 Jun 2021)
+- GHA: add several libcurl tests to the hyper job
+  
+  500 to 512
 
-- tests: make test 1248 + 1249 use %NOLISTENPORT
-  
-  ... instead of a port of a non-running server so that it works
-  stand-alone.
-  
-  Closes #5318
+- test500: adjust to work with hyper mode
 
-- examples: remove asiohiper.cpp
+- c-hyper: support CURLINFO_STARTTRANSFER_TIME
   
-  This example has repeatedly been reported to contain bugs, and as users
-  copy and paste code from this into production, I now deem it better to
-  not provide the example at all.
-  
-  Closes #5090
-  Closes #5322
+  Closes #7204
 
-- [Emil Engler brought this change]
+- c-hyper: support CURLOPT_HEADER
+  
+  When enabled, the headers are passed to the body write callback as well.
+  
+  Like in test 500
+  
+  Closes #7204
 
-  doc: add missing closing parenthesis in CURLINFO_SSL_VERIFYRESULT.3
+- GHA: run the newly fixed tests with hyper
   
-  Closes #5320
+  Closes #7205
 
-- [Emil Engler brought this change]
+- test433: adjust for hyper mode
+  
+  Closes #7205
 
-  KNOWN_BUGS: Remove "curl --upload-file . hang if delay in STDIN"
+- test395: hyper cannot work around > 64 bit content-lengths like built-in
   
-  It was fixed in 9a2cbf3
-  
-  Closes #5319
+  Closes #7205
 
-- cirrus: disable SFTP and SCP tests
+- test394: hyper returns a different error
   
-  ... as we can't seem to start the sshd server on it. Those problems
-  existed before d1239b50bececd (running the SSH server on a random port),
-  but they're more noticable now since there are more failed attempts in
-  the logs.
-  
-  Closes #5315
+  Closes #7205
 
-- [Emil Engler brought this change]
+- test393: make Content-Length fit within 64 bit for hyper
+  
+  Closes #7205
 
-  runtests: fix typo in the existence of disabled tests checker
+- test347: CRLFify to work in hyper mode
   
-  Closes #5316
+  Closes #7205
 
-Dan Fandrich (30 Apr 2020)
-- test75: Remove precheck test
+- test339: CRLFify better to work in hyper mode
   
-  This has not been needed since commit 9fa42bed and often prevents it
-  from running at all with dynamic test ports.
+  Closes #7205
 
-- tests: Stop referring to server ports when they're not used
-  
-  Several tests referred to specific server ports even when the test
-  didn't actually use that server or specify that it's needed. In such
-  cases, the test harness substitutes the text "[not running]" as the port
-  number which causes many such tests to fail due to the inability to
-  parse the URL.  These tests are changed to use %NOLISTENPORT which will
-  always be substituted correctly.
+- travis: remove the hyper build
 
-Daniel Stenberg (30 Apr 2020)
-- [Emil Engler brought this change]
+- GHA: add a linux-hyper job
+  
+  Closes #7206
 
-  GnuTLS: Backend support for CURLINFO_SSL_VERIFYRESULT
+- test328: avoid a header-looking body to make hyper mode work
   
-  Closes #5287
+  The test still works the same, just modified two bytes in the content.
+  
+  Closes #7203
 
-- conncache: various concept cleanups
-  
-  More connection cache accesses are protected by locks.
-  
-  CONNCACHE_* is a beter prefix for the connection cache lock macros.
-  
-  Curl_attach_connnection: now called as soon as there's a connection
-  struct available and before the connection is added to the connection
-  cache.
-  
-  Curl_disconnect: now assumes that the connection is already removed from
-  the connection cache.
-  
-  Ref: #4915
-  Closes #5009
+- release-notes.pl: also spot common 'closes' typo
 
-- tests: tests: run stunnel for HTTPS and FTPS on dynamic ports
+- metalink: remove
   
-  As stunnel is an external tool and it has no specific option to export
-  the actually used port number when asked to listen to 0, runtests
-  instead iterates over ten randomly picked high number ports and sticks
-  to the first one stunnel can listen to.
+  Warning: this will make existing curl command lines that use metalink to
+  stop working.
   
-  Closes #5267
+  Reasons for removal:
+  
+  1. We've found several security problems and issues involving the
+     metalink support in curl. The issues are not detailed here. When
+     working on those, it become apparent to the team that several of the
+     problems are due to the system design, metalink library API and what
+     the metalink RFC says. They are very hard to fix on the curl side
+     only.
+  
+  2. The metalink usage with curl was only very briefly documented and was
+     not following the "normal" curl usage pattern in several ways, making
+     it surprising and non-intuitive which could lead to further security
+     issues.
+  
+  3. The metalink library was last updated 6 years ago and wasn't so
+     active the years before that either. An unmaintained library means
+     there's a security problem waiting to happen. This is probably reason
+     enough.
+  
+  4. Metalink requires an XML parsing library, which is complex code (even
+     the smaller alternatives) and to this day often gets security
+     updates.
+  
+  5. Metalink is not a widely used curl feature. In the 2020 curl user
+     survey, only 1.4% of the responders said that they'd are using it. In
+     2021 that number was 1.2%. Searching the web also show very few
+     traces of it being used, even with other tools.
+  
+  6. The torrent format and associated technology clearly won for
+     downloading large files from multiple sources in parallel.
+  
+  Cloes #7176
 
-- tests: pick a random port number for SSH
+- docs/INSTALL: remove mentions of configure --with-darwin-ssl
   
-  Since sshd doesn't have such an option by itself, we iterate over a
-  series of random ports until one works.
+  ... as it isn't supported since a while back.
   
-  Closes #5273
-
-- [Rikard Falkeborn brought this change]
-
-  libtest/cmake: Remove commented code
+  Make configure fail with a warning if used.
   
-  These were commented out in e9dd0998706a when Makefile.inc was included
-  instead. 11 years have passed since then and the commented code is of
-  course very outdated. Remove it to avoid confusion.
-  
-  Closes #5311
-
-- schannel: source code reindent
-  
-  White space edits only. Conform better to standard curl source code
-  indenting style.
-  
-  Closes #5305
-
-Kamil Dudka (29 Apr 2020)
-- test1177: look for curl.h in source directory
-  
-  If we use a separate build directory, there is no copy of the header.
-  
-  Closes #5310
-
-- tests: look for preprocessed tests in build directory
-  
-  ... which is not always the same directory as source directory
-  
-  Closes #5310
-
-Daniel Stenberg (29 Apr 2020)
-- RELEASE-NOTES: synced
-  
-  ... and bumped curlver.h to 7.70.1
-
-Version 7.70.0 (29 Apr 2020)
-
-Daniel Stenberg (29 Apr 2020)
-- RELEASE-NOTES: 7.70.0
-
-- THANKS: synced with the 7.70.0 release
-
-- headers: copyright range fix
-
-- [Rikard Falkeborn brought this change]
-
-  doh: Constify some input pointers
-  
-  Closes #5306
-
-- nss: check for PK11_CreateDigestContext() returning NULL
-  
-  ... to avoid crashes!
-  
-  Reported-by: Hao Wu
-  Fixes #5302
-  Closes #5303
-
-- travis: bump the wolfssl CI build to use 4.4.0
-  
-  Closes #5301
-
-- copyright updates: adjust year ranges
-
-Marc Hoersken (26 Apr 2020)
-- CI: do not include */ci branches in PR builds
-  
-  Align Azure Pipelines with GitHub Actions.
-
-Daniel Stenberg (25 Apr 2020)
-- runtests: check for the disabled tests relative srcdir
-  
-  To make it work correctly for out-of-tree builds.
-  
-  Follow-up to 75e8feb6fb08b
-  
-  Bug: https://github.com/curl/curl/pull/5288#issuecomment-619346389
-  Reported-by: Marcel Raad
-  Closes #5297
-
-- runtests: revert commenting out a line I did for debugging
-  
-  Follow-up to 11091cd4d. It was not meant to be pushed!
-
-- smtp: set auth correctly
-  
-  Regression since 7.69.0 and 68fb25fa3fcff.
-  
-  The code wrongly assigned 'from' instead of 'auth' which probably was a
-  copy and paste mistake from other code, leading to that auth could
-  remain NULL and later cause an error to be returned.
-  
-  Assisted-by: Eric Sauvageau
-  Fixes #5294
-  Closes #5295
-
-Marcel Raad (25 Apr 2020)
-- lib: clean up whitespace
-  
-  This fixes CodeFactor warnings.
-
-Daniel Stenberg (25 Apr 2020)
-- [Anderson Toshiyuki Sasaki brought this change]
-
-  libssh: avoid options override by configuration files
-  
-  Previously, options set explicitly through command line options could be
-  overridden by the configuration files parsed automatically when
-  ssh_connect() was called.
-  
-  By calling ssh_options_parse_config() explicitly, the configuration
-  files are parsed before setting the options, avoiding the options
-  override.  Once the configuration files are parsed, the automatic
-  configuration parsing is not executed.
-  
-  Fixes #4972
-  Closes #5283
-  Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
-
-- runtests: when <killserver> mentions http, kill http/2 too
-  
-  Since the http2 test server is a mere proxy that needs to know about the
-  dynamic port the HTTP server is using, it too needs to get restarted
-  when the http server is killed.
-  
-  A regression caused by 80d6515.
-  
-  Fixes #5289
-  Closes #5291
-
-- [Yuri Slobodyanyuk brought this change]
-
-  docs: fix two typos
-  
-  Closes #5292
-
-- [Emil Engler brought this change]
-
-  tests/git: ignore mqttd and port files
-  
-  Closes #5290
-
-- tests: make runtests check that disabled tests exists
-  
-  ... and error out if so. Removed '536' from DISABLED as there is no such
-  test file.
-  
-  Closes #5288
-
-- test1154: set a proper name
-
-- select: make Curl_socket_check take timediff_t timeout
-  
-  Coverity found CID 1461718:
-  
-  Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms >
-  9223372036854775807L" is always false regardless of the values of its
-  operands. This occurs as the logical second operand of "||".
-  
-  Closes #5240
-
-- [i-ky brought this change]
-
-  libcurl-multi.3: added missing full stop
-  
-  Closes #5285
-
-Jay Satiro (22 Apr 2020)
-- transfer: Switch PUT to GET/HEAD on 303 redirect
-  
-  Prior to this change if there was a 303 reply to a PUT request then
-  the subsequent request to respond to that redirect would also be a PUT.
-  It was determined that was most likely incorrect based on the language
-  of the RFCs. Basically 303 means "see other" resource, which implies it
-  is most likely not the same resource, therefore we should not try to PUT
-  to that different resource.
-  
-  Refer to the discussions in #5237 and #5248 for more information.
-  
-  Fixes https://github.com/curl/curl/issues/5237
-  Closes https://github.com/curl/curl/pull/5248
-
-Daniel Stenberg (22 Apr 2020)
-- lib/mk-ca-bundle: skip empty certs
-  
-  Reviewed-by: Emil Engler
-  Reported-by: Ashwin Metpalli
-  Fixes #5278
-  Closes #5280
-
-- version: skip idn2_check_version() check and add precaution
-  
-  A gcc-10's -fanalyze complaint made me spot and do these improvements.
-  
-  Closes #5281
+  Reported-by: Vadim Grinshpun
+  Bug: https://curl.se/mail/lib-2021-06/0008.html
+  Closes #7200
 
 - RELEASE-NOTES: synced
 
-- [Brian Bergeron brought this change]
+- [Gregor Jasny brought this change]
 
-  curl.h: update comment typo
+  cmake: Avoid leaking absolute paths into exported config
   
-  "routines with be invoked" -> "routines will be invoked"
+  The `find_libarary` command resolves the library or framework
+  into an absolute path. In case of system frameworks which are
+  located within an Xcode-provided SDK this results in the Xcode
+  path and SDK version being part of the library path.
   
-  Closes #5279
-
-- [Emil Engler brought this change]
-
-  GnuTLS: Don't skip really long certificate fields
+  Because those library paths end up in the exported CMake config
+  importing curl will fail once the Xcode location or SDK version
+  changes:
   
-  Closes #5271
-
-- gnutls: bump lowest supported version to 3.1.10
+  ```cmake
+  set_target_properties(CURL::libcurl PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
+    INTERFACE_LINK_LIBRARIES "lber;ldap;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/SystemConfiguration.framework;OpenSSL::SSL;OpenSSL::Crypto;ZLIB::ZLIB"
+  )
+  ```
   
-  GnuTLS 3.1.10 added new functions we want to use. That version was
-  released on Mar 22, 2013. Removing support for older versions also
-  greatly simplifies the code.
+  A work-around is to link against system-level frameworks with
+  `-framework XYZ`. In case of `SystemConfiguration` we might be able
+  to omit the lookup-check because we could assume the framework is
+  always present.
   
-  Ref: #5271
-  Closes #5276
+  Closes #7152
 
-- mqtt: make NOSTATE get within the debug name array
+- [Shikha Sharma brought this change]
 
-- tests: run the RTSP test server on a dynamic port number
+  http2_connisdead: handle trailing GOAWAY better
   
-  To avoid port collisions.
+  When checking the connection the input processing returns error
+  immediately, we now consider that a dead connnection.
   
-  Closes #5272
+  Bug: https://curl.se/mail/lib-2021-06/0001.html
+  Closes #7192
 
-- tests: add %NOLISTENPORT and use it
-  
-  The purpose with this variable is to provide a port number that is
-  reasonably likely to not have a listener on the local host so that tests
-  can try connect failures against it. It uses port 47 - "reserved"
-  according to IANA.
-  
-  Updated six tests to use it instead of the previous different ports.
-  
-  Assisted-by: Emil Engler
-  Closes #5270
+- [Dmitry Karpov brought this change]
 
-- mqtt: remove code with no purpose
+  ares: always store IPv6 addresses first
   
-  Detected by Coverity. CID 1462319.
+  Trying dual-stack on some embedded platform, I noticed that quite
+  frequently (20%) libCurl starts from IPv4 regardless the Happy Eyeballs
+  timeout value.  After debugging this issue, I noticed that this happens
+  if c-ares resolver response for IPv6 family comes before IPv4 (which was
+  randomly happening in my tests).
   
-  "The same code is executed when the condition result is true or false,
-  because the code in the if-then branch and after the if statement is
-  identical."
+  In such cases, because libCurl puts the last resolver response on top of
+  the address list, when IPv4 resolver response comes after IPv6 one - the
+  IPv4 family starts the connection phase instead of IPv6 family.
   
-  Closes #5275
-
-- mqtt: fix Curl_read()  error handling while reading remaining length
+  The solution for this issue is to always put IPv6 addresses on top of
+  the address list, regardless the order of resolver responses.
   
-  Detected by Coverity. CID 1462320.
+  Bug: https://curl.se/mail/lib-2021-06/0003.html
   
-  Closes #5274
+  Closes #7188
 
-- server/tftpd: fix compiler warning
-  
-  Follow-up from 369ce38ac1d
-  Reported-by: Marc Hörsken
-
-- http: free memory when Alt-Used header creation fails due to OOM
+- Revert "Revert "socketpair: fix potential hangs""
   
-  Reported-by: James Fuller
-  Fixes #5268
-  Closes #5269
-
-Daniel Gustafsson (20 Apr 2020)
-- lib: fix typos in comments and errormessages
+  This reverts commit 3e70c3430a370a31eff2c1d8fea29edaca8f1127.
   
-  This fixes a few randomly spotted typos in recently merged code, most
-  notably one in a userfacing errormessage the schannel code.
-
-Daniel Stenberg (20 Apr 2020)
-- tests: run the SOCKS test server on a dynamic port number
+  Thus brings back the change from #7144 as was originally landed in
+  c769d1eab4de8b
   
-  Closes #5266
+  Closes #7144 (again)
 
-- [Johannes Schindelin brought this change]
+- [Ebe Janchivdorj brought this change]
 
-  multi-ssl: reset the SSL backend on `Curl_global_cleanup()`
-  
-  When cURL is compiled with support for multiple SSL backends, it is
-  possible to configure an SSL backend via `curl_global_sslset()`, but
-  only *before* `curl_global_init()` was called.
-  
-  If another SSL backend should be used after that, a user might be
-  tempted to call `curl_global_cleanup()` to start over. However, we did
-  not foresee that use case and forgot to reset the SSL backend in that
-  cleanup.
-  
-  Let's allow that use case.
+  schannel: move code out of SChannel_connect_step1
   
-  Fixes #5255
-  Closes #5257
-  Reported-by: davidedec on github
-  Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
+  Reviewed-by: Marc Hoersken
+  Closes #7168
 
-- tests: run the TFTP test server on a dynamic port number
-  
-  Picking a dynamic unused port is better than a fixed to avoid the
-  collision risk.
-  
-  Closes #5265
-
-- mqtt: improve the state machine
-  
-  To handle PUBLISH before SUBACK and more.
-  
-  Updated the existing tests and added three new ones.
+- tests/data/Makefile.inc: error: trailing backslash on last line
   
-  Reported-by: Christoph Krey
-  Bug: https://curl.haxx.se/mail/lib-2020-04/0021.html
-  Closes #5246
+  Follow-up to d8dcb399b8009d
 
-- runtests: always put test number in servercmd file
+- TODO: Support rate-limiting for MQTT
 
-- RELEASE-NOTES: synced
+- [Dmitry Kostjuchenko brought this change]
 
-- release-notes.pl: fix parsing typo
-
-James Fuller (20 Apr 2020)
-- ensure all references to ports are replaced by vars
-
-- add more alt-svc test coverage
-
-Daniel Stenberg (20 Apr 2020)
-- test1247: use http server to get the port number set
-  
-  Follow-up to 0f5db7b263f
-
-- runtests: use a unix domain socket path with the pid in the name
+  warnless: simplify type size handling
   
-  To make it impossible for test cases to access the file name without
-  using the proper variable for the purpose.
+  By using sizeof(T), existing defines and relying on the compiler to
+  define the required signed/unsigned mask.
   
-  Closes #5264
+  Closes #7181
 
-Daniel Gustafsson (19 Apr 2020)
-- [Mipsters on github brought this change]
-
-  src: Remove C99 constructs to ensure C89 compliance
-  
-  This fixes the error: 'for' loop initial declaration used outside C99
-  mode by declaring the loop increment variable in the beginning of the
-  block instead of inside the for loop.
-  
-  Fixes #5254
-  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
-
-Daniel Stenberg (19 Apr 2020)
-- runtests: dummy init the ports variables to avoid warnings
+Gisle Vanem (4 Jun 2021)
+- [Win32] Fix for USE_WATT32
   
-  ... and generate something that can help debug test cases.
+  My Watt-32 tcp/ip stack works on Windows but it does not have `WSAIoctl()`
 
-- [Patrick Monnerat brought this change]
+Daniel Stenberg (4 Jun 2021)
+- [Alexis Vachette brought this change]
 
-  mime: properly check Content-Type even if it has parameters
+  url: bad CURLOPT_CONNECT_TO syntax now returns error
   
-  New test 669 checks this fix is effective.
+  Added test 3020 to verify
   
-  Fixes #5256
-  Closes #5258
-  Reported-by: thanhchungbtc on github
+  Closes #7183
 
-- tests/FILEFORMAT: converted to markdown and extended
+- github: remove the cmake macOS gcc-8 jobs
   
-  Closes #5261
-
-- test1245: make it work with dynamic FTP server port
-
-- test1055: make it work with dynamic FTP port
-
-- test1028: make it run on dynamic FTP server port
-
-- tests: move pingpong server to dynamic listening port
-  
-  FTP, IMAP, POP3, SMTP and their IPv6 versions are now all on dynamic
-  ports
+  They're too similar to the gcc-9 ones to be useful (and seems to not
+  work anymore).
   
-  Test 842-845 are unfortunately a bit hard to move over to this concept
-  right now and require "default port" still...
+  Closes #7187
 
-- test1056: work with dynamic HTTP ipv6 port
-
-- test1448: work with dynamic HTTP server port
-
-- tests: introduce preprocessed test cases
-  
-  The runtests script now always performs variable replacement on the
-  entire test source file before the test gets executed, and saves the
-  updated version in a temporary file (log/test[num]) so that all test
-  case readers/servers can use that version (if present) and thus enjoy
-  the powers of test case variable substitution.
+- test269: disable for hyper
   
-  This is necessary to allow complete port number freedom.
+  --ignore-content-length / CURLOPT_IGNORE_CONTENT_LENGTH doesn't work
+  with hyper.
   
-  Test 309 is updated to work with a non-fixed port number thanks to this.
-
-- tests: make 2006-2010 handle different port number lengths
+  Closes #7184
 
-- tests: run the sws server on "any port"
+- runtests: enable 'hyper mode' only for HTTP tests
   
-  Makes the test servers for HTTP and Gopher pop up on a currently unused
-  port and runtests adapts to that!
-  
-  Closes #5247
-
-Marc Hoersken (18 Apr 2020)
-- sockfilt: tidy variable naming and data structure in select_ws
+  The 'hyper mode' makes line-ending checks work in the test suite for
+  when hyper is used. Now it also requires that HTTP or HTTPS are
+  mentioned as keywords to be enabled so that it doesn't wrongly adjusts
+  tests for other protocols.
   
-  This commit does not introduce any logical changes to the code.
+  This makes test 271 (TFTP) work again in hyper enabled builds.
   
-  Reviewed-by: Jay Satiro and Marcel Raad
-  Closes #5238
+  Closes #7185
 
-Daniel Stenberg (17 Apr 2020)
-- [Anderson Toshiyuki Sasaki brought this change]
+- [Alexis Vachette brought this change]
 
-  libssh: Use new ECDSA key types to check known hosts
+  hostip: bad CURLOPT_RESOLVE syntax now returns error
   
-  From libssh 0.9.0, ssh_key_type() returns different key types for ECDSA
-  keys depending on the curve.
-  
-  Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
-  Fixes #5252
-  Closes #5253
-
-Marcel Raad (17 Apr 2020)
-- appveyor: add Unicode winbuild jobs
-  
-  These are cheap as they don't build tests.
-  
-  Closes https://github.com/curl/curl/pull/5063
+  Added test 3019
+  Fixes #7170
+  Closes #7174
 
-Daniel Stenberg (16 Apr 2020)
-- mqttd: s/errno/SOCKERRNO
+Daniel Gustafsson (3 Jun 2021)
+- cookies: fix typo and expand comment
   
-  To behave proper on Windows
-  Reported-by: Gisle Vanem
-  Bug: https://github.com/curl/curl/commit/5e855bbd18f84a02c951be7cac6188276818cdac#r38507132
-  Closes #5241
+  Fix a typo in the sorting comment, and while in there elaborate slightly
+  on why creationtime can be used as a tiebreaker.
 
-- buildconf: use find -execdir instead, remove -print and the ares files
+- cookies: remove unused header
   
-  Follow-up to 1e41bec96a6e
+  Commit 1c1d9f1affbd3367bcb24062e261d0ea5d185e3a removed the last use
+  for the inet_pton.h headerfile, this removes the inclusion of the
+  header.
   
-  Suggested-by: Marc Hörsken
-
-- [Alexander V. Tikhonov brought this change]
+  Closes: #7182
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
 
-  buildconf: avoid using tempfile when removing files
+Daniel Stenberg (3 Jun 2021)
+- Revert "socketpair: fix potential hangs"
   
-  Closes #5213
-
-- copyright: bump the copyright year range
-
-- scripts/release-notes.pl: accept colon after the Fixes/Closes keywords
-
-- [JP Mens brought this change]
-
-  docs/MQTT: replace confusing 80 by 75
+  This reverts commit c769d1eab4de8b9f1bd84d992c63692fdc43c5be.
   
-  I was a bit surprised by the `80`: first thought: what's HTTP doing
-  here? ;)
-  
-  Closes #5236
+  See #7144 for details
 
-- [Brad King brought this change]
+- [Paul Groke brought this change]
 
-  cmake: Avoid MSVC C4273 warnings in send/recv checks
+  socketpair: fix potential hangs
   
-  We use `check_c_source_compiles` to check possible send/recv signatures
-  by reproducing the forward declarations from system headers.  On Windows
-  the `winsock2.h` header adds dll linkage settings to its forward
-  declaration.  If ours does not match the compiler warns:
+  Fixes potential hang in accept by using select + non-blocking accept.
   
-      warning C4273: 'recv': inconsistent dll linkage
+  Fixes potential hang in peer check by replacing the send/recv check with
+  a getsockname/getpeername check.
   
-  Add `WINSOCK_API_LINKAGE` to our test signatures when it is defined so
-  that our linkage is consistent with that from `winsock2.h`.
+  Adds length check for returned sockaddr data.
   
-  Fixes #4764
-  Closes #5232
+  Closes #7144
 
-Jay Satiro (14 Apr 2020)
-- KNOWN_BUGS: Add entry 'Blocking socket operations'
+- runtests: parse data/Makefile.inc instead of using make
   
-  - Add threaded resolver cleanup and GSSAPI for FTP to the TODO list of
-    known blocking operations.
+  The warning about missing entries in that file then doesn't require that
+  the Makefile has been regenerated which was confusing.
   
-  - New known bugs entry 'Blocking socket operations in non-blocking API'
-    that directs to the TODO's list of known blocking operations.
+  The scan for the test num is a little more error prone than before
+  (since now it doesn't actually verify that it is legitimate Makefile
+  syntax), but I think it is good enough.
   
-  Ref: https://github.com/curl/curl/pull/5214#issuecomment-612488021
-  
-  Reported-by: Marc Hoersken
-  
-  Closes https://github.com/curl/curl/pull/5216
-
-Marc Hoersken (14 Apr 2020)
-- test2043: use revoked.badssl.com instead of revoked.grc.com
-  
-  The certificate of revoked.grc.com has expired on 2020-04-13.
-  
-  Reviewed-by: Jay Satiro
-  
-  Closes #5233
-
-- sockfilt: fix broken pipe on Windows to be ready in select_ws
-  
-  Closes #5228
-
-Daniel Stenberg (14 Apr 2020)
-- RELEASE-NOTES: synced
-
-- scripts/release-notes: fix duplicate output header
-
-- github/workflow: enable MQTT in the macOS debug build
-
-- azure: add mqtt support to one of the Windows builds
-
-- travis: add mqtt job on Linux
-
-- tests: add four MQTT tests 1190 - 1193
-
-- tests: add the mqtt test server mqttd
-
-- tests: support hex encoded data and mqtt server
-  
-  The mqtt server is started using a "random" port.
-
-- [Björn Stenberg brought this change]
-
-  mqtt: add new experimental protocol
-  
-  Closes #5173
-
-- TODO: Consider convenience options for JSON and XML?
-  
-  Closes #5203
-
-- tool: do not declare functions with Curl_ prefix
-  
-  To avoid collision risks with private libcurl symbols when linked with
-  static versions (or just versions not hiding internal symbols).
-  
-  Reported-by: hydra3333 on github
-  Fixes #5219
-  Closes #5234
-
-- [Nathaniel R. Lewis brought this change]
-
-  cmake: add aliases so exported target names are available in tree
-  
-  Reviewed-by: Brad King
-  Closes #5206
-
-- version: increase buffer space for ssl version output
-  
-  To avoid it getting truncated, especially when several SSL backends are
-  built-in.
-  
-  Reported-by: Gisle Vanem
-  Fixes #5222
-  Closes #5226
-
-Marc Hoersken (13 Apr 2020)
-- cirrus: no longer ignore test 504 which is working again
-  
-  The test is working again, because TCP blackholing is disabled.
-
-- appveyor: completely disable tests that fail to timeout early
-  
-  The tests changed from ignored to disabled are tests that are
-  about connecting to non-listening socket. On AppVeyor these
-  tests are not reliable, because for some unknown reason the
-  connect is not timing out before the test time limit is reached.
-
-Daniel Stenberg (13 Apr 2020)
-- test1908: avoid using fixed port number in test data
-  
-  Closes #5225
-
-Jay Satiro (12 Apr 2020)
-- [Andrew Kurushin brought this change]
-
-  schannel: Fix blocking timeout logic
-  
-  - Fix schannel_send for the case when no timeout was set.
-  
-  Prior to this change schannel would error if the socket was not ready
-  to send data and no timeout was set.
-  
-  This commit is similar to parent commit 89dc6e0 which recently made the
-  same change for SOCKS, for the same reason. Basically it was not well
-  understood that when Curl_timeleft returns 0 it is not a timeout of 0 ms
-  but actually means no timeout.
-  
-  Fixes https://github.com/curl/curl/issues/5177
-  Closes https://github.com/curl/curl/pull/5221
-
-- socks: Fix blocking timeout logic
-  
-  - Document in Curl_timeleft's comment block that returning 0 signals no
-    timeout (ie there's infinite time left).
-  
-  - Fix SOCKS' Curl_blockread_all for the case when no timeout was set.
-  
-  Prior to this change if the timeout had a value of 0 and that was passed
-  to SOCKET_READABLE it would return right away instead of blocking. That
-  was likely because it was not well understood that when Curl_timeleft
-  returns 0 it is not a timeout of 0 ms but actually means no timeout.
-  
-  Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360
-  
-  Closes https://github.com/curl/curl/pull/5220
-
-- [Marc Hoersken brought this change]
-
-  gopher: check remaining time left during write busy loop
-  
-  Prior to this change gopher's blocking code would block forever,
-  ignoring any set timeout value.
-  
-  Assisted-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  
-  Similar to #5220 and #5221
-  Closes #5214
-
-Daniel Stenberg (13 Apr 2020)
-- [Dirkjan Bussink brought this change]
-
-  gnutls: ensure TLS 1.3 when SRP isn't requested
-  
-  When SRP is requested in the priority string, GnuTLS will disable
-  support for TLS 1.3. Before this change, curl would always add +SRP to
-  the priority list, effectively always disabling TLS 1.3 support.
-  
-  With this change, +SRP is only added to the priority list when SRP
-  authentication is also requested. This also allows updating the error
-  handling here to not have to retry without SRP. This is because SRP is
-  only added when requested and in that case a retry is not needed.
-  
-  Closes #5223
-
-Marc Hoersken (12 Apr 2020)
-- tests/server: add hidden window to gracefully handle WM_CLOSE
-  
-  Forward Window events as signals to existing signal event handler.
-
-- tests/server: add CTRL event handler for Win32 consoles
-  
-  Forward CTRL events as signals to existing signal event handler.
-
-- tests/server: move all signal handling routines to util.[ch]
-  
-  Avoid code duplication to prepare for portability enhancements.
-
-Daniel Stenberg (12 Apr 2020)
-- compressed.d: stress that the headers are not modified
-  
-  Suggested-by: Michael Osipov
-  Assisted-by: Jay Satiro
-  Bug: https://github.com/curl/curl/issues/5182#issuecomment-611638008
-  Closes #5217
-
-Marc Hoersken (11 Apr 2020)
-- tests/server/util.c: use curl_off_t instead of long for pid
-  
-  Avoid potential overflow of huge PIDs on Windows.
-  
-  Related to #5188
-  Assisted-by: Marcel Raad
-
-- tests: use Cygwin/msys PIDs for stunnel and sshd on Windows
-  
-  Since the Windows versions of both programs would write Windows
-  PIDs to their pidfiles which we cannot handle, we need to use
-  our known perl.exe Cygwin/msys PID together with exec() in order
-  to tie the spawned processes to the existance of our perl.exe
-  
-  The perl.exe that is executing secureserver.pl and sshserver.pl
-  has a Cygwin/msys PID, because it is started inside Cygwin/msys.
-  
-  Related to #5188
-
-- tests: add Windows compatible pidwait like pidkill and pidterm
-  
-  Related to #5188
-
-- tests: fix conflict between Cygwin/msys and Windows PIDs
-  
-  Add 65536 to Windows PIDs to allow Windows specific treatment
-  by having disjunct ranges for Cygwin/msys and Windows PIDs.
-  
-  See also:
-  - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵
-    h=b5e1003722cb14235c4f166be72c09acdffc62ea
-  - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵
-    h=448cf5aa4b429d5a9cebf92a0da4ab4b5b6d23fe
-  
-  Replaces #5178
-  Closes #5188
-
-Daniel Stenberg (11 Apr 2020)
-- RELEASE-NOTES: synced
-
-- release-notes.pl: detect the start of the references in cleanup mode
-
-- Revert "file: on Windows, refuse paths that start with \\"
-  
-  This reverts commit 1b71bc532bde8621fd3260843f8197182a467ff2.
-  
-  Reminded-by: Chris Roberts
-  Bug: https://curl.haxx.se/mail/archive-2020-04/0013.html
-  
-  Closes #5215
-
-Jay Satiro (11 Apr 2020)
-- lib: fix conversion warnings for SOCKET_WRITABLE/READABLE
-  
-  - If loss of data may occur converting a timediff_t to time_t and
-    the time value is > TIME_T_MAX then treat it as TIME_T_MAX.
-  
-  This is a follow-up to 8843678 which removed the (time_t) typecast
-  from the macros so that conversion warnings could be identified.
-  
-  Closes https://github.com/curl/curl/pull/5199
-
-- test1148: tolerate progress updates better (again)
-  
-  - Ignore intermediate progress updates.
-  
-  - Support locales that use a character other than period as decimal
-    separator (eg 100,0%).
-  
-  test1148 checks that the progress finishes at 100% and has the right
-  bar width. Prior to this change the test assumed that the only progress
-  reported for such a quick transfer was 100%, however in rare instances
-  (like in the CI where transfer time can slow considerably) there may be
-  intermediate updates. For example, below is stderrlog1148 from a failed
-  CI run with explicit \r and \n added (it is one line; broken up so that
-  it's easier to understand).
-  
-  \r
-  \r##################################                                        48.3%
-  \r######################################################################## 100.0%
-  \n
-  
-  Closes https://github.com/curl/curl/pull/5194
-
-Marc Hoersken (10 Apr 2020)
-- sshserver.pl: use cached Win32 environment check variable
-
-- appveyor: partially revert 3413a110 to keep build without proxy
-  
-  Ref: #5211 and #4526
-  Reported-by: Marcel Raad
-
-- appveyor: ignore failing 'connect to non-listening proxy' tests
-  
-  Closes #5211
-
-- CI/macos: convert CRLF to LF and align indentation
-
-Daniel Stenberg (9 Apr 2020)
-- url: allow non-HTTPS altsvc-matching for debug builds
-  
-  This is already partly supported but this part was missing.
-  Reported-by: James Fuller
-  
-  Closes #5205
-
-- server/resolve: remove AI_CANONNAME to make macos tell the truth
-  
-  With this bit set, my mac successfully resolves "ip6-localhost" when in
-  fact there is no such host known to my machine! That in turn made test
-  241 wrongly execute and fail.
-  
-  Closes #5202
-
-- runtests: fix warning about using an undefined variable
-  
-  Follow-up from 4d939ef6ceb2db1
-
-- release-notes: fix the initial reference list output
-
-- github actions: run when pushed to master or */ci + PRs
-  
-  Avoid double-builds when using "local" branches for PRs. For both macos
-  and fuzz jobs.
-  
-  Closes #5201
-
-- runtests: provide nicer errormsg when protocol "dump" file is empty
-
-- [Gilles Vollant brought this change]
-
-  schannel: support .P12 or .PFX client certificates
-  
-  Used with curl command line option like this: --cert
-  <filename>:<password> --cert-type p12
-  
-  Closes #5193
-
-- tests: verify split initial HTTP requests with CURL_SMALLREQSEND
-  
-  test1294: "split request" being when the entire request isn't sent in
-  the first go, and the remainder is sent in the PERFORM state. A GET
-  request is otherwise not sending anything during PERFORM.
-  
-  test1295: same kind of split but with POST
-  
-  Closes #5197
-
-- http: don't consider upload done if the request isn't completely sent off
-  
-  Fixes #4919
-  Closes #5197
-
-- http: allow Curl_add_buffer_send() to do a short first send by force
-  
-  In a debug build, settting the environment variable "CURL_SMALLREQSEND"
-  will make the first HTTP request send not send more bytes than the set
-  amount, thus ending up verifying that the logic for handling a split
-  HTTP request send works correctly.
-
-- connect: store connection info for QUIC connections
-  
-  Restores the --head functionality to the curl utility which extracts
-  'protocol' that is stored that way.
-  
-  Reported-by: James Fuller
-  Fixes #5196
-  Closes #5198
-
-- tests/README: update the port numbers list
-  
-  Since the pipelining server is long gone.
-  Reported-by: James Fuller
-
-- select: remove typecast from SOCKET_WRITABLE/READABLE macros
-  
-  So that they don't hide conversions-by-mistake
-  
-  Reviewed-by: Jay Satiro
-  Closes #5190
-
-- CURLOPT_WRITEFUNCTION.3: add inline example and new see-also
-  
-  Closes #5192
-
-- release-notes: output trailing references sorted numerically
-
-- cleanup: correct copyright year range on a few files
-
-- configure: remove use of -vec-report0 from CFLAGS with icc
-  
-  ... as it apparently isn't (always) supported.
-  Reported-by: Alain Miniussi
-  Fixes #5096
-  Closes #5191
-
-- warnless: remove code block for icc that didn't work
-  
-  Reported-by: Alain Miniussi
-  Fixes #5096
-
-Marc Hoersken (6 Apr 2020)
-- dist: add missing setup-win32.h
-  
-  Follow up to d820224b8b
-
-Daniel Stenberg (6 Apr 2020)
-- RELEASE-NOTES: synced
-
-- scripts/release-notes.pl: add helper script for RELEASE-NOTES maintenance
-  
-  This script helps putting entries in the RELEASE-NOTES using a coherent
-  style and sorting with a minimal human editing effort - as long as the
-  first line in the commit message is good enough! There's a short howto
-  at the top of the file.
-
-- [Dennis Felsing brought this change]
-
-  configure: don't check for Security.framework when cross-compiling
-  
-  Since it checks for the local file, not the cross-compiled one.
-  
-  Closes #5189
-
-- TODO: Option to make -Z merge lined based outputs on stdout
-  
-  Closes #5175
-
-- lib: never define CURL_CA_BUNDLE with a getenv
-  
-  - it breaks the build (since 6de756c9b1de34b7a1)
-  - it's not documented and not consistent across platforms
-  - the curl tool does that getenv magic
-  
-  Bug: https://github.com/curl/curl/commit/6de756c#r38127030
-  Reported-by: Gisle Vanem
-  
-  Closes #5187
-
-Marc Hoersken (5 Apr 2020)
-- lib670: use the same Win32 API check as all other lib tests
-
-- appveyor: use random test server ports based upon APPVEYOR_API_URL
-  
-  Avoid conflicts of test server ports with AppVeyor API on localhost.
-  
-  Closes #5034
-
-- appveyor: sort builds by type and add two new variants
-  
-  Related to #5034 and #5063
-
-- appveyor: show failed tests in log even if test is ignored
-  
-  And print API response with newline only if there is one
-
-- appveyor: turn disabled tests into ignored result tests
-
-Daniel Stenberg (5 Apr 2020)
-- KNOWN_BUGS: fixed "USE_UNIX_SOCKETS on Windows"
-  
-  Fixed with #5170 (commit 23a870f2fd041278)
-
-- test1566: verify --etag-compare that gets a 304 back
-  
-  Verifies the fix in #5183
-  
-  Closes #5186
-
-- [Kwon-Young Choi brought this change]
-
-  CURLINFO_CONDITION_UNMET: return true for 304 http status code
-  
-  In libcurl, CURLINFO_CONDITION_UNMET is used to avoid writing to the
-  output file if the server did not transfered a file based on time
-  condition. In the same manner, getting a 304 HTTP response back from the
-  server, for example after passing a custom If-Match-* header, also
-  fulfill this condition.
-  
-  Fixes #5181
-  Closes #5183
-
-- [Kwon-Young Choi brought this change]
-
-  curl: allow both --etag-compare and --etag-save with same file name
-  
-  This change inverse the order of processing for the --etag-compare and
-  --etag-save option to process first --etag-compare. This in turn allows
-  to use the same file name to compare and save an etag.
-  
-  The original behavior of not failing if the etag file does not exists is
-  conserved.
-  
-  Fixes #5179
-  Closes #5180
-
-Viktor Szakats (4 Apr 2020)
-- windows: enable UnixSockets with all build toolchains
-  
-  Extend existing unix socket support in Windows builds to be
-  enabled for all toolchain vendors or versions. (Previously
-  it was only supported with certain MSVC versions + more recent
-  Windows 10 SDKs)
-  
-  Ref: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
-  Ref: https://github.com/curl/curl/issues/5162
-  Closes: https://github.com/curl/curl/pull/5170
-
-Daniel Stenberg (4 Apr 2020)
-- KNOWN_BUGS: Store TLS context per transfer instead of per connection
-  
-  Closes #5102
-
-Marc Hoersken (3 Apr 2020)
-- sockfilt: remove redundancy in timeout handling
-  
-  And update other logmsg output in select_ws on Windows.
-
-- sockfilt: fix handling of ready closed sockets on Windows
-  
-  Replace the incomplete workaround regarding FD_CLOSE
-  only signalling once by instead doing a pre-check with
-  standard select and storing the result for later use.
-  
-  select keeps triggering on closed sockets on Windows while
-  WSAEventSelect fires only once with data still available.
-  By doing the pre-check we do not run in a deadlock
-  due to waiting forever for another FD_CLOSE event.
-
-- sockfilt: fix race-condition of waiting threads and event handling
-  
-  Fix race-condition of waiting threads finishing while events are
-  already being processed which lead to invalid or skipped events.
-  
-  Use mutex to check for one event at a time or do post-processing.
-  In addition to mutex-based locking use specific event as signal.
-  
-  Closes #5156
-
-Daniel Stenberg (2 Apr 2020)
-- [Leo Neat brought this change]
-
-  CI-fuzz: increase fuzz time to 40 minutes
-  
-  Closes #5174
-
-Marc Hoersken (2 Apr 2020)
-- CI: increase Azure Pipelines timeouts due to performance issues
-  
-  The current demand on Azure negatively impacts the CI performance.
-
-- runtests.pl: log host OS as detected by Perl environment
-
-- ftpserver.pl: log before and after data connection is closed
-
-Daniel Stenberg (1 Apr 2020)
-- RELEASE-NOTES: synced
-
-- RELEASE-PROCEDURE.md: run the copyright.pl script!
-
-- vquic/ngtcp2.h: update copyright year range
-  
-  Follow-up to 0736ee73d346a52
-
-- [Daiki Ueno brought this change]
-
-  CI: add build with ngtcp2 + gnutls on Travis CI
-
-- [Daiki Ueno brought this change]
-
-  vquic: add support for GnuTLS backend of ngtcp2
-  
-  Currently, the TLS backend used by vquic/ngtcp2.c is selected at compile
-  time. Therefore OpenSSL support needs to be explicitly disabled.
-  
-  Signed-off-by: Daiki Ueno <dueno@redhat.com>
-  Closes #5148
-
-- [Gisle Vanem brought this change]
-
-  examples/sessioninfo.c: add include to fix compiler warning
-  
-  Fixes #5171
-
-- misc: copyright year updates
-  
-  Follow-up to 7a71965e9
+  Closes #7177
 
 - [Harry Sintonen brought this change]
 
-  build: fixed build for systems with select() in unistd.h
+  filecheck: quietly remove test-place/*~
   
-  Closes #5169
+  Closes #7179
 
-- memdebug: don't log free(NULL)
+- CURLE_SETOPT_OPTION_SYNTAX: new error name for wrong setopt syntax
   
-  ... it serves no purpose and fills up the log.
+  For options that pass in lists or strings that are subsequently parsed
+  and must be correct. This broadens the scope for the option previously
+  known as CURLE_TELNET_OPTION_SYNTAX but the old name is of course still
+  provided as a #define for existing applications.
+  
+  Closes #7175
 
-- cleanup: insert newline after if() conditions
+- tests: fix Accept-Encoding strips to work with Hyper builds
   
-  Our code style mandates we put the conditional block on a separate
-  line. These mistakes are now detected by the updated checksrc.
+  The previous strip also removed the CR which turned problematic.
+  
+  valgrind.supp: add zstd suppression using hyper
+  
+  Reported-and-analyzed-by: Kevin Burke
+  Fixes #7169
+  Closes #7171
 
-- checksrc: warn on obvious conditional blocks on the same line as if()
+- github: timeout jobs on macOS after 90 minutes
   
-  Closes #5164
+  Assisted-by: Marc Hoersken
+  Closes #7173
 
-- [Roger Orr brought this change]
+- [Harry Sintonen brought this change]
 
-  cmake: add CMAKE_MSVC_RUNTIME_LIBRARY
+  mqtt: detect illegal and too large file size
   
-  Fixes #5165
-  Closes #5167
+  Add test 3017 and 3018 to verify.
+  Closes #7166
 
-- [Daiki Ueno brought this change]
+- [theawless brought this change]
 
-  ngtcp2: update to git master for the key installation API change
+  cmake: add CURL_DISABLE_NTLM option
   
-  This updates the ngtcp2 OpenSSL backend to follow the API change in
-  commit 32e703164 of ngtcp2.
-  
-  Notable changes are:
-  - ngtcp2_crypto_derive_and_install_{rx,tx}_key have been added to replace
-    ngtcp2_crypto_derive_and_install_key
-  - the 'side' argument of ngtcp2_crypto_derive_and_install_initial_key
-    has been removed
-  
-  Fixes #5166
-  Closes #5168
+  Closes #7028
 
-- [Cyrus brought this change]
+- [theawless brought this change]
 
-  SECURITY.md: minor rephrase
+  configure: add --disable-ntlm option
   
-  Closes #5158
+  Closes #7028
 
-- output.d: quote the URL when globbing
-  
-  Some shells do globbing of their own unless the URL is quoted, so maybe
-  encourage this.
-  
-  Co-authored-by: Jay Satiro
-  Closes #5160
+- [theawless brought this change]
 
-- dist: add tests/version-scan.pl to tarball
+  define: re-add CURL_DISABLE_NTLM and corresponding ifdefs
   
-  ... used in test 1177.
+  This flag will be further exposed by adding build options.
   
-  Follow-up to a97d826f6de3
-
-- test1177: verify that all the CURL_VERSION_ bits are documented
-
-- curl.h: remnove CURL_VERSION_ESNI. Never supported nor documented
-  
-  Considered experimental and therefore we can do this.
-  
-  Closes #5157
-
-- KNOWN_BUGS: DoH doesn't inherit all transfer options
-  
-  Closes #4578
-  Closes #4579
-
-- KNOWN_BUGS: DoH leaks memory after followlocation
-  
-  Closes #4592
-
-- KNOWN_BUGS: "FTPS needs session reuse"
-  
-  Closes #4654
-
-- KNOWN_BUGS: "stick to same family over SOCKS pro" is presumed fixed
-
-- TODO: Set custom client ip when using haproxy protocol
-  
-  Closes #5125
-
-Michael Kaufmann (27 Mar 2020)
-- writeout_json: Fix data type issues
-  
-  Load long values correctly (e.g. for http_code).
-  
-  Use curl_off_t (not long) for:
-  - size_download (CURLINFO_SIZE_DOWNLOAD_T)
-  - size_upload (CURLINFO_SIZE_UPLOAD_T)
-  
-  The unit for these values is bytes/second, not microseconds:
-  - speed_download (CURLINFO_SPEED_DOWNLOAD_T)
-  - speed_upload (CURLINFO_SPEED_UPLOAD_T)
-  
-  Fixes #5131
-  Closes #5152
-
-Daniel Stenberg (27 Mar 2020)
-- mailmap: fixup a few author names/fields
-  
-  Douglas Steinwand, Gökhan Şengün, Jessa Chandler, Julian Z and
-  Svyatoslav Mishyn
-
-- version: add 'cainfo' and 'capath' to version info struct
-  
-  Suggested-by: Timothe Litt
-  URL: https://curl.haxx.se/mail/lib-2020-03/0090.html
-  Reviewed-by: Jay Satiro
-  
-  Closes #5150
+  Reverts #6809
+  Closes #7028
 
 - RELEASE-NOTES: synced
 
-Jay Satiro (26 Mar 2020)
-- SSLCERTS.md: Fix example code for setting CA cert file
-  
-  Prior to this change the documentation erroneously said use
-  CURLOPT_CAPATH to set a CA cert file.
-  
-  Bug: https://curl.haxx.se/mail/lib-2020-03/0121.html
-  Reported-by: Timothe Litt
-  
-  Closes https://github.com/curl/curl/pull/5151
-
-Marc Hoersken (26 Mar 2020)
-- sockfilt: add logmsg output to select_ws_wait_thread on Windows
-  
-  Assisted-by: Jay Satiro
-  Reviewed-by: Daniel Stenberg
-  
-  Closes #5086
-
-Daniel Stenberg (26 Mar 2020)
-- docs/make: generate curl.1 from listed files only
-  
-  Previously it rendered the page from files matching "*.d" in the correct
-  directory, which worked fine in git builds when the files were added but
-  made it easy to forget adding the files to the dist.
-  
-  Now, only man page sections listed in DPAGES in Makefile.inc will be
-  used, thus "forcing" us to update this to get the man page right and get
-  it included in the dist at the same time.
-  
-  Ref: #5146
-  Closes #5149
-
-- openssl: adapt to functions marked as deprecated since version 3
-  
-  OpenSSL 3 deprecates SSL_CTX_load_verify_locations and the MD4, DES
-  functions we use.
-  
-  Fix the MD4 and SSL_CTX_load_verify_locations warnings.
-  
-  In configure, detect OpenSSL v3 and if so, inhibit the deprecation
-  warnings. OpenSSL v3 deprecates the DES functions we use for NTLM and
-  until we rewrite the code to use non-deprecated functions we better
-  ignore these warnings as they don't help us.
-  
-  Closes #5139
-
-- dist: add mail-rcpt-allowfails.d to the tarball
-  
-  Reported-by: Maksim Stsepanenka
-  Reviewed-by: Jat Satiro
-  
-  Closes #5146
-
-- travis: update the ngtcp2 build to use the latest OpenSSL patch
-  
-  ... which also makes it OpenSSL 1.1.1d based and not v3.
-
-Marc Hoersken (24 Mar 2020)
-- CI: remove default Ubuntu build from GitHub Actions
-  
-  We are already running a very similar Ubuntu build on Travis CI.
-  The macOS variant of this default build is kept on Github Actions.
-
-- CI: bring GitHub Actions fuzzing job in line with macOS jobs
-  
-  Update YAML formatting, job naming and triggers.
-
-- CI: migrate macOS jobs from Azure and Travis CI to GitHub Actions
-  
-  Reduce workload on Azure Pipelines and Travis CI while
-  consolidating macOS jobs onto less utilized GitHub Actions.
+Viktor Szakats (1 Jun 2021)
+- travis: delete --enable-hsts option (it is the default now) [ci skip]
   
   Reviewed-by: Daniel Stenberg
-  
-  Closes #5124
+  Closes #7167
 
-Daniel Stenberg (24 Mar 2020)
-- config: remove all defines of HAVE_DES_H
+Daniel Stenberg (1 Jun 2021)
+- hostip: fix 3 coverity complaints
   
-  As there's no code using it.
+  Follow-up to 1a0ebf6632f889eed
   
-  Closes #5144
+  - Check the return code to Curl_inet_pton() in two instances, even
+    though we know the input is valid so the functions won't fail.
+  
+  - Clear the 'struct sockaddr_in' struct before use so that the
+    'sin_zero' field isn't left uninitialized.
+  
+  Detected by Coverity.
+  Assisted-by: Harry Sintonen
+  Closes #7163
 
-- copyright: fix out-of-date copyright ranges and missing headers
+- c-hyper: fix NTLM on closed connection tested with test159
   
-  Reported by the new script 'scripts/copyright.pl'. The script has a
-  regex whitelist for the files that don't need copyright headers.
-  
-  Removed three (mostly usesless) README files from docs/
-  
-  Closes #5141
+  Closes #7154
 
-- packages: add OS400/chkstrings.c to the dist
+- conncache: lowercase the hash key for better match
   
-  Reported-by: Jon Rumsey
-  Fixes #5142
-  Closes #5143
+  As host names are case insensitive, the use of case sensitive hashing
+  caused unnecesary cache misses and therefore lost performance. This
+  lowercases the hash key.
+  
+  Reported-by: Harry Sintonen
+  Fixes #7159
+  Closes #7161
 
-- [Clément Notin brought this change]
+- mbedtls: make mbedtls_strerror always work
+  
+  If the function doesn't exist, provide a macro that just clears the
+  error message. Removes #ifdef uses from the code.
+  
+  Closes #7162
 
-  nghttp2: 1.12.0 required
+- vtls: exit addsessionid if no cache is inited
   
-  since nghttp2_session_set_local_window_size is needed
+  Follow-up to b249592d29ae0
   
-  Closes #5140
+  Avoids NULL pointer derefs.
+  
+  Closes #7165
+
+- [Harry Sintonen brought this change]
+
+  Curl_ntlm_core_mk_nt_hash: fix OOM in error path
+  
+  Closes #7164
+
+Michael Kaufmann (1 Jun 2021)
+- ssl: read pending close notify alert before closing the connection
+  
+  This avoids a TCP reset (RST) if the server initiates a connection
+  shutdown by sending an SSL close notify alert and then closes the TCP
+  connection.
+  
+  For SSL connections, usually the server announces that it will close the
+  connection with an SSL close notify alert. curl should read this alert.
+  If curl does not read this alert and just closes the connection, some
+  operating systems close the TCP connection with an RST flag.
+  
+  See RFC 1122, section 4.2.2.13
+  
+  If curl reads the close notify alert, the TCP connection is closed
+  normally with a FIN flag.
+  
+  The new code is similar to existing code in the "SSL shutdown" function:
+  try to read an alert (non-blocking), and ignore any read errors.
+  
+  Closes #7095
+
+Daniel Stenberg (1 Jun 2021)
+- [Laurent Dufresne brought this change]
+
+  setopt: fix incorrect comments
+  
+  Closes #7157
+
+- [Laurent Dufresne brought this change]
+
+  mbedtls: add support for cert and key blob options
+  
+  CURLOPT_SSLCERT_BLOB and CURLOPT_SSLKEY_BLOB weren't usable with
+  mbedtls backend, so the support was added.
+  
+  Closes #7157
+
+- [Gregor Jasny brought this change]
+
+  cmake: try well-known send/recv signature for Apple
+  
+  The CMake `try_compile` command is especially slow for
+  the Xcode generator. With this patch applied it first tests
+  for the currently used (and Open Group specified) send/recv
+  signature. In case this fails testing falls-back to the
+  permutations.
+  
+  speed-up:
+  
+  ```
+  time cmake .. -GNinja -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DCMAKE_USE_LIBSSH2=OFF
+  before: 11.64s user 11.09s system 55% cpu 40.754 total
+  after:   7.84s user 6.57s  system 51% cpu 28.074 total
+  ```
+  
+  ```
+  time cmake .. -GXcode -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DCMAKE_USE_LIBSSH2=OFF
+  before: 217.07s user 104.15s system 60% cpu 8:51.79 total
+  after:  108.76s user  51.80s system 58% cpu 4:32.58 total
+  ```
+  
+  Closes #7158
+
+- http2: init recvbuf struct for pushed streams
+  
+  Debug builds would warn that these structs were not initialized properly
+  for pushed streams.
+  
+  Ref: #7148
+  Closes #7153
+
+- Curl_ssl_getsessionid: fail if no session cache exists
+  
+  This function might get called for an easy handle for which the session
+  cache hasn't been setup. It now just returns a "miss" in that case.
+  
+  Reported-by: Christoph M. Becker
+  Fixes #7148
+  Closes #7153
+
+- GOVERNANCE: add 'user', 'committer' and 'contributor'
+  
+  As those are commonly used terms in the project.
+  
+  Closes #7151
+
+- URL-SYNTAX.md: document the new 'localhost' treatment
+
+- hostip: make 'localhost' return fixed values
+  
+  Resolving the case insensitive host name 'localhost' now returns the
+  addresses 127.0.0.1 and (if IPv6 is enabled) ::1 without using any
+  resolver.
+  
+  This removes the risk that users accidentally resolves 'localhost' to
+  something else. By making sure 'localhost' is always local, we can
+  assume a "secure context" for such transfers (for cookies etc).
+  
+  Closes #7039
+
+Daniel Gustafsson (31 May 2021)
+- docs: fix typos
+
+Daniel Stenberg (30 May 2021)
+- hsts: ignore numberical IP address hosts
+  
+  Also, use a single function library-wide for detecting if a given hostname is
+  a numerical IP address.
+  
+  Reported-by: Harry Sintonen
+  Fixes #7146
+  Closes #7149
+
+- test178: adjust for hyper
+  
+  Hyper returns the same error for wrong HTTP version as for negative
+  content-length. Test 178 verifies that negative content-length is
+  rejected but the hyper backend will return a different error for it (and
+  without any helpful message telling why the message was bad). It will
+  also not return any headers at all for the response, not even the ones
+  that arrived before the error.
+  
+  Closes #7147
+
+- HYPER: remove mentions of deprecated development branch
+
+- c-hyper: handle NULL from hyper_buf_copy()
+  
+  Closes #7143
+
+- HSTS: not experimental anymore
+
+- [Douglas R. Reno brought this change]
+
+  INSTALL: use correct extension for CURL-DISABLE.md
+  
+  In INSTALL.MD, it's currently set to CURL-DISABLE-md instead of
+  CURL-DISABLE.md. This generates a 404 on the cURL website as well as
+  when viewing the docs through Github.
+  
+  Closes #7142
+
+- travis: run tests 1 - 153 with hyper
+
+- c-hyper: convert HYPERE_INVALID_PEER_MESSAGE to CURLE_UNSUPPORTED_PROTOCOL
+  
+  Makes test 129 work (HTTP/1.2 response).
+  
+  Closes #7141
+
+- http_proxy: deal with non-200 CONNECT response with Hyper
+  
+  Makes test 94 and 95 work
+  
+  Closes #7141
+
+- c-hyper: clear NTLM auth buffer when request is issued
+  
+  To prevent previous ones to get reused on subsequent requests. Matches
+  how the built-in HTTP code works. Makes test 90 to 93 work.
+  
+  Add test 90 to 93 in travis.
+  
+  Closes #7139
+
+- [Joel Depooter brought this change]
+
+  schannel: set ALPN length correctly for HTTP/2
+  
+  In a3268eca792f1 this code was changed to use the ALPN_H2 constant
+  instead of the NGHTTP2_PROTO_ALPN constant. However, these constants are
+  not the same. The nghttp2 constant included the length of the string,
+  like this: "\x2h2". The ALPN_H2 constant is just "h2". Therefore we need
+  to re-add the length of the string to the ALPN buffer.
+  
+  Closes #7138
+
+- travis: run tests 1-89 in the hyper build
+  
+  Closes #7137
+
+- Revert "c-hyper: handle body on HYPER_TASK_EMPTY"
+  
+  This reverts commit c3eefa95c31f55657f0af422e8268d738f689066.
+  
+  Reported-by: Kevin Burke
+  Fixes #7122
+  Closes #7136
+
+- [Jon Rumsey brought this change]
+
+  ccsidcurl: fix the compile errors
+  
+  Looks like the declaration of cpp shoule be const char ** and return
+  null if convert_version_info_string fails.
+  
+  Fixes #7134
+  Closes #7135
+
+- [Viktor Szakats brought this change]
+
+  docs: use --max-redirs instead of --max-redir
+  
+  For consistency.
+  
+  Closes #7130
 
 - RELEASE-NOTES: synced
+  
+  ... and bump to 7.77.1
+
+- [Michael Forney brought this change]
+
+  travis: add bearssl build
+  
+  Closes #7133
+
+- [Michael Forney brought this change]
+
+  bearssl: explicitly initialize all fields of Curl_ssl
+  
+  Also, add comments like the other vtls backends.
+  
+  Closes #7133
+
+- [Michael Forney brought this change]
+
+  bearssl: remove incorrect const on variable that is modified
+  
+  hostname may be set to NULL later on in this function if it is an
+  IP address.
+  
+  Closes #7133
+
+Version 7.77.0 (26 May 2021)
+
+Daniel Stenberg (26 May 2021)
+- RELEASE-NOTES: synced
+
+- THANKS: added contributors from 7.77.0 cycle
+
+- copyright: update copyright year ranges to 2021
+
+- [Radek Zajic brought this change]
+
+  hostip: fix broken macOS/CMake/GCC builds
+  
+  Follow-up to 31f631a142d855f06
+  
+  Fixes #7128
+  Closes #7129
+
+- TODO: netrc caching and sharing
+  
+  URL: https://curl.se/mail/archive-2021-05/0018.html
+
+- [Orgad Shaneh brought this change]
+
+  setopt: streamline ssl option code
+  
+  Make it use the same style as the code next to it
+  
+  Closes #7123
+
+- [Radek Zajic brought this change]
+
+  lib/hostip6.c: make NAT64 address synthesis on macOS work
+  
+  Closes #7121
+
+- [ejanchivdorj brought this change]
+
+  sectransp: fix EXC_BAD_ACCESS caused by uninitialized buffer
+  
+  When the SecCertificateCopyCommonName function fails, it leaves
+  common_name in a invalid state so CFStringCompare uses the invalid
+  result, causing EXC_BAD_ACCESS.
+  
+  The fix is to check the return value of the function before using the
+  name.
+  
+  Closes #7126
+
+- [Paweł Wegner brought this change]
+
+  CMake: add CURL_ENABLE_EXPORT_TARGET option
+  
+  install(EXPORT ...) causes trouble when embedding curl dependencies
+  which don't provide install(EXPORT ...) targets (e.g libressl and
+  nghttp2) with cmake's add_subdirectory.
+  
+  Reviewed-by: Jakub Zakrzewski
+  Closes #7060
+
+- [Alessandro Ghedini brought this change]
+
+  quiche: update for network path aware API
+  
+  Latest version of quiche requires the application to pass the peer
+  address of received packets, and it provides the address for outgoing
+  packets back.
+  
+  Closes #7120
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  rustls: switch read_tls and write_tls to callbacks
+  
+  And update to 0.6.0, including a rename from session to connection for
+  many fields.
+  
+  Closes #7071
+
+- [Koichi Shiraishi brought this change]
+
+  sectransp: fix 7f4a9a9b2a49 commit about missing comma
+  
+  Follow-up to 7f4a9a9b2a495
+  
+  Closes #7119
+
+- [Harry Sintonen brought this change]
+
+  openssl: associate/detach the transfer from connection
+  
+  CVE-2021-22901
+  
+  Bug: https://curl.se/docs/CVE-2021-22901.html
+
+- [Harry Sintonen brought this change]
+
+  telnet: check sscanf() for correct number of matches
+  
+  CVE-2021-22898
+  
+  Bug: https://curl.se/docs/CVE-2021-22898.html
+
+- schannel: don't use static to store selected ciphers
+  
+  CVE-2021-22897
+  
+  Bug: https://curl.se/docs/CVE-2021-22897.html
+
+- docs/tests: remove freenode references
+
+- RELEASE-NOTES: synced
+
+- [Sergey Markelov brought this change]
+
+  NSS: make colons, commas and spaces valid separators in cipher list
+  
+  Fixes #7110
+  Closes #7115
+
+- curl: include libmetalink version in --version output
+  
+  Closes #7112
+
+Jay Satiro (21 May 2021)
+- [Matias N. Goldberg brought this change]
+
+  cmake: Use multithreaded compilation on VS 2008+
+  
+  Multithreaded compilation has been supported since at least VS 2005 and
+  been robustly stable since at least VS 2008
+  
+  Closes https://github.com/curl/curl/pull/7109
+
+Daniel Stenberg (21 May 2021)
+- [Matias N. Goldberg brought this change]
+
+  cmake: fix two invokes result in different curl_config.h
+  
+  Fixes #7100
+  Closes #7101
+  
+  Reviewed-by: Jakub Zakrzewski
+  Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
+
+- [Peng-Yu Chen brought this change]
+
+  cmake: detect CURL_SA_FAMILY_T
+  
+  Fixes #7049
+  Closes #7065
+
+- [Lucas Clemente Vella brought this change]
+
+  CURLOPT_IPRESOLVE: preventing wrong IP version from being used
+  
+  In some situations, it was possible that a transfer was setup to
+  use an specific IP version, but due do DNS caching or connection
+  reuse, it ended up using a different IP version from requested.
+  
+  This commit changes the effect of CURLOPT_IPRESOLVE from simply
+  restricting address resolution to preventing the wrong connection
+  type being used, when choosing a connection from the pool, and
+  to restricting what addresses could be used when establishing
+  a new connection.
+  
+  It is important that all addresses versions are resolved, even if
+  not used in that transfer in particular, because the result is
+  cached, and could be useful for a different transfer with a
+  different CURLOPT_IPRESOLVE setting.
+  
+  Closes #6853
+
+- [Oliver Urbann brought this change]
+
+  AmigaOS: add functions definitions for SHA256
+  
+  AmiSSL replaces many functions with macros. Curl requires pointer
+  to some of these functions. Thus, we have to encapsulate these macros:
+  SHA256_Init, SHA256_Update, SHA256_Final, X509_INFO_free.
+  
+  Bug: https://github.com/jens-maus/amissl/issues/15
+  Co-authored-by: Daniel Stenberg <daniel@haxx.se>
+  
+  Closes #7099
+
+- test2100: make it run with and require IPv6
+  
+  Closes #7083
+
+- tests/getpart: generate output URL encoded for better diffs
+  
+  Closes #7083
+
+- [Ryan Beck-Buysse brought this change]
+
+  docs/TheArtOfHttpScripting: fix markdown links
+  
+  extra parens cause the links to be incorrectly formatted
+  and inconsistent with the rest of the document.
+  
+  Signed-off-by: Ryan Beck-Buysse <rbuysse@gmail.com>
+  Closes #7097
+
+- RELEASE-NOTES: synced
+
+- [Emil Engler brought this change]
+
+  docs: replace dots with dashes in markdown enums
+  
+  We use dashes instead of dots nearly everywhere except for those few
+  cases. This commit addresses this issues and brings more coherency into
+  it.
+  
+  Closes #7093
+
+- [Emil Engler brought this change]
+
+  docs: improve INTERNALS.md regarding getsock cb
+  
+  This adds the I/O prefix to indicate that those "actions" are kind-of
+  related to those found in select(2) or poll(2) (reading/writing).
+  
+  It also adds a note where the prototypes of those functions can be found
+  in the source code.
+  
+  Closes #7092
+
+- [Emil Engler brought this change]
+
+  docs: document attach in INTERNALS.md
+  
+  The new field in the Curl_handler struct still lacks documentation. This
+  adds it it from the information extracted from lib/urldata.h:797
+  
+  Closes #7091
+
+- [Marc Aldorasi brought this change]
+
+  config: remove now-unused macros
+  
+  Closes #7094
+
+- [Marc Aldorasi brought this change]
+
+  hostip.h: remove declaration of unimplemented function
+  
+  Closes #7094
+
+- h3: add 'attach' callback to protocol handlers
+  
+  Follow-up to 0c55fbab45be
+  
+  Reviewed-by: Emil Engler
+  Closes #7090
+
+- wolfssl: remove SSLv3 support leftovers
+  
+  Closes #7088
+
+- curl-wolfssl.m4: without custom include path, assume /usr/include
+  
+  ... so that we can point out the root of the OpenSSL emulation headers.
+  Previously this used the '$includedir' variable which is wrong since
+  that defaults to the dir where the current configure invoke will install
+  the built libcurl headers: /usr/local by default.
+  
+  Fixes #7085
+  Reported-by: Joel Jakobsson
+  Closes #7087
+
+- [Joel Depooter brought this change]
+
+  data_pending: check only SECONDARY socket for FTP(S) transfers
+  
+  Check the FIRST for all other protocols.
+  
+  This fixes a timeout in an ftps download. The server sends a TLS
+  close_notify message in the same packet as the file data. The
+  close_notify seems to not be handled in the schannel_recv function, so
+  libcurl is not aware that the server has closed the connection. Thus
+  libcurl ends up waiting for action on the socket until a timeout is
+  reached. With the secondary socket check added to the data_pending
+  function, the close_notify is properly handled, and the ftps transfer
+  terminates as expected.
+  
+  Fixes #7068
+  Closes #7069
+
+- github: inhibit deprecated declarations for clang on macOS
+  
+  ... as they otherwise cause ldap build errors in the CI.
+  
+  Fixes #7081
+  Closes #7082
+
+- conn: add 'attach' to protocol handler, make libssh2 use it
+  
+  The libssh2 backend has SSH session associated with the connection but
+  the callback context is the easy handle, so when a connection gets
+  attached to a transfer, the protocol handler now allows for a custom
+  function to get used to set things up correctly.
+  
+  Reported-by: Michael O'Farrell
+  Fixes #6898
+  Closes #7078
+
+- http2: make sure pause is done on HTTP
+  
+  Since the function is called for any protocol, we can't assume that the
+  HTTP struct is there without first making sure it is HTTP.
+  
+  Reported-by: Denis Goleshchikhin
+  Fixes #7079
+  Closes #7080
+
+- docs: cookies from HTTP headers need domain set
+  
+  ... or the cookies won't get sent. Push users to using the "Netscape"
+  format instead, which curl uses when saving a cookie "jar".
+  
+  Reported-by: Martin Dorey
+  Reviewed-by: Daniel Gustafsson
+  Fixes #6723
+  Closes #7077
+
+- RELEASE-NOTES: synced
+
+- github: add a workflow with libssh2 on macOS using cmake
+  
+  Closes #7047
+
+- sws: allow HTTP requests up to 2MB in size
+  
+  To allow tests with slightly larger payloads. Like #7071 ...
+  
+  Closes #7075
+
+Marc Hoersken (16 May 2021)
+- CI/azure: increase verbosity and fix outdated task names
+  
+  Closes #7063
+
+- CI/cirrus: add shared and static Windows release builds
+  
+  Azure Pipelines is currently being used for debug builds,
+  let's also run some non-debug (release) Windows builds and
+  make use of previously underutilized Cirrus CI for that.
+  
+  Reviewed-by: Marcel Raad
+  
+  Closes #6991
+
+Daniel Stenberg (16 May 2021)
+- CURLOPT_CAPATH.3: defaults to a path, not NULL
+  
+  Reported-by: Andrew Barnert
+  
+  Closes #7062
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  c-hyper: handle body on HYPER_TASK_EMPTY
+  
+  Some of the time, we get a HYPER_TASK_EMPTY response before the status
+  line, headers, and body have been read. Previously, that would cause us
+  to poll again, leading to a 1 second timeout.
+  
+  The HYPER_TASK_EMPTY docs say:
+  
+     The value of this task is null (does not imply an error).
+  
+  So, if we receive a HYPER_TASK_EMPTY, continue on with processing the
+  response.
+  
+  Reported-by: Kevin Burke
+  Fixes #7064
+  Closes #7070
+
+- [Ikko Ashimine brought this change]
+
+  tool_getparam: fix comment typo in tool_getparam.c
+  
+  enfore -> enforce
+  
+  Closes #7074
+
+- mem-include-scan.pl: require a non-word letter before memory funcs
+  
+  ... so that ldap_memfree() for example doesn't match the scan for free.
+  
+  Closes #7061
+
+- version: free the openldap info correctly
+  
+  ... to avoid memory leaks.
+  
+  Follow-up to: bf0feae7768d9
+  Closes #7061
+
+- dupset: remove totally off comment
+  
+  Closes #7067
+
+- configure: if asked for, fail if ldap is not found
+  
+  Reported-by: Jakub Zakrzewski
+  Fixes #7053
+  Closes #7055
+
+- version: add OpenLDAP version in the output
+  
+  Assisted-by: Howard Chu
+  Closes #7054
+
+Jay Satiro (13 May 2021)
+- [Joel Depooter brought this change]
+
+  schannel: Ensure the security context request flags are always set
+  
+  As of commit 54e7475, these flags would only be set when using a new
+  credential handle. When re-using an existing credential handle, the
+  flags would not be set.
+  
+  Closes https://github.com/curl/curl/pull/7051
+
+Dan Fandrich (12 May 2021)
+- tests: Fix some tag matching issues in a number of tests
+
+Daniel Stenberg (12 May 2021)
+- sasl: use 'unsigned short' to store mechanism
+  
+  ... saves a few bytes of struct size in memory and it only uses
+  10 bits anyway.
+  
+  Closes #7045
+
+- hostip: remove the debug code for LocalHost
+  
+  The Curl_resolv() had special code (when built in debug mode) for when
+  resolving the host name "LocalHost" (using that exact casing). It would
+  then get the host name from the --interface option instead.
+  
+  This development-only feature was not used by anything (anymore) and we
+  have the --resolve feature if we want to play similar tricks properly
+  going forward.
+  
+  Closes #7044
+
+- progress: reset limit_size variables at transfer start
+  
+  Otherwise the old value would linger from a previous use and would mess
+  up the network speed cap logic.
+  
+  Reported-by: Ymir1711 on github
+  
+  Fixes #7042
+  Closes #7043
+
+- RELEASE-NOTES: synced
+
+- [Daniel Gustafsson brought this change]
+
+  cookies: use CURLcode for cookie_output reporting
+  
+  Writing the cookie file has multiple error conditions, and was using an
+  int with magic numbers to report the different error (which in turn were
+  disregarded anyways). This moves reporting to use a CURLcode value.
+  
+  Lightly-touched-by: Daniel Stenberg
+  
+  Closes #7037
+  Closes #6749
+
+- [Daniel Gustafsson brought this change]
+
+  cookies: make use of string duplication function
+  
+  strstore() is defined as a strdup which ensures to free the target
+  pointer before duping the source char * into it. Make use of it in
+  two more cases where it can simplify the code.
+
+- [Daniel Gustafsson brought this change]
+
+  cookies: refactor comments
+  
+  Comments in the cookie code were a bit all over the place in terms of
+  style and wording. This takes a stab at cleaning them up by keeping to
+  a single style and overall shape. Some comments are moved a little and
+  some removed alltogether due to being redundant. No functional changes
+  have been made,
+
+- [Peng-Yu Chen brought this change]
+
+  http2: skip immediate parsing of payload following protocol switch
+  
+  This is considered not harmful as a following http2_recv shall be
+  called very soon.
+  
+  This is considered helpful in the specific situation where some
+  servers (e.g. nghttpx v1.43.0) may fulfill stream 1 immediately
+  following the return of HTTP status 101, other than waiting for
+  the client-side connection preface to arrive.
+  
+  Fixes #7036
+  Closes #7040
+
+- [Peng-Yu Chen brought this change]
+
+  http2: use nghttp2_session_upgrade2 instead of nghttp2_session_upgrade
+  
+  Following the upstream deprecation of nghttp2_session_upgrade.
+  
+  Also provides further checks for requests with the HEAD method.
+  
+  Closes #7041
+
+- progress/trspeed: use a local convenient pointer to beautify code
+  
+  The function becomes easier to read and understand with less repetition.
+
+- trspeed: use long double for transfer speed calculation
+
+- progress: move transfer speed calc into function
+  
+  This silences two scan-build-11 warnings: "The result of the '/'
+  expression is undefined"
+  
+  Bug: https://curl.se/mail/lib-2021-05/0022.html
+  Closes #7035
+
+- [Cameron Cawley brought this change]
+
+  openssl: remove unneeded cast for CertOpenSystemStore()
+  
+  Closes #7025
+
+- travis: disable the libssh build
+  
+  It can't run on focal and causes warnings on bionic. Since the focal
+  failure started rather suddenly a while ago, we can suspect it might be
+  temporary.
+  
+  Added "bring back the build" to the TODO document.
+  
+  Fixes #7011
+  Closes #7012
+
+- [Peng-Yu Chen brought this change]
+
+  http: use calculated offsets inst of integer literals for header parsing
+  
+  Assumed to be a minor coding style improvement with no behavior change.
+  
+  A modern compiler is expected to have the calculation optimized during
+  compilation. It may be deemed okay even if that's not the case, since
+  the added overhead is considered very low.
+  
+  Closes #7032
+
+- [Peng-Yu Chen brought this change]
+
+  GIT-INFO: suggest using autoreconf instead of buildconf
+  
+  Follow-up to 85868537d
+  
+  Closes #7033
+
+- http: deal with partial CONNECT sends
+  
+  Also added 'CURL_SMALLSENDS' to make Curl_write() send short packets,
+  which helped verifying this even more.
+  
+  Add test 363 to verify.
+  
+  Reported-by: ustcqidi on github
+  Fixes #6950
+  Closes #7024
+
+- HTTP3: make the ngtcp2 build use the quictls fork
+  
+  ... as ngtcp2 itself documents the build this way.
+  
+  Closes #7031
+
+- http: limit the initial send amount to used upload buffer size
+  
+  Previously this logic would cap the send to CURL_MAX_WRITE_SIZE bytes,
+  but for the situations where a larger upload buffer has been set, this
+  function can benefit from sending more bytes. With default size used,
+  this does the same as before.
+  
+  Also changed the storage of the size to an 'unsigned int' as it is not
+  allowed to be set larger than 2M.
+  
+  Also added cautions to the man pages about changing buffer sizes in
+  run-time.
+  
+  Closes #7022
+
+- RELEASE-NOTES: synced
+
+- ngtcp2: fix the cb_acked_stream_data_offset proto
+  
+  The 'datalen' value should be 64 bit, not size_t!
+  
+  Reported-by: Dmitry Karpov
+  Bug: https://curl.se/mail/lib-2021-05/0019.html
+  Closes #7027
+
+- progress: when possible, calculate transfer speeds with microseconds
+  
+  ... this improves precision, especially for transfers in the few or even
+  sub millisecond range.
+  
+  Reported-by: J. Bromley
+  Fixes #7017
+  Closes #7020
+
+- http: reset the header buffer when sending the request
+  
+  A reused transfer handle could otherwise reuse the previous leftover
+  buffer and havoc would ensue.
+  
+  Reported-by: sergio-nsk on github
+  Fixes #7018
+  Closes #7021
+
+- curl_mprintf.3: add description
+  
+  These functions have existed in the API since the dawn of time. It is
+  about time we describe how they work, even if we discourage users from
+  using them.
+  
+  Closes #7010
+
+- [Timothy Gu brought this change]
+
+  URL-SYNTAX: update IDNA section for WHATWG spec changes
+  
+  WHATWG URL has dictated the use of Nontransitional Processing (IDNA
+  2008) for several years now. Chrome (and derivatives) still use
+  Transitional Processing, but Firefox and Safari have both switched.
+  
+  Also document the fact that winidn functions differently from libidn2
+  here.
+  
+  Closes #7026
 
 - [Calvin Buckley brought this change]
 
-  OS400: Update strings for ccsid-ifier
+  INSTALL: add IBM i specific quirks
   
-  Fixes build.
-  
-  Closes #5132
+  Fixes #6830
+  Closes #7013
 
-- cirrus: make freebsd ignore the tests instead of skipping
+- libcurl.3: mention the URL API
   
-  To allow us to see in the CI logs how they actually behave
+  To make it easier to find. Also a minor polish of libcurl-url.3
   
-  Closes #5091
+  Closes #7009
 
-- cirrus: move the sanitizer build from freebsd 13 to freebsd 12
+- GnuTLS: don't allow TLS 1.3 for versions that don't support it
+  
+  Follow-up to 781864bedbc5
+  
+  ... as they don't understand it and will return error at us!
+  
+  Closes #7014
 
-- Revert "cirrus-ci: disable the FreeBSD 13 builds"
+Kamil Dudka (6 May 2021)
+- tool_getparam: handle failure of curlx_convert_tchar_to_UTF8()
   
-  This reverts commit 691b71be930f0e285c8f7a76efd56bbe0576cda6.
+  Reported by GCC analyzer:
+  
+  Error: GCC_ANALYZER_WARNING (CWE-476):
+  src/tool_getparam.c: scope_hint: In function 'parse_args'
+  src/tool_getparam.c:2318:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'orig_opt'
+  lib/curlx.h:56: included_from: Included from here.
+  src/tool_getparam.c:28: included_from: Included from here.
+  lib/curl_multibyte.h:70:51: note: in definition of macro 'curlx_convert_tchar_to_UTF8'
+  src/tool_getparam.c:2316:16: note: in expansion of macro 'curlx_convert_tchar_to_UTF8'
+  
+  Reviewed-by: Marcel Raad
+  Reviewed-by: Daniel Stenberg
+  Closes #7023
 
-- getinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE override
-  
-  To let debug-builds return fake values, like in test 970.
-  
-  Ref: #5131
-  Closes #5136
+Daniel Stenberg (6 May 2021)
+- scripts/delta: also show total number of days
 
-- test970: improve the test
+Marc Hoersken (5 May 2021)
+- sockfilt: fix invalid increment of handles index variable nfd
   
-  - send more data to make problems more obvious
-  - don't start the data with minus, it makes diffs harder to read
-  - skip the headers in the stdout comparison
-  - save to a file name to also verify 'filename_effective'
+  Only increment the array index if we actually stored a handle.
   
-  Ref: #5131
+  Follow up to e917492048f4b85a0fd58a033d10072fc7666c3b
+  Closes #6992
 
-- CURLINFO_NUM_CONNECTS: improve accuracy
+- sockfilt: avoid getting stuck waiting for writable socket
   
-  The counter was not bumped in all cases correctly.
+  Reset FD_WRITE event using the same approach as in multi.c
   
-  Reported-by: Marcel Raad
-  Ref: #5131
-  Closes #5135
+  Follow up to b36442b24305f3cda7c13cc64b46838995a4985b
+  Closes #6992
 
-- TODO: Use "random" ports for the test servers
+Jay Satiro (5 May 2021)
+- test678: Fix for Windows multibyte builds
+  
+  Follow-up to 77fc385 from yesterday.
+  
+  Bug: https://github.com/curl/curl/pull/6662#issuecomment-832966557
+  Reported-by: Marc Hörsken
 
-- lib/curl_setup: adjust the copyright year range
-  
-  Follow-up from d820224b8
+- [Dmitry Kostjuchenko brought this change]
 
-Jay Satiro (21 Mar 2020)
-- curl_setup: define _WIN32_WINNT_[OS] symbols
+  build: fix compilation for Windows UWP platform
   
-  .. because not all Windows build systems have those symbols, and even
-  those that do may be missing newer symbols (eg the Windows 7 SDK does
-  not define _WIN32_WINNT_WIN10).
+  - Include afunix.h which is necessary for sockaddr_un when
+    USE_UNIX_SOCKETS is defined on Windows.
   
-  Those symbols are used in build-time logic to decide which API to use
-  and prior to this change if the symbols were missing it would have
-  resulted in deprecated API being used when more recent functions were
-  available (eg GetVersionEx used instead of VerifyVersionInfo).
-  
-  Reported-by: FuccDucc@users.noreply.github.com
-  
-  Probably fixes https://github.com/curl/curl/issues/4995
-  Closes https://github.com/curl/curl/pull/5057
+  Closes https://github.com/curl/curl/pull/7006
 
-- [Ross Burton brought this change]
-
-  curl-functions.m4: remove inappropriate AC_REQUIRE
+Daniel Stenberg (5 May 2021)
+- gnutls: make setting only the MAX TLS allowed version work
   
-  AC_REQUIRE means "if this macro hasn't been executed already, execute
-  it".  So in a wrapper around AC_RUN_IFELSE, AC_REQUIRE(AC_RUN_IFELSE)
-  isn't correct at that will execute AC_RUN_IFELSE without any arguments.
+  Previously, settting only the max allowed TLS version, leaving the
+  minimum one at default, didn't actually set it and left it to default
+  (TLS 1.3) too!
   
-  With autoconf 2.69 this is basically a no-op, but with autoconf 2.70,
-  AC_RUN_IFELSE without a default value when cross-compiling is fatal.
-  The result is that curl with autoconf 2.70 cannot cross-compile.
+  As a bonus, this change also removes the dead code handling of SSLv3
+  since that version can't be set anymore (since eff614fb0242cb).
   
-  Fixes https://github.com/curl/curl/issues/5126
-  Closes https://github.com/curl/curl/pull/5130
+  Reported-by: Daniel Carpenter
+  Fixes #6998
+  Closes #7000
 
-Marc Hoersken (20 Mar 2020)
-- ci/tests: fix Azure Pipelines not running Windows containers
+- openldap: replace ldap_ prefix on private functions
   
-  Workaround posted here: microsoft/azure-pipelines-agent#2864
+  Since openldap itself uses that prefix and with OpenĹDAP 2.5.4 (at
+  least) there's a symbol collision because of that.
   
-  Assisted-by: Simon Chalifoux
-  Assisted-by: Tommy Petty
+  The private functions now use the 'oldap_' prefix where it previously
+  used 'ldap_'.
   
-  Fixes #5117
-  Closes #5129
+  Reported-by: 3eka on github
+  Fixes #7004
+  Closes #7005
 
-Daniel Stenberg (20 Mar 2020)
-- tests: add test 430, 431 and 432 to verify the --config fix
+Jay Satiro (5 May 2021)
+- http2: fix potentially uninitialized variable
   
-  Verify the fixes in 4e0b4fee4
+  introduced several days ago in 3193170. caught by visual studio linker.
 
-- [Rici Lake brought this change]
+- [Gilles Vollant brought this change]
 
-  cmdline: fix handling of OperationConfig linked list (--next)
+  SSL: support in-memory CA certs for some backends
   
-  Ensures that -K/--config inserts new items at the end of the list
-  instead of overwriting the second item, and that after a -K/--config
-  option has been parsed, the option parser's view of the current config
-  is update.
+  - New options CURLOPT_CAINFO_BLOB and CURLOPT_PROXY_CAINFO_BLOB to
+    specify in-memory PEM certificates for OpenSSL, Schannel (Windows)
+    and Secure Transport (Apple) SSL backends.
   
-  Fixes #5120
-  Closes #5123
-
-Marc Hoersken (20 Mar 2020)
-- test2100: fix static port instead of dynamic value being used
-
-- test970: fix static ip:port instead of dynamic values being used
-
-Daniel Stenberg (19 Mar 2020)
-- secure transport: remove the BACKEND define kludge
+  Prior to this change PEM certificates could only be imported from a file
+  and not from memory.
   
-  Closes #5122
-
-- mbedtls: remove the BACKEND define kludge
-
-- bearssl: remove the BACKEND define kludge
-
-- wolfssl: remove the BACKEND define kludge
-
-- nss: remove the BACKEND define kludge
-
-- gnutls: remove the BACKEND define kludge
-
-- openssl: remove the BACKEND define kludge
+  Co-authored-by: moparisthebest@users.noreply.github.com
   
-  Use a proper variable instead to make it easier to use a debugger and
-  read the code.
+  Ref: https://github.com/curl/curl/pull/4679
+  Ref: https://github.com/curl/curl/pull/5677
+  Ref: https://github.com/curl/curl/pull/6109
+  
+  Closes https://github.com/curl/curl/pull/6662
 
-Marc Hoersken (19 Mar 2020)
-- tests: make Python-based servers compatible with Python 2 and 3
+Daniel Stenberg (4 May 2021)
+- [David Cook brought this change]
+
+  tests: ignore case of chunked hex numbers in tests
   
-  Update smbserver.py and negtelnetserver.py to be compatible with
-  Python 3 while staying backwards-compatible to support Python 2.
+  When hyper is used, it emits uppercase hexadecimal numbers for chunked
+  encoding lengths. Without hyper, lowercase hexadecimal numbers are used.
+  This change adds preprocessor statements to tests where this is an
+  issue, and adapts the fixtures to match.
   
-  Fix string encoding and handling of echoed and transferred data.
+  Closes #6987
+
+- cmake: check for getppid and utimes
   
-  Tested with both Python 2.7.17 and Python 3.7.7
+  ... as they're checked for in the configure script and are used by
+  source code.
   
-  Reported-by: Daniel Stenberg
-  Assisted-by: Kamil Dudka
+  Removed checks for perror, setvbuf and strlcat since those defines are
+  not checked for in source code.
+  
+  Bonus: removed HAVE_STRLCPY from a few config-*.h files since that
+  symbol is not used in source code.
+  
+  Closes #6997
+
+- libtest: remove lib530.c
+  
+  Follow up from e50a877df when test 530 was removed. Since then this
+  source file has not been used/needed.
+  
+  Closes #6999
+
+- FILEFORMAT: mention sectransp as a feature
+  
+  Been supported since at least 40259ca65
+  
+  Closes #7001
+
+- RELEASE-NOTES: synced
+
+- libssh2: ignore timeout during disconnect
+  
+  ... to avoid memory leaks!
+  
+  libssh2 is tricky as we have to deal with the non-blockiness even in
+  close and shutdown cases. In the cases when we shutdown after a timeout
+  already expired, it is crucial that curl doen't let the timeout abort
+  the shutdown process as that then leaks memory!
+  
+  Reported-by: Benjamin Riefenstahl
+  Fixes #6990
+
+- KNOWN_BUGS: add two HTTP/2 bugs
+
+- KNOWN_BUGS: add three HTTP/3 issues
+  
+  ... and moved the HTTP/2 issues to its own section
+  
+  Closes #6606
+  Closes #6510
+  Closes #6494
+
+- [ejanchivdorj brought this change]
+
+  CURLcode: add CURLE_SSL_CLIENTCERT
+  
+  When a TLS server requests a client certificate during handshake and
+  none can be provided, libcurl now returns this new error code
+  CURLE_SSL_CLIENTCERT
+  
+  Only supported by Secure Transport and OpenSSL for TLS 1.3 so far.
+  
+  Closes #6721
+
+- [Tobias Gabriel brought this change]
+
+  .github/FUNDING: add link to GitHub sponsors
+  
+  Closes #6985
+
+- [Harry Sintonen brought this change]
+
+  krb5/name_to_level: replace checkprefix with curl_strequal
+  
+  Closes #6993
+
+- [Harry Sintonen brought this change]
+
+  Curl_input_digest: require space after Digest
+  
+  Closes #6993
+
+- [Harry Sintonen brought this change]
+
+  Curl_http_header: check for colon when matching Persistent-Auth
+  
+  Closes #6993
+
+- [Harry Sintonen brought this change]
+
+  Curl_http_input_auth: require valid separator after negotiation type
+  
+  Closes #6993
+
+- http: fix the check for 'Authorization' with Bearer
+  
+  The code would wrongly check for it using an additional colon.
+  
+  Reported-by: Blake Burkhart
+  Closes #6988
+
+- [Kamil Dudka brought this change]
+
+  http2: fix a resource leak in push_promise()
+  
+  ... detected by Coverity:
+  
+  Error: RESOURCE_LEAK (CWE-772):
+  lib/http2.c:532: alloc_fn: Storage is returned from allocation function "duphandle".
+  lib/http2.c:532: var_assign: Assigning: "newhandle" = storage returned from "duphandle(data)".
+  lib/http2.c:552: noescape: Resource "newhandle" is not freed or pointed-to in "set_transfer_url".
+  lib/http2.c:555: leaked_storage: Variable "newhandle" going out of scope leaks the storage it points to.
+  
+  Closes #6986
+
+- [Kamil Dudka brought this change]
+
+  http2: fix resource leaks in set_transfer_url()
+  
+  ... detected by Coverity:
+  
+  Error: RESOURCE_LEAK (CWE-772):
+  lib/http2.c:480: alloc_fn: Storage is returned from allocation function "curl_url". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:480: var_assign: Assigning: "u" = storage returned from "curl_url()".
+  lib/http2.c:486: noescape: Resource "u" is not freed or pointed-to in "curl_url_set". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:488: leaked_storage: Variable "u" going out of scope leaks the storage it points to.
+  
+  Error: RESOURCE_LEAK (CWE-772):
+  lib/http2.c:480: alloc_fn: Storage is returned from allocation function "curl_url". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:480: var_assign: Assigning: "u" = storage returned from "curl_url()".
+  lib/http2.c:493: noescape: Resource "u" is not freed or pointed-to in "curl_url_set". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:495: leaked_storage: Variable "u" going out of scope leaks the storage it points to.
+  
+  Error: RESOURCE_LEAK (CWE-772):
+  lib/http2.c:480: alloc_fn: Storage is returned from allocation function "curl_url". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:480: var_assign: Assigning: "u" = storage returned from "curl_url()".
+  lib/http2.c:500: noescape: Resource "u" is not freed or pointed-to in "curl_url_set". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:502: leaked_storage: Variable "u" going out of scope leaks the storage it points to.
+  
+  Error: RESOURCE_LEAK (CWE-772):
+  lib/http2.c:480: alloc_fn: Storage is returned from allocation function "curl_url". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:480: var_assign: Assigning: "u" = storage returned from "curl_url()".
+  lib/http2.c:505: noescape: Resource "u" is not freed or pointed-to in "curl_url_get". [Note: The source code implementation of the function has been overridden by a builtin model.]
+  lib/http2.c:507: leaked_storage: Variable "u" going out of scope leaks the storage it points to.
+  
+  Closes #6986
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  rustls: use ALPN
+  
+  Update required rustls to 0.5.0
+  
+  Closes #6960
+
+- [MAntoniak brought this change]
+
+  gskit: fix CURL_DISABLE_PROXY build
+  
+  Removed localfd and remotefd from ssl_backend_data (ued only with proxy
+  connection). Function pipe_ssloverssl return always 0, when proxy is not
+  used.
+  
+  Closes #6981
+
+- [MAntoniak brought this change]
+
+  gskit: fix undefined reference to 'conn'
+  
+  Closes #6980
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  tls: add USE_HTTP2 define
+  
+  This abstracts across the two HTTP/2 backends: nghttp2 and Hyper.
+  
+  Add our own define for the "h2" ALPN protocol, so TLS backends can use
+  it without depending on a specific HTTP backend.
+  
+  Closes #6959
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  lib: fix 0-length Curl_client_write calls
+  
+  Closes #6954
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  lib: remove strlen call from Curl_client_write
+  
+  At all call sites with an explicit 0 len, pass an appropriate nonzero
+  len.
+  
+  Closes #6954
+
+- [Ayushman Singh Chauhan brought this change]
+
+  docs: camelcase it like GitHub everywhere
+  
+  Closes #6979
+
+Jay Satiro (27 Apr 2021)
+- [Lucas Servén Marín brought this change]
+
+  docs: fix typo in fail-with-body doc
+  
+  This commit fixes a small typo in the documentation for the
+  --fail-with-body flag.
+  
+  Closes https://github.com/curl/curl/pull/6977
+
+- lib: fix some misuse of curlx_convert_UTF8_to_tchar
+  
+  curlx_convert_UTF8_to_tchar 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_UTF8_to_tchar and
+  curlx_convert_tchar_to_UTF8.
+  
+  Bug: https://github.com/curl/curl/pull/6602#issuecomment-825236763
+  Reported-by: sergio-nsk@users.noreply.github.com
+  
+  Closes https://github.com/curl/curl/pull/6938
+
+Daniel Stenberg (27 Apr 2021)
+- ntlm: precaution against super huge type2 offsets
+  
+  ... which otherwise caused an integer overflow and circumvented the if()
+  conditional size check.
+  
+  Detected by OSS-Fuzz
+  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33720
+  Assisted-by: Max Dymond
+  Closes #6975
+
+- c-hyper: fix unused variable ‘wrote’
+
+- libcurl-security.3: be careful of setuid
+  
+  Reported-by: Harry Sintonen
+  Closes #6970
+
+- [Kevin Burke brought this change]
+
+  c-hyper: don't write to set.writeheader if null
+  
+  Previously if a caller set CURLOPT_WRITEFUNCTION but did not set a
+  CURLOPT_HEADERDATA buffer, Hyper would still attempt to write headers to
+  the data->set.writeheader header buffer, even though it is null.  This
+  led to NPE segfaults attempting to use libcurl+Hyper with Git, for
+  example.
+  
+  Instead, process the client write for the status line using the same
+  logic we use to process the client write for the later HTTP headers,
+  which contains the appropriate guard logic. As a side benefit,
+  data->set.writeheader is now only read in one file instead of two.
+  
+  Fixes #6619
+  Fixes abetterinternet/crustls#49
+  Fixes hyperium/hyper#2438
+  Closes #6971
+
+- wolfssl: handle SSL_write() returns 0 for error
+  
+  Reported-by: Timo Lange
+  
+  Closes #6967
+
+- easy: ignore sigpipe in curl_easy_send
+  
+  Closes #6965
+
+- sigpipe: ignore SIGPIPE when using wolfSSL as well
+  
+  Closes #6966
+
+- libcurl-security.3: don't try to filter IPv4 hosts based on the URL
+  
+  Closes #6942
+
+- [Harry Sintonen brought this change]
+
+  nss_set_blocking: avoid static for sock_opt
+  
+  Reviewed-by: Kamil Dudka
+  Closes #6945
+
+- RELEASE-NOTES: synced
+
+- [Yusuke Nakamura brought this change]
+
+  docs/HTTP3.md: fix nghttp2's HTTP/3 server port
+  
+  Port 8443 does not work now.
+  Correct origin is in the quicwg's wiki.
+  https://github.com/quicwg/base-drafts/wiki/Implementations#ngtcp2
+  
+  Closes #6964
+
+- krb5: don't use 'static' to store PBSZ size response
+  
+  ... because it makes the knowledge and usage cross-transfer in funny and
+  unexpected ways.
+  
+  Reported-by: Harry Sintonen
+  Closes #6963
+
+- [Kevin Burke brought this change]
+
+  m4: add security frameworks on Mac when compiling rustls
+  
+  Previously compiling rustls on Mac would only complete if you also
+  compiled the SecureTransport TLS backend, which curl would prefer to
+  the Rust backend.
+  
+  Appending these flags to LDFLAGS makes it possible to compile the
+  Rustls backend on Mac without the SecureTransport backend, which means
+  this patch will make it possible for Mac users to use the Rustls
+  backend for TLS.
+  
+  Reviewed-by: Jacob Hoffman-Andrews
+  
+  Fixes #6955
+  Cloes #6956
+
+- krb5: remove the unused 'overhead' function
+  
+  Closes #6947
+
+- [Johann150 brought this change]
+
+  curl_url_set.3: add memory management information
+  
+  wording taken from man page for CURLOPT_URL.3
+  
+  As far as I can see, the URL part is either malloc'ed before due to
+  encoding or it is strdup'ed.
+  
+  Closes #6953
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  c-hpyer: fix handling of zero-byte chunk from hyper
+  
+  Closes #6951
+
+- CURLOPT_POSTFIELDS.3: clarify how it gets the size of the data
+  
+  Ref: https://curl.se/mail/lib-2021-04/0085.html
+  Closes #6943
+
+- [Ralph Langendam brought this change]
+
+  cmake: make libcurl output filename configurable
+  
+  Reviewed-by: Jakub Zakrzewski
+  Closes #6933
+
+- [Patrick Monnerat brought this change]
+
+  vtls: reset ssl use flag upon negotiation failure
+  
+  Fixes the segfault in ldaps disconnect.
+  
+  Reported-by: Illarion Taev
+  Fixes #6934
+  Closes #6937
+
+- configure: fix typo in TLS error message
+  
+  Reported-by: Pontus Lundkvist
+
+- README: link to the commercial support option
+
+Jay Satiro (22 Apr 2021)
+- [Martin Halle brought this change]
+
+  version: add gsasl_version to curl_version_info_data
+  
+  - Add gsasl_version string and bump to CURLVERSION_TENTH.
+  
+  Ref: https://curl.se/mail/lib-2021-04/0003.html
+  
+  Closes https://github.com/curl/curl/pull/6843
+
+- [Morten Minde Neergaard brought this change]
+
+  schannel: Support strong crypto option
+  
+  - Support enabling strong crypto via optional user cipher list when
+    USE_STRONG_CRYPTO or SCH_USE_STRONG_CRYPTO is in the list.
+  
+  MSDN says SCH_USE_STRONG_CRYPTO "Instructs Schannel to disable known
+  weak cryptographic algorithms, cipher suites, and SSL/TLS protocol
+  versions that may be otherwise enabled for better interoperability."
+  
+  Ref: https://curl.se/mail/lib-2021-02/0066.html
+  Ref: https://curl.se/docs/manpage.html#--ciphers
+  Ref: https://curl.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html
+  Ref: https://docs.microsoft.com/en-us/windows/win32/api/schannel/ns-schannel-schannel_cred
+  
+  Closes https://github.com/curl/curl/pull/6734
+
+Daniel Stenberg (22 Apr 2021)
+- RELEASE-NOTES: synced
+
+- ci: adapt to configure requiring an explicit TLS choice
+
+- configure: split out each TLS library detector into its own function
+  
+  ... and put those functions in separate m4 files per TLS library.
+
+- configure: make the TLS library choice(s) explicit
+  
+  configure no longer tries to find a TLS library by default, but all
+  libraries are now equal: the user needs to explicitly ask what TLS
+  library or libraries to use.
+  
+  If no TLS library is selected, configure will error out unless
+  --without-ssl is explicitly used to request a built without TLS (as that
+  is very rare these days).
+  
+  Removes: --with-winssl, --with-darwinssl and all --without-* options for
+  TLS libraries.
+  
+  Closes #6897
+
+- tests/disable-scan.pl: also scan all m4 files
+  
+  Fixes test 1165 when functions are moved from configure.ac to files in
+  m4/
+
+Jay Satiro (22 Apr 2021)
+- schannel: Disable auto credentials; add an option to enable it
+  
+  - Disable auto credentials by default. This is a breaking change
+    for clients that are using it, wittingly or not.
+  
+  - New libcurl ssl option value CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl
+    to automatically locate and use a client certificate for
+    authentication, when requested by the server.
+  
+  - New curl tool options --ssl-auto-client-cert and
+    --proxy-ssl-auto-client-cert map to CURLSSLOPT_AUTO_CLIENT_CERT.
+  
+  This option is only supported for Schannel (the native Windows SSL
+  library). Prior to this change Schannel would, with no notification to
+  the client, attempt to locate a client certificate and send it to the
+  server, when requested by the server. Since the server can request any
+  certificate that supports client authentication in the OS certificate
+  store it could be a privacy violation and unexpected.
+  
+  Fixes https://github.com/curl/curl/issues/2262
+  Reported-by: Jeroen Ooms
+  Assisted-by: Wes Hinsley
+  Assisted-by: Rich FitzJohn
+  
+  Ref: https://curl.se/mail/lib-2021-02/0066.html
+  Reported-by: Morten Minde Neergaard
+  
+  Closes https://github.com/curl/curl/pull/6673
+
+Daniel Stenberg (22 Apr 2021)
+- [Michał Antoniak brought this change]
+
+  vtls: deduplicate some DISABLE_PROXY ifdefs
+  
+  continue from #5735
+  
+  - using SSL_HOST_NAME, SSL_HOST_DISPNAME, SSL_PINNED_PUB_KEY for other
+    tls backend
+  
+  - create SSL_HOST_PORT
+  
+  Closes #6660
+
+Jay Satiro (22 Apr 2021)
+- OS400: fix typo
+  
+  CURLVERSION_HEIGHTH -> CURLVERSION_EIGHTH
+
+Daniel Stenberg (22 Apr 2021)
+- checksrc: complain on == NULL or != 0 checks in conditions
+  
+  ... to make them all consistenly use if(!var) and if(var)
+  
+  Also added a few missing warnings to the documentation.
+  
+  Closes #6912
+
+- tidy-up: make conditional checks more consistent
+  
+  ... remove '== NULL' and '!= 0'
+  
+  Closes #6912
+
+- [Patrick Monnerat brought this change]
+
+  vauth: factor base64 conversions out of authentication procedures
+  
+  Input challenges and returned messages are now in binary.
+  Conversions from/to base64 are performed by callers (currently curl_sasl.c
+  and http_ntlm.c).
+  
+  Closes #6654
+
+- [Patrick Monnerat brought this change]
+
+  bufref: buffer reference support
+  
+  A struct bufref holds a buffer pointer, a data size and a destructor.
+  When freed or its contents are changed, the previous buffer is implicitly
+  released by the associated destructor. The data size, although not used
+  internally, allows binary data support.
+  
+  A unit test checks its handling methods: test 1661
+  
+  Closes #6654
+
+- [Patrick Monnerat brought this change]
+
+  os400: additional support for options metadata
+  
+  New functions curl_easy_option_by_name_ccsid() and
+  curl_easy_option_get_name_ccsid() allows accessing metadata in alternate
+  character encoding.
+  
+  This commit also updates curl_version_info_ccsid() to handle info version 9
+  and adds recent definitions to the ILE/RPG include file.
+  
+  Documentation updated accordingly.
+  
+  Reviewed-by: Jon Rumsey
+  Closes #6574
+
+- [Patrick Monnerat brought this change]
+
+  test server: take care of siginterrupt() deprecation
+  
+  Closes #6529
+
+Marc Hoersken (21 Apr 2021)
+- lib1564.c: enable last wakeup test part on Windows
+  
+  Suggested-by: Gergely Nagy
+  Reviewed-by: Jay Satiro
   Reviewed-by: Marcel Raad
   
-  Fixes #5104
-  Closes #5110
+  Closes #6245
 
-Daniel Stenberg (18 Mar 2020)
-- writeout_json: use curl_off_t printf() option for the time output
+- multi: fix slow write/upload performance on Windows
   
-  Follow-up to: 04c03416e68fd635a15
+  Reset FD_WRITE by sending zero bytes which is permissible
+  and will be treated by implementations as successful send.
   
-  Closes #5115
+  Without this we won't be notified in case a socket is still
+  writable if we already received such a notification and did
+  not send any data afterwards on the socket. This would lead
+  to waiting forever on a writable socket being writable again.
+  
+  Assisted-by: Tommy Odom
+  Reviewed-by: Jay Satiro
+  Reviewed-by: Marcel Raad
+  Tested-by: tmkk on github
+  
+  Bug: #6146
+  Closes #6245
+
+- multi: reduce Win32 API calls to improve performance
+  
+  1. Consolidate pre-checks into a single Curl_poll call:
+  
+  This is an attempt to restructure the code in Curl_multi_wait
+  in such a way that less syscalls are made by removing individual
+  calls to Curl_socket_check via SOCKET_READABLE/SOCKET_WRITABLE.
+  
+  2. Avoid resetting the WinSock event multiple times:
+  
+  We finally call WSAResetEvent anyway, so specifying it as
+  an optional parameter to WSAEnumNetworkEvents is redundant.
+  
+  3. Wakeup directly in case no sockets are being monitoring:
+  
+  Fix the WinSock based implementation to skip extra waiting by
+  not sleeping in case no sockets are to be waited on and just
+  the WinSock event is being monitored for wakeup functionality.
+  
+  Assisted-by: Tommy Odom
+  Reviewed-by: Jay Satiro
+  Reviewed-by: Marcel Raad
+  
+  Bug: #6146
+  Closes #6245
+
+- Revert "Revert 'multi: implement wait using winsock events'"
+  
+  This reverts commit 2260e0ebe6d45529495231b3e37a0c58fb92a6a2,
+  also restoring previous follow up changes which were reverted.
+  
+  Authored-by: rcombs on github
+  Authored-by: Marc Hörsken
+  Reviewed-by: Jay Satiro
+  Reviewed-by: Marcel Raad
+  
+  Restores #5634
+  Reverts #6281
+  Part of #6245
+
+Daniel Stenberg (21 Apr 2021)
+- Revert "cmake: make libcurl library output name configurable"
+  
+  This reverts commit 1cba36d2166c396f987eea587cf92671b27acb92.
+  
+  CMake provides properties that can be set on a target to rename the
+  output artifact without changing the name of a target.
+  
+  Ref: #6899
+
+- [Michael Kolechkin brought this change]
+
+  sectransp: allow cipher name to be specified
+  
+  Add parser for CURLOPT_SSL_CIPHER_LIST option for Secure Transport (ST)
+  back-end. Similar to NSS and GSKit back-ends, new code parses string
+  value and configures ST library to use those ciphers for communication.
+  Create cipher spec data structure and initialize the array of specs with
+  cipher number, name, alias, and 'weak' flag.
+  
+  Mark triple-DES ciphers as 'weak', and exclude them from the default
+  ciphers list.
+  
+  Closes #6464
+
+- [Michael Kolechkin brought this change]
+
+  NSS: add ciphers to map
+  
+  Add cipher names to the `cipherlist` map, based on the list of ciphers
+  implemented by the NSS in the source code file
+  https://github.com/nss-dev/nss/blob/master/lib/ssl/sslenum.c
+  
+  Closes #6670
+
+- http2: remove DEBUG_HTTP2
+  
+  Accidentally committed in 605e84235
+
+- [Ralph Langendam brought this change]
+
+  cmake: make libcurl library output name configurable
+  
+  Closes #6899
+
+- sws: #ifdef S_IFSOCK use
+  
+  SCO OpenServer 5.0.7 does not define S_IFSOCK.
+  
+  Reported-by: Kevin R. Bulgrien
+  Bug: https://curl.se/mail/lib-2021-04/0074.html
+  Closes #6926
+
+- curl_setup: provide the shutdown flags wider
+  
+  By using #ifdef on the symbol names to work on anything that don't
+  provide them. SCO OpenServer 5.0.7, sys/socket.h does not define either
+  SHUT_RDWR, SHUT_RD, and SHUT_WR.
+  
+  Reported-by: Kevin R. Bulgrien
+  Bug: https://curl.se/mail/lib-2021-04/0073.html
+  Closes #6925
+
+- connect: use CURL_SA_FAMILY_T for portability
+  
+  Reported-by: Kevin R. Bulgrien
+  Bug: https://curl.se/mail/lib-2021-04/0071.html
+  
+  Closes #6918
+
+- urlapi: make sure no +/- signs are accepted in IPv4 numericals
+  
+  Follow-up to 56a037cc0ad1b2. Extends test 1560 to verify.
+  
+  Reported-by: Tuomas Siipola
+  Fixes #6916
+  Closes #6917
+
+- ConnectionExists: respect requests for h1 connections better
+  
+  ... for situations when multiplexing isn't enabled on the h2 connection
+  and h1 is explicitly requested for the transfer.
+  
+  Assisted-by: Gergely Nagy
+
+- multi: don't close connection HTTP_1_1_REQUIRED
+  
+  The ConnectionExists() function will note that the new transfer wants
+  less then h2 and that it can't multiplex it and therefor opt to open a
+  new connection instead.
+
+- http2: move the stream error field to the per-transfer storage
+  
+  Storing a stream error in the per-connection struct was an error that lead to
+  race conditions as subsequent stream handling could overwrite the error code
+  before it was used for the stream with the actual problem.
+  
+  Closes #6910
+
+- http2: call the handle-closed function correctly on closed stream
+  
+  This was this one condition where the stream could be closed due to an
+  error and the function would still wrongly just return 0 for it.
+  
+  Reported-by: Gergely Nagy
+  Fixes #6862
+  Closes #6910
+
+- test1660: check the created HSTS file as text mode
+  
+  Closes #6922
 
 - RELEASE-NOTES: synced
-  
-  Uh, I missed this in 1a46b218db
 
-- RELEASE-NOTES: synced
+- test 493: require https in curl to run
   
-  ... and bumped curlver.h to 7.70.0
+  Closes #6927
 
-Jay Satiro (18 Mar 2020)
-- http2: Fix erroneous debug message that h2 connection closed
+Jay Satiro (20 Apr 2021)
+- tool_operate: don't discard failed parallel transfer result
   
-  Prior to this change in libcurl debug builds http2 stream closure was
-  erroneously referred to as connection closure.
+  - Save a parallel transfer's result code only when it fails and the
+    transfer is not being retried.
+  
+  Prior to this change the result code was always set which meant that a
+  failed result could be erroneously discarded if a different transfer
+  later had a successful result (CURLE_OK).
   
   Before:
-  * nread <= 0, server closed connection, bailing
+  
+  > curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
+  > echo %ERRORLEVEL%
+  0
   
   After:
-  * nread == 0, stream closed, bailing
   
-  Closes https://github.com/curl/curl/pull/5118
+  > curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
+  > echo %ERRORLEVEL%
+  22
+  
+  Closes #xxxx
 
-Daniel Stenberg (18 Mar 2020)
-- tool_setopt: correct the copyright year range
-  
-  Follow-up to 5450428491
+- [Georeth Zhou brought this change]
 
-Jay Satiro (18 Mar 2020)
-- [Johannes Schindelin brought this change]
+  openssl: fix build error with OpenSSL < 1.0.2
+  
+  Closes https://github.com/curl/curl/pull/6920
 
-  schannel: add "best effort" revocation check option
+Viktor Szakats (19 Apr 2021)
+- README.md: delete Codacy UTM parameters & follow permanent redirect [ci skip]
   
-  - Implement new option CURLSSLOPT_REVOKE_BEST_EFFORT and
-    --ssl-revoke-best-effort to allow a "best effort" revocation check.
+  UTM parameters leak referrer and various marketing/tracking information
+  even if these would normally be stripped by website or client policy.
+  This link also works fine without them. Also took the opportunity to
+  update the URL to the one pointed to by the previous one via permanent
+  redirect.
   
-  A best effort revocation check ignores errors that the revocation check
-  was unable to take place. The reasoning is described in detail below and
-  discussed further in the PR.
-  
-  ---
-  
-  When running e.g. with Fiddler, the schannel backend fails with an
-  unhelpful error message:
-  
-          Unknown error (0x80092012) - The revocation function was unable
-          to check revocation for the certificate.
-  
-  Sadly, many enterprise users who are stuck behind MITM proxies suffer
-  the very same problem.
-  
-  This has been discussed in plenty of issues:
-  https://github.com/curl/curl/issues/3727,
-  https://github.com/curl/curl/issues/264, for example.
-  
-  In the latter, a Microsoft Edge developer even made the case that the
-  common behavior is to ignore issues when a certificate has no recorded
-  distribution point for revocation lists, or when the server is offline.
-  This is also known as "best effort" strategy and addresses the Fiddler
-  issue.
-  
-  Unfortunately, this strategy was not chosen as the default for schannel
-  (and is therefore a backend-specific behavior: OpenSSL seems to happily
-  ignore the offline servers and missing distribution points).
-  
-  To maintain backward-compatibility, we therefore add a new flag
-  (`CURLSSLOPT_REVOKE_BEST_EFFORT`) and a new option
-  (`--ssl-revoke-best-effort`) to select the new behavior.
-  
-  Due to the many related issues Git for Windows and GitHub Desktop, the
-  plan is to make this behavior the default in these software packages.
-  
-  The test 2070 was added to verify this behavior, adapted from 310.
-  
-  Based-on-work-by: georgeok <giorgos.n.oikonomou@gmail.com>
-  Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
-  Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-  
-  Closes https://github.com/curl/curl/pull/4981
+  Reviewed-by: Daniel Stenberg
+  Closes #6919
 
-- multi: Improve parameter check for curl_multi_remove_handle
+Daniel Stenberg (19 Apr 2021)
+- urlapi: "normalize" numerical IPv4 host names
   
-  - If an easy handle is owned by a multi different from the one specified
-    then return CURLM_BAD_EASY_HANDLE.
+  When the host name in a URL is given as an IPv4 numerical address, the
+  address can be specified with dotted numericals in four different ways:
+  a32, a.b24, a.b.c16 or a.b.c.d and each part can be specified in
+  decimal, octal (0-prefixed) or hexadecimal (0x-prefixed).
   
-  Prior to this change I assume user error could cause corruption.
+  Instead of passing on the name as-is and leaving the handling to the
+  underlying name functions, which made them not work with c-ares but work
+  with getaddrinfo, this change now makes the curl URL API itself detect
+  and "normalize" host names specified as IPv4 numericals.
   
-  Closes https://github.com/curl/curl/pull/5116
+  The WHATWG URL Spec says this is an okay way to specify a host name in a
+  URL. RFC 3896 does not allow them, but curl didn't prevent them before
+  and it seems other RFC 3896-using tools have not either. Host names used
+  like this are widely supported by other tools as well due to the
+  handling being done by getaddrinfo and friends.
+  
+  I decided to add the functionality into the URL API itself so that all
+  users of these functions get the benefits, when for example wanting to
+  compare two URLs. Also, it makes curl built to use c-ares now support
+  them as well and make curl builds more consistent.
+  
+  The normalization makes HTTPS and virtual hosted HTTP work fine even
+  when curl gets the address specified using one of the "obscure" formats.
+  
+  Test 1560 is extended to verify.
+  
+  Fixes #6863
+  Closes #6871
 
-Viktor Szakats (17 Mar 2020)
-- windows: suppress UI in all CryptAcquireContext() calls
+- libssh: fix "empty expression statement has no effect" warnings
   
-  Ref: https://docs.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontexta#parameters
-  Reviewed-by: Marc Hörsken
-  Closes https://github.com/curl/curl/pull/5088
+  ... by fixing macros to do-while constructs and moving out the calls to
+  "break" outside of the actual macro. It also fixes the problem where the
+  macro was used witin a loop and the break didn't do right.
+  
+  Reported-by: Emil Engler
+  Fixes #6847
+  Closes #6909
 
-Daniel Stenberg (17 Mar 2020)
-- writeout_json: add missing comma to fix the HTTP version
+- hsts: enable by default
   
-  Follow-up to 04c03416e68fd635a15
+  No longer considered experimental.
+  
+  Closes #6700
 
-- test 970: verify --write-out '%{json}'
+- vtls: refuse setting any SSL version
   
-  Makes curl_easy_getinfo() of "variable" numerical content instead return
-  the number set in the env variable `CURL_TIME`.
+  ... previously they were supported if a TLS library would (unexpectedly)
+  still support them, but from this change they will be refused already in
+  curl_easy_setopt(). SSLv2 and SSLv3 have been known to be insecure for
+  many years now.
   
-  Makes curl_version() of "variable" textual content. This guarantees a
-  stable version string which can be tested against. Environment variable
-  `CURL_VERSION` defines the content.
-  
-  Assisted-by: Mathias Gumz
+  Closes #6773
 
-- [Mathias Gumz brought this change]
+- curl: ignore options asking for SSLv2 or SSLv3
+  
+  Instead output a warning about it and continue with the defaults.
+  
+  These SSL versions are typically not supported by the TLS libraries since a
+  long time back already since they are inherently insecure and broken. Asking
+  for them to be used will just cause an error to be returned slightly later.
+  
+  In the unlikely event that a user's TLS library actually still supports these
+  protocol versions, this change might make the request a little less insecure.
+  
+  Closes #6772
 
-  writeout: support to generate JSON output
+- test972: verify the json output with jsonlint
   
-  This commit adds support to generate JSON via the writeout feature:
+  Make sure one of the azure jobs has jsonlint installed so that the test
+  runs there.
   
-      -w "%{json}"
-  
-  It leverages the existing infrastructure as much as possible. Thus,
-  generating the JSON on STDERR is possible by:
-  
-      -w "%{stderr}%{json}"
-  
-  This implements a variant of
-  https://github.com/curl/curl/wiki/JSON#--write-out-json.
-  
-  Closes #4870
+  Ref: #6905
 
-- CI: stop ignoring 323, it is disabled
+- [Jay Satiro brought this change]
 
-- DISABLED: disable test 323
+  tool_writeout: fix the HTTP_CODE json output
   
-  The test uses SRP to "a server not supporting it" but modern stunnel
-  versions will silently accept it and remain happy. The test is therefore
-  faulty.
+  Update test 970 accordingly.
   
-  I haven't figured out how to make stunnel explicitly reject SRP-using
-  connects.
-  
-  Reported-by: Marc Hörsken
-  Fixes #5105
-  Closes #5113
+  Reported-by: Michal Rus
+  Fixes #6905
+  Closes #6906
 
-Marc Hoersken (17 Mar 2020)
-- ci/tests: increase timeouts for torture builds on Azure Pipelines
+- openldap: protect SSL-specific code with proper #ifdef
   
-  For some reason the torture builds have slowed down recently.
-  
-  Reported-by: Daniel Stenberg
+  Closes #6901
 
-Daniel Stenberg (16 Mar 2020)
-- cmake: add support for building with wolfSSL
+- libssh2: fix Value stored to 'sshp' is never read
   
-  My working build cmdline:
+  Pointed out by scan-build
   
-  $ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON .
-  
-  Assisted-by: Brad King
-  Closes #5095
+  Closes #6900
 
-- tool_operate: fix add_parallel_transfers when more are in queue
-  
-  Trying to return early from the function if no new transfers were added
-  would break the "morep" argument and cause issues. This could lead to
-  zero content "transfers" (within quotes since they would never be
-  started) when parallel-max was reduced.
-  
-  Reported-by: Gavin Wong
-  Analyzed-by: Jay Satiro
-  Fixes #4937
-  Closes #5112
+- [Victor Vieux brought this change]
 
-- vtls: free ssl_config leftovers on out-of-memory
+  tool_getparam: replace (in-place) '%20' by '+' according to RFC1866
   
-  Torture testing 2034 and 2037 found this.
+  Signed-off-by: Victor Vieux <victorvieux@gmail.com>
   
-  Reported-by: Marc Hörsken
-  Fixes #5108
-  Closes #5109
+  Closes #6895
 
-Marc Hoersken (16 Mar 2020)
-- ci/tests: fix Azure Pipelines not running for pull requests
+- configure: provide --with-openssl, deprecate --with-ssl
   
-  Closes #5111
+  Makes the option more explicit.
+  
+  Closes #6887
 
-Daniel Stenberg (15 Mar 2020)
-- gskit: update the copyright year range
-  
-  Follow-up from 083603c63a3
-
-Marc Hoersken (15 Mar 2020)
-- gskit: use our internal select wrapper for portability
-  
-  Follow up to c52b342
-  Closes #5106
-
-- tests: fix verification of stdout in test 1452 due to newline
-  
-  Fixes test1452:41:1: error: missing </stdout> tag before </verify>
-
-- ci/tests: install impacket for SMB tests on FreeBSD using CirrusCI
-  
-  Also force the package index/cache to be updated before installing.
-  
-  Closes #5103
-
-- tests/README: add note about manually installing python-impacket
-  
-  Follow up to 4be2560
-
-Daniel Stenberg (15 Mar 2020)
-- transfer: cap retries of "dead connections" to 5
-  
-  When libcurl retries a connection due to it being "seemingly dead" or by
-  REFUSED_STREAM, it will now only do it up five times before giving up,
-  to avoid never-ending loops.
-  
-  Reported-by: Dima Tisnek
-  Bug: https://curl.haxx.se/mail/lib-2020-03/0044.html
-  Closes #5074
-
-- TODO: TLS-PSK with OpenSSL
-  
-  Closes #5081
-
-Marc Hoersken (15 Mar 2020)
-- select: add 'timeout_ms' wrap-around precaution to Curl_select
-
-- select: fix 'pending_ms' is assigned a value that is never used
-  
-  Detected by Codacy
-
-- select: move duplicate select preparation code into Curl_select
-  
-  Reviewed by Daniel Stenberg
-  Reviewed by Marcel Raad
-  Closes #5078
-
-Daniel Stenberg (15 Mar 2020)
-- connect: happy eyeballs cleanup
-  
-  Make sure each separate index in connn->tempaddr[] is used for a fixed
-  family (and only that family) during the connection process.
-  
-  If family one takes a long time and family two fails immediately, the
-  previous logic could misbehave and retry the same family two address
-  repeatedly.
-  
-  Reported-by: Paul Vixie
-  Reported-by: Jay Satiro
-  Fixes #5083
-  Fixes #4954
-  Closes #5089
-
-Marc Hoersken (15 Mar 2020)
-- ci/tests: fix and align setting TFLAGS for make test-nonflaky
-
-- ci/tests: install test suite dependencies stunnel and impacket
-
-- tests: remove python_dependencies for smbserver from our tree
-  
-  Users of the SMB tests will have to install impacket manually.
-  
-  Reasoning: our in-tree version of impacket was quite outdated
-  and only compatible with Python 2 which is already end-of-life.
-  Upgrading to Python 3 and a compatible impacket version would
-  require to import additional Python-only and CPython-extension
-  dependencies. This would have hindered portability enormously.
-  
-  Closes #5094
-
-Jay Satiro (14 Mar 2020)
-- Makefile.m32: Improve windres parameter compatibility
-  
-  - s/COFF/coff/
-  
-  Some versions of windres do not recognize uppercase COFF as a valid
-  way to specify the COFF output format.
-  
-  Reported-by: Steven Penny
-  
-  Fixes https://github.com/curl/curl/issues/5099
-  Closes https://github.com/curl/curl/pull/5101
-
-- easy: Fix curl_easy_duphandle for builds missing IPv6 that use c-ares
-  
-  - Ignore CURLE_NOT_BUILT_IN errors returned by c-ares functions in
-    curl_easy_duphandle.
-  
-  Prior to this change if c-ares was used as the resolver backend and
-  either it was too old or libcurl was built without IPv6 support then
-  some of our resolver functions could return CURLE_NOT_BUILT_IN to
-  curl_easy_duphandle causing it to fail.
-  
-  Caused by c8f086b which shipped in 7.69.1.
-  
-  Reported-by: Karl Chen
-  
-  Fixes https://github.com/curl/curl/issues/5097
-  Closes https://github.com/curl/curl/pull/5100
-
-Daniel Stenberg (13 Mar 2020)
-- docs: add warnings about FILE: URLs on Windows
-  
-   - --url man page section
-   - libcurl-security.3 gets the full text
-   - CURLOPT_URL.3
-  
-  Reported-by: Tim Sedlmeyer
-
-- server/getpart: make the "XML-parser" stricter
-  
-  When extracting a <section> <part> and there's no </part> before
-  </section>, this now outputs an error and returns a wrong string to
-  make users spot the mistake.
-  
-  Ref: #5070
-  Closes #5071
-
-Marc Hoersken (13 Mar 2020)
-- impacket: some more Python 3 code compatibility updates
-  
-  This makes smbserver load on Python 3, but still not work completely.
-
-- smbserver: pin Python version to 2 since we are not yet 3 compatible
-  
-  Even though the existing code can be fixed to run on Python 3, the
-  tests will fail due to the Unicode transition the protocol is invalid.
-  
-  Follow up to ee63837
-  Closes #5085
-
-Daniel Stenberg (12 Mar 2020)
-- [Viktor Szakats brought this change]
-
-  cleanup: fix some text/comment typos
-  
-  Closes #5087
-
-Marc Hoersken (12 Mar 2020)
-- smbserver: fix Python version specific ConfigParser import
-  
-  Follow up to ee63837 and 8c7c4a6
-  Fixes #5077
-
-Daniel Stenberg (11 Mar 2020)
 - RELEASE-NOTES: synced
   
-  bumped to 7.69.2
+  and bumped curlver to 7.77.0
 
-Dan Fandrich (11 Mar 2020)
-- tests/data: Fix some XML formatting issues in test cases
-  
-  This allows these test files to pass xmllint.
+- [Javier Blazquez brought this change]
 
-Daniel Stenberg (11 Mar 2020)
-- [Muhammad Herdiansyah brought this change]
+  rustls: only return CURLE_AGAIN when TLS session is fully drained
+  
+  The code in cr_recv was returning prematurely as soon as the socket
+  reported no more data to read. However, this could be leaving some
+  unread plaintext data in the rustls session from a previous call,
+  causing causing the transfer to hang if the socket never receives
+  further data.
+  
+  We need to ensure that the session is fully drained of plaintext data
+  before returning CURLE_AGAIN to the caller.
+  
+  Reviewed-by: Jacob Hoffman-Andrews
+  Closes #6894
 
-  Makefile: run the cd commands in a subshell
+- cookie: CURLOPT_COOKIEFILE set to NULL switches off cookies
   
-  In bmake, if the directory is changed (with cd or anything else), bmake
-  won't return to the "root directory" on the next command (in the same
-  Makefile rule). This commit runs the cd command in a subshell so it
-  would work in bmake.
+  Add test 676 to verify that setting CURLOPT_COOKIEFILE to NULL again clears
+  the cookiejar from memory.
   
-  Closes #5073
+  Reported-by: Stefan Karpinski
+  Fixes #6889
+  Closes #6891
 
-- configure: convert -I to -isystem as a last step
-  
-  As all the -I uses in CFLAGS at that point are for system headers and
-  third party libraries this helps us remove/ignore warnings on those!
-  
-  Closes #5060
+Version 7.76.1 (14 Apr 2021)
 
-- configure: fix -pedantic-errors for GCC 5 and later
+Daniel Stenberg (14 Apr 2021)
+- RELEASE-NOTES: synced
   
-  If --enable-werror is used.
-  
-  Follow-up to d5c0351055d5709da which added it too early in the configure
-  script before $compiler_num was set correctly and thus this option was
-  never used.
-  
-  Reported-by: Stepan Efremov
-  Fixes #5067
-  Closes #5068
+  curl 7.76.1 release
 
-- configure: document 'compiler_num' for gcc
+- THANKS: add names from 7.76.1
+
+- misc: update copyright year ranges to match latest updates
+
+- [Tatsuhiro Tsujikawa brought this change]
+
+  ngtcp2: Use ALPN h3-29 for now
   
-  The CURL_CHECK_COMPILER_GNU_C function sets the number to MAJOR*100 +
-  MINOR and ignores the patch version, and since gcc version 7 it only
-  sets it to MAJOR*100.
+  Fixes #6864
+  Cloes #6886
+
+Jay Satiro (11 Apr 2021)
+- TODO: remove 18.22 --fail-with-body
   
-  Reported-by: Stepan Efremov
-  Ref: #5067
-  Closes #5069
+  --fail-with-body was added in 8a964cb (precedes curl-7_76_0).
 
-Version 7.69.1 (11 Mar 2020)
+Daniel Stenberg (10 Apr 2021)
+- [Jürgen Gmach brought this change]
 
-Daniel Stenberg (11 Mar 2020)
-- RELEASE-NOTES: 7.69.1
+  src/tool_vms.c: remove duplicated word in comment
+  
+  Closes #6881
 
-- THANKS: from the 7.69.1 release
+- configure: fix CURL_DARWIN_CFLAGS use
+  
+  The macro name change was not completely done.
+  
+  Follow-up to 5d2c384452543c
+  Bug: https://github.com/curl/curl/commit/5d2c384452543c7b6c9fb02eaa0afc84fd5ab941#commitcomment-49315187
+  Reported-by: Marcel Raad
+  Closes #6878
+
+- [Anthony Shaw brought this change]
+
+  github/workflow: add "security-extended" to codeql-analysis.yml
+  
+  Extends the CodeQL code scan.
+  
+  Closes #6815
+
+- [Jochem Broekhoff brought this change]
+
+  examples/hiperfifo.c: check event_initialized before delete
+  
+  If event_del is called with the event struct (still) zeroed out, a
+  segmentation fault may occur.  event_initialized checks whether the
+  event struct is nonzero.
+  
+  Closes #6876
+
+- [Patrick Monnerat brought this change]
+
+  ntlm: fix negotiated flags usage
+  
+  According to Microsoft document MS-NLMP, current flags usage is not
+  accurate: flag NTLMFLAG_NEGOTIATE_NTLM2_KEY controls the use of
+  extended security in an NTLM authentication message and NTLM version 2
+  cannot be negotiated within the protocol.
+  
+  The solution implemented here is: if the extended security flag is set,
+  prefer using NTLM version 2 (as a server featuring extended security
+  should also support version 2). If version 2 has been disabled at
+  compile time, use extended security.
+  
+  Tests involving NTLM are adjusted to this new behavior.
+  
+  Fixes #6813
+  Closes #6849
+
+- [Patrick Monnerat brought this change]
+
+  ntlm: support version 2 on 32-bit platforms
+  
+  Closes #6849
+
+- [Patrick Monnerat brought this change]
+
+  curl_ntlm_core.h: simplify conditionals for USE_NTLM2SESSION
+  
+  ... as !defined(CURL_DISABLE_CRYPTO_AUTH) is a prerequisite for the
+  whole NTLM.
+  
+  Closes #6849
+
+- lib: remove unused HAVE_INET_NTOA_R* defines
+  
+  Closes #6867
+
+- [Michael Forney brought this change]
+
+  configure: include <time.h> unconditionally
+  
+  In 2682e5f5, several instances of AC_HEADER_TIME were removed since
+  it is a deprecated autoconf macro. However, this was the macro that
+  defined TIME_WITH_SYS_TIME, which was used to indicate that <time.h>
+  can be included alongside <sys/time.h>. TIME_WITH_SYS_TIME is still
+  used in the configure test body and since it is no longer defined,
+  <time.h> is *not* included on systems that have <sys/time.h>.
+  
+  In particular, at least on musl libc and glibc, <sys/time.h> does
+  not implicitly include <time.h> and does not declare clock_gettime,
+  gmtime_r, or localtime_r. This causes configure to fail to detect
+  those functions.
+  
+  The AC_HEADER_TIME macro deprecation text says
+  
+  > All current systems provide time.h; it need not be checked for.
+  > Not all systems provide sys/time.h, but those that do, all allow
+  > you to include it and time.h simultaneously.
+  
+  So, to fix this issue, simply include <time.h> unconditionally when
+  testing for time-related functions and in libcurl, and don't bother
+  checking for it.
+  
+  Closes #6859
+
+- [Michael Forney brought this change]
+
+  configure: remove use of RETSIGTYPE
+  
+  This was previously defined by the obsolete AC_TYPE_SIGNAL macro,
+  which was removed in 2682e5f5. The deprecation text says
+  
+  > Your code may safely assume C89 semantics that RETSIGTYPE is void.
+  
+  So, remove it and just use void instead.
+  
+  Closes #6861
+
+- [Muhammed Yavuz Nuzumlalı brought this change]
+
+  install: add instructions for Apple Darwin platforms
+  
+  Closes #6860
+
+- [Muhammed Yavuz Nuzumlalı brought this change]
+
+  configure: disable min version set for Darwin
+  
+  Fixes #6838
+  Closes #6860
+
+- [David Hu brought this change]
+
+  docs/HTTP3.md: update the build instruction using gnutls
+  
+  In ngtcp2 the `with-gnutls` option is disabled by default, which will
+  cause `curl` unable to be `make` because of lacking the libraries
+  needed.
+  
+  Closes #6857
+
+- RELEASE-NOTES: synced
+
+- typecheck-gcc: make the ssl-ctx-cb check use SSL_CTX pointers
+  
+  ... and not values.
+  
+  Reported-by: locpyl-tidnyd on github
+  Fixes #6818
+  Closes #6819
+
+- ngtcp2+gnutls: clear credentials when freed
+  
+  ... to avoid double-free.
+  
+  Reported-by: Kenneth Davidson
+  Fixes #6824
+  Closes #6856
+
+Jay Satiro (5 Apr 2021)
+- [Cherish98 brought this change]
+
+  tool_progress: Fix progress meter in parallel mode
+  
+  Make sure the total amount of DL/UL bytes are counted before the
+  transfer finalizes. Otherwise if a transfer finishes too quick, its
+  total numbers are not added, and results in a DL%/UL% that goes above
+  100%.
+  
+  Detail:
+  
+  progress_meter() is called periodically, and it may not catch a
+  transfer's total bytes if the value was unknown during the last call,
+  and the transfer is finished and deleted (i.e., lost) during the next
+  call.
+  
+  Closes https://github.com/curl/curl/pull/6840
+
+- [Emil Engler brought this change]
+
+  libssh: get rid of PATH_MAX
+  
+  This removes the last occurrence of PATH_MAX inside our libssh
+  implementation by calculating the path length from the string length of
+  the two components.
+  
+  Closes #6829
+
+Daniel Stenberg (5 Apr 2021)
+- http_proxy: only loop on 407 + close if we have credentials
+  
+  ... to fix the retry-loop.
+  
+  Add test 718 to verify.
+  
+  Reported-by: Daniel Kurečka
+  Fixes #6828
+  Closes #6850
+
+- h2: allow 100 streams by default
+  
+  instead of 13, before the server has told how many streams it
+  accepts. The server can always reject new streams anyway if we go above
+  what it accepts.
+  
+  Ref: #6826
+  Closes #6852
+
+- [Luke Granger-Brown brought this change]
+
+  file: support GETing directories again
+  
+  After 957bc1881e686f9714c4e6a01bf33535091f0e21, we no longer compute an
+  expected_size for directories. This has the upshot that when we compare
+  even an empty Range with the available size, we fail.
+  
+  This brings back the previous behaviour, which was to succeed, but with
+  empty content. This also removes the "Accept-ranges: bytes" header,
+  which is nonsensical on directories.
+  
+  Adds test 3016
+  Fixes #6845
+  Closes #6846
+
+- RELEASE-NOTES: synced
+  
+  and bumped to 7.76.1
+
+- TLS: fix HTTP/2 selection
+  
+  for GnuTLS, BearSSL, mbedTLS, NSS, SChannnel, Secure Transport and
+  wolfSSL...
+  
+  Regression since 88dd1a8a115b1f5ece (shipped in 7.76.0)
+  Reported-by: Kenneth Davidson
+  Reported-by: romamik om github
+  Fixes #6825
+  Closes #6827
+
+Jay Satiro (2 Apr 2021)
+- hostip: Fix for builds that disable all asynchronous DNS
+  
+  - Define Curl_resolver_error function only when USE_CURL_ASYNC.
+  
+  Prior to this change building curl without an asynchronous resolver
+  backend (c-ares or threaded) and without DoH (DNS-over-HTTPS, which is
+  also asynchronous but independent of resolver backend) would cause a
+  build error since Curl_resolver_error is called by and evaluates
+  variables only available in asynchronous builds.
+  
+  Reported-by: Benbuck Nason
+  
+  Fixes https://github.com/curl/curl/issues/6831
+  Closes https://github.com/curl/curl/pull/6832
+
+Daniel Stenberg (31 Mar 2021)
+- [Gilles Vollant brought this change]
+
+  openssl: Fix CURLOPT_SSLCERT_BLOB without CURLOPT_SSLCERT_KEY
+  
+  Reported-by: Christian Schmitz
+  Fixes #6816
+  Closes #6820
+
+Version 7.76.0 (31 Mar 2021)
+
+Daniel Stenberg (31 Mar 2021)
+- RELEASE-NOTES: synced
+  
+  curl 7.76.0 release
+
+- THANKS: added names from 7.76.0
+
+- CURLOPT_AUTOREFERER.3: clarify that it sets the full URL
+  
+  ... some users may not want that!
+
+- define: remove CURL_DISABLE_NTLM ifdefs
+  
+  It was never defined anywhere. Fixed disable-scan (test 1165) to also
+  scan headers, which found this issue.
+  
+  Closes #6809
+
+- vtls: fix addsessionid for non-proxy builds
+  
+  Follow-up to b09c8ee15771c61
+  Fixes #6812
+  Closes #6811
+
+- [Li Xinwei brought this change]
+
+  cmake: support WinIDN
+  
+  Closes #6807
+
+- transfer: clear 'referer' in declaration
+  
+  To silence (false positive) compiler warnings about it.
+  
+  Follow-up to 7214288898f5625
+  
+  Reviewed-by: Marcel Raad
+  Closes #6810
 
 - [Marc Hoersken brought this change]
 
-  test1129: fix invalid case of closing XML-tag and Content-Length
+  config: fix SSPI enabling NTLM if crypto auth is disabled
   
-  Fixes #5070
-  Closes #5072
-
-Marc Hoersken (10 Mar 2020)
-- tests/data: fix static ip instead of dynamic value being used
+  Avoid enabling NTLM feature based upon Windows SSPI
+  being enabled in case that crypto auth is disabled.
   
-  Follow up to 94ced8e
-
-- tests/data: fix static ip:port instead of dynamic values being used
+  Reported-by: Marcel Raad
   
-  Closes #5065
+  Follow-up to #6277
+  Fixes #6803
+  Closes #6808
 
-- tests/server: fix missing use of exe_ext helper function
+- HISTORY: add two 2021 events
+
+- vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
   
-  Follow up to 9819984 and 3dce984
-  Reviewed-By: Daniel Stenberg
-  Closes #5064
-
-- runtests: log minimal and maximal used port numbers
-
-Daniel Stenberg (9 Mar 2020)
-- [James Fuller brought this change]
-
-  sftp: fix segfault regression introduced by #4747
+  To make sure we set and extract the correct session.
   
-  This fix adds a defensive check for the case where the char *name in
-  struct libssh2_knownhost is NULL
+  Reported-by: Mingtao Yang
+  Bug: https://curl.se/docs/CVE-2021-22890.html
   
-  Fixes #5041
-  Closes #5062
+  CVE-2021-22890
+
+- [Viktor Szakats brought this change]
+
+  transfer: strip credentials from the auto-referer header field
+  
+  Added test 2081 to verify.
+  
+  CVE-2021-22876
+  
+  Bug: https://curl.se/docs/CVE-2021-22876.html
+
+- curl_sasl: fix compiler error with --disable-crypto-auth
+  
+  ... if libgsasl was found.
+  
+  Closes #6806
+
+- [Patrick Monnerat brought this change]
+
+  ldap: only set the callback ptr for TLS context when TLS is used
+  
+  Follow-up to a5eee22e594c2460f
+  Fixes #6804
+  Closes #6805
+
+- copyright: update copyright year ranges to 2021
+  
+  Reviewed-by: Emil Engler
+  Closes #6802
+
+- send_speed: simplify the checks for if a speed limit is set
+  
+  ... as we know the value cannot be set to negative: enforced by
+  setopt()
+
+- http: cap body data amount during send speed limiting
+  
+  By making sure never to send off more than the allowed number of bytes
+  per second the speed limit logic is given more room to actually work.
+  
+  Reported-by: Fabian Keil
+  Bug: https://curl.se/mail/lib-2021-03/0042.html
+  Closes #6797
+
+- urldata: merge "struct DynamicStatic" into "struct UrlState"
+  
+  Both were used for the same purposes and there was no logical separation
+  between them. Combined, this also saves 16 bytes in less holes in my
+  test build.
+  
+  Closes #6798
+
+- tests/README.md: mentioned that en_US.UTF-8 is required
+  
+  Reported-by: Oumph on github
+  Fixes #6768
+
+- HISTORY: fixed the Mac OS X 10.1 release date
+  
+  Based on what Wikipedia says
+
+Jay Satiro (26 Mar 2021)
+- examples: Remove threaded-shared-conn.c due to bug
+  
+  Known bug 11.11 is the shared object's connection cache is not thread
+  safe, so we should not have an example for it.
+  
+  Ref: https://github.com/curl/curl/issues/4915
+  Ref: https://curl.se/docs/knownbugs.html#A_shared_connection_cache_is_not
+  
+  Closes https://github.com/curl/curl/pull/6795
+
+- KNOWN_BUGS: Update 11.9 - DoH option inheritance
+  
+  - Add description: Explain that some options aren't inherited because
+    they are not relevant for the DoH SSL connections or may result in
+    unexpected behavior.
+  
+  - Remove the reference to #4578 (SSL verify options not inherited) since
+    that was fixed by #6597 (separate DoH-specific options for verify).
+  
+  - Explain that DoH-specific options (those created by #6597) are
+    available: CURLOPT_DOH_SSL_VERIFYHOST, CURLOPT_DOH_SSL_VERIFYPEER and
+    CURLOPT_DOH_SSL_VERIFYSTATUS.
+  
+  - Add a reference to #6605 and explain that the user's debug function is
+    not inherited because it would be unexpected to pass internal handles
+    (ie DoH handles) to the user's callback.
+  
+  Closes https://github.com/curl/curl/issues/6605
+
+Daniel Stenberg (26 Mar 2021)
+- curl_easy_setopt.3: add curl_easy_option* functions to SEE ALSO
+
+- [Jean-Philippe Menil brought this change]
+
+  openssl: ensure to check SSL_CTX_set_alpn_protos return values
+  
+  SSL_CTX_set_alpn_protos() return 0 on success, and non-0 on failure
+  
+  Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
+  
+  Closes #6794
+
+- multi: close the connection when h2=>h1 downgrading
+  
+  Otherwise libcurl is likely to reuse the connection again in the next
+  attempt since the connection reuse logic doesn't take downgrades into
+  account.
+  
+  Reported-by: Anthony Ramine
+  Fixes #6788
+  Closes #6793
+
+- openssl: set the transfer pointer for logging early
+  
+  Otherwise, the transfer will be NULL in the trace function when the
+  early handshake details arrive and then curl won't show them.
+  
+  Regresssion in 7.75.0
+  
+  Reported-by: David Hu
+  Fixes #6783
+  Closes #6792
 
 - RELEASE-NOTES: synced
 
-- socks4: fix host resolve regression
+- TODO: Custom progress meter update interval
   
-  1. The socks4 state machine was broken in the host resolving phase
-  
-  2. The code now insists on IPv4-only when using SOCKS4 as the protocol
-  only supports that.
-  
-  Regression from #4907 and 4a4b63d, shipped in 7.69.0
-  
-  Reported-by: amishmm on github
-  Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
-  Closes #5061
+  Ref: https://stackoverflow.com/q/66789977/93747
 
-- [Patrick Monnerat brought this change]
+- docs/ABI: tighten up the language
+  
+  Make the promises more firm
+  
+  Closes #6786
 
-  silly web server: silent a compilation warning
+- openldap: disconnect better
   
-  Recent gcc warns when byte count of strncpy() equals the destination
-  buffer size. Since the destination buffer is previously cleared and
-  the source string is always shorter, reducing the byte count by one
-  silents the warning without affecting the result.
+  Instead of clearing the callback argument in disconnect, set it to the
+  (new) transfer to make sure the correct data is passed to the callbacks.
   
-  Closes #5059
+  Follow-up to e467ea3bd937f38
+  Assisted-by: Patrick Monnerat
+  Closes #6787
 
-- [Patrick Monnerat brought this change]
+- libssh2: kdb_callback: get the right struct pointer
+  
+  After the recent conn/data refactor in this source file, this function
+  was mistakenly still getting the old struct pointer which would lead to
+  crash on servers with keyboard-interactive auth enabled.
+  
+  Follow-up to a304051620b92e12b (shipped in 7.75.0)
+  
+  Reported-by: Christian Schmitz
+  Fixes #6691
+  Closes #6782
 
-  cookie: get_top_domain() sets zero length for null domains
+- tftp: remove unused struct fields
   
-  This silents a compilation warning with gcc -O3.
+  Follow-up to d3d90ad9c00530d
+  
+  Closes #6781
 
-- [Patrick Monnerat brought this change]
+- openldap: avoid NULL pointer dereferences
+  
+  Follow-up to a59c33ceffb8f78
+  Reported-by: Patrick Monnerat
+  Fixes #6676
+  Closes #6780
 
-  test 1560: avoid valgrind false positives
+- http: strip default port from URL sent to proxy
   
-  When using maximum code optimization level (-O3), valgrind wrongly
-  detects uses of uninitialized values in strcmp().
+  To make sure the Host: header and the URL provide the same authority
+  portion when sent to the proxy, strip the default port number from the
+  URL if one was provided.
   
-  Preset buffers with all zeroes to avoid that.
+  Reported-by: Michael Brown
+  Fixes #6769
+  Closes #6778
 
-Steve Holme (8 Mar 2020)
-- sha256: Added WinCrypt implementation
+- azure: disable test 433 on azure-ubuntu
   
-  Closed #5030
+  Something in that environment sets XDG_CONFIG_HOME for us in a way that
+  breaks the test.
+  
+  Reported-by: Marc Hörsken
+  Fixes #6739
+  Closes #6777
 
-- sha256: Added SecureTransport implementation
+- tftp: remove the 3600 second default timeout
+  
+  ... it was never meant to be there.
+  
+  Reported-by: Tomas Berger
+  Fixes #6774
+  Closes #6776
 
-Daniel Stenberg (7 Mar 2020)
-- lib1564: reduce number of mid-wait wakeup calls
+- docs: make gen.pl support *italic* and **bold**
   
-  This test does A LOT of *wakeup() calls and then calls curl_multi_poll()
-  twice. The first *poll() is then expected to return early and the second
-  not - as the first is supposed to drain the socketpair pipe.
+  Remove some nroffisms from the cmdline doc files to simplify editing,
+  and instead support this markdown style.
   
-  It turns out however that when given "excessive" amounts of writes to
-  the pipe, some operating systems (the Solaris based are known) will
-  return EAGAIN before the pipe is drained, which in our test case causes
-  the second *poll() call to also abort early.
-  
-  This change attempts to avoid the OS-specific behaviors in the test by
-  reducing the amount of wakeup calls from 1234567 to 10.
-  
-  Reported-by: Andy Fiddaman
-  Fixes #5037
-  Closes #5058
+  Closes #6771
 
-- [Patrick Monnerat brought this change]
-
-  mime: fix the binary encoder to handle large data properly
+- ngtcp2: sync with recent API updates
   
-  New test 666 checks this is effective.
-  As upload buffer size is significant in this kind of tests, shorten it
-  in similar test 652.
-  
-  Fixes #4860
-  Closes #4833
-  Reported-by: RuurdBeerstra on github
-
-- [Patrick Monnerat brought this change]
-
-  mime: do not perform more than one read in a row
-  
-  Input buffer filling may delay the data sending if data reads are slow.
-  To overcome this problem, file and callback data reads do not accumulate
-  in buffer anymore. All other data (memory data and mime framing) are
-  considered as fast and still concatenated in buffer.
-  As this may highly impact performance in terms of data overhead, an early
-  end of part data check is added to spare a read call.
-  When encoding a part's data, an encoder may require more bytes than made
-  available by a single read. In this case, the above rule does not apply
-  and reads are performed until the encoder is able to deliver some data.
-  
-  Tests 643, 644, 645, 650 and 654 have been adapted to the output data
-  changes, with test data size reduced to avoid the boredom of long lists of
-  1-byte chunks in verification data.
-  New test 667 checks mimepost using single-byte read callback with encoder.
-  New test 668 checks the end of part data early detection.
-  
-  Fixes #4826
-  Reported-by: MrdUkk on github
-
-- [Patrick Monnerat brought this change]
-
-  mime: latch last read callback status.
-  
-  In case a read callback returns a status (pause, abort, eof,
-  error) instead of a byte count, drain the bytes read so far but
-  remember this status for further processing.
-  Takes care of not losing data when pausing, and properly resume a
-  paused mime structure when requested.
-  New tests 670-673 check unpausing cases, with easy or multi
-  interface and mime or form api.
-  
-  Fixes #4813
-  Reported-by: MrdUkk on github
-
-Marc Hoersken (7 Mar 2020)
-- runtests: fix missing use of exe_ext helper function
-
-Daniel Stenberg (7 Mar 2020)
-- [Ernst Sjöstrand brought this change]
-
-  ares: store dns parameters for duphandle
-  
-  With c-ares the dns parameters lives in ares_channel. Store them in the
-  curl handle and set them again in easy_duphandle.
-  
-  Regression introduced in #3228 (6765e6d), shipped in curl 7.63.0.
-  
-  Fixes #4893
-  Closes #5020
-  Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
-
-- version: make curl_version* thread-safe without using global context
-  
-  Closes #5010
+  Closes #6770
 
 - RELEASE-NOTES: synced
 
-Marc Hoersken (7 Mar 2020)
-- tests: use native Sleep function as fallback on Windows
+- libssh2:ssh_connect: clear session pointer after free
   
-  Reviewed-By: Daniel Stenberg
-  Closes #5054
+  If libssh2_knownhost_init() returns NULL, like in an OOM situation, the
+  ssh session was freed but the pointer wasn't cleared which made libcurl
+  later call libssh2 to cleanup using the stale pointer.
+  
+  Fixes #6764
+  Closes #6766
 
-- perl: align order and completeness of Windows OS checks
+- [Jacob Hoffman-Andrews brought this change]
 
-Daniel Stenberg (7 Mar 2020)
-- tool_cb_see: set correct copyright year range
+  docs: document version of crustls dependency
   
-  Follow-up to a39e5bfb9
+  This also pins a specific release in the Travis test so future
+  API-breaking changins in crustls won't break curl builds.
+  
+  Add RUSTLS documentation to release tarball.
+  
+  Enable running tests for rustls, minus FTP tests (require
+  connect_blocking, which rustls doesn't implement) and 313 (requires CRL
+  handling).
+  
+  Closes #6763
 
-Marc Hoersken (7 Mar 2020)
-- seek: fix fallback for missing ftruncate on Windows
-  
-  This fixes test 198 on versions of MinGW-w64 without ftruncate
-  
-  Reviewed-By: Daniel Stenberg
-  Reviewed-By: Marcel Raad
-  Closes #5055
+- [Jacob Hoffman-Andrews brought this change]
 
-- config-win32: Windows does not have ftruncate
+  rustls: Handle close_notify.
+  
+  If we get a close_notify, treat that as EOF. If we get an EOF from the
+  TCP stream, treat that as an error (because we should have ended the
+  connection earlier, when we got a close_notify).
+  
+  Closes #6763
 
-Daniel Stenberg (7 Mar 2020)
-- pause: force a connection (re-)check after unpausing
+- docs: clarify timeouts for queued transfers in multi API
   
-  There might be data available that was already read off the socket, for
-  example in the TLS layer.
-  
-  Reported-by: Anders Berg
-  Fixes #4966
-  Closes #5049
+  Closes #6758
 
-- socks5: switch state properly when the resolve is done
+- ftpserver: only load the preprocessed test file
   
-  Regression from 4a4b63d (and #4907)
-  Reported-by: vitaha85 on github
-  Fixes #5053
-  Closes #5056
+  We always preprocess and tests are no longer sensible to load "raw"
+  
+  Closes #6738
 
-Jay Satiro (7 Mar 2020)
-- libssh: Fix matching user-specified MD5 hex key
+- tests: use %TESTNUMBER instead of fixed number
   
-  Prior to this change a match would never be successful because it
-  was mistakenly coded to compare binary data from libssh to a
-  user-specified hex string (ie CURLOPT_SSH_HOST_PUBLIC_KEY_MD5).
+  This makes the tests easier to copy and relocate to other test numbers
+  without having to update content.
   
-  Reported-by: fds242@users.noreply.github.com
-  
-  Fixes https://github.com/curl/curl/issues/4971
-  Closes https://github.com/curl/curl/pull/4974
+  Closes #6738
 
-Daniel Stenberg (6 Mar 2020)
-- pause: bail out on bad input
+- KNOWN_BUGS: CURLOPT_OPENSOCKETPAIRFUNCTION is missing
   
-  A NULL easy handle or an easy handle without an associated connection
-  cannot be paused or unpaused.
-  
-  Closes #5050
+  Closes #5747
 
-Steve Holme (6 Mar 2020)
-- unit1612: fixed the inclusion and compilation of the HMAC unit test
+- TODO: provide timing info for each redirect
   
-  Follow up to 3f74e5e6 to fix:
-  
-  - A typo in Makefile.inc where unit1611 was used instead
-  - Some compilation issues in unit1612.c
-  
-  Closes #5024
+  Closes #6743
 
-Daniel Stenberg (6 Mar 2020)
-- pause: return early for calls that don't change pause state
+Jay Satiro (17 Mar 2021)
+- docs: Add SSL backend names to CURL_SSL_BACKEND
   
-  Reviewed-by: Patrick Monnerat
-  Ref: #4833
-  Closes #5026
+  - Document the names that can be used with CURL_SSL_BACKEND:
+    bearssl, gnutls, gskit, mbedtls, mesalink, nss, openssl, rustls,
+    schannel, secure-transport, wolfssl
+  
+  Ref: https://github.com/curl/curl/issues/2209#issuecomment-360623286
+  Ref: https://github.com/curl/curl/issues/6717#issuecomment-800745201
+  
+  Closes https://github.com/curl/curl/pull/6755
 
-Jay Satiro (6 Mar 2020)
-- curl_share_setopt.3: Note sharing cookies doesn't enable the engine
+- docs: Explain DOH transfers inherit some SSL settings
   
-  Follow-up to d0a7ee3 which fixed a bug in 7.66.0 that caused
-  CURL_LOCK_DATA_COOKIE to enable the easy handle's cookie engine.
+  - Document in DOH that some SSL settings are inherited but DOH hostname
+    and peer verification are not and are controlled separately.
   
-  Bug: https://curl.haxx.se/mail/lib-2020-03/0019.html
-  Reported-by: Felipe Gasper
+  - Document that CURLOPT_SSL_CTX_FUNCTION is inherited by DOH handles but
+    we're considering changing behavior to no longer inherit it. Request
+    feedback.
   
-  Closes https://github.com/curl/curl/pull/5048
+  Closes https://github.com/curl/curl/pull/6688
 
-- multi: skip EINTR check on wakeup socket if it was closed
+Daniel Stenberg (17 Mar 2021)
+- http: make 416 not fail with resume + CURLOPT_FAILONERRROR
   
-  - Don't check errno on wakeup socket if sread returned 0 since sread
-    doesn't set errno in that case.
+  When asked to resume a download, libcurl will convert that to HTTP logic
+  and if then the entire file is already transferred it will result in a
+  416 response from the HTTP server. With CURLOPT_FAILONERRROR set in that
+  scenario, it should *not* lead to an error return.
   
-  This is a follow-up to cf7760a from several days ago which fixed
-  Curl_multi_wait to stop busy looping sread on the non-blocking wakeup
-  socket if it was closed (ie sread returns 0). Due to a logic error it
-  was still possible to busy loop in that case if errno == EINTR.
+  Updated test 1156, added test 1273
   
-  Closes https://github.com/curl/curl/pull/5047
+  Reported-by: Jonathan Watt
+  Fixes #6740
+  Closes #6753
 
-Daniel Stenberg (6 Mar 2020)
-- transfer: set correct copyright year range
+- Curl_timeleft: check both timeouts during connect
+  
+  The duration of a connect and the total transfer are calculated from two
+  different time-stamps. It can end up with the total timeout triggering
+  before the connect timeout expires and we should make sure to
+  acknowledge whichever timeout that is reached first.
+  
+  This is especially notable when a transfer first sits in PENDING, as
+  that time is counted in the total time but the connect timeout is based
+  on the time since the handle changed to the CONNECT state.
+  
+  The CONNECTTIMEOUT is per connect attempt. The TIMEOUT is for the entire
+  operation.
+  
+  Fixes #6744
+  Closes #6745
+  Reported-by: Andrei Bica
+  Assisted-by: Jay Satiro
 
-- urldata: remove the 'stream_was_rewound' connectdata struct member
+- configure: remove use of deprecated macros
   
-  ... as it is never set anywhere.
-  
-  Follow-up to 2f44e94ef
-  Closes #5046
+  AC_HEADER_TIME, AC_HEADER_STDC and AC_TYPE_SIGNAL
 
-- Revert "pause: force-drain the transfer on unpause"
+- configure: make AC_TRY_* into AC_*_IFELSE
   
-  This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000)
+  ... as the former versions are deprecated.
+
+- configure: s/AC_HELP_STRING/AS_HELP_STRING
   
-  Clearly that didn't solve the problem correctly.
+  AC_HELP_STRING is deprecated in 2.70+ and I believe AS_HELP_STRING works
+  already since 2.59 so bump the minimum required version to that.
   
-  Reported-by: Christopher Reid
-  Reopens #4966
-  Fixes #5044
+  Reported-by: Emil Engler
+  Fixes #6647
+  Closes #6748
+
+- RELEASE-NOTES: synced
+
+- travis: use ubuntu nghttp2 package instead of build our own
+  
+  Closes #6751
+
+- travis: bump wolfssl to 4.7.0
+
+- travis: only build wolfssl when needed
+  
+  Closes #6751
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  rustls: allocate a buffer for TLS data.
+  
+  Previously, rustls was using an on-stack array for TLS data. However,
+  crustls has an (unusual) requirement that buffers it deals with are
+  initialized before writing to them. By using calloc, we can ensure the
+  buffer is initialized once and then reuse it across calls.
+  
+  Closes #6742
+
+- travis: add a rustls build
+  
+  ... that doesn't run any tests (yet)
+  
+  Closes #6750
+
+- HTTP2: remove the outdated remark about multiplexing for the tool
+
+- [Robert Ronto brought this change]
+
+  http2: don't set KEEP_SEND when there's no more data to be sent
+  
+  this should fix an issue where curl sometimes doesn't send out a request
+  with authorization info after a 401 is received over http2
+  
+  Closes #6747
+
+Marc Hoersken (15 Mar 2021)
+- config: fix building SMB with configure using Win32 Crypto
+  
+  Align conditions for NTLM features between CMake and configure
+  builds by differentiating between USE_NTLM and USE_CURL_NTLM_CORE,
+  just like curl_setup.h does internally to detect support of:
+  
+  - USE_NTLM: required for NTLM crypto authentication feature
+  - USE_CURL_NTLM_CORE: required for SMB protocol
+  
+  Implement USE_WIN32_CRYPTO detection by checking for Crypt functions
+  in wincrypt.h which are not available in the Windows App environment.
+  
+  Link advapi32 and crypt32 for Crypto API and Schannel SSL backend.
+  Fix condition of Schannel SSL backend in CMake build accordingly.
+  
+  Reviewed-by: Marcel Raad
+  
+  Closes #6277
+
+- config: fix detection of restricted Windows App environment
+  
+  Move the detection of the restricted Windows App environment
+  in curl_setup.h before the definition of USE_WIN32_CRYPTO
+  via included config-win32.h in case no build system is used.
+  
+  Reviewed-by: Marcel Raad
+  
+  Part of #6277
+
+Daniel Stenberg (15 Mar 2021)
+- HISTORY: curl 7.7.2 was the first version used in Mac OS X 10.1
+
+- gen.pl: quote "bare" minuses in the nroff curl.1
+  
+  Reported-by: Alejandro Colomar
+  Fixes #6698
+  Closes #6722
+
+Daniel Gustafsson (14 Mar 2021)
+- hsts: remove unused defines
+  
+  MAX_HSTS_SUBLEN and MAX_HSTS_SUBLENSTR were unused from the initial commit,
+  and mostly likely leftovers from early development.  Remove as they're not
+  used for anything.
+  
+  Closes #6741
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+
+Daniel Stenberg (12 Mar 2021)
+- github: add torture-ftp for FTP-only torture testing
+  
+  and at 20% to try to keep the run-time reasonable
+  
+  Closes #6728
+
+- travis: split "torture" into a separate "events" build as well
+  
+  Run torture without FTP and reducing coverage to 20%
+  
+  For some reason the torture tests now run a lot slower on travis and run
+  into the 50 minute limit all the time.
+  
+  Closes #6728
+
+- ftp: fix memory leak in ftp_done
+  
+  If after a transfer is complete Curl_GetFTPResponse() returns an error,
+  curl would not free the ftp->pathalloc block.
+  
+  Found by torture-testing test 576
+  
+  Closes #6737
+
+- [oxalica brought this change]
+
+  http2: fail if connection terminated without END_STREAM
+  
+  Closes #6736
+
+- RELEASE-NOTES: synced
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  rustls: support CURLOPT_SSL_VERIFYPEER
+  
+  This requires the latest main branch of crustls, which provides
+  rustls_client_config_builder_dangerous_set_certificate_verifier and
+  rustls_client_config_builder_set_enable_sni.
+  
+  This refactors the session setup into its own function, and adds a new
+  function cr_hostname_is_ip. Because crustls doesn't support verification
+  of IP addresses, special handling is needed: We disable SNI and set a
+  placeholder hostname (which never actually gets sent on the wire).
+  
+  Closes #6719
+
+Daniel Gustafsson (12 Mar 2021)
+- cookies: Fix potential NULL pointer deref with PSL
+  
+  Curl_cookie_init can be called with data being NULL, and this can in turn
+  be passed to Curl_cookie_add, meaning that both functions must be careful
+  to only use data where it's checked for being a NULL pointer.  The libpsl
+  support code does however dereference data without checking, so if we are
+  indeed having an unset data pointer we cannot PSL check the cookiedomain.
+  
+  This is currently not a reachable dereference, as the only caller with a
+  NULL data isn't passing a file to initialize cookies from, but since the
+  API has this contract let's ensure we hold it.
+  
+  Closes #6731
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+
+Daniel Stenberg (12 Mar 2021)
+- [Michael Hordijk brought this change]
+
+  configure: only add OpenSSL paths if they are defined
+  
+  Add paths for OpenSSL compiling and linking only if they have been
+  defined.  If they haven't been defined, we'll assume that the paths are
+  already available to the toolchain.
+  
+  Closes #6730
+
+Jay Satiro (12 Mar 2021)
+- retry.d: Clarify transient 5xx HTTP response codes
+  
+  - Clarify the only 5xx response codes that are treated as transient are
+    500, 502, 503 and 504.
+  
+  Prior to this change it said it treated all 5xx as transient, but the
+  code says otherwise.
+  
+  Ref: https://github.com/curl/curl/blob/curl-7_75_0/src/tool_operate.c#L462-L495
+  
+  Closes https://github.com/curl/curl/pull/6724
+
+- retry-all-errors.d: Explain curl errors versus HTTP response errors
+  
+  - Add a paragraph explaining that curl does not consider HTTP response
+    errors as curl errors, and how that behavior can be modified by using
+    --retry and --fail.
+  
+  The --retry-all-errors doc says "Retry on any error" which some users
+  may find misleading without the added explanation.
+  
+  Ref: https://curl.se/docs/faq.html#Why_do_I_get_downloaded_data_eve
+  Ref: https://curl.se/docs/faq.html#curl_doesn_t_return_error_for_HT
+  
+  Reported-by: Lawrence Gripper
+  
+  Fixes https://github.com/curl/curl/issues/6712
+  Closes https://github.com/curl/curl/pull/6720
+
+Daniel Stenberg (11 Mar 2021)
+- travis: switch ngtcp2 build over to quictls
+  
+  The ngtcp2 project switched over to using the quictls OpenSSL fork
+  instead of their own patched OpenSSL. We follow suit.
+  
+  Closes #6729
+
+- test220/314: adjust to run with Hyper
+
+- c-hyper: support automatic content-encoding
+  
+  Closes #6727
+
+- http: remove superfluous NULL assign
+  
+  Closes #6727
+
+- tool_operate: bail if set CURLOPT_HTTP09_ALLOWED returns error
+  
+  Closes #6727
+
+- setopt: error on CURLOPT_HTTP09_ALLOWED set true with Hyper
+  
+  Not supported.
+  
+  Closes #6727
+
+- test306: make it not run with Hyper
+  
+  ... as it tests HTTP/0.9 which Hyper doesn't support.
+
+- test304: header CRLF cleanup to work with Hyper
+
+- FTP: allow SIZE to fail when doing (resumed) upload
+  
+  Added test 362 to verify.
+  
+  Reported-by: Jordan Brown
+  Regression since 7ea2e1d0c5a7f (7.73.0)
+  Fixes #6715
+  Closes #6725
+
+- configure: provide Largefile feature for curl-config
+  
+  ... as cmake now does it correctly, and make test1014 check for it
+  
+  Closes #6702
+
+- config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T
+  
+  Make the code consistently use a single name for the size of the
+  "curl_off_t" type.
+  
+  Closes #6702
+
+Jay Satiro (10 Mar 2021)
+- [Jun-ya Kato brought this change]
+
+  ngtcp2: Fix build error due to change in ngtcp2_addr_init
+  
+  ngtcp2/ngtcp2@b8d90a9 changed the function prototype.
+  
+  Closes https://github.com/curl/curl/pull/6716
+
+Daniel Stenberg (10 Mar 2021)
+- [ejanchivdorj brought this change]
+
+  multi: update pending list when removing handle
+  
+  when removing a handle, most of the lists are updated but pending list
+  is not updated. Updating now.
+  
+  Closes #6713
+
+- [kokke brought this change]
+
+  lib1536: check ptr against NULL before dereferencing it
+  
+  Closes #6710
+
+- [kokke brought this change]
+
+  lib1537: check ptr against NULL before dereferencing it
+  
+  Fixes #6707
+  Closes #6708
+
+- travis: make torture tests skip TLS-SRP tests
+  
+  ... as it seems to often hang.
+  
+  Also: skip the "normal" tests as they're already run by many other
+  builds.
+  
+  Closes #6705
+
+- openssl: adapt to v3's new const for a few API calls
+  
+  Closes #6703
+
+- quiche: fix crash when failing to connect
+  
+  Reported-by: ウさん
+  Fixes #6664
+  Closes #6701
 
 - RELEASE-NOTES: synced
   
-  and bumped curlver.h
+  Fixed the release counter and added a missing contributor
 
-- MANUAL: update a dict-using command line
+- RELEASE-NOTES: synced
+
+- dynbuf: bump the max HTTP request to 1MB
   
-  The 'web1913' database is now invalid, use 'gcide' instead.
-
-- KNOWN_BUGS: configure --with-gssapi with Heimdal is ignored on macOS
+  Raised from 128KB to allow longer request headers.
   
-  Closes #3841
+  Reported-by: Carl Zogheib
+  Fixes #6681
+  Closes #6685
 
-- polarssl: remove more references and mentions
+Jay Satiro (6 Mar 2021)
+- schannel: Evaluate CURLOPT_SSL_OPTIONS via SSL_SET_OPTION macro
+  
+  - Change use of those options from CURLOPT_SSL_OPTIONS that are not
+    already evaluated via SSL_SET_OPTION in schannel and secure transport
+    to use that instead of data->set.ssl.optname.
+  
+  Example:
+  
+  Evaluate SSL_SET_OPTION(no_revoke) instead of data->set.ssl.no_revoke.
+  
+  This change is because options set via CURLOPT_SSL_OPTIONS
+  (data->set.ssl.optname) are separate from those set for HTTPS proxy via
+  CURLOPT_PROXY_SSL_OPTIONS (data->set.proxy_ssl.optname). The
+  SSL_SET_OPTION macro determines whether the connection is for HTTPS
+  proxy and based on that which option to evaluate.
+  
+  Since neither Schannel nor Secure Transport backends currently support
+  HTTPS proxy in libcurl, this change is for posterity and has no other
+  effect.
+  
+  Closes https://github.com/curl/curl/pull/6690
+
+- [kokke brought this change]
+
+  c-hyper: Remove superfluous pointer check
+  
+  `n` pointer is never NULL once set. Found by static analysis.
+  
+  Ref: https://github.com/curl/curl/issues/6696
+  
+  Closes https://github.com/curl/curl/pull/6697
+
+- version.d: Add missing features to the features list
+  
+  - Add missing entries for gsasl, Kerberos, NTLM_WB, TrackMemory,
+    Unicode and zstd.
+  
+  - Remove krb4 since it's no longer a feature.
+  
+  Reported-by: Ádler Jonas Gross
+  
+  Fixes https://github.com/curl/curl/issues/6677
+  Closes https://github.com/curl/curl/pull/6687
+
+- [Vladimir Varlamov brought this change]
+
+  docs: add missing Arg tag to --stderr
+  
+  Prior to this change the required argument was not shown.
+  
+  curl.1 before: --stderr
+  curl.1 after: --stderr <file>
+  
+  curl --help before:
+       --stderr        Where to redirect stderr
+  
+  curl --help after:
+       --stderr <file>  Where to redirect stderr
+  
+  Closes https://github.com/curl/curl/pull/6692
+
+- projects: Update VS projects for OpenSSL 1.1.x
+  
+  - Update VS project templates to use the OpenSSL lib names and include
+    directories for OpenSSL 1.1.x.
+  
+  This change means the VS project files will now build only with OpenSSL
+  1.1.x when an OpenSSL configuration is chosen. Prior to this change the
+  project files built only with OpenSSL 1.0.x (end-of-life) when an
+  OpenSSL configuration was chosen.
+  
+  The template changes in this commit were made by script:
+  
+  libeay32.lib => libcrypto.lib
+  ssleay32.lib => libssl.lib
+  ..\..\..\..\..\openssl\inc32 => ..\..\..\..\..\openssl\include
+  
+  And since the output directory now contains the includes it's prepended:
+  ..\..\..\..\..\openssl\build\Win{32,64}\VC{6..15}\{DLL,LIB}
+  {Debug,Release}\include
+  
+  - Change build-openssl.bat to copy the build's include directory to the
+    output directory (as seen above).
+  
+  Each build has its own opensslconf.h which is different so we can't just
+  include the source include directory any longer.
+  
+  Note the include directory in the output directory is a full copy from
+  the build so technically we don't need to include the OpenSSL source
+  include directory in the template. However, I left it last in case the
+  user made a custom OpenSSL build using the old method which would put
+  opensslconf in the OpenSSL source include directory.
+  
+  - Change build-openssl.bat to use a temporary install directory that is
+    different from the temporary build directory.
+  
+  For OpenSSL 1.1.x the temporary paths must be separate not a descendant
+  of the other, otherwise pdb files will be lost between builds.
+  
+  Ref: https://curl.se/mail/lib-2018-10/0049.html
+  Ref: https://gist.github.com/jay/125191c35bbeb894444eff827651f755
+  Ref; https://github.com/openssl/openssl/issues/10005
+  
+  Fixes https://github.com/curl/curl/issues/984
+  Closes https://github.com/curl/curl/pull/6675
+
+- doh: Inherit CURLOPT_STDERR from user's easy handle
+  
+  Prior to this change if the user set their easy handle's error stream
+  to something other than stderr it was not inherited by the doh handles,
+  which meant that they would still write to the default standard error
+  stream (stderr) for verbose output.
+  
+  Bug: https://github.com/curl/curl/issues/6605
+  Reported-by: arvids-kokins-bidstack@users.noreply.github.com
+  
+  Closes https://github.com/curl/curl/pull/6661
+
+Marc Hoersken (1 Mar 2021)
+- CI/azure: replace python-impacket with python3-impacket
+  
+  As of this month Azure DevOps uses Ubuntu 20.04 LTS which
+  no longer supports Python 2 and instead ships Python 3.
+  
+  Closes #6678
+
+- runtests.pl: kill processes locking test log files
+  
+  Introduce a new runtests.pl command option: -rm
+  
+  For now only required and implemented for Windows.
+  Ignore stunnel logs due to long running processes.
+  
+  Requires Sysinternals handle[64].exe to be on PATH.
+  
+  Reviewed-by: Jay Satiro
+  
+  Ref: #6058
+  Closes #6179
+
+- pathhelp.pm: fix use of pwd -L in Msys environment
+  
+  While Msys2 has a pwd binary which supports -L,
+  Msys1 only has a shell built-in with that feature.
+  
+  Reviewed-by: Jay Satiro
+  
+  Part of #6179
+
+Daniel Gustafsson (1 Mar 2021)
+- ldap: use correct memory free function
+  
+  unescaped is coming from Curl_urldecode and not a unicode conversion
+  function, so reclaiming its memory should be performed with a normal
+  call to free rather than curlx_unicodefree.  In reality, this is the
+  same thing as curlx_unicodefree is implemented as a call to free but
+  that's not guaranteed to always hold.  Using the curlx macro present
+  issues with memory debugging as well.
+  
+  Closes #6671
+  Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+
+- url: fix typo in comment
+  
+  Correct a small typo which snuck in with a304051620.
+
+Jay Satiro (28 Feb 2021)
+- tool_help: Increase space between option and description
+  
+  - Increase the minimum number of spaces between the option and the
+    description from 1 to 2.
+  
+  Before:
+  ~~~
+   -u, --user <user:password> Server user and password
+   -A, --user-agent <name> Send User-Agent <name> to server
+   -v, --verbose       Make the operation more talkative
+   -V, --version       Show version number and quit
+   -w, --write-out <format> Use output FORMAT after completion
+       --xattr         Store metadata in extended file attributes
+  ~~~
+  
+  After:
+  ~~~
+   -u, --user <user:password>  Server user and password
+   -A, --user-agent <name>  Send User-Agent <name> to server
+   -v, --verbose       Make the operation more talkative
+   -V, --version       Show version number and quit
+   -w, --write-out <format>  Use output FORMAT after completion
+       --xattr         Store metadata in extended file attributes
+  ~~~
+  
+  Closes https://github.com/curl/curl/pull/6674
+
+Daniel Stenberg (27 Feb 2021)
+- curl: set CURLOPT_NEW_FILE_PERMS if requested
+  
+  The --create-file-mode code logic accepted the value but never actually
+  passed it on to libcurl!
+  
+  Follow-up to a7696c73436f (shipped in 7.75.0)
+  Reported-by: Johannes Lesr
+  Fixes #6657
+  Closes #6666
+
+- tool_operate: check argc before accessing argv[1]
+  
+  Follow-up to 09363500b
+  Reported-by: Emil Engler
+  Reviewed-by: Daniel Gustafsson
+  Closes #6668
+
+Daniel Gustafsson (26 Feb 2021)
+- [Jean-Philippe Menil brought this change]
+
+  openssl: remove get_ssl_version_txt in favor of SSL_get_version
+  
+  openssl: use SSL_get_version to get connection protocol
+  
+  Replace our bespoke get_ssl_version_txt in favor of SSL_get_version.
+  We can get rid of few lines of code, since SSL_get_version achieve
+  the exact same thing
+  
+  Closes #6665
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
+  Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
+
+- gnutls: Fix nettle discovery
+  
+  Commit e06fa7462ac258c removed support for libgcrypt leaving only
+  support for nettle which has been the default crypto library in
+  GnuTLS for a long time. There were however a few conditionals on
+  USE_GNUTLS_NETTLE which cause compilation errors in the metalink
+  code (as it used the gcrypt fallback instead as a result). See the
+  below autobuild for an example of the error:
+  
+    https://curl.se/dev/log.cgi?id=20210225123226-30704#prob1
+  
+  This removes all uses of USE_GNUTLS_NETTLE and also removes the
+  gcrypt support from the metalink code while at it.
+  
+  Closes #6656
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+
+- cookies: Support multiple -b parameters
+  
+  Previously only a single -b cookie parameter was supported with the last
+  one winning.  This adds support for supplying multiple -b params to have
+  them serialized semicolon separated.  Both cookiefiles and cookies can be
+  entered multiple times.
+  
+  Closes #6649
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+
+Daniel Stenberg (25 Feb 2021)
+- build: remove all traces of USE_BLOCKING_SOCKETS
+  
+  libcurl doesn't behave properly with the define set
+  
+  Closes #6655
+
+- RELEASE-NOTES: synced
+
+Daniel Gustafsson (25 Feb 2021)
+- docs: Fix typos
+  
+  Random typos spotted when skimming docs.
+
+- cookies: Use named parameters in header prototypes
+  
+  Align header with project style of using named parameters in the
+  function prototypes to aid readability and self-documentation.
+  
+  Closes #6653
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+
+Daniel Stenberg (24 Feb 2021)
+- urldata: make 'actions[]' use unsigned char instead of int
+  
+  ... as it only needs a few bits per index anyway.
+  
+  Reviewed-by: Daniel Gustafsson
+  Closes #6648
+
+- configure: fail if --with-quiche is used and quiche isn't found
+  
+  Closes #6652
+
+- [Gregor Jasny brought this change]
+
+  cmake: use CMAKE_INSTALL_INCLUDEDIR indirection
+  
+  Reviewed-by: Sergei Nikulov
+  Closes #6440
+
+Viktor Szakats (23 Feb 2021)
+- mingw: enable using strcasecmp()
+  
+  This makes the 'Features:' list sorted case-insensitively,
+  bringing output in-line with *nix builds.
+  
+  Reviewed-by: Jay Satiro
+  Closes #6644
+
+- build: delete unused feature guards
+  
+  - `HAVE_STRNCASECMP`
+  - `HAVE_TCGETATTR`
+  - `HAVE_TCSETATTR`
+  
+  Reviewed-by: Jay Satiro
+  Reviewed-by: Daniel Stenberg
+  Closes #6645
+
+Jay Satiro (23 Feb 2021)
+- docs: add CURLOPT_CURLU to 'See also' in curl_url_ functions
+  
+  Closes https://github.com/curl/curl/pull/6639
+
+Daniel Stenberg (23 Feb 2021)
+- [Jacob Hoffman-Andrews brought this change]
+
+  configure: make hyper opt-in, and fail if missing
+  
+  Previously, configure would look for hyper by default, and use it if
+  found; otherwise it would not use hyper, and not error.
+  
+  Now, configure will not look for hyper unless --with-hyper is passed. If
+  configure looks for hyper and fails, it will error.
+  
+  Also, add -ld -lpthread -lm to Hyper's libs. I think they are required.
+  
+  Closes #6598
+
+- multi: do once-per-transfer inits in before_perform in DID state
+  
+  ... since the state machine might go to RATELIMITING and then back to
+  PERFORMING doing once-per-transfer inits in that function is wrong and
+  it caused problems with receiving chunked HTTP and it set the
+  PRETRANSFER time much too often...
+  
+  Regression from b68dc34af341805aeb7b3715 (shipped in 7.75.0)
+  
+  Reported-by: Amaury Denoyelle
+  Fixes #6640
+  Closes #6641
+
+- RELEASE-NOTES: synced
+
+- CODE_STYLE.md: fix broken link to INTERNALS
+  
+  ... the link would only work if browsed on GitHub, while this link now
+  takes the user to the website instead and thus should work on either.
+  
+  Reported-by: David Demelier
+
+- curl_url_set.3: mention CURLU_PATH_AS_IS
+  
+  ... it has been supported since the URL API was added.
+  
+  Bug: https://curl.se/mail/lib-2021-02/0046.html
+  
+  Closes #6638
+
+Viktor Szakats (21 Feb 2021)
+- time: enable 64-bit time_t in supported mingw environments
+  
+  (Unless 32-bit `time_t` is selected manually via the `_USE_32BIT_TIME_T`
+  mingw macro.)
+  
+  Previously, 64-bit `time_t` was enabled on VS2005 and newer only, and
+  32-bit `time_t` was used on all other Windows builds.
   
   Assisted-by: Jay Satiro
-  Follow-up to 6357a19ff29dac04
-  Closes #5036
+  Closes #6636
 
-Marc Hoersken (4 Mar 2020)
-- tests: wrap ignored test failures in braces
+Jay Satiro (20 Feb 2021)
+- test1188: Check for --fail HTTP status
+  
+  - Change the test to check for curl error on HTTP 404 Not Found.
+  
+  test1188 tests "--write-out with %{onerror} and %{urlnum} to stderr".
+  Prior to this change it did that by specifying a non-existent host which
+  would cause an error. ISPs may hijack DNS and resolve non-existent hosts
+  so the test would not work if that was the case.
+  
+  Ref: https://en.wikipedia.org/wiki/DNS_hijacking#Manipulation_by_ISPs
+  Ref: https://github.com/curl/curl/issues/6621
+  Ref: https://github.com/curl/curl/pull/6623
+  
+  Closes https://github.com/curl/curl/pull/6637
 
-- tests: align some Windows sleep defines with each other
+- memdebug: close debug logfile explicitly on exit
+  
+  - Use atexit to register a dbg cleanup function that closes the logfile.
+  
+  LeakSantizier (LSAN) calls _exit() instead of exit() when a leak is
+  detected on exit so the logfile must be closed explicitly or data could
+  be lost. Though _exit() does not call atexit handlers such as this,
+  LSAN's call to _exit() comes after the atexit handlers are called.
+  
+  Prior to this change the logfile was not explicitly closed so it was
+  possible that if LSAN detected a leak and called _exit (which does
+  not flush or close files like exit) then the logfile could be missing
+  data. That could then cause curl's memanalyze to report false leaks
+  (eg a malloc was recorded to the logfile but the corresponding free was
+  discarded from the buffer instead of written to the logfile, then
+  memanalyze reports that as a leak).
+  
+  Ref: https://github.com/google/sanitizers/issues/1374
+  
+  Bug: https://github.com/curl/curl/pull/6591#issuecomment-780396541
+  
+  Closes https://github.com/curl/curl/pull/6620
 
-- tests: try to make sleeping portable by avoiding select
+- curl_multibyte: always return a heap-allocated copy of string
   
-  select does not support just waiting on Windows:
-  https://perldoc.perl.org/perlport.html#select
+  - Change the Windows char <-> UTF-8 conversion functions to return an
+    allocated copy of the passed in string instead of the original.
   
-  Reviewed-By: Daniel Stenberg
-  Closes #5035
+  Prior to this change the curlx_convert_ functions would, as what I
+  assume was an optimization, not make a copy of the passed in string if
+  no conversion was required. No conversion is required in non-UNICODE
+  Windows builds since our tchar strings are type char and remain in
+  whatever the passed in encoding is, which is assumed to be UTF-8 but may
+  be other encoding.
+  
+  In contrast the UNICODE Windows builds require conversion
+  (wchar <-> char) and do return a copy. That inconsistency could lead to
+  programming errors where the developer expects a copy, and does not
+  realize that won't happen in all cases.
+  
+  Closes https://github.com/curl/curl/pull/6602
 
-Daniel Stenberg (4 Mar 2020)
-- runtests.1: rephrase how to specify what tests to run
+Viktor Szakats (19 Feb 2021)
+- http: add new files missed from referrer commit
   
-  Also mention the new tilde-prefixed way to ignore test results.
-  
-  Reviewed-By: Marc Hoersken
-  Closes #5033
+  Ref: 44872aefc2d54f297caf2b0cc887df321bc9d791
+  Ref: #6591
 
-- cirrus-ci: disable the FreeBSD 13 builds
+- http: add support to read and store the referrer header
   
-  FreeBSD 13.0 is apparently close to a year away from a stable release
-  and has proven to cause intermittent builds failures recently.
+  - add CURLINFO_REFERER libcurl option
+  - add --write-out '%{referer}' command-line option
+  - extend --xattr command-line option to fill user.xdg.referrer.url extended
+    attribute with the referrer (if there was any)
   
-  Assisted-by: Dan Fandrich
-  Assisted-by: Fedor Korotkov
-  Fixes #5028
-  Closes #5029
+  Closes #6591
 
-Version 7.69.0 (4 Mar 2020)
+Daniel Stenberg (19 Feb 2021)
+- urldata: remove the _ORIG suffix from string names
+  
+  It doesn't provide any useful info but only makes the names longer.
+  
+  Closes #6624
 
-Daniel Stenberg (4 Mar 2020)
-- RELEASE-NOTES: 7.69.0
+- url: fix memory leak if OOM in the HSTS handling
+  
+  Reported-by: Viktor Szakats
+  Bug: https://github.com/curl/curl/pull/6627#issuecomment-781626205
+  
+  Closes #6628
 
-- THANKS: from 7.69.0
+- gnutls: assume nettle crypto support
   
-  Now sorted case insensitive
+  nettle has been the default crypto library with GnuTLS since 2010. By
+  dropping support for the previous libcrypto, we simplify code.
+  
+  Closes #6625
 
-Marc Hoersken (3 Mar 2020)
-- ci/tests: fix escaping of testnames and disable proxy for CI APIs
+- asyn-ares: use consistent resolve error message
   
-  Follow up to ada581f and c0d8b96
-  Closes #5031
+  ... with the help of Curl_resolver_error() which now is moved from
+  asyn-thead.c and is provided globally for this purpose.
+  
+  Follow-up to 35ca04ce1b77636
+  
+  Makes test 1188 work for c-ares builds
+  
+  Closes #6626
 
-Jay Satiro (3 Mar 2020)
-- cmake: Show HTTPS-proxy in the features output
+Viktor Szakats (18 Feb 2021)
+- ci: stop building on freebsd-12-1
   
-  - Show HTTPS-proxy in the features output for those backends that
-    support it: OpenSSL, GnuTLS and NSS.
+  An updated freebsd-12-2 image was added a few months ago, and this
+  older one is consistently failing to go past `pkginstall`:
+  ```
+  Newer FreeBSD version for package py37-mlt:
+  To ignore this error set IGNORE_OSVERSION=yes
+  - package: 1202000
+  - running kernel: 1201000
+  Ignore the mismatch and continue? [Y/n]: pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:12:amd64
+  ```
   
-  Prior to this change HTTPS-proxy was missing from the cmake features
-  output even if curl was built with it. Only cmake output was affected.
-  Both the library and tool correctly reported the feature.
+  FreeBSD thread suggests that 12.1 is EOL, and best to avoid.
   
-  Bug: https://curl.haxx.se/mail/lib-2020-03/0008.html
-  Reported-by: David Lopes
-  
-  Closes https://github.com/curl/curl/pull/5025
-
-Marc Hoersken (3 Mar 2020)
-- ci/tests: Make it possible to still run but ignore failing tests
-  
-  This enables the development of a solution for the failing tests by
-  running them on CI while ignoring their result for the overall status.
-  
-  Closes #4994
-
-- README.md: add Azure DevOps Pipelines build status badge
-
-- ci/tests: Move CI test result creation above environment setup
-  
-  This avoids using our test servers as proxy to the AppVeyor API.
-  
-  Closes #5022
-
-- ci/tests: Send test results to AppVeyor for status overview
-  
-  Closes #5021
-
-Daniel Stenberg (3 Mar 2020)
-- Revert "sha256: Added SecureTransport implementation"
-  
-  This reverts commit 4feb38deed33fed14ff7c370a6a9153c661dbb9c (from #4956)
-  
-  That commit broke test 1610 on macos builds without TLS.
-  
-  Closes #5027
-
-- dist: include tests/azure.pm in the tarball
-  
-  Bug: https://github.com/curl/curl/commit/ada581f2cc32f48c1629b729707ac19208435b27#commitcomment-37601589
-  Reported-by: Marcel Raad
-
-Steve Holme (3 Mar 2020)
-- configure.ac: Disable metalink if mbedTLS is specified
-  
-  Follow up to cdcc9df1 and #5006. Even though I mentioned mbedTLS as
-  being one of the backends that metalink needs to be disabled for, I
-  seem to have included it in the list of allowed SSL/TLS backends in
-  comnfigure.ac :(
-  
-  Closes #5013
-
-- sha256: Tidy up following recent changes
+  Ref: https://forums.freebsd.org/threads/78856/
   
   Reviewed-by: Daniel Stenberg
-  Closes #4956
+  Closes #6622
 
-- sha256: Added WinCrypt implementation
+Daniel Stenberg (18 Feb 2021)
+- test1188: change error from connect to resolve error
+  
+  Using the %NOLISTENPORT to trigger a connection failure is somewhat
+  "risky" (since it isn't guaranteed to not be listened to) and caused
+  occasional CI problems. This fix changes the infused error to be a more
+  reliable one but still verifies the --write-out functionality properly -
+  which is the purpose of this test.
+  
+  Reported-by: Jay Satiro
+  Fixes #6621
+  Closes #6623
 
-- sha256: Added SecureTransport implementation
+- url.c: use consistent error message for failed resolve
 
-- sha256: Added mbedtls implementation
+- BUGS: language polish
 
-- sha256: Added GNU TLS gcrypt implementation
+- wolfssl: don't store a NULL sessionid
+  
+  This caused a memory leak as the session id cache entry was still
+  erroneously stored with a NULL sessionid and that would later be treated
+  as not needed to get freed.
+  
+  Reported-by: Gisle Vanem
+  Fixes #6616
+  Closes #6617
 
-- sha256: Added GNU TLS Nettle implementation
+- parse_proxy: fix a memory leak in the OOM path
+  
+  Reported-by: Jay Satiro
+  Reviewed-by: Jay Satiro
+  Reviewed-by: Emil Engler
+  
+  Closes #6614
+  Bug: https://github.com/curl/curl/pull/6591#issuecomment-780396541
 
-Jay Satiro (2 Mar 2020)
-- curl_escape.3: Add a link to curl_free
+Jay Satiro (17 Feb 2021)
+- url: fix possible use-after-free in default protocol
   
-  Ref: https://github.com/curl/curl/pull/5016#issuecomment-593628582
+  Prior to this change if the user specified a default protocol and a
+  separately allocated non-absolute URL was used then it was freed
+  prematurely, before it was then used to make the replacement URL.
+  
+  Bug: https://github.com/curl/curl/issues/6604#issuecomment-780138219
+  Reported-by: arvids-kokins-bidstack@users.noreply.github.com
+  
+  Closes https://github.com/curl/curl/pull/6613
 
-- curl_getenv.3: Fix the memory handling description
+Daniel Stenberg (16 Feb 2021)
+- multi: rename the multi transfer states
   
-  - Tell the user to call curl_free() to free the pointer returned by
-    curl_getenv().
+  While working on documenting the states it dawned on me that step one is
+  to use more descriptive names on the states. This also changes prefix on
+  the states to make them shorter in the source.
   
-  Prior to this change the user was directed to call free(), but that
-  would not work in cases where the library and application use separate C
-  runtimes and therefore have separate heap memory management.
+  State names NOT ending with *ing are transitional ones.
   
-  Closes https://github.com/curl/curl/pull/5016
+  Closes #6612
 
-Daniel Stenberg (2 Mar 2020)
-- [Nick Zitzmann brought this change]
+Viktor Szakats (16 Feb 2021)
+- http: do not add a referrer header with empty value
+  
+  Previously an empty 'Referer:' header was added to the HTTP request when
+  passing `--referer ';auto'` or `--referer ''` on the command-line. This
+  patch makes `--referer` work like `--header 'Referer:'` and will only add
+  the header if it has a non-zero length value.
+  
+  Reviewed-by: Jay Satiro
+  Closes #6610
 
-  md4: use init/update/final functions in Secure Transport
+Daniel Stenberg (16 Feb 2021)
+- lib: remove 'conn->data' completely
   
-  We can use CC_MD4_Init/Update/Final without having to allocate memory
-  directly.
+  The Curl_easy pointer struct entry in connectdata is now gone. Just
+  before commit 215db086e0 landed on January 8, 2021 there were 919
+  references to conn->data.
   
-  Closes #4979
+  Closes #6608
 
-Marc Hoersken (2 Mar 2020)
-- ci/tests: some MacOS builds randomly take longer than 20min
+- openldap: pass 'data' to the callbacks instead of 'conn'
 
-Daniel Stenberg (2 Mar 2020)
-- multi_wait: stop loop when sread() returns zero
+Jay Satiro (15 Feb 2021)
+- doh: Fix sharing user's resolve list with DOH handles
   
-  It's unclear why it would ever return zero here, but this change fixes
-  Robert's problem and it shouldn't loop forever...
+  - Share the shared object from the user's easy handle with the DOH
+    handles.
   
-  Reported-by: Robert Dunaj
-  Bug: https://curl.haxx.se/mail/archive-2020-02/0011.html
-  Closes #5019
+  Prior to this change if the user had set a shared object with shared
+  cached DNS (CURL_LOCK_DATA_DNS) for their easy handle then that wasn't
+  used by any associated DOH handles, since they used the multi's default
+  hostcache.
+  
+  This change means all the handles now use the same hostcache, which is
+  either the shared hostcache from the user created shared object if it
+  exists or if not then the multi's default hostcache.
+  
+  Reported-by: Manuj Bhatia
+  
+  Fixes https://github.com/curl/curl/issues/6589
+  Closes https://github.com/curl/curl/pull/6607
 
-- http: mark POSTs with no body as "upload done" from the start
+Daniel Stenberg (15 Feb 2021)
+- http2: remove conn->data use
   
-  As we have logic that checks if we get a >= 400 reponse code back before
-  the upload is done, which then got confused since it wasn't "done" but
-  yet there was no data to send!
+  ... but instead use a private alternative that points to the "driving
+  transfer" from the connection. We set the "user data" associated with
+  the connection to be the connectdata struct, but when we drive transfers
+  the code still needs to know the pointer to the transfer. We can change
+  the user data to become the Curl_easy handle, but with older nghttp2
+  version we cannot dynamically update that pointer properly when
+  different transfers are used over the same connection.
   
-  Reported-by: IvanoG on github
-  Fixes #4996
-  Closes #5002
+  Closes #6520
 
-- tests: disable 962, 963 and 964 on Windows
+- openssl: remove conn->data use
   
-  These tests are also doing UTF-8 SMTP.
+  We still make the trace callback function get the connectdata struct
+  passed to it, since the callback is anchored on the connection.
   
-  Follow-up to df207d2dd93b9e73
+  Repeatedly updating the callback pointer to set 'data' with
+  SSL_CTX_set_msg_callback_arg() doesn't seem to work, probably because
+  there might already be messages in the queue with the old pointer.
+  
+  This code therefore makes sure to set the "logger" handle before using
+  OpenSSL calls so that the right easy handle gets used for tracing.
+  
+  Closes #6522
 
-Marc Hoersken (2 Mar 2020)
-- ci/tests: fine-tune Azure Pipeline timeouts with a small puffer
+- RELEASE-NOTES: synced
 
-Daniel Stenberg (2 Mar 2020)
-- configure: bump the AC_COPYRIGHT year range
+Jay Satiro (14 Feb 2021)
+- doh: add options to disable ssl verification
+  
+  - New libcurl options CURLOPT_DOH_SSL_VERIFYHOST,
+    CURLOPT_DOH_SSL_VERIFYPEER and CURLOPT_DOH_SSL_VERIFYSTATUS do the
+    same as their respective counterparts.
+  
+  - New curl tool options --doh-insecure and --doh-cert-status do the same
+    as their respective counterparts.
+  
+  Prior to this change DOH SSL certificate verification settings for
+  verifyhost and verifypeer were supposed to be inherited respectively
+  from CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER, but due to a bug
+  were not. As a result DOH verification remained at the default, ie
+  enabled, and it was not possible to disable. This commit changes
+  behavior so that the DOH verification settings are independent and not
+  inherited.
+  
+  Ref: https://github.com/curl/curl/pull/4579#issuecomment-554723676
+  
+  Fixes https://github.com/curl/curl/issues/4578
+  Closes https://github.com/curl/curl/pull/6597
 
-- [Steve Holme brought this change]
+- hostip: fix crash in sync resolver builds that use DOH
+  
+  - Guard some Curl_async accesses with USE_CURL_ASYNC instead of
+    !CURLRES_SYNCH.
+  
+  This is another follow-up to 8335c64 which moved the async struct from
+  the connectdata struct into the Curl_easy struct. A previous follow-up
+  6cd167a fixed building for sync resolver by guarding some async struct
+  accesses with !CURLRES_SYNCH. The problem is since DOH (DNS-over-HTTPS)
+  is available as an asynchronous secondary resolver the async struct may
+  be used even when libcurl is built for the sync resolver. That means
+  that CURLRES_SYNCH and USE_CURL_ASYNC may be defined at the same time.
+  
+  Closes https://github.com/curl/curl/pull/6603
 
-  tests: disable SMTP UTF-8 tests on Windows
+Daniel Stenberg (13 Feb 2021)
+- KNOWN_BUGS: cannot enable LDAPS on Windows with cmake
   
-  Fixes #4988
-  Closes #4992
+  Reported-by: Jack Boos Yu
+  Closes #6284
 
-- formdata/mime: copyright year range update
+- KNOWN_BUGS: Excessive HTTP/2 packets with TCP_NODELAY
   
-  Due to the merge/revert cycle
+  Reported-by: Alex Xu
+  Closes #6363
 
-- Revert "mime: latch last read callback status."
+- http: use credentials from transfer, not connection
   
-  This reverts commit 87869e38d7afdec3ef1bb4965711458b088e254f.
+  HTTP auth "accidentally" worked before this cleanup since the code would
+  always overwrite the connection credentials with the credentials from
+  the most recent transfer and since HTTP auth is typically done first
+  thing, this has not been an issue. It was still wrong and subject to
+  possible race conditions or future breakage if the sequence of functions
+  would change.
   
-  Fixes #5014
-  Closes #5015
-  Reopens #4833
+  The data.set.str[] strings MUST remain unmodified exactly as set by the
+  user, and the credentials to use internally are instead set/updated in
+  state.aptr.*
+  
+  Added test 675 to verify different credentials used in two requests done
+  over a reused HTTP connection, which previously behaved wrongly.
+  
+  Fixes #6542
+  Closes #6545
 
-- Revert "mime: do not perform more than one read in a row"
+- test433: clear some home dir env variables
   
-  This reverts commit ed0f357f7d25566110d4302f33759f4ffb5a6f83.
+  Follow-up to bd6b54ba1f55b5
+  
+  ... so that XDG_CONFIG_HOME is the only home dir variable set and thus
+  used correctly in the test!
+  
+  Fixes #6599
+  Closes #6600
 
-- Revert "mime: fix the binary encoder to handle large data properly"
+- RELEASE-NOTES: synced
   
-  This reverts commit b2caaa0681f329eed317ffb6ae6927f4a539f0c1.
+  bumped the version to 7.76.0
 
-- altsvc: both h3 backends now speak h3-27
+- travis: install libgsasl-dev to add that to the builds
   
-  ... also updated the HTTP3 build description for ngtcp2 accordingly.
+  Closes #6588
 
-- [Patrick Monnerat brought this change]
+- urldata: don't touch data->set.httpversion at run-time
+  
+  Rename it to 'httpwant' and make a cloned field in the state struct as
+  well for run-time updates.
+  
+  Also: refuse non-supported HTTP versions. Verified with test 129.
+  
+  Closes #6585
 
-  mime: fix the binary encoder to handle large data properly
+Viktor Szakats (11 Feb 2021)
+- tests: disable .curlrc in more environments
   
-  New test 666 checks this is effective.
-  As upload buffer size is significant in this kind of tests, shorten it
-  in similar test 652.
-  
-  Fixes #4860
-  Reported-by: RuurdBeerstra on github
-
-- [Patrick Monnerat brought this change]
-
-  mime: do not perform more than one read in a row
-  
-  Input buffer filling may delay the data sending if data reads are slow.
-  To overcome this problem, file and callback data reads do not accumulate
-  in buffer anymore. All other data (memory data and mime framing) are
-  considered as fast and still concatenated in buffer.
-  As this may highly impact performance in terms of data overhead, an early
-  end of part data check is added to spare a read call.
-  When encoding a part's data, an encoder may require more bytes than made
-  available by a single read. In this case, the above rule does not apply
-  and reads are performed until the encoder is able to deliver some data.
-  
-  Tests 643, 644, 645, 650 and 654 have been adapted to the output data
-  changes, with test data size reduced to avoid the boredom of long lists of
-  1-byte chunks in verification data.
-  New test 664 checks mimepost using single-byte read callback with encoder.
-  New test 665 checks the end of part data early detection.
-  
-  Fixes #4826
-  Reported-by: MrdUkk on github
-
-- [Patrick Monnerat brought this change]
-
-  mime: latch last read callback status.
-  
-  In case a read callback returns a status (pause, abort, eof,
-  error) instead of a byte count, drain the bytes read so far but
-  remember this status for further processing.
-  Takes care of not losing data when pausing, and properly resume a
-  paused mime structure when requested.
-  New tests 670-673 check unpausing cases, with easy or multi
-  interface and mime or form api.
-  
-  Fixes #4813
-  Reported-by: MrdUkk on github
-  Closes #4833
-
-Steve Holme (1 Mar 2020)
-- unit1651: Fixed conversion compilation warning
-  
-  371:17: warning: conversion to 'unsigned char' from 'int' may alter its
-          value [-Wconversion]
-  
-  Closes #5008
-
-- configure.ac: Disable metalink support if an incompatible SSL/TLS specified
-  
-  tool_metalink only supports cryptography from OpenSSL, GnuTLS, NSS,
-  The Win32 Crypto library and Apple's Common Crypto library.
-  
-  If an TLS backend such as mbedTLS or WolfSSL is specified then the
-  following error is given during compilation along, with a load of
-  unresolved extern errors:
-  
-  Can't compile METALINK support without a crypto library.
+  by also setting CURL_HOME and XDG_CONFIG_HOME envvars to the local
+  directory.
   
   Reviewed-by: Daniel Stenberg
-  Closes #5006
+  Fixes #6595
+  Closes #6596
 
-Marc Hoersken (1 Mar 2020)
-- ci/tests: Update Azure DevOps pipeline job display names
+- docs/Makefile.inc: format to be update-friendly
   
-  Make the configure step more descriptive and align others.
-
-- ci/tests: Fix typo in previous commit 597cf2
-
-- ci/tests: Make sure that the AZURE_ACCESS_TOKEN is available
+  - one source file per line
+  - convert tabs to spaces
+  - do not align line-continuation backslashes
+  - sort source files alphabetically
   
-  For security reasons the access token is not available to PR builds.
-  Therefore we should not try to use the DevOps API with an empty token.
+  Reviewed-by: Daniel Stenberg
+  Closes #6593
+
+Daniel Stenberg (11 Feb 2021)
+- curl: provide libgsasl version and feature info in -V output
+  
+  Closes #6592
+
+- gsasl: provide CURL_VERSION_GSASL if built-in
+  
+  To let applications know the feature is available.
+  
+  Closes #6592
+
+- curl: add --fail-with-body
+  
+  Prevent both --fail and --fail-with-body on the same command line.
+  
+  Verify with test 349, 360 and 361.
+  
+  Closes #6449
+
+- TODO: remove HSTS
+  
+  Provided now since commit 7385610d0c74
+
+Jay Satiro (10 Feb 2021)
+- tests: Fix tests failing due to change in curl --help
+  
+  Follow-up to parent 3183217 which added add missing <mode> argument to
+  --create-file-mode <mode>.
+  
+  Ref: https://github.com/curl/curl/issues/6590
+
+- tool_help: add missing argument for --create-file-mode
+  
+  Prior to this change the required argument was not shown in curl --help.
+  
+  before:
+       --create-file-mode File mode for created files
+  
+  after:
+       --create-file-mode <mode> File mode (octal) for created files
+  
+  Reported-by: ZimCodes@users.noreply.github.com
+  
+  Fixes https://github.com/curl/curl/issues/6590
+
+- create-file-mode.d: add missing Arg tag
+  
+  Prior to this change the required argument was not shown.
+  
+  curl.1 before: --create-file-mode
+  curl.1 after: --create-file-mode <mode>
+  
+  Reported-by: ZimCodes@users.noreply.github.com
+  
+  Fixes https://github.com/curl/curl/issues/6590
+
+Viktor Szakats (10 Feb 2021)
+- gsasl: fix errors/warnings building against libgsasl
+  
+  - also fix an indentation
+  - make Curl_auth_gsasl_token() use CURLcode (by Daniel Stenberg)
+  
+  Ref: https://github.com/curl/curl/pull/6372#issuecomment-776118711
+  Ref: https://github.com/curl/curl/pull/6588
+  
+  Reviewed-by: Jay Satiro
+  Assisted-by: Daniel Stenberg
+  Reviewed-by: Simon Josefsson
+  Closes #6587
+
+- Makefile.m32: add support for libgsasl dependency
+  
+  Reviewed-by: Marcel Raad
+  Closes #6586
+
+Marcel Raad (10 Feb 2021)
+- ngtcp2: clarify calculation precedence
+  
+  As suggested by Codacy/cppcheck.
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- server: remove redundant condition
+  
+  `end` is always non-null here.
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- lib: remove redundant code
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- mqttd: remove unused variable
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- tool_paramhlp: reduce variable scope
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- tests: reduce variable scopes
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- lib: reduce variable scopes
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+- ftp: fix Codacy/cppcheck warning about null pointer arithmetic
+  
+  Increment `bytes` only if it is non-null.
+  
+  Closes https://github.com/curl/curl/pull/6576
+
+Daniel Stenberg (9 Feb 2021)
+- ngtcp2: adapt to the new recv_datagram callback
+
+- quiche: fix build error: use 'int' for port number
+  
+  Follow-up to cb2dc1ba8
+
+- ftp: add 'list_only' to the transfer state struct
+  
+  and rename it from 'ftp_list_only' since it is also used for SSH and
+  POP3. The state is updated internally for 'type=D' FTP URLs.
+  
+  Added test case 1570 to verify.
+  
+  Closes #6578
+
+- ftp: add 'prefer_ascii' to the transfer state struct
+  
+  ... and make sure the code never updates 'set.prefer_ascii' as it breaks
+  handle reuse which should use the setting as the user specified it.
+  
+  Added test 1569 to verify: it first makes an FTP transfer with ';type=A'
+  and then another without type on the same handle and the second should
+  then use binary. Previously, curl failed this.
+  
+  Closes #6578
+
+- RELEASE-NOTES: synced
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  vtls: initial implementation of rustls backend
+  
+  This adds a new TLS backend, rustls. It uses the C-to-rustls bindings
+  from https://github.com/abetterinternet/crustls.
+  
+  Rustls is at https://github.com/ctz/rustls/.
+  
+  There is still a fair bit to be done, like sending CloseNotify on
+  connection shutdown, respecting CAPATH, and properly indicating features
+  like "supports TLS 1.3 ciphersuites." But it works well enough to make
+  requests and receive responses.
+  
+  Blog post for context:
+  https://www.abetterinternet.org/post/memory-safe-curl/
+  
+  Closes #6350
+
+- [Simon Josefsson brought this change]
+
+  sasl: support SCRAM-SHA-1 and SCRAM-SHA-256 via libgsasl
+  
+  Closes #6372
+
+Jay Satiro (9 Feb 2021)
+- lib: use int type for more port variables
+  
+  This is a follow-up to 764c6bd. Prior to that change port variables
+  were usually type long.
+  
+  Closes https://github.com/curl/curl/pull/6553
+
+- tool_writeout: refactor write-out and write-out json
+  
+  - Deduplicate the logic used by write-out and write-out json.
+  
+  Rather than have separate writeLong, writeString, etc, logic for
+  each of write-out and write-out json instead have respective shared
+  functions that can output either format and a 'use_json' parameter to
+  indicate whether it is json that is output.
+  
+  This will make it easier to maintain. Rather than have to go through
+  two sets of logic now we only have to go through one.
+  
+  - Support write-out %{errormsg} and %{exitcode} in json.
+  
+  - Clarify in the doc that %{exitcode} is the exit code of the transfer.
+  
+  Prior to this change it just said "The numerical exitcode" which
+  implies it's the exit code of the tool, and it's not necessarily that.
+  
+  Closes https://github.com/curl/curl/pull/6544
+
+- lib: drop USE_SOCKETPAIR in favor of CURL_DISABLE_SOCKETPAIR
+  
+  .. since the former is undocumented and they both do the same thing.
+  
+  Closes https://github.com/curl/curl/pull/6517
+
+- curl_multibyte: fall back to local code page stat/access on Windows
+  
+  If libcurl is built with Unicode support for Windows then it is assumed
+  the filename string is Unicode in UTF-8 encoding and it is converted to
+  UTF-16 to be passed to the wide character version of the respective
+  function (eg wstat). However the filename string may actually be in the
+  local encoding so, even if it successfully converted to UTF-16, if it
+  could not be stat/accessed then try again using the local code page
+  version of the function (eg wstat fails try stat).
+  
+  We already do this with fopen (ie wfopen fails try fopen), so I think it
+  makes sense to extend it to stat and access functions.
+  
+  Closes https://github.com/curl/curl/pull/6514
+
+- [Stephan Szabo brought this change]
+
+  file: Support unicode urls on windows
+  
+  Closes https://github.com/curl/curl/pull/6501
+
+- [Vincent Torri brought this change]
+
+  cmake: fix import library name for non-MS compiler on Windows
+  
+  - Use _imp.lib suffix only for Microsoft's compiler (MSVC).
+  
+  Prior to this change library suffix _imp.lib was used for the import
+  library on Windows regardless of compiler.
+  
+  With this change the other compilers should now use their default
+  suffix which should be .dll.a.
+  
+  This change is motivated by the usage of pkg-config on MSYS2.
+  Indeed, when 'pkg-config --libs libcurl' is used, -lcurl is
+  passed to ld. The documentation of ld on Windows :
+  
+  https://sourceware.org/binutils/docs/ld/WIN32.html
+  
+  lists, in the 'direct linking to a dll' section, the pattern
+  of the searched import library, and libcurl_imp.lib is not there.
+  
+  Closes https://github.com/curl/curl/pull/6225
+
+Daniel Stenberg (9 Feb 2021)
+- urldata: move 'followlocation' to UrlState
+  
+  As this is a state variable it does not belong in UserDefined which is
+  used to store values set by the user.
+  
+  Closes #6582
+
+- [Ikko Ashimine brought this change]
+
+  http_proxy: fix typo in http_proxy.c
+  
+  settting -> setting
+  
+  Closes #6583
+
+- [Fabian Keil brought this change]
+
+  tests/server: Bump MAX_TAG_LEN to 200
+  
+  This is useful for tests containing HTML inside of <data> sections.
+  For <img> tags it's not uncommon to be longer than the previous
+  limit of 79 bytes.
+  
+  An example of a previously problem-causing tag is:
+  <img src="http://config.privoxy.org/send-banner?type=auto" border="0" title="Killed-http://www.privoxy.org/images/privoxy.png-by-size" width="88" height="31">
+  which is needed for a Privoxy test for the banners-by-size filter.
+  
+  Previously it caused server failures like:
+  12:29:05.786961 ====> Client connect
+  12:29:05.787116 accept_connection 3 returned 4
+  12:29:05.787194 accept_connection 3 returned 0
+  12:29:05.787285 Read 119 bytes
+  12:29:05.787345 Process 119 bytes request
+  12:29:05.787407 Got request: GET /banners-by-size/9 HTTP/1.1
+  12:29:05.787464 Requested test number 9 part 0
+  12:29:05.787686 getpart() failed with error: -2
+  12:29:05.787744 - request found to be complete (9)
+  12:29:05.787912 getpart() failed with error: -2
+  12:29:05.788048 Wrote request (119 bytes) input to log/server.input
+  12:29:05.788157 Send response test9 section <data>
+  12:29:05.788443 getpart() failed with error: -2
+  12:29:05.788498 instructed to close connection after server-reply
+  12:29:05.788550 ====> Client disconnect 0
+  12:29:05.871448 exit_signal_handler: 15
+  12:29:05.871714 signalled to die
+  12:29:05.872040 ========> IPv4 sws (port 21108 pid: 51758) exits with signal (15)
+
+- [Fabian Keil brought this change]
+
+  tests/badsymbols.pl: when opening '$incdir' fails include it in the error message
+
+- [Fabian Keil brought this change]
+
+  runtests.1: document -o, -P, -L, and -E
+
+- [Fabian Keil brought this change]
+
+  runtests.pl: add %TESTNUMBER variable to make copying tests more convenient
+
+- [Fabian Keil brought this change]
+
+  runtests.pl: add an -o option to change internal variables
+  
+  runtests.pl has lots of internal variables one might want to
+  change in certain situations, but adding a dedicated option
+  for every single one of them isn't practical.
+  
+  Usage:
+  ./runtests.pl -o TESTDIR=$privoxy_curl_test_dir -o HOSTIP=10.0.0.1 ...
+
+- [Fabian Keil brought this change]
+
+  runtests.pl: cleanups
+  
+  - show the summarized test result in the last line of the report
+  - do not use $_ after mapping it to a named variable
+    Doing that makes the code harder to follow.
+  - log the restraints sorted by the number of their occurrences
+  - fix language when logging restraints that only occured once
+  - let runhttpserver() use $TESTDIR instead of $srcdir
+    ... so it works if a non-default $TESTDIR is being used.
+
+- [Fabian Keil brought this change]
+
+  runtests.pl: add an -E option to specify an exclude file
+  
+  It can contain additional restraints for test numbers,
+  keywords and tools.
+  
+  The idea is to let third parties like the Privoxy project
+  distribute an exclude file with their tarballs that specifies
+  which curl tests are not expected to work when using Privoxy
+  as a proxy, without having to fork the whole curl test suite.
+  
+  The syntax could be changed to be extendable and maybe
+  more closely reflect the "curl test" syntax. Currently
+  it's a bunch of lines like these:
+  
+  test:$TESTNUMBER:Reason why this test with number $TESTNUMBER should be skipped
+  keyword:$KEYWORD:Reason why tests whose keywords contain the $KEYWORD should be skipped
+  tool:$TOOL:Reason why tests with tools that contain $TOOL should be skipped
+  
+  To specify multiple $TESTNUMBERs, $KEYWORDs and $TOOLs
+  on a single line, split them with commas.
+
+- [Fabian Keil brought this change]
+
+  runtests.pl: add -L parameter to require additional perl libraries
+  
+  This is useful to change the behaviour of the script without
+  having to modify the file itself, for example to use a custom
+  compareparts() function that ignores header differences that
+  are expected to occur when an external proxy is being used.
+  
+  Such differences are proxy-specific and thus the modifications
+  should be maintained together with the proxy.
+
+- [Fabian Keil brought this change]
+
+  runtests.pl: add a -P option to specify an external proxy
+  
+  ... that should be used when executing the tests.
+  
+  The assumption is that the proxy is an HTTP proxy.
+  
+  This option should be used together with -L to provide
+  a customized compareparts() version that knows which
+  proxy-specific header differences should be ignored.
+  
+  This option doesn't work for all test types yet.
+
+- [Fabian Keil brought this change]
+
+  tests: fixup several tests
+  
+  missing CRs and modified %hostip
+  
+  lib556/test556: use a real HTTP version to make test reuse more convenient
+  
+  make sure the weekday in Date headers matches the date
+  
+  test61: replace stray "^M" (5e 4d) at the end of a cookie with a '^M' (0d)
+  
+  Gets the test working with external proxies like Privoxy again.
+  
+  Closes #6463
+
+- ftp: never set data->set.ftp_append outside setopt
+  
+  Since the set value then risks getting used like that when the easy
+  handle is reused by the application.
+  
+  Also: renamed the struct field from 'ftp_append' to 'remote_append'
+  since it is also used for SSH protocols.
+  
+  Closes #6579
+
+- urldata: remove the 'rtspversion' field
+  
+  from struct connectdata and the corresponding code in http.c that set
+  it. It was never used for anything!
+  
+  Closes #6581
+
+- CURLOPT_QUOTE.3: clarify that libcurl doesn't parse what's sent
+  
+  ... so passed in commands may confuse libcurl's knowledge of state.
+  
+  Reported-by: Bodo Bergmann
+  Fixes #6577
+  Closes #6580
+
+- [Jacob Hoffman-Andrews brought this change]
+
+  vtls: factor out Curl_ssl_getsock to field of Curl_ssl
+  
+  Closes #6558
+
+- RELEASE-PROCEDURE: remove old release dates, add new
+
+- docs/SSL-PROBLEMS: enhanced
+  
+  Elaborate on the intermediate cert issue, and mention that anything
+  below TLS 1.2 is generally considered insecure these days.
+  
+  Closes #6572
+
+- THANKS: remove a Jon Rumsey dupe
+
+Daniel Gustafsson (5 Feb 2021)
+- [nimaje brought this change]
+
+  docs: fix FILE example url in --metalink documentation
+  
+  In a url after <scheme>:// follows the possibly empty authority part
+  till the next /, so that url missed a /.
+  
+  Closes #6573
+  Reviewed-by: Daniel Stenberg <daniel@haxx.se>
+  Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
+
+Daniel Stenberg (5 Feb 2021)
+- hostip: fix build with sync resolver
+  
+  Reported-by: David Goerger
+  Follow-up from 8335c6417
+  Fixes #6566
+  Closes #6568
+
+- mailmap: Jon Rumsey
+
+- [Jon Rumsey brought this change]
+
+  gskit: correct the gskit_send() prototype
+  
+  gskit_send() first paramater is a pointer to Curl_easy not connectdata
+  struct.
+  
+  Closes #6570
+  Fixes #6569
+
+- urldata: fix build without HTTP and MQTT
+  
+  Reported-by: Joseph Chen
+  Fixes #6562
+  Closes #6563
+
+- ftp: avoid SIZE when asking for a TYPE A file
+  
+  ... as we ignore it anyway because servers don't report the correct size
+  and proftpd even blatantly returns a 550.
+  
+  Updates a set of tests accordingly.
+  
+  Reported-by: awesomenode on github
+  Fixes #6564
+  Closes #6565
+
+- pingpong: rename the curl_pp_transfer enum to use PP prefix
+  
+  Using an FTP prefix for PP provided functionality was misleading.
+
+- RELEASE-NOTES: synced
+  
+  ... and bump pending version to 7.75.1 (for now)
+
+Jay Satiro (4 Feb 2021)
+- build: fix --disable-http-auth
+  
+  Broken since 215db08 (precedes 7.75.0).
+  
+  Reported-by: Benbuck Nason
+  
+  Fixes https://github.com/curl/curl/issues/6567
+
+- build: fix --disable-dateparse
+  
+  Broken since 215db08 (precedes 7.75.0).
+  
+  Bug: https://curl.se/mail/lib-2021-02/0008.html
+  Reported-by: Firefox OS
+
+Daniel Stenberg (4 Feb 2021)
+- [Jon Rumsey brought this change]
+
+  OS400: update for CURLOPT_AWS_SIGV4
+  
+  chkstrings fails because a new string option that could require codepage
+  conversion has been added.
+  
+  Closes #6561
+  Fixes #6560
+
+- BUG-BOUNTY: removed the cooperation mention
+
+Version 7.75.0 (3 Feb 2021)
+
+Daniel Stenberg (3 Feb 2021)
+- RELEASE-NOTES: synced
+
+- THANKS: added contributors from 7.75.0
+
+- copyright: fix year ranges in need of updates
+
+- TODO: remove items for next SONAME bump etc
+  
+  We want to avoid that completely, so we don't plan for things after such
+  an event.
+
+- [Jay Satiro brought this change]
+
+  ngtcp2: Fix build error due to change in ngtcp2_settings
+  
+  - Separate ngtcp2_transport_params.
+  
+  ngtcp2/ngtcp2@05d7adc made ngtcp2_transport_params separate from
+  ngtcp2_settings.
+  
+  ngtcp2 master is required to build curl with http3 support.
+  
+  Closes #6554
+
+- vtls: remove md5sum
+  
+  As it is not used anymore.
+  
+  Reported-by: Jacob Hoffman-Andrews
+  Bug: https://curl.se/mail/lib-2021-02/0000.html
+  
+  Closes #6557
+
+- [Alessandro Ghedini brought this change]
+
+  quiche: don't use primary_ip / primary_port
+  
+  Closes #6555
+
+Alessandro Ghedini (1 Feb 2021)
+- travis: enable quiche's FFI feature
+
+Daniel Stenberg (30 Jan 2021)
+- [Dmitry Wagin brought this change]
+
+  http: improve AWS HTTP v4 Signature auth
+  
+  - Add support services without region and service prefixes in
+  the URL endpoint (ex. Min.IO, GCP, Yandex Cloud, Mail.Ru Cloud Solutions, etc)
+  by providing region and service parameters via aws-sigv4 option.
+  - Add [:region[:service]] suffix to aws-sigv4 option;
+  - Fix memory allocation errors.
+  - Refactor memory management.
+  - Use Curl_http_method instead() STRING_CUSTOMREQUEST.
+  - Refactor canonical headers generating.
+  - Remove repeated sha256_to_hex() usage.
+  - Add some docs fixes.
+  - Add some codestyle fixes.
+  - Add overloaded strndup() for debug - curl_dbg_strndup().
+  - Update tests.
+  
+  Closes #6524
+
+- hyper: fix CONNECT to set 'data' as userdata
+  
+  Follow-up to 14e075d1a7fd
+
+- [Layla brought this change]
+
+  connect: fix compile errors in `Curl_conninfo_local`
+  
+  .. for the `#else` (`!HAVE_GETSOCKNAME`) case
+  
+  Fixes https://github.com/curl/curl/issues/6548
+  Closes #6549
+  
+  Signed-off-by: Layla <layla@insightfulvr.com>
+
+- [Michał Antoniak brought this change]
+
+  transfer: fix GCC 10 warning with flag '-Wint-in-bool-context'
+  
+  ... and return the error code from the Curl_mime_rewind call.
+  
+  Closes #6537
+
+- [Michał Antoniak brought this change]
+
+  avoid warning: enum constant in boolean context
+
+- copyright: fix missing year (range) updates
+
+- RELEASE-NOTES: synced
+
+- openssl: lowercase the hostname before using it for SNI
+  
+  ... because it turns out several servers out there don't actually behave
+  correctly otherwise in spite of the fact that the SNI field is
+  specifically said to be case insensitive in RFC 6066 section 3.
+  
+  Reported-by: David Earl
+  Fixes #6540
+  Closes #6543
+
+- KNOWN_BUGS: cmake: ExternalProject_Add does not set CURL_CA_PATH
+  
+  Closes #6313
+
+- KNOWN_BUGS: Multi perform hangs waiting for threaded resolver
+  
+  Closes #4852
+
+- KNOWN_BUGS: "pulseUI VPN client" is known to be buggy
+  
+  First entry in the new section "applications" for known problems in
+  libcurl using applications.
+  
+  Closes #6306
+
+- tool_writeout: make %{errormsg} blank for no errors
+  
+  Closes #6539
+
+Jay Satiro (27 Jan 2021)
+- [Gisle Vanem brought this change]
+
+  build: fix djgpp builds
+  
+  - Update build instructions in packages/DOS/README
+  
+  - Extend 'VPATH' with 'vquic' and 'vssh'.
+  
+  - Allow 'Makefile.dist' to build both 'lib' and 'src'.
+  
+  - Allow using the Windows hosted djgpp cross compiler to build for MSDOS
+    under Windows.
+  
+  - 'USE_SSL' -> 'USE_OPENSSL'
+  
+  - Added a 'link_EXE' macro. Etc, etc.
+  
+  - Linking 'curl.exe' needs '$(CURLX_CFILES)' too.
+  
+  - Do not pick-up '../lib/djgpp/*.o' files. Recompile locally.
+  
+  - Generate a gzipped 'tool_hugehelp.c' if 'USE_ZLIB=1'.
+  
+  - Remove 'djgpp-clean'
+  
+  - Adapt to new C-ares directory structure
+  
+  - Use conditional variable assignments
+  
+  Clarify the 'conditional variable assignment' in 'common.dj'.
+  
+  Closes https://github.com/curl/curl/pull/6382
+
+Daniel Stenberg (27 Jan 2021)
+- [Ikko Ashimine brought this change]
+
+  hyper: fix typo in c-hyper.c
+  
+  settting -> setting
+  
+  Closes #6538
+
+- libssh2: fix CURL_LIBSSH2_DEBUG-enabled build
+  
+  Follow-up to 2dcc940959772a
+  
+  Reported-by: Gisle Vanem
+  Bug: https://github.com/curl/curl/commit/2dcc940959772a652f6813fb6bd3092095a4877b#commitcomment-46420088
+
+Jay Satiro (27 Jan 2021)
+- asyn-thread: fix build for when getaddrinfo missing
+  
+  This is a follow-up to 8315343 which several days ago moved the resolver
+  pointer into the async struct but did not update the code that uses it
+  when getaddrinfo is not present.
+  
+  Closes https://github.com/curl/curl/pull/6536
+
+Daniel Stenberg (27 Jan 2021)
+- urldata: move 'ints' to the end of 'connectdata'
+  
+  To optimize storage slightly.
+  
+  Closes #6534
+
+- urldata: store ip version in a single byte
+  
+  Closes #6534
+
+- urldata: remove duplicate 'upkeep_interval_ms' from connectdata
+  
+  ... and rely only on the value already set in Curl_easy.
+  
+  Closes #6534
+
+- urldata: remove 'local_ip' from the connectdata struct
+  
+  As the info is already stored in the transfer handle anyway, there's no
+  need to carry around a duplicate buffer for the life-time of the handle.
+  
+  Closes #6534
+
+- urldata: remove duplicate port number storage
+  
+  ... and use 'int' for ports. We don't use 'unsigned short' since -1 is
+  still often used internally to signify "unknown value" and 0 - 65535 are
+  all valid port numbers.
+  
+  Closes #6534
+
+- urldata: remove the duplicate 'ip_addr_str' field
+  
+  ... as the numerical IP address is already stored and kept in 'primary_ip'.
+  
+  Closes #6534
+
+- select: convert Curl_select() to private static function
+  
+  The old function should not be used anywhere anymore (the only remaining
+  gskit use has to be fixed to instead use Curl_poll or none at all).
+  
+  The static function version is now called our_select() and is only built
+  if necessary.
+  
+  Closes #6531
+
+- Curl_chunker: shrink the struct
+  
+  ... by removing a field, converting the hex index into a byte and
+  rearranging the order. Cuts it down from 48 bytes to 32 on x86_64.
+  
+  Closes #6527
+
+- curl: include the file name in --xattr/--remote-time error msgs
+
+- curl: s/config->global/global/ in single_transfer()
+
+- curl: move fprintf outputs to warnf
+  
+  For setting and getting time of the download. To make the outputs
+  respect --silent etc.
+  
+  Reported-by: Viktor Szakats
+  Fixes #6533
+  Closes #6535
+
+- [Tatsuhiro Tsujikawa brought this change]
+
+  ngtcp2: Fix http3 upload stall
+  
+  Closes #6521
+
+- [Tatsuhiro Tsujikawa brought this change]
+
+  ngtcp2: Fix stack buffer overflow
+  
+  Closes #6521
+
+- warnless.h: remove the prototype for curlx_ultosi
+  
+  Follow-up to 217552503ff3
+
+- warnless: remove curlx_ultosi
+  
+  ... not used anywhere
+  
+  Closes #6530
+
+- [Patrick Monnerat brought this change]
+
+  lib: remove conn->data uses
+  
+  Closes #6515
+
+- pingpong: remove the 'conn' struct member
+  
+  ... as it's superfluous now when Curl_easy is passed in and we can
+  derive the connection from that instead and avoid the duplicate copy.
+  
+  Closes #6525
+
+- hostip/proxy: remove conn->data use
+  
+  Closes #6513
+
+- url: reduce conn->data references
+  
+  ... there are a few left but let's keep them to last
+  
+  Closes #6512
+
+- scripts/singleuse: add curl_easy_option*
+
+Jay Satiro (25 Jan 2021)
+- test410: fix for windows
+  
+  - Pass the very long request header via file instead of command line.
+  
+  Prior to this change the 49k very long request header string was passed
+  via command line and on Windows that is too long so it was truncated and
+  the test would fail (specifically msys CI).
+  
+  Closes https://github.com/curl/curl/pull/6516
+
+Daniel Stenberg (25 Jan 2021)
+- libssh2: move data from connection object to transfer object
+  
+  Readdir data, filenames and attributes are strictly related to the
+  transfer and not the connection. This also reduces the total size of the
+  fixed connectdata struct.
+  
+  Closes #6519
+
+- RELEASE-NOTES: synced
+
+- [Patrick Monnerat brought this change]
+
+  lib: remove conn->data uses
+  
+  Closes #6499
+
+- hyper: remove the conn->data references
+  
+  Closes #6508
+
+- travis: build ngtcp2 --with-gnutls
+  
+  ... since they disable it by default since a few days back.
+  
+  Closes #6506
+  Fixes #6493
+
+- hostip: remove conn->data from resolver functions
+  
+  This also moves the 'async' struct from the connectdata struct into the
+  Curl_easy struct, which seems like a better home for it.
+  
+  Closes #6497
+
+Jay Satiro (22 Jan 2021)
+- strerror: skip errnum >= 0 assertion on windows
+  
+  On Windows an error number may be greater than INT_MAX and negative once
+  cast to int.
+  
+  The assertion is checked only in debug builds.
+  
+  Closes https://github.com/curl/curl/pull/6504
+
+Daniel Stenberg (21 Jan 2021)
+- doh: make Curl_doh_is_resolved survive a NULL pointer
+  
+  ... if Curl_doh() returned a NULL, this function gets called anyway as
+  in a asynch procedure. Then the doh struct pointer is NULL and signifies
+  an OOM situation.
+  
+  Follow-up to 6246a1d8c6776
+
+- wolfssh: remove conn->data references
+  
+  ... and repair recent build breakage
+  
+  Closes #6507
+
+- http: empty reply connection are not left intact
+  
+  ... so mark the connection as closed in this condition to prevent that
+  verbose message to wrongly appear.
+  
+  Reported-by: Matt Holt
+  Bug: https://twitter.com/mholt6/status/1352130240265375744
+  Closes #6503
+
+- chunk/encoding: remove conn->data references
+  
+  ... by anchoring more functions on Curl_easy instead of connectdata
+  
+  Closes #6498
+
+Jay Satiro (20 Jan 2021)
+- [Erik Olsson brought this change]
+
+  lib: save a bit of space with some structure packing
+  
+  - Reorder some internal struct members so that less padding is used.
+  
+  This is an attempt at saving a bit of space by packing some structs
+  (using pahole to find the holes) where it might make sense to do
+  so without losing readability.
+  
+  I.e., I tried to avoid separating fields that seem grouped
+  together (like the cwd... fields in struct ftp_conn for instance).
+  Also abstained from touching fields behind conditional macros as
+  that quickly can get complicated.
+  
+  Closes https://github.com/curl/curl/pull/6483
+
+Daniel Stenberg (20 Jan 2021)
+- INSTALL.md: fix typo
+  
+  Found-by: Marcel Raad
+
+- [Fabian Keil brought this change]
+
+  http: get CURLOPT_REQUEST_TARGET working with a HTTP proxy
+  
+  Added test 1613 to verify.
+  
+  Closes #6490
+
+- Merge branch 'bagder/curl_range-data-conn'
+
+- ftp: remove conn->data leftover
+
+- curl_range: remove conn->data
+  
+  Closes #6496
+
+- INSTALL: now at 85 operating systems
+
+- quiche: fix unused parameter ‘conn’
+  
+  Follow-up to 2bdec0b3
+
+- transfer: fix ‘conn’ undeclared mistake for iconv build
+  
+  Follow-up to 219d9f8620d
+
+- doh: allocate state struct on demand
+  
+  ... instead of having it static within the Curl_easy struct. This takes
+  away 1176 bytes (18%) from the Curl_easy struct that aren't used very
+  often and instead makes the code allocate it when needed.
+  
+  Closes #6492
+
+- socks: use the download buffer instead
+  
+  The SOCKS code now uses the generic download buffer for temporary
+  storage during the connection procedure, instead of having its own
+  private 600 byte buffer that adds to the connectdata struct size. This
+  works fine because this point the buffer is allocated but is not use for
+  download yet since the connection hasn't completed.
+  
+  This reduces the connection struct size by 22% on a 64bit arch!
+  
+  The SOCKS buffer needs to be at least 600 bytes, and the download buffer
+  is guaranteed to never be smaller than 1000 bytes.
+  
+  Closes #6491
+
+- urldata: make magic be the first struct field
+  
+  By making the `magic` identifier the same size and at the same place
+  within the structs (easy, multi, share), libcurl will be able to more
+  reliably detect and safely error out if an application passes in the
+  wrong handle to APIs. Easier to detect and less likely to cause crashes
+  if done.
+  
+  Such mixups can't be detected at compile-time due to them being
+  typedefed void pointers - unless `CURL_STRICTER` is defined.
+  
+  Closes #6484
+
+- http_chunks: correct and clarify a comment on hexnumber length
+  
+  ... and also rename the define for max length.
+  
+  Closes #6489
+
+- curl_path: remove conn->data use
+  
+  Closes #6487
+
+- transfer: remove conn->data use
+  
+  Closes #6486
+
+- quic: remove conn->data use
+  
+  Closes #6485
+
+- [Fabian Keil brought this change]
+
+  Add test1181: Proxy request with --proxy-header "Connection: Keep-Alive"
+
+- [Fabian Keil brought this change]
+
+  Add test1180: Proxy request with -H "Proxy-Connection: Keep-Alive"
+  
+  At the moment the test fails as curl sends two Proxy-Connection
+  headers.
+
+- c-hyper: avoid duplicated Proxy-Connection headers
+
+- http: make providing Proxy-Connection header not cause duplicated headers
+  
+  Fixes test 1180
+  
+  Bug: https://curl.se/mail/lib-2021-01/0095.html
+  Reported-by: Fabian Keil
+  Closes #6472
+
+- runtests: preprocess DISABLED to allow conditionals
+  
+  ... with this function provided, we can disable tests for specific
+  environments and setups directly within this file.
+  
+  Closes #6477
+
+- runtests: turn preprocessing into a separate function
+  
+  ... and remove all other variable substitutions as they're now done once
+  and for all in the preprocessor.
+
+- lib/Makefile.inc: convert to listing each file on its own line
+  
+  ... to make it diff friendlier and easier to read.
+  
+  Closes #6448
+
+- ftplistparser: remove use of conn->data
+  
+  Closes #6482
+
+- lib: more conn->data cleanups
+  
+  Closes #6479
+
+- [Patrick Monnerat brought this change]
+
+  vtls: reduce conn->data use
+  
+  Closes #6474
+
+- hyper: deliver data to application with Curl_client_write
+  
+  ... just as the native code path does. Avoids sending too large data
+  chunks in the callback and more.
+  
+  Reported-by: Gisle Vanem
+  Fixes #6462
+  Closes #6473
+
+- gopher: remove accidental conn->data leftover
+
+- libssh: avoid plain free() of libssh-memory
+  
+  Since curl's own memory debugging system redefines free() calls to track
+  and fiddle with memory, it cannot be used on memory allocated by 3rd
+  party libraries.
+  
+  Third party libraries SHOULD NOT require free() to release allocated
+  resources for this reason - and libs can use separate healp allocators
+  on some systems (like Windows) so free() doesn't necessarily work
+  anyway.
+  
+  Filed as an issue with libssh: https://bugs.libssh.org/T268
+  
+  Closes #6481
+
+- send: assert that Curl_write_plain() has a ->conn when called
+  
+  To help catch bad invokes.
+  
+  Closes #6476
+
+- test410: verify HTTPS GET with a 49K request header
+  
+  skip test 410 for mesalink in the CI as it otherwise hangs "forever"
+
+- lib: pass in 'struct Curl_easy *' to most functions
+  
+  ... in most cases instead of 'struct connectdata *' but in some cases in
+  addition to.
+  
+  - We mostly operate on transfers and not connections.
+  
+  - We need the transfer handle to log, store data and more. Everything in
+    libcurl is driven by a transfer (the CURL * in the public API).
+  
+  - This work clarifies and separates the transfers from the connections
+    better.
+  
+  - We should avoid "conn->data". Since individual connections can be used
+    by many transfers when multiplexing, making sure that conn->data
+    points to the current and correct transfer at all times is difficult
+    and has been notoriously error-prone over the years. The goal is to
+    ultimately remove the conn->data pointer for this reason.
+  
+  Closes #6425
+
+Emil Engler (17 Jan 2021)
+- docs: fix typos in NEW-PROTOCOL.md
+  
+  This fixes a misspelled "it" and a grammatically wrong "-ing" suffix.
+  
+  Closes #6471
+
+Daniel Stenberg (16 Jan 2021)
+- RELEASE-NOTES: synced
+
+Jay Satiro (16 Jan 2021)
+- [Razvan Cojocaru brought this change]
+
+  cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
+  
+  This does for cmake builds what --disable-openssl-auto-load-config
+  does for autoconf builds.
+  
+  Closes https://github.com/curl/curl/pull/6435
+
+Daniel Stenberg (15 Jan 2021)
+- test1918: verify curl_easy_option_by_name() and curl_easy_option_by_id()
+  
+  ... and as a practical side-effect, make sure that the
+  Curl_easyopts_check() function is asserted in debug builds, which we
+  want to detect mismatches between the options list in easyoptions.c and
+  the options in curl.h
+  
+  Found-by: Gisle Vanem
+  Bug: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45991815
+  
+  Closes #6461
+
+- [Gisle Vanem brought this change]
+
+  easyoptions: add the missing AWS_SIGV4
+  
+  Follow-up from AWS_SIGV4
+
+- schannel_verify: fix safefree call typo
+  
+  Follow-up from e87ad71d1ba00519
+  
+  Closes #6459
+
+- mime: make sure setting MIMEPOST to NULL resets properly
+  
+  ... so that a function can first use MIMEPOST and then set it to NULL to
+  reset it back to a blank POST.
+  
+  Added test 584 to verify the fix.
+  
+  Reported-by: Christoph M. Becker
+  
+  Fixes #6455
+  Closes #6456
+
+- multi: set the PRETRANSFER time-stamp when we switch to PERFORM
+  
+  ... instead of at end of the DO state. This makes the timer more
+  accurate for the protocols that use the DOING state (such as FTP), and
+  simplifies how the function (now called init_perform) is called.
+  
+  The timer will then include the entire procedure up to PERFORM -
+  including all instructions for getting the transfer started.
+  
+  Closes #6454
+
+- CURLINFO_PRETRANSFER_TIME.3: clarify
+  
+  ... the timer *does* include the instructions for getting the remote
+  file.
+  
+  Ref: #6452
+  Closes #6453
+
+- [Gisle Vanem brought this change]
+
+  schannel: plug a memory-leak
+  
+  ... when built without -DUNICODE.
+  
+  Closes #6457
+
+Jay Satiro (14 Jan 2021)
+- gitattributes: Set batch files to CRLF line endings on checkout
+  
+  If a batch file is run without CRLF line endings (ie LF-only) then
+  arbitrary behavior may occur. I consider that a bug in Windows, however
+  the effects can be serious enough (eg unintended code executed) that
+  we're fixing it in the repo by requiring CRLF line endings for batch
+  files on checkout.
+  
+  Prior to this change the checked-out line endings of batch files were
+  dependent on a user's git preferences. On Windows it is common for git
+  users to have automatic CRLF conversion enabled (core.autocrlf true),
+  but those users that don't would run into this behavior.
+  
+  For example a user has reported running the Visual Studio project
+  generator batch file (projects/generate.bat) and it looped forever.
+  Output showed that the Windows OS interpreter was occasionally jumping
+  to arbitrary points in the batch file and executing commands. This
+  resulted in unintended files being removed (a removal sequence called)
+  and looping forever.
+  
+  Ref: https://serverfault.com/q/429594
+  Ref: https://stackoverflow.com/q/232651
+  Ref: https://www.dostips.com/forum/viewtopic.php?t=8988
+  Ref: https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in
+  Ref: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf
+  
+  Bug: https://github.com/curl/curl/discussions/6427
+  Reported-by: Ganesh Kamath
+  
+  Closes https://github.com/curl/curl/pull/6442
+
+Daniel Stenberg (14 Jan 2021)
+- tool_operate: spellfix a comment
+
+- ROADMAP: refreshed
+  
+  o removed HSTS - already implemented
+  o added HTTPS RR records
+  o mention HTTP/3 completion
+
+- http_chunks: remove Curl_ prefix from static functions
+
+- transfer: remove Curl_ prefix from static functions
+
+- tftp: remove Curl_ prefix from static functions
+
+- multi: remove Curl_ prefix from static functions
+
+- ldap: remove Curl_ prefix from static functions
+
+- doh: remove Curl_ prefix from static functions
+
+- asyn-ares: remove Curl_ prefix from static functions
+
+- vtls: remove Curl_ prefix from static functions
+
+- bearssl: remove Curl_ prefix from static functions
+
+- mbedtls: remove Curl_ prefix from static functions
+
+- wolfssl: remove Curl_ prefix from static functions
+
+- nss: remove Curl_ prefix from static functions
+
+- gnutls: remove Curl_ prefix from static functions
+
+- openssl: remove Curl_ prefix from static functions
+  
+  ... as we reserve this prefix to library-wide functions.
+  
+  Closes #6443
+
+- nss: get the run-time version instead of build-time
+  
+  Closes #6445
+
+Jay Satiro (12 Jan 2021)
+- tool_doswin: Restore original console settings on CTRL signal
+  
+  - Move Windows terminal init code from tool_main to tool_doswin.
+  
+  - Restore the original console settings on CTRL+C and CTRL+BREAK.
+  
+  Background: On Windows the curl tool changes the console settings to
+  enable virtual terminal processing (eg color output) if supported
+  (ie Win 10). The original settings are restored on exit but prior to
+  this change were not restored in the case of the CTRL signals.
+  
+  Windows VT behavior varies depending on console/powershell/terminal;
+  refer to the discussion in #6226.
+  
+  Assisted-by: Rich Turner
+  
+  Closes https://github.com/curl/curl/pull/6226
+
+Daniel Stenberg (12 Jan 2021)
+- gen.pl: fix perl syntax
+  
+  Follow-up to 324cf1d2e
+
+- [Emil Engler brought this change]
+
+  help: update to current codebase
+  
+  This commit bumps the help to the current state of the project.
+  
+  Closes #6437
+
+- [Emil Engler brought this change]
+
+  docs: fix line length bug in gen.pl
+  
+  The script warns if the length of $opt and $desc is > 78. However, these
+  two variables are on totally separate lines so the check makes no sense.
+  Also the $bitmask field is totally forgotten. Currently this leads to
+  two warnings within `--resolve` and `--aws-sigv4`.
+  
+  Closes #6438
+
+- [Emil Engler brought this change]
+
+  docs: fix wrong documentation in help.d
+  
+  curl does not list all categories when you invoke "--help" without any
+  parameters.
+  
+  Closes #6436
+
+- aws-sigv4.d: polish the wording
+  
+  Make it shorter and imperative form
+  
+  Closes #6439
+
+- [Fabian Keil brought this change]
+
+  misc: fix typos
+  
+  Bug: https://curl.se/mail/lib-2021-01/0063.html
+  Closes #6434
+
+- multi_runsingle: bail out early on data->conn == NULL
+  
+  As that's a significant error condition and scan-build warns for NULL
+  pointer dereferences if we don't.
+  
+  Closes #6433
+
+- multi: skip DONE state if there's no connection left for ftp wildcard
+  
+  ... to avoid running in that state with data->conn being NULL.
+
+- libssh2: fix "Value stored to 'readdir_len' is never read"
+  
+  Detected by scan-build
+
+- connect: mark intentional ignores of setsockopt return values
+  
+  Pointed out by Coverity
+  
+  Closes #6431
+
+Jay Satiro (11 Jan 2021)
+- http_proxy: Fix CONNECT chunked encoding race condition
+  
+  - During the end-of-headers response phase do not mark the tunnel
+    complete unless the response body was completely parsed/ignored.
+  
+  Prior to this change if the entirety of a CONNECT response with chunked
+  encoding was not received by the time the final header was parsed then
+  the connection would be marked done prematurely, before all the chunked
+  data could be read in and ignored (since this is what we do with any
+  CONNECT response body) and the connection could not be used.
+  
+  Bug: https://curl.se/mail/lib-2021-01/0033.html
+  Reported-by: Fabian Keil
+  
+  Closes https://github.com/curl/curl/pull/6432
+
+Daniel Stenberg (11 Jan 2021)
+- RELEASE-NOTES: synced
+
+- url: if IDNA conversion fails, fallback to Transitional
+  
+  This improves IDNA2003 compatiblity.
+  
+  Reported-by: Bubu on github
+  Fixes #6423
+  Closes #6428
+
+- travis: make the Hyper build from its master branch
+  
+  Closes #6430
+
+- http: make 'authneg' also work for Hyper
+  
+  When doing a request with a request body expecting a 401/407 back, that
+  initial request is sent with a zero content-length. Test 177 and more.
+  
+  Closes #6424
+
+Jay Satiro (8 Jan 2021)
+- cmake: Add an option to disable libidn2
+  
+  New option USE_LIBIDN2 defaults to ON for libidn2 detection. Prior to
+  this change libidn2 detection could not be turned off in cmake builds.
+  
+  Reported-by: William A Rowe Jr
+  
+  Fixes https://github.com/curl/curl/issues/6361
+  Closes https://github.com/curl/curl/pull/6362
+
+Daniel Stenberg (8 Jan 2021)
+- HYPER: no longer needs the special branch
+
+- test179: use consistent header line endings
+  
+  ... to make "Hyper mode" work better.
+
+- file: don't provide content-length for directories
+  
+  ... as it is misleading.
+  
+  Ref #6379
+  Closes #6421
+
+- TODO: Directory listing for FILE:
+  
+  Ref #6379
+
+- curl.h: add CURLPROTO_GOPHERS as own protocol identifier
+  
+  Follow-up to a1f06f32b860, to make sure it can be handled separately
+  from plain gopher.
+  
+  Closes #6418
+
+- http: have CURLOPT_FAILONERROR fail after all headers
+  
+  ... so that Retry-After and other meta-content can still be used.
+  
+  Added 1634 to verify. Adjusted test 194 and 281 since --fail now also
+  includes the header-terminating CRLF in the output before it exits.
+  
+  Fixes #6408
+  Closes #6409
+
+- global_init: debug builds allocates a byte in init
+  
+  ... to make build tools/valgrind warn if no curl_global_cleanup is
+  called.
+  
+  This is conditionally only done for debug builds with the env variable
+  CURL_GLOBAL_INIT set.
+  
+  Closes #6410
+
+- lib/unit tests: add missing curl_global_cleanup() calls
+
+- travis: adapt to Hyper build change
+  
+  Closes #6419
+
+- pretransfer: setup the User-Agent header here
+  
+  ... and not in the connection setup, as for multiplexed transfers the
+  connection setup might be skipped and then the transfer would end up
+  without the set user-agent!
+  
+  Reported-by: Flameborn on github
+  Assisted-by: Andrey Gursky
+  Assisted-by: Jay Satiro
+  Assisted-by: Mike Gelfand
+  Fixes #6312
+  Closes #6417
+
+- test66: disable with Hyper
+  
+  ...as Hyper doesn't support HTTP/0.9
+
+- c-hyper: poll the tasks until end correctly
+  
+  ... makes test 36 work.
+  
+  Closes #6412
+
+- [Gergely Nagy brought this change]
+
+  mk-ca-bundle.pl: deterministic output when using -t
+  
+  Printing trust purposes are now sorted, making the output deterministic
+  when running on the same input certdata.txt.
+  
+  Closes #6413
+
+- KNOWN_BUGS: fixed "wolfSSL lacks support for renegotiation"
+  
+  Fixed by #6411
+
+- [Himanshu Gupta brought this change]
+
+  wolfssl: add SECURE_RENEGOTIATION support
+  
+  Closes #6411
+
+- RELEASE-NOTES: synced
+
+- wolfssl: update copyright year range
+  
+  Follow-up to 7de2e96535e9
+
+- c-hyper: make CURLE_GOT_NOTHING work
+  
+  Test 30
+  
+  Closes #6407
+
+- http_proxy: make CONNECT work with the Hyper backend
+  
+  Makes test 80 run
+  
+  Closes #6406
+
+- TODO: --fail-with-body perchance?
+
+Jay Satiro (4 Jan 2021)
+- tool_operate: fix the suppression logic of some error messages
+  
+  - Fix the failed truncation and failed writing body error messages to
+    not be shown unless error messages are shown. (ie the user has
+    specified -sS, or has not specified -s).
+  
+  - Also prefix same error messages with "curl: ", for example:
+    curl: (23) Failed to truncate, exiting
+  
+  Prior to this change the failed truncation error messages would be shown
+  if not -s, but did not account for -sS which should show.
+  
+  Prior to this change the failed writing body error messages would be
+  shown always.
+  
+  Ref: https://curl.se/docs/manpage.html#-S
+  
+  Bug: https://curl.se/mail/archive-2020-12/0017.html
+  Reported-by: Hongyi Zhao
+  
+  Closes https://github.com/curl/curl/pull/6402
+
+- wolfssl: Support wolfSSL builds missing TLS 1.1
+  
+  The wolfSSL TLS library defines NO_OLD_TLS in some of their build
+  configurations and that causes the library to be built without TLS 1.1.
+  For example if MD5 is explicitly disabled when building wolfSSL then
+  that defines NO_OLD_TLS and the library is built without TLS 1.1 [1].
+  
+  Prior to this change attempting to build curl with a wolfSSL that was
+  built with NO_OLD_TLS would cause a build link error undefined reference
+  to wolfTLSv1_client_method.
+  
+  [1]: https://github.com/wolfSSL/wolfssl/blob/v4.5.0-stable/configure.ac#L2366
+  
+  Bug: https://curl.se/mail/lib-2020-12/0121.html
+  Reported-by: Julian Montes
+  
+  Closes https://github.com/curl/curl/pull/6388
+
+Daniel Stenberg (4 Jan 2021)
+- test1633: set appropriate name
+  
+  "--retry with a 429 response and Retry-After:"
+
+- travis: limit the tests with quiche builds to HTTPS and FTPS only
+  
+  ... since it runs into the 50 minute time limit too often otherwise.
+  
+  Closes #6403
+
+- HISTORY: added dates to early history
+  
+  Mostly thanks to this archived web page for urlget:
+  
+  https://web.archive.org/web/19980216125115/http://www.inf.ufrgs.br/~sagula/urlget.html
+
+- httpauth: make multi-request auth work with custom port
+  
+  When doing HTTP authentication and a port number set with CURLOPT_PORT,
+  the code would previously have the URL's port number override as if it
+  had been a redirect to an absolute URL.
+  
+  Added test 1568 to verify.
+  
+  Reported-by: UrsusArctos on github
+  Fixes #6397
+  Closes #6400
+
+- [Emil Engler brought this change]
+
+  language: s/behaviour/behavior/g
+  
+  We currently use both spellings the british "behaviour" and the american
+  "behavior". However "behavior" is more used in the project so I think
+  it's worth dropping the british name.
+  
+  Closes #6395
+
+- cmdline-opts/retry.d: mention response code 429 as well
+  
+  Reported-by: Cherish98
+  Bug: https://curl.se/mail/archive-2020-12/0018.html
+
+- docs/HYPER.md: mention outstanding issues
+  
+  To make it more obvious to users what doesn't work (yet)
+  
+  Closes #6389
+
+- COPYING/configure: bump copyright year range
+
+- c-hyper: add timecondition to the request
+  
+  Test 77-78
+  
+  Closes #6391
+
+- c-hyper: make Digest and NTLM work
+  
+  Test 64, 65, 67, 68, 69, 70, 72
+  
+  Closes #6390
+
+- examples/curlgtk.c: fix the copyright year range
+  
+  ... and make private functions static.
+
+- [Olaf Hering brought this change]
+
+  docs/examples: adjust prototypes for CURLOPT_READFUNCTION
+  
+  The type of the buffer in curl_read_callback is 'char *', not 'void *'.
+  
+  Signed-off-by: Olaf Hering <olaf@aepfle.de>
+  Closes #6392
+
+- examples: fix more empty expression statement has no effect
+  
+  Follow-up to 26e46617b9
+
+- cleanup: fix two empty expression statement has no effect
+  
+  Follow-up to 26e46617b9
+
+- configure: set -Wextra-semi-stmt for clang with --enable-debug
+  
+  To have it properly complain on empty statements with no effect.
+  
+  Ref: #6376
+  Closes #6378
+
+- tests/unit: fix empty statements with no effect
+  
+  ... by making macros use "do {} while(0)"
+
+- [Paul Groke brought this change]
+
+  dns: extend CURLOPT_RESOLVE syntax for adding non-permanent entries
+  
+  Extend the syntax of CURLOPT_RESOLVE strings: allow using a '+' prefix
+  (similar to the existing '-' prefix for removing entries) to add
+  DNS cache entries that will time out just like entries that are added
+  by libcurl itself.
+  
+  Append " (non-permanent)" to info log message in case a non-permanent
+  entry is added.
+  
+  Adjust relevant comments to reflect the new behavior.
+  
+  Adjust documentation.
+  
+  Extend unit1607 to test the new functionality.
+  
+  Closes #6294
+
+- schannel: fix "empty expression statement has no effect"
+  
+  Bug: https://github.com/curl/curl/commit/8ab78f720ae478d533e30b202baec4b451741579#commitcomment-45445950
+  Reported-by: Gisle Vanem
+  Closes #6381
+
+- [Denis Laxalde brought this change]
+
+  docs: remove redundant "better" in --fail help
+  
+  Closes #6385
+
+- [Kevin Ushey brought this change]
+
+  curl.1: fix typo microsft -> microsoft
+  
+  Closes #6380
+
+- [XhmikosR brought this change]
+
+  misc: assorted typo fixes
+  
+  Closes #6375
+
+- RELEASE-NOTES: synced
+
+- tool_operate: avoid NULL dereference of first_arg
+  
+  Follow-up to 6a5e020d4d2b04a
+  Identified by OSS-Fuzz
+  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28999
+  Closes #6377
+
+- misc: fix "warning: empty expression statement has no effect"
+  
+  Turned several macros into do-while(0) style to allow their use to work
+  find with semicolon.
+  
+  Bug: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45433279
+  Follow-up to 08e8455dddc5e4
+  Reported-by: Gisle Vanem
+  Closes #6376
+
+- KNOWN_BUGS: 6.10 curl never completes Negotiate over HTTP
+  
+  Closes #5235
+  Closes #6370
+
+- writeout: fix NULL dereference for "this url"
+  
+  Detected by torture test 1029
+  
+  Follow-up to 7a90ddf88f5a
+  
+  Closes #6374
+
+- failf: remove newline from formatting strings
+  
+  ... as failf adds one itself.
+  
+  Also: add an assert() to failf() that triggers on a newline in the
+  format string!
+  
+  Closes #6365
+
+- [XhmikosR brought this change]
+
+  CI: fix warning with the latest versions
+  
+  `git checkout HEAD^2` is no longer needed
+  
+  Closes #6369
+
+- INSTALL: update the list known OSes and CPU archs curl has run on
+  
+  Closes #6366
+
+- [Cherish98 brought this change]
+
+  curl: fix handling of -q option
+  
+  The match of the "-q" option (short for "--disable") should:
+  a) allow concatenation with other single-letters; and
+  b) be case-sensitive, lest confusing with "-Q" ("--quote")
+  
+  Closes #6364
+
+- tests/badsymbols.pl: ignore stand-alone single hash lines
+  
+  Bug: https://curl.se/mail/lib-2020-12/0084.html
+  Reported-by: Dennis Clarke
+  Assisted-by: Jay Satiro
+  
+  Closes #6355
+
+- curl_easy_pause.3: add multiplexed pause effects
+  
+  and generally refresh and update. Remove details for ancient versions.
+  
+  Reviewed-by: Jay Satiro
+  Closes #6360
+
+Jay Satiro (22 Dec 2020)
+- curl_easy_pause.3: fix man page reference
+  
+  Follow-up to ac9a724 from earlier today.
+  
+  Ref: https://github.com/curl/curl/pull/6359
+
+Daniel Stenberg (22 Dec 2020)
+- EXPERIMENTAL: add the Hyper backend to the list
+  
+  ... of current experimental features in curl.
+
+- speedcheck: exclude paused transfers
+  
+  Paused transfers should not be stopped due to slow speed even when
+  CURLOPT_LOW_SPEED_LIMIT is set. Additionally, the slow speed timer is
+  now reset when the transfer is unpaused - as otherwise it would easily
+  just trigger immediately after unpausing.
+  
+  Reported-by: Harry Sintonen
+  Fixes #6358
+  Closes #6359
+
+- h2: do not wait for RECV on paused transfers
+  
+  ... as the socket might be readable all the time when paused and thus
+  causing a busy-loop.
+  
+  Reported-by: Harry Sintonen
+  Reviewed-by: Jay Satiro
+  Fixes #6356
+  Closes #6357
+
+- RELEASE-NOTES: synced
+
+- cmdline-opts/gen.pl: return hard on errors
+  
+  ... as the warnings tend to go unnoticed otherwise!
+  
+  Closes #6354
+
+- examples/libtest: add .checksrc to dist
+  
+  ... so that (auto)builds from tarballs also get the correct instructions.
+  
+  Fixes #6176
+  Closes #6353
+
+- test: verify new --write-out variables
+  
+  Extended test 1029 and added 1188
+
+- test970: adapted to the new internal order of variables
+
+- curl: add variables to --write-out
+  
+  In particular, these ones can help a user to create its own error
+  message when one or transfers fail.
+  
+  writeout: add 'onerror', 'url', 'urlnum', 'exitcode', 'errormsg'
+  
+  onerror - lets a user only show the rest on non-zero exit codes
+  
+  url - the input URL used for this transfer
+  
+  urlnum - the numerical URL counter (0 indexed) for this transfer
+  
+  exitcode - the numerical exit code for the transfer
+  
+  errormsg - obvious
+  
+  Reported-by: Earnestly on github
+  Fixes #6199
+  Closes #6207
+
+- [Matthias Gatto brought this change]
+
+  tests: add very simple AWS HTTP v4 Signature test
+  
+  Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
+
+- [Matthias Gatto brought this change]
+
+  docs: add AWS HTTP v4 Signature
+
+- [Matthias Gatto brought this change]
+
+  tool: add AWS HTTP v4 Signature support
+  
+  Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
+
+- [Matthias Gatto brought this change]
+
+  http: Make the call to v4 signature
+  
+  This patch allow to call the v4 signature introduce in previous commit
+  
+  Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
+
+- [Matthias Gatto brought this change]
+
+  http: introduce AWS HTTP v4 Signature
+  
+  It is a security process for HTTP.
+  
+  It doesn't seems to be standard, but it is used by some cloud providers.
+  
+  Aws:
+  https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
+  Outscale:
+  https://wiki.outscale.net/display/EN/Creating+a+Canonical+Request
+  GCP (I didn't test that this code work with GCP though):
+  https://cloud.google.com/storage/docs/access-control/signing-urls-manually
+  
+  most of the code is in lib/http_v4_signature.c
+  
+  Information require by the algorithm:
+  - The URL
+  - Current time
+  -  some prefix that are append to some of the signature parameters.
+  
+  The data extracted from the URL are: the URI, the region,
+  the host and the API type
+  
+  example:
+  https://api.eu-west-2.outscale.com/api/latest/ReadNets
+          ~~~ ~~~~~~~~               ~~~~~~~~~~~~~~~~~~~
+          ^       ^                          ^
+         /         \                        URI
+     API type     region
+  
+  Small description of the algorithm:
+  - make canonical header using content type, the host, and the date
+  - hash the post data
+  - make canonical_request using custom request, the URI,
+    the get data, the canonical header, the signed header
+    and post data hash
+  - hash canonical_request
+  - make str_to_sign using one of the prefix pass in parameter,
+    the date, the credential scope and the canonical_request hash
+  - compute hmac from date, using secret key as key.
+  - compute hmac from region, using above hmac as key
+  - compute hmac from api_type, using above hmac as key
+  - compute hmac from request_type, using above hmac as key
+  - compute hmac from str_to_sign using above hmac as key
+  - create Authorization header using above hmac, prefix pass in parameter,
+    the date, and above hash
+  
+  Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
+  
+  Closes #5703
+
+- [Matthias Gatto brought this change]
+
+  http: add hmac support for sha256
+  
+  It seems current hmac implementation use md5 for the hash,
+  V4 signature require sha256, so I've added the needed struct in
+  this commit.
+  
+  I've added the functions that do the hmac in v4 signature file
+  as a static function ,in the next patch of the serie,
+  because it's used only by this file.
+  
+  Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
+
+- [Cristian Rodríguez brought this change]
+
+  connect: on linux, enable reporting of all ICMP errors on UDP sockets
+  
+  The linux kernel does not report all ICMP errors back to userspace due
+  to historical reasons.
+  
+  IP*_RECVERR sockopt must be turned on to have the correct behaviour
+  which is to pass all ICMP errors to userspace.
+  
+  See https://bugzilla.kernel.org/show_bug.cgi?id=202355
+  
+  Closes #6341
+
+- curl: add --create-file-mode [mode]
+  
+  This option sets the (octal) mode to use for the remote file when one is
+  created, using the SFTP, SCP or FILE protocols. When not set, the
+  default is 0644.
+  
+  Closes #6244
+
+- c-hyper: fix compiler warnings
+  
+  Identified by clang on windows.
+  
+  Reported-by: Gisle Vanem
+  Bug: 58974d25d8173aec154e593ed9d866da566c9811
+  
+  Closes #6351
+
+- KNOWN_BUGS: Remote recursive folder creation with SFTP
+  
+  Closes #5204
+
+Jay Satiro (20 Dec 2020)
+- badsymbols.pl: Add verbose mode -v
+  
+  Use -v as the first option to enable verbose mode which will show source
+  input, extracted symbol and line info. For example:
+  
+  Source: ./../include/curl/typecheck-gcc.h
+  Symbol: curlcheck_socket_info(info)
+  Line #423: #define curlcheck_socket_info(info)                     \
+  
+  Ref: https://curl.se/mail/lib-2020-12/0084.html
+  
+  Closes https://github.com/curl/curl/pull/6349
+
+- KNOWN_BUGS: Secure Transport disabling hostname validation also disables SNI
+  
+  That behavior is a limitation of Apple's Secure Transport.
+  
+  Reported-by: Cory Benfield
+  Reported-by: Ian Spence
+  Confirmed-by: Nick Zitzmann
+  
+  Ref: https://github.com/curl/curl/issues/998
+  
+  Closes https://github.com/curl/curl/issues/6347
+  Closes https://github.com/curl/curl/pull/6348
+
+Daniel Stenberg (18 Dec 2020)
+- TODO: alt-svc should fallback if alt-svc doesn't work
+  
+  Closes #4908
+
+- travis: restrict the openssl3 job to only run https and ftps tests
+  
+  ... as it runs too long otherwise and the other tests are verified in
+  other builds anyway.
+  
+  Closes #6345
+
+- build: repair http disabled but mqtt enabled build
+  
+  ... as the mqtt code reuses the "method" originally used for HTTP.
+  
+  Closes #6344
+
+- [Jon Wilkes brought this change]
+
+  cookie: avoid the C1001 internal compiler error with MSVC 14
+  
+  Fixes #6112
+  Closes #6135
+
+- RELEASE-NOTES: synced
+
+- mqtt: handle POST/PUBLISH without a set POSTFIELDSIZE
+  
+  Detected by OSS-Fuzz
+  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28735
+  
+  Added test 1916 and 1917 to verify.
+  
+  Closes #6338
+
+- travis: add CI job for Hyper build
+
+- tests: updated tests for Hyper
+
+- lib: introduce c-hyper for using Hyper
+  
+  ... as an alternative HTTP backend within libcurl.
+
+- tool_setopt: provide helper output in debug builds
+  
+  ... for when setopt() returns error.
+
+- setopt: adjust to Hyper and disabled HTTP builds
+
+- rtsp: disable if Hyper is used
+
+- getinfo: build with disabled HTTP support
+
+- version: include hyper version
+
+- docs: add HYPER.md
+
+- configure: add --with-hyper
+  
+  As the first (optional) HTTP backend alternative instead of native
+  
+  Close #6110
+
+- test1522: add debug tracing
+  
+  I used this to track down some issues and I figured I could just as well
+  keep this extra logging in here for future needs.
+  
+  Closes #6331
+
+- http: show the request as headers even when split-sending
+  
+  When the initial request isn't possible to send in its entirety, the
+  remainder of request would be delivered to the debug callback as data
+  and would wrongly be counted internally as body-bytes sent.
+  
+  Extended test 1295 to verify.
+  
+  Closes #6328
+
+- multi: when erroring in TOOFAST state, act as for PERFORM
+  
+  When failing in TOOFAST, the multi_done() wasn't called so the same
+  cleanup and handling wasn't done like when it fails in PERFORM, which in
+  the case of FTP could mean that the control connection wouldn't be
+  marked as "dead" for the CURLE_ABORTED_BY_CALLBACK case. Which caused
+  ftp_disconnect() to use it to send "QUIT", which could end up waiting
+  for a response a long time before giving up!
+  
+  Reported-by: Tomas Berger
+  Fixes #6333
+  Closes #6337
+
+- cmake: enable gophers correctly in curl-config
+  
+  Closes #6336
+
+- test1198/9: add two mqtt publish tests without payload lengths
+  
+  Closes #6335
+
+- tests/mqttd: extract the client id from the correct offset
+  
+  Closes #6334
+
+- TODO: Prevent terminal injection when writing to terminal
+  
+  Closes #6150
+
+- Revert "CI/github: work-around for brew breakage on macOS"
+  
+  This reverts commit 4cbb17a2cbbbe6337142d39479e21c3990b9c22f.
+  
+  ... as the work-around now causes failures.
+  
+  Closes #6332
+
+- examples: remove superfluous asterisk uses
+  
+  ... for function pointers. Breaks in ancient compilers.
+
+- RELEASE-NOTES: synced
+
+- test1272: fix line ending
+  
+  Follow-up to f24784f9143
+
+- URL-SYNTAX: add gophers details
+
+- test1272: test gophers
+
+- runtests: add support for gophers, gopher over TLS
+
+- [parazyd brought this change]
+
+  gopher: Implement secure gopher protocol.
+  
+  This commit introduces a "gophers" handler inside the gopher protocol if
+  USE_SSL is defined. This protocol is no different than the usual gopher
+  prococol, with the added TLS encapsulation upon connecting. The protocol
+  has been adopted in the gopher community, and many people have enabled
+  TLS in their gopher daemons like geomyidae(8), and clients, like clic(1)
+  and hurl(1).
+  
+  I have not implemented test units for this protocol because my knowledge
+  of Perl is sub-par. However, for someone more knowledgeable it might be
+  fairly trivial, because the same test that tests the plain gopher
+  protocol can be used for "gophers" just by adding a TLS listener.
+  
+  Signed-off-by: parazyd <parazyd@dyne.org>
+  
+  Closes #6208
+
+- TODO: Package curl for Windows in a signed installer
+  
+  Closes #5424
+
+- mqtt: deal with 0 byte reads correctly
+  
+  OSS-Fuzz found it
+  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28676
+  
+  Closes #6327
+
+- BUG-BOUNTY: minor language update
+  
+  ... and remove the wording about entries from before 2019 as the "within
+  12 months" is still there and covers that.
+  
+  Closes #6318
+
+- tooĺ_writeout: fix the -w time output units
+  
+  Fix regression from commit fc813f80e1bcac (#6248) that changed the unit
+  to microseconds instead of seconds with fractions
+  
+  Reported-by: 不确定
+  Fixes #6321
+  Closes #6322
+
+- quiche: remove fprintf() leftover
+
+Jay Satiro (14 Dec 2020)
+- KNOWN_BUGS: SHA-256 digest not supported in Windows SSPI builds
+  
+  Closes https://github.com/curl/curl/issues/6302
+
+- digest_sspi: Show InitializeSecurityContext errors in verbose mode
+  
+  The error is shown with infof rather than failf so that the user will
+  see the extended error message information only in verbose mode, and
+  will still see the standard CURLE_AUTH_ERROR message. For example:
+  
+  ---
+  
+  * schannel: InitializeSecurityContext failed: SEC_E_QOP_NOT_SUPPORTED
+  (0x8009030A) - The per-message Quality of Protection is not supported by
+  the security package
+  * multi_done
+  * Connection #1 to host 127.0.0.1 left intact
+  curl: (94) An authentication function returned an error
+  
+  ---
+  
+  Ref: https://github.com/curl/curl/issues/6302
+  
+  Closes https://github.com/curl/curl/pull/6315
+
+Daniel Stenberg (13 Dec 2020)
+- URL-SYNTAX: add default port numbers and IDNA details
+  
+  Closes #6316
+
+- URL-SYNTAX: mention how FILE:// access can access network on windows
+  
+  Closes #6314
+
+Jay Satiro (12 Dec 2020)
+- URL-SYNTAX: Document default SMTP port 25
+  
+  Note that ports 25 and 587 are common ports for smtp, the former being
+  the default.
+  
+  Closes https://github.com/curl/curl/pull/6310
+
+Daniel Stenberg (12 Dec 2020)
+- CURLOPT_URL.3: remove scheme specific details
+  
+  ... that are now found in URL-SYNTAX.md
+  
+  Closes #6307
+
+Dan Fandrich (12 Dec 2020)
+- docs: Fix some typos
+  
+  [skip ci]
+
+Daniel Stenberg (12 Dec 2020)
+- URL-SYNTAX: mention all supported schemes
+  
+  Closes #6311
+
+- [Douglas R. Reno brought this change]
+
+  URL-SYNTAX.md: minor language improvements
+  
+  Closes #6308
+
+- docs/URL-SYNTAX: the URL syntax curl accepts and works with
+  
+  Closes #6285
+
+- [0xflotus brought this change]
+
+  docs: enable syntax highlighting in several docs files
+  
+  ... for better readability
+  
+  Closes #6286
+
+- test1564/1565: require the 'wakeup' feature to run
+  
+  Fixes #6299
+  Fixes #6300
+  Closes #6301
+
+- runtests: add 'wakeup' as a feature
+
+- tests/server/disabled: add "wakeup"
+  
+  To allow the test suite to know if wakeup support is disabled in the
+  build.
+
+- lib1564/5: verify that curl_multi_wakeup returns OK
+
+- tests: make --libcurl tests only test FTP options if ftp enabled
+  
+  Adjust six --libcurl tests to only check the FTP option if FTP is
+  actually present in the build.
+  
+  Fixes #6303
+  Closes #6305
+
+- runtests.pl: fix "uninitialized value" warning
+  
+  follow-up to e12825c642a88774
+
+- runtests: add support for %if [feature] conditions
+  
+  ... to make tests run differently or expect different results depending
+  on what features that are present or not in curl.
+  
+  Bonus: initial minor 'Hyper' awareness but nothing is using that yet
+  
+  Closes #6304
+
+- [Jon Rumsey brought this change]
+
+  OS400: update ccsidcurl.c
+  
+  Add 'struct' to cast and declaration of cfcdata to fix compilation
+  error.
+  
+  Fixes #6292
+  Closes #6297
+
+- ngtcp2: make it build it current master again
+  
+  Closes #6296
+
+- [Cristian Rodríguez brought this change]
+
+  connect: defer port selection until connect() time
+  
+  If supported, defer port selection until connect() time
+  if --interface is given and source port is 0.
+  
+  Reproducer:
+  
+  * start fast webserver on port 80
+  * starve system of ephemeral ports
+  $  sysctl net.ipv4.ip_local_port_range="60990 60999"
+  
+  * start a curl/libcurl "crawler"
+  $curl --keepalive --parallel --parallel-immediate --head --interface
+  127.0.0.2 "http://127.0.0.[1-254]/file[001-002].txt"
+  
+  current result:
+  (possible some successful data)
+  curl: (45) bind failed with errno 98: Address already in use
+  
+  result after patch:
+  (complete success or few connections failing, higlhy depending on load)
+  
+  Fail only when all the possible 4-tuple combinations are exhausted,
+  which is impossible to do when port is selected at bind() time becuse
+  the kernel does not know if socket will be listen()'ed on or connect'ed
+  yet.
+  
+  Closes #6295
+
+- [Hans-Christian Noren Egtvedt brought this change]
+
+  connect: zero variable on stack to silence valgrind complaint
+  
+  Valgrind will complain that ssrem buffer usage if not explicit
+  initialized, hence initialize it to zero.
+  
+  This completes the change intially started in commit 2c0d7212151 ('ftp:
+  retry getpeername for FTP with TCP_FASTOPEN') where the ssloc buffer has
+  a similar memset to zero.
+  
+  Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
+  Closes #6289
+
+- RELEASE-NOTES: synced
+  
+  start over on the next release cycle
+
+Version 7.74.0 (9 Dec 2020)
+
+Daniel Stenberg (9 Dec 2020)
+- RELEASE-NOTES: synced
+  
+  for 7.74.0
+
+Jay Satiro (7 Dec 2020)
+- [Jacob Hoffman-Andrews brought this change]
+
+  urldata: restore comment on ssl_connect_data.use
+  
+  This comment was originally on the `use` field, but was separated from
+  its field in 62a2534.
+  
+  Closes https://github.com/curl/curl/pull/6287
+
+Daniel Stenberg (7 Dec 2020)
+- VERSIONS: refreshed
+  
+  We always use the patch number these days: all releases are
+  "major.minor.patch"
+
+- [Jakub Zakrzewski brought this change]
+
+  cmake: don't use reserved target name 'test'
+  
+  CMake up to 3.10 always reserves this name
+  
+  Fixes #6257
+  Closes #6258
+
+- openssl: make the OCSP verification verify the certificate id
+  
+  CVE-2020-8286
+  
+  Reported by anonymous
+  
+  Bug: https://curl.se/docs/CVE-2020-8286.html
+
+- ftp: make wc_statemach loop instead of recurse
+  
+  CVE-2020-8285
+  
+  Fixes #6255
+  Bug: https://curl.se/docs/CVE-2020-8285.html
+  Reported-by: xnynx on github
+
+- ftp: CURLOPT_FTP_SKIP_PASV_IP by default
+  
+  The command line tool also independently sets --ftp-skip-pasv-ip by
+  default.
+  
+  Ten test cases updated to adapt the modified --libcurl output.
+  
+  Bug: https://curl.se/docs/CVE-2020-8284.html
+  CVE-2020-8284
+  
+  Reported-by: Varnavas Papaioannou
+
+- urlapi: don't accept blank port number field without scheme
+  
+  ... as it makes the URL parser accept "very-long-hostname://" as a valid
+  host name and we don't want that. The parser now only accepts a blank
+  (no digits) after the colon if the URL starts with a scheme.
+  
+  Reported-by: d4d on hackerone
+  
+  Closes #6283
+
+- Revert "multi: implement wait using winsock events"
+  
+  This reverts commit d2a7d7c185f98df8f3e585e5620cbc0482e45fac.
+  
+  This commit also reverts the subsequent follow-ups to that commit, which
+  were all done within windows #ifdefs that are removed in this
+  change. Marc helped me verify this.
+  
+  Fixes #6146
+  Closes #6281
+
+- [Klaus Crusius brought this change]
+
+  ftp: retry getpeername for FTP with TCP_FASTOPEN
+  
+  In the case of TFO, the remote host name is not resolved at the
+  connetion time.
+  
+  For FTP that has lead to missing hostname for the secondary connection.
+  Therefore the name resolution is done at the time, when FTP requires it.
+  
+  Fixes #6252
+  Closes #6265
+  Closes #6282
+
+- [Thomas Danielsson brought this change]
+
+  scripts/completion.pl: parse all opts
+  
+  For tab-completion it may be preferable to include all the
+  available options.
+  
+  Closes #6280
+
+- RELEASE-NOTES: synced
+
+- openssl: use OPENSSL_init_ssl() with >= 1.1.0
+  
+  Reported-by: Kovalkov Dmitrii and Per Nilsson
+  Fixes #6254
+  Fixes #6256
+  Closes #6260
+
+- SECURITY-PROCESS: disclose on hackerone
+  
+  Once a vulnerability has been published, the hackerone issue should be
+  disclosed. For tranparency.
+  
+  Closes #6275
+
+Marc Hoersken (3 Dec 2020)
+- tests/util.py: fix compatibility with Python 2
+  
+  Backporting the Python 3 implementation of setStream
+  to ClosingFileHandler as a fallback within Python 2.
+  
+  Reported-by: Jay Satiro
+  
+  Fixes #6259
+  Closes #6270
+
+Daniel Gustafsson (3 Dec 2020)
+- docs: fix typos and markup in ETag manpage sections
+  
+  Reported-by: emanruse on github
+  Fixes #6273
+
+Daniel Stenberg (2 Dec 2020)
+- quiche: close the connection
+  
+  Reported-by: Junho Choi
+  Fixes #6213
+  Closes #6217
+
+Jay Satiro (2 Dec 2020)
+- ngtcp2: Fix build error due to symbol name change
+  
+  - NGTCP2_CRYPTO_LEVEL_APP -> NGTCP2_CRYPTO_LEVEL_APPLICATION
+  
+  ngtcp2/ngtcp2@76232e9 changed the name.
+  
+  ngtcp2 master is required to build curl with http3 support.
+  
+  Closes https://github.com/curl/curl/pull/6271
+
+Daniel Stenberg (1 Dec 2020)
+- [Klaus Crusius brought this change]
+
+  cmake: check for linux/tcp.h
+  
+  The HAVE_LINUX_TCP_H define was not set by cmake.
+  
+  Closes #6252
diff --git a/CMake/CMakeConfigurableFile.in b/CMake/CMakeConfigurableFile.in
index 2bafe2c..8ccd016 100644
--- a/CMake/CMakeConfigurableFile.in
+++ b/CMake/CMakeConfigurableFile.in
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/CurlSymbolHiding.cmake b/CMake/CurlSymbolHiding.cmake
index aaac9fe..e99ea6f 100644
--- a/CMake/CurlSymbolHiding.cmake
+++ b/CMake/CurlSymbolHiding.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -27,7 +27,7 @@
 if(CURL_HIDDEN_SYMBOLS)
   set(SUPPORTS_SYMBOL_HIDING FALSE)
 
-  if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+  if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
     set(SUPPORTS_SYMBOL_HIDING TRUE)
     set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
     set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c
index 3ef35f0..e418146 100644
--- a/CMake/CurlTests.c
+++ b/CMake/CurlTests.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -71,21 +71,15 @@
 }
 #endif
 
-/* tests for gethostbyaddr_r or gethostbyname_r */
-#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
-    defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
-    defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
-    defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
+/* tests for gethostbyname_r */
+#if defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
     defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
     defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
 #   define _REENTRANT
     /* no idea whether _REENTRANT is always set, just invent a new flag */
 #   define TEST_GETHOSTBYFOO_REENTRANT
 #endif
-#if defined(HAVE_GETHOSTBYADDR_R_5) || \
-    defined(HAVE_GETHOSTBYADDR_R_7) || \
-    defined(HAVE_GETHOSTBYADDR_R_8) || \
-    defined(HAVE_GETHOSTBYNAME_R_3) || \
+#if defined(HAVE_GETHOSTBYNAME_R_3) || \
     defined(HAVE_GETHOSTBYNAME_R_5) || \
     defined(HAVE_GETHOSTBYNAME_R_6) || \
     defined(TEST_GETHOSTBYFOO_REENTRANT)
@@ -98,18 +92,10 @@
   int type = 0;
   struct hostent h;
   int rc = 0;
-#if defined(HAVE_GETHOSTBYADDR_R_5) || \
-    defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
-    \
-    defined(HAVE_GETHOSTBYNAME_R_3) || \
+#if defined(HAVE_GETHOSTBYNAME_R_3) || \
     defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
   struct hostent_data hdata;
-#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
-      defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
-      defined(HAVE_GETHOSTBYADDR_R_8) || \
-      defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
-      \
-      defined(HAVE_GETHOSTBYNAME_R_5) || \
+#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
       defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
       defined(HAVE_GETHOSTBYNAME_R_6) || \
       defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
@@ -118,24 +104,6 @@
   struct hostent *hp;
 #endif
 
-#ifndef gethostbyaddr_r
-  (void)gethostbyaddr_r;
-#endif
-
-#if   defined(HAVE_GETHOSTBYADDR_R_5) || \
-      defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT)
-  rc = gethostbyaddr_r(address, length, type, &h, &hdata);
-  (void)rc;
-#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
-      defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT)
-  hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop);
-  (void)hp;
-#elif defined(HAVE_GETHOSTBYADDR_R_8) || \
-      defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT)
-  rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop);
-  (void)rc;
-#endif
-
 #if   defined(HAVE_GETHOSTBYNAME_R_3) || \
       defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
   rc = gethostbyname_r(address, &h, &hdata);
@@ -214,55 +182,6 @@
 #include <float.h>
 int main() { return 0; }
 #endif
-#ifdef RETSIGTYPE_TEST
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int
-main ()
-{
-  return 0;
-}
-#endif
-#ifdef HAVE_INET_NTOA_R_DECL
-#include <arpa/inet.h>
-
-typedef void (*func_type)();
-
-int main()
-{
-#ifndef inet_ntoa_r
-  func_type func;
-  func = (func_type)inet_ntoa_r;
-  (void)func;
-#endif
-  return 0;
-}
-#endif
-#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
-#define _REENTRANT
-#include <arpa/inet.h>
-
-typedef void (*func_type)();
-
-int main()
-{
-#ifndef inet_ntoa_r
-  func_type func;
-  func = (func_type)&inet_ntoa_r;
-  (void)func;
-#endif
-  return 0;
-}
-#endif
 #ifdef HAVE_GETADDRINFO
 #include <netdb.h>
 #include <sys/types.h>
@@ -379,7 +298,7 @@
 
 /* IoctlSocket source code */
         long flags = 0;
-        if(0 != ioctlsocket(0, FIONBIO, &flags))
+        if(0 != IoctlSocket(0, FIONBIO, &flags))
           return 1;
   ;
   return 0;
diff --git a/CMake/FindBearSSL.cmake b/CMake/FindBearSSL.cmake
index a8f72c9..9455f4b 100644
--- a/CMake/FindBearSSL.cmake
+++ b/CMake/FindBearSSL.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindBrotli.cmake b/CMake/FindBrotli.cmake
index c43172b..0ed0855 100644
--- a/CMake/FindBrotli.cmake
+++ b/CMake/FindBrotli.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindCARES.cmake b/CMake/FindCARES.cmake
index 9160ae5..7180682 100644
--- a/CMake/FindCARES.cmake
+++ b/CMake/FindCARES.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindGSS.cmake b/CMake/FindGSS.cmake
index 02111a2..4e4747d 100644
--- a/CMake/FindGSS.cmake
+++ b/CMake/FindGSS.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake
index 4cdf3e3..ce46a40 100644
--- a/CMake/FindLibSSH2.cmake
+++ b/CMake/FindLibSSH2.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindMbedTLS.cmake b/CMake/FindMbedTLS.cmake
index 2ebe721..1746093 100644
--- a/CMake/FindMbedTLS.cmake
+++ b/CMake/FindMbedTLS.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindNGHTTP2.cmake b/CMake/FindNGHTTP2.cmake
index e1eba05..8614492 100644
--- a/CMake/FindNGHTTP2.cmake
+++ b/CMake/FindNGHTTP2.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindNGHTTP3.cmake b/CMake/FindNGHTTP3.cmake
index 73ce9e1..643b600 100644
--- a/CMake/FindNGHTTP3.cmake
+++ b/CMake/FindNGHTTP3.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindNGTCP2.cmake b/CMake/FindNGTCP2.cmake
index a1ed8cd..5757009 100644
--- a/CMake/FindNGTCP2.cmake
+++ b/CMake/FindNGTCP2.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindNSS.cmake b/CMake/FindNSS.cmake
index 5fdb2b7..899c6b0 100644
--- a/CMake/FindNSS.cmake
+++ b/CMake/FindNSS.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindQUICHE.cmake b/CMake/FindQUICHE.cmake
index 01d1758..0247364 100644
--- a/CMake/FindQUICHE.cmake
+++ b/CMake/FindQUICHE.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindWolfSSL.cmake b/CMake/FindWolfSSL.cmake
index 54df1a8..42256b3 100644
--- a/CMake/FindWolfSSL.cmake
+++ b/CMake/FindWolfSSL.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/FindZstd.cmake b/CMake/FindZstd.cmake
index 44c741a..eaba397 100644
--- a/CMake/FindZstd.cmake
+++ b/CMake/FindZstd.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake
index 65a41e4..d57dd6a 100644
--- a/CMake/Macros.cmake
+++ b/CMake/Macros.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -107,3 +107,14 @@
     message(WARNING "Found no *nroff program")
   endif()
 endmacro()
+
+macro(optional_dependency DEPENDENCY)
+  set(CURL_${DEPENDENCY} AUTO CACHE STRING "Build curl with ${DEPENDENCY} support (AUTO, ON or OFF)")
+  set_property(CACHE CURL_${DEPENDENCY} PROPERTY STRINGS AUTO ON OFF)
+
+  if(CURL_${DEPENDENCY} STREQUAL AUTO)
+    find_package(${DEPENDENCY})
+  elseif(CURL_${DEPENDENCY})
+    find_package(${DEPENDENCY} REQUIRED)
+  endif()
+endmacro()
diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake
index 7cec6da..466b567 100644
--- a/CMake/OtherTests.cmake
+++ b/CMake/OtherTests.cmake
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -47,6 +47,40 @@
 
 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
 
+function(curl_cv_func_recv_run_test recv_retv recv_arg1 recv_arg2 recv_arg3 recv_arg4)
+  unset(curl_cv_func_recv_test CACHE)
+  check_c_source_compiles("
+    ${_source_epilogue}
+    #ifdef WINSOCK_API_LINKAGE
+    WINSOCK_API_LINKAGE
+    #endif
+    extern ${recv_retv} ${signature_call_conv}
+    recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4});
+    int main(void) {
+      ${recv_arg1} s=0;
+      ${recv_arg2} buf=0;
+      ${recv_arg3} len=0;
+      ${recv_arg4} flags=0;
+      ${recv_retv} res = recv(s, buf, len, flags);
+      (void) res;
+      return 0;
+    }"
+    curl_cv_func_recv_test)
+  message(STATUS
+    "Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
+  if(curl_cv_func_recv_test)
+    set(curl_cv_func_recv_args
+      "${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}" PARENT_SCOPE)
+    set(RECV_TYPE_ARG1 "${recv_arg1}" PARENT_SCOPE)
+    set(RECV_TYPE_ARG2 "${recv_arg2}" PARENT_SCOPE)
+    set(RECV_TYPE_ARG3 "${recv_arg3}" PARENT_SCOPE)
+    set(RECV_TYPE_ARG4 "${recv_arg4}" PARENT_SCOPE)
+    set(RECV_TYPE_RETV "${recv_retv}" PARENT_SCOPE)
+    set(HAVE_RECV 1 PARENT_SCOPE)
+    set(curl_cv_func_recv_done 1 PARENT_SCOPE)
+  endif()
+endfunction()
+
 check_c_source_compiles("${_source_epilogue}
 int main(void) {
     recv(0, 0, 0, 0);
@@ -54,43 +88,16 @@
 }" curl_cv_recv)
 if(curl_cv_recv)
   if(NOT DEFINED curl_cv_func_recv_args OR curl_cv_func_recv_args STREQUAL "unknown")
+    if(APPLE)
+      curl_cv_func_recv_run_test("ssize_t" "int" "void *" "size_t" "int")
+    endif()
     foreach(recv_retv "int" "ssize_t" )
       foreach(recv_arg1 "SOCKET" "int" )
         foreach(recv_arg2 "char *" "void *" )
           foreach(recv_arg3 "int" "size_t" "socklen_t" "unsigned int")
             foreach(recv_arg4 "int" "unsigned int")
               if(NOT curl_cv_func_recv_done)
-                unset(curl_cv_func_recv_test CACHE)
-                check_c_source_compiles("
-                  ${_source_epilogue}
-                  #ifdef WINSOCK_API_LINKAGE
-                  WINSOCK_API_LINKAGE
-                  #endif
-                  extern ${recv_retv} ${signature_call_conv}
-                  recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4});
-                  int main(void) {
-                    ${recv_arg1} s=0;
-                    ${recv_arg2} buf=0;
-                    ${recv_arg3} len=0;
-                    ${recv_arg4} flags=0;
-                    ${recv_retv} res = recv(s, buf, len, flags);
-                    (void) res;
-                    return 0;
-                  }"
-                  curl_cv_func_recv_test)
-                message(STATUS
-                  "Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
-                if(curl_cv_func_recv_test)
-                  set(curl_cv_func_recv_args
-                    "${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
-                  set(RECV_TYPE_ARG1 "${recv_arg1}")
-                  set(RECV_TYPE_ARG2 "${recv_arg2}")
-                  set(RECV_TYPE_ARG3 "${recv_arg3}")
-                  set(RECV_TYPE_ARG4 "${recv_arg4}")
-                  set(RECV_TYPE_RETV "${recv_retv}")
-                  set(HAVE_RECV 1)
-                  set(curl_cv_func_recv_done 1)
-                endif()
+                curl_cv_func_recv_run_test(${recv_retv} ${recv_arg1} ${recv_arg2} ${recv_arg3} ${recv_arg4})
               endif()
             endforeach()
           endforeach()
@@ -114,6 +121,42 @@
 set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
 set(HAVE_RECV 1)
 
+function(curl_cv_func_send_run_test send_retv send_arg1 send_arg2 send_arg3 send_arg4)
+  unset(curl_cv_func_send_test CACHE)
+  check_c_source_compiles("
+    ${_source_epilogue}
+    #ifdef WINSOCK_API_LINKAGE
+    WINSOCK_API_LINKAGE
+    #endif
+    extern ${send_retv} ${signature_call_conv}
+    send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4});
+    int main(void) {
+      ${send_arg1} s=0;
+      ${send_arg2} buf=0;
+      ${send_arg3} len=0;
+      ${send_arg4} flags=0;
+      ${send_retv} res = send(s, buf, len, flags);
+      (void) res;
+      return 0;
+    }"
+    curl_cv_func_send_test)
+  message(STATUS
+    "Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
+  if(curl_cv_func_send_test)
+    string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
+    string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
+    set(curl_cv_func_send_args
+      "${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}" PARENT_SCOPE)
+    set(SEND_TYPE_ARG1 "${send_arg1}" PARENT_SCOPE)
+    set(SEND_TYPE_ARG2 "${send_arg2}" PARENT_SCOPE)
+    set(SEND_TYPE_ARG3 "${send_arg3}" PARENT_SCOPE)
+    set(SEND_TYPE_ARG4 "${send_arg4}" PARENT_SCOPE)
+    set(SEND_TYPE_RETV "${send_retv}" PARENT_SCOPE)
+    set(HAVE_SEND 1 PARENT_SCOPE)
+    set(curl_cv_func_send_done 1 PARENT_SCOPE)
+  endif()
+endfunction()
+
 check_c_source_compiles("${_source_epilogue}
 int main(void) {
     send(0, 0, 0, 0);
@@ -121,45 +164,16 @@
 }" curl_cv_send)
 if(curl_cv_send)
   if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
+    if(APPLE)
+      curl_cv_func_send_run_test("ssize_t" "int" "const void *" "size_t" "int")
+    endif()
     foreach(send_retv "int" "ssize_t" )
       foreach(send_arg1 "SOCKET" "int" "ssize_t" )
         foreach(send_arg2 "const char *" "const void *" "void *" "char *")
           foreach(send_arg3 "int" "size_t" "socklen_t" "unsigned int")
             foreach(send_arg4 "int" "unsigned int")
               if(NOT curl_cv_func_send_done)
-                unset(curl_cv_func_send_test CACHE)
-                check_c_source_compiles("
-                  ${_source_epilogue}
-                  #ifdef WINSOCK_API_LINKAGE
-                  WINSOCK_API_LINKAGE
-                  #endif
-                  extern ${send_retv} ${signature_call_conv}
-                  send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4});
-                  int main(void) {
-                    ${send_arg1} s=0;
-                    ${send_arg2} buf=0;
-                    ${send_arg3} len=0;
-                    ${send_arg4} flags=0;
-                    ${send_retv} res = send(s, buf, len, flags);
-                    (void) res;
-                    return 0;
-                  }"
-                  curl_cv_func_send_test)
-                message(STATUS
-                  "Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
-                if(curl_cv_func_send_test)
-                  string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
-                  string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
-                  set(curl_cv_func_send_args
-                    "${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
-                  set(SEND_TYPE_ARG1 "${send_arg1}")
-                  set(SEND_TYPE_ARG2 "${send_arg2}")
-                  set(SEND_TYPE_ARG3 "${send_arg3}")
-                  set(SEND_TYPE_ARG4 "${send_arg4}")
-                  set(SEND_TYPE_RETV "${send_retv}")
-                  set(HAVE_SEND 1)
-                  set(curl_cv_func_send_done 1)
-                endif()
+                curl_cv_func_send_run_test("${send_retv}" "${send_arg1}" "${send_arg2}" "${send_arg3}" "${send_arg4}")
               endif()
             endforeach()
           endforeach()
diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake
index 9ae9b56..fb803f8 100644
--- a/CMake/Platforms/WindowsCache.cmake
+++ b/CMake/Platforms/WindowsCache.cmake
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -46,7 +46,6 @@
     set(HAVE_PROCESS_H 1)
     set(HAVE_PWD_H 0)
     set(HAVE_SETJMP_H 1)
-    set(HAVE_SGTTY_H 0)
     set(HAVE_SIGNAL_H 1)
     set(HAVE_SOCKIO_H 0)
     set(HAVE_STDINT_H 0)
@@ -84,14 +83,8 @@
     set(HAVE_STRCASECMP 0)
     set(HAVE_STRICMP 1)
     set(HAVE_STRCMPI 1)
-    set(HAVE_GETHOSTBYADDR 1)
     set(HAVE_GETTIMEOFDAY 0)
     set(HAVE_INET_ADDR 1)
-    set(HAVE_INET_NTOA 1)
-    set(HAVE_INET_NTOA_R 0)
-    set(HAVE_TCGETATTR 0)
-    set(HAVE_TCSETATTR 0)
-    set(HAVE_PERROR 1)
     set(HAVE_CLOSESOCKET 1)
     set(HAVE_SETVBUF 0)
     set(HAVE_SIGSETJMP 0)
@@ -105,17 +98,10 @@
     set(HAVE_RAND_STATUS 0)
     set(HAVE_GMTIME_R 0)
     set(HAVE_LOCALTIME_R 0)
-    set(HAVE_GETHOSTBYADDR_R 0)
     set(HAVE_GETHOSTBYNAME_R 0)
     set(HAVE_SIGNAL_FUNC 1)
     set(HAVE_SIGNAL_MACRO 0)
 
-    set(HAVE_GETHOSTBYADDR_R_5 0)
-    set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
-    set(HAVE_GETHOSTBYADDR_R_7 0)
-    set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
-    set(HAVE_GETHOSTBYADDR_R_8 0)
-    set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
     set(HAVE_GETHOSTBYNAME_R_3 0)
     set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
     set(HAVE_GETHOSTBYNAME_R_5 0)
@@ -126,15 +112,12 @@
     set(TIME_WITH_SYS_TIME 0)
     set(HAVE_O_NONBLOCK 0)
     set(HAVE_IN_ADDR_T 0)
-    set(HAVE_INET_NTOA_R_DECL 0)
-    set(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
     if(ENABLE_IPV6)
       set(HAVE_GETADDRINFO 1)
     else()
       set(HAVE_GETADDRINFO 0)
     endif()
     set(STDC_HEADERS 1)
-    set(RETSIGTYPE_TEST 1)
 
     set(HAVE_SIGACTION 0)
     set(HAVE_MACRO_SIGSETJMP 0)
diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake
index 59b17d0..8f9b861 100644
--- a/CMake/Utilities.cmake
+++ b/CMake/Utilities.cmake
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/cmake_uninstall.cmake.in b/CMake/cmake_uninstall.cmake.in
index 4a0de5e..e96c143 100644
--- a/CMake/cmake_uninstall.cmake.in
+++ b/CMake/cmake_uninstall.cmake.in
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in
index ae8cc30..957148e 100644
--- a/CMake/curl-config.cmake.in
+++ b/CMake/curl-config.cmake.in
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec1cfa7..c85295e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -63,7 +63,7 @@
 # SET(PACKAGE_NAME "curl")
 # SET(PACKAGE_VERSION "-")
 # SET(PACKAGE_STRING "curl-")
-# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/")
+# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.se/mail/")
 set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
 set(OS "\"${CMAKE_SYSTEM_NAME}\"")
 
@@ -191,6 +191,9 @@
 option(CURL_DISABLE_MQTT "to disable MQTT" OFF)
 mark_as_advanced(CURL_DISABLE_MQTT)
 
+option(CURL_ENABLE_EXPORT_TARGET "to enable cmake export target" ON)
+mark_as_advanced(CURL_ENABLE_EXPORT_TARGET)
+
 if(HTTP_ONLY)
   set(CURL_DISABLE_DICT ON)
   set(CURL_DISABLE_FILE ON)
@@ -208,11 +211,16 @@
   set(CURL_DISABLE_TFTP ON)
 endif()
 
+option(CURL_DISABLE_ALTSVC "to disable alt-svc support" OFF)
+mark_as_advanced(CURL_DISABLE_ALTSVC)
+option(CURL_DISABLE_HSTS "to disable HSTS support" OFF)
+mark_as_advanced(CURL_DISABLE_HSTS)
 option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
 mark_as_advanced(CURL_DISABLE_COOKIES)
-
 option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
 mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH)
+option(CURL_DISABLE_NTLM "to disable NTLM support" OFF)
+mark_as_advanced(CURL_DISABLE_NTLM)
 option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
 mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
 option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
@@ -309,7 +317,6 @@
 if(WIN32)
   check_library_exists_concat("ws2_32" getch        HAVE_LIBWS2_32)
   check_library_exists_concat("winmm"  getch        HAVE_LIBWINMM)
-  list(APPEND CURL_LIBS "advapi32")
 endif()
 
 # check SSL libraries
@@ -336,6 +343,7 @@
   set(openssl_default OFF)
 endif()
 option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default})
+option(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG "Disable automatic loading of OpenSSL configuration" OFF)
 
 count_true(enabled_ssl_options_count
   CMAKE_USE_SCHANNEL
@@ -354,7 +362,6 @@
   set(SSL_ENABLED ON)
   set(USE_SCHANNEL ON) # Windows native SSL/TLS support
   set(USE_WINDOWS_SSPI ON) # CMAKE_USE_SCHANNEL implies CURL_WINDOWS_SSPI
-  list(APPEND CURL_LIBS "crypt32")
 endif()
 if(CURL_WINDOWS_SSPI)
   set(USE_WINDOWS_SSPI ON)
@@ -365,20 +372,29 @@
   message(FATAL_ERROR "The cmake option CMAKE_USE_DARWINSSL was renamed to CMAKE_USE_SECTRANSP.")
 endif()
 
-if(CMAKE_USE_SECTRANSP)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation")
   if(NOT COREFOUNDATION_FRAMEWORK)
       message(FATAL_ERROR "CoreFoundation framework not found")
   endif()
 
-  find_library(SECURITY_FRAMEWORK "Security")
-  if(NOT SECURITY_FRAMEWORK)
-     message(FATAL_ERROR "Security framework not found")
+  find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration")
+  if(NOT SYSTEMCONFIGURATION_FRAMEWORK)
+     message(FATAL_ERROR "SystemConfiguration framework not found")
   endif()
 
-  set(SSL_ENABLED ON)
-  set(USE_SECTRANSP ON)
-  list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}")
+  list(APPEND CURL_LIBS "-framework CoreFoundation" "-framework SystemConfiguration")
+
+  if(CMAKE_USE_SECTRANSP)
+    find_library(SECURITY_FRAMEWORK "Security")
+    if(NOT SECURITY_FRAMEWORK)
+       message(FATAL_ERROR "Security framework not found")
+    endif()
+
+    set(SSL_ENABLED ON)
+    set(USE_SECTRANSP ON)
+    list(APPEND CURL_LIBS "-framework Security")
+  endif()
 endif()
 
 if(CMAKE_USE_OPENSSL)
@@ -503,10 +519,6 @@
   cmake_pop_check_state()
 endif()
 
-if(WIN32)
-  set(USE_WIN32_CRYPTO ON)
-endif()
-
 if(NOT CURL_DISABLE_LDAP)
   if(WIN32)
     option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
@@ -617,33 +629,42 @@
 endif()
 
 # Check for idn
-check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
+option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
+set(HAVE_LIBIDN2 OFF)
+if(USE_LIBIDN2)
+  check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
+endif()
+
+if(WIN32)
+  option(USE_WIN32_IDN "Use WinIDN for IDN support" OFF)
+  if(USE_WIN32_IDN)
+    list(APPEND CURL_LIBS "Normaliz")
+    set(WANT_IDN_PROTOTYPES ON)
+  endif()
+endif()
 
 # Check for symbol dlopen (same as HAVE_LIBDL)
 check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
 
-option(CURL_ZLIB "Set to ON to enable building curl with zlib support." ON)
 set(HAVE_LIBZ OFF)
 set(HAVE_ZLIB_H OFF)
 set(USE_ZLIB OFF)
-if(CURL_ZLIB)
-  find_package(ZLIB QUIET)
-  if(ZLIB_FOUND)
-    set(HAVE_ZLIB_H ON)
-    set(HAVE_LIBZ ON)
-    set(USE_ZLIB ON)
+optional_dependency(ZLIB)
+if(ZLIB_FOUND)
+  set(HAVE_ZLIB_H ON)
+  set(HAVE_LIBZ ON)
+  set(USE_ZLIB ON)
 
-    # Depend on ZLIB via imported targets if supported by the running
-    # version of CMake.  This allows our dependents to get our dependencies
-    # transitively.
-    if(NOT CMAKE_VERSION VERSION_LESS 3.4)
-      list(APPEND CURL_LIBS ZLIB::ZLIB)
-    else()
-      list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
-      include_directories(${ZLIB_INCLUDE_DIRS})
-    endif()
-    list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
+  # Depend on ZLIB via imported targets if supported by the running
+  # version of CMake.  This allows our dependents to get our dependencies
+  # transitively.
+  if(NOT CMAKE_VERSION VERSION_LESS 3.4)
+    list(APPEND CURL_LIBS ZLIB::ZLIB)
+  else()
+    list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
+    include_directories(${ZLIB_INCLUDE_DIRS})
   endif()
+  list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
 endif()
 
 option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF)
@@ -695,15 +716,6 @@
     set(HAVE_LIBSSH2_H ON)
     set(CURL_INCLUDES ${CURL_INCLUDES} "${LIBSSH2_INCLUDE_DIR}/libssh2.h")
     set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DHAVE_LIBSSH2_H")
-
-    # now check for specific libssh2 symbols as they were added in different versions
-    set(CMAKE_EXTRA_INCLUDE_FILES "libssh2.h")
-    check_function_exists(libssh2_version           HAVE_LIBSSH2_VERSION)
-    check_function_exists(libssh2_init              HAVE_LIBSSH2_INIT)
-    check_function_exists(libssh2_exit              HAVE_LIBSSH2_EXIT)
-    check_function_exists(libssh2_scp_send64        HAVE_LIBSSH2_SCP_SEND64)
-    check_function_exists(libssh2_session_handshake HAVE_LIBSSH2_SESSION_HANDSHAKE)
-    set(CMAKE_EXTRA_INCLUDE_FILES "")
     unset(CMAKE_REQUIRED_LIBRARIES)
   endif()
 endif()
@@ -775,6 +787,7 @@
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
+    set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
     list(APPEND CURL_LIBS ${GSS_LIBRARIES})
 
   else()
@@ -785,13 +798,15 @@
 option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON)
 if(ENABLE_UNIX_SOCKETS)
   include(CheckStructHasMember)
-  check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS)
+  if(WIN32)
+    set(USE_UNIX_SOCKETS ON)
+  else()
+    check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS)
+  endif()
 else()
   unset(USE_UNIX_SOCKETS CACHE)
 endif()
 
-option(ENABLE_ALT_SVC "Enable alt-svc support" OFF)
-set(USE_ALTSVC ${ENABLE_ALT_SVC})
 
 #
 # CA handling
@@ -845,7 +860,8 @@
     foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS})
       if(EXISTS "${SEARCH_CA_BUNDLE_PATH}")
         message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}")
-        set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}")
+        set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}" CACHE STRING
+            "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
         set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been set")
         break()
       endif()
@@ -854,7 +870,8 @@
 
   if(CURL_CA_PATH_AUTODETECT AND (NOT CURL_CA_PATH_SET))
     if(EXISTS "/etc/ssl/certs")
-      set(CURL_CA_PATH "/etc/ssl/certs")
+      set(CURL_CA_PATH "/etc/ssl/certs" CACHE STRING
+          "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
       set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been set")
     endif()
   endif()
@@ -872,9 +889,7 @@
   check_include_file_concat("winsock.h"      HAVE_WINSOCK_H)
   check_include_file_concat("ws2tcpip.h"     HAVE_WS2TCPIP_H)
   check_include_file_concat("winsock2.h"     HAVE_WINSOCK2_H)
-  if(NOT CURL_WINDOWS_SSPI AND USE_OPENSSL)
-    set(CURL_LIBS ${CURL_LIBS} "crypt32")
-  endif()
+  check_include_file_concat("wincrypt.h"     HAVE_WINCRYPT_H)
 endif()
 
 check_include_file_concat("stdio.h"          HAVE_STDIO_H)
@@ -898,8 +913,6 @@
 check_include_file_concat("arpa/inet.h"      HAVE_ARPA_INET_H)
 check_include_file_concat("arpa/tftp.h"      HAVE_ARPA_TFTP_H)
 check_include_file_concat("assert.h"         HAVE_ASSERT_H)
-check_include_file_concat("crypto.h"         HAVE_CRYPTO_H)
-check_include_file_concat("err.h"            HAVE_ERR_H)
 check_include_file_concat("errno.h"          HAVE_ERRNO_H)
 check_include_file_concat("fcntl.h"          HAVE_FCNTL_H)
 check_include_file_concat("idn2.h"           HAVE_IDN2_H)
@@ -912,13 +925,12 @@
 check_include_file_concat("netdb.h"          HAVE_NETDB_H)
 check_include_file_concat("netinet/in.h"     HAVE_NETINET_IN_H)
 check_include_file_concat("netinet/tcp.h"    HAVE_NETINET_TCP_H)
+check_include_file("linux/tcp.h"      HAVE_LINUX_TCP_H)
 
 check_include_file_concat("pem.h"            HAVE_PEM_H)
 check_include_file_concat("poll.h"           HAVE_POLL_H)
 check_include_file_concat("pwd.h"            HAVE_PWD_H)
-check_include_file_concat("rsa.h"            HAVE_RSA_H)
 check_include_file_concat("setjmp.h"         HAVE_SETJMP_H)
-check_include_file_concat("sgtty.h"          HAVE_SGTTY_H)
 check_include_file_concat("signal.h"         HAVE_SIGNAL_H)
 check_include_file_concat("ssl.h"            HAVE_SSL_H)
 check_include_file_concat("stdbool.h"        HAVE_STDBOOL_H)
@@ -996,20 +1008,14 @@
 if(NOT HAVE_STRNCMPI)
   set(HAVE_STRCMPI)
 endif()
-check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
-check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
+check_symbol_exists(getppid       "${CURL_INCLUDES}" HAVE_GETPPID)
+check_symbol_exists(utimes        "${CURL_INCLUDES}" HAVE_UTIMES)
+
 check_symbol_exists(gettimeofday  "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
 check_symbol_exists(inet_addr     "${CURL_INCLUDES}" HAVE_INET_ADDR)
-check_symbol_exists(inet_ntoa     "${CURL_INCLUDES}" HAVE_INET_NTOA)
-check_symbol_exists(inet_ntoa_r   "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
-check_symbol_exists(tcsetattr     "${CURL_INCLUDES}" HAVE_TCSETATTR)
-check_symbol_exists(tcgetattr     "${CURL_INCLUDES}" HAVE_TCGETATTR)
-check_symbol_exists(perror        "${CURL_INCLUDES}" HAVE_PERROR)
 check_symbol_exists(closesocket   "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
-check_symbol_exists(setvbuf       "${CURL_INCLUDES}" HAVE_SETVBUF)
 check_symbol_exists(sigsetjmp     "${CURL_INCLUDES}" HAVE_SIGSETJMP)
 check_symbol_exists(getpass_r     "${CURL_INCLUDES}" HAVE_GETPASS_R)
-check_symbol_exists(strlcat       "${CURL_INCLUDES}" HAVE_STRLCAT)
 check_symbol_exists(getpwuid      "${CURL_INCLUDES}" HAVE_GETPWUID)
 check_symbol_exists(getpwuid_r    "${CURL_INCLUDES}" HAVE_GETPWUID_R)
 check_symbol_exists(geteuid       "${CURL_INCLUDES}" HAVE_GETEUID)
@@ -1031,11 +1037,8 @@
 check_symbol_exists(_strtoi64      "${CURL_INCLUDES}" HAVE__STRTOI64)
 check_symbol_exists(strerror_r     "${CURL_INCLUDES}" HAVE_STRERROR_R)
 check_symbol_exists(siginterrupt   "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
-check_symbol_exists(perror         "${CURL_INCLUDES}" HAVE_PERROR)
-check_symbol_exists(fork           "${CURL_INCLUDES}" HAVE_FORK)
 check_symbol_exists(getaddrinfo    "${CURL_INCLUDES}" HAVE_GETADDRINFO)
 check_symbol_exists(freeaddrinfo   "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
-check_symbol_exists(freeifaddrs    "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
 check_symbol_exists(pipe           "${CURL_INCLUDES}" HAVE_PIPE)
 check_symbol_exists(ftruncate      "${CURL_INCLUDES}" HAVE_FTRUNCATE)
 check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
@@ -1059,6 +1062,16 @@
   endforeach()
 endif()
 
+set(CMAKE_EXTRA_INCLUDE_FILES   "sys/socket.h")
+check_type_size("sa_family_t"   SIZEOF_SA_FAMILY_T)
+set(HAVE_SA_FAMILY_T            ${HAVE_SIZEOF_SA_FAMILY_T})
+set(CMAKE_EXTRA_INCLUDE_FILES   "")
+
+set(CMAKE_EXTRA_INCLUDE_FILES   "ws2def.h")
+check_type_size("ADDRESS_FAMILY"    SIZEOF_ADDRESS_FAMILY)
+set(HAVE_ADDRESS_FAMILY         ${HAVE_SIZEOF_ADDRESS_FAMILY})
+set(CMAKE_EXTRA_INCLUDE_FILES   "")
+
 # sigaction and sigsetjmp are special. Use special mechanism for
 # detecting those, but only if previous attempt failed.
 if(HAVE_SIGNAL_H)
@@ -1092,12 +1105,6 @@
     HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
     TIME_WITH_SYS_TIME
     HAVE_O_NONBLOCK
-    HAVE_GETHOSTBYADDR_R_5
-    HAVE_GETHOSTBYADDR_R_7
-    HAVE_GETHOSTBYADDR_R_8
-    HAVE_GETHOSTBYADDR_R_5_REENTRANT
-    HAVE_GETHOSTBYADDR_R_7_REENTRANT
-    HAVE_GETHOSTBYADDR_R_8_REENTRANT
     HAVE_GETHOSTBYNAME_R_3
     HAVE_GETHOSTBYNAME_R_5
     HAVE_GETHOSTBYNAME_R_6
@@ -1107,9 +1114,6 @@
     HAVE_IN_ADDR_T
     HAVE_BOOL_T
     STDC_HEADERS
-    RETSIGTYPE_TEST
-    HAVE_INET_NTOA_R_DECL
-    HAVE_INET_NTOA_R_DECL_REENTRANT
     HAVE_GETADDRINFO
     HAVE_FILE_OFFSET_BITS
     HAVE_VARIADIC_MACROS_C99
@@ -1141,13 +1145,9 @@
 
 # Check for reentrant
 foreach(CURL_TEST
-    HAVE_GETHOSTBYADDR_R_5
-    HAVE_GETHOSTBYADDR_R_7
-    HAVE_GETHOSTBYADDR_R_8
     HAVE_GETHOSTBYNAME_R_3
     HAVE_GETHOSTBYNAME_R_5
-    HAVE_GETHOSTBYNAME_R_6
-    HAVE_INET_NTOA_R_DECL_REENTRANT)
+    HAVE_GETHOSTBYNAME_R_6)
   if(NOT ${CURL_TEST})
     if(${CURL_TEST}_REENTRANT)
       set(NEED_REENTRANT 1)
@@ -1157,9 +1157,6 @@
 
 if(NEED_REENTRANT)
   foreach(CURL_TEST
-      HAVE_GETHOSTBYADDR_R_5
-      HAVE_GETHOSTBYADDR_R_7
-      HAVE_GETHOSTBYADDR_R_8
       HAVE_GETHOSTBYNAME_R_3
       HAVE_GETHOSTBYNAME_R_5
       HAVE_GETHOSTBYNAME_R_6)
@@ -1170,11 +1167,6 @@
   endforeach()
 endif()
 
-if(HAVE_INET_NTOA_R_DECL_REENTRANT)
-  set(HAVE_INET_NTOA_R_DECL 1)
-  set(NEED_REENTRANT 1)
-endif()
-
 # Check clock_gettime(CLOCK_MONOTONIC, x) support
 curl_internal_test(HAVE_CLOCK_GETTIME_MONOTONIC)
 
@@ -1208,12 +1200,6 @@
   set(HAVE_DISABLED_NONBLOCKING)
 endif()
 
-if(RETSIGTYPE_TEST)
-  set(RETSIGTYPE void)
-else()
-  set(RETSIGTYPE int)
-endif()
-
 if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
   include(CheckCCompilerFlag)
   check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
@@ -1251,6 +1237,19 @@
 
   # Use the manifest embedded in the Windows Resource
   set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DCURL_EMBED_MANIFEST")
+
+  # Check if crypto functions in wincrypt.h are actually available
+  if(HAVE_WINCRYPT_H)
+    check_symbol_exists(CryptAcquireContext "${CURL_INCLUDES}" USE_WINCRYPT)
+  endif()
+  if(USE_WINCRYPT)
+    set(USE_WIN32_CRYPTO ON)
+  endif()
+
+  # Link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
+  if(USE_WIN32_CRYPTO OR USE_SCHANNEL)
+    list(APPEND CURL_LIBS "advapi32" "crypt32")
+  endif()
 endif()
 
 if(MSVC)
@@ -1263,6 +1262,11 @@
   else()
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
   endif()
+
+  # Use multithreaded compilation on VS 2008+
+  if(MSVC_VERSION GREATER_EQUAL 1500)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
+  endif()
 endif()
 
 if(CURL_WERROR)
@@ -1325,21 +1329,13 @@
   add_subdirectory(src)
 endif()
 
-option(BUILD_TESTING "Build tests" "${PERL_FOUND}")
-if(NOT PERL_FOUND)
-  message(STATUS "Perl not found, testing disabled.")
-elseif(BUILD_TESTING)
+cmake_dependent_option(BUILD_TESTING "Build tests"
+  ON "PERL_FOUND;NOT CURL_DISABLE_TESTS"
+  OFF)
+if(BUILD_TESTING)
   add_subdirectory(tests)
 endif()
 
-# NTLM support requires crypto function adaptions from various SSL libs
-# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS
-if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_DARWINSSL OR USE_MBEDTLS OR USE_WIN32_CRYPTO))
-  set(use_ntlm ON)
-else()
-  set(use_ntlm OFF)
-endif()
-
 # Helper to populate a list (_items) with a label when conditions (the remaining
 # args) are satisfied
 macro(_add_if label)
@@ -1349,22 +1345,30 @@
   endif()
 endmacro()
 
+# NTLM support requires crypto function adaptions from various SSL libs
+# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS
+if(NOT (CURL_DISABLE_CRYPTO_AUTH OR CURL_DISABLE_NTLM) AND
+    (USE_OPENSSL OR USE_MBEDTLS OR USE_DARWINSSL OR USE_WIN32_CRYPTO))
+  set(use_curl_ntlm_core ON)
+endif()
+
 # Clear list and try to detect available features
 set(_items)
 _add_if("SSL"           SSL_ENABLED)
 _add_if("IPv6"          ENABLE_IPV6)
-_add_if("unix-sockets"  USE_UNIX_SOCKETS)
+_add_if("unixsockets"   USE_UNIX_SOCKETS)
 _add_if("libz"          HAVE_LIBZ)
 _add_if("brotli"        HAVE_BROTLI)
 _add_if("zstd"          HAVE_ZSTD)
 _add_if("AsynchDNS"     USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32)
-_add_if("IDN"           HAVE_LIBIDN2)
-_add_if("Largefile"     (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND
+_add_if("IDN"           HAVE_LIBIDN2 OR USE_WIN32_IDN)
+_add_if("Largefile"     (SIZEOF_CURL_OFF_T GREATER 4) AND
                         ((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES))
 # TODO SSP1 (Schannel) check is missing
 _add_if("SSPI"          USE_WINDOWS_SSPI)
 _add_if("GSS-API"       HAVE_GSSAPI)
-_add_if("alt-svc"       ENABLE_ALT_SVC)
+_add_if("alt-svc"       NOT CURL_DISABLE_ALTSVC)
+_add_if("HSTS"          NOT CURL_DISABLE_HSTS)
 # TODO SSP1 missing for SPNEGO
 _add_if("SPNEGO"        NOT CURL_DISABLE_CRYPTO_AUTH AND
                         (HAVE_GSSAPI OR USE_WINDOWS_SSPI))
@@ -1372,9 +1376,12 @@
                         (HAVE_GSSAPI OR USE_WINDOWS_SSPI))
 # NTLM support requires crypto function adaptions from various SSL libs
 # TODO alternative SSL libs tests for SSP1, GNUTLS, NSS
-_add_if("NTLM"        use_ntlm OR USE_WINDOWS_SSPI)
+_add_if("NTLM"          NOT (CURL_DISABLE_CRYPTO_AUTH OR CURL_DISABLE_NTLM) AND
+                        (use_curl_ntlm_core OR USE_WINDOWS_SSPI))
 # TODO missing option (autoconf: --enable-ntlm-wb)
-_add_if("NTLM_WB"     use_ntlm AND NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED)
+_add_if("NTLM_WB"       NOT (CURL_DISABLE_CRYPTO_AUTH OR CURL_DISABLE_NTLM) AND
+                        (use_curl_ntlm_core OR USE_WINDOWS_SSPI) AND
+                        NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED)
 # TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP
 _add_if("TLS-SRP"       USE_TLS_SRP)
 # TODO option --with-nghttp2 tests for nghttp2 lib and nghttp2/nghttp2.h header
@@ -1382,6 +1389,7 @@
 _add_if("HTTP3"         USE_NGTCP2 OR USE_QUICHE)
 _add_if("MultiSSL"      CURL_WITH_MULTI_SSL)
 _add_if("HTTPS-proxy"   SSL_ENABLED AND (USE_OPENSSL OR USE_GNUTLS OR USE_NSS))
+_add_if("unicode"       ENABLE_UNICODE)
 string(REPLACE ";" " " SUPPORT_FEATURES "${_items}")
 message(STATUS "Enabled features: ${SUPPORT_FEATURES}")
 
@@ -1402,12 +1410,15 @@
 _add_if("DICT"          NOT CURL_DISABLE_DICT)
 _add_if("TFTP"          NOT CURL_DISABLE_TFTP)
 _add_if("GOPHER"        NOT CURL_DISABLE_GOPHER)
+_add_if("GOPHERS"       NOT CURL_DISABLE_GOPHER AND SSL_ENABLED)
 _add_if("POP3"          NOT CURL_DISABLE_POP3)
 _add_if("POP3S"         NOT CURL_DISABLE_POP3 AND SSL_ENABLED)
 _add_if("IMAP"          NOT CURL_DISABLE_IMAP)
 _add_if("IMAPS"         NOT CURL_DISABLE_IMAP AND SSL_ENABLED)
-_add_if("SMB"           NOT CURL_DISABLE_SMB AND use_ntlm)
-_add_if("SMBS"          NOT CURL_DISABLE_SMB AND SSL_ENABLED AND use_ntlm)
+_add_if("SMB"           NOT CURL_DISABLE_SMB AND
+                        use_curl_ntlm_core AND (SIZEOF_CURL_OFF_T GREATER 4))
+_add_if("SMBS"          NOT CURL_DISABLE_SMB AND SSL_ENABLED AND
+                        use_curl_ntlm_core AND (SIZEOF_CURL_OFF_T GREATER 4))
 _add_if("SMTP"          NOT CURL_DISABLE_SMTP)
 _add_if("SMTPS"         NOT CURL_DISABLE_SMTP AND SSL_ENABLED)
 _add_if("SCP"           USE_LIBSSH2 OR USE_LIBSSH)
@@ -1423,7 +1434,7 @@
 
 # Clear list and collect SSL backends
 set(_items)
-_add_if("Schannel"         SSL_ENABLED AND USE_WINDOWS_SSPI)
+_add_if("Schannel"         SSL_ENABLED AND USE_SCHANNEL)
 _add_if("OpenSSL"          SSL_ENABLED AND USE_OPENSSL)
 _add_if("Secure Transport" SSL_ENABLED AND USE_SECTRANSP)
 _add_if("mbedTLS"          SSL_ENABLED AND USE_MBEDTLS)
@@ -1528,11 +1539,13 @@
         INSTALL_DESTINATION ${CURL_INSTALL_CMAKE_DIR}
 )
 
-install(
-        EXPORT "${TARGETS_EXPORT_NAME}"
-        NAMESPACE "${PROJECT_NAME}::"
-        DESTINATION ${CURL_INSTALL_CMAKE_DIR}
-)
+if(CURL_ENABLE_EXPORT_TARGET)
+  install(
+          EXPORT "${TARGETS_EXPORT_NAME}"
+          NAMESPACE "${PROJECT_NAME}::"
+          DESTINATION ${CURL_INSTALL_CMAKE_DIR}
+  )
+endif()
 
 install(
         FILES ${version_config} ${project_config}
diff --git a/COPYING b/COPYING
index 9d9e4af..48f1447 100644
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 COPYRIGHT AND PERMISSION NOTICE
 
-Copyright (c) 1996 - 2020, Daniel Stenberg, <daniel@haxx.se>, and many
+Copyright (c) 1996 - 2021, Daniel Stenberg, <daniel@haxx.se>, and many
 contributors, see the THANKS file.
 
 All rights reserved.
diff --git a/METADATA b/METADATA
index a1da2fe..0ef3121 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://github.com/curl/curl/releases/download/curl-7_73_0/curl-7.73.0.tar.xz"
+    value: "https://github.com/curl/curl/releases/download/curl-7_78_0/curl-7.78.0.tar.xz"
   }
-  version: "curl-7_73_0"
+  version: "curl-7_78_0"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2020
-    month: 10
-    day: 28
+    year: 2021
+    month: 8
+    day: 10
   }
 }
diff --git a/MacOSX-Framework b/MacOSX-Framework
index 73d9ed8..fdf51d6 100755
--- a/MacOSX-Framework
+++ b/MacOSX-Framework
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/Makefile.am b/Makefile.am
index 1a6d7f9..16adc98 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -329,6 +329,7 @@
 	(cd tests && $(MAKE) checksrc)
 	(cd include/curl && $(MAKE) checksrc)
 	(cd docs/examples && $(MAKE) checksrc)
+	(cd packages && $(MAKE) checksrc)
 
 .PHONY: vc-ide
 
diff --git a/README b/README
index f337f35..b690816 100644
--- a/README
+++ b/README
@@ -24,7 +24,7 @@
 CONTACT
 
   If you have problems, questions, ideas or suggestions, please contact us
-  by posting to a suitable mailing list. See https://curl.haxx.se/mail/
+  by posting to a suitable mailing list. See https://curl.se/mail/
 
   All contributors to the project are listed in the THANKS document.
 
@@ -32,7 +32,7 @@
 
   Visit the curl website for the latest news and downloads:
 
-        https://curl.haxx.se/
+        https://curl.se/
 
 GIT
 
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 7ec031d..1dc8181 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,321 +1,399 @@
-curl and libcurl 7.73.0
+curl and libcurl 7.78.0
 
- Public curl releases:         195
- Command line options:         234
- curl_easy_setopt() options:   278
+ Public curl releases:         201
+ Command line options:         242
+ curl_easy_setopt() options:   290
  Public functions in libcurl:  85
- Contributors:                 2270
+ Contributors:                 2459
 
 This release includes the following changes:
 
- o curl: add --output-dir [25]
- o curl: support XDG_CONFIG_HOME to find .curlrc [3]
- o curl: update --help with categories [77]
- o curl_easy_option_*: new API for meta-data about easy options [40]
- o CURLE_PROXY: new error code [7]
- o mqtt: enable by default [28]
- o sftp: add new quote commands 'atime' and 'mtime' [6]
- o ssh: add the option CURLKHSTAT_FINE_REPLACE [27]
- o tls: add CURLOPT_SSL_EC_CURVES and --curves [29]
+ o curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE [118]
+ o CURLE_SETOPT_OPTION_SYNTAX: new error name for wrong setopt syntax [40]
+ o hostip: make 'localhost' return fixed values [16]
+ o mbedtls: add support for cert and key blob options [11]
+ o metalink: remove all support for it [54]
+ o mqtt: add support for username and password [91]
 
 This release includes the following bugfixes:
 
- o altsvc: clone setting in curl_easy_duphandle [60]
- o base64: also build for smtp, pop3 and imap [81]
- o BUGS: convert document to markdown [107]
- o build-wolfssl: fix build with Visual Studio 2019 [114]
- o buildconf: invoke 'autoreconf -fi' instead [37]
- o checksrc: detect // comments on column 0 [132]
- o checksrc: verify do-while and spaces between the braces [2]
- o checksrc: warn on space after exclamation mark [129]
- o CI/azure: disable test 571 in the msys2 builds [93]
- o CI/azure: MQTT is now enabled by default [64]
- o CI/azure: no longer ignore results of test 1013 [43]
- o CI/tests: fix invocation of tests for CMake builds [117]
- o CI/travis: add a CI job with openssl3 (from git master) [51]
- o cleanups: avoid curl_ on local variables [53]
- o CMake: add option to enable Unicode on Windows [48]
- o cmake: make HTTP_ONLY also disable MQTT [58]
- o CMake: remove explicit `CMAKE_ANSI_CFLAGS` [45]
- o cmake: remove scary warning [96]
- o cmdline-opts/gen.pl: generate nicer "See Also" in curl.1 [66]
- o configure: don't say HTTPS-proxy is enabled when disabled [120]
- o configure: fix pkg-config detecting wolfssl [26]
- o configure: let --enable-debug set -Wenum-conversion with gcc >= 10 [56]
- o conn: check for connection being dead before reuse [39]
- o connect.c: remove superfluous 'else' in Curl_getconnectinfo [42]
- o curl.1: add see also no-progress-meter on two spots [67]
- o curl.1: fix typo invokved -> invoked [36]
- o curl: in retry output don't call all problems "transient" [74]
- o curl: make --libcurl show binary posts correctly [130]
- o curl: make checkpasswd use dynbuf [100]
- o curl: make file2memory use dynbuf [102]
- o curl: make file2string use dynbuf [103]
- o curl: make glob_match_url use dynbuf [101]
- o curl: make sure setopt CURLOPT_IPRESOLVE passes on a long [134]
- o curl: retry delays in parallel mode no longer sleeps blocking [70]
- o curl: use curlx_dynbuf for realloc when loading config files [73]
- o curl:parallel_transfers: make sure retry readds the transfer [71]
- o curl_get_line: build only if cookies or alt-svc are enabled [13]
- o curl_mime_headers.3: fix the example's use of curl_slist_append [83]
- o Curl_pgrsTime - return new time to avoid timeout integer overflow [32]
- o Curl_send: return error when pre_receive_plain can't malloc [111]
- o dist: add missing CMake Find modules to the distribution [14]
- o docs/LICENSE-MIXING: remove [79]
- o docs/opts: fix typos in two manual pages [119]
- o docs/RESOURCES: remove [105]
- o docs/TheArtOfHttpScripting: convert to markdown [106]
- o docs: add description about CI platforms to CONTRIBUTE.md [44]
- o docs: correct non-existing macros in man pages [35]
- o doh: add error message for DOH_DNS_NAME_TOO_LONG [17]
- o dynbuf: make sure Curl_dyn_tail() zero terminates [78]
- o easy_reset: clear retry counter [82]
- o easygetopt: pass a valid enum to avoid compiler warning [75]
- o etag: save and use the full received contents [4]
- o ftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUND [99]
- o ftp: avoid risk of reading uninitialized integers [76]
- o ftp: get rid of the PPSENDF macro [85]
- o ftp: make a 552 response return CURLE_REMOTE_DISK_FULL [87]
- o ftp: separate FTPS from FTP over "HTTPS proxy" [112]
- o git: ignore libtests in 3XXX area [16]
- o github: use new issue template feature [88]
- o HISTORY: mention alt-svc added in 2019
- o HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29 [41]
- o http: consolidate nghttp2_session_mem_recv() call paths [80]
- o http_proxy: do not count proxy headers in the header bytecount [90]
- o http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set [50]
- o imap: make imap_send use dynbuf for the send buffer management [110]
- o imap: set cselect_bits to CURL_CSELECT_IN initially [104]
- o ldap: reduce the amount of #ifdefs needed [124]
- o lib/Makefile.am: bump VERSIONINFO due to new functions [65]
- o lib1560: verify "redirect" to double-slash leading URL [20]
- o lib583: fix enum mixup
- o lib: fix -Wassign-enum warnings [84]
- o lib: make Curl_gethostname accept a const pointer [38]
- o libssh2: handle the SSH protocols done over HTTPS proxy [125]
- o libssh2: pass on the error from ssh_force_knownhost_key_type [47]
- o Makefile.m32: add ability to override zstd libs [ci skip] [10]
- o man pages: switch to https://example.com URLs [86]
- o MANUAL: update examples to resolve without redirects [122]
- o mbedtls: add missing header when defining MBEDTLS_DEBUG [133]
- o memdebug: remove 9 year old unused debug function [126]
- o multi: expand pre-check for socket readiness [21]
- o multi: handle connection state winsock events [31]
- o multi: implement wait using winsock events [22]
- o ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX define [108]
- o ngtcp2: adapt to the new pkt_info arguments [18]
- o ntlm: fix condition for curl_ntlm_core usage [46]
- o openssl: avoid error conditions when importing native CA [52]
- o openssl: consider ALERT_CERTIFICATE_EXPIRED a failed verification [57]
- o openssl: Fix wincrypt symbols conflict with BoringSSL [9]
- o parsedate: tune the date to epoch conversion [95]
- o pause: only trigger a reread if the unpause sticks [92]
- o pingpong: use a dynbuf for the *_pp_sendf() function [113]
- o READMEs: convert several to markdown [115]
- o runtests: add %repeat[]% for test files [116]
- o runtests: allow creating files without newlines [72]
- o runtests: allow generating a binary sequence from hex
- o runtests: clear pid variables when failing to start a server [12]
- o runtests: make cleardir() erase dot files too [8]
- o runtests: provide curl's version string as %VERSION for tests [127]
- o schannel: fix memory leak when using get_cert_location [15]
- o schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root [128]
- o scripts: improve the "get latest curl release tag" logic
- o sectransp: make it build with --disable-proxy [123]
- o select.h: make socket validation macros test for INVALID_SOCKET [24]
- o select: align poll emulation to return all relevant events [63]
- o select: fix poll-based check not detecting connect failure
- o select: reduce duplication of Curl_poll in Curl_socket_check [23]
- o select: simplify return code handling for poll and select [49]
- o setopt: if the buffer exists, refuse the new BUFFERSIZE [5]
- o setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument [91]
- o socketpair: allow CURL_DISABLE_SOCKETPAIR [11]
- o sockfilt: handle FD_CLOSE winsock event on write socket [30]
- o src: spell whitespace without whitespace [121]
- o SSLCERTS: fix English syntax [34]
- o strerror: honor Unicode API choice on Windows [109]
- o symbian: drop support [118]
- o telnet.c: depend on static requirement of WinSock version 2 [61]
- o test1541: remove since it is a known bug [68]
- o test163[12]: require http to be built-in to run [94]
- o test434: test -K use in a single line without newline [59]
- o test971: show test mismatches "inline"
- o tests/data: Fix some mismatched XML tags in test cases
- o tests/FILEFORMAT: document nonewline support for <file>
- o tests/FILEFORMAT: document type=shell for <command>
- o tests/server/util.c: fix support for Windows Unicode builds [131]
- o tests: remove pipelining tests [69]
- o tls: fix SRP detection by using the proper #ifdefs [33]
- o tls: provide the CApath verbose log on its own line [1]
- o tool_setopt: escape binary data to hex, not octal
- o tool_writeout: add new writeout variable, %{num_headers} [97]
- o travis: add a build using libressl (from git master) [55]
- o url: use blank credentials when using proxy w/o username and password [54]
- o urlapi: use more Curl_safefree [89]
- o vtls: deduplicate client certificates in ssl_config_data [98]
- o win32: drop support for WinSock version 1, require version 2 [62]
- o winbuild: convert the instruction text to README.md [19]
+ o --socks4[a]: clarify where the host name is resolved [107]
+ o ares: always store IPv6 addresses first [20]
+ o asyn-ares: remove check for 'data' in Curl_resolver_cancel [89]
+ o bearssl: explicitly initialize all fields of Curl_ssl [1]
+ o bearssl: remove incorrect const on variable that is modified [1]
+ o build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS [155]
+ o c-hyper: abort CONNECT response reading early on non 2xx responses [75]
+ o c-hyper: add support for transfer-encoding in the request [121]
+ o c-hyper: bail on too long response headers [115]
+ o c-hyper: clear NTLM auth buffer when request is issued [23]
+ o c-hyper: convert HYPERE_INVALID_PEER_MESSAGE to CURLE_UNSUPPORTED_PROTOCOL [21]
+ o c-hyper: fix NTLM on closed connection tested with test159 [4]
+ o c-hyper: fix the uploaded field in progress callbacks [78]
+ o c-hyper: handle NULL from hyper_buf_copy() [19]
+ o c-hyper: support CURLINFO_STARTTRANSFER_TIME [29]
+ o c-hyper: support CURLOPT_HEADER [32]
+ o ccsidcurl: fix the compile errors [27]
+ o CI/cirrus: install impacket from PyPI instead of FreeBSD packages [166]
+ o CI: add bearssl build [1]
+ o CI: add Circle CI [92]
+ o CI: add jobs using Zuul [86]
+ o CI: delete --enable-hsts option (it is the default now) [2]
+ o CI: remove travis details [144]
+ o cleanup: spell DoH with a lowercase o [172]
+ o cmake: add CURL_DISABLE_NTLM option [44]
+ o cmake: avoid leaking absolute paths into exported config [3]
+ o cmake: fix IoctlSocket FIONBIO check [156]
+ o cmake: fix support for UnixSockets feature on Win32 [104]
+ o cmake: remove libssh2 feature checks [122]
+ o cmake: try well-known send/recv signature for Apple [12]
+ o configure.ac: make non-executable [109]
+ o configure/cmake: remove checks for many unused functions [95]
+ o configure: add --disable-ntlm option [45]
+ o configure: disable RTSP when hyper is selected [68]
+ o configure: do not strip out debug flags [110]
+ o configure: fix nghttp2 library name for static builds [157]
+ o configure: inhibit the implicit-fallthrough warning on gcc-12 [106]
+ o configure: rename get-easy-option configure option to get-easy-options [81]
+ o conn_shutdown: if closed during CONNECT cleanup properly [59]
+ o conncache: lowercase the hash key for better match [5]
+ o cookies: track expiration in jar to optimize removals [25]
+ o copyright: add boiler-plate headers to CI config files [143]
+ o crustls: bump crustls version and use new URL [119]
+ o curl.h: <sys/select.h> is supported by VxWorks7 [102]
+ o curl.h: include sys/select.h for NuttX RTOS [100]
+ o curl: ignore blank --output-dir [57]
+ o curl_endian: remove the unused Curl_write64_le function [85]
+ o curl_multibyte: Remove local encoding fallbacks [58]
+ o Curl_ntlm_core_mk_nt_hash: fix OOM in error path [8]
+ o Curl_ssl_getsessionid: fail if no session cache exists [14]
+ o CURLOPT_WRITEFUNCTION.3: minor update of the example [80]
+ o docs/BINDINGS: fix outdated links [116]
+ o docs/examples: use curl_multi_poll() in multi examples [152]
+ o docs/INSTALL: remove mentions of configure --with-darwin-ssl [55]
+ o docs: document missing arguments to commands [160]
+ o docs: fix inconsistencies in EGDSOCKET documentation [159]
+ o docs: fix incorrect argument name reference [161]
+ o docs: Fix typos [146]
+ o docs: make docs for --etag-save match the program behaviour [169]
+ o docs: use --max-redirs instead of --max-redir [28]
+ o doh: (void)-prefix call to curl_easy_setopt
+ o doh: fix wrong DEBUGASSERT for doh private_data [62]
+ o easy: during upkeep, attach Curl_easy to connections in the cache [171]
+ o examples/multi-single: fix scan-build warning [150]
+ o examples: length-limit two sscanf() uses of %s [96]
+ o examples: safer and more proper read callback logic [127]
+ o filecheck: quietly remove test-place/*~ [39]
+ o formdata: avoid "Argument cannot be negative" warning [131]
+ o formdata: correct typecast in curl_mime_data call [137]
+ o GHA: add a linux-hyper job [52]
+ o GHA: add several libcurl tests to the hyper job
+ o GHA: run the newly fixed tests with hyper [36]
+ o github: timeout jobs on macOS after 90 minutes [42]
+ o glob: pass an 'int' as len when using printf's %*s [139]
+ o gnutls: set the preferred TLS versions in correct order [94]
+ o GOVERNANCE: add 'user', 'committer' and 'contributor' [15]
+ o hostip: (macOS) free returned memory of SCDynamicStoreCopyProxies [105]
+ o hostip: bad CURLOPT_RESOLVE syntax now returns error [35]
+ o hsts: ignore numberical IP address hosts [17]
+ o HSTS: not experimental anymore
+ o http2: clarify 'Using HTTP2' verbose message [63]
+ o http2: init recvbuf struct for pushed streams [13]
+ o http2_connisdead: handle trailing GOAWAY better [18]
+ o http: fix crash in rate-limited upload [142]
+ o http: make the haproxy support work with unix domain sockets [99]
+ o http_proxy: deal with non-200 CONNECT response with Hyper [22]
+ o hyper: propagate errors back up from read callbacks [113]
+ o HYPER: remove mentions of deprecated development branch
+ o idn: fix libidn2 with windows unicode builds [117]
+ o infof: remove newline from format strings, always append it [149]
+ o lib: don't compare fd to FD_SETSIZE when using poll [61]
+ o lib: fix compiler warnings with CURL_DISABLE_NETRC [168]
+ o lib: fix type of len passed to *printf's %*s [133]
+ o lib: more %u for port and int for %*s fixes [132]
+ o lib: use %u instead of %ld for port number printf [134]
+ o libcurl-security.3: mention file descriptors and forks [108]
+ o libssh2: limit time a disconnect can take to 1 second [111]
+ o mbedtls: make mbedtls_strerror always work [6]
+ o mbedtls: Remove unnecessary include [175]
+ o mqtt: detect illegal and too large file size [43]
+ o mqtt: extend the error message for no topic [136]
+ o msnprintf: return number of printed characters excluding null byte [148]
+ o multi: add scan-build-6 work-around in curl_multi_fdset [88]
+ o multi: alter transfer timeout ordering [97]
+ o multi: do not switch off connect_only flag when closing [98]
+ o multi: fix crash in curl_multi_wait / curl_multi_poll [153]
+ o netrc: skip 'macdef' definitions [87]
+ o ngtcp2: disable TLSv1.3 compatible mode when using GnuTLS [83]
+ o openssl: avoid static variable for seed flag [101]
+ o openssl: don't remove session id entry in disassociate [56]
+ o pinnedpubkey.d: fix formatting for version support lists [126]
+ o proto.d: fix formatting for paragraphs after margin changes [125]
+ o quiche: use send() instead of sendto() to avoid macOS issue [103]
+ o Revert "c-hyper: handle body on HYPER_TASK_EMPTY" [26]
+ o Revert "ftp: Expression 'ftpc->wait_data_conn' is always false" [147]
+ o runtests: also find the last test in Makefile.inc [66]
+ o runtests: enable 'hyper mode' only for HTTP tests [34]
+ o runtests: init $VERSION to avoid warnings when using -l
+ o runtests: parse data/Makefile.inc instead of using make [38]
+ o runtests: skip disabled tests unless -f is used [82]
+ o rustls: remove native_roots fallback [65]
+ o schannel: set ALPN length correctly for HTTP/2 [24]
+ o SChannel: Use '_tcsncmp()' instead [164]
+ o sectransp: check for client certs by name first, then file [167]
+ o setopt: fix incorrect comments [10]
+ o socketpair: fix potential hangs [37]
+ o socks4: scan for the IPv4 address in resolve results [124]
+ o ssl: read pending close notify alert before closing the connection [9]
+ o sws: malloc request struct instead of using stack [60]
+ o telnet: fix option parser to not send uninitialized contents [170]
+ o test1116: hyper doesn't pass through "surprise-trailers" [123]
+ o test1147: hyper doesn't allow "crazy" request headers like built-in [114]
+ o test1151: added missing CRLF to work with hyper [120]
+ o test1216: adjusted for hyper mode [73]
+ o test1218: adjusted for hyper mode [72]
+ o test1230: adjust to work in hyper mode [74]
+ o test1340/1341: adjusted for hyper mode [71]
+ o test1438/1457: add HTTP keyword to make hyper mode work [70]
+ o test1514: add a CRLF to the response to make it correct [130]
+ o test1518: adjusted to work with hyper [129]
+ o test1519: adjusted to work with hyper [128]
+ o test1594/1595/1596: fix to work in hyper mode [69]
+ o test269: disable for hyper [33]
+ o test3010: work with hyper mode [67]
+ o test328: avoid a header-looking body to make hyper mode work [53]
+ o test339: CRLFify better to work in hyper mode [51]
+ o test347: CRLFify to work in hyper mode [50]
+ o test393: make Content-Length fit within 64 bit for hyper [49]
+ o test394: hyper returns a different error [48]
+ o test395: hyper cannot work around > 64 bit content-lengths like built-in [47]
+ o test433: adjust for hyper mode [46]
+ o test434: add HTTP keyword [76]
+ o test500: adjust to work with hyper mode
+ o test566: adjust to work with hyper mode [79]
+ o test599: adjusted to work in hyper mode [77]
+ o test644: remove as duplicate of test 587 [84]
+ o tests: fix Accept-Encoding strips to work with Hyper builds [41]
+ o TLS: prevent shutdown loops to get stuck [112]
+ o tool: make _lseeki64() macro work with the PellesC compiler [163]
+ o tool_help: document that --tlspassword takes a password [162]
+ o tool_help: remove unused define [154]
+ o url.c: remove two variable assigns that are never read [90]
+ o url: (void)-prefix a curl_url_get() call [138]
+ o url: bad CURLOPT_CONNECT_TO syntax now returns error [31]
+ o version: turn version number functions into returning void [135]
+ o vtls: exit addsessionid if no cache is inited [7]
+ o vtls: fix connection reuse checks for issuer cert and case sensitivity [165]
+ o vtls: only store TIMER_APPCONNECT for non-proxy connect [93]
+ o vtls: use free() not curl_free() [140]
+ o warnless: simplify type size handling [30]
+ o Win32: fix build with Watt-32
+ o winbuild/README: VC should be set to 6 'or larger' [64]
+ o winbuild: support alternate nghttp2 static lib name [174]
+ o wolfssl: failing to set a session id is not reason to error out [151]
+ o write-out.d: clarify urlnum is not unique for de-globbed URLs [145]
+ o zuul: use the new rustls directory name [141]
 
 This release includes the following known bugs:
 
- o see docs/KNOWN_BUGS (https://curl.haxx.se/docs/knownbugs.html)
+ o see docs/KNOWN_BUGS (https://curl.se/docs/knownbugs.html)
 
 This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
-  Alessandro Ghedini, Anders Bakken, Andrew Barnes, anio on github,
-  Antarpreet Singh, beckenc on github, Chris Paulson-Ellis,
-  Christian Weisgerber, COFFEETALES on github, Dan Fandrich, Daniel Gustafsson,
-  Daniel Stenberg, Dan Kenigsberg, Diven Qi, Don J Olmstead, Duncan Wilcox,
-  Eli Schwartz, Emil Engler, Eric Curtin, Frederik Wedel-Heinen,
-  fullincome on github, Gaurav Malhotra, Gergely Nagy, Gisle Vanem,
-  Harry Sintonen, htasta on github, iammrtau on github, ihsinme on github,
-  Ionuț-Francisc Oancea, Javier Blazquez, Javier Navarro, Jeroen Ooms,
-  jmdavitt on github, Kamil Dudka, Kunal Chandarana, Laramie Leavitt,
-  Marcel Raad, Marc Hörsken, Martin Bašti, Michael Baentsch, Michael Musset,
-  Michael Olbrich, Mingtao Yang, M.R.T on github, Peter Körner, Peter Wu,
-  Quentin Balland, Rasmus Melchior Jacobsen, Ray Satiro, rcombs on github,
-  Robin Douine, Samanta Navarro, Samuel Marks, Samuel Tranchet, Sergei Nikulov,
-  sofaboss on github, Stefan Strogin, Stephan Mühlstrasser,
-  Tatsuhiro Tsujikawa, Tomas Berger, Tom van der Woerdt, Viktor Szakats,
-  xwxbug on github,
-  (63 contributors)
-
-        Thanks! (and sorry if I forgot to mention someone)
+  Albin Vass, Aleksander Mazur, Alexis Vachette, Alex Xu, Andrea Pappacoda,
+  Andrei Rybak, Bachue Zhou, Bastian Krause, Bin Lan, Bin Meng,
+  Christian Weisgerber, Christoph M. Becker, civodul on github, Dan Fandrich,
+  Daniel Gustafsson, Daniel Stenberg, David Hu, dEajL3kA on github,
+  Dmitry Karpov, Dmitry Kostjuchenko, Douglas R. Reno, Ebe Janchivdorj,
+  Fawad Mirza, Francisco Munoz, Gabriel Simmer, Gealber Morales, Gergely Nagy,
+  Gerrit Renker, Gisle Vanem, Gregor Jasny, Gregory Muchka, Harry Sintonen,
+  Hugh Macdonald, Jacob Hoffman-Andrews, Jishan Shaikh, Joel Depooter,
+  Jonathan Wernberg, Jon Rumsey, Josh Soref, Josie Huddleston, Jun-ya Kato,
+  Kevin Burke, Laurent Dufresne, Li Xinwei, MAntoniak on github, Marcel Raad,
+  Marc Hörsken, Mark Swaanenburg, Martin Howarth, Max Zettlmeißl,
+  Michael Forney, Michael Kaufmann, Mohammed Naser, nian6324 on github,
+  Nikos Mavrogiannopoulos, Paul Groke, Peter Körner, Phil E. Taylor,
+  Pierre Yager, Randolf J, Ray Satiro, Red Hat Product Security,
+  Richard Marion, Richard Whitehouse, Sergey Markelov, Shikha Sharma,
+  shithappens2016 on github, sylgal on github, Timur Artikov, Tobias Nyholm,
+  Tommy Chiang, User Sg, Vadim Grinshpun, Valentín Gutiérrez, Viktor Szakats,
+  William Desportes, Wyatt OʼDay, Xiang Xiao, Yongkang Huang, Younes El-karama,
+  Zhang Xiuhua, Борис Верховский, Коваленко Анатолий Викторович,
+  (83 contributors)
 
 References to bug reports and discussions on issues:
 
- [1] = https://curl.haxx.se/bug/?i=5826
- [2] = https://curl.haxx.se/bug/?i=5845
- [3] = https://curl.haxx.se/bug/?i=5829
- [4] = https://curl.haxx.se/bug/?i=5610
- [5] = https://curl.haxx.se/bug/?i=5842
- [6] = https://curl.haxx.se/bug/?i=5810
- [7] = https://curl.haxx.se/bug/?i=5770
- [8] = https://curl.haxx.se/bug/?i=5838
- [9] = https://curl.haxx.se/bug/?i=5669
- [10] = https://curl.haxx.se/bug/?i=5840
- [11] = https://curl.haxx.se/bug/?i=5850
- [12] = https://curl.haxx.se/mail/lib-2020-08/0018.html
- [13] = https://curl.haxx.se/bug/?i=5851
- [14] = https://curl.haxx.se/bug/?i=5836
- [15] = https://curl.haxx.se/bug/?i=5855
- [16] = https://curl.haxx.se/bug/?i=5859
- [17] = https://curl.haxx.se/bug/?i=5863
- [18] = https://curl.haxx.se/bug/?i=5864
- [19] = https://curl.haxx.se/bug/?i=5861
- [20] = https://curl.haxx.se/bug/?i=5849
- [21] = https://curl.haxx.se/bug/?i=5634
- [22] = https://curl.haxx.se/bug/?i=5634
- [23] = https://curl.haxx.se/bug/?i=5707
- [24] = https://curl.haxx.se/bug/?i=5760
- [25] = https://curl.haxx.se/bug/?i=5637
- [26] = https://curl.haxx.se/bug/?i=5848
- [27] = https://curl.haxx.se/bug/?i=5685
- [28] = https://curl.haxx.se/bug/?i=5858
- [29] = https://curl.haxx.se/bug/?i=5892
- [30] = https://curl.haxx.se/bug/?i=5879
- [31] = https://curl.haxx.se/bug/?i=5867
- [32] = https://curl.haxx.se/bug/?i=5583
- [33] = https://curl.haxx.se/bug/?i=5865
- [34] = https://curl.haxx.se/bug/?i=5876
- [35] = https://curl.haxx.se/bug/?i=5846
- [36] = https://curl.haxx.se/bug/?i=5846
- [37] = https://curl.haxx.se/bug/?i=5853
- [38] = https://curl.haxx.se/bug/?i=5866
- [39] = https://curl.haxx.se/bug/?i=5884
- [40] = https://curl.haxx.se/bug/?i=5365
- [41] = https://curl.haxx.se/bug/?i=5871
- [42] = https://curl.haxx.se/bug/?i=5912
- [43] = https://curl.haxx.se/bug/?i=5889
- [44] = https://curl.haxx.se/bug/?i=5882
- [45] = https://curl.haxx.se/bug/?i=5439
- [46] = https://curl.haxx.se/bug/?i=1262
- [47] = https://curl.haxx.se/bug/?i=5909
- [48] = https://curl.haxx.se/bug/?i=5843
- [49] = https://curl.haxx.se/bug/?i=5880
- [50] = https://bugzilla.redhat.com/1873327
- [51] = https://curl.haxx.se/bug/?i=5908
- [52] = https://curl.haxx.se/bug/?i=5907
- [53] = https://curl.haxx.se/bug/?i=5906
- [54] = https://curl.haxx.se/bug/?i=5914
- [55] = https://curl.haxx.se/bug/?i=5932
- [56] = https://curl.haxx.se/bug/?i=5930
- [57] = https://curl.haxx.se/bug/?i=5934
- [58] = https://curl.haxx.se/bug/?i=5931
- [59] = https://curl.haxx.se/bug/?i=5946
- [60] = https://curl.haxx.se/bug/?i=5923
- [61] = https://curl.haxx.se/bug/?i=5854
- [62] = https://curl.haxx.se/bug/?i=5854
- [63] = https://curl.haxx.se/bug/?i=5883
- [64] = https://curl.haxx.se/bug/?i=5903
- [65] = https://curl.haxx.se/bug/?i=5899
- [66] = https://curl.haxx.se/bug/?i=5898
- [67] = https://curl.haxx.se/bug/?i=5897
- [68] = https://curl.haxx.se/bug/?i=5922
- [69] = https://curl.haxx.se/bug/?i=5921
- [70] = https://curl.haxx.se/bug/?i=5917
- [71] = https://curl.haxx.se/bug/?i=5905
- [72] = https://curl.haxx.se/bug/?i=5946
- [73] = https://curl.haxx.se/bug/?i=5946
- [74] = https://curl.haxx.se/bug/?i=5916
- [75] = https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843
- [76] = https://curl.haxx.se/bug/?i=5972
- [77] = https://curl.haxx.se/bug/?i=5680
- [78] = https://curl.haxx.se/bug/?i=5959
- [79] = https://curl.haxx.se/bug/?i=5955
- [80] = https://curl.haxx.se/bug/?i=5648
- [81] = https://curl.haxx.se/bug/?i=5937
- [82] = https://curl.haxx.se/bug/?i=5974
- [83] = https://curl.haxx.se/bug/?i=5942
- [84] = https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553
- [85] = https://curl.haxx.se/bug/?i=5971
- [86] = https://curl.haxx.se/bug/?i=5969
- [87] = https://curl.haxx.se/bug/?i=6016
- [88] = https://curl.haxx.se/bug/?i=5936
- [89] = https://curl.haxx.se/bug/?i=5968
- [90] = https://curl.haxx.se/bug/?i=5992
- [91] = https://curl.haxx.se/bug/?i=5993
- [92] = https://curl.haxx.se/mail/lib-2020-09/0081.html
- [93] = https://curl.haxx.se/bug/?i=5954
- [94] = https://curl.haxx.se/bug/?i=6014
- [95] = https://curl.haxx.se/bug/?i=5985
- [96] = https://curl.haxx.se/bug/?i=5984
- [97] = https://curl.haxx.se/bug/?i=5947
- [98] = https://curl.haxx.se/bug/?i=5629
- [99] = https://curl.haxx.se/bug/?i=5953
- [100] = https://curl.haxx.se/bug/?i=5952
- [101] = https://curl.haxx.se/bug/?i=5952
- [102] = https://curl.haxx.se/bug/?i=5952
- [103] = https://curl.haxx.se/bug/?i=5952
- [104] = https://curl.haxx.se/bug/?i=5961
- [105] = https://curl.haxx.se/bug/?i=5980
- [106] = https://curl.haxx.se/bug/?i=5981
- [107] = https://curl.haxx.se/bug/?i=5979
- [108] = https://curl.haxx.se/bug/?i=6012
- [109] = https://curl.haxx.se/bug/?i=6005
- [110] = https://curl.haxx.se/bug/?i=6010
- [111] = https://curl.haxx.se/bug/?i=6011
- [112] = https://curl.haxx.se/bug/?i=5523
- [113] = https://curl.haxx.se/bug/?i=6004
- [114] = https://curl.haxx.se/bug/?i=6033
- [115] = https://curl.haxx.se/bug/?i=6028
- [116] = https://curl.haxx.se/bug/?i=6040
- [117] = https://curl.haxx.se/bug/?i=6052
- [118] = https://curl.haxx.se/bug/?i=5989
- [119] = https://curl.haxx.se/bug/?i=6039
- [120] = https://github.com/curl/curl/pull/5735#issuecomment-701376388
- [121] = https://curl.haxx.se/bug/?i=6023
- [122] = https://curl.haxx.se/bug/?i=6024
- [123] = https://curl.haxx.se/bug/?i=6025
- [124] = https://curl.haxx.se/bug/?i=6035
- [125] = https://curl.haxx.se/bug/?i=4295
- [126] = https://curl.haxx.se/bug/?i=5973
- [127] = https://curl.haxx.se/bug/?i=6037
- [128] = https://curl.haxx.se/bug/?i=6003
- [129] = https://curl.haxx.se/bug/?i=6034
- [130] = https://curl.haxx.se/bug/?i=6031
- [131] = https://curl.haxx.se/bug/?i=6070
- [132] = https://curl.haxx.se/bug/?i=6048
- [133] = https://curl.haxx.se/bug/?i=6045
- [134] = https://curl.haxx.se/bug/?i=6042
+ [1] = https://curl.se/bug/?i=7133
+ [2] = https://curl.se/bug/?i=7167
+ [3] = https://curl.se/bug/?i=7152
+ [4] = https://curl.se/bug/?i=7154
+ [5] = https://curl.se/bug/?i=7159
+ [6] = https://curl.se/bug/?i=7162
+ [7] = https://curl.se/bug/?i=7165
+ [8] = https://curl.se/bug/?i=7164
+ [9] = https://curl.se/bug/?i=7095
+ [10] = https://curl.se/bug/?i=7157
+ [11] = https://curl.se/bug/?i=7157
+ [12] = https://curl.se/bug/?i=7158
+ [13] = https://curl.se/bug/?i=7153
+ [14] = https://curl.se/bug/?i=7148
+ [15] = https://curl.se/bug/?i=7151
+ [16] = https://curl.se/bug/?i=7039
+ [17] = https://curl.se/bug/?i=7146
+ [18] = https://curl.se/mail/lib-2021-06/0001.html
+ [19] = https://curl.se/bug/?i=7143
+ [20] = https://curl.se/mail/lib-2021-06/0003.html
+ [21] = https://curl.se/bug/?i=7141
+ [22] = https://curl.se/bug/?i=7141
+ [23] = https://curl.se/bug/?i=7139
+ [24] = https://curl.se/bug/?i=7138
+ [25] = https://curl.se/bug/?i=7172
+ [26] = https://curl.se/bug/?i=7122
+ [27] = https://curl.se/bug/?i=7134
+ [28] = https://curl.se/bug/?i=7130
+ [29] = https://curl.se/bug/?i=7204
+ [30] = https://curl.se/bug/?i=7181
+ [31] = https://curl.se/bug/?i=7183
+ [32] = https://curl.se/bug/?i=7204
+ [33] = https://curl.se/bug/?i=7184
+ [34] = https://curl.se/bug/?i=7185
+ [35] = https://curl.se/bug/?i=7170
+ [36] = https://curl.se/bug/?i=7205
+ [37] = https://curl.se/bug/?i=7144
+ [38] = https://curl.se/bug/?i=7177
+ [39] = https://curl.se/bug/?i=7179
+ [40] = https://curl.se/bug/?i=7175
+ [41] = https://curl.se/bug/?i=7169
+ [42] = https://curl.se/bug/?i=7173
+ [43] = https://curl.se/bug/?i=7166
+ [44] = https://curl.se/bug/?i=7028
+ [45] = https://curl.se/bug/?i=7028
+ [46] = https://curl.se/bug/?i=7205
+ [47] = https://curl.se/bug/?i=7205
+ [48] = https://curl.se/bug/?i=7205
+ [49] = https://curl.se/bug/?i=7205
+ [50] = https://curl.se/bug/?i=7205
+ [51] = https://curl.se/bug/?i=7205
+ [52] = https://curl.se/bug/?i=7206
+ [53] = https://curl.se/bug/?i=7203
+ [54] = https://curl.se/bug/?i=7176
+ [55] = https://curl.se/mail/lib-2021-06/0008.html
+ [56] = https://curl.se/bug/?i=7222
+ [57] = https://curl.se/bug/?i=7218
+ [58] = https://curl.se/bug/?i=7257
+ [59] = https://curl.se/bug/?i=7236
+ [60] = https://curl.se/mail/lib-2021-06/0018.html
+ [61] = https://curl.se/bug/?i=7240
+ [62] = https://curl.se/bug/?i=7227
+ [63] = https://github.com/curl/curl/discussions/7255
+ [64] = https://curl.se/bug/?i=7253
+ [65] = https://curl.se/bug/?i=7250
+ [66] = https://curl.se/bug/?i=7209
+ [67] = https://curl.se/bug/?i=7209
+ [68] = https://curl.se/bug/?i=7209
+ [69] = https://curl.se/bug/?i=7209
+ [70] = https://curl.se/bug/?i=7209
+ [71] = https://curl.se/bug/?i=7209
+ [72] = https://curl.se/bug/?i=7209
+ [73] = https://curl.se/bug/?i=7209
+ [74] = https://curl.se/bug/?i=7209
+ [75] = https://curl.se/bug/?i=493
+ [76] = https://curl.se/bug/?i=7209
+ [77] = https://curl.se/bug/?i=7209
+ [78] = https://curl.se/bug/?i=7209
+ [79] = https://curl.se/bug/?i=7209
+ [80] = https://curl.se/bug/?i=7219
+ [81] = https://curl.se/bug/?i=7211
+ [82] = https://curl.se/bug/?i=7212
+ [83] = https://curl.se/bug/?i=6896
+ [84] = https://curl.se/bug/?i=7208
+ [85] = https://curl.se/bug/?i=7280
+ [86] = https://curl.se/bug/?i=7245
+ [87] = https://curl.se/bug/?i=7238
+ [88] = https://curl.se/bug/?i=7248
+ [89] = https://curl.se/bug/?i=7248
+ [90] = https://curl.se/bug/?i=7248
+ [91] = https://curl.se/bug/?i=7243
+ [92] = https://curl.se/bug/?i=7239
+ [93] = https://curl.se/bug/?i=7274
+ [94] = https://curl.se/bug/?i=7277
+ [95] = https://curl.se/bug/?i=7276
+ [96] = https://curl.se/bug/?i=7293
+ [97] = https://curl.se/bug/?i=7178
+ [98] = https://curl.se/mail/lib-2021-06/0024.html
+ [99] = https://curl.se/bug/?i=7290
+ [100] = https://curl.se/bug/?i=7287
+ [101] = https://curl.se/bug/?i=7296
+ [102] = https://curl.se/bug/?i=7285
+ [103] = https://curl.se/bug/?i=7260
+ [104] = https://curl.se/bug/?i=7034
+ [105] = https://curl.se/bug/?i=7265
+ [106] = https://curl.se/bug/?i=7295
+ [107] = https://curl.se/bug/?i=7273
+ [108] = https://curl.se/bug/?i=7270
+ [109] = https://curl.se/bug/?i=7272
+ [110] = https://curl.se/bug/?i=7216
+ [111] = https://curl.se/bug/?i=7271
+ [112] = https://curl.se/bug/?i=7271
+ [113] = https://curl.se/bug/?i=7266
+ [114] = https://curl.se/bug/?i=7349
+ [115] = https://curl.se/bug/?i=7350
+ [116] = https://curl.se/bug/?i=7301
+ [117] = https://curl.se/bug/?i=7228
+ [118] = https://curl.se/bug/?i=7073
+ [119] = https://curl.se/bug/?i=7297
+ [120] = https://curl.se/bug/?i=7350
+ [121] = https://curl.se/bug/?i=7348
+ [122] = https://curl.se/bug/?i=7343
+ [123] = https://curl.se/bug/?i=7344
+ [124] = https://curl.se/bug/?i=7345
+ [125] = https://curl.se/bug/?i=7341
+ [126] = https://curl.se/bug/?i=7340
+ [127] = https://curl.se/bug/?i=7330
+ [128] = https://curl.se/bug/?i=7333
+ [129] = https://curl.se/bug/?i=7333
+ [130] = https://curl.se/bug/?i=7334
+ [131] = https://curl.se/bug/?i=7328
+ [132] = https://curl.se/bug/?i=7329
+ [133] = https://curl.se/bug/?i=7326
+ [134] = https://curl.se/bug/?i=7325
+ [135] = https://curl.se/bug/?i=7319
+ [136] = https://curl.se/bug/?i=7316
+ [137] = https://curl.se/bug/?i=7327
+ [138] = https://curl.se/bug/?i=7320
+ [139] = https://curl.se/bug/?i=7324
+ [140] = https://curl.se/bug/?i=7318
+ [141] = https://curl.se/bug/?i=7311
+ [142] = https://curl.se/bug/?i=7308
+ [143] = https://curl.se/bug/?i=7314
+ [144] = https://curl.se/bug/?i=7313
+ [145] = https://curl.se/bug/?i=7342
+ [146] = https://curl.se/bug/?i=7370
+ [147] = https://curl.se/mail/lib-2021-07/0025.html
+ [148] = https://curl.se/bug/?i=7361
+ [149] = https://curl.se/bug/?i=7357
+ [150] = https://curl.se/bug/?i=7360
+ [151] = https://curl.se/bug/?i=7358
+ [152] = https://curl.se/bug/?i=7352
+ [153] = https://curl.se/bug/?i=7379
+ [154] = https://curl.se/bug/?i=7380
+ [155] = https://curl.se/bug/?i=7377
+ [156] = https://curl.se/bug/?i=7375
+ [157] = https://curl.se/bug/?i=7367
+ [159] = https://curl.se/bug/?i=7391
+ [160] = https://curl.se/bug/?i=7382
+ [161] = https://curl.se/bug/?i=7383
+ [162] = https://curl.se/bug/?i=7378
+ [163] = https://curl.se/bug/?i=7397
+ [164] = https://curl.se/bug/?i=7398
+ [165] = https://curl.se/docs/CVE-2021-22924.html
+ [166] = https://curl.se/bug/?i=7418
+ [167] = https://curl.se/docs/CVE-2021-22926.html
+ [168] = https://curl.se/bug/?i=7423
+ [169] = https://curl.se/bug/?i=7429
+ [170] = https://curl.se/docs/CVE-2021-22925.html
+ [171] = https://curl.se/bug/?i=7386
+ [172] = https://curl.se/bug/?i=7413
+ [174] = https://curl.se/bug/?i=7446
+ [175] = https://curl.se/bug/?i=7419
diff --git a/acinclude.m4 b/acinclude.m4
index e7a36e4..23c06d6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -143,7 +143,7 @@
 dnl CURL_CHECK_AIX_ALL_SOURCE
 dnl -------------------------------------------------
 dnl Provides a replacement of traditional AC_AIX with
-dnl an uniform behaviour across all autoconf versions,
+dnl an uniform behavior across all autoconf versions,
 dnl and with our own placement rules.
 
 AC_DEFUN([CURL_CHECK_AIX_ALL_SOURCE], [
@@ -347,6 +347,39 @@
 ])
 
 
+dnl CURL_CHECK_HEADER_WINCRYPT
+dnl -------------------------------------------------
+dnl Check for compilable and valid wincrypt.h header
+
+AC_DEFUN([CURL_CHECK_HEADER_WINCRYPT], [
+  AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl
+  AC_CACHE_CHECK([for wincrypt.h], [curl_cv_header_wincrypt_h], [
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+#undef inline
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <wincrypt.h>
+      ]],[[
+        int dummy=2*PROV_RSA_FULL;
+      ]])
+    ],[
+      curl_cv_header_wincrypt_h="yes"
+    ],[
+      curl_cv_header_wincrypt_h="no"
+    ])
+  ])
+  case "$curl_cv_header_wincrypt_h" in
+    yes)
+      AC_DEFINE_UNQUOTED(HAVE_WINCRYPT_H, 1,
+        [Define to 1 if you have the wincrypt.h header file.])
+      ;;
+  esac
+])
+
+
 dnl CURL_CHECK_HEADER_WINLDAP
 dnl -------------------------------------------------
 dnl Check for compilable and valid winldap.h header
@@ -1375,10 +1408,9 @@
 dnl Check for timeval struct
 
 AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
-  AC_REQUIRE([AC_HEADER_TIME])dnl
   AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
   AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
-  AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h)
+  AC_CHECK_HEADERS(sys/types.h sys/time.h sys/socket.h)
   AC_CACHE_CHECK([for struct timeval], [curl_cv_struct_timeval], [
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
@@ -1401,14 +1433,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -1573,8 +1599,7 @@
 dnl Check if monotonic clock_gettime is available.
 
 AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
-  AC_REQUIRE([AC_HEADER_TIME])dnl
-  AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
+  AC_CHECK_HEADERS(sys/types.h sys/time.h)
   AC_MSG_CHECKING([for monotonic clock_gettime])
   #
   if test "x$dontwant_rt" = "xno" ; then
@@ -1585,14 +1610,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
       ]],[[
         struct timespec ts;
         (void)clock_gettime(CLOCK_MONOTONIC, &ts);
@@ -1639,14 +1658,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
           ]],[[
             struct timespec ts;
             (void)clock_gettime(CLOCK_MONOTONIC, &ts);
@@ -1694,14 +1707,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
         ]],[[
           struct timespec ts;
           if (0 == clock_gettime(CLOCK_MONOTONIC, &ts))
@@ -1871,20 +1878,9 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 #ifndef HAVE_WINDOWS_H
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-#endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #elif defined(HAVE_UNISTD_H)
@@ -1893,6 +1889,11 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#endif
 #endif
     ]],[[
       select(0, 0, 0, 0, 0);
@@ -1936,20 +1937,9 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 #ifndef HAVE_WINDOWS_H
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-#endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #elif defined(HAVE_UNISTD_H)
@@ -1958,6 +1948,11 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#endif
 #define SELECTCALLCONV
 #endif
 #ifndef HAVE_STRUCT_TIMEVAL
@@ -2165,9 +2160,9 @@
   AC_MSG_CHECKING([default CA cert bundle/path])
 
   AC_ARG_WITH(ca-bundle,
-AC_HELP_STRING([--with-ca-bundle=FILE],
+AS_HELP_STRING([--with-ca-bundle=FILE],
 [Path to a file containing CA certificates (example: /etc/ca-bundle.crt)])
-AC_HELP_STRING([--without-ca-bundle], [Don't use a default CA bundle]),
+AS_HELP_STRING([--without-ca-bundle], [Don't use a default CA bundle]),
   [
     want_ca="$withval"
     if test "x$want_ca" = "xyes"; then
@@ -2176,12 +2171,12 @@
   ],
   [ want_ca="unset" ])
   AC_ARG_WITH(ca-path,
-AC_HELP_STRING([--with-ca-path=DIRECTORY],
+AS_HELP_STRING([--with-ca-path=DIRECTORY],
 [Path to a directory containing CA certificates stored individually, with \
 their filenames in a hash format. This option can be used with the OpenSSL, \
 GnuTLS and mbedTLS backends. Refer to OpenSSL c_rehash for details. \
 (example: /etc/certificates)])
-AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
+AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
   [
     want_capath="$withval"
     if test "x$want_capath" = "xyes"; then
@@ -2291,8 +2286,8 @@
 
   AC_MSG_CHECKING([whether to use builtin CA store of SSL library])
   AC_ARG_WITH(ca-fallback,
-AC_HELP_STRING([--with-ca-fallback], [Use the built in CA store of the SSL library])
-AC_HELP_STRING([--without-ca-fallback], [Don't use the built in CA store of the SSL library]),
+AS_HELP_STRING([--with-ca-fallback], [Use the built in CA store of the SSL library])
+AS_HELP_STRING([--without-ca-fallback], [Don't use the built in CA store of the SSL library]),
   [
     if test "x$with_ca_fallback" != "xyes" -a "x$with_ca_fallback" != "xno"; then
       AC_MSG_ERROR([--with-ca-fallback only allows yes or no as parameter])
@@ -2353,11 +2348,54 @@
       AC_MSG_RESULT([yes (large file enabled)])
       AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
         [Define to 1 if you are building a Windows target with large file support.])
+      AC_SUBST(USE_WIN32_LARGE_FILES, [1])
       ;;
     win32_small_files)
       AC_MSG_RESULT([yes (large file disabled)])
       AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
         [Define to 1 if you are building a Windows target without large file support.])
+      AC_SUBST(USE_WIN32_SMALL_FILES, [1])
+      ;;
+    *)
+      AC_MSG_RESULT([no])
+      ;;
+  esac
+])
+
+dnl CURL_CHECK_WIN32_CRYPTO
+dnl -------------------------------------------------
+dnl Check if curl's WIN32 crypto lib can be used
+
+AC_DEFUN([CURL_CHECK_WIN32_CRYPTO], [
+  AC_REQUIRE([CURL_CHECK_HEADER_WINCRYPT])dnl
+  AC_MSG_CHECKING([whether build target supports WIN32 crypto API])
+  curl_win32_crypto_api="no"
+  if test "$curl_cv_header_wincrypt_h" = "yes"; then
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+#undef inline
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <wincrypt.h>
+      ]],[[
+        HCRYPTPROV hCryptProv;
+        if(CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
+                               CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
+          CryptReleaseContext(hCryptProv, 0);
+        }
+      ]])
+    ],[
+      curl_win32_crypto_api="yes"
+    ])
+  fi
+  case "$curl_win32_crypto_api" in
+    yes)
+      AC_MSG_RESULT([yes])
+      AC_DEFINE_UNQUOTED(USE_WIN32_CRYPTO, 1,
+        [Define to 1 if you are building a Windows target with crypto API support.])
+      AC_SUBST(USE_WIN32_CRYPTO, [1])
       ;;
     *)
       AC_MSG_RESULT([no])
@@ -2506,14 +2544,13 @@
 ])
 
 
-dnl CURL_MAC_CFLAGS
+dnl CURL_DARWIN_CFLAGS
 dnl
-dnl Check if -mmacosx-version-min, -miphoneos-version-min or any
-dnl similar are set manually, otherwise do. And set
-dnl -Werror=partial-availability.
+dnl Set -Werror=partial-availability to detect possible breaking code
+dnl with very low deployment targets.
 dnl
 
-AC_DEFUN([CURL_MAC_CFLAGS], [
+AC_DEFUN([CURL_DARWIN_CFLAGS], [
 
   tst_cflags="no"
   case $host_os in
@@ -2522,22 +2559,10 @@
       ;;
   esac
 
-  AC_MSG_CHECKING([for good-to-use Mac CFLAGS])
+  AC_MSG_CHECKING([for good-to-use Darwin CFLAGS])
   AC_MSG_RESULT([$tst_cflags]);
 
   if test "$tst_cflags" = "yes"; then
-    AC_MSG_CHECKING([for *version-min in CFLAGS])
-    min=""
-    if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then
-      min="-mmacosx-version-min=10.8"
-      CFLAGS="$CFLAGS $min"
-    fi
-    if test -z "$min"; then
-      AC_MSG_RESULT([set by user])
-    else
-      AC_MSG_RESULT([$min set])
-    fi
-
     old_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror=partial-availability"
     AC_MSG_CHECKING([whether $CC accepts -Werror=partial-availability])
diff --git a/aclocal.m4 b/aclocal.m4
index c287d31..bd780cc 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
 
 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
 
@@ -35,7 +35,7 @@
 [am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.16.2], [],
+m4_if([$1], [1.16.3], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,7 +51,7 @@
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.2])dnl
+[AM_AUTOMAKE_VERSION([1.16.3])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -739,12 +739,7 @@
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -1172,12 +1167,23 @@
 ]) # _AM_PROG_TAR
 
 m4_include([m4/ax_compile_check_sizeof.m4])
+m4_include([m4/curl-amissl.m4])
+m4_include([m4/curl-bearssl.m4])
 m4_include([m4/curl-compilers.m4])
 m4_include([m4/curl-confopts.m4])
 m4_include([m4/curl-functions.m4])
+m4_include([m4/curl-gnutls.m4])
+m4_include([m4/curl-mbedtls.m4])
+m4_include([m4/curl-mesalink.m4])
+m4_include([m4/curl-nss.m4])
 m4_include([m4/curl-openssl.m4])
 m4_include([m4/curl-override.m4])
 m4_include([m4/curl-reentrant.m4])
+m4_include([m4/curl-rustls.m4])
+m4_include([m4/curl-schannel.m4])
+m4_include([m4/curl-sectransp.m4])
+m4_include([m4/curl-sysconfig.m4])
+m4_include([m4/curl-wolfssl.m4])
 m4_include([m4/libtool.m4])
 m4_include([m4/ltoptions.m4])
 m4_include([m4/ltsugar.m4])
diff --git a/androidconfigure b/androidconfigure
index 16bea19..480d6a1 100755
--- a/androidconfigure
+++ b/androidconfigure
@@ -13,8 +13,8 @@
 
 HOST="arm-linux-androideabi"
 T="${ANDROID_BUILD_TOP}"
-export CC="${T}/prebuilts/clang/host/linux-x86/clang-r399163/bin/clang"
-export LD="${T}/prebuilts/clang/host/linux-x86/clang-r399163/bin/lld"
+export CC="${T}/prebuilts/clang/host/linux-x86/clang-r428724/bin/clang"
+export LD="${T}/prebuilts/clang/host/linux-x86/clang-r428724/bin/lld"
 
 CFLAGS=(
   "-isystem ${T}/external/libcxx/include"
diff --git a/buildconf.bat b/buildconf.bat
index 0435233..13ae07e 100644
--- a/buildconf.bat
+++ b/buildconf.bat
@@ -10,7 +10,7 @@
 rem *
 rem * This software is licensed as described in the file COPYING, which
 rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
+rem * are also available at https://curl.se/docs/copyright.html.
 rem *
 rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 rem * copies of the Software, and permit persons to whom the Software is
diff --git a/configure b/configure
index 2b0a614..bd32f77 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.69 for curl -.
 #
-# Report bugs to <a suitable curl mailing list: https://curl.haxx.se/mail/>.
+# Report bugs to <a suitable curl mailing list: https://curl.se/mail/>.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -11,7 +11,7 @@
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 #
-# Copyright (c) 1998 - 2020 Daniel Stenberg, <daniel@haxx.se>
+# Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
 # This configure script may be copied, distributed and modified under the
 # terms of the curl license; see COPYING for more details
 
@@ -514,8 +514,8 @@
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
     $as_echo "$0: Please tell bug-autoconf@gnu.org and a suitable curl
-$0: mailing list: https://curl.haxx.se/mail/ about your
-$0: system, including any error possibly output before this
+$0: mailing list: https://curl.se/mail/ about your system,
+$0: including any error possibly output before this
 $0: message. Then install a modern shell, or manually run
 $0: the script under such a shell if you do have one."
   fi
@@ -831,7 +831,7 @@
 PACKAGE_TARNAME='curl'
 PACKAGE_VERSION='-'
 PACKAGE_STRING='curl -'
-PACKAGE_BUGREPORT='a suitable curl mailing list: https://curl.haxx.se/mail/'
+PACKAGE_BUGREPORT='a suitable curl mailing list: https://curl.se/mail/'
 PACKAGE_URL=''
 
 ac_unique_file="lib/urldata.h"
@@ -919,9 +919,8 @@
 USE_WOLFSSH
 USE_LIBSSH
 USE_LIBSSH2
-LIBMETALINK_CPPFLAGS
-LIBMETALINK_LDFLAGS
-LIBMETALINK_LIBS
+USE_GSASL_FALSE
+USE_GSASL_TRUE
 USE_LIBPSL_FALSE
 USE_LIBPSL_TRUE
 CURL_CA_BUNDLE
@@ -929,12 +928,12 @@
 SSL_ENABLED
 NSS_LIBS
 USE_NSS
+USE_RUSTLS
 USE_BEARSSL
 USE_MESALINK
 USE_WOLFSSL
 USE_MBEDTLS
 HAVE_GNUTLS_SRP
-USE_GNUTLS_NETTLE
 USE_GNUTLS
 HAVE_OPENSSL_SRP
 RANDOM_FILE
@@ -953,7 +952,6 @@
 HAVE_LIBZ_FALSE
 HAVE_LIBZ_TRUE
 HAVE_LIBZ
-PKGCONFIG
 HAVE_PROTO_BSDSOCKET_H
 CURL_DISABLE_MQTT
 CURL_DISABLE_GOPHER
@@ -965,6 +963,8 @@
 CURL_DISABLE_TELNET
 CURL_DISABLE_DICT
 CURL_DISABLE_PROXY
+USE_HYPER
+PKGCONFIG
 HAVE_LDAP_SSL
 CURL_DISABLE_LDAPS
 CURL_DISABLE_LDAP
@@ -972,6 +972,9 @@
 CURL_DISABLE_FTP
 CURL_DISABLE_RTSP
 CURL_DISABLE_HTTP
+USE_WIN32_CRYPTO
+USE_WIN32_SMALL_FILES
+USE_WIN32_LARGE_FILES
 DOING_NATIVE_WINDOWS_FALSE
 DOING_NATIVE_WINDOWS_TRUE
 BUILD_UNITTESTS_FALSE
@@ -1136,6 +1139,19 @@
 enable_ech
 enable_code_coverage
 enable_dependency_tracking
+with_schannel
+with_secure_transport
+with_amissl
+with_ssl
+with_openssl
+with_gnutls
+with_mbedtls
+with_wolfssl
+with_mesalink
+with_bearssl
+with_rustls
+with_nss
+with_darwinssl
 enable_largefile
 enable_shared
 enable_static
@@ -1150,6 +1166,7 @@
 enable_file
 enable_ldap
 enable_ldaps
+with_hyper
 enable_rtsp
 enable_proxy
 enable_dict
@@ -1174,25 +1191,14 @@
 with_gssapi_libs
 with_gssapi
 with_default_ssl_backend
-with_winssl
-with_schannel
-with_darwinssl
-with_secure_transport
-with_amissl
-with_ssl
 with_egd_socket
 with_random
 enable_openssl_auto_load_config
-with_gnutls
-with_mbedtls
-with_wolfssl
-with_mesalink
-with_bearssl
-with_nss
 with_ca_bundle
 with_ca_path
 with_ca_fallback
 with_libpsl
+with_libgsasl
 with_libmetalink
 with_libssh2
 with_libssh
@@ -1212,6 +1218,7 @@
 enable_verbose
 enable_sspi
 enable_crypto_auth
+enable_ntlm
 enable_ntlm_wb
 enable_tls_srp
 enable_unix_sockets
@@ -1224,8 +1231,9 @@
 enable_netrc
 enable_progress_meter
 enable_dnsshuffle
-enable_get_easy_option
+enable_get_easy_options
 enable_alt_svc
+enable_hsts
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1913,7 +1921,7 @@
   --enable-ldaps          Enable LDAPS support
   --disable-ldaps         Disable LDAPS support
   --enable-rtsp           Enable RTSP support
-  --disable-rtsp          Disable RTSP support
+    --disable-rtsp          Disable RTSP support
   --enable-proxy          Enable proxy support
   --disable-proxy         Disable proxy support
   --enable-dict           Enable DICT support
@@ -1962,6 +1970,8 @@
   --disable-sspi          Disable SSPI
   --enable-crypto-auth    Enable cryptographic authentication
   --disable-crypto-auth   Disable cryptographic authentication
+  --enable-ntlm           Enable NTLM support
+  --disable-ntlm          Disable NTLM support
   --enable-ntlm-wb[=FILE] Enable NTLM delegation to winbind's ntlm_auth
                           helper, where FILE is ntlm_auth's absolute filename
                           (default: /usr/bin/ntlm_auth)
@@ -1996,10 +2006,36 @@
                           Disable curl_easy_options
   --enable-alt-svc        Enable alt-svc support
   --disable-alt-svc       Disable alt-svc support
+  --enable-hsts           Enable HSTS support
+    --disable-hsts          Disable HSTS support
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-schannel         enable Windows native SSL/TLS
+  --with-secure-transport enable Apple OS native SSL/TLS
+  --with-amissl           enable Amiga native SSL/TLS (AmiSSL)
+  --with-ssl=PATH         old version of --with-openssl
+  --without-ssl           build without any TLS library
+  --with-openssl=PATH     Where to look for OpenSSL, PATH points to the SSL
+                          installation (default: /usr/local/ssl); when
+                          possible, set the PKG_CONFIG_PATH environment
+                          variable instead of using this option
+  --with-gnutls=PATH      where to look for GnuTLS, PATH points to the
+                          installation root
+  --with-mbedtls=PATH     where to look for mbedTLS, PATH points to the
+                          installation root
+  --with-wolfssl=PATH     where to look for WolfSSL, PATH points to the
+                          installation root (default: system lib default)
+  --with-mesalink=PATH    where to look for MesaLink, PATH points to the
+                          installation root
+  --with-bearssl=PATH     where to look for BearSSL, PATH points to the
+                          installation root
+  --with-rustls=PATH      where to look for rustls, PATH points to the
+                          installation root
+  --with-nss=PATH         where to look for NSS, PATH points to the
+                          installation root
+
   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
   --with-aix-soname=aix|svr4|both
@@ -2008,6 +2044,8 @@
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
                           compiler's sysroot if not specified).
+  --with-hyper=PATH       Enable hyper usage
+  --without-hyper         Disable hyper usage
   --with-zlib=PATH        search for zlib in PATH
   --without-zlib          disable use of zlib
   --with-brotli=PATH      Where to look for brotli, PATH points to the BROTLI
@@ -2029,42 +2067,8 @@
                           Use NAME as default SSL backend
   --without-default-ssl-backend
                           Use implicit default SSL backend
-  --with-winssl           enable Windows native SSL/TLS
-  --without-winssl        disable Windows native SSL/TLS
-  --with-schannel         enable Windows native SSL/TLS
-  --without-schannel      disable Windows native SSL/TLS
-  --with-darwinssl        enable Apple OS native SSL/TLS
-  --without-darwinssl     disable Apple OS native SSL/TLS
-  --with-secure-transport enable Apple OS native SSL/TLS
-  --without-secure-transport
-                          disable Apple OS native SSL/TLS
-  --with-amissl           enable Amiga native SSL/TLS (AmiSSL)
-  --without-amissl        disable Amiga native SSL/TLS (AmiSSL)
-  --with-ssl=PATH         Where to look for OpenSSL, PATH points to the SSL
-                          installation (default: /usr/local/ssl); when
-                          possible, set the PKG_CONFIG_PATH environment
-                          variable instead of using this option
-  --without-ssl           disable OpenSSL
   --with-egd-socket=FILE  Entropy Gathering Daemon socket pathname
   --with-random=FILE      read randomness from FILE (default=/dev/urandom)
-  --with-gnutls=PATH      where to look for GnuTLS, PATH points to the
-                          installation root
-  --without-gnutls        disable GnuTLS detection
-  --with-mbedtls=PATH     where to look for mbedTLS, PATH points to the
-                          installation root
-  --without-mbedtls       disable mbedTLS detection
-  --with-wolfssl=PATH     where to look for WolfSSL, PATH points to the
-                          installation root (default: system lib default)
-  --without-wolfssl       disable WolfSSL detection
-  --with-mesalink=PATH    where to look for MesaLink, PATH points to the
-                          installation root
-  --without-mesalink      disable MesaLink detection
-  --with-bearssl=PATH     where to look for BearSSL, PATH points to the
-                          installation root
-  --without-bearssl       disable BearSSL detection
-  --with-nss=PATH         where to look for NSS, PATH points to the
-                          installation root
-  --without-nss           disable NSS detection
   --with-ca-bundle=FILE   Path to a file containing CA certificates (example:
                           /etc/ca-bundle.crt)
   --without-ca-bundle     Don't use a default CA bundle
@@ -2078,9 +2082,7 @@
   --with-ca-fallback      Use the built in CA store of the SSL library
   --without-ca-fallback   Don't use the built in CA store of the SSL library
   --without-libpsl        disable support for libpsl cookie checking
-  --with-libmetalink=PATH where to look for libmetalink, PATH points to the
-                          installation root
-  --without-libmetalink   disable libmetalink detection
+  --without-libgsasl      disable libgsasl support for SCRAM
   --with-libssh2=PATH     Where to look for libssh2, PATH points to the
                           libssh2 installation; when possible, set the
                           PKG_CONFIG_PATH environment variable instead of
@@ -2136,7 +2138,7 @@
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <a suitable curl mailing list: https://curl.haxx.se/mail/>.
+Report bugs to <a suitable curl mailing list: https://curl.se/mail/>.
 _ACEOF
 ac_status=$?
 fi
@@ -2206,7 +2208,7 @@
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 
-Copyright (c) 1998 - 2020 Daniel Stenberg, <daniel@haxx.se>
+Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
 This configure script may be copied, distributed and modified under the
 terms of the curl license; see COPYING for more details
 _ACEOF
@@ -2532,9 +2534,9 @@
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ----------------------------------------------------------------------- ##
-## Report this to a suitable curl mailing list: https://curl.haxx.se/mail/ ##
-## ----------------------------------------------------------------------- ##"
+( $as_echo "## ------------------------------------------------------------------ ##
+## Report this to a suitable curl mailing list: https://curl.se/mail/ ##
+## ------------------------------------------------------------------ ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
@@ -5298,12 +5300,7 @@
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -5874,17 +5871,18 @@
 
 PKGADD_PKG="HAXXcurl"
 PKGADD_NAME="curl - a client that groks URLs"
-PKGADD_VENDOR="curl.haxx.se"
+PKGADD_VENDOR="curl.se"
 
 
 
 
-    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl} )"
+    curl_ssl_msg="no      (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl,rustls} )"
     curl_ssh_msg="no      (--with-{libssh,libssh2})"
    curl_zlib_msg="no      (--with-zlib)"
  curl_brotli_msg="no      (--with-brotli)"
    curl_zstd_msg="no      (--with-zstd)"
     curl_gss_msg="no      (--with-gssapi)"
+  curl_gsasl_msg="no      (--with-gsasl)"
 curl_tls_srp_msg="no      (--enable-tls-srp)"
     curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
    curl_ipv6_msg="no      (--enable-ipv6)"
@@ -5898,14 +5896,180 @@
   curl_ldaps_msg="no      (--enable-ldaps)"
    curl_rtsp_msg="no      (--enable-rtsp)"
    curl_rtmp_msg="no      (--with-librtmp)"
-  curl_mtlnk_msg="no      (--with-libmetalink)"
     curl_psl_msg="no      (--with-libpsl)"
-
+ curl_altsvc_msg="enabled (--disable-alt-svc)"
+   curl_hsts_msg="enabled (--disable-hsts)"
     ssl_backends=
+     curl_h1_msg="enabled (internal)"
+     curl_h2_msg="no      (--with-nghttp2, --with-hyper)"
+     curl_h3_msg="no      (--with-ngtcp2, --with-quiche)"
+
+enable_altsvc="yes"
+enable_hsts="yes"
 
 INITIAL_LDFLAGS=$LDFLAGS
 INITIAL_LIBS=$LIBS
 
+OPT_SCHANNEL=no
+
+# Check whether --with-schannel was given.
+if test "${with_schannel+set}" = set; then :
+  withval=$with_schannel; OPT_SCHANNEL=$withval
+  TLSCHOICE="schannel"
+fi
+
+
+OPT_SECURETRANSPORT=no
+
+# Check whether --with-secure-transport was given.
+if test "${with_secure_transport+set}" = set; then :
+  withval=$with_secure_transport; OPT_SECURETRANSPORT=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }Secure-Transport"
+
+fi
+
+
+OPT_AMISSL=no
+
+# Check whether --with-amissl was given.
+if test "${with_amissl+set}" = set; then :
+  withval=$with_amissl; OPT_AMISSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }AmiSSL"
+fi
+
+
+OPT_OPENSSL=no
+ca="no"
+
+# Check whether --with-ssl was given.
+if test "${with_ssl+set}" = set; then :
+  withval=$with_ssl; OPT_SSL=$withval
+  OPT_OPENSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }OpenSSL"
+fi
+
+
+
+# Check whether --with-openssl was given.
+if test "${with_openssl+set}" = set; then :
+  withval=$with_openssl; OPT_OPENSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }OpenSSL"
+fi
+
+
+OPT_GNUTLS=no
+
+# Check whether --with-gnutls was given.
+if test "${with_gnutls+set}" = set; then :
+  withval=$with_gnutls; OPT_GNUTLS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }GnuTLS"
+fi
+
+
+OPT_MBEDTLS=no
+
+# Check whether --with-mbedtls was given.
+if test "${with_mbedtls+set}" = set; then :
+  withval=$with_mbedtls; OPT_MBEDTLS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }mbedTLS"
+fi
+
+
+OPT_WOLFSSL=no
+
+# Check whether --with-wolfssl was given.
+if test "${with_wolfssl+set}" = set; then :
+  withval=$with_wolfssl; OPT_WOLFSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }wolfSSL"
+fi
+
+
+OPT_MESALINK=no
+
+# Check whether --with-mesalink was given.
+if test "${with_mesalink+set}" = set; then :
+  withval=$with_mesalink; OPT_MESALINK=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }MesaLink"
+fi
+
+
+OPT_BEARSSL=no
+
+# Check whether --with-bearssl was given.
+if test "${with_bearssl+set}" = set; then :
+  withval=$with_bearssl; OPT_BEARSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }BearSSL"
+fi
+
+
+OPT_RUSTLS=no
+
+# Check whether --with-rustls was given.
+if test "${with_rustls+set}" = set; then :
+  withval=$with_rustls; OPT_RUSTLS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }rustls"
+fi
+
+
+OPT_NSS=no
+
+# Check whether --with-nss was given.
+if test "${with_nss+set}" = set; then :
+  withval=$with_nss; OPT_NSS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE
+else
+  }NSS"
+fi
+
+
+if test -z "$TLSCHOICE"; then
+  if test "x$OPT_SSL" != "xno"; then
+    as_fn_error $? "select TLS backend(s) or disable TLS with --without-ssl.
+
+Select from these:
+
+  --with-amissl
+  --with-bearssl
+  --with-gnutls
+  --with-mbedtls
+  --with-mesalink
+  --with-nss
+  --with-openssl (also works for BoringSSL and libressl)
+  --with-rustls
+  --with-schannel
+  --with-secure-transport
+  --with-wolfssl
+" "$LINENO" 5
+  fi
+fi
+
+
+# Check whether --with-darwinssl was given.
+if test "${with_darwinssl+set}" = set; then :
+  withval=$with_darwinssl; as_fn_error $? "--with-darwin-ssl no longer works!" "$LINENO" 5
+fi
+
+
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -6700,168 +6864,6 @@
 /* end confdefs.h.  */
 
 
-#define inet_ntoa_r innocuous_inet_ntoa_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef inet_ntoa_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntoa_r ();
-#if defined __stub_inet_ntoa_r || defined __stub___inet_ntoa_r
-choke me
-#endif
-
-int main (void)
-{
-return inet_ntoa_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    tmp_inet_ntoa_r="yes"
-
-else
-
-    tmp_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test "$tmp_inet_ntoa_r" = "yes"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "inet_ntoa_r" >/dev/null 2>&1; then :
-
-      tmp_inet_ntoa_r="proto_declared"
-
-else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "inet_ntoa_r" >/dev/null 2>&1; then :
-
-        tmp_inet_ntoa_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
-  fi
-
-  fi
-  if test "$tmp_need_reentrant" = "no"; then
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define gethostbyaddr_r innocuous_gethostbyaddr_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gethostbyaddr_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr_r ();
-#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r
-choke me
-#endif
-
-int main (void)
-{
-return gethostbyaddr_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    tmp_gethostbyaddr_r="yes"
-
-else
-
-    tmp_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test "$tmp_gethostbyaddr_r" = "yes"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then :
-
-      tmp_gethostbyaddr_r="proto_declared"
-
-else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then :
-
-        tmp_gethostbyaddr_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
-  fi
-
-  fi
-  if test "$tmp_need_reentrant" = "no"; then
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
 #define gethostbyname_r innocuous_gethostbyname_r
 #ifdef __STDC__
 # include <limits.h>
@@ -7014,85 +7016,6 @@
   fi
 
   fi
-  if test "$tmp_need_reentrant" = "no"; then
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define getservbyport_r innocuous_getservbyport_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getservbyport_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char getservbyport_r ();
-#if defined __stub_getservbyport_r || defined __stub___getservbyport_r
-choke me
-#endif
-
-int main (void)
-{
-return getservbyport_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    tmp_getservbyport_r="yes"
-
-else
-
-    tmp_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test "$tmp_getservbyport_r" = "yes"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "getservbyport_r" >/dev/null 2>&1; then :
-
-      tmp_getservbyport_r="proto_declared"
-
-else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "getservbyport_r" >/dev/null 2>&1; then :
-
-        tmp_getservbyport_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-
-fi
-rm -f conftest*
-
-
-fi
-rm -f conftest*
-
-  fi
-
-  fi
 
     fi
     if test "$tmp_need_reentrant" = "yes"; then
@@ -10538,11 +10461,11 @@
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+	10.0,*86*-darwin8*|10.0,*-darwin[912]*)
 	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
 	10.[012][,.]*)
 	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
+	10.*|11.*)
 	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
@@ -15791,9 +15714,7 @@
   compiler_id="unknown"
   compiler_num="0"
   #
-  flags_dbg_all="unknown"
   flags_dbg_yes="unknown"
-  flags_dbg_off="unknown"
   flags_opt_all="unknown"
   flags_opt_yes="unknown"
   flags_opt_off="unknown"
@@ -15896,9 +15817,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="DEC_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g2"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
     flags_opt_yes="-O1"
     flags_opt_off="-O0"
@@ -15958,9 +15877,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="HP_UX_C"
-    flags_dbg_all="-g -s"
     flags_dbg_yes="-g"
-    flags_dbg_off="-s"
     flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
     flags_opt_yes="+O2"
     flags_opt_off="+O0"
@@ -16020,9 +15937,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="IBM_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
     flags_opt_all="$flags_opt_all -qnooptimize"
     flags_opt_all="$flags_opt_all -qoptimize=0"
@@ -16136,24 +16051,13 @@
 
     if test "$curl_cv_have_def___unix__" = "yes"; then
       compiler_id="INTEL_UNIX_C"
-      flags_dbg_all="-g -g0"
       flags_dbg_yes="-g"
-      flags_dbg_off=""
       flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
       flags_opt_yes="-O2"
       flags_opt_off="-O0"
     else
       compiler_id="INTEL_WINDOWS_C"
-      flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
-      flags_dbg_all="$flags_dbg_all /debug"
-      flags_dbg_all="$flags_dbg_all /debug:none"
-      flags_dbg_all="$flags_dbg_all /debug:minimal"
-      flags_dbg_all="$flags_dbg_all /debug:partial"
-      flags_dbg_all="$flags_dbg_all /debug:full"
-      flags_dbg_all="$flags_dbg_all /debug:semantic_stepping"
-      flags_dbg_all="$flags_dbg_all /debug:extended"
       flags_dbg_yes="/Zi /Oy-"
-      flags_dbg_off="/debug:none /Oy-"
       flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
       flags_opt_yes="/O2"
       flags_opt_off="/Od"
@@ -16280,16 +16184,7 @@
     clangvhi=`echo $clangver | cut -d . -f1`
     clangvlo=`echo $clangver | cut -d . -f2`
     compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
-    flags_dbg_all="$flags_dbg_all -ggdb"
-    flags_dbg_all="$flags_dbg_all -gstabs"
-    flags_dbg_all="$flags_dbg_all -gstabs+"
-    flags_dbg_all="$flags_dbg_all -gcoff"
-    flags_dbg_all="$flags_dbg_all -gxcoff"
-    flags_dbg_all="$flags_dbg_all -gdwarf-2"
-    flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
     flags_opt_yes="-Os"
     flags_opt_off="-O0"
@@ -16354,16 +16249,7 @@
     gccvhi=`echo $gccver | cut -d . -f1`
     gccvlo=`echo $gccver | cut -d . -f2`
     compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
-    flags_dbg_all="$flags_dbg_all -ggdb"
-    flags_dbg_all="$flags_dbg_all -gstabs"
-    flags_dbg_all="$flags_dbg_all -gstabs+"
-    flags_dbg_all="$flags_dbg_all -gcoff"
-    flags_dbg_all="$flags_dbg_all -gxcoff"
-    flags_dbg_all="$flags_dbg_all -gdwarf-2"
-    flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -16467,9 +16353,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="LCC"
-    flags_dbg_all="-g"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all=""
     flags_opt_yes=""
     flags_opt_off=""
@@ -16619,9 +16503,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="SGI_MIPSPRO_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -16727,9 +16609,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="SGI_MIPS_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -16789,9 +16669,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="SUNPRO_C"
-    flags_dbg_all="-g -s"
     flags_dbg_yes="-g"
-    flags_dbg_off="-s"
     flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
     flags_opt_yes="-xO2"
     flags_opt_off=""
@@ -16851,9 +16729,7 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
     compiler_id="TINY_C"
-    flags_dbg_all="-g -b"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all=""
     flags_opt_yes=""
     flags_opt_off=""
@@ -16958,17 +16834,13 @@
 
     if test "$curl_cv_have_def___UNIX__" = "yes"; then
       compiler_id="WATCOM_UNIX_C"
-      flags_dbg_all="-g1 -g1+ -g2 -g3"
       flags_dbg_yes="-g2"
-      flags_dbg_off=""
       flags_opt_all="-O0 -O1 -O2 -O3"
       flags_opt_yes="-O2"
       flags_opt_off="-O0"
     else
       compiler_id="WATCOM_WINDOWS_C"
-      flags_dbg_all=""
       flags_dbg_yes=""
-      flags_dbg_off=""
       flags_opt_all=""
       flags_opt_yes=""
       flags_opt_off=""
@@ -17256,49 +17128,12 @@
     tmp_options=""
     tmp_CFLAGS="$CFLAGS"
     tmp_CPPFLAGS="$CPPFLAGS"
-
-    ac_var_stripped=""
-  for word1 in $tmp_CFLAGS; do
-    ac_var_strip_word="no"
-    for word2 in $flags_dbg_all; do
-      if test "$word1" = "$word2"; then
-        ac_var_strip_word="yes"
-      fi
-    done
-    if test "$ac_var_strip_word" = "no"; then
-      ac_var_stripped="$ac_var_stripped $word1"
-    fi
-  done
-    tmp_CFLAGS="$ac_var_stripped"
-  squeeze tmp_CFLAGS
-
-
-    ac_var_stripped=""
-  for word1 in $tmp_CPPFLAGS; do
-    ac_var_strip_word="no"
-    for word2 in $flags_dbg_all; do
-      if test "$word1" = "$word2"; then
-        ac_var_strip_word="yes"
-      fi
-    done
-    if test "$ac_var_strip_word" = "no"; then
-      ac_var_stripped="$ac_var_stripped $word1"
-    fi
-  done
-    tmp_CPPFLAGS="$ac_var_stripped"
-  squeeze tmp_CPPFLAGS
-
     #
     if test "$want_debug" = "yes"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug enabling options" >&5
 $as_echo_n "checking if compiler accepts debug enabling options... " >&6; }
       tmp_options="$flags_dbg_yes"
     fi
-    if test "$want_debug" = "no"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug disabling options" >&5
-$as_echo_n "checking if compiler accepts debug disabling options... " >&6; }
-      tmp_options="$flags_dbg_off"
-    fi
     #
     if test "$flags_prefer_cppflags" = "yes"; then
       CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
@@ -17309,136 +17144,6 @@
     fi
     squeeze CPPFLAGS
     squeeze CFLAGS
-
-    tmp_compiler_works="unknown"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-
-int main (void)
-{
-
-      int i = 1;
-      return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-    tmp_compiler_works="yes"
-
-else
-
-    tmp_compiler_works="no"
-    echo " " >&6
-    sed 's/^/cc-fail: /' conftest.err >&6
-    echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test "$tmp_compiler_works" = "yes"; then
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-
-int main (void)
-{
-
-        int i = 1;
-        return i;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-      tmp_compiler_works="yes"
-
-else
-
-      tmp_compiler_works="no"
-      echo " " >&6
-      sed 's/^/link-fail: /' conftest.err >&6
-      echo " " >&6
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  fi
-    if test "x$cross_compiling" != "xyes" &&
-    test "$tmp_compiler_works" = "yes"; then
-
-   old=$LD_LIBRARY_PATH
-   LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
-   export LD_LIBRARY_PATH
-   if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#       ifdef __STDC__
-#         include <stdlib.h>
-#       endif
-
-int main (void)
-{
-
-        int i = 0;
-        exit(i);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  tmp_compiler_works="yes"
-
-else
-  tmp_compiler_works="no"
-      echo " " >&6
-      echo "run-fail: test program exited with status $ac_status" >&6
-      echo " " >&6
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-   LD_LIBRARY_PATH=$old # restore
-
-  fi
-    if test "$tmp_compiler_works" = "yes"; then
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_options" >&5
-$as_echo "$as_me: compiler options added: $tmp_options" >&6;}
-
-  else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_options" >&5
-$as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
-            CPPFLAGS="$tmp_save_CPPFLAGS"
-      CFLAGS="$tmp_save_CFLAGS"
-
-  fi
-
-    #
   fi
 
 
@@ -18139,6 +17844,26 @@
     tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
   squeeze tmp_CFLAGS
 
+
+    ac_var_added_warnings=""
+  for warning in extra-semi-stmt; do
+
+  ac_var_match_word="no"
+  for word1 in $CFLAGS; do
+    for word2 in -Wno-$warning -W$warning; do
+      if test "$word1" = "$word2"; then
+        ac_var_match_word="yes"
+      fi
+    done
+  done
+
+    if test "$ac_var_match_word" = "no"; then
+      ac_var_added_warnings="$ac_var_added_warnings -W$warning"
+    fi
+  done
+    tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings"
+  squeeze tmp_CFLAGS
+
           fi
         fi
         ;;
@@ -18772,7 +18497,9 @@
 
             tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
             tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
-            tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            if test "$compiler_num" -lt "1200"; then
+                            tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            fi
           fi
           #
         fi
@@ -19738,6 +19465,58 @@
   esac
 
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wincrypt.h" >&5
+$as_echo_n "checking for wincrypt.h... " >&6; }
+if ${curl_cv_header_wincrypt_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#undef inline
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <wincrypt.h>
+
+int main (void)
+{
+
+        int dummy=2*PROV_RSA_FULL;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      curl_cv_header_wincrypt_h="yes"
+
+else
+
+      curl_cv_header_wincrypt_h="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_wincrypt_h" >&5
+$as_echo "$curl_cv_header_wincrypt_h" >&6; }
+  case "$curl_cv_header_wincrypt_h" in
+    yes)
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WINCRYPT_H 1
+_ACEOF
+
+      ;;
+  esac
+
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5
 $as_echo_n "checking for winldap.h... " >&6; }
 if ${curl_cv_header_winldap_h+:} false; then :
@@ -19862,6 +19641,7 @@
     curl_cv_header_winsock_h="no"
     curl_cv_header_winsock2_h="no"
     curl_cv_header_ws2tcpip_h="no"
+    curl_cv_header_wincrypt_h="no"
     curl_cv_header_winldap_h="no"
     curl_cv_header_winber_h="no"
     ;;
@@ -19937,6 +19717,8 @@
 #define USE_WIN32_LARGE_FILES 1
 _ACEOF
 
+      USE_WIN32_LARGE_FILES=1
+
       ;;
     win32_small_files)
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (large file disabled)" >&5
@@ -19946,6 +19728,63 @@
 #define USE_WIN32_SMALL_FILES 1
 _ACEOF
 
+      USE_WIN32_SMALL_FILES=1
+
+      ;;
+    *)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      ;;
+  esac
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 crypto API" >&5
+$as_echo_n "checking whether build target supports WIN32 crypto API... " >&6; }
+  curl_win32_crypto_api="no"
+  if test "$curl_cv_header_wincrypt_h" = "yes"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#undef inline
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <wincrypt.h>
+
+int main (void)
+{
+
+        HCRYPTPROV hCryptProv;
+        if(CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL,
+                               CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
+          CryptReleaseContext(hCryptProv, 0);
+        }
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      curl_win32_crypto_api="yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+  case "$curl_win32_crypto_api" in
+    yes)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define USE_WIN32_CRYPTO 1
+_ACEOF
+
+      USE_WIN32_CRYPTO=1
+
       ;;
     *)
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -19963,27 +19802,12 @@
       ;;
   esac
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good-to-use Mac CFLAGS" >&5
-$as_echo_n "checking for good-to-use Mac CFLAGS... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good-to-use Darwin CFLAGS" >&5
+$as_echo_n "checking for good-to-use Darwin CFLAGS... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_cflags" >&5
 $as_echo "$tst_cflags" >&6; };
 
   if test "$tst_cflags" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for *version-min in CFLAGS" >&5
-$as_echo_n "checking for *version-min in CFLAGS... " >&6; }
-    min=""
-    if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then
-      min="-mmacosx-version-min=10.8"
-      CFLAGS="$CFLAGS $min"
-    fi
-    if test -z "$min"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: set by user" >&5
-$as_echo "set by user" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $min set" >&5
-$as_echo "$min set" >&6; }
-    fi
-
     old_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror=partial-availability"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Werror=partial-availability" >&5
@@ -20011,6 +19835,55 @@
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link macOS CoreFoundation and SystemConfiguration framework" >&5
+$as_echo_n "checking whether to link macOS CoreFoundation and SystemConfiguration framework... " >&6; }
+case $host_os in
+  darwin*)
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <TargetConditionals.h>
+
+int main (void)
+{
+
+#if (TARGET_OS_OSX)
+      return 0;
+#else
+#error Not a macOS
+#endif
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      build_for_macos="yes"
+
+else
+
+      build_for_macos="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test "x$build_for_macos" != xno; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+esac
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if the compiler supports __builtin_available()" >&5
 $as_echo_n "checking to see if the compiler supports __builtin_available()... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20070,6 +19943,17 @@
 
        CURL_DISABLE_RTSP=1
 
+
+$as_echo "#define CURL_DISABLE_ALTSVC 1" >>confdefs.h
+
+
+$as_echo "#define CURL_DISABLE_HSTS 1" >>confdefs.h
+
+       curl_h1_msg="no      (--enable-http, --with-hyper)"
+       curl_altsvc_msg="no";
+       curl_hsts_msg="no      (--enable-hsts)";
+       enable_altsvc="no"
+       enable_hsts="no"
        ;;
   *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -20143,6 +20027,11 @@
        CURL_DISABLE_LDAP=1
 
        ;;
+  yes)
+       ldap_askedfor="yes"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       ;;
   *)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -20211,12 +20100,296 @@
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support rtsp" >&5
+
+OPT_HYPER="no"
+
+
+# Check whether --with-hyper was given.
+if test "${with_hyper+set}" = set; then :
+  withval=$with_hyper; OPT_HYPER=$withval
+fi
+
+case "$OPT_HYPER" in
+  no)
+        want_hyper="no"
+    ;;
+  yes)
+        want_hyper="default"
+    want_hyper_path=""
+    ;;
+  *)
+        want_hyper="yes"
+    want_hyper_path="$withval"
+    ;;
+esac
+
+if test X"$want_hyper" != Xno; then
+  if test "x$disable_http" = "xyes"; then
+    as_fn_error $? "--with-hyper is not compatible with --disable-http" "$LINENO" 5
+  fi
+
+    CLEANLDFLAGS="$LDFLAGS"
+  CLEANCPPFLAGS="$CPPFLAGS"
+  CLEANLIBS="$LIBS"
+
+
+    if test -n "$PKG_CONFIG"; then
+      PKGCONFIG="$PKG_CONFIG"
+    else
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
+
+    fi
+
+    if test "x$PKGCONFIG" != "xno"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hyper options with pkg-config" >&5
+$as_echo_n "checking for hyper options with pkg-config... " >&6; }
+            itexists=`
+    if test -n "$want_hyper_path"; then
+      PKG_CONFIG_LIBDIR="$want_hyper_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists hyper >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+      fi
+    fi
+
+
+  if test "$PKGCONFIG" != "no" ; then
+    LIB_HYPER=`
+    if test -n "$want_hyper_path"; then
+      PKG_CONFIG_LIBDIR="$want_hyper_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+
+      $PKGCONFIG --libs-only-l hyper`
+    CPP_HYPER=`
+    if test -n "$want_hyper_path"; then
+      PKG_CONFIG_LIBDIR="$want_hyper_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+       $PKGCONFIG --cflags-only-I hyper`
+    LD_HYPER=`
+    if test -n "$want_hyper_path"; then
+      PKG_CONFIG_LIBDIR="$want_hyper_path"
+      export PKG_CONFIG_LIBDIR
+    fi
+
+      $PKGCONFIG --libs-only-L hyper`
+  else
+        LIB_HYPER="-lhyper -ldl -lpthread -lm"
+    if test X"$want_hyper" != Xdefault; then
+      CPP_HYPER=-I"$want_hyper_path/capi/include"
+      LD_HYPER="-L$want_hyper_path/target/debug"
+    fi
+  fi
+  if test -n "$LIB_HYPER"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_HYPER" >&5
+$as_echo "$as_me: -l is $LIB_HYPER" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_HYPER" >&5
+$as_echo "$as_me: -I is $CPP_HYPER" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_HYPER" >&5
+$as_echo "$as_me: -L is $LD_HYPER" >&6;}
+
+    LDFLAGS="$LDFLAGS $LD_HYPER"
+    CPPFLAGS="$CPPFLAGS $CPP_HYPER"
+    LIBS="$LIB_HYPER $LIBS"
+
+    if test "x$cross_compiling" != "xyes"; then
+      DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//'`
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hyper_io_new in -lhyper" >&5
+$as_echo_n "checking for hyper_io_new in -lhyper... " >&6; }
+if ${ac_cv_lib_hyper_hyper_io_new+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lhyper  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char hyper_io_new ();
+int main (void)
+{
+return hyper_io_new ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_hyper_hyper_io_new=yes
+else
+  ac_cv_lib_hyper_hyper_io_new=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hyper_hyper_io_new" >&5
+$as_echo "$ac_cv_lib_hyper_hyper_io_new" >&6; }
+if test "x$ac_cv_lib_hyper_hyper_io_new" = xyes; then :
+
+       for ac_header in hyper.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "hyper.h" "ac_cv_header_hyper_h" "$ac_includes_default"
+if test "x$ac_cv_header_hyper_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_HYPER_H 1
+_ACEOF
+ experimental="$experimental Hyper"
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Hyper support is experimental" >&5
+$as_echo "$as_me: Hyper support is experimental" >&6;}
+          curl_h1_msg="enabled (Hyper)"
+          curl_h2_msg=$curl_h1_msg
+          HYPER_ENABLED=1
+
+$as_echo "#define USE_HYPER 1" >>confdefs.h
+
+          USE_HYPER=1
+
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
+          export CURL_LIBRARY_PATH
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_HYPER to CURL_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $DIR_HYPER to CURL_LIBRARY_PATH" >&6;}
+fi
+
+done
+
+
+else
+  as_fn_error $? "--with-hyper but hyper was not found. See docs/HYPER.md." "$LINENO" 5
+
+fi
+
+  fi
+fi
+
+if test X"$want_hyper" != Xno; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Disable RTSP support with hyper" >&5
+$as_echo "$as_me: Disable RTSP support with hyper" >&6;}
+
+$as_echo "#define CURL_DISABLE_RTSP 1" >>confdefs.h
+
+  CURL_DISABLE_RTSP=1
+
+
+else
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support rtsp" >&5
 $as_echo_n "checking whether to support rtsp... " >&6; }
-# Check whether --enable-rtsp was given.
+  # Check whether --enable-rtsp was given.
 if test "${enable_rtsp+set}" = set; then :
   enableval=$enable_rtsp;  case "$enableval" in
-  no)
+    no)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
@@ -20225,15 +20398,16 @@
        CURL_DISABLE_RTSP=1
 
        ;;
-  *)   if test x$CURL_DISABLE_HTTP = x1 ; then
-          as_fn_error $? "HTTP support needs to be enabled in order to enable RTSP support!" "$LINENO" 5
+    *)
+       if test x$CURL_DISABLE_HTTP = x1 ; then
+         as_fn_error $? "HTTP support needs to be enabled in order to enable RTSP support!" "$LINENO" 5
        else
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-          curl_rtsp_msg="enabled"
+         curl_rtsp_msg="enabled"
        fi
        ;;
-  esac
+    esac
 else
   if test "x$CURL_DISABLE_HTTP" != "x1"; then
           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -20246,6 +20420,7 @@
 
 fi
 
+fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support proxies" >&5
 $as_echo_n "checking whether to support proxies... " >&6; }
@@ -20916,7 +21091,7 @@
     conftest$ac_exeext conftest.$ac_ext
 fi
 
-if test "$HAVE_GETHOSTBYNAME" != "1"
+if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
 then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for AmigaOS bsdsocket.library" >&5
 $as_echo_n "checking for gethostbyname for AmigaOS bsdsocket.library... " >&6; }
@@ -20924,8 +21099,8 @@
 /* end confdefs.h.  */
 
 
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
+  #include <proto/bsdsocket.h>
+  struct Library *SocketBase = NULL;
 
 int main (void)
 {
@@ -21317,42 +21492,8 @@
 
 CURL_NETWORK_LIBS=$LIBS
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
 
-int main (void)
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
-else
-  ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
-
-    for ac_header in sys/types.h sys/time.h time.h
+  for ac_header in sys/types.h sys/time.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -21378,14 +21519,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 
 int main (void)
 {
@@ -21440,14 +21575,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 
 int main (void)
 {
@@ -21523,14 +21652,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 
 int main (void)
 {
@@ -22798,6 +22921,9 @@
 
 else
 
+      if test -n "$ldap_askedfor"; then
+        as_fn_error $? "couldn't detect the LDAP libraries" "$LINENO" 5
+      fi
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&5
 $as_echo "$as_me: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&2;}
 
@@ -22916,6 +23042,9 @@
 
     case X-"$curl_cv_ldap_LIBS" in
       X-unknown)
+        if test -n "$ldap_askedfor"; then
+          as_fn_error $? "couldn't detect the LDAP libraries" "$LINENO" 5
+        fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&5
 $as_echo "$as_me: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&2;}
 
@@ -23059,7 +23188,8 @@
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- /* are AF_INET6 and sockaddr_in6 available? */
+
+/* are AF_INET6 and sockaddr_in6 available? */
 #include <sys/types.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
@@ -23082,6 +23212,7 @@
    exit(0);
 }
 
+
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -23122,27 +23253,32 @@
 # include <netinet/in6.h>
 #endif
 #endif
+
 int main (void)
 {
-struct sockaddr_in6 s; s.sin6_scope_id = 0;
+
+  struct sockaddr_in6 s;
+  s.sin6_scope_id = 0;
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  have_sin6_scope_id=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  if test "$have_sin6_scope_id" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1" >>confdefs.h
 
-  else
+
+else
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-  fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 
@@ -23466,25 +23602,9 @@
 esac
 
 
-
-OPT_SCHANNEL=no
-
-# Check whether --with-winssl was given.
-if test "${with_winssl+set}" = set; then :
-  withval=$with_winssl; OPT_SCHANNEL=$withval
-fi
-
-
-
-# Check whether --with-schannel was given.
-if test "${with_schannel+set}" = set; then :
-  withval=$with_schannel; OPT_SCHANNEL=$withval
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS (Windows native builds only)" >&5
-$as_echo_n "checking whether to enable Windows native SSL/TLS (Windows native builds only)... " >&6; }
-if test -z "$ssl_backends" -o "x$OPT_SCHANNEL" != xno; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS" >&5
+$as_echo_n "checking whether to enable Windows native SSL/TLS... " >&6; }
+if test "x$OPT_SCHANNEL" != xno; then
   ssl_msg=
   if test "x$OPT_SCHANNEL" != "xno"  &&
      test "x$curl_cv_native_windows" = "xyes"; then
@@ -23495,7 +23615,7 @@
 
     USE_SCHANNEL=1
 
-    ssl_msg="Windows-native"
+    ssl_msg="Schannel"
     test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
     SCHANNEL_ENABLED=1
     # --with-schannel implies --enable-sspi
@@ -23505,7 +23625,6 @@
     USE_WINDOWS_SSPI=1
 
     curl_sspi_msg="enabled"
-    LIBS="-lcrypt32 $LIBS"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -23516,24 +23635,10 @@
 $as_echo "no" >&6; }
 fi
 
-OPT_SECURETRANSPORT=no
-
-# Check whether --with-darwinssl was given.
-if test "${with_darwinssl+set}" = set; then :
-  withval=$with_darwinssl; OPT_SECURETRANSPORT=$withval
-fi
-
-
-
-# Check whether --with-secure-transport was given.
-if test "${with_secure_transport+set}" = set; then :
-  withval=$with_secure_transport; OPT_SECURETRANSPORT=$withval
-fi
-
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Secure Transport" >&5
 $as_echo_n "checking whether to enable Secure Transport... " >&6; }
-if test -z "$ssl_backends" -o "x$OPT_SECURETRANSPORT" != xno; then
+if test "x$OPT_SECURETRANSPORT" != xno; then
   if test "x$OPT_SECURETRANSPORT" != "xno" &&
      (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -23557,18 +23662,12 @@
 $as_echo "no" >&6; }
 fi
 
-OPT_AMISSL=no
-
-# Check whether --with-amissl was given.
-if test "${with_amissl+set}" = set; then :
-  withval=$with_amissl; OPT_AMISSL=$withval
-fi
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Amiga native SSL/TLS (AmiSSL)" >&5
 $as_echo_n "checking whether to enable Amiga native SSL/TLS (AmiSSL)... " >&6; }
 if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
-  if test -z "$ssl_backends" -o "x$OPT_AMISSL" != xno; then
+  if test "x$OPT_AMISSL" != xno; then
     ssl_msg=
     if test "x$OPT_AMISSL" != "xno"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -23598,17 +23697,8 @@
 fi
 
 
-OPT_SSL=off
-ca="no"
 
-# Check whether --with-ssl was given.
-if test "${with_ssl+set}" = set; then :
-  withval=$with_ssl; OPT_SSL=$withval
-fi
-
-
-if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
-   test X"$OPT_SSL" != Xno; then
+if test "x$OPT_OPENSSL" != xno; then
   ssl_msg=
 
     CLEANLDFLAGS="$LDFLAGS"
@@ -23623,21 +23713,25 @@
       LIBS="-lgdi32 $LIBS"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <windef.h>
-                   #include <wingdi.h>
+
+        #include <windef.h>
+        #include <wingdi.h>
+
 int main (void)
 {
-GdiFlush();
+
+          GdiFlush();
+
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-                      LIBS=$my_ac_save_LIBS
-                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+           LIBS=$my_ac_save_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 fi
@@ -23646,31 +23740,22 @@
       ;;
   esac
 
-  case "$OPT_SSL" in
+  case "$OPT_OPENSSL" in
   yes)
-        if test x$cross_compiling != xyes; then
-            PKGTEST="yes"
-    fi
-    PREFIX_OPENSSL=/usr/local/ssl
-    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
-    ;;
-  off)
-        if test x$cross_compiling != xyes; then
-            PKGTEST="yes"
-    fi
+        PKGTEST="yes"
     PREFIX_OPENSSL=
     ;;
   *)
         PKGTEST="no"
-    PREFIX_OPENSSL=$OPT_SSL
+    PREFIX_OPENSSL=$OPT_OPENSSL
 
-                OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
+                OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
     if test -f "$OPENSSL_PCDIR/openssl.pc"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
 $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
       PKGTEST="yes"
     elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
-      as_fn_error $? "$PREFIX_OPENSSL is a bad --with-ssl prefix!" "$LINENO" 5
+      as_fn_error $? "$PREFIX_OPENSSL is a bad --with-openssl prefix!" "$LINENO" 5
     fi
 
             LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
@@ -23890,13 +23975,16 @@
 
 else
 
-     LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-     if test "$PKGCONFIG" = "no" ; then
+     if test -n "$LIB_OPENSSL" ; then
+       LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
+     fi
+     if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
        # only set this if pkg-config wasn't used
        CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
      fi
-     # Linking previously failed, try extra paths from --with-ssl or pkg-config.
-     # Use a different function name to avoid reusing the earlier cached result.
+     # Linking previously failed, try extra paths from --with-openssl or
+     # pkg-config.  Use a different function name to avoid reusing the earlier
+     # cached result.
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
 $as_echo_n "checking for HMAC_Init_ex in -lcrypto... " >&6; }
 if ${ac_cv_lib_crypto_HMAC_Init_ex+:} false; then :
@@ -23971,6 +24059,7 @@
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
            #include <openssl/err.h>
 
 int main (void)
@@ -24164,7 +24253,7 @@
        LIBS="$CLEANLIBS"
     fi
 
-    if test X"$OPT_SSL" != Xoff &&
+    if test X"$OPT_OPENSSL" != Xoff &&
        test "$OPENSSL_ENABLED" != "1"; then
       as_fn_error $? "OpenSSL libs and/or directories were not found where specified!" "$LINENO" 5
     fi
@@ -24980,14 +25069,13 @@
   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 fi
 
-if test X"$OPT_SSL" != Xoff &&
-  test X"$OPT_SSL" != Xno &&
+if test X"$OPT_OPENSSL" != Xno &&
   test "$OPENSSL_ENABLED" != "1"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: OPT_SSL: $OPT_SSL" >&5
-$as_echo "$as_me: OPT_SSL: $OPT_SSL" >&6;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: OPT_OPENSSL: $OPT_OPENSSL" >&5
+$as_echo "$as_me: OPT_OPENSSL: $OPT_OPENSSL" >&6;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: OPENSSL_ENABLED: $OPENSSL_ENABLED" >&5
 $as_echo "$as_me: OPENSSL_ENABLED: $OPENSSL_ENABLED" >&6;}
-  as_fn_error $? "--with-ssl was given but OpenSSL could not be detected" "$LINENO" 5
+  as_fn_error $? "--with-openssl was given but OpenSSL could not be detected" "$LINENO" 5
 fi
 
 
@@ -25115,16 +25203,8 @@
 fi
 
 
-OPT_GNUTLS=no
 
-
-# Check whether --with-gnutls was given.
-if test "${with_gnutls+set}" = set; then :
-  withval=$with_gnutls; OPT_GNUTLS=$withval
-fi
-
-
-if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then
+if test "x$OPT_GNUTLS" != xno; then
   ssl_msg=
 
   if test X"$OPT_GNUTLS" != Xno; then
@@ -25425,45 +25505,7 @@
    USE_GNUTLS_NETTLE=1
 fi
 
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgnutls" >&5
-$as_echo_n "checking for gcry_control in -lgnutls... " >&6; }
-if ${ac_cv_lib_gnutls_gcry_control+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgnutls  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gcry_control ();
-int main (void)
-{
-return gcry_control ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gnutls_gcry_control=yes
-else
-  ac_cv_lib_gnutls_gcry_control=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gcry_control" >&5
-$as_echo "$ac_cv_lib_gnutls_gcry_control" >&6; }
-if test "x$ac_cv_lib_gnutls_gcry_control" = xyes; then :
-   USE_GNUTLS_NETTLE=0
-fi
-
-  fi
   # If not, try linking directly to both of them to see if they are available
   if test "$USE_GNUTLS_NETTLE" = ""; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lnettle" >&5
@@ -25505,57 +25547,9 @@
 
   fi
   if test "$USE_GNUTLS_NETTLE" = ""; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5
-$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
-if ${ac_cv_lib_gcrypt_gcry_control+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgcrypt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#ifdef __cplusplus
-extern "C"
-#endif
-char gcry_control ();
-int main (void)
-{
-return gcry_control ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gcrypt_gcry_control=yes
-else
-  ac_cv_lib_gcrypt_gcry_control=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_control" >&5
-$as_echo "$ac_cv_lib_gcrypt_gcry_control" >&6; }
-if test "x$ac_cv_lib_gcrypt_gcry_control" = xyes; then :
-   USE_GNUTLS_NETTLE=0
-fi
-
+    as_fn_error $? "GnuTLS found, but nettle was not found" "$LINENO" 5
   fi
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    as_fn_error $? "GnuTLS found, but neither gcrypt nor nettle found" "$LINENO" 5
-  fi
-  if test "$USE_GNUTLS_NETTLE" = "1"; then
-
-$as_echo "#define USE_GNUTLS_NETTLE 1" >>confdefs.h
-
-    USE_GNUTLS_NETTLE=1
-
-    LIBS="-lnettle $LIBS"
-  else
-    LIBS="-lgcrypt $LIBS"
-  fi
+  LIBS="-lnettle $LIBS"
 fi
 
 if test "$GNUTLS_ENABLED" = "1"; then
@@ -25605,18 +25599,11 @@
 fi
 
 
-OPT_MBEDTLS=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-# Check whether --with-mbedtls was given.
-if test "${with_mbedtls+set}" = set; then :
-  withval=$with_mbedtls; OPT_MBEDTLS=$withval
-fi
 
 
-if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then
+if test "x$OPT_MBEDTLS" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
   ssl_msg=
 
   if test X"$OPT_MBEDTLS" != Xno; then
@@ -25767,16 +25754,6 @@
 fi
 
 
-OPT_WOLFSSL=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-
-# Check whether --with-wolfssl was given.
-if test "${with_wolfssl+set}" = set; then :
-  withval=$with_wolfssl; OPT_WOLFSSL=$withval
-fi
 
 
 case "$OPT_WOLFSSL" in
@@ -25788,7 +25765,10 @@
     ;;
 esac
 
-if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
+if test "x$OPT_WOLFSSL" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+
   ssl_msg=
 
   if test X"$OPT_WOLFSSL" != Xno; then
@@ -26081,8 +26061,7 @@
 
       LIBS="$addlib -lm $LIBS"
 
-                              for ac_func in wolfSSLv3_client_method \
-                     wolfSSL_get_peer_certificate \
+                        for ac_func in wolfSSL_get_peer_certificate \
                      wolfSSL_UseALPN
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -26110,9 +26089,9 @@
                 break
               done
             else
-                                          CPPFLAGS="-I$includedir/wolfssl $CPPFLAGS"
-              { $as_echo "$as_me:${as_lineno-$LINENO}: Add $includedir/wolfssl to CPPFLAGS" >&5
-$as_echo "$as_me: Add $includedir/wolfssl to CPPFLAGS" >&6;}
+                                          CPPFLAGS="-I/usr/include/wolfssl $CPPFLAGS"
+              { $as_echo "$as_me:${as_lineno-$LINENO}: Add /usr/include/wolfssl to CPPFLAGS" >&5
+$as_echo "$as_me: Add /usr/include/wolfssl to CPPFLAGS" >&6;}
             fi
             WOLFSSL_NTLM=1
 
@@ -26136,18 +26115,11 @@
 fi
 
 
-OPT_MESALINK=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-# Check whether --with-mesalink was given.
-if test "${with_mesalink+set}" = set; then :
-  withval=$with_mesalink; OPT_MESALINK=$withval
-fi
 
 
-if test -z "$ssl_backends" -o "x$OPT_MESALINK" != xno; then
+if test "x$OPT_MESALINK" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
   ssl_msg=
 
   if test X"$OPT_MESALINK" != Xno; then
@@ -26297,18 +26269,10 @@
 fi
 
 
-OPT_BEARSSL=no
 
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-# Check whether --with-bearssl was given.
-if test "${with_bearssl+set}" = set; then :
-  withval=$with_bearssl; OPT_BEARSSL=$withval
-fi
-
-
-if test -z "$ssl_backends" -o "x$OPT_BEARSSL" != xno; then
+if test "x$OPT_BEARSSL" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
   ssl_msg=
 
   if test X"$OPT_BEARSSL" != Xno; then
@@ -26459,16 +26423,158 @@
 fi
 
 
-OPT_NSS=no
+
+if test "x$OPT_RUSTLS" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+  ssl_msg=
+
+  if test X"$OPT_RUSTLS" != Xno; then
+
+    if test "$OPT_RUSTLS" = "yes"; then
+      OPT_RUSTLS=""
+    fi
+
+    if test -z "$OPT_RUSTLS" ; then
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rustls_client_session_read in -lcrustls" >&5
+$as_echo_n "checking for rustls_client_session_read in -lcrustls... " >&6; }
+if ${ac_cv_lib_crustls_rustls_client_session_read+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrustls -lpthread -ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-# Check whether --with-nss was given.
-if test "${with_nss+set}" = set; then :
-  withval=$with_nss; OPT_NSS=$withval
+#ifdef __cplusplus
+extern "C"
+#endif
+char rustls_client_session_read ();
+int main (void)
+{
+return rustls_client_session_read ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crustls_rustls_client_session_read=yes
+else
+  ac_cv_lib_crustls_rustls_client_session_read=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crustls_rustls_client_session_read" >&5
+$as_echo "$ac_cv_lib_crustls_rustls_client_session_read" >&6; }
+if test "x$ac_cv_lib_crustls_rustls_client_session_read" = xyes; then :
+
+
+$as_echo "#define USE_RUSTLS 1" >>confdefs.h
+
+         USE_RUSTLS=1
+
+         RUSTLS_ENABLED=1
+         USE_RUSTLS="yes"
+         ssl_msg="rustls"
+	 test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+
+fi
+
+    fi
+
+    addld=""
+    addlib="-lpthread"
+    addcflags=""
+    bearssllib=""
+
+    if test "x$USE_RUSTLS" != "xyes"; then
+            addld=-L$OPT_RUSTLS/lib$libsuff
+      addcflags=-I$OPT_RUSTLS/include
+      rustlslib=$OPT_RUSTLS/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rustls_connection_read in -lcrustls" >&5
+$as_echo_n "checking for rustls_connection_read in -lcrustls... " >&6; }
+if ${ac_cv_lib_crustls_rustls_connection_read+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrustls -lpthread -ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char rustls_connection_read ();
+int main (void)
+{
+return rustls_connection_read ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crustls_rustls_connection_read=yes
+else
+  ac_cv_lib_crustls_rustls_connection_read=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crustls_rustls_connection_read" >&5
+$as_echo "$ac_cv_lib_crustls_rustls_connection_read" >&6; }
+if test "x$ac_cv_lib_crustls_rustls_connection_read" = xyes; then :
+
+
+$as_echo "#define USE_RUSTLS 1" >>confdefs.h
+
+       USE_RUSTLS=1
+
+       RUSTLS_ENABLED=1
+       USE_RUSTLS="yes"
+       ssl_msg="rustls"
+       test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+
+else
+  as_fn_error $? "--with-rustls was specified but could not find rustls." "$LINENO" 5
+fi
+
+    fi
+
+    if test "x$USE_RUSTLS" = "xyes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: detected rustls" >&5
+$as_echo "$as_me: detected rustls" >&6;}
+      check_for_ca_bundle=1
+
+      LIBS="-lcrustls -lpthread -ldl $LIBS"
+
+      if test -n "$rustlslib"; then
+                                        if test "x$cross_compiling" != "xyes"; then
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$rustlslib"
+          export CURL_LIBRARY_PATH
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $rustlslib to CURL_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $rustlslib to CURL_LIBRARY_PATH" >&6;}
+        fi
+      fi
+    fi
+
+  fi
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 fi
 
 
-if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then
+if test "x$OPT_NSS" != xno; then
   ssl_msg=
 
   if test X"$OPT_NSS" != Xno; then
@@ -26895,12 +27001,19 @@
   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 fi
 
-case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED" in
+
+
+if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
+  LIBS="-ladvapi32 -lcrypt32 $LIBS"
+fi
+
+case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED$RUSTLS_ENABLED"
+in
 x)
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5
 $as_echo "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this." >&5
-$as_echo "$as_me: WARNING: Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this." >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this." >&5
+$as_echo "$as_me: WARNING: Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this." >&2;}
   ;;
 x1)
   # one SSL backend is enabled
@@ -27191,385 +27304,96 @@
 
 
 
-OPT_LIBMETALINK=no
+
+
+# Check whether --with-libgsasl was given.
+if test "${with_libgsasl+set}" = set; then :
+  withval=$with_libgsasl; with_libgsasl=$withval
+else
+  with_libgsasl=yes
+fi
+
+if test $with_libgsasl != "no"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gsasl_init" >&5
+$as_echo_n "checking for library containing gsasl_init... " >&6; }
+if ${ac_cv_search_gsasl_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char gsasl_init ();
+int main (void)
+{
+return gsasl_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' gsasl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_gsasl_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_gsasl_init+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_gsasl_init+:} false; then :
+
+else
+  ac_cv_search_gsasl_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gsasl_init" >&5
+$as_echo "$ac_cv_search_gsasl_init" >&6; }
+ac_res=$ac_cv_search_gsasl_init
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  curl_gsasl_msg="enabled";
+
+$as_echo "#define USE_GSASL 1" >>confdefs.h
+
+
+else
+  curl_gsasl_msg="no      (libgsasl not found)";
+     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libgsasl was not found" >&5
+$as_echo "$as_me: WARNING: libgsasl was not found" >&2;}
+
+
+fi
+
+fi
+ if test "$curl_gsasl_msg" = "enabled"; then
+  USE_GSASL_TRUE=
+  USE_GSASL_FALSE='#'
+else
+  USE_GSASL_TRUE='#'
+  USE_GSASL_FALSE=
+fi
+
 
 
 # Check whether --with-libmetalink was given.
 if test "${with_libmetalink+set}" = set; then :
-  withval=$with_libmetalink; OPT_LIBMETALINK=$withval
+  withval=$with_libmetalink; as_fn_error $? "--with-libmetalink no longer works!" "$LINENO" 5
 fi
 
 
-if test X"$OPT_LIBMETALINK" != Xno; then
-
-  addld=""
-  addlib=""
-  addcflags=""
-  version=""
-  libmetalinklib=""
-
-  PKGTEST="no"
-  if test "x$OPT_LIBMETALINK" = "xyes"; then
-        PKGTEST="yes"
-
-    if test -n "$PKG_CONFIG"; then
-      PKGCONFIG="$PKG_CONFIG"
-    else
-      if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKGCONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKGCONFIG"; then
-  ac_pt_PKGCONFIG=$PKGCONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
-if test -n "$ac_pt_PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
-$as_echo "$ac_pt_PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKGCONFIG" = x; then
-    PKGCONFIG="no"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKGCONFIG=$ac_pt_PKGCONFIG
-  fi
-else
-  PKGCONFIG="$ac_cv_path_PKGCONFIG"
-fi
-
-    fi
-
-    if test "x$PKGCONFIG" != "xno"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmetalink options with pkg-config" >&5
-$as_echo_n "checking for libmetalink options with pkg-config... " >&6; }
-            itexists=`
-    if test -n ""; then
-      PKG_CONFIG_LIBDIR=""
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --exists libmetalink >/dev/null 2>&1 && echo 1`
-
-      if test -z "$itexists"; then
-                        PKGCONFIG="no"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
-      fi
-    fi
-
-  else
-        LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$LIBMETALINK_PCDIR\"" >&5
-$as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$LIBMETALINK_PCDIR\"" >&6;}
-    if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
-      PKGTEST="yes"
-    fi
-    if test "$PKGTEST" = "yes"; then
-
-    if test -n "$PKG_CONFIG"; then
-      PKGCONFIG="$PKG_CONFIG"
-    else
-      if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKGCONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKGCONFIG"; then
-  ac_pt_PKGCONFIG=$PKGCONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
-if test -n "$ac_pt_PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
-$as_echo "$ac_pt_PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKGCONFIG" = x; then
-    PKGCONFIG="no"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKGCONFIG=$ac_pt_PKGCONFIG
-  fi
-else
-  PKGCONFIG="$ac_cv_path_PKGCONFIG"
-fi
-
-    fi
-
-    if test "x$PKGCONFIG" != "xno"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmetalink options with pkg-config" >&5
-$as_echo_n "checking for libmetalink options with pkg-config... " >&6; }
-            itexists=`
-    if test -n "$LIBMETALINK_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-         $PKGCONFIG --exists libmetalink >/dev/null 2>&1 && echo 1`
-
-      if test -z "$itexists"; then
-                        PKGCONFIG="no"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
-      fi
-    fi
-
-    fi
-  fi
-  if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
-    addlib=`
-    if test -n "$LIBMETALINK_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-       $PKGCONFIG --libs-only-l libmetalink`
-    addld=`
-    if test -n "$LIBMETALINK_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-       $PKGCONFIG --libs-only-L libmetalink`
-    addcflags=`
-    if test -n "$LIBMETALINK_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-       $PKGCONFIG --cflags-only-I libmetalink`
-    version=`
-    if test -n "$LIBMETALINK_PCDIR"; then
-      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
-      export PKG_CONFIG_LIBDIR
-    fi
-       $PKGCONFIG --modversion libmetalink`
-    libmetalinklib=`echo $addld | $SED -e 's/^-L//'`
-  fi
-  if test -n "$addlib"; then
-
-    clean_CPPFLAGS="$CPPFLAGS"
-    clean_LDFLAGS="$LDFLAGS"
-    clean_LIBS="$LIBS"
-    CPPFLAGS="$clean_CPPFLAGS $addcflags"
-    LDFLAGS="$clean_LDFLAGS $addld"
-    LIBS="$addlib $clean_LIBS"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmetalink is recent enough" >&5
-$as_echo_n "checking if libmetalink is recent enough... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#       include <metalink/metalink.h>
-
-int main (void)
-{
-
-        if(0 != metalink_strerror(0)) /* added in 0.1.0 */
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($version)" >&5
-$as_echo "yes ($version)" >&6; }
-      want_metalink="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no ($version)" >&5
-$as_echo "no ($version)" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: libmetalink library defective or too old" >&5
-$as_echo "$as_me: libmetalink library defective or too old" >&6;}
-      want_metalink="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "x$OPENSSL_ENABLED" != "x1" -a "x$USE_WINDOWS_SSPI" != "x1" \
-        -a "x$GNUTLS_ENABLED" != "x1" -a "x$NSS_ENABLED" != "x1" \
-        -a "x$SECURETRANSPORT_ENABLED" != "x1"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: metalink support requires a compatible SSL/TLS backend" >&5
-$as_echo "$as_me: WARNING: metalink support requires a compatible SSL/TLS backend" >&2;}
-      want_metalink="no"
-    fi
-    CPPFLAGS="$clean_CPPFLAGS"
-    LDFLAGS="$clean_LDFLAGS"
-    LIBS="$clean_LIBS"
-    if test "$want_metalink" = "yes"; then
-
-$as_echo "#define USE_METALINK 1" >>confdefs.h
-
-      LIBMETALINK_LIBS=$addlib
-      LIBMETALINK_LDFLAGS=$addld
-      LIBMETALINK_CPPFLAGS=$addcflags
-
-
-
-      curl_mtlnk_msg="enabled"
-    fi
-
-  fi
-fi
-
 
 OPT_LIBSSH2=off
 
@@ -27763,9 +27587,9 @@
   CPPFLAGS="$CPPFLAGS $CPP_SSH2"
   LIBS="$LIB_SSH2 $LIBS"
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_channel_open_ex in -lssh2" >&5
-$as_echo_n "checking for libssh2_channel_open_ex in -lssh2... " >&6; }
-if ${ac_cv_lib_ssh2_libssh2_channel_open_ex+:} false; then :
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_session_block_directions in -lssh2" >&5
+$as_echo_n "checking for libssh2_session_block_directions in -lssh2... " >&6; }
+if ${ac_cv_lib_ssh2_libssh2_session_block_directions+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27777,26 +27601,26 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char libssh2_channel_open_ex ();
+char libssh2_session_block_directions ();
 int main (void)
 {
-return libssh2_channel_open_ex ();
+return libssh2_session_block_directions ();
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ssh2_libssh2_channel_open_ex=yes
+  ac_cv_lib_ssh2_libssh2_session_block_directions=yes
 else
-  ac_cv_lib_ssh2_libssh2_channel_open_ex=no
+  ac_cv_lib_ssh2_libssh2_session_block_directions=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_channel_open_ex" >&5
-$as_echo "$ac_cv_lib_ssh2_libssh2_channel_open_ex" >&6; }
-if test "x$ac_cv_lib_ssh2_libssh2_channel_open_ex" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_session_block_directions" >&5
+$as_echo "$ac_cv_lib_ssh2_libssh2_session_block_directions" >&6; }
+if test "x$ac_cv_lib_ssh2_libssh2_session_block_directions" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSSH2 1
 _ACEOF
@@ -29046,7 +28870,6 @@
     ;;
 esac
 
-curl_h2_msg="no      (--with-nghttp2)"
 if test X"$want_h2" != Xno; then
     CLEANLDFLAGS="$LDFLAGS"
   CLEANCPPFLAGS="$CPPFLAGS"
@@ -29212,16 +29035,18 @@
     LDFLAGS="$LDFLAGS $LD_H2"
     CPPFLAGS="$CPPFLAGS $CPP_H2"
     LIBS="$LIB_H2 $LIBS"
+    LIB_H2_NAME=${LIB_H2#"-l"}
 
     # use nghttp2_session_set_local_window_size to require nghttp2
     # >= 1.12.0
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nghttp2_session_set_local_window_size in -lnghttp2" >&5
-$as_echo_n "checking for nghttp2_session_set_local_window_size in -lnghttp2... " >&6; }
-if ${ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size+:} false; then :
+    as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_H2_NAME''_nghttp2_session_set_local_window_size" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nghttp2_session_set_local_window_size in -l$LIB_H2_NAME" >&5
+$as_echo_n "checking for nghttp2_session_set_local_window_size in -l$LIB_H2_NAME... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnghttp2  $LIBS"
+LIBS="-l$LIB_H2_NAME  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -29238,17 +29063,18 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=yes
+  eval "$as_ac_Lib=yes"
 else
-  ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=no
+  eval "$as_ac_Lib=no"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&5
-$as_echo "$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&6; }
-if test "x$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
 
        for ac_header in nghttp2/nghttp2.h
 do :
@@ -29288,7 +29114,6 @@
 
 
 OPT_TCP2="yes"
-curl_h3_msg="no      (--with-ngtcp2, --with-quiche)"
 
 if test "x$disable_http" = "xyes"; then
   # without HTTP, ngtcp2 is no use
@@ -30318,7 +30143,7 @@
 fi
 
 
-OPT_QUICHE="yes"
+OPT_QUICHE="no"
 
 if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
   # without HTTP or with ngtcp2, quiche is no use
@@ -30551,7 +30376,12 @@
 
        for ac_header in quiche.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "quiche.h" "ac_cv_header_quiche_h" "$ac_includes_default"
+  ac_fn_c_check_header_compile "$LINENO" "quiche.h" "ac_cv_header_quiche_h" "
+$ac_includes_default
+#include <sys/socket.h>
+
+
+"
 if test "x$ac_cv_header_quiche_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_QUICHE_H 1
@@ -30587,9 +30417,7 @@
 
 
 else
-          LDFLAGS=$CLEANLDFLAGS
-        CPPFLAGS=$CLEANCPPFLAGS
-        LIBS=$CLEANLIBS
+          as_fn_error $? "couldn't use quiche" "$LINENO" 5
 
 fi
 
@@ -30773,119 +30601,6 @@
 esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int main (void)
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5
 $as_echo_n "checking for malloc.h... " >&6; }
 if ${curl_cv_header_malloc_h+:} false; then :
@@ -31084,10 +30799,8 @@
         sys/param.h \
         termios.h \
         termio.h \
-        sgtty.h \
         fcntl.h \
         alloca.h \
-        time.h \
         io.h \
         pwd.h \
         utime.h \
@@ -31343,42 +31056,9 @@
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int main (void)
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
-else
-  ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
 
 
-        for ac_header in sys/types.h sys/time.h time.h sys/socket.h
+      for ac_header in sys/types.h sys/time.h sys/socket.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -31420,14 +31100,8 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -32261,39 +31935,6 @@
   esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int main (void)
-{
-return *(signal (0, 0)) (0) == 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_signal=int
-else
-  ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
 
     for ac_header in sys/select.h sys/socket.h
 do :
@@ -32334,20 +31975,9 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 #ifndef HAVE_WINDOWS_H
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-#endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #elif defined(HAVE_UNISTD_H)
@@ -32356,6 +31986,11 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#endif
 #endif
 
 int main (void)
@@ -32421,20 +32056,9 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
+#endif
 #include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
 #ifndef HAVE_WINDOWS_H
-#ifdef HAVE_PROTO_BSDSOCKET_H
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
-#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-#endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #elif defined(HAVE_UNISTD_H)
@@ -32443,6 +32067,11 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#endif
 #define SELECTCALLCONV
 #endif
 #ifndef HAVE_STRUCT_TIMEVAL
@@ -34558,185 +34187,6 @@
   fi
 
 
-curl_includes_ifaddrs="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-#  include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#  include <netinet/in.h>
-#endif
-#ifdef HAVE_IFADDRS_H
-#  include <ifaddrs.h>
-#endif
-/* includes end */"
-  for ac_header in sys/types.h sys/socket.h netinet/in.h ifaddrs.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_ifaddrs
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-    #
-  tst_links_freeifaddrs="unknown"
-  tst_proto_freeifaddrs="unknown"
-  tst_compi_freeifaddrs="unknown"
-  tst_allow_freeifaddrs="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs can be linked" >&5
-$as_echo_n "checking if freeifaddrs can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define freeifaddrs innocuous_freeifaddrs
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef freeifaddrs
-#ifdef __cplusplus
-extern "C"
-#endif
-char freeifaddrs ();
-#if defined __stub_freeifaddrs || defined __stub___freeifaddrs
-choke me
-#endif
-
-int main (void)
-{
-return freeifaddrs ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_freeifaddrs="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_freeifaddrs="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_freeifaddrs" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs is prototyped" >&5
-$as_echo_n "checking if freeifaddrs is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_ifaddrs
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "freeifaddrs" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_freeifaddrs="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_freeifaddrs="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_freeifaddrs" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs is compilable" >&5
-$as_echo_n "checking if freeifaddrs is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_ifaddrs
-
-int main (void)
-{
-
-        freeifaddrs(0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_compi_freeifaddrs="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_compi_freeifaddrs="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_freeifaddrs" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs usage allowed" >&5
-$as_echo_n "checking if freeifaddrs usage allowed... " >&6; }
-    if test "x$curl_disallow_freeifaddrs" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_freeifaddrs="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_freeifaddrs="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs might be used" >&5
-$as_echo_n "checking if freeifaddrs might be used... " >&6; }
-  if test "$tst_links_freeifaddrs" = "yes" &&
-     test "$tst_proto_freeifaddrs" = "yes" &&
-     test "$tst_compi_freeifaddrs" = "yes" &&
-     test "$tst_allow_freeifaddrs" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FREEIFADDRS 1
-_ACEOF
-
-    curl_cv_func_freeifaddrs="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_freeifaddrs="no"
-  fi
-
-
 curl_includes_sys_xattr="\
 /* includes start */
 #ifdef HAVE_SYS_TYPES_H
@@ -35538,545 +34988,6 @@
 
 
       #
-  tst_links_gai_strerror="unknown"
-  tst_proto_gai_strerror="unknown"
-  tst_compi_gai_strerror="unknown"
-  tst_allow_gai_strerror="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror can be linked" >&5
-$as_echo_n "checking if gai_strerror can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-
-int main (void)
-{
-
-      if(0 != gai_strerror(0))
-        return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_gai_strerror="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_gai_strerror="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_gai_strerror" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror is prototyped" >&5
-$as_echo_n "checking if gai_strerror is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gai_strerror" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_gai_strerror="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_gai_strerror="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_gai_strerror" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror is compilable" >&5
-$as_echo_n "checking if gai_strerror is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_netdb
-
-int main (void)
-{
-
-        if(0 != gai_strerror(0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_compi_gai_strerror="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_compi_gai_strerror="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_gai_strerror" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror usage allowed" >&5
-$as_echo_n "checking if gai_strerror usage allowed... " >&6; }
-    if test "x$curl_disallow_gai_strerror" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_gai_strerror="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_gai_strerror="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror might be used" >&5
-$as_echo_n "checking if gai_strerror might be used... " >&6; }
-  if test "$tst_links_gai_strerror" = "yes" &&
-     test "$tst_proto_gai_strerror" = "yes" &&
-     test "$tst_compi_gai_strerror" = "yes" &&
-     test "$tst_allow_gai_strerror" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GAI_STRERROR 1
-_ACEOF
-
-    curl_cv_func_gai_strerror="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_gai_strerror="no"
-  fi
-
-
-      #
-  tst_links_gethostbyaddr="unknown"
-  tst_proto_gethostbyaddr="unknown"
-  tst_compi_gethostbyaddr="unknown"
-  tst_allow_gethostbyaddr="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr can be linked" >&5
-$as_echo_n "checking if gethostbyaddr can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-
-int main (void)
-{
-
-      if(0 != gethostbyaddr(0, 0, 0))
-        return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_gethostbyaddr="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_gethostbyaddr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_gethostbyaddr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is prototyped" >&5
-$as_echo_n "checking if gethostbyaddr is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gethostbyaddr" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_gethostbyaddr="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_gethostbyaddr="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_gethostbyaddr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is compilable" >&5
-$as_echo_n "checking if gethostbyaddr is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_netdb
-
-int main (void)
-{
-
-        if(0 != gethostbyaddr(0, 0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_compi_gethostbyaddr="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_compi_gethostbyaddr="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_gethostbyaddr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr usage allowed" >&5
-$as_echo_n "checking if gethostbyaddr usage allowed... " >&6; }
-    if test "x$curl_disallow_gethostbyaddr" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_gethostbyaddr="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_gethostbyaddr="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr might be used" >&5
-$as_echo_n "checking if gethostbyaddr might be used... " >&6; }
-  if test "$tst_links_gethostbyaddr" = "yes" &&
-     test "$tst_proto_gethostbyaddr" = "yes" &&
-     test "$tst_compi_gethostbyaddr" = "yes" &&
-     test "$tst_allow_gethostbyaddr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYADDR 1
-_ACEOF
-
-    curl_cv_func_gethostbyaddr="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_gethostbyaddr="no"
-  fi
-
-
-    #
-  tst_links_gethostbyaddr_r="unknown"
-  tst_proto_gethostbyaddr_r="unknown"
-  tst_compi_gethostbyaddr_r="unknown"
-  tst_allow_gethostbyaddr_r="unknown"
-  tst_nargs_gethostbyaddr_r="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r can be linked" >&5
-$as_echo_n "checking if gethostbyaddr_r can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define gethostbyaddr_r innocuous_gethostbyaddr_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef gethostbyaddr_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyaddr_r ();
-#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r
-choke me
-#endif
-
-int main (void)
-{
-return gethostbyaddr_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_gethostbyaddr_r="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_gethostbyaddr_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r is prototyped" >&5
-$as_echo_n "checking if gethostbyaddr_r is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_gethostbyaddr_r="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_gethostbyaddr_r="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_gethostbyaddr_r" = "yes"; then
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 5 args." >&5
-$as_echo_n "checking if gethostbyaddr_r takes 5 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_netdb
-
-int main (void)
-{
-
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="5"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 7 args." >&5
-$as_echo_n "checking if gethostbyaddr_r takes 7 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_netdb
-
-int main (void)
-{
-
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="7"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 8 args." >&5
-$as_echo_n "checking if gethostbyaddr_r takes 8 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_netdb
-
-int main (void)
-{
-
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="8"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_gethostbyaddr_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r is compilable" >&5
-$as_echo_n "checking if gethostbyaddr_r is compilable... " >&6; }
-    if test "$tst_compi_gethostbyaddr_r" = "yes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-  fi
-  #
-  if test "$tst_compi_gethostbyaddr_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r usage allowed" >&5
-$as_echo_n "checking if gethostbyaddr_r usage allowed... " >&6; }
-    if test "x$curl_disallow_gethostbyaddr_r" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_gethostbyaddr_r="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_gethostbyaddr_r="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r might be used" >&5
-$as_echo_n "checking if gethostbyaddr_r might be used... " >&6; }
-  if test "$tst_links_gethostbyaddr_r" = "yes" &&
-     test "$tst_proto_gethostbyaddr_r" = "yes" &&
-     test "$tst_compi_gethostbyaddr_r" = "yes" &&
-     test "$tst_allow_gethostbyaddr_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYADDR_R 1
-_ACEOF
-
-            #
-    if test "$tst_nargs_gethostbyaddr_r" -eq "5"; then
-
-$as_echo "#define HAVE_GETHOSTBYADDR_R_5 1" >>confdefs.h
-
-    elif test "$tst_nargs_gethostbyaddr_r" -eq "7"; then
-
-$as_echo "#define HAVE_GETHOSTBYADDR_R_7 1" >>confdefs.h
-
-    elif test "$tst_nargs_gethostbyaddr_r" -eq "8"; then
-
-$as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h
-
-    fi
-    #
-    curl_cv_func_gethostbyaddr_r="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_gethostbyaddr_r="no"
-  fi
-
-
-      #
   tst_links_gethostbyname="unknown"
   tst_proto_gethostbyname="unknown"
   tst_compi_gethostbyname="unknown"
@@ -37127,6 +36038,37 @@
   fi
 
 
+curl_includes_ifaddrs="\
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#  include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>
+#endif
+#ifdef HAVE_IFADDRS_H
+#  include <ifaddrs.h>
+#endif
+/* includes end */"
+  for ac_header in sys/types.h sys/socket.h netinet/in.h ifaddrs.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_ifaddrs
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
       #
   tst_links_getifaddrs="unknown"
   tst_proto_getifaddrs="unknown"
@@ -37336,254 +36278,6 @@
   fi
 
 
-    #
-  tst_links_getservbyport_r="unknown"
-  tst_proto_getservbyport_r="unknown"
-  tst_compi_getservbyport_r="unknown"
-  tst_allow_getservbyport_r="unknown"
-  tst_nargs_getservbyport_r="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r can be linked" >&5
-$as_echo_n "checking if getservbyport_r can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define getservbyport_r innocuous_getservbyport_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef getservbyport_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char getservbyport_r ();
-#if defined __stub_getservbyport_r || defined __stub___getservbyport_r
-choke me
-#endif
-
-int main (void)
-{
-return getservbyport_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_getservbyport_r="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_getservbyport_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r is prototyped" >&5
-$as_echo_n "checking if getservbyport_r is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_netdb
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "getservbyport_r" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_getservbyport_r="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_getservbyport_r="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_getservbyport_r" = "yes"; then
-    if test "$tst_nargs_getservbyport_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 4 args." >&5
-$as_echo_n "checking if getservbyport_r takes 4 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_netdb
-
-int main (void)
-{
-
-          if(0 != getservbyport_r(0, 0, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_getservbyport_r="yes"
-        tst_nargs_getservbyport_r="4"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test "$tst_nargs_getservbyport_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 5 args." >&5
-$as_echo_n "checking if getservbyport_r takes 5 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_netdb
-
-int main (void)
-{
-
-          if(0 != getservbyport_r(0, 0, 0, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_getservbyport_r="yes"
-        tst_nargs_getservbyport_r="5"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test "$tst_nargs_getservbyport_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 6 args." >&5
-$as_echo_n "checking if getservbyport_r takes 6 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_netdb
-
-int main (void)
-{
-
-          if(0 != getservbyport_r(0, 0, 0, 0, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_getservbyport_r="yes"
-        tst_nargs_getservbyport_r="6"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_getservbyport_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r is compilable" >&5
-$as_echo_n "checking if getservbyport_r is compilable... " >&6; }
-    if test "$tst_compi_getservbyport_r" = "yes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-  fi
-  #
-  if test "$tst_compi_getservbyport_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r usage allowed" >&5
-$as_echo_n "checking if getservbyport_r usage allowed... " >&6; }
-    if test "x$curl_disallow_getservbyport_r" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_getservbyport_r="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_getservbyport_r="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r might be used" >&5
-$as_echo_n "checking if getservbyport_r might be used... " >&6; }
-  if test "$tst_links_getservbyport_r" = "yes" &&
-     test "$tst_proto_getservbyport_r" = "yes" &&
-     test "$tst_compi_getservbyport_r" = "yes" &&
-     test "$tst_allow_getservbyport_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GETSERVBYPORT_R 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define GETSERVBYPORT_R_ARGS $tst_nargs_getservbyport_r
-_ACEOF
-
-    if test "$tst_nargs_getservbyport_r" -eq "4"; then
-
-$as_echo "#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data)" >>confdefs.h
-
-    else
-
-$as_echo "#define GETSERVBYPORT_R_BUFSIZE 4096" >>confdefs.h
-
-    fi
-    curl_cv_func_getservbyport_r="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_getservbyport_r="no"
-  fi
-
-
 curl_includes_time="\
 /* includes start */
 #ifdef HAVE_SYS_TYPES_H
@@ -37591,16 +36285,10 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>
-#  ifdef TIME_WITH_SYS_TIME
-#    include <time.h>
-#  endif
-#else
-#  ifdef HAVE_TIME_H
-#    include <time.h>
-#  endif
 #endif
+#include <time.h>
 /* includes end */"
-  for ac_header in sys/types.h sys/time.h time.h
+  for ac_header in sys/types.h sys/time.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_time
@@ -37860,217 +36548,6 @@
 
 
 
-    #
-  tst_links_inet_ntoa_r="unknown"
-  tst_proto_inet_ntoa_r="unknown"
-  tst_compi_inet_ntoa_r="unknown"
-  tst_allow_inet_ntoa_r="unknown"
-  tst_nargs_inet_ntoa_r="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r can be linked" >&5
-$as_echo_n "checking if inet_ntoa_r can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define inet_ntoa_r innocuous_inet_ntoa_r
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef inet_ntoa_r
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntoa_r ();
-#if defined __stub_inet_ntoa_r || defined __stub___inet_ntoa_r
-choke me
-#endif
-
-int main (void)
-{
-return inet_ntoa_r ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_inet_ntoa_r="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_inet_ntoa_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is prototyped" >&5
-$as_echo_n "checking if inet_ntoa_r is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_arpa_inet
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "inet_ntoa_r" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_inet_ntoa_r="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_inet_ntoa_r="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_inet_ntoa_r" = "yes"; then
-    if test "$tst_nargs_inet_ntoa_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 2 args." >&5
-$as_echo_n "checking if inet_ntoa_r takes 2 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_arpa_inet
-
-int main (void)
-{
-
-          struct in_addr addr;
-          if(0 != inet_ntoa_r(addr, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_inet_ntoa_r="yes"
-        tst_nargs_inet_ntoa_r="2"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test "$tst_nargs_inet_ntoa_r" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 3 args." >&5
-$as_echo_n "checking if inet_ntoa_r takes 3 args.... " >&6; }
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-          $curl_includes_arpa_inet
-
-int main (void)
-{
-
-          struct in_addr addr;
-          if(0 != inet_ntoa_r(addr, 0, 0))
-            return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        tst_compi_inet_ntoa_r="yes"
-        tst_nargs_inet_ntoa_r="3"
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        tst_compi_inet_ntoa_r="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is compilable" >&5
-$as_echo_n "checking if inet_ntoa_r is compilable... " >&6; }
-    if test "$tst_compi_inet_ntoa_r" = "yes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-  fi
-  #
-  if test "$tst_compi_inet_ntoa_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r usage allowed" >&5
-$as_echo_n "checking if inet_ntoa_r usage allowed... " >&6; }
-    if test "x$curl_disallow_inet_ntoa_r" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_inet_ntoa_r="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_inet_ntoa_r="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r might be used" >&5
-$as_echo_n "checking if inet_ntoa_r might be used... " >&6; }
-  if test "$tst_links_inet_ntoa_r" = "yes" &&
-     test "$tst_proto_inet_ntoa_r" = "yes" &&
-     test "$tst_compi_inet_ntoa_r" = "yes" &&
-     test "$tst_allow_inet_ntoa_r" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INET_NTOA_R 1
-_ACEOF
-
-            #
-    if test "$tst_nargs_inet_ntoa_r" -eq "2"; then
-
-$as_echo "#define HAVE_INET_NTOA_R_2 1" >>confdefs.h
-
-    elif test "$tst_nargs_inet_ntoa_r" -eq "3"; then
-
-$as_echo "#define HAVE_INET_NTOA_R_3 1" >>confdefs.h
-
-    fi
-    #
-    curl_cv_func_inet_ntoa_r="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_inet_ntoa_r="no"
-  fi
-
-
         #
   tst_links_inet_ntop="unknown"
   tst_proto_inet_ntop="unknown"
@@ -39275,7 +37752,7 @@
 {
 
         long flags = 0;
-        if(0 != ioctlsocket(0, FIONBIO, &flags))
+        if(0 != IoctlSocket(0, FIONBIO, &flags))
           return 1;
 
  ;
@@ -42182,155 +40659,6 @@
 
 
     #
-  tst_links_strncasecmp="unknown"
-  tst_proto_strncasecmp="unknown"
-  tst_compi_strncasecmp="unknown"
-  tst_allow_strncasecmp="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp can be linked" >&5
-$as_echo_n "checking if strncasecmp can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define strncasecmp innocuous_strncasecmp
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strncasecmp
-#ifdef __cplusplus
-extern "C"
-#endif
-char strncasecmp ();
-#if defined __stub_strncasecmp || defined __stub___strncasecmp
-choke me
-#endif
-
-int main (void)
-{
-return strncasecmp ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_strncasecmp="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_strncasecmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_strncasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp is prototyped" >&5
-$as_echo_n "checking if strncasecmp is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strncasecmp" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_strncasecmp="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_strncasecmp="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_strncasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp is compilable" >&5
-$as_echo_n "checking if strncasecmp is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_string
-
-int main (void)
-{
-
-        if(0 != strncasecmp(0, 0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_compi_strncasecmp="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_compi_strncasecmp="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_strncasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp usage allowed" >&5
-$as_echo_n "checking if strncasecmp usage allowed... " >&6; }
-    if test "x$curl_disallow_strncasecmp" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_strncasecmp="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_strncasecmp="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp might be used" >&5
-$as_echo_n "checking if strncasecmp might be used... " >&6; }
-  if test "$tst_links_strncasecmp" = "yes" &&
-     test "$tst_proto_strncasecmp" = "yes" &&
-     test "$tst_compi_strncasecmp" = "yes" &&
-     test "$tst_allow_strncasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRNCASECMP 1
-_ACEOF
-
-    curl_cv_func_strncasecmp="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_func_strncasecmp="no"
-  fi
-
-
-    #
   tst_links_strncmpi="unknown"
   tst_proto_strncmpi="unknown"
   tst_compi_strncmpi="unknown"
@@ -44024,6 +42352,8 @@
             if test "$USE_THREADS_POSIX" != "1"
       then
         CFLAGS="$CFLAGS -pthread"
+        # assign PTHREAD for pkg-config use
+        PTHREAD=" -pthread"
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
@@ -44230,6 +42560,30 @@
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support NTLM" >&5
+$as_echo_n "checking whether to support NTLM... " >&6; }
+# Check whether --enable-ntlm was given.
+if test "${enable_ntlm+set}" = set; then :
+  enableval=$enable_ntlm;  case "$enableval" in
+  no)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define CURL_DISABLE_NTLM 1" >>confdefs.h
+
+       CURL_DISABLE_NTLM=1
+       ;;
+  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       ;;
+  esac
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
 
     OPT_NTLM_WB="default"
   # Check whether --enable-ntlm-wb was given.
@@ -44564,9 +42918,9 @@
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support curl_easy_option*" >&5
 $as_echo_n "checking whether to support curl_easy_option*... " >&6; }
-# Check whether --enable-get-easy-option was given.
-if test "${enable_get_easy_option+set}" = set; then :
-  enableval=$enable_get_easy_option;  case "$enableval" in
+# Check whether --enable-get-easy-options was given.
+if test "${enable_get_easy_options+set}" = set; then :
+  enableval=$enable_get_easy_options;  case "$enableval" in
   no)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -44585,7 +42939,6 @@
 fi
 
 
-curl_altsvc_msg="no      (--enable-alt-svc)";
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support alt-svc" >&5
 $as_echo_n "checking whether to support alt-svc... " >&6; }
 # Check whether --enable-alt-svc was given.
@@ -44594,11 +42947,14 @@
   no)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+
+$as_echo "#define CURL_DISABLE_ALTSVC 1" >>confdefs.h
+
+       curl_altsvc_msg="no";
+       enable_altsvc="no"
        ;;
   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-       curl_altsvc_msg="enabled";
-       enable_altsvc="yes"
        ;;
   esac
 else
@@ -44608,11 +42964,39 @@
 fi
 
 
-if test "$enable_altsvc" = "yes"; then
+if test -n "$SSL_ENABLED"; then
 
-$as_echo "#define USE_ALTSVC 1" >>confdefs.h
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support HSTS" >&5
+$as_echo_n "checking whether to support HSTS... " >&6; }
+  # Check whether --enable-hsts was given.
+if test "${enable_hsts+set}" = set; then :
+  enableval=$enable_hsts;  case "$enableval" in
+    no)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       enable_hsts="no"
+       ;;
+    *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       ;;
+    esac
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-  experimental="$experimental alt-svc"
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: disables HSTS due to lack of SSL" >&5
+$as_echo "$as_me: disables HSTS due to lack of SSL" >&6;}
+  enable_hsts="no"
+fi
+
+if test "x$enable_hsts" != "xyes"; then
+  curl_hsts_msg="no      (--enable-hsts)";
+
+$as_echo "#define CURL_DISABLE_HSTS 1" >>confdefs.h
+
 fi
 
 if test "x$want_ech" != "xno"; then
@@ -44682,7 +43066,7 @@
 
 
 
-LIBCURL_LIBS=$LIBS
+LIBCURL_LIBS="$LIBS$PTHREAD"
 
 
 
@@ -44753,9 +43137,16 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
 fi
 
+if test "x$curl_gsasl_msg" = "xenabled"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
+fi
+
 if test "x$enable_altsvc" = "xyes"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
 fi
+if test "x$enable_hsts" = "xyes"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
+fi
 
 if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
     \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
@@ -44767,11 +43158,20 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
 fi
 
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
-  if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
-      -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \
+use_curl_ntlm_core=no
+
+if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
+    "x$CURL_DISABLE_NTLM" != "x1"; then
+  if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
+      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
+      -o "x$SECURETRANSPORT_ENABLED" = "x1" \
+      -o "x$USE_WIN32_CRYPTO" = "x1" \
       -o "x$WOLFSSL_NTLM" = "x1"; then
+    use_curl_ntlm_core=yes
+  fi
+
+  if test "x$use_curl_ntlm_core" = "xyes" \
+      -o "x$USE_WINDOWS_SSPI" = "x1"; then
     SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
 
     if test "x$CURL_DISABLE_HTTP" != "x1" -a \
@@ -44785,7 +43185,7 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
 fi
 
-if test "x$USE_NGHTTP2" = "x1"; then
+if test "x$USE_NGHTTP2" = "x1" -o "x$USE_HYPER" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
 fi
 
@@ -44808,6 +43208,13 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
 fi
 
+if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
+  if test ${ac_cv_sizeof_off_t} -gt 4 -o \
+     "$curl_win32_file_api" = "win32_large_files"; then
+    SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
+  fi
+fi
+
 SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
 
 
@@ -44846,6 +43253,9 @@
 fi
 if test "x$CURL_DISABLE_GOPHER" != "x1"; then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
+  if test "x$SSL_ENABLED" = "x1"; then
+    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
+  fi
 fi
 if test "x$CURL_DISABLE_MQTT" != "x1"; then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
@@ -44863,11 +43273,7 @@
   fi
 fi
 if test "x$CURL_DISABLE_SMB" != "x1" \
-    -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \
-    -a \( "x$OPENSSL_ENABLED" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
-      -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \
-      -o "x$WOLFSSL_NTLM" = "x1" \); then
+    -a "x$use_curl_ntlm_core" = "xyes"; then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
   if test "x$SSL_ENABLED" = "x1"; then
     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
@@ -45274,6 +43680,10 @@
   as_fn_error $? "conditional \"USE_LIBPSL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_GSASL_TRUE}" && test -z "${USE_GSASL_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GSASL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE}"; then
   as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -45747,7 +44157,7 @@
 Configuration commands:
 $config_commands
 
-Report bugs to <a suitable curl mailing list: https://curl.haxx.se/mail/>."
+Report bugs to <a suitable curl mailing list: https://curl.se/mail/>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -47767,6 +46177,7 @@
   brotli:           ${curl_brotli_msg}
   zstd:             ${curl_zstd_msg}
   GSS-API:          ${curl_gss_msg}
+  GSASL:            ${curl_gsasl_msg}
   TLS-SRP:          ${curl_tls_srp_msg}
   resolver:         ${curl_res_msg}
   IPv6:             ${curl_ipv6_msg}
@@ -47785,9 +46196,10 @@
   LDAPS:            ${curl_ldaps_msg}
   RTSP:             ${curl_rtsp_msg}
   RTMP:             ${curl_rtmp_msg}
-  Metalink:         ${curl_mtlnk_msg}
   PSL:              ${curl_psl_msg}
   Alt-svc:          ${curl_altsvc_msg}
+  HSTS:             ${curl_hsts_msg}
+  HTTP1:            ${curl_h1_msg}
   HTTP2:            ${curl_h2_msg}
   HTTP3:            ${curl_h3_msg}
   ECH:              ${curl_ech_msg}
@@ -47811,6 +46223,7 @@
   brotli:           ${curl_brotli_msg}
   zstd:             ${curl_zstd_msg}
   GSS-API:          ${curl_gss_msg}
+  GSASL:            ${curl_gsasl_msg}
   TLS-SRP:          ${curl_tls_srp_msg}
   resolver:         ${curl_res_msg}
   IPv6:             ${curl_ipv6_msg}
@@ -47829,9 +46242,10 @@
   LDAPS:            ${curl_ldaps_msg}
   RTSP:             ${curl_rtsp_msg}
   RTMP:             ${curl_rtmp_msg}
-  Metalink:         ${curl_mtlnk_msg}
   PSL:              ${curl_psl_msg}
   Alt-svc:          ${curl_altsvc_msg}
+  HSTS:             ${curl_hsts_msg}
+  HTTP1:            ${curl_h1_msg}
   HTTP2:            ${curl_h2_msg}
   HTTP3:            ${curl_h3_msg}
   ECH:              ${curl_ech_msg}
diff --git a/configure.ac b/configure.ac
old mode 100755
new mode 100644
index 2304775..dc8e416
--- a/configure.ac
+++ b/configure.ac
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -21,17 +21,17 @@
 #***************************************************************************
 dnl Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
 
 dnl We don't know the version number "statically" so we use a dash here
-AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.haxx.se/mail/])
+AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.se/mail/])
 
 XC_OVR_ZZ50
 XC_OVR_ZZ60
 CURL_OVERRIDE_AUTOCONF
 
 dnl configure script copyright
-AC_COPYRIGHT([Copyright (c) 1998 - 2020 Daniel Stenberg, <daniel@haxx.se>
+AC_COPYRIGHT([Copyright (c) 1998 - 2021 Daniel Stenberg, <daniel@haxx.se>
 This configure script may be copied, distributed and modified under the
 terms of the curl license; see COPYING for more details])
 
@@ -136,19 +136,20 @@
 dnl Solaris pkgadd support definitions
 PKGADD_PKG="HAXXcurl"
 PKGADD_NAME="curl - a client that groks URLs"
-PKGADD_VENDOR="curl.haxx.se"
+PKGADD_VENDOR="curl.se"
 AC_SUBST(PKGADD_PKG)
 AC_SUBST(PKGADD_NAME)
 AC_SUBST(PKGADD_VENDOR)
 
 dnl
 dnl initialize all the info variables
-    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl} )"
+    curl_ssl_msg="no      (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl,rustls} )"
     curl_ssh_msg="no      (--with-{libssh,libssh2})"
    curl_zlib_msg="no      (--with-zlib)"
  curl_brotli_msg="no      (--with-brotli)"
    curl_zstd_msg="no      (--with-zstd)"
     curl_gss_msg="no      (--with-gssapi)"
+  curl_gsasl_msg="no      (--with-gsasl)"
 curl_tls_srp_msg="no      (--enable-tls-srp)"
     curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
    curl_ipv6_msg="no      (--enable-ipv6)"
@@ -162,10 +163,16 @@
   curl_ldaps_msg="no      (--enable-ldaps)"
    curl_rtsp_msg="no      (--enable-rtsp)"
    curl_rtmp_msg="no      (--with-librtmp)"
-  curl_mtlnk_msg="no      (--with-libmetalink)"
     curl_psl_msg="no      (--with-libpsl)"
-
+ curl_altsvc_msg="enabled (--disable-alt-svc)"
+   curl_hsts_msg="enabled (--disable-hsts)"
     ssl_backends=
+     curl_h1_msg="enabled (internal)"
+     curl_h2_msg="no      (--with-nghttp2, --with-hyper)"
+     curl_h3_msg="no      (--with-ngtcp2, --with-quiche)"
+
+enable_altsvc="yes"
+enable_hsts="yes"
 
 dnl
 dnl Save some initial values the user might have provided
@@ -173,6 +180,112 @@
 INITIAL_LDFLAGS=$LDFLAGS
 INITIAL_LIBS=$LIBS
 
+dnl **********************************************************************
+dnl See which TLS backend(s) that are requested. Just do all the
+dnl TLS AC_ARG_WITH() invokes here and do the checks later
+dnl **********************************************************************
+OPT_SCHANNEL=no
+AC_ARG_WITH(schannel,dnl
+AS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]),
+  OPT_SCHANNEL=$withval
+  TLSCHOICE="schannel")
+
+OPT_SECURETRANSPORT=no
+AC_ARG_WITH(secure-transport,dnl
+AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),
+  OPT_SECURETRANSPORT=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
+)
+
+OPT_AMISSL=no
+AC_ARG_WITH(amissl,dnl
+AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),
+  OPT_AMISSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL")
+
+OPT_OPENSSL=no
+dnl Default to no CA bundle
+ca="no"
+AC_ARG_WITH(ssl,dnl
+AS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl])
+AS_HELP_STRING([--without-ssl], [build without any TLS library]),
+  OPT_SSL=$withval
+  OPT_OPENSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL")
+
+AC_ARG_WITH(openssl,dnl
+AS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]),
+  OPT_OPENSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL")
+
+OPT_GNUTLS=no
+AC_ARG_WITH(gnutls,dnl
+AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),
+  OPT_GNUTLS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS")
+
+OPT_MBEDTLS=no
+AC_ARG_WITH(mbedtls,dnl
+AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),
+  OPT_MBEDTLS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS")
+
+OPT_WOLFSSL=no
+AC_ARG_WITH(wolfssl,dnl
+AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),
+  OPT_WOLFSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL")
+
+OPT_MESALINK=no
+AC_ARG_WITH(mesalink,dnl
+AS_HELP_STRING([--with-mesalink=PATH],[where to look for MesaLink, PATH points to the installation root]),
+  OPT_MESALINK=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }MesaLink")
+
+OPT_BEARSSL=no
+AC_ARG_WITH(bearssl,dnl
+AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),
+  OPT_BEARSSL=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL")
+
+OPT_RUSTLS=no
+AC_ARG_WITH(rustls,dnl
+AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),
+  OPT_RUSTLS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls")
+
+OPT_NSS=no
+AC_ARG_WITH(nss,dnl
+AS_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root]),
+  OPT_NSS=$withval
+  test -z "TLSCHOICE" || TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }NSS")
+
+dnl If no TLS choice has been made, check if it was explicitly disabled or
+dnl error out to force the user to decide.
+if test -z "$TLSCHOICE"; then
+  if test "x$OPT_SSL" != "xno"; then
+    AC_MSG_ERROR([select TLS backend(s) or disable TLS with --without-ssl.
+
+Select from these:
+
+  --with-amissl
+  --with-bearssl
+  --with-gnutls
+  --with-mbedtls
+  --with-mesalink
+  --with-nss
+  --with-openssl (also works for BoringSSL and libressl)
+  --with-rustls
+  --with-schannel
+  --with-secure-transport
+  --with-wolfssl
+])
+  fi
+fi
+
+AC_ARG_WITH(darwinssl,,
+  AC_MSG_ERROR([--with-darwin-ssl no longer works!]))
+
 dnl
 dnl Detect the canonical host and target build environment
 dnl
@@ -351,6 +464,7 @@
     CURL_CHECK_HEADER_WINSOCK
     CURL_CHECK_HEADER_WINSOCK2
     CURL_CHECK_HEADER_WS2TCPIP
+    CURL_CHECK_HEADER_WINCRYPT
     CURL_CHECK_HEADER_WINLDAP
     CURL_CHECK_HEADER_WINBER
     ;;
@@ -358,13 +472,16 @@
     curl_cv_header_winsock_h="no"
     curl_cv_header_winsock2_h="no"
     curl_cv_header_ws2tcpip_h="no"
+    curl_cv_header_wincrypt_h="no"
     curl_cv_header_winldap_h="no"
     curl_cv_header_winber_h="no"
     ;;
 esac
 CURL_CHECK_WIN32_LARGEFILE
+CURL_CHECK_WIN32_CRYPTO
 
-CURL_MAC_CFLAGS
+CURL_DARWIN_CFLAGS
+CURL_DARWIN_SYSTEMCONFIGURATION
 CURL_SUPPORTS_BUILTIN_AVAILABLE
 
 
@@ -373,8 +490,8 @@
 dnl
 AC_MSG_CHECKING([whether to support http])
 AC_ARG_ENABLE(http,
-AC_HELP_STRING([--enable-http],[Enable HTTP support])
-AC_HELP_STRING([--disable-http],[Disable HTTP support]),
+AS_HELP_STRING([--enable-http],[Enable HTTP support])
+AS_HELP_STRING([--disable-http],[Disable HTTP support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -384,6 +501,14 @@
        AC_SUBST(CURL_DISABLE_HTTP, [1])
        AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
        AC_SUBST(CURL_DISABLE_RTSP, [1])
+       dnl toggle off alt-svc too when HTTP is disabled
+       AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
+       AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable HSTS])
+       curl_h1_msg="no      (--enable-http, --with-hyper)"
+       curl_altsvc_msg="no";
+       curl_hsts_msg="no      (--enable-hsts)";
+       enable_altsvc="no"
+       enable_hsts="no"
        ;;
   *)   AC_MSG_RESULT(yes)
        ;;
@@ -392,8 +517,8 @@
 )
 AC_MSG_CHECKING([whether to support ftp])
 AC_ARG_ENABLE(ftp,
-AC_HELP_STRING([--enable-ftp],[Enable FTP support])
-AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
+AS_HELP_STRING([--enable-ftp],[Enable FTP support])
+AS_HELP_STRING([--disable-ftp],[Disable FTP support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -407,8 +532,8 @@
 )
 AC_MSG_CHECKING([whether to support file])
 AC_ARG_ENABLE(file,
-AC_HELP_STRING([--enable-file],[Enable FILE support])
-AC_HELP_STRING([--disable-file],[Disable FILE support]),
+AS_HELP_STRING([--enable-file],[Enable FILE support])
+AS_HELP_STRING([--disable-file],[Disable FILE support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -422,14 +547,18 @@
 )
 AC_MSG_CHECKING([whether to support ldap])
 AC_ARG_ENABLE(ldap,
-AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
-AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
+AS_HELP_STRING([--enable-ldap],[Enable LDAP support])
+AS_HELP_STRING([--disable-ldap],[Disable LDAP support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
        AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
        AC_SUBST(CURL_DISABLE_LDAP, [1])
        ;;
+  yes)
+       ldap_askedfor="yes"
+       AC_MSG_RESULT(yes)
+       ;;
   *)
        AC_MSG_RESULT(yes)
        ;;
@@ -438,8 +567,8 @@
 )
 AC_MSG_CHECKING([whether to support ldaps])
 AC_ARG_ENABLE(ldaps,
-AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
-AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
+AS_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
+AS_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -468,36 +597,132 @@
        fi ]
 )
 
-AC_MSG_CHECKING([whether to support rtsp])
-AC_ARG_ENABLE(rtsp,
-AC_HELP_STRING([--enable-rtsp],[Enable RTSP support])
-AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
-[ case "$enableval" in
+dnl **********************************************************************
+dnl Check for Hyper
+dnl **********************************************************************
+
+OPT_HYPER="no"
+
+AC_ARG_WITH(hyper,
+AS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage])
+AS_HELP_STRING([--without-hyper],[Disable hyper usage]),
+  [OPT_HYPER=$withval])
+case "$OPT_HYPER" in
   no)
+    dnl --without-hyper option used
+    want_hyper="no"
+    ;;
+  yes)
+    dnl --with-hyper option used without path
+    want_hyper="default"
+    want_hyper_path=""
+    ;;
+  *)
+    dnl --with-hyper option used with path
+    want_hyper="yes"
+    want_hyper_path="$withval"
+    ;;
+esac
+
+if test X"$want_hyper" != Xno; then
+  if test "x$disable_http" = "xyes"; then
+    AC_MSG_ERROR([--with-hyper is not compatible with --disable-http])
+  fi
+
+  dnl backup the pre-hyper variables
+  CLEANLDFLAGS="$LDFLAGS"
+  CLEANCPPFLAGS="$CPPFLAGS"
+  CLEANLIBS="$LIBS"
+
+  CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path)
+
+  if test "$PKGCONFIG" != "no" ; then
+    LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
+      $PKGCONFIG --libs-only-l hyper`
+    CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl
+      $PKGCONFIG --cflags-only-I hyper`
+    LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
+      $PKGCONFIG --libs-only-L hyper`
+  else
+    dnl no hyper pkg-config found
+    LIB_HYPER="-lhyper -ldl -lpthread -lm"
+    if test X"$want_hyper" != Xdefault; then
+      CPP_HYPER=-I"$want_hyper_path/capi/include"
+      LD_HYPER="-L$want_hyper_path/target/debug"
+    fi
+  fi
+  if test -n "$LIB_HYPER"; then
+    AC_MSG_NOTICE([-l is $LIB_HYPER])
+    AC_MSG_NOTICE([-I is $CPP_HYPER])
+    AC_MSG_NOTICE([-L is $LD_HYPER])
+
+    LDFLAGS="$LDFLAGS $LD_HYPER"
+    CPPFLAGS="$CPPFLAGS $CPP_HYPER"
+    LIBS="$LIB_HYPER $LIBS"
+
+    if test "x$cross_compiling" != "xyes"; then
+      DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//'`
+    fi
+
+    AC_CHECK_LIB(hyper, hyper_io_new,
+      [
+       AC_CHECK_HEADERS(hyper.h,
+          experimental="$experimental Hyper"
+          AC_MSG_NOTICE([Hyper support is experimental])
+          curl_h1_msg="enabled (Hyper)"
+          curl_h2_msg=$curl_h1_msg
+          HYPER_ENABLED=1
+          AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
+          AC_SUBST(USE_HYPER, [1])
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
+          export CURL_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]),
+       )
+      ],
+      AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.])
+    )
+  fi
+fi
+
+if test X"$want_hyper" != Xno; then
+  AC_MSG_NOTICE([Disable RTSP support with hyper])
+  AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
+  AC_SUBST(CURL_DISABLE_RTSP, [1])
+
+else
+
+  AC_MSG_CHECKING([whether to support rtsp])
+  AC_ARG_ENABLE(rtsp,
+  AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
+  AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
+  [ case "$enableval" in
+    no)
        AC_MSG_RESULT(no)
        AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
        AC_SUBST(CURL_DISABLE_RTSP, [1])
        ;;
-  *)   if test x$CURL_DISABLE_HTTP = x1 ; then
-          AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
+    *)
+       if test x$CURL_DISABLE_HTTP = x1 ; then
+         AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
        else
-          AC_MSG_RESULT(yes)
-          curl_rtsp_msg="enabled"
+         AC_MSG_RESULT(yes)
+         curl_rtsp_msg="enabled"
        fi
        ;;
-  esac ],
+    esac ],
        if test "x$CURL_DISABLE_HTTP" != "x1"; then
           AC_MSG_RESULT(yes)
           curl_rtsp_msg="enabled"
        else
           AC_MSG_RESULT(no)
        fi
-)
+  )
+fi
 
 AC_MSG_CHECKING([whether to support proxies])
 AC_ARG_ENABLE(proxy,
-AC_HELP_STRING([--enable-proxy],[Enable proxy support])
-AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
+AS_HELP_STRING([--enable-proxy],[Enable proxy support])
+AS_HELP_STRING([--disable-proxy],[Disable proxy support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -513,8 +738,8 @@
 
 AC_MSG_CHECKING([whether to support dict])
 AC_ARG_ENABLE(dict,
-AC_HELP_STRING([--enable-dict],[Enable DICT support])
-AC_HELP_STRING([--disable-dict],[Disable DICT support]),
+AS_HELP_STRING([--enable-dict],[Enable DICT support])
+AS_HELP_STRING([--disable-dict],[Disable DICT support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -528,8 +753,8 @@
 )
 AC_MSG_CHECKING([whether to support telnet])
 AC_ARG_ENABLE(telnet,
-AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
-AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
+AS_HELP_STRING([--enable-telnet],[Enable TELNET support])
+AS_HELP_STRING([--disable-telnet],[Disable TELNET support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -543,8 +768,8 @@
 )
 AC_MSG_CHECKING([whether to support tftp])
 AC_ARG_ENABLE(tftp,
-AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
-AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
+AS_HELP_STRING([--enable-tftp],[Enable TFTP support])
+AS_HELP_STRING([--disable-tftp],[Disable TFTP support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -559,8 +784,8 @@
 
 AC_MSG_CHECKING([whether to support pop3])
 AC_ARG_ENABLE(pop3,
-AC_HELP_STRING([--enable-pop3],[Enable POP3 support])
-AC_HELP_STRING([--disable-pop3],[Disable POP3 support]),
+AS_HELP_STRING([--enable-pop3],[Enable POP3 support])
+AS_HELP_STRING([--disable-pop3],[Disable POP3 support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -576,8 +801,8 @@
 
 AC_MSG_CHECKING([whether to support imap])
 AC_ARG_ENABLE(imap,
-AC_HELP_STRING([--enable-imap],[Enable IMAP support])
-AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
+AS_HELP_STRING([--enable-imap],[Enable IMAP support])
+AS_HELP_STRING([--disable-imap],[Disable IMAP support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -593,8 +818,8 @@
 
 AC_MSG_CHECKING([whether to support smb])
 AC_ARG_ENABLE(smb,
-AC_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
-AC_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
+AS_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
+AS_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -609,8 +834,8 @@
 
 AC_MSG_CHECKING([whether to support smtp])
 AC_ARG_ENABLE(smtp,
-AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
-AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
+AS_HELP_STRING([--enable-smtp],[Enable SMTP support])
+AS_HELP_STRING([--disable-smtp],[Disable SMTP support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -625,8 +850,8 @@
 
 AC_MSG_CHECKING([whether to support gopher])
 AC_ARG_ENABLE(gopher,
-AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
-AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
+AS_HELP_STRING([--enable-gopher],[Enable Gopher support])
+AS_HELP_STRING([--disable-gopher],[Disable Gopher support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -641,8 +866,8 @@
 
 AC_MSG_CHECKING([whether to support mqtt])
 AC_ARG_ENABLE(mqtt,
-AC_HELP_STRING([--enable-mqtt],[Enable MQTT support])
-AC_HELP_STRING([--disable-mqtt],[Disable MQTT support]),
+AS_HELP_STRING([--enable-mqtt],[Enable MQTT support])
+AS_HELP_STRING([--disable-mqtt],[Disable MQTT support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -661,8 +886,8 @@
 
 AC_MSG_CHECKING([whether to provide built-in manual])
 AC_ARG_ENABLE(manual,
-AC_HELP_STRING([--enable-manual],[Enable built-in manual])
-AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
+AS_HELP_STRING([--enable-manual],[Enable built-in manual])
+AS_HELP_STRING([--disable-manual],[Disable built-in manual]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -682,8 +907,8 @@
 dnl
 AC_MSG_CHECKING([whether to enable generation of C code])
 AC_ARG_ENABLE(libcurl_option,
-AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
-AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
+AS_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
+AS_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -702,7 +927,7 @@
 
 AC_MSG_CHECKING([whether to use libgcc])
 AC_ARG_ENABLE(libgcc,
-AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
+AS_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
 [ case "$enableval" in
   yes)
        LIBS="-lgcc $LIBS"
@@ -856,14 +1081,14 @@
   ])
 fi
 
-if test "$HAVE_GETHOSTBYNAME" != "1"
+if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
 then
   dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
   AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
   AC_LINK_IFELSE([
     AC_LANG_PROGRAM([[
-#include <proto/bsdsocket.h>
-struct Library *SocketBase = NULL;
+  #include <proto/bsdsocket.h>
+  struct Library *SocketBase = NULL;
     ]],[[
       gethostbyname("www.dummysite.com");
     ]])
@@ -930,8 +1155,8 @@
 clean_LIBS=$LIBS
 ZLIB_LIBS=""
 AC_ARG_WITH(zlib,
-AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
-AC_HELP_STRING([--without-zlib],[disable use of zlib]),
+AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
+AS_HELP_STRING([--without-zlib],[disable use of zlib]),
                [OPT_ZLIB="$withval"])
 
 if test "$OPT_ZLIB" = "no" ; then
@@ -1037,8 +1262,8 @@
 dnl Default to compiler & linker defaults for BROTLI files & libraries.
 OPT_BROTLI=off
 AC_ARG_WITH(brotli,dnl
-AC_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-brotli], [disable BROTLI]),
+AS_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AS_HELP_STRING([--without-brotli], [disable BROTLI]),
   OPT_BROTLI=$withval)
 
 if test X"$OPT_BROTLI" != Xno; then
@@ -1123,8 +1348,8 @@
 dnl Default to compiler & linker defaults for libzstd
 OPT_ZSTD=off
 AC_ARG_WITH(zstd,dnl
-AC_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-zstd], [disable libzstd]),
+AS_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AS_HELP_STRING([--without-zstd], [disable libzstd]),
   OPT_ZSTD=$withval)
 
 if test X"$OPT_ZSTD" != Xno; then
@@ -1209,12 +1434,12 @@
 
 LDAPLIBNAME=""
 AC_ARG_WITH(ldap-lib,
-AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
+AS_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
  [LDAPLIBNAME="$withval"])
 
 LBERLIBNAME=""
 AC_ARG_WITH(lber-lib,
-AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
+AS_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
  [LBERLIBNAME="$withval"])
 
 if test x$CURL_DISABLE_LDAP != x1 ; then
@@ -1234,6 +1459,9 @@
 
   if test "$LDAPLIBNAME" ; then
     AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
+      if test -n "$ldap_askedfor"; then
+        AC_MSG_ERROR([couldn't detect the LDAP libraries])
+      fi
       AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
       AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
       AC_SUBST(CURL_DISABLE_LDAP, [1])
@@ -1244,6 +1472,9 @@
     CURL_CHECK_LIBS_LDAP
     case X-"$curl_cv_ldap_LIBS" in
       X-unknown)
+        if test -n "$ldap_askedfor"; then
+          AC_MSG_ERROR([couldn't detect the LDAP libraries])
+        fi
         AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
         AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
         AC_SUBST(CURL_DISABLE_LDAP, [1])
@@ -1295,8 +1526,8 @@
 
 AC_MSG_CHECKING([whether to enable IPv6])
 AC_ARG_ENABLE(ipv6,
-AC_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
-AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
+AS_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
+AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -1307,7 +1538,8 @@
        ;;
   esac ],
 
-  AC_TRY_RUN([ /* are AF_INET6 and sockaddr_in6 available? */
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[
+/* are AF_INET6 and sockaddr_in6 available? */
 #include <sys/types.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
@@ -1329,6 +1561,7 @@
  else
    exit(0);
 }
+]])
 ],
   AC_MSG_RESULT(yes)
   ipv6=yes,
@@ -1345,7 +1578,7 @@
   AC_SUBST(IPV6_ENABLED)
 
   AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
-  AC_TRY_COMPILE([
+  AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
@@ -1355,14 +1588,16 @@
 #if defined (__TANDEM)
 # include <netinet/in6.h>
 #endif
-#endif] ,
-  struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
-  if test "$have_sin6_scope_id" = yes; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
-  else
+#endif
+]], [[
+  struct sockaddr_in6 s;
+  s.sin6_scope_id = 0;
+]])], [
+  AC_MSG_RESULT([yes])
+  AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
+ ], [
     AC_MSG_RESULT([no])
-  fi
+ ])
 fi
 
 dnl **********************************************************************
@@ -1406,21 +1641,21 @@
 
 GSSAPI_ROOT="/usr"
 AC_ARG_WITH(gssapi-includes,
-  AC_HELP_STRING([--with-gssapi-includes=DIR],
+  AS_HELP_STRING([--with-gssapi-includes=DIR],
                  [Specify location of GSS-API headers]),
   [ GSSAPI_INCS="-I$withval"
     want_gss="yes" ]
 )
 
 AC_ARG_WITH(gssapi-libs,
-  AC_HELP_STRING([--with-gssapi-libs=DIR],
+  AS_HELP_STRING([--with-gssapi-libs=DIR],
                  [Specify location of GSS-API libs]),
   [ GSSAPI_LIB_DIR="-L$withval"
     want_gss="yes" ]
 )
 
 AC_ARG_WITH(gssapi,
-  AC_HELP_STRING([--with-gssapi=DIR],
+  AS_HELP_STRING([--with-gssapi=DIR],
                  [Where to look for GSS-API]), [
   GSSAPI_ROOT="$withval"
   if test x"$GSSAPI_ROOT" != xno; then
@@ -1586,8 +1821,8 @@
 DEFAULT_SSL_BACKEND=no
 VALID_DEFAULT_SSL_BACKEND=
 AC_ARG_WITH(default-ssl-backend,
-AC_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
-AC_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
+AS_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
+AS_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
   [DEFAULT_SSL_BACKEND=$withval])
 case "$DEFAULT_SSL_BACKEND" in
   no)
@@ -1605,1228 +1840,28 @@
     ;;
 esac
 
-dnl **********************************************************************
+CURL_WITH_SCHANNEL
+CURL_WITH_SECURETRANSPORT
+CURL_WITH_AMISSL
+CURL_WITH_OPENSSL
+CURL_WITH_GNUTLS
+CURL_WITH_MBEDTLS
+CURL_WITH_WOLFSSL
+CURL_WITH_MESALINK
+CURL_WITH_BEARSSL
+CURL_WITH_RUSTLS
+CURL_WITH_NSS
 
-dnl -------------------------------------------------
-dnl check winssl option before other SSL libraries
-dnl -------------------------------------------------
-
-OPT_SCHANNEL=no
-AC_ARG_WITH(winssl,dnl
-AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
-AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
-  OPT_SCHANNEL=$withval)
-
-AC_ARG_WITH(schannel,dnl
-AC_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS])
-AC_HELP_STRING([--without-schannel], [disable Windows native SSL/TLS]),
-  OPT_SCHANNEL=$withval)
-
-AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
-if test -z "$ssl_backends" -o "x$OPT_SCHANNEL" != xno; then
-  ssl_msg=
-  if test "x$OPT_SCHANNEL" != "xno"  &&
-     test "x$curl_cv_native_windows" = "xyes"; then
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
-    AC_SUBST(USE_SCHANNEL, [1])
-    ssl_msg="Windows-native"
-    test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-    SCHANNEL_ENABLED=1
-    # --with-schannel implies --enable-sspi
-    AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
-    AC_SUBST(USE_WINDOWS_SSPI, [1])
-    curl_sspi_msg="enabled"
-    LIBS="-lcrypt32 $LIBS"
-  else
-    AC_MSG_RESULT(no)
-  fi
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-else
-  AC_MSG_RESULT(no)
+dnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
+if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
+  LIBS="-ladvapi32 -lcrypt32 $LIBS"
 fi
 
-OPT_SECURETRANSPORT=no
-AC_ARG_WITH(darwinssl,dnl
-AC_HELP_STRING([--with-darwinssl],[enable Apple OS native SSL/TLS])
-AC_HELP_STRING([--without-darwinssl], [disable Apple OS native SSL/TLS]),
-  OPT_SECURETRANSPORT=$withval)
-
-AC_ARG_WITH(secure-transport,dnl
-AC_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS])
-AC_HELP_STRING([--without-secure-transport], [disable Apple OS native SSL/TLS]),
-  OPT_SECURETRANSPORT=$withval)
-
-AC_MSG_CHECKING([whether to enable Secure Transport])
-if test -z "$ssl_backends" -o "x$OPT_SECURETRANSPORT" != xno; then
-  if test "x$OPT_SECURETRANSPORT" != "xno" &&
-     (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(USE_SECTRANSP, 1, [enable Secure Transport])
-    AC_SUBST(USE_SECTRANSP, [1])
-    ssl_msg="Secure Transport"
-    test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-    SECURETRANSPORT_ENABLED=1
-    LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
-  else
-    AC_MSG_RESULT(no)
-  fi
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-else
-  AC_MSG_RESULT(no)
-fi
-
-OPT_AMISSL=no
-AC_ARG_WITH(amissl,dnl
-AC_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)])
-AC_HELP_STRING([--without-amissl], [disable Amiga native SSL/TLS (AmiSSL)]),
-  OPT_AMISSL=$withval)
-
-AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL)])
-if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
-  if test -z "$ssl_backends" -o "x$OPT_AMISSL" != xno; then
-    ssl_msg=
-    if test "x$OPT_AMISSL" != "xno"; then
-      AC_MSG_RESULT(yes)
-      ssl_msg="AmiSSL"
-      test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-      AMISSL_ENABLED=1
-      LIBS="-lamisslauto $LIBS"
-      AC_DEFINE(USE_AMISSL, 1, [if AmiSSL is in use])
-      AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])
-    else
-      AC_MSG_RESULT(no)
-    fi
-    test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-  else
-    AC_MSG_RESULT(no)
-  fi
-else
-  AC_MSG_RESULT(no)
-fi
-
-dnl **********************************************************************
-dnl Check for the presence of SSL libraries and headers
-dnl **********************************************************************
-
-dnl Default to compiler & linker defaults for SSL files & libraries.
-OPT_SSL=off
-dnl Default to no CA bundle
-ca="no"
-AC_ARG_WITH(ssl,dnl
-AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
-  OPT_SSL=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
-   test X"$OPT_SSL" != Xno; then
-  ssl_msg=
-
-  dnl backup the pre-ssl variables
-  CLEANLDFLAGS="$LDFLAGS"
-  CLEANCPPFLAGS="$CPPFLAGS"
-  CLEANLIBS="$LIBS"
-
-  dnl This is for Msys/Mingw
-  case $host in
-    *-*-msys* | *-*-mingw*)
-      AC_MSG_CHECKING([for gdi32])
-      my_ac_save_LIBS=$LIBS
-      LIBS="-lgdi32 $LIBS"
-      AC_TRY_LINK([#include <windef.h>
-                   #include <wingdi.h>],
-                   [GdiFlush();],
-                   [ dnl worked!
-                   AC_MSG_RESULT([yes])],
-                   [ dnl failed, restore LIBS
-                   LIBS=$my_ac_save_LIBS
-                   AC_MSG_RESULT(no)]
-                  )
-      ;;
-  esac
-
-  case "$OPT_SSL" in
-  yes)
-    dnl --with-ssl (without path) used
-    if test x$cross_compiling != xyes; then
-      dnl only do pkg-config magic when not cross-compiling
-      PKGTEST="yes"
-    fi
-    PREFIX_OPENSSL=/usr/local/ssl
-    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
-    ;;
-  off)
-    dnl no --with-ssl option given, just check default places
-    if test x$cross_compiling != xyes; then
-      dnl only do pkg-config magic when not cross-compiling
-      PKGTEST="yes"
-    fi
-    PREFIX_OPENSSL=
-    ;;
-  *)
-    dnl check the given --with-ssl spot
-    PKGTEST="no"
-    PREFIX_OPENSSL=$OPT_SSL
-
-    dnl Try pkg-config even when cross-compiling.  Since we
-    dnl specify PKG_CONFIG_LIBDIR we're only looking where
-    dnl the user told us to look
-    OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
-    if test -f "$OPENSSL_PCDIR/openssl.pc"; then
-      AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
-      PKGTEST="yes"
-    elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
-      AC_MSG_ERROR([$PREFIX_OPENSSL is a bad --with-ssl prefix!])
-    fi
-
-    dnl in case pkg-config comes up empty, use what we got
-    dnl via --with-ssl
-    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
-    if test "$PREFIX_OPENSSL" != "/usr" ; then
-      SSL_LDFLAGS="-L$LIB_OPENSSL"
-      SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
-    fi
-    SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
-    ;;
-  esac
-
-  if test "$PKGTEST" = "yes"; then
-
-    CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
-
-    if test "$PKGCONFIG" != "no" ; then
-      SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
-        $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
-
-      SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
-        $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
-      SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
-        $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
-      AC_SUBST(SSL_LIBS)
-      AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
-      AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
-      AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
-
-      LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
-
-      dnl use the values pkg-config reported.  This is here
-      dnl instead of below with CPPFLAGS and LDFLAGS because we only
-      dnl learn about this via pkg-config.  If we only have
-      dnl the argument to --with-ssl we don't know what
-      dnl additional libs may be necessary.  Hope that we
-      dnl don't need any.
-      LIBS="$SSL_LIBS $LIBS"
-    fi
-  fi
-
-  dnl finally, set flags to use SSL
-  CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
-  LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
-  AC_CHECK_LIB(crypto, HMAC_Update,[
-     HAVECRYPTO="yes"
-     LIBS="-lcrypto $LIBS"
-     ],[
-     LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-     if test "$PKGCONFIG" = "no" ; then
-       # only set this if pkg-config wasn't used
-       CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
-     fi
-     # Linking previously failed, try extra paths from --with-ssl or pkg-config.
-     # Use a different function name to avoid reusing the earlier cached result.
-     AC_CHECK_LIB(crypto, HMAC_Init_ex,[
-       HAVECRYPTO="yes"
-       LIBS="-lcrypto $LIBS"], [
-
-       dnl still no, but what about with -ldl?
-       AC_MSG_CHECKING([OpenSSL linking with -ldl])
-       LIBS="$CLEANLIBS -lcrypto -ldl"
-       AC_TRY_LINK(
-       [
-         #include <openssl/err.h>
-       ],
-       [
-         ERR_clear_error();
-       ],
-       [
-         AC_MSG_RESULT(yes)
-         HAVECRYPTO="yes"
-       ],
-       [
-         AC_MSG_RESULT(no)
-         dnl ok, so what about both -ldl and -lpthread?
-         dnl This may be necessary for static libraries.
-
-         AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
-         LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"
-         AC_TRY_LINK(
-         [
-           #include <openssl/err.h>
-         ],
-         [
-           ERR_clear_error();
-         ],
-         [
-           AC_MSG_RESULT(yes)
-           HAVECRYPTO="yes"
-         ],
-         [
-           AC_MSG_RESULT(no)
-           LDFLAGS="$CLEANLDFLAGS"
-           CPPFLAGS="$CLEANCPPFLAGS"
-           LIBS="$CLEANLIBS"
-
-         ])
-
-       ])
-
-     ])
-  ])
-
-  if test X"$HAVECRYPTO" = X"yes"; then
-    dnl This is only reasonable to do if crypto actually is there: check for
-    dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
-
-    AC_CHECK_LIB(ssl, SSL_connect)
-
-    if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
-        dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
-        AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
-        OLIBS=$LIBS
-        LIBS="-lRSAglue -lrsaref $LIBS"
-        AC_CHECK_LIB(ssl, SSL_connect)
-        if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
-            dnl still no SSL_connect
-            AC_MSG_RESULT(no)
-            LIBS=$OLIBS
-        else
-            AC_MSG_RESULT(yes)
-        fi
-
-    else
-
-      dnl Have the libraries--check for OpenSSL headers
-      AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
-                       openssl/pem.h openssl/ssl.h openssl/err.h,
-        ssl_msg="OpenSSL"
-	test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-        OPENSSL_ENABLED=1
-        AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
-
-      if test $ac_cv_header_openssl_x509_h = no; then
-        dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
-        dnl since 'err.h' might in fact find a krb4 header with the same
-        dnl name
-        AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
-
-        if test $ac_cv_header_x509_h = yes &&
-           test $ac_cv_header_crypto_h = yes &&
-           test $ac_cv_header_ssl_h = yes; then
-          dnl three matches
-          ssl_msg="OpenSSL"
-          OPENSSL_ENABLED=1
-        fi
-      fi
-    fi
-
-    if test X"$OPENSSL_ENABLED" != X"1"; then
-       LIBS="$CLEANLIBS"
-    fi
-
-    if test X"$OPT_SSL" != Xoff &&
-       test "$OPENSSL_ENABLED" != "1"; then
-      AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
-    fi
-  fi
-
-  if test X"$OPENSSL_ENABLED" = X"1"; then
-    dnl These can only exist if OpenSSL exists
-    dnl OpenSSL_version is introduced in 3.0.0
-
-    AC_CHECK_FUNCS( RAND_egd \
-                    SSLv2_client_method \
-                    OpenSSL_version )
-
-    AC_MSG_CHECKING([for BoringSSL])
-    AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-                #include <openssl/base.h>
-                ]],[[
-                #ifndef OPENSSL_IS_BORINGSSL
-                #error not boringssl
-                #endif
-       ]])
-    ],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
-                           [Define to 1 if using BoringSSL.])
-        ssl_msg="BoringSSL"
-    ],[
-        AC_MSG_RESULT([no])
-    ])
-
-    AC_MSG_CHECKING([for libressl])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <openssl/opensslv.h>
-      ]],[[
-        int dummy = LIBRESSL_VERSION_NUMBER;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
-        [Define to 1 if using libressl.])
-      ssl_msg="libressl"
-    ],[
-      AC_MSG_RESULT([no])
-    ])
-
-    AC_MSG_CHECKING([for OpenSSL >= v3])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <openssl/opensslv.h>
-      ]],[[
-        #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
-        return 0;
-        #else
-        #error older than 3
-        #endif
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      AC_DEFINE_UNQUOTED(HAVE_OPENSSL3, 1,
-        [Define to 1 if using OpenSSL 3 or later.])
-      dnl OpenSSLv3 marks the DES functions deprecated but we have no
-      dnl replacements (yet) so tell the compiler to not warn for them
-      dnl
-      dnl Ask OpenSSL to suppress the warnings.
-      CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED"
-      ssl_msg="OpenSSL v3+"
-    ],[
-      AC_MSG_RESULT([no])
-    ])
-  fi
-
-  if test "$OPENSSL_ENABLED" = "1"; then
-    if test -n "$LIB_OPENSSL"; then
-       dnl when the ssl shared libs were found in a path that the run-time
-       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
-       dnl to prevent further configure tests to fail due to this
-       if test "x$cross_compiling" != "xyes"; then
-         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
-         export CURL_LIBRARY_PATH
-         AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
-       fi
-    fi
-    CURL_CHECK_OPENSSL_API
-    check_for_ca_bundle=1
-  fi
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-if test X"$OPT_SSL" != Xoff &&
-  test X"$OPT_SSL" != Xno &&
-  test "$OPENSSL_ENABLED" != "1"; then
-  AC_MSG_NOTICE([OPT_SSL: $OPT_SSL])
-  AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
-  AC_MSG_ERROR([--with-ssl was given but OpenSSL could not be detected])
-fi
-
-dnl **********************************************************************
-dnl Check for the random seed preferences
-dnl **********************************************************************
-
-if test X"$OPENSSL_ENABLED" = X"1"; then
-  AC_ARG_WITH(egd-socket,
-  AC_HELP_STRING([--with-egd-socket=FILE],
-                 [Entropy Gathering Daemon socket pathname]),
-      [ EGD_SOCKET="$withval" ]
-  )
-  if test -n "$EGD_SOCKET" ; then
-          AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
-          [your Entropy Gathering Daemon socket pathname] )
-  fi
-
-  dnl Check for user-specified random device
-  AC_ARG_WITH(random,
-  AC_HELP_STRING([--with-random=FILE],
-                 [read randomness from FILE (default=/dev/urandom)]),
-      [ RANDOM_FILE="$withval" ],
-      [
-          if test x$cross_compiling != xyes; then
-            dnl Check for random device
-            AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
-          else
-            AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
-          fi
-      ]
-  )
-  if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
-          AC_SUBST(RANDOM_FILE)
-          AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
-          [a suitable file to read random data from])
-  fi
-fi
-
-dnl ---
-dnl We require OpenSSL with SRP support.
-dnl ---
-if test "$OPENSSL_ENABLED" = "1"; then
-  AC_CHECK_LIB(crypto, SRP_Calc_client_key,
-   [
-     AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key])
-     AC_SUBST(HAVE_OPENSSL_SRP, [1])
-   ])
-fi
-
-dnl ---
-dnl Whether the OpenSSL configuration will be loaded automatically
-dnl ---
-if test X"$OPENSSL_ENABLED" = X"1"; then
-AC_ARG_ENABLE(openssl-auto-load-config,
-AC_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration])
-AC_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]),
-[ if test X"$enableval" = X"no"; then
-    AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled])
-    AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration won't be loaded automatically])
-  fi
-])
-fi
-
-dnl ----------------------------------------------------
-dnl check for GnuTLS
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for GnuTLS files & libraries.
-OPT_GNUTLS=no
-
-AC_ARG_WITH(gnutls,dnl
-AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
-AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
-  OPT_GNUTLS=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_GNUTLS" != Xno; then
-
-    addld=""
-    addlib=""
-    gtlslib=""
-    version=""
-    addcflags=""
-
-    if test "x$OPT_GNUTLS" = "xyes"; then
-      dnl this is with no partiular path given
-      CURL_CHECK_PKGCONFIG(gnutls)
-
-      if test "$PKGCONFIG" != "no" ; then
-        addlib=`$PKGCONFIG --libs-only-l gnutls`
-        addld=`$PKGCONFIG --libs-only-L gnutls`
-        addcflags=`$PKGCONFIG --cflags-only-I gnutls`
-        version=`$PKGCONFIG --modversion gnutls`
-        gtlslib=`echo $addld | $SED -e 's/^-L//'`
-      else
-        dnl without pkg-config, we try libgnutls-config as that was how it
-        dnl used to be done
-        check=`libgnutls-config --version 2>/dev/null`
-        if test -n "$check"; then
-          addlib=`libgnutls-config --libs`
-          addcflags=`libgnutls-config --cflags`
-          version=`libgnutls-config --version`
-          gtlslib=`libgnutls-config --prefix`/lib$libsuff
-        fi
-      fi
-    else
-      dnl this is with a given path, first check if there's a libgnutls-config
-      dnl there and if not, make an educated guess
-      cfg=$OPT_GNUTLS/bin/libgnutls-config
-      check=`$cfg --version 2>/dev/null`
-      if test -n "$check"; then
-        addlib=`$cfg --libs`
-        addcflags=`$cfg --cflags`
-        version=`$cfg --version`
-        gtlslib=`$cfg --prefix`/lib$libsuff
-      else
-        dnl without pkg-config and libgnutls-config, we guess a lot!
-        addlib=-lgnutls
-        addld=-L$OPT_GNUTLS/lib$libsuff
-        addcflags=-I$OPT_GNUTLS/include
-        version="" # we just don't know
-        gtlslib=$OPT_GNUTLS/lib$libsuff
-      fi
-    fi
-
-    if test -z "$version"; then
-      dnl lots of efforts, still no go
-      version="unknown"
-    fi
-
-    if test -n "$addlib"; then
-
-      CLEANLIBS="$LIBS"
-      CLEANCPPFLAGS="$CPPFLAGS"
-      CLEANLDFLAGS="$LDFLAGS"
-
-      LIBS="$addlib $LIBS"
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      dnl this function is selected since it was introduced in 3.1.10
-      AC_CHECK_LIB(gnutls, gnutls_x509_crt_get_dn2,
-       [
-       AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
-       AC_SUBST(USE_GNUTLS, [1])
-       GNUTLS_ENABLED=1
-       USE_GNUTLS="yes"
-       ssl_msg="GnuTLS"
-       test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         LIBS="$CLEANLIBS"
-         CPPFLAGS="$CLEANCPPFLAGS"
-       ])
-
-      if test "x$USE_GNUTLS" = "xyes"; then
-        AC_MSG_NOTICE([detected GnuTLS version $version])
-        check_for_ca_bundle=1
-        if test -n "$gtlslib"; then
-          dnl when shared libs were found in a path that the run-time
-          dnl linker doesn't search through, we need to add it to
-          dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
-          dnl due to this
-          if test "x$cross_compiling" != "xyes"; then
-            CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
-            export CURL_LIBRARY_PATH
-            AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
-          fi
-        fi
-      fi
-
-    fi
-
-  fi dnl GNUTLS not disabled
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-dnl ---
-dnl Check which crypto backend GnuTLS uses
-dnl ---
-
-if test "$GNUTLS_ENABLED" = "1"; then
-  USE_GNUTLS_NETTLE=
-  # First check if we can detect either crypto library via transitive linking
-  AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
-  fi
-  # If not, try linking directly to both of them to see if they are available
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
-  fi
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
-  fi
-  if test "$USE_GNUTLS_NETTLE" = ""; then
-    AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
-  fi
-  if test "$USE_GNUTLS_NETTLE" = "1"; then
-    AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
-    AC_SUBST(USE_GNUTLS_NETTLE, [1])
-    LIBS="-lnettle $LIBS"
-  else
-    LIBS="-lgcrypt $LIBS"
-  fi
-fi
-
-dnl ---
-dnl We require GnuTLS with SRP support.
-dnl ---
-if test "$GNUTLS_ENABLED" = "1"; then
-  AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
-   [
-     AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
-     AC_SUBST(HAVE_GNUTLS_SRP, [1])
-   ])
-fi
-
-dnl ----------------------------------------------------
-dnl check for mbedTLS
-dnl ----------------------------------------------------
-
-OPT_MBEDTLS=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(mbedtls,dnl
-AC_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root])
-AC_HELP_STRING([--without-mbedtls], [disable mbedTLS detection]),
-  OPT_MBEDTLS=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_MBEDTLS" != Xno; then
-
-    if test "$OPT_MBEDTLS" = "yes"; then
-      OPT_MBEDTLS=""
-    fi
-
-    if test -z "$OPT_MBEDTLS" ; then
-      dnl check for lib first without setting any new path
-
-      AC_CHECK_LIB(mbedtls, mbedtls_havege_init,
-      dnl libmbedtls found, set the variable
-       [
-         AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
-         AC_SUBST(USE_MBEDTLS, [1])
-         MBEDTLS_ENABLED=1
-         USE_MBEDTLS="yes"
-         ssl_msg="mbedTLS"
-	 test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-        ], [], -lmbedx509 -lmbedcrypto)
-    fi
-
-    addld=""
-    addlib=""
-    addcflags=""
-    mbedtlslib=""
-
-    if test "x$USE_MBEDTLS" != "xyes"; then
-      dnl add the path and test again
-      addld=-L$OPT_MBEDTLS/lib$libsuff
-      addcflags=-I$OPT_MBEDTLS/include
-      mbedtlslib=$OPT_MBEDTLS/lib$libsuff
-
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      AC_CHECK_LIB(mbedtls, mbedtls_ssl_init,
-       [
-       AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
-       AC_SUBST(USE_MBEDTLS, [1])
-       MBEDTLS_ENABLED=1
-       USE_MBEDTLS="yes"
-       ssl_msg="mbedTLS"
-       test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-       ], -lmbedx509 -lmbedcrypto)
-    fi
-
-    if test "x$USE_MBEDTLS" = "xyes"; then
-      AC_MSG_NOTICE([detected mbedTLS])
-      check_for_ca_bundle=1
-
-      LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
-
-      if test -n "$mbedtlslib"; then
-        dnl when shared libs were found in a path that the run-time
-        dnl linker doesn't search through, we need to add it to
-        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
-        dnl due to this
-        if test "x$cross_compiling" != "xyes"; then
-          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
-          export CURL_LIBRARY_PATH
-          AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH])
-        fi
-      fi
-    fi
-
-  fi dnl mbedTLS not disabled
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-dnl ----------------------------------------------------
-dnl check for wolfSSL
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for wolfSSL files & libraries.
-OPT_WOLFSSL=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-
-AC_ARG_WITH(wolfssl,dnl
-AC_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)])
-AC_HELP_STRING([--without-wolfssl], [disable WolfSSL detection]),
-  OPT_WOLFSSL=$withval)
-
-case "$OPT_WOLFSSL" in
-  yes|no)
-    wolfpkg=""
-    ;;
-  *)
-    wolfpkg="$withval/lib/pkgconfig"
-    ;;
-esac
-
-if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_WOLFSSL" != Xno; then
-
-    if test "$OPT_WOLFSSL" = "yes"; then
-      OPT_WOLFSSL=""
-    fi
-
-    dnl try pkg-config magic
-    CURL_CHECK_PKGCONFIG(wolfssl, [$wolfpkg])
-    AC_MSG_NOTICE([Check dir $wolfpkg])
-
-    addld=""
-    addlib=""
-    addcflags=""
-    if test "$PKGCONFIG" != "no" ; then
-      addlib=`CURL_EXPORT_PCDIR([$wolfpkg])
-        $PKGCONFIG --libs-only-l wolfssl`
-      addld=`CURL_EXPORT_PCDIR([$wolfpkg])
-        $PKGCONFIG --libs-only-L wolfssl`
-      addcflags=`CURL_EXPORT_PCDIR([$wolfpkg])
-        $PKGCONFIG --cflags-only-I wolfssl`
-      version=`CURL_EXPORT_PCDIR([$wolfpkg])
-        $PKGCONFIG --modversion wolfssl`
-      wolfssllibpath=`echo $addld | $SED -e 's/^-L//'`
-    else
-      addlib=-lwolfssl
-      dnl use system defaults if user does not supply a path
-      if test -n "$OPT_WOLFSSL"; then
-        addld=-L$OPT_WOLFSSL/lib$libsuff
-        addcflags=-I$OPT_WOLFSSL/include
-        wolfssllibpath=$OPT_WOLFSSL/lib$libsuff
-      fi
-    fi
-
-    if test "x$USE_WOLFSSL" != "xyes"; then
-
-      LDFLAGS="$LDFLAGS $addld"
-      AC_MSG_NOTICE([Add $addld to LDFLAGS])
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-         AC_MSG_NOTICE([Add $addcflags to CPPFLAGS])
-      fi
-
-      my_ac_save_LIBS="$LIBS"
-      LIBS="$addlib $LIBS"
-      AC_MSG_NOTICE([Add $addlib to LIBS])
-
-      AC_MSG_CHECKING([for wolfSSL_Init in -lwolfssl])
-      AC_LINK_IFELSE([
-	AC_LANG_PROGRAM([[
-/* These aren't needed for detection and confuse WolfSSL.
-   They are set up properly later if it is detected.  */
-#undef SIZEOF_LONG
-#undef SIZEOF_LONG_LONG
-#include <wolfssl/ssl.h>
-	]],[[
-	  return wolfSSL_Init();
-	]])
-      ],[
-         AC_MSG_RESULT(yes)
-         AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled])
-         AC_SUBST(USE_WOLFSSL, [1])
-         WOLFSSL_ENABLED=1
-         USE_WOLFSSL="yes"
-         ssl_msg="WolfSSL"
-	 test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         AC_MSG_RESULT(no)
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-         wolfssllibpath=""
-       ])
-      LIBS="$my_ac_save_LIBS"
-    fi
-
-    if test "x$USE_WOLFSSL" = "xyes"; then
-      AC_MSG_NOTICE([detected wolfSSL])
-      check_for_ca_bundle=1
-
-      dnl wolfssl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
-      AX_COMPILE_CHECK_SIZEOF(long long)
-
-      LIBS="$addlib -lm $LIBS"
-
-      dnl Recent WolfSSL versions build without SSLv3 by default
-      dnl WolfSSL needs configure --enable-opensslextra to have *get_peer*
-      dnl DES* is needed for NTLM support and lives in the OpenSSL compatibility
-      dnl layer
-      AC_CHECK_FUNCS(wolfSSLv3_client_method \
-                     wolfSSL_get_peer_certificate \
-                     wolfSSL_UseALPN )
-
-      dnl if this symbol is present, we want the include path to include the
-      dnl OpenSSL API root as well
-      AC_CHECK_FUNC(wolfSSL_DES_ecb_encrypt,
-        [
-            AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1,
-                      [if you have wolfSSL_DES_ecb_encrypt])
-            if test -n "$addcflags"; then
-              dnl use a for loop to strip off whitespace
-              for f in $addcflags; do
-                CPPFLAGS="$f/wolfssl $CPPFLAGS"
-                AC_MSG_NOTICE([Add $f/wolfssl to CPPFLAGS])
-                break
-              done
-            else
-              dnl user didn't give a path, so guess/hope they installed wolfssl
-              dnl headers to system default location
-              CPPFLAGS="-I$includedir/wolfssl $CPPFLAGS"
-              AC_MSG_NOTICE([Add $includedir/wolfssl to CPPFLAGS])
-            fi
-            WOLFSSL_NTLM=1
-        ]
-        )
-
-      if test -n "$wolfssllibpath"; then
-        dnl when shared libs were found in a path that the run-time
-        dnl linker doesn't search through, we need to add it to
-        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
-        dnl due to this
-        if test "x$cross_compiling" != "xyes"; then
-          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
-          export CURL_LIBRARY_PATH
-          AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH])
-        fi
-      fi
-
-    fi
-
-  fi dnl wolfSSL not disabled
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-dnl ----------------------------------------------------
-dnl check for MesaLink
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for MesaLink files & libraries.
-OPT_MESALINK=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(mesalink,dnl
-AC_HELP_STRING([--with-mesalink=PATH],[where to look for MesaLink, PATH points to the installation root])
-AC_HELP_STRING([--without-mesalink], [disable MesaLink detection]),
-  OPT_MESALINK=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_MESALINK" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_MESALINK" != Xno; then
-
-    if test "$OPT_MESALINK" = "yes"; then
-      OPT_MESALINK=""
-    fi
-
-    if test -z "$OPT_MESALINK" ; then
-      dnl check for lib first without setting any new path
-
-      AC_CHECK_LIB(mesalink, mesalink_library_init,
-      dnl libmesalink found, set the variable
-       [
-         AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled])
-         AC_SUBST(USE_MESALINK, [1])
-         MESALINK_ENABLED=1
-         USE_MESALINK="yes"
-         ssl_msg="MesaLink"
-	 test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-        ])
-    fi
-
-    addld=""
-    addlib=""
-    addcflags=""
-    mesalinklib=""
-
-    if test "x$USE_MESALINK" != "xyes"; then
-      dnl add the path and test again
-      addld=-L$OPT_MESALINK/lib$libsuff
-      addcflags=-I$OPT_MESALINK/include
-      mesalinklib=$OPT_MESALINK/lib$libsuff
-
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      AC_CHECK_LIB(mesalink, mesalink_library_init,
-       [
-       AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled])
-       AC_SUBST(USE_MESALINK, [1])
-       MESALINK_ENABLED=1
-       USE_MESALINK="yes"
-       ssl_msg="MesaLink"
-       test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-       ])
-    fi
-
-    if test "x$USE_MESALINK" = "xyes"; then
-      AC_MSG_NOTICE([detected MesaLink])
-
-      LIBS="-lmesalink $LIBS"
-
-      if test -n "$mesalinklib"; then
-        dnl when shared libs were found in a path that the run-time
-        dnl linker doesn't search through, we need to add it to
-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
-        dnl due to this
-        if test "x$cross_compiling" != "xyes"; then
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib"
-          export LD_LIBRARY_PATH
-          AC_MSG_NOTICE([Added $mesalinklib to LD_LIBRARY_PATH])
-        fi
-      fi
-    fi
-
-  fi dnl MesaLink not disabled
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-dnl ----------------------------------------------------
-dnl check for BearSSL
-dnl ----------------------------------------------------
-
-OPT_BEARSSL=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(bearssl,dnl
-AC_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root])
-AC_HELP_STRING([--without-bearssl], [disable BearSSL detection]),
-  OPT_BEARSSL=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_BEARSSL" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_BEARSSL" != Xno; then
-
-    if test "$OPT_BEARSSL" = "yes"; then
-      OPT_BEARSSL=""
-    fi
-
-    if test -z "$OPT_BEARSSL" ; then
-      dnl check for lib first without setting any new path
-
-      AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
-      dnl libbearssl found, set the variable
-       [
-         AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
-         AC_SUBST(USE_BEARSSL, [1])
-         BEARSSL_ENABLED=1
-         USE_BEARSSL="yes"
-         ssl_msg="BearSSL"
-	 test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-        ], [], -lbearssl)
-    fi
-
-    addld=""
-    addlib=""
-    addcflags=""
-    bearssllib=""
-
-    if test "x$USE_BEARSSL" != "xyes"; then
-      dnl add the path and test again
-      addld=-L$OPT_BEARSSL/lib$libsuff
-      addcflags=-I$OPT_BEARSSL/include
-      bearssllib=$OPT_BEARSSL/lib$libsuff
-
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
-       [
-       AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
-       AC_SUBST(USE_BEARSSL, [1])
-       BEARSSL_ENABLED=1
-       USE_BEARSSL="yes"
-       ssl_msg="BearSSL"
-       test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-       ], -lbearssl)
-    fi
-
-    if test "x$USE_BEARSSL" = "xyes"; then
-      AC_MSG_NOTICE([detected BearSSL])
-      check_for_ca_bundle=1
-
-      LIBS="-lbearssl $LIBS"
-
-      if test -n "$bearssllib"; then
-        dnl when shared libs were found in a path that the run-time
-        dnl linker doesn't search through, we need to add it to
-        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
-        dnl due to this
-        if test "x$cross_compiling" != "xyes"; then
-          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$bearssllib"
-          export CURL_LIBRARY_PATH
-          AC_MSG_NOTICE([Added $bearssllib to CURL_LIBRARY_PATH])
-        fi
-      fi
-    fi
-
-  fi dnl BearSSL not disabled
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-dnl ----------------------------------------------------
-dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for NSS files & libraries.
-OPT_NSS=no
-
-AC_ARG_WITH(nss,dnl
-AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
-AC_HELP_STRING([--without-nss], [disable NSS detection]),
-  OPT_NSS=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then
-  ssl_msg=
-
-  if test X"$OPT_NSS" != Xno; then
-
-    addld=""
-    addlib=""
-    addcflags=""
-    nssprefix=""
-    version=""
-
-    if test "x$OPT_NSS" = "xyes"; then
-
-      CURL_CHECK_PKGCONFIG(nss)
-
-      if test "$PKGCONFIG" != "no" ; then
-        addlib=`$PKGCONFIG --libs nss`
-        addcflags=`$PKGCONFIG --cflags nss`
-        version=`$PKGCONFIG --modversion nss`
-        nssprefix=`$PKGCONFIG --variable=prefix nss`
-      else
-        dnl Without pkg-config, we check for nss-config
-
-        check=`nss-config --version 2>/dev/null`
-        if test -n "$check"; then
-          addlib=`nss-config --libs`
-          addcflags=`nss-config --cflags`
-          version=`nss-config --version`
-          nssprefix=`nss-config --prefix`
-        else
-          addlib="-lnss3"
-          addcflags=""
-          version="unknown"
-        fi
-      fi
-    else
-      NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
-      if test -f "$NSS_PCDIR/nss.pc"; then
-        CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR])
-        if test "$PKGCONFIG" != "no" ; then
-          addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss`
-          addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss`
-          addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss`
-          version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss`
-          nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss`
-        fi
-      fi
-    fi
-
-    if test -z "$addlib"; then
-      # Without pkg-config, we'll kludge in some defaults
-      AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.])
-      addld="-L$OPT_NSS/lib"
-      addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
-      addcflags="-I$OPT_NSS/include"
-      version="unknown"
-      nssprefix=$OPT_NSS
-    fi
-
-    CLEANLDFLAGS="$LDFLAGS"
-    CLEANLIBS="$LIBS"
-    CLEANCPPFLAGS="$CPPFLAGS"
-
-    LDFLAGS="$addld $LDFLAGS"
-    LIBS="$addlib $LIBS"
-    if test "$addcflags" != "-I/usr/include"; then
-       CPPFLAGS="$CPPFLAGS $addcflags"
-    fi
-
-    dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
-    AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
-     [
-     AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
-     AC_SUBST(USE_NSS, [1])
-     USE_NSS="yes"
-     NSS_ENABLED=1
-     ssl_msg="NSS"
-     test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-     ],
-     [
-       LDFLAGS="$CLEANLDFLAGS"
-       LIBS="$CLEANLIBS"
-       CPPFLAGS="$CLEANCPPFLAGS"
-     ])
-
-    if test "x$USE_NSS" = "xyes"; then
-      AC_MSG_NOTICE([detected NSS version $version])
-
-      dnl PK11_CreateManagedGenericObject() was introduced in NSS 3.34 because
-      dnl PK11_DestroyGenericObject() does not release resources allocated by
-      dnl PK11_CreateGenericObject() early enough.
-      AC_CHECK_FUNC(PK11_CreateManagedGenericObject,
-        [
-          AC_DEFINE(HAVE_PK11_CREATEMANAGEDGENERICOBJECT, 1,
-                    [if you have the PK11_CreateManagedGenericObject function])
-        ])
-
-      dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
-      NSS_LIBS=$addlib
-      AC_SUBST([NSS_LIBS])
-
-      dnl when shared libs were found in a path that the run-time
-      dnl linker doesn't search through, we need to add it to
-      dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
-      dnl due to this
-      if test "x$cross_compiling" != "xyes"; then
-        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
-        export CURL_LIBRARY_PATH
-        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH])
-      fi
-
-    fi dnl NSS found
-
-  fi dnl NSS not disabled
-
-  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
-fi
-
-case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED" in
+case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED$RUSTLS_ENABLED"
+in
 x)
   AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
-  AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this.])
+  AC_MSG_WARN([Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl, --with-bearssl or --with-rustls to address this.])
   ;;
 x1)
   # one SSL backend is enabled
@@ -2891,99 +1926,30 @@
 fi
 AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
 
+
 dnl **********************************************************************
-dnl Check for libmetalink
+dnl Check for libgsasl
 dnl **********************************************************************
 
-OPT_LIBMETALINK=no
-
-AC_ARG_WITH(libmetalink,dnl
-AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root])
-AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]),
-  OPT_LIBMETALINK=$withval)
-
-if test X"$OPT_LIBMETALINK" != Xno; then
-
-  addld=""
-  addlib=""
-  addcflags=""
-  version=""
-  libmetalinklib=""
-
-  PKGTEST="no"
-  if test "x$OPT_LIBMETALINK" = "xyes"; then
-    dnl this is with no partiular path given
-    PKGTEST="yes"
-    CURL_CHECK_PKGCONFIG(libmetalink)
-  else
-    dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path.
-    LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
-    AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"])
-    if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
-      PKGTEST="yes"
-    fi
-    if test "$PKGTEST" = "yes"; then
-      CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR])
-    fi
-  fi
-  if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
-    addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
-      $PKGCONFIG --libs-only-l libmetalink`
-    addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
-      $PKGCONFIG --libs-only-L libmetalink`
-    addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
-      $PKGCONFIG --cflags-only-I libmetalink`
-    version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
-      $PKGCONFIG --modversion libmetalink`
-    libmetalinklib=`echo $addld | $SED -e 's/^-L//'`
-  fi
-  if test -n "$addlib"; then
-
-    clean_CPPFLAGS="$CPPFLAGS"
-    clean_LDFLAGS="$LDFLAGS"
-    clean_LIBS="$LIBS"
-    CPPFLAGS="$clean_CPPFLAGS $addcflags"
-    LDFLAGS="$clean_LDFLAGS $addld"
-    LIBS="$addlib $clean_LIBS"
-    AC_MSG_CHECKING([if libmetalink is recent enough])
-    AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[
-#       include <metalink/metalink.h>
-      ]],[[
-        if(0 != metalink_strerror(0)) /* added in 0.1.0 */
-          return 1;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes ($version)])
-      want_metalink="yes"
-    ],[
-      AC_MSG_RESULT([no ($version)])
-      AC_MSG_NOTICE([libmetalink library defective or too old])
-      want_metalink="no"
-    ])
-    if test "x$OPENSSL_ENABLED" != "x1" -a "x$USE_WINDOWS_SSPI" != "x1" \
-        -a "x$GNUTLS_ENABLED" != "x1" -a "x$NSS_ENABLED" != "x1" \
-        -a "x$SECURETRANSPORT_ENABLED" != "x1"; then
-      AC_MSG_WARN([metalink support requires a compatible SSL/TLS backend])
-      want_metalink="no"
-    fi
-    CPPFLAGS="$clean_CPPFLAGS"
-    LDFLAGS="$clean_LDFLAGS"
-    LIBS="$clean_LIBS"
-    if test "$want_metalink" = "yes"; then
-      dnl finally libmetalink will be used
-      AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
-      LIBMETALINK_LIBS=$addlib
-      LIBMETALINK_LDFLAGS=$addld
-      LIBMETALINK_CPPFLAGS=$addcflags
-      AC_SUBST([LIBMETALINK_LIBS])
-      AC_SUBST([LIBMETALINK_LDFLAGS])
-      AC_SUBST([LIBMETALINK_CPPFLAGS])
-      curl_mtlnk_msg="enabled"
-    fi
-
-  fi
+AC_ARG_WITH(libgsasl,
+           AS_HELP_STRING([--without-libgsasl],
+           [disable libgsasl support for SCRAM]),
+           with_libgsasl=$withval,
+           with_libgsasl=yes)
+if test $with_libgsasl != "no"; then
+  AC_SEARCH_LIBS(gsasl_init, gsasl,
+    [curl_gsasl_msg="enabled";
+     AC_DEFINE([USE_GSASL], [1], [GSASL support enabled])
+     ],
+    [curl_gsasl_msg="no      (libgsasl not found)";
+     AC_MSG_WARN([libgsasl was not found])
+     ]
+  )
 fi
+AM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"])
+
+AC_ARG_WITH(libmetalink,,
+  AC_MSG_ERROR([--with-libmetalink no longer works!]))
 
 dnl **********************************************************************
 dnl Check for the presence of LIBSSH2 libraries and headers
@@ -2992,21 +1958,21 @@
 dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
 OPT_LIBSSH2=off
 AC_ARG_WITH(libssh2,dnl
-AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the libssh2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--with-libssh2], [enable libssh2]),
+AS_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the libssh2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AS_HELP_STRING([--with-libssh2], [enable libssh2]),
   OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
 
 
 OPT_LIBSSH=off
 AC_ARG_WITH(libssh,dnl
-AC_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--with-libssh], [enable libssh]),
+AS_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AS_HELP_STRING([--with-libssh], [enable libssh]),
   OPT_LIBSSH=$withval, OPT_LIBSSH=no)
 
 OPT_WOLFSSH=off
 AC_ARG_WITH(wolfssh,dnl
-AC_HELP_STRING([--with-wolfssh=PATH],[Where to look for wolfssh, PATH points to the wolfSSH installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--with-wolfssh], [enable wolfssh]),
+AS_HELP_STRING([--with-wolfssh=PATH],[Where to look for wolfssh, PATH points to the wolfSSH installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AS_HELP_STRING([--with-wolfssh], [enable wolfssh]),
   OPT_WOLFSSH=$withval, OPT_WOLFSSH=no)
 
 if test X"$OPT_LIBSSH2" != Xno; then
@@ -3050,7 +2016,8 @@
   CPPFLAGS="$CPPFLAGS $CPP_SSH2"
   LIBS="$LIB_SSH2 $LIBS"
 
-  AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
+  dnl check for function added in libssh2 version 1.0
+  AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
 
   AC_CHECK_HEADERS(libssh2.h,
     curl_ssh_msg="enabled (libSSH2)"
@@ -3186,8 +2153,8 @@
 dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
 OPT_LIBRTMP=off
 AC_ARG_WITH(librtmp,dnl
-AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
+AS_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AS_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
   OPT_LIBRTMP=$withval)
 
 if test X"$OPT_LIBRTMP" != Xno; then
@@ -3265,8 +2232,8 @@
 versioned_symbols_flavour=
 AC_MSG_CHECKING([whether versioned symbols are wanted])
 AC_ARG_ENABLE(versioned-symbols,
-AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
-AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
+AS_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
+AS_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
 [ case "$enableval" in
   yes) AC_MSG_RESULT(yes)
     AC_MSG_CHECKING([if libraries can be versioned])
@@ -3317,8 +2284,8 @@
 AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
 OPT_WINIDN="default"
 AC_ARG_WITH(winidn,
-AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
-AC_HELP_STRING([--without-winidn], [disable Windows native IDN]),
+AS_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
+AS_HELP_STRING([--without-winidn], [disable Windows native IDN]),
   OPT_WINIDN=$withval)
 case "$OPT_WINIDN" in
   no|default)
@@ -3395,8 +2362,8 @@
 AC_MSG_CHECKING([whether to build with libidn2])
 OPT_IDN="default"
 AC_ARG_WITH(libidn2,
-AC_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
-AC_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
+AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
+AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
   [OPT_IDN=$withval])
 case "$OPT_IDN" in
   no)
@@ -3530,8 +2497,8 @@
 fi
 
 AC_ARG_WITH(nghttp2,
-AC_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
-AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
+AS_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
+AS_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
   [OPT_H2=$withval])
 case "$OPT_H2" in
   no)
@@ -3550,7 +2517,6 @@
     ;;
 esac
 
-curl_h2_msg="no      (--with-nghttp2)"
 if test X"$want_h2" != Xno; then
   dnl backup the pre-nghttp2 variables
   CLEANLDFLAGS="$LDFLAGS"
@@ -3575,10 +2541,11 @@
     LDFLAGS="$LDFLAGS $LD_H2"
     CPPFLAGS="$CPPFLAGS $CPP_H2"
     LIBS="$LIB_H2 $LIBS"
+    LIB_H2_NAME=${LIB_H2#"-l"}
 
     # use nghttp2_session_set_local_window_size to require nghttp2
     # >= 1.12.0
-    AC_CHECK_LIB(nghttp2, nghttp2_session_set_local_window_size,
+    AC_CHECK_LIB($LIB_H2_NAME, nghttp2_session_set_local_window_size,
       [
        AC_CHECK_HEADERS(nghttp2/nghttp2.h,
           curl_h2_msg="enabled (nghttp2)"
@@ -3609,7 +2576,6 @@
 dnl **********************************************************************
 
 OPT_TCP2="yes"
-curl_h3_msg="no      (--with-ngtcp2, --with-quiche)"
 
 if test "x$disable_http" = "xyes"; then
   # without HTTP, ngtcp2 is no use
@@ -3617,8 +2583,8 @@
 fi
 
 AC_ARG_WITH(ngtcp2,
-AC_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
-AC_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
+AS_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
+AS_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
   [OPT_TCP2=$withval])
 case "$OPT_TCP2" in
   no)
@@ -3816,8 +2782,8 @@
 fi
 
 AC_ARG_WITH(nghttp3,
-AC_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
-AC_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
+AS_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
+AS_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
   [OPT_NGHTTP3=$withval])
 case "$OPT_NGHTTP3" in
   no)
@@ -3899,7 +2865,7 @@
 dnl Check for quiche (QUIC)
 dnl **********************************************************************
 
-OPT_QUICHE="yes"
+OPT_QUICHE="no"
 
 if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
   # without HTTP or with ngtcp2, quiche is no use
@@ -3907,8 +2873,8 @@
 fi
 
 AC_ARG_WITH(quiche,
-AC_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
-AC_HELP_STRING([--without-quiche],[Disable quiche usage]),
+AS_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
+AS_HELP_STRING([--without-quiche],[Disable quiche usage]),
   [OPT_QUICHE=$withval])
 case "$OPT_QUICHE" in
   no)
@@ -3968,12 +2934,15 @@
           CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
           export CURL_LIBRARY_PATH
           AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]),
+          [],
+          [
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+          ]
        )
       ],
         dnl not found, revert back to clean variables
-        LDFLAGS=$CLEANLDFLAGS
-        CPPFLAGS=$CLEANCPPFLAGS
-        LIBS=$CLEANLIBS
+        AC_MSG_ERROR([couldn't use quiche])
     )
   else
     dnl no quiche pkg-config found, deal with it
@@ -3991,8 +2960,8 @@
 
 OPT_ZSH_FPATH=default
 AC_ARG_WITH(zsh-functions-dir,
-AC_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
-AC_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
+AS_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
+AS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
   [OPT_ZSH_FPATH=$withval])
 case "$OPT_ZSH_FPATH" in
   no)
@@ -4016,8 +2985,8 @@
 
 OPT_FISH_FPATH=default
 AC_ARG_WITH(fish-functions-dir,
-AC_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
-AC_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
+AS_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
+AS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
   [OPT_FISH_FPATH=$withval])
 case "$OPT_FISH_FPATH" in
   no)
@@ -4040,13 +3009,6 @@
     ;;
 esac
 
-dnl **********************************************************************
-dnl Back to "normal" configuring
-dnl **********************************************************************
-
-dnl Checks for header files.
-AC_HEADER_STDC
-
 CURL_CHECK_HEADER_MALLOC
 CURL_CHECK_HEADER_MEMORY
 
@@ -4075,10 +3037,8 @@
         sys/param.h \
         termios.h \
         termio.h \
-        sgtty.h \
         fcntl.h \
         alloca.h \
-        time.h \
         io.h \
         pwd.h \
         utime.h \
@@ -4132,7 +3092,7 @@
 AC_C_CONST
 CURL_CHECK_VARIADIC_MACROS
 AC_TYPE_SIZE_T
-AC_HEADER_TIME
+
 CURL_CHECK_STRUCT_TIMEVAL
 CURL_VERIFY_RUNTIMELIBS
 
@@ -4247,8 +3207,6 @@
 
 TYPE_SIG_ATOMIC_T
 
-AC_TYPE_SIGNAL
-
 CURL_CHECK_FUNC_SELECT
 
 CURL_CHECK_FUNC_RECV
@@ -4262,13 +3220,9 @@
 CURL_CHECK_FUNC_CONNECT
 CURL_CHECK_FUNC_FCNTL
 CURL_CHECK_FUNC_FREEADDRINFO
-CURL_CHECK_FUNC_FREEIFADDRS
 CURL_CHECK_FUNC_FSETXATTR
 CURL_CHECK_FUNC_FTRUNCATE
 CURL_CHECK_FUNC_GETADDRINFO
-CURL_CHECK_FUNC_GAI_STRERROR
-CURL_CHECK_FUNC_GETHOSTBYADDR
-CURL_CHECK_FUNC_GETHOSTBYADDR_R
 CURL_CHECK_FUNC_GETHOSTBYNAME
 CURL_CHECK_FUNC_GETHOSTBYNAME_R
 CURL_CHECK_FUNC_GETHOSTNAME
@@ -4276,9 +3230,7 @@
 CURL_CHECK_FUNC_GETSOCKNAME
 CURL_CHECK_FUNC_IF_NAMETOINDEX
 CURL_CHECK_FUNC_GETIFADDRS
-CURL_CHECK_FUNC_GETSERVBYPORT_R
 CURL_CHECK_FUNC_GMTIME_R
-CURL_CHECK_FUNC_INET_NTOA_R
 CURL_CHECK_FUNC_INET_NTOP
 CURL_CHECK_FUNC_INET_PTON
 CURL_CHECK_FUNC_IOCTL
@@ -4299,7 +3251,6 @@
 CURL_CHECK_FUNC_STRDUP
 CURL_CHECK_FUNC_STRERROR_R
 CURL_CHECK_FUNC_STRICMP
-CURL_CHECK_FUNC_STRNCASECMP
 CURL_CHECK_FUNC_STRNCMPI
 CURL_CHECK_FUNC_STRNICMP
 CURL_CHECK_FUNC_STRSTR
@@ -4435,9 +3386,9 @@
 dnl
 AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
 AC_ARG_ENABLE(pthreads,
-AC_HELP_STRING([--enable-pthreads],
+AS_HELP_STRING([--enable-pthreads],
                [Enable POSIX threads (default for threaded resolver)])
-AC_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
+AS_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
 [ case "$enableval" in
   no)  AC_MSG_RESULT(no)
        want_pthreads=no
@@ -4501,6 +3452,8 @@
       if test "$USE_THREADS_POSIX" != "1"
       then
         CFLAGS="$CFLAGS -pthread"
+        # assign PTHREAD for pkg-config use
+        PTHREAD=" -pthread"
         AC_CHECK_LIB(pthread, pthread_create,
                      [USE_THREADS_POSIX=1],
                      [ CFLAGS="$save_CFLAGS"])
@@ -4536,8 +3489,8 @@
 dnl
 AC_MSG_CHECKING([whether to enable verbose strings])
 AC_ARG_ENABLE(verbose,
-AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
-AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
+AS_HELP_STRING([--enable-verbose],[Enable verbose strings])
+AS_HELP_STRING([--disable-verbose],[Disable verbose strings]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4555,8 +3508,8 @@
 dnl
 AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
 AC_ARG_ENABLE(sspi,
-AC_HELP_STRING([--enable-sspi],[Enable SSPI])
-AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
+AS_HELP_STRING([--enable-sspi],[Enable SSPI])
+AS_HELP_STRING([--disable-sspi],[Disable SSPI]),
 [ case "$enableval" in
   yes)
        if test "$curl_cv_native_windows" = "yes"; then
@@ -4591,8 +3544,8 @@
 dnl
 AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
 AC_ARG_ENABLE(crypto-auth,
-AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
-AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
+AS_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
+AS_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4605,6 +3558,25 @@
        AC_MSG_RESULT(yes)
 )
 
+dnl ************************************************************
+dnl disable NTLM support
+dnl
+AC_MSG_CHECKING([whether to support NTLM])
+AC_ARG_ENABLE(ntlm,
+AS_HELP_STRING([--enable-ntlm],[Enable NTLM support])
+AS_HELP_STRING([--disable-ntlm],[Disable NTLM support]),
+[ case "$enableval" in
+  no)
+       AC_MSG_RESULT(no)
+       AC_DEFINE(CURL_DISABLE_NTLM, 1, [to disable NTLM support])
+       CURL_DISABLE_NTLM=1
+       ;;
+  *)   AC_MSG_RESULT(yes)
+       ;;
+  esac ],
+       AC_MSG_RESULT(yes)
+)
+
 CURL_CHECK_OPTION_NTLM_WB
 
 CURL_CHECK_NTLM_WB
@@ -4614,8 +3586,8 @@
 dnl
 AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
 AC_ARG_ENABLE(tls-srp,
-AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
-AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
+AS_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
+AS_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4640,8 +3612,8 @@
 dnl
 AC_MSG_CHECKING([whether to enable Unix domain sockets])
 AC_ARG_ENABLE(unix-sockets,
-AC_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
-AC_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
+AS_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
+AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
 [ case "$enableval" in
   no)  AC_MSG_RESULT(no)
        want_unix_sockets=no
@@ -4673,8 +3645,8 @@
 dnl
 AC_MSG_CHECKING([whether to support cookies])
 AC_ARG_ENABLE(cookies,
-AC_HELP_STRING([--enable-cookies],[Enable cookies support])
-AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
+AS_HELP_STRING([--enable-cookies],[Enable cookies support])
+AS_HELP_STRING([--disable-cookies],[Disable cookies support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4691,8 +3663,8 @@
 dnl
 AC_MSG_CHECKING([whether to support socketpair])
 AC_ARG_ENABLE(socketpair,
-AC_HELP_STRING([--enable-socketpair],[Enable socketpair support])
-AC_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
+AS_HELP_STRING([--enable-socketpair],[Enable socketpair support])
+AS_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4709,8 +3681,8 @@
 dnl
 AC_MSG_CHECKING([whether to support HTTP authentication])
 AC_ARG_ENABLE(http-auth,
-AC_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
-AC_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
+AS_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
+AS_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4727,8 +3699,8 @@
 dnl
 AC_MSG_CHECKING([whether to support DoH])
 AC_ARG_ENABLE(doh,
-AC_HELP_STRING([--enable-doh],[Enable DoH support])
-AC_HELP_STRING([--disable-doh],[Disable DoH support]),
+AS_HELP_STRING([--enable-doh],[Enable DoH support])
+AS_HELP_STRING([--disable-doh],[Disable DoH support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4745,8 +3717,8 @@
 dnl
 AC_MSG_CHECKING([whether to support the MIME API])
 AC_ARG_ENABLE(mime,
-AC_HELP_STRING([--enable-mime],[Enable mime API support])
-AC_HELP_STRING([--disable-mime],[Disable mime API support]),
+AS_HELP_STRING([--enable-mime],[Enable mime API support])
+AS_HELP_STRING([--disable-mime],[Disable mime API support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4763,8 +3735,8 @@
 dnl
 AC_MSG_CHECKING([whether to support date parsing])
 AC_ARG_ENABLE(dateparse,
-AC_HELP_STRING([--enable-dateparse],[Enable date parsing])
-AC_HELP_STRING([--disable-dateparse],[Disable date parsing]),
+AS_HELP_STRING([--enable-dateparse],[Enable date parsing])
+AS_HELP_STRING([--disable-dateparse],[Disable date parsing]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4781,8 +3753,8 @@
 dnl
 AC_MSG_CHECKING([whether to support netrc parsing])
 AC_ARG_ENABLE(netrc,
-AC_HELP_STRING([--enable-netrc],[Enable netrc parsing])
-AC_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
+AS_HELP_STRING([--enable-netrc],[Enable netrc parsing])
+AS_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4799,8 +3771,8 @@
 dnl
 AC_MSG_CHECKING([whether to support progress-meter])
 AC_ARG_ENABLE(progress-meter,
-AC_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
-AC_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
+AS_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
+AS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4817,8 +3789,8 @@
 dnl
 AC_MSG_CHECKING([whether to support DNS shuffling])
 AC_ARG_ENABLE(dnsshuffle,
-AC_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
-AC_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
+AS_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
+AS_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4834,9 +3806,9 @@
 dnl disable the curl_easy_options API
 dnl
 AC_MSG_CHECKING([whether to support curl_easy_option*])
-AC_ARG_ENABLE(get-easy-option,
-AC_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
-AC_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
+AC_ARG_ENABLE(get-easy-options,
+AS_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
+AS_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
@@ -4851,26 +3823,51 @@
 dnl ************************************************************
 dnl switch on/off alt-svc
 dnl
-curl_altsvc_msg="no      (--enable-alt-svc)";
 AC_MSG_CHECKING([whether to support alt-svc])
 AC_ARG_ENABLE(alt-svc,
-AC_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
-AC_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
+AS_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
+AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
+       AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
+       curl_altsvc_msg="no";
+       enable_altsvc="no"
        ;;
   *) AC_MSG_RESULT(yes)
-       curl_altsvc_msg="enabled";
-       enable_altsvc="yes"
        ;;
   esac ],
        AC_MSG_RESULT(no)
 )
 
-if test "$enable_altsvc" = "yes"; then
-  AC_DEFINE(USE_ALTSVC, 1, [to enable alt-svc])
-  experimental="$experimental alt-svc"
+dnl only check for HSTS if there's SSL present
+if test -n "$SSL_ENABLED"; then
+
+  dnl ************************************************************
+  dnl switch on/off hsts
+  dnl
+  AC_MSG_CHECKING([whether to support HSTS])
+  AC_ARG_ENABLE(hsts,
+  AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
+  AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
+  [ case "$enableval" in
+    no)
+       AC_MSG_RESULT(no)
+       enable_hsts="no"
+       ;;
+    *) AC_MSG_RESULT(yes)
+       ;;
+    esac ],
+       AC_MSG_RESULT(no)
+  )
+else
+  AC_MSG_NOTICE([disables HSTS due to lack of SSL])
+  enable_hsts="no"
+fi
+
+if test "x$enable_hsts" != "xyes"; then
+  curl_hsts_msg="no      (--enable-hsts)";
+  AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc])
 fi
 
 dnl *************************************************************
@@ -4911,7 +3908,7 @@
 dnl
 dnl All the library dependencies put into $LIB apply to libcurl only.
 dnl
-LIBCURL_LIBS=$LIBS
+LIBCURL_LIBS="$LIBS$PTHREAD"
 
 AC_SUBST(LIBCURL_LIBS)
 AC_SUBST(CURL_NETWORK_LIBS)
@@ -4986,9 +3983,16 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
 fi
 
+if test "x$curl_gsasl_msg" = "xenabled"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
+fi
+
 if test "x$enable_altsvc" = "xyes"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
 fi
+if test "x$enable_hsts" = "xyes"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
+fi
 
 if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
     \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
@@ -5000,11 +4004,20 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
 fi
 
-if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
-  if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
-      -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \
+use_curl_ntlm_core=no
+
+if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
+    "x$CURL_DISABLE_NTLM" != "x1"; then
+  if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
+      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
+      -o "x$SECURETRANSPORT_ENABLED" = "x1" \
+      -o "x$USE_WIN32_CRYPTO" = "x1" \
       -o "x$WOLFSSL_NTLM" = "x1"; then
+    use_curl_ntlm_core=yes
+  fi
+
+  if test "x$use_curl_ntlm_core" = "xyes" \
+      -o "x$USE_WINDOWS_SSPI" = "x1"; then
     SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
 
     if test "x$CURL_DISABLE_HTTP" != "x1" -a \
@@ -5018,7 +4031,7 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
 fi
 
-if test "x$USE_NGHTTP2" = "x1"; then
+if test "x$USE_NGHTTP2" = "x1" -o "x$USE_HYPER" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
 fi
 
@@ -5042,6 +4055,13 @@
   SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
 fi
 
+if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
+  if test ${ac_cv_sizeof_off_t} -gt 4 -o \
+     "$curl_win32_file_api" = "win32_large_files"; then
+    SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
+  fi
+fi
+
 dnl replace spaces with newlines
 dnl sort the lines
 dnl replace the newlines back to spaces
@@ -5084,6 +4104,9 @@
 fi
 if test "x$CURL_DISABLE_GOPHER" != "x1"; then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
+  if test "x$SSL_ENABLED" = "x1"; then
+    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
+  fi
 fi
 if test "x$CURL_DISABLE_MQTT" != "x1"; then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
@@ -5101,11 +4124,7 @@
   fi
 fi
 if test "x$CURL_DISABLE_SMB" != "x1" \
-    -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \
-    -a \( "x$OPENSSL_ENABLED" = "x1" \
-      -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
-      -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \
-      -o "x$WOLFSSL_NTLM" = "x1" \); then
+    -a "x$use_curl_ntlm_core" = "xyes"; then
   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
   if test "x$SSL_ENABLED" = "x1"; then
     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
@@ -5214,6 +4233,7 @@
   brotli:           ${curl_brotli_msg}
   zstd:             ${curl_zstd_msg}
   GSS-API:          ${curl_gss_msg}
+  GSASL:            ${curl_gsasl_msg}
   TLS-SRP:          ${curl_tls_srp_msg}
   resolver:         ${curl_res_msg}
   IPv6:             ${curl_ipv6_msg}
@@ -5232,9 +4252,10 @@
   LDAPS:            ${curl_ldaps_msg}
   RTSP:             ${curl_rtsp_msg}
   RTMP:             ${curl_rtmp_msg}
-  Metalink:         ${curl_mtlnk_msg}
   PSL:              ${curl_psl_msg}
   Alt-svc:          ${curl_altsvc_msg}
+  HSTS:             ${curl_hsts_msg}
+  HTTP1:            ${curl_h1_msg}
   HTTP2:            ${curl_h2_msg}
   HTTP3:            ${curl_h3_msg}
   ECH:              ${curl_ech_msg}
diff --git a/curl-config.in b/curl-config.in
index 18b1fc1..8b4a29a 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/ALTSVC.md b/docs/ALTSVC.md
index 6a462bb..25437d6 100644
--- a/docs/ALTSVC.md
+++ b/docs/ALTSVC.md
@@ -1,11 +1,13 @@
 # Alt-Svc
 
-curl features **EXPERIMENTAL** support for the Alt-Svc: HTTP header.
+curl features support for the Alt-Svc: HTTP header.
 
 ## Enable Alt-Svc in build
 
 `./configure --enable-alt-svc`
 
+(enabled by default since 7.73.0)
+
 ## Standard
 
 [RFC 7838](https://tools.ietf.org/html/rfc7838)
diff --git a/docs/BINDINGS.md b/docs/BINDINGS.md
index d0e80b8..919e2d2 100644
--- a/docs/BINDINGS.md
+++ b/docs/BINDINGS.md
@@ -59,7 +59,7 @@
 
 [Lisp](https://common-lisp.net/project/cl-curl/) Written by Liam Healy
 
-Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel
+Lua: [luacurl](https://web.archive.org/web/20201205052437/http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel
 
 [Mono](https://forge.novell.com/modules/xfmod/project/?libcurl-mono) Written by Jeffrey Phillips
 
@@ -100,7 +100,7 @@
 
 [Rust](https://github.com/carllerche/curl-rust) curl-rust - by Carl Lerche
 
-[Scheme](https://www.metapaper.net/lisovsky/web/curl/) Bigloo binding by Kirill Lisovsky
+[Scheme](http://www.metapaper.net/lisovsky/web/curl/) Bigloo binding by Kirill Lisovsky
 
 [Scilab](https://help.scilab.org/docs/current/fr_FR/getURL.html) binding by Sylvestre Ledru
 
diff --git a/docs/BUFREF.md b/docs/BUFREF.md
new file mode 100644
index 0000000..2697919
--- /dev/null
+++ b/docs/BUFREF.md
@@ -0,0 +1,81 @@
+# bufref
+
+This is an internal module for handling buffer references. A referenced
+buffer is associated with its destructor function that is implicitly called
+when the reference is invalidated. Once referenced, a buffer cannot be
+reallocated.
+
+A data length is stored within the reference for binary data handling
+purpose; it is not used by the bufref API.
+
+The `struct bufref` is used to hold data referencing a buffer. The members of
+that structure **MUST NOT** be accessed or modified without using the dedicated
+bufref API.
+
+## init
+
+```c
+void Curl_bufref_init(struct bufref *br);
+```
+
+Initialises a `bufref` structure. This function **MUST** be called before any
+other operation is performed on the structure.
+
+Upon completion, the referenced buffer is `NULL` and length is zero.
+
+This function may also be called to bypass referenced buffer destruction while
+invalidating the current reference.
+
+## free
+
+```c
+void Curl_bufref_free(struct bufref *br);
+```
+
+Destroys the previously referenced buffer using its destructor and
+reinitialises the structure for a possible subsequent reuse.
+
+## set
+
+```c
+void Curl_bufref_set(struct bufref *br, const void *buffer, size_t length,
+                     void (*destructor)(void *));
+```
+
+Releases the previously referenced buffer, then assigns the new `buffer` to
+the structure, associated with its `destructor` function. The later can be
+specified as `NULL`: this will be the case when the referenced buffer is
+static.
+
+if `buffer` is NULL, `length`must be zero.
+
+## memdup
+
+```c
+CURLcode Curl_bufref_memdup(struct bufref *br, const void *data, size_t length);
+```
+
+Releases the previously referenced buffer, then duplicates the `length`-byte
+`data` into a buffer allocated via `malloc()` and references the latter
+associated with destructor `curl_free()`.
+
+An additional trailing byte is allocated and set to zero as a possible
+string zero-terminator; it is not counted in the stored length.
+
+Returns `CURLE_OK` if successful, else `CURLE_OUT_OF_MEMORY`.
+
+## ptr
+
+```c
+const unsigned char *Curl_bufref_ptr(const struct bufref *br);
+```
+
+Returns a `const unsigned char *` to the referenced buffer.
+
+## len
+
+```c
+size_t Curl_bufref_len(const struct bufref *br);
+```
+
+Returns the stored length of the referenced buffer.
diff --git a/docs/BUG-BOUNTY.md b/docs/BUG-BOUNTY.md
index 8ee9ac6..5cbb343 100644
--- a/docs/BUG-BOUNTY.md
+++ b/docs/BUG-BOUNTY.md
@@ -22,7 +22,7 @@
 
 # What are the reward amounts?
 
-The curl projects offer monetary compensation for reported and published
+The curl project offers monetary compensation for reported and published
 security vulnerabilities. The amount of money that is rewarded depends on how
 serious the flaw is determined to be.
 
@@ -46,18 +46,14 @@
 Bounties need to be requested within twelve months from the publication of the
 vulnerability.
 
-The vulnerabilities must not have been made public before February 1st, 2019.
-We do not retroactively pay for old, already known, or published security
-problems.
-
 # Product vulnerabilities only
 
 This bug bounty only concerns the curl and libcurl products and thus their
 respective source codes - when running on existing hardware. It does not
 include documentation, websites, or other infrastructure.
 
-The curl security team will be the sole arbiter if a reported flaw can be
-subject to a bounty or not.
+The curl security team is the sole arbiter if a reported flaw is subject to a
+bounty or not.
 
 # How are vulnerabilities graded?
 
@@ -85,22 +81,3 @@
 taxes on the reward money, the responsibility lies with the receiver. The
 curl project or its security team never actually receive any of this money,
 hold the money, or pay out the money.
-
-## Bonus levels
-
-In cooperation with [Dropbox](https://www.dropbox.com) the curl bug bounty can
-offer the highest levels of rewards if the issue covers one of the interest
-areas of theirs - and only if the bug is graded *high* or *critical*. A
-non-exhaustive list of vulnerabilities Dropbox is interested in are:
-
- - RCE
- - URL parsing vulnerabilities with demonstrable security impact
-
-Dropbox would generally hand out rewards for critical vulnerabilities ranging
-from 12k-32k USD where RCE is on the upper end of the spectrum.
-
-URL parsing vulnerabilities with demonstrable security impact might include
-incorrectly determining the authority of a URL when a special character is
-inserted into the path of the URL (as a hypothetical). This type of
-vulnerability would likely yield 6k-12k unless further impact could be
-demonstrated.
diff --git a/docs/BUGS.md b/docs/BUGS.md
index cc09a5d..2c0a301 100644
--- a/docs/BUGS.md
+++ b/docs/BUGS.md
@@ -20,7 +20,7 @@
  Please read the rest of this document below first before doing that!
 
  If you feel you need to ask around first, find a suitable [mailing list](
- https://curl.haxx.se/mail/) and post your questions there.
+ https://curl.se/mail/) and post your questions there.
 
 ## Security bugs
 
@@ -34,12 +34,12 @@
  HackerOne](https://hackerone.com/curl).
 
  This ensures that the report reaches the curl security team so that they
- first can be deal with the report away from the public to minimize the harm
+ first can deal with the report away from the public to minimize the harm
  and impact it will have on existing users out there who might be using the
  vulnerable versions.
 
  The curl project's process for handling security related issues is
- [documented separately](https://curl.haxx.se/dev/secprocess.html).
+ [documented separately](https://curl.se/dev/secprocess.html).
 
 ## What to report
 
@@ -67,7 +67,7 @@
 
  If curl crashed, causing a core dump (in unix), there is hardly any use to
  send that huge file to anyone of us. Unless we have an exact same system
- setup as you, we can't do much with it. Instead we ask you to get a stack
+ setup as you, we can't do much with it. Instead, we ask you to get a stack
  trace and send that (much smaller) output to us instead!
 
  The address and how to subscribe to the mailing lists are detailed in the
@@ -144,7 +144,7 @@
 
  The curl project typically releases new versions every other month, and we
  fix several hundred bugs per year. For a huge table of releases, number of
- bug fixes and more, see: https://curl.haxx.se/docs/releases.html
+ bug fixes and more, see: https://curl.se/docs/releases.html
 
  The developers in the curl project do not have bandwidth or energy enough to
  maintain several branches or to spend much time on hunting down problems in
@@ -168,9 +168,9 @@
  experiencing.
 
  Security wise, it is almost always a bad idea to lag behind the current curl
- versions by a lot. We keeping discovering and reporting security problems
+ versions by a lot. We keep discovering and reporting security problems
  over time see you can see in [this
- table](https://curl.haxx.se/docs/vulnerabilities.html)
+ table](https://curl.se/docs/vulnerabilities.html)
 
 # Bug fixing procedure
 
@@ -221,8 +221,8 @@
  "nobody cares enough about it to work on it" category. Such bugs are
  perfectly valid problems that *should* get fixed but apparently aren't. We
  try to mark such bugs as `KNOWN_BUGS material` after a time of inactivity and
- if no activity is noticed after yet some time those bugs are added to
- `KNOWN_BUGS` and are closed in the issue tracker.
+ if no activity is noticed after yet some time those bugs are added to the
+ `KNOWN_BUGS` document and are closed in the issue tracker.
 
 ## `KNOWN_BUGS`
 
@@ -232,8 +232,8 @@
  considered these problems to be important enough to spend the necessary time
  and effort to have them fixed.
 
- The `KNOWN_BUGS` are always up for grabs and we will always love the ones who
- bring one of them back to live and offers solutions to them.
+ The `KNOWN_BUGS` items are always up for grabs and we love the ones who bring
+ one of them back to life and offer solutions to them.
 
  The `KNOWN_BUGS` document has a sibling document known as `TODO`.
 
@@ -242,7 +242,7 @@
  Issues that are filed or reported that aren't really bugs but more missing
  features or ideas for future improvements and so on are marked as
  'enhancement' or 'feature-request' and will be added to the `TODO` document
- instead and the issue is closed. We don't keep TODO items in the issue
+ and the issues are closed. We don't keep TODO items open in the issue
  tracker.
 
  The `TODO` document is full of ideas and suggestions of what we can add or
@@ -251,8 +251,8 @@
  implemented or provided in the project so that you can work on ticking it odd
  that document.
 
- If the issue is rather a bug and not a missing feature or functionality, it
- is listed in `KNOWN_BUGS` instead.
+ If an issue is rather a bug and not a missing feature or functionality, it is
+ listed in `KNOWN_BUGS` instead.
 
 ## Closing off stalled bugs
 
@@ -262,5 +262,5 @@
  abandoned or in other ways dormant will be closed and sometimes added to
  `TODO` and `KNOWN_BUGS` instead.
 
- This way, we only have "active" issues open on github. Irrelevant issues and
+ This way, we only have "active" issues open on GitHub. Irrelevant issues and
  pull requests will not distract developers or casual visitors.
diff --git a/docs/CHECKSRC.md b/docs/CHECKSRC.md
index d36763b..2f634c4 100644
--- a/docs/CHECKSRC.md
+++ b/docs/CHECKSRC.md
@@ -33,8 +33,9 @@
 - `ASSIGNWITHINCONDITION`: Assignment within a conditional expression. The
   code style mandates the assignment to be done outside of it.
 
-- `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the more
-   appropriate `char *name` style. The asterisk should sit next to the name.
+- `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the
+   more appropriate `char *name` style. The asterisk should sit next to the
+   name.
 
 - `ASTERISKSPACE`: A pointer was declared like `char * name` instead of the
    more appropriate `char *name` style. The asterisk should sit right next to
@@ -47,16 +48,28 @@
    strcat, strncat, gets are **never** allowed in curl source code.
 
 - `BRACEELSE`: '} else' on the same line. The else is supposed to be on the
-  following line.
+   following line.
 
 - `BRACEPOS`: wrong position for an open brace (`{`).
 
+- `BRACEWHILE`: more than once space between end brace and while keyword
+
 - `COMMANOSPACE`: a comma without following space
 
 - `COPYRIGHT`: the file is missing a copyright statement!
 
 - `CPPCOMMENTS`: `//` comment detected, that's not C89 compliant
 
+- `DOBRACE`: only use one space after do before open brace
+
+- `EMPTYLINEBRACE`: found empty line before open brace
+
+- `EQUALSNOSPACE`: no space after `=` sign
+
+- `EQUALSNULL`: comparison with `== NULL` used in if/while. We use `!var`.
+
+- `EXCLAMATIONSPACE`: space found after exclamations mark
+
 - `FOPENMODE`: `fopen()` needs a macro for the mode string, use it
 
 - `INDENTATION`: detected a wrong start column for code. Note that this
@@ -70,6 +83,8 @@
 - `NOSPACEEQUALS`: An equals sign was found without preceding space. We prefer
   `a = 2` and *not* `a=2`.
 
+- `NOTEQUALSZERO`: check found using `!= 0`. We use plain `if(var)`.
+
 - `ONELINECONDITION`: do not put the conditional block on the same line as `if()`
 
 - `OPENCOMMENT`: File ended with a comment (`/*`) still "open".
diff --git a/docs/CIPHERS.md b/docs/CIPHERS.md
index 19aedf3..af8f2f4 100644
--- a/docs/CIPHERS.md
+++ b/docs/CIPHERS.md
@@ -1,15 +1,15 @@
 # Ciphers
 
 With curl's options
-[`CURLOPT_SSL_CIPHER_LIST`](https://curl.haxx.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html)
+[`CURLOPT_SSL_CIPHER_LIST`](https://curl.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html)
 and
-[`--ciphers`](https://curl.haxx.se/docs/manpage.html#--ciphers)
+[`--ciphers`](https://curl.se/docs/manpage.html#--ciphers)
 users can control which ciphers to consider when negotiating TLS connections.
 
 TLS 1.3 ciphers are supported since curl 7.61 for OpenSSL 1.1.1+ with options
-[`CURLOPT_TLS13_CIPHERS`](https://curl.haxx.se/libcurl/c/CURLOPT_TLS13_CIPHERS.html)
+[`CURLOPT_TLS13_CIPHERS`](https://curl.se/libcurl/c/CURLOPT_TLS13_CIPHERS.html)
 and
-[`--tls13-ciphers`](https://curl.haxx.se/docs/manpage.html#--tls13-ciphers)
+[`--tls13-ciphers`](https://curl.se/docs/manpage.html#--tls13-ciphers)
 . If you are using a different SSL backend you can try setting TLS 1.3 cipher
 suites by using the respective regular cipher option.
 
@@ -514,3 +514,9 @@
 `CALG_ECMQV`,
 `CALG_ECDSA`,
 `CALG_ECDH_EPHEM`,
+
+As of curl 7.77.0, you can also pass `SCH_USE_STRONG_CRYPTO` as a cipher name
+to [constrain the set of available ciphers as specified in the schannel
+documentation](https://docs.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-server-2022).
+Note that the supported ciphers in this case follows the OS version, so if you
+are running an outdated OS you might still be supporting weak ciphers.
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 22863bc..b3230ec 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/CODE_REVIEW.md b/docs/CODE_REVIEW.md
index f55cb09..e6a28a6 100644
--- a/docs/CODE_REVIEW.md
+++ b/docs/CODE_REVIEW.md
@@ -19,7 +19,7 @@
 ## How to provide feedback to author
 
 Be nice. Ask questions. Provide examples or suggestions of improvements.
-Assume best intentions. Remember language barriers.
+Assume the best intentions. Remember language barriers.
 
 All first-time contributors can become regulars. Let's help them go there.
 
@@ -43,7 +43,7 @@
 ## Code style
 
 Most code style nits are detected by checksrc but not all. Only leave remarks
-on style deviation once checksrc doesn't find any more.
+on style deviation once checksrc doesn't find anymore.
 
 Minor nits from fresh submitters can also be handled by the maintainer when
 merging, in case it seems like the submitter isn't clear on what to do. We
@@ -100,7 +100,7 @@
 
 ## Documentation
 
-New features or changes to existing functionality **must** be accompanied with
+New features or changes to existing functionality **must** be accompanied by
 updated documentation. Submitting that in a separate follow-up pull request is
 not OK. A code review must also verify that the submitted documentation update
 matches the code submission.
@@ -162,7 +162,7 @@
 # Commit messages
 
 Tightly coupled with a code review is making sure that the commit message is
-good. It is the responsibilitiy of the person who merges the code to make sure
+good. It is the responsibility of the person who merges the code to make sure
 that the commit message follows our standard (detailed in the
 [CONTRIBUTE.md](CONTRIBUTE.md) document). This includes making sure the PR
 identifies related issues and giving credit to reporters and helpers.
diff --git a/docs/CODE_STYLE.md b/docs/CODE_STYLE.md
index 5613437..e27778e 100644
--- a/docs/CODE_STYLE.md
+++ b/docs/CODE_STYLE.md
@@ -28,26 +28,30 @@
 understandable and be named according to what they're used for. File-local
 functions should be made static. We like lower case names.
 
-See the [INTERNALS](INTERNALS.md) document on how we name non-exported
-library-global symbols.
+See the [INTERNALS](https://curl.se/dev/internals.html#symbols) document on
+how we name non-exported library-global symbols.
 
 ## Indenting
 
 We use only spaces for indentation, never TABs. We use two spaces for each new
 open brace.
 
-    if(something_is_true) {
-      while(second_statement == fine) {
-        moo();
-      }
-    }
+```c
+if(something_is_true) {
+  while(second_statement == fine) {
+    moo();
+  }
+}
+```
 
 ## Comments
 
 Since we write C89 code, **//** comments are not allowed. They weren't
 introduced in the C standard until C99. We use only **/* comments */**.
 
-    /* this is a comment */
+```c
+/* this is a comment */
+```
 
 ## Long lines
 
@@ -69,42 +73,52 @@
 the keyword and we then set the closing brace on the same indentation level as
 the initial keyword. Like this:
 
-    if(age < 40) {
-      /* clearly a youngster */
-    }
+```c
+if(age < 40) {
+  /* clearly a youngster */
+}
+```
 
 You may omit the braces if they would contain only a one-line statement:
 
-    if(!x)
-      continue;
+```c
+if(!x)
+  continue;
+```
 
 For functions the opening brace should be on a separate line:
 
-    int main(int argc, char **argv)
-    {
-      return 1;
-    }
+```c
+int main(int argc, char **argv)
+{
+  return 1;
+}
+```
 
 ## 'else' on the following line
 
 When adding an **else** clause to a conditional expression using braces, we
 add it on a new line after the closing brace. Like this:
 
-    if(age < 40) {
-      /* clearly a youngster */
-    }
-    else {
-      /* probably grumpy */
-    }
+```c
+if(age < 40) {
+  /* clearly a youngster */
+}
+else {
+  /* probably grumpy */
+}
+```
 
 ## No space before parentheses
 
 When writing expressions using if/while/do/for, there shall be no space
 between the keyword and the open parenthesis. Like this:
 
-    while(1) {
-      /* loop forever */
-    }
+```c
+while(1) {
+  /* loop forever */
+}
+```
 
 ## Use boolean conditions
 
@@ -112,40 +126,50 @@
 pointer against NULL or != NULL and an int against zero or not zero in
 if/while conditions we prefer:
 
-    result = do_something();
-    if(!result) {
-      /* something went wrong */
-      return result;
-    }
+```c
+result = do_something();
+if(!result) {
+  /* something went wrong */
+  return result;
+}
+```
 
 ## No assignments in conditions
 
 To increase readability and reduce complexity of conditionals, we avoid
 assigning variables within if/while conditions. We frown upon this style:
 
-    if((ptr = malloc(100)) == NULL)
-      return NULL;
+```c
+if((ptr = malloc(100)) == NULL)
+  return NULL;
+```
 
 and instead we encourage the above version to be spelled out more clearly:
 
-    ptr = malloc(100);
-    if(!ptr)
-      return NULL;
+```c
+ptr = malloc(100);
+if(!ptr)
+  return NULL;
+```
 
 ## New block on a new line
 
 We never write multiple statements on the same source line, even for very
 short if() conditions.
 
-    if(a)
-      return TRUE;
-    else if(b)
-      return FALSE;
+```c
+if(a)
+  return TRUE;
+else if(b)
+  return FALSE;
+```
 
 and NEVER:
 
-    if(a) return TRUE;
-    else if(b) return FALSE;
+```c
+if(a) return TRUE;
+else if(b) return FALSE;
+```
 
 ## Space around operators
 
@@ -155,33 +179,39 @@
 
 Examples:
 
-    bla = func();
-    who = name[0];
-    age += 1;
-    true = !false;
-    size += -2 + 3 * (a + b);
-    ptr->member = a++;
-    struct.field = b--;
-    ptr = &address;
-    contents = *pointer;
-    complement = ~bits;
-    empty = (!*string) ? TRUE : FALSE;
+```c
+bla = func();
+who = name[0];
+age += 1;
+true = !false;
+size += -2 + 3 * (a + b);
+ptr->member = a++;
+struct.field = b--;
+ptr = &address;
+contents = *pointer;
+complement = ~bits;
+empty = (!*string) ? TRUE : FALSE;
+```
 
 ## No parentheses for return values
 
 We use the 'return' statement without extra parentheses around the value:
 
-    int works(void)
-    {
-      return TRUE;
-    }
+```c
+int works(void)
+{
+  return TRUE;
+}
+```
 
 ## Parentheses for sizeof arguments
 
 When using the sizeof operator in code, we prefer it to be written with
 parentheses around its argument:
 
-    int size = sizeof(int);
+```c
+int size = sizeof(int);
+```
 
 ## Column alignment
 
@@ -195,32 +225,40 @@
 cases follow the 2-space indent guideline. Here are some examples from
 libcurl:
 
-    if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
-       (handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
-       (handle->set.httpreq == HTTPREQ_GET ||
-        handle->set.httpreq == HTTPREQ_HEAD))
-      /* didn't ask for HTTP/1.0 and a GET or HEAD */
-      return TRUE;
+```c
+if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
+   (handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
+   (handle->set.httpreq == HTTPREQ_GET ||
+    handle->set.httpreq == HTTPREQ_HEAD))
+  /* didn't ask for HTTP/1.0 and a GET or HEAD */
+  return TRUE;
+```
 
 If no parenthesis, use the default indent:
 
-    data->set.http_disable_hostname_check_before_authentication =
-      (0 != va_arg(param, long)) ? TRUE : FALSE;
+```c
+data->set.http_disable_hostname_check_before_authentication =
+  (0 != va_arg(param, long)) ? TRUE : FALSE;
+```
 
 Function invoke with an open parenthesis:
 
-    if(option) {
-      result = parse_login_details(option, strlen(option),
-                                   (userp ? &user : NULL),
-                                   (passwdp ? &passwd : NULL),
-                                   NULL);
-    }
+```c
+if(option) {
+  result = parse_login_details(option, strlen(option),
+                               (userp ? &user : NULL),
+                               (passwdp ? &passwd : NULL),
+                               NULL);
+}
+```
 
 Align with the "current open" parenthesis:
 
-    DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
-                 "server response left\n",
-                 (int)clipamount));
+```c
+DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
+             "server response left\n",
+             (int)clipamount));
+```
 
 ## Platform dependent code
 
@@ -234,32 +272,38 @@
 seamless. Like this example where the **magic()** function works differently
 depending on a build-time conditional:
 
-    #ifdef HAVE_MAGIC
-    void magic(int a)
-    {
-      return a + 2;
-    }
-    #else
-    #define magic(x) 1
-    #endif
+```c
+#ifdef HAVE_MAGIC
+void magic(int a)
+{
+  return a + 2;
+}
+#else
+#define magic(x) 1
+#endif
 
-    int content = magic(3);
+int content = magic(3);
+```
 
 ## No typedefed structs
 
 Use structs by all means, but do not typedef them. Use the `struct name` way
 of identifying them:
 
-    struct something {
-       void *valid;
-       size_t way_to_write;
-    };
-    struct something instance;
+```c
+struct something {
+   void *valid;
+   size_t way_to_write;
+};
+struct something instance;
+```
 
 **Not okay**:
 
-    typedef struct {
-       void *wrong;
-       size_t way_to_write;
-    } something;
-    something instance;
+```c
+typedef struct {
+   void *wrong;
+   size_t way_to_write;
+} something;
+something instance;
+```
diff --git a/docs/CONTRIBUTE.md b/docs/CONTRIBUTE.md
index 69ddfbe..4d278b2 100644
--- a/docs/CONTRIBUTE.md
+++ b/docs/CONTRIBUTE.md
@@ -8,19 +8,19 @@
 
 ### Join the Community
 
-Skip over to [https://curl.haxx.se/mail/](https://curl.haxx.se/mail/) and join
+Skip over to [https://curl.se/mail/](https://curl.se/mail/) and join
 the appropriate mailing list(s).  Read up on details before you post
 questions. Read this file before you start sending patches! We prefer
 questions sent to and discussions being held on the mailing list(s), not sent
 to individuals.
 
 Before posting to one of the curl mailing lists, please read up on the
-[mailing list etiquette](https://curl.haxx.se/mail/etiquette.html).
+[mailing list etiquette](https://curl.se/mail/etiquette.html).
 
-We also hang out on IRC in #curl on irc.freenode.net
+We also hang out on IRC in #curl on libera.chat
 
 If you're at all interested in the code side of things, consider clicking
-'watch' on the [curl repo on github](https://github.com/curl/curl) to be
+'watch' on the [curl repo on GitHub](https://github.com/curl/curl) to be
 notified of pull requests and new issues posted there.
 
 ### License and copyright
@@ -49,12 +49,12 @@
 ### What To Read
 
 Source code, the man pages, the [INTERNALS
-document](https://curl.haxx.se/dev/internals.html),
-[TODO](https://curl.haxx.se/docs/todo.html),
-[KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) and the [most recent
-changes](https://curl.haxx.se/dev/sourceactivity.html) in git. Just lurking on
+document](https://curl.se/dev/internals.html),
+[TODO](https://curl.se/docs/todo.html),
+[KNOWN_BUGS](https://curl.se/docs/knownbugs.html) and the [most recent
+changes](https://curl.se/dev/sourceactivity.html) in git. Just lurking on
 the [curl-library mailing
-list](https://curl.haxx.se/mail/list.cgi?list=curl-library) will give you a
+list](https://curl.se/mail/list.cgi?list=curl-library) will give you a
 lot of insights on what's going on right now. Asking there is a good idea too.
 
 ## Write a good patch
@@ -62,7 +62,7 @@
 ### Follow code style
 
 When writing C code, follow the
-[CODE_STYLE](https://curl.haxx.se/dev/code-style.html) already established in
+[CODE_STYLE](https://curl.se/dev/code-style.html) already established in
 the project. Consistent style makes code easier to read and mistakes less
 likely to happen. Run `make checksrc` before you submit anything, to make sure
 you follow the basic style. That script doesn't verify everything, but if it
@@ -129,9 +129,9 @@
 ### How to get your changes into the main sources
 
 Ideally you file a [pull request on
-github](https://github.com/curl/curl/pulls), but you can also send your plain
+GitHub](https://github.com/curl/curl/pulls), but you can also send your plain
 patch to [the curl-library mailing
-list](https://curl.haxx.se/mail/list.cgi?list=curl-library).
+list](https://curl.se/mail/list.cgi?list=curl-library).
 
 Either way, your change will be reviewed and discussed there and you will be
 expected to correct flaws pointed out and update accordingly, or the change
@@ -151,7 +151,7 @@
 
 We strongly prefer pull requests to mailed patches, as it makes it a proper
 git commit that is easy to merge and they are easy to track and not that easy
-to loose in the flood of many emails, like they sometimes do on the mailing
+to lose in the flood of many emails, like they sometimes do on the mailing
 lists.
 
 Every pull request submitted will automatically be tested in several different
@@ -185,7 +185,6 @@
  | LGTM analysis:  C/C++               | stable | new findings               |
  | buildbot/curl_winssl_ ...           | stable | all errors and failures    |
  | continuous-integration/appveyor/pr  | stable | all errors and failures    |
- | continuous-integration/travis-ci/pr | stable | all errors and failures    |
  | curl.curl (linux ...)               | stable | all errors and failures    |
  | curl.curl (windows ...)             | flaky  | repetitive errors/failures |
  | deepcode-ci-bot                     | stable | new findings               |
@@ -304,4 +303,4 @@
  - [https://gnuwin32.sourceforge.io/packages/diffutils.htm](https://gnuwin32.sourceforge.io/packages/diffutils.htm)
 
 ### Useful resources
-* [Webinar on getting code into cURL](https://www.youtube.com/watch?v=QmZ3W1d6LQI)
+ - [Webinar on getting code into cURL](https://www.youtube.com/watch?v=QmZ3W1d6LQI)
diff --git a/docs/CURL-DISABLE.md b/docs/CURL-DISABLE.md
index a9e6aca..5967d7b 100644
--- a/docs/CURL-DISABLE.md
+++ b/docs/CURL-DISABLE.md
@@ -1,5 +1,9 @@
 # Code defines to disable features and protocols
 
+## CURL_DISABLE_ALTSVC
+
+Disable support for Alt-Svc: HTTP headers.
+
 ## CURL_DISABLE_COOKIES
 
 Disable support for HTTP cookies.
@@ -8,6 +12,10 @@
 
 Disable support for authentication methods using crypto.
 
+## CURL_DISABLE_NTLM
+
+Disable support for NTLM.
+
 ## CURL_DISABLE_DICT
 
 Disable the DICT protocol
@@ -33,6 +41,10 @@
 
 Disable the GOPHER protocol.
 
+## CURL_DISABLE_HSTS
+
+Disable the HTTP Strict Transport Security support.
+
 ## CURL_DISABLE_HTTP
 
 Disable the HTTP(S) protocols. Note that this then also disable HTTP proxy
diff --git a/docs/DEPRECATE.md b/docs/DEPRECATE.md
index 26877c4..653e53f 100644
--- a/docs/DEPRECATE.md
+++ b/docs/DEPRECATE.md
@@ -3,7 +3,7 @@
 If any of these deprecated features is a cause for concern for you, please
 email the curl-library mailing list as soon as possible and explain to us why
 this is a problem for you and how your use case can't be satisfied properly
-using a work around.
+using a workaround.
 
 ## Past removals
 
diff --git a/docs/DYNBUF.md b/docs/DYNBUF.md
index aa528ec..a30a058 100644
--- a/docs/DYNBUF.md
+++ b/docs/DYNBUF.md
@@ -11,7 +11,9 @@
 
 ## init
 
-    void Curl_dyn_init(struct dynbuf *s, size_t toobig);
+```c
+void Curl_dyn_init(struct dynbuf *s, size_t toobig);
+```
 
 This inits a struct to use for dynbuf and it can't fail. The `toobig` value
 **must** be set to the maximum size we allow this buffer instance to grow to.
@@ -19,44 +21,58 @@
 
 ## free
 
-    void Curl_dyn_free(struct dynbuf *s);
+```c
+void Curl_dyn_free(struct dynbuf *s);
+```
 
 Free the associated memory and clean up. After a free, the `dynbuf` struct can
 be re-used to start appending new data to.
 
 ## addn
 
-    CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len);
+```c
+CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len);
+```
 
 Append arbitrary data of a given length to the end of the buffer.
 
 ## add
 
-    CURLcode Curl_dyn_add(struct dynbuf *s, const char *str);
+```c
+CURLcode Curl_dyn_add(struct dynbuf *s, const char *str);
+```
 
 Append a C string to the end of the buffer.
 
 ## addf
 
-    CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...);
+```c
+CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...);
+```
 
 Append a `printf()`-style string to the end of the buffer.
 
 ## vaddf
 
-    CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap);
+```c
+CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap);
+```
 
 Append a `vprintf()`-style string to the end of the buffer.
 
 ## reset
 
-    void Curl_dyn_reset(struct dynbuf *s);
+```c
+void Curl_dyn_reset(struct dynbuf *s);
+```
 
 Reset the buffer length, but leave the allocation.
 
 ## tail
 
-    CURLcode Curl_dyn_tail(struct dynbuf *s, size_t length)
+```c
+CURLcode Curl_dyn_tail(struct dynbuf *s, size_t length);
+```
 
 Keep `length` bytes of the buffer tail (the last `length` bytes of the
 buffer). The rest of the buffer is dropped. The specified `length` must not be
@@ -64,7 +80,9 @@
 
 ## ptr
 
-    char *Curl_dyn_ptr(const struct dynbuf *s);
+```c
+char *Curl_dyn_ptr(const struct dynbuf *s);
+```
 
 Returns a `char *` to the buffer if it has a length, otherwise a NULL. Since
 the buffer may be reallocated, this pointer should not be trusted or used
@@ -72,7 +90,9 @@
 
 ## uptr
 
-    unsigned char *Curl_dyn_uptr(const struct dynbuf *s);
+```c
+unsigned char *Curl_dyn_uptr(const struct dynbuf *s);
+```
 
 Returns an `unsigned char *` to the buffer if it has a length, otherwise a
 NULL. Since the buffer may be reallocated, this pointer should not be trusted
@@ -80,7 +100,9 @@
 
 ## len
 
-    size_t Curl_dyn_len(const struct dynbuf *s);
+```c
+size_t Curl_dyn_len(const struct dynbuf *s);
+```
 
 Returns the length of the buffer in bytes. Does not include the terminating
 zero byte.
diff --git a/docs/ECH.md b/docs/ECH.md
index ea1efaa..a09140e 100644
--- a/docs/ECH.md
+++ b/docs/ECH.md
@@ -55,7 +55,7 @@
 
 ### PR 4011 (Jun 2019) expected in curl release 7.67.0 (Oct 2019)
 
--   Details [below](#pr4011);
+-   Details [below](#pr-4011);
 
 -   New configuration option: `--enable-ech`;
 
@@ -103,7 +103,7 @@
 
 Proposed-by: @niallor (Niall O'Reilly)\
 Encouraged-by: @sftcd (Stephen Farrell)\
-See-also: [this message](https://curl.haxx.se/mail/lib-2019-05/0108.html)
+See-also: [this message](https://curl.se/mail/lib-2019-05/0108.html)
 
 Limitations:
 -   Book-keeping (symbols-in-versions) needs real release number, not 'DUMMY'.
diff --git a/docs/EXPERIMENTAL.md b/docs/EXPERIMENTAL.md
index 6a014c3..ce9a1b8 100644
--- a/docs/EXPERIMENTAL.md
+++ b/docs/EXPERIMENTAL.md
@@ -18,6 +18,6 @@
 
 ## Experimental features right now
 
+ - The Hyper HTTP backend
  - HTTP/3 support and options
- - alt-svc support and options
  - CURLSSLOPT_NATIVE_CA (No configure option, feature built in when supported)
diff --git a/docs/FAQ b/docs/FAQ
index b5efb11..d678e9e 100644
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -24,11 +24,8 @@
   1.15 How do I port libcurl to my OS?
 
  2. Install Related Problems
-  2.1 configure doesn't find OpenSSL even when it is installed
-   2.1.1 native linker doesn't find OpenSSL
-   2.1.2 only the libssl lib is missing
+  2.1 configure fails when using static libraries
   2.2 Does curl work/build with other SSL libraries?
-  2.3 Where can I find a copy of LIBEAY32.DLL?
   2.4 Does curl support SOCKS (RFC 1928) ?
 
  3. Usage Problems
@@ -56,7 +53,6 @@
   3.22 curl -X gives me HTTP problems
 
  4. Running Problems
-  4.1 Problems connecting to SSL servers.
   4.2 Why do I get problems when I use & or % in the URL?
   4.3 How can I use {, }, [ or ] to specify multiple URLs?
   4.4 Why do I get downloaded data even though the web page doesn't exist?
@@ -68,9 +64,9 @@
    4.5.5 "405 Method Not Allowed"
    4.5.6 "301 Moved Permanently"
   4.6 Can you tell me what error code 142 means?
-  4.7 How do I keep user names and passwords secret in Curl command lines?
+  4.7 How do I keep user names and passwords secret in curl command lines?
   4.8 I found a bug!
-  4.9 Curl can't authenticate to the server that requires NTLM?
+  4.9 curl can't authenticate to the server that requires NTLM?
   4.10 My HTTP request using HEAD, PUT or DELETE doesn't work!
   4.11 Why do my HTTP range requests return the full document?
   4.12 Why do I get "certificate verify failed" ?
@@ -82,13 +78,12 @@
   4.18 file:// URLs containing drive letters (Windows, NetWare)
   4.19 Why doesn't curl return an error when the network cable is unplugged?
   4.20 curl doesn't return error for HTTP non-200 responses!
-  4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
 
  5. libcurl Issues
   5.1 Is libcurl thread-safe?
   5.2 How can I receive all data into a large memory chunk?
   5.3 How do I fetch multiple files with libcurl?
-  5.4 Does libcurl do Winsock initing on win32 systems?
+  5.4 Does libcurl do Winsock initialization on win32 systems?
   5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
   5.6 What about Keep-Alive or persistent connections?
   5.7 Link errors when building libcurl on Windows!
@@ -129,7 +124,7 @@
   originally with URL spelled in uppercase to make it obvious it deals with
   URLs. The fact it can also be pronounced 'see URL' also helped, it works as
   an abbreviation for "Client URL Request Library" or why not the recursive
-  version: "Curl URL Request Library".
+  version: "curl URL Request Library".
 
   The cURL project produces two products:
 
@@ -185,22 +180,22 @@
 
   1.3 What is curl not?
 
-  Curl is not a wget clone. That is a common misconception.  Never, during
+  curl is not a wget clone. That is a common misconception.  Never, during
   curl's development, have we intended curl to replace wget or compete on its
-  market. Curl is targeted at single-shot file transfers.
+  market. curl is targeted at single-shot file transfers.
 
-  Curl is not a website mirroring program. If you want to use curl to mirror
-  something: fine, go ahead and write a script that wraps around curl to make
-  it reality (like curlmirror.pl does).
+  curl is not a website mirroring program. If you want to use curl to mirror
+  something: fine, go ahead and write a script that wraps around curl or use
+  libcurl to make it reality.
 
-  Curl is not an FTP site mirroring program. Sure, get and send FTP with curl
+  curl is not an FTP site mirroring program. Sure, get and send FTP with curl
   but if you want systematic and sequential behavior you should write a
   script (or write a new program that interfaces libcurl) and do it.
 
-  Curl is not a PHP tool, even though it works perfectly well when used from
+  curl is not a PHP tool, even though it works perfectly well when used from
   or with PHP (when using the PHP/CURL module).
 
-  Curl is not a program for a single operating system. Curl exists, compiles,
+  curl is not a program for a single operating system. curl exists, compiles,
   builds and runs under a wide range of operating systems, including all
   modern Unixes (and a bunch of older ones too), Windows, Amiga, BeOS, OS/2,
   OS X, QNX etc.
@@ -211,12 +206,12 @@
   better. We do however believe in a few rules when it comes to the future of
   curl:
 
-  Curl -- the command line tool -- is to remain a non-graphical command line
+  curl -- the command line tool -- is to remain a non-graphical command line
   tool. If you want GUIs or fancy scripting capabilities, you should look for
   another tool that uses libcurl.
 
   We do not add things to curl that other small and available tools already do
-  very well at the side. Curl's output can be piped into another program or
+  very well at the side. curl's output can be piped into another program or
   redirected to another file for the next program to interpret.
 
   We focus on protocol related issues and improvements. If you want to do more
@@ -261,7 +256,7 @@
   If you want to support our project, consider a donation or a banner-program
   or even better: by helping us with coding, documenting or testing etc.
 
-  See also: https://curl.haxx.se/sponsors.html
+  See also: https://curl.se/sponsors.html
 
   1.7 What about CURL from curl.com?
 
@@ -283,7 +278,7 @@
   Please do not mail any single individual unless you really need to. Keep
   curl-related questions on a suitable mailing list. All available mailing
   lists are listed in the MANUAL document and online at
-  https://curl.haxx.se/mail/
+  https://curl.se/mail/
 
   Keeping curl-related questions and discussions on mailing lists allows
   others to join in and help, to share their ideas, to contribute their
@@ -304,7 +299,7 @@
   your curl-related problems.
 
   We list available alternatives on the curl website:
-  https://curl.haxx.se/support.html
+  https://curl.se/support.html
 
   1.10 How many are using curl?
 
@@ -318,7 +313,7 @@
   We don't know how many users that downloaded or installed curl and then
   never use it.
 
-  In 2020, we estimate that curl runs in rougly ten billion installations
+  In 2020, we estimate that curl runs in roughly ten billion installations
   world wide.
 
   1.11 Why don't you update ca-bundle.crt
@@ -336,13 +331,13 @@
   If you want the most recent collection of ca certs that Mozilla Firefox
   uses, we recommend that you extract the collection yourself from Mozilla
   Firefox (by running 'make ca-bundle), or by using our online service setup
-  for this purpose: https://curl.haxx.se/docs/caextract.html
+  for this purpose: https://curl.se/docs/caextract.html
 
   1.12 I have a problem who can I chat with?
 
   There's a bunch of friendly people hanging out in the #curl channel on the
-  IRC network irc.freenode.net. If you're polite and nice, chances are good
-  that you can get -- or provide -- help instantly.
+  IRC network libera.chat. If you're polite and nice, chances are good that
+  you can get -- or provide -- help instantly.
 
   1.13 curl's ECCN number?
 
@@ -376,7 +371,8 @@
   lots of people who can review patches, comment on them and "receive" them
   properly.
 
-  Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
+  Lots of more details are found in the CONTRIBUTE.md and INTERNALS.md
+  documents.
 
   1.15 How do I port libcurl to my OS?
 
@@ -394,69 +390,40 @@
 
 2. Install Related Problems
 
-  2.1 configure doesn't find OpenSSL even when it is installed
+  2.1 configure fails when using static libraries
 
-  This may be because of several reasons.
+  You may find that configure fails to properly detect the entire dependency
+  chain of libraries when you provide static versions of the libraries that
+  configure checks for.
 
-    2.1.1 native linker doesn't find openssl
+  The reason why static libraries is much harder to deal with is that for them
+  we don't get any help but the script itself must know or check what more
+  libraries that are needed (with shared libraries, that dependency "chain" is
+  handled automatically). This is a very error-prone process and one that also
+  tends to vary over time depending on the release versions of the involved
+  components and may also differ between operating systems.
 
-    Affected platforms:
-      Solaris (native cc compiler)
-      HPUX (native cc compiler)
-      SGI IRIX (native cc compiler)
-      SCO UNIX (native cc compiler)
+  For that reason, configure does very little attempts to actually figure this
+  out and you are instead encouraged to set LIBS and LDFLAGS accordingly when
+  you invoke configure, and point out the needed libraries and set the
+  necessary flags yourself.
 
-    When configuring curl, I specify --with-ssl. OpenSSL is installed in
-    /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find
-    CRYPTO_lock in -lcrypto
+  2.2 Does curl work with other SSL libraries?
 
-    Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER
-    -lcrypto, so ld can't find the library. This is due to a bug in the GNU
-    autoconf tool.
-
-    Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of
-    ./configure places the -L/usr/local/ssl/lib early enough in the command
-    line to make things work
-
-    2.1.2 only the libssl lib is missing
-
-    If all include files and the libcrypto lib is present, with only the
-    libssl being missing according to configure, this is most likely because
-    a few functions are left out from the libssl.
-
-    If the function names missing include RSA or RSAREF you can be certain
-    that this is because libssl requires the RSA and RSAREF libs to build.
-
-    See the INSTALL file section that explains how to add those libs to
-    configure. Make sure that you remove the config.cache file before you
-    rerun configure with the new flags.
-
-  2.2 Does curl work/build with other SSL libraries?
-
-  Curl has been written to use a generic SSL function layer internally, and
+  curl has been written to use a generic SSL function layer internally, and
   that SSL functionality can then be provided by one out of many different SSL
   backends.
 
   curl can be built to use one of the following SSL alternatives: OpenSSL,
   libressl, BoringSSL, GnuTLS, wolfSSL, NSS, mbedTLS, MesaLink, Secure
   Transport (native iOS/OS X), Schannel (native Windows), GSKit (native IBM
-  i), or BearSSL. They all have their pros and cons, and we try to maintain a
-  comparison of them here: https://curl.haxx.se/docs/ssl-compared.html
-
-  2.3 Where can I find a copy of LIBEAY32.DLL?
-
-  That is an OpenSSL binary built for Windows.
-
-  Curl can be built with OpenSSL to do the SSL stuff. The LIBEAY32.DLL is then
-  what curl needs on a windows machine to do https:// etc. Check out the curl
-  website to find accurate and up-to-date pointers to recent OpenSSL DLLs and
-  other binary packages.
+  i), BearSSL, or Rustls. They all have their pros and cons, and we try to
+  maintain a comparison of them here: https://curl.se/docs/ssl-compared.html
 
   2.4 Does curl support SOCKS (RFC 1928) ?
 
   Yes, SOCKS 4 and 5 are supported.
 
-
 3. Usage problems
 
   3.1 curl: (1) SSL is disabled, https: not supported
@@ -480,18 +447,18 @@
 
   3.2 How do I tell curl to resume a transfer?
 
-  Curl supports resumed transfers both ways on both FTP and HTTP.
+  curl supports resumed transfers both ways on both FTP and HTTP.
   Try the -C option.
 
   3.3 Why doesn't my posting using -F work?
 
-  You can't arbitrarily use -F or -d, the choice between -F or -d depends on the
-  HTTP operation you need curl to do and what the web server that will receive
-  your post expects.
+  You can't arbitrarily use -F or -d, the choice between -F or -d depends on
+  the HTTP operation you need curl to do and what the web server that will
+  receive your post expects.
 
-  If the form you're trying to submit uses the type 'multipart/form-data', then
-  and only then you must use the -F type. In all the most common cases, you
-  should use -d which then causes a posting with the type
+  If the form you're trying to submit uses the type 'multipart/form-data',
+  then and only then you must use the -F type. In all the most common cases,
+  you should use -d which then causes a posting with the type
   'application/x-www-form-urlencoded'.
 
   This is described in some detail in the MANUAL and TheArtOfHttpScripting
@@ -539,7 +506,7 @@
 
   3.8 How do I tell curl to follow HTTP redirects?
 
-  Curl does not follow so-called redirects by default. The Location: header
+  curl does not follow so-called redirects by default. The Location: header
   that informs the client about this is only interpreted if you're using the
   -L/--location option. As in:
 
@@ -555,7 +522,7 @@
 
   Find out more about which languages that support curl directly, and how to
   install and use them, in the libcurl section of the curl website:
-  https://curl.haxx.se/libcurl/
+  https://curl.se/libcurl/
 
   All the various bindings to libcurl are made by other projects and people,
   outside of the cURL project. The cURL project itself only produces libcurl
@@ -574,7 +541,7 @@
 
   3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP?
 
-  Curl adheres to the HTTP spec, which basically means you can play with *any*
+  curl adheres to the HTTP spec, which basically means you can play with *any*
   protocol that is built on top of HTTP. Protocols such as SOAP, WEBDAV and
   XML-RPC are all such ones. You can use -X to set custom requests and -H to
   set custom headers (or replace internally generated ones).
@@ -626,7 +593,7 @@
 
   3.14 Does curl support Javascript or PAC (automated proxy config)?
 
-  Many web pages do magic stuff using embedded Javascript. Curl and libcurl
+  Many web pages do magic stuff using embedded Javascript. curl and libcurl
   have no built-in support for that, so it will be treated just like any other
   contents.
 
@@ -689,7 +656,7 @@
   certificate. Server certificate verification is enabled by default in curl
   and libcurl and is often the reason for problems as explained in FAQ entry
   4.12 and the SSLCERTS document
-  (https://curl.haxx.se/docs/sslcerts.html). Server certificates that are
+  (https://curl.se/docs/sslcerts.html). Server certificates that are
   "self-signed" or otherwise signed by a CA that you do not have a CA cert
   for, cannot be verified. If the verification during a connect fails, you are
   refused access. You then need to explicitly disable the verification to
@@ -790,21 +757,6 @@
 
 4. Running Problems
 
-  4.1 Problems connecting to SSL servers.
-
-  It took a very long time before we could sort out why curl had problems to
-  connect to certain SSL servers when using SSLeay or OpenSSL v0.9+.  The
-  error sometimes showed up similar to:
-
-  16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233:
-
-  It turned out to be because many older SSL servers don't deal with SSLv3
-  requests properly. To correct this problem, tell curl to select SSLv2 from
-  the command line (-2/--sslv2).
-
-  There have also been examples where the remote server didn't like the SSLv2
-  request and instead you had to force curl to use SSLv3 with -3/--sslv3.
-
   4.2 Why do I get problems when I use & or % in the URL?
 
   In general unix shells, the & symbol is treated specially and when used, it
@@ -841,7 +793,7 @@
 
   4.4 Why do I get downloaded data even though the web page doesn't exist?
 
-  Curl asks remote servers for the page you specify. If the page doesn't exist
+  curl asks remote servers for the page you specify. If the page doesn't exist
   at the server, the HTTP protocol defines how the server should respond and
   that means that headers and a "page" will be returned. That's simply how
   HTTP works.
@@ -900,7 +852,7 @@
   appreciate a detailed bug report from you that describes how we could go
   ahead and repeat this!
 
-  4.7 How do I keep user names and passwords secret in Curl command lines?
+  4.7 How do I keep user names and passwords secret in curl command lines?
 
   This problem has two sides:
 
@@ -934,7 +886,7 @@
   If there is a bug, read the BUGS document first. Then report it as described
   in there.
 
-  4.9 Curl can't authenticate to the server that requires NTLM?
+  4.9 curl can't authenticate to the server that requires NTLM?
 
   NTLM support requires OpenSSL, GnuTLS, mbedTLS, NSS, Secure Transport, or
   Microsoft Windows libraries at build-time to provide this functionality.
@@ -960,27 +912,32 @@
 
   4.12 Why do I get "certificate verify failed" ?
 
-  You invoke curl 7.10 or later to communicate on a https:// URL and get an
-  error back looking something similar to this:
+  When you invoke curl and get an error 60 error back it means that curl
+  couldn't verify that the server's certificate was good. curl verifies the
+  certificate using the CA cert bundle and verifying for which names the
+  certificate has been granted.
 
-      curl: (35) SSL: error:14090086:SSL routines:
-      SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
+  To completely disable the certificate verification, use -k. This does
+  however enable man-in-the-middle attacks and makes the transfer INSECURE.
+  We strongly advice against doing this for more than experiments.
 
-  Then it means that curl couldn't verify that the server's certificate was
-  good. Curl verifies the certificate using the CA cert bundle that comes with
-  the curl installation.
+  If you get this failure with a CA cert bundle installed and used, the
+  server's certificate might not be signed by one of the CA's in yout CA
+  store. It might for example be self-signed. You then correct this problem by
+  obtaining a valid CA cert for the server. Or again, decrease the security by
+  disabling this check.
 
-  To disable the verification (which makes it act like curl did before 7.10),
-  use -k. This does however enable man-in-the-middle attacks.
+  At times, you find that the verification works in your favorite browser but
+  fails in curl. When this happens, the reason is usually that the server
+  sends an incomplete cert chain. The server is mandated to send all
+  "intermediate certificates" but doesn't. This typically works with browsers
+  anyway since they A) cache such certs and B) supports AIA which downloads
+  such missing certificates on demand. This is a server misconfiguration. A
+  good way to figure out if this is the case it to use the SSL Labs server
+  test and check the certificate chain: https://www.ssllabs.com/ssltest/
 
-  If you get this failure but are having a CA cert bundle installed and used,
-  the server's certificate is not signed by one of the CA's in the bundle. It
-  might for example be self-signed. You then correct this problem by obtaining
-  a valid CA cert for the server. Or again, decrease the security by disabling
-  this check.
-
-  Details are also in the SSLCERTS file in the release archives, found online
-  here: https://curl.haxx.se/docs/sslcerts.html
+  Details are also in the SSLCERTS.md document, found online here:
+  https://curl.se/docs/sslcerts.html
 
   4.13 Why is curl -R on Windows one hour off?
 
@@ -1133,17 +1090,6 @@
   You can also use the -w option and the variable %{response_code} to extract
   the exact response code that was returned in the response.
 
-  4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
-
-  If you use verbose to see the HTTP request when you send off a HTTP/2
-  request, it will still say 1.1.
-
-  The reason for this is that we first generate the request to send using the
-  old 1.1 style and show that request in the verbose output, and then we
-  convert it over to the binary header-compressed HTTP/2 style. The actual
-  "1.1" part from that request is then not actually used in the transfer.
-  The binary HTTP/2 headers are not human readable.
-
 5. libcurl Issues
 
   5.1 Is libcurl thread-safe?
@@ -1157,7 +1103,7 @@
 
   There may be some exceptions to thread safety depending on how libcurl was
   built. Please review the guidelines for thread safety to learn more:
-  https://curl.haxx.se/libcurl/c/threadsafe.html
+  https://curl.se/libcurl/c/threadsafe.html
 
   5.2 How can I receive all data into a large memory chunk?
 
@@ -1219,7 +1165,7 @@
   5.6 What about Keep-Alive or persistent connections?
 
   curl and libcurl have excellent support for persistent connections when
-  transferring several files from the same server.  Curl will attempt to reuse
+  transferring several files from the same server.  curl will attempt to reuse
   connections for all URLs specified on the same command line/config file, and
   libcurl will reuse connections for all transfers that are made using the
   same libcurl handle.
@@ -1438,7 +1384,7 @@
 
 6. License Issues
 
-  Curl and libcurl are released under a MIT/X derivate license. The license is
+  curl and libcurl are released under a MIT/X derivative license. The license is
   very liberal and should not impose a problem for your project. This section
   is just a brief summary for the cases we get the most questions. (Parts of
   this section was much enhanced by Bjorn Reese.)
@@ -1453,7 +1399,7 @@
 
   Yes!
 
-  Since libcurl may be distributed under the MIT/X derivate license, it can be
+  Since libcurl may be distributed under the MIT/X derivative license, it can be
   used together with GPL in any software.
 
   6.2 I have a closed-source program, can I use the libcurl library?
@@ -1478,7 +1424,7 @@
 
   Yes!
 
-  The MIT/X derivate license practically allows you to do almost anything with
+  The MIT/X derivative license practically allows you to do almost anything with
   the sources, on the condition that the copyright texts in the sources are
   left intact.
 
@@ -1512,7 +1458,7 @@
   notice" somewhere. Most probably like in the documentation or in the section
   where other third party dependencies already are mentioned and acknowledged.
 
-  As can be seen here: https://curl.haxx.se/docs/companies.html and elsewhere,
+  As can be seen here: https://curl.se/docs/companies.html and elsewhere,
   more and more companies are discovering the power of libcurl and take
   advantage of it even in commercial environments.
 
diff --git a/docs/FEATURES b/docs/FEATURES
deleted file mode 100644
index 35b26e1..0000000
--- a/docs/FEATURES
+++ /dev/null
@@ -1,207 +0,0 @@
-                                  _   _ ____  _
-                              ___| | | |  _ \| |
-                             / __| | | | |_) | |
-                            | (__| |_| |  _ <| |___
-                             \___|\___/|_| \_\_____|
-
-FEATURES
-
-curl tool
- - config file support
- - multiple URLs in a single command line
- - range "globbing" support: [0-13], {one,two,three}
- - multiple file upload on a single command line
- - custom maximum transfer rate
- - redirectable stderr
- - metalink support (*13)
-
-libcurl
- - full URL syntax with no length limit
- - custom maximum download time
- - custom least download speed acceptable
- - custom output result after completion
- - guesses protocol from host name unless specified
- - uses .netrc
- - progress bar with time statistics while downloading
- - "standard" proxy environment variables support
- - compiles on win32 (reported builds on 40+ operating systems)
- - selectable network interface for outgoing traffic
- - IPv6 support on unix and Windows
- - persistent connections
- - socks 4 + 5 support, with or without local name resolving
- - supports user name and password in proxy environment variables
- - operations through proxy "tunnel" (using CONNECT)
- - support for large files (>2GB and >4GB) during upload and download
- - replaceable memory functions (malloc, free, realloc, etc)
- - asynchronous name resolving (*6)
- - both a push and a pull style interface
- - international domain names (*11)
-
-HTTP
- - HTTP/1.1 compliant (optionally uses 1.0)
- - GET
- - PUT
- - HEAD
- - POST
- - Pipelining
- - multipart formpost (RFC1867-style)
- - authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3)
-   to server and proxy
- - resume (both GET and PUT)
- - follow redirects
- - maximum amount of redirects to follow
- - custom HTTP request
- - cookie get/send fully parsed
- - reads/writes the netscape cookie file format
- - custom headers (replace/remove internally generated headers)
- - custom user-agent string
- - custom referrer string
- - range
- - proxy authentication
- - time conditions
- - via http-proxy
- - retrieve file modification date
- - Content-Encoding support for deflate and gzip
- - "Transfer-Encoding: chunked" support in uploads
- - data compression (*12)
- - HTTP/2 (*5)
-
-HTTPS (*1)
- - (all the HTTP features)
- - using client certificates
- - verify server certificate
- - via http-proxy
- - select desired encryption
- - force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1)
-
-FTP
- - download
- - authentication
- - Kerberos 5 (*14)
- - active/passive using PORT, EPRT, PASV or EPSV
- - single file size information (compare to HTTP HEAD)
- - 'type=' URL support
- - dir listing
- - dir listing names-only
- - upload
- - upload append
- - upload via http-proxy as HTTP PUT
- - download resume
- - upload resume
- - custom ftp commands (before and/or after the transfer)
- - simple "range" support
- - via http-proxy
- - all operations can be tunneled through a http-proxy
- - customizable to retrieve file modification date
- - no dir depth limit
-
-FTPS (*1)
- - implicit ftps:// support that use SSL on both connections
- - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp://
-   connection to use SSL for both or one of the connections
-
-SCP (*8)
- - both password and public key auth
-
-SFTP (*8)
- - both password and public key auth
- - with custom commands sent before/after the transfer
-
-TFTP
- - download
- - upload
-
-TELNET
- - connection negotiation
- - custom telnet options
- - stdin/stdout I/O
-
-LDAP (*2)
- - full LDAP URL support
-
-DICT
- - extended DICT URL support
-
-FILE
- - URL support
- - upload
- - resume
-
-SMB
- - SMBv1 over TCP and SSL
- - download
- - upload
- - authentication with NTLMv1
-
-SMTP
- - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5
-   (*4) and External.
- - send e-mails
- - mail from support
- - mail size support
- - mail auth support for trusted server-to-server relaying
- - multiple recipients
- - via http-proxy
-
-SMTPS (*1)
- - implicit smtps:// support
- - explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL
- - via http-proxy
-
-POP3
- - authentication: Clear Text, APOP and SASL
- - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
-   Kerberos 5 (*4) and External.
- - list e-mails
- - retrieve e-mails
- - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
-   custom requests
- - via http-proxy
-
-POP3S (*1)
- - implicit pop3s:// support
- - explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL
- - via http-proxy
-
-IMAP
- - authentication: Clear Text and SASL
- - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
-   Kerberos 5 (*4) and External.
- - list the folders of a mailbox
- - select a mailbox with support for verifying the UIDVALIDITY
- - fetch e-mails with support for specifying the UID and SECTION
- - upload e-mails via the append command
- - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
-   STORE, COPY and UID via custom requests
- - via http-proxy
-
-IMAPS (*1)
- - implicit imaps:// support
- - explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL
- - via http-proxy
-
-MQTT
- - Subscribe to and publish topics using url scheme mqtt://broker/topic
-
-FOOTNOTES
-=========
-
-  *1 = requires a TLS library
-  *2 = requires OpenLDAP or WinLDAP
-  *3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
-       SSPI (native Windows)
-  *4 = requires a GSS-API implementation, however, only Windows SSPI is
-       currently supported
-  *5 = requires nghttp2 and possibly a recent TLS library
-  *6 = requires c-ares
-  *7 = requires OpenSSL, NSS, GSKit, Schannel or Secure Transport; GnuTLS, for
-       example, only supports SSLv3 and TLSv1
-  *8 = requires libssh2
-  *9 = requires OpenSSL, GnuTLS, mbedTLS, NSS, yassl, Secure Transport or SSPI
-       (native Windows)
-  *10 = requires an SSL library that supports SSLv3
-  *11 = requires libidn or Windows
-  *12 = requires libz
-  *13 = requires libmetalink, and either an Apple or Microsoft operating
-        system, or OpenSSL, or GnuTLS, or NSS
-  *14 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
diff --git a/docs/FEATURES.md b/docs/FEATURES.md
new file mode 100644
index 0000000..38e2ac3
--- /dev/null
+++ b/docs/FEATURES.md
@@ -0,0 +1,220 @@
+# Features -- what curl can do
+
+## curl tool
+
+ - config file support
+ - multiple URLs in a single command line
+ - range "globbing" support: [0-13], {one,two,three}
+ - multiple file upload on a single command line
+ - custom maximum transfer rate
+ - redirectable stderr
+ - parallel transfers
+
+## libcurl
+
+ - full URL syntax with no length limit
+ - custom maximum download time
+ - custom least download speed acceptable
+ - custom output result after completion
+ - guesses protocol from host name unless specified
+ - uses .netrc
+ - progress bar with time statistics while downloading
+ - "standard" proxy environment variables support
+ - compiles on win32 (reported builds on 70+ operating systems)
+ - selectable network interface for outgoing traffic
+ - IPv6 support on unix and Windows
+ - happy eyeballs dual-stack connects
+ - persistent connections
+ - SOCKS 4 + 5 support, with or without local name resolving
+ - supports user name and password in proxy environment variables
+ - operations through HTTP proxy "tunnel" (using CONNECT)
+ - replaceable memory functions (malloc, free, realloc, etc)
+ - asynchronous name resolving (6)
+ - both a push and a pull style interface
+ - international domain names (11)
+
+## HTTP
+
+ - HTTP/0.9 responses are optionally accepted
+ - HTTP/1.0
+ - HTTP/1.1
+ - HTTP/2, including multiplexing and server push (5)
+ - GET
+ - PUT
+ - HEAD
+ - POST
+ - multipart formpost (RFC1867-style)
+ - authentication: Basic, Digest, NTLM (9) and Negotiate (SPNEGO) (3)
+   to server and proxy
+ - resume (both GET and PUT)
+ - follow redirects
+ - maximum amount of redirects to follow
+ - custom HTTP request
+ - cookie get/send fully parsed
+ - reads/writes the netscape cookie file format
+ - custom headers (replace/remove internally generated headers)
+ - custom user-agent string
+ - custom referrer string
+ - range
+ - proxy authentication
+ - time conditions
+ - via HTTP proxy, HTTPS proxy or SOCKS proxy
+ - retrieve file modification date
+ - Content-Encoding support for deflate and gzip
+ - "Transfer-Encoding: chunked" support in uploads
+ - automatic data compression (12)
+
+## HTTPS (1)
+
+ - (all the HTTP features)
+ - HTTP/3 experimental support
+ - using client certificates
+ - verify server certificate
+ - via HTTP proxy, HTTPS proxy or SOCKS proxy
+ - select desired encryption
+ - select usage of a specific SSL version
+
+## FTP
+
+ - download
+ - authentication
+ - Kerberos 5 (13)
+ - active/passive using PORT, EPRT, PASV or EPSV
+ - single file size information (compare to HTTP HEAD)
+ - 'type=' URL support
+ - dir listing
+ - dir listing names-only
+ - upload
+ - upload append
+ - upload via http-proxy as HTTP PUT
+ - download resume
+ - upload resume
+ - custom ftp commands (before and/or after the transfer)
+ - simple "range" support
+ - via HTTP proxy, HTTPS proxy or SOCKS proxy
+ - all operations can be tunneled through proxy
+ - customizable to retrieve file modification date
+ - no dir depth limit
+
+## FTPS (1)
+
+ - implicit `ftps://` support that use SSL on both connections
+ - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain `ftp://`
+   connection to use SSL for both or one of the connections
+
+## SCP (8)
+
+ - both password and public key auth
+
+## SFTP (7)
+
+ - both password and public key auth
+ - with custom commands sent before/after the transfer
+
+## TFTP
+
+ - download
+ - upload
+
+## TELNET
+
+ - connection negotiation
+ - custom telnet options
+ - stdin/stdout I/O
+
+## LDAP (2)
+
+ - full LDAP URL support
+
+## DICT
+
+ - extended DICT URL support
+
+## FILE
+
+ - URL support
+ - upload
+ - resume
+
+## SMB
+
+ - SMBv1 over TCP and SSL
+ - download
+ - upload
+ - authentication with NTLMv1
+
+## SMTP
+
+ - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9), Kerberos 5
+   (4) and External.
+ - send e-mails
+ - mail from support
+ - mail size support
+ - mail auth support for trusted server-to-server relaying
+ - multiple recipients
+ - via http-proxy
+
+## SMTPS (1)
+
+ - implicit `smtps://` support
+ - explicit "STARTTLS" usage to "upgrade" plain `smtp://` connections to use SSL
+ - via http-proxy
+
+## POP3
+
+ - authentication: Clear Text, APOP and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
+   Kerberos 5 (4) and External.
+ - list e-mails
+ - retrieve e-mails
+ - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
+   custom requests
+ - via http-proxy
+
+## POP3S (1)
+
+ - implicit `pop3s://` support
+ - explicit "STLS" usage to "upgrade" plain `pop3://` connections to use SSL
+ - via http-proxy
+
+## IMAP
+
+ - authentication: Clear Text and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
+   Kerberos 5 (4) and External.
+ - list the folders of a mailbox
+ - select a mailbox with support for verifying the UIDVALIDITY
+ - fetch e-mails with support for specifying the UID and SECTION
+ - upload e-mails via the append command
+ - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
+   STORE, COPY and UID via custom requests
+ - via http-proxy
+
+## IMAPS (1)
+
+ - implicit `imaps://` support
+ - explicit "STARTTLS" usage to "upgrade" plain `imap://` connections to use SSL
+ - via http-proxy
+
+## MQTT
+
+ - Subscribe to and publish topics using url scheme `mqtt://broker/topic`
+
+## Footnotes
+
+  1. requires a TLS library
+  2. requires OpenLDAP or WinLDAP
+  3. requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
+     SSPI (native Windows)
+  4. requires a GSS-API implementation, however, only Windows SSPI is
+     currently supported
+  5. requires nghttp2
+  6. requires c-ares
+  7. requires libssh2, libssh or wolfSSH
+  8. requires libssh2 or libssh
+  9. requires OpenSSL, GnuTLS, mbedTLS, NSS, yassl, Secure Transport or SSPI
+     (native Windows)
+  10. -
+  11. requires libidn2 or Windows
+  12. requires libz, brotli and/or zstd
+  13. requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
diff --git a/docs/GOVERNANCE.md b/docs/GOVERNANCE.md
index a4c006f..dfc2071 100644
--- a/docs/GOVERNANCE.md
+++ b/docs/GOVERNANCE.md
@@ -59,9 +59,24 @@
 
 However, Daniel works for wolfSSL and we offer commercial curl support there.
 
-## Key roles
+# Key roles
 
-### Maintainers
+## User
+
+Someone who uses or has used curl or libcurl.
+
+## Contributor
+
+Someone who has helped the curl project, who has contributed to bring it
+forward. Contributing could be to provide advice, debug a problem, file a bug
+report, run test infrastructure or writing code etc.
+
+## Commit author
+
+Sometimes also called 'committer'. Someone who has authored a commit in the
+curl source code repository. Committers are recorded as `Author` in git.
+
+## Maintainers
 
 A maintainer in the curl project is an individual who has been given
 permissions to push commits to one of the git repositories.
@@ -69,9 +84,9 @@
 Maintainers are free to push commits to the repositories at their own will.
 Maintainers are however expected to listen to feedback from users and any
 change that is non-trivial in size or nature *should* be brought to the
-project as a PR to allow others to comment/object before merge.
+project as a Pull-Request (PR) to allow others to comment/object before merge.
 
-### Former maintainers
+## Former maintainers
 
 A maintainer who stops being active in the project will at some point get
 their push permissions removed. We do this for security reasons but also to
@@ -81,7 +96,7 @@
 Getting push permissions removed is not a punishment. Everyone who ever worked
 on maintaining curl is considered a hero, for all time hereafter.
 
-### Security team members
+## Security team members
 
 We have a security team. That's the team of people who are subscribed to the
 curl-security mailing list; the receivers of security reports from users and
@@ -93,7 +108,7 @@
 expect to retire security team members as they "drift off" from the project or
 just find themselves unable to perform their duties there.
 
-### Server admins
+## Server admins
 
 We run a web server, a mailing list and more on the curl project's primary
 server. That physical machine is owned and run by Haxx. Daniel is the primary
@@ -106,7 +121,7 @@
 The website contents are served to the web via Fastly and Daniel is the
 primary curl contact with Fastly.
 
-### BDFL
+## BDFL
 
 That's Daniel.
 
@@ -131,7 +146,7 @@
 
 ### Recommendations
 
-- we require two-factor authentication enabled on your github account to
+- we require two-factor authentication enabled on your GitHub account to
   reduce risk of malicious source code tampering
 - consider enabling signed git commits for additional verification of changes
 
@@ -142,7 +157,7 @@
 - make sure the commit messages follow our template
 - squash patch sets into a few logical commits even if the PR didn't, if
   necessary
-- avoid the "merge" button on github, do it "manually" instead to get full
+- avoid the "merge" button on GitHub, do it "manually" instead to get full
   control and full audit trail (github leaves out you as "Committer:")
 - remember to credit the reporter and the helpers!
 
diff --git a/docs/HELP-US.md b/docs/HELP-US.md
index 5474434..ce3d720 100644
--- a/docs/HELP-US.md
+++ b/docs/HELP-US.md
@@ -26,7 +26,7 @@
 even maybe not a terribly experienced developer, here's our advice:
 
  - Read through this document to get a grasp on a general approach to use
- - Consider adding a test case for something not currentled tested (correctly)
+ - Consider adding a test case for something not currently tested (correctly)
  - Consider updating or adding documentation
  - One way to get your feet wet gently in the project, is to participate in an
    existing issue/PR and help out by reproducing the issue, review the code in
@@ -45,14 +45,14 @@
 
 Some bugs are known and haven't yet received attention and work enough to get
 fixed. We collect such known existing flaws in the
-[KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) page. Many of them link
+[KNOWN_BUGS](https://curl.se/docs/knownbugs.html) page. Many of them link
 to the original bug report with some additional details, but some may also
 have aged a bit and may require some verification that the bug still exists in
 the same way and that what was said about it in the past is still valid.
 
 ## Fix autobuild problems
 
-On the [autobuilds page](https://curl.haxx.se/dev/builds.html) we show a
+On the [autobuilds page](https://curl.se/dev/builds.html) we show a
 collection of test results from the automatic curl build and tests that are
 performed by volunteers. Fixing compiler warnings and errors shown there is
 something we value greatly. Also, if you own or run systems or architectures
@@ -63,7 +63,7 @@
 
 Ideas for features and functions that we have considered worthwhile to
 implement and provide are kept in the
-[TODO](https://curl.haxx.se/docs/todo.html) file. Some of the ideas are
+[TODO](https://curl.se/docs/todo.html) file. Some of the ideas are
 rough. Some are well thought out. Some probably aren't really suitable
 anymore.
 
@@ -81,7 +81,7 @@
 
 ## CONTRIBUTE
 
-We offer [guidelines](https://curl.haxx.se/dev/contribute.html) that are
+We offer [guidelines](https://curl.se/dev/contribute.html) that are
 suitable to be familiar with before you decide to contribute to curl. If
 you're used to open source development, you'll probably not find many
 surprises in there.
diff --git a/docs/HISTORY.md b/docs/HISTORY.md
index c5ed138..373741c 100644
--- a/docs/HISTORY.md
+++ b/docs/HISTORY.md
@@ -10,26 +10,45 @@
 1996
 ----
 
-Daniel adopted an existing command-line open-source tool, httpget, that
-Brazilian Rafael Sagula had written and recently released version 0.1
-of. After a few minor adjustments, it did just what he needed.
+On November 11, 1996 the Brazilian developer Rafael Sagula wrote and released
+HttpGet version 0.1.
+
+Daniel extended this existing command-line open-source tool. After a few minor
+adjustments, it did just what he needed. The first release with Daniel's
+additions was 0.2, released on December 17, 1996. Daniel quickly became the
+new maintainer of the project.
 
 1997
 ----
 
+HttpGet 0.3 was released in January 1997 and now it accepted HTTP URLs on the
+command line.
+
 HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support.
 
 We soon found and fixed support for getting currencies over GOPHER.  Once FTP
 download support was added, the name of the project was changed and urlget 2.0
 was released in August 1997. The http-only days were already passed.
 
+Version 2.2 was released on August 14 1997 and introduced support to build for
+and run on Windows and Solaris.
+
+November 24 1997: Version 3.1 added FTP upload support.
+
+Version 3.5 added support for HTTP POST.
+
 1998
 ----
 
-The project slowly grew bigger. When upload capabilities were added and the
-name once again was misleading, a second name change was made and on March 20,
-1998 curl 4 was released. (The version numbering from the previous names was
-kept.)
+February 4: urlget 3.10
+
+February 9: urlget 3.11
+
+March 14: urlget 3.12 added proxy authentication.
+
+The project slowly grew bigger. With upload capabilities, the name was once
+again misleading and a second name change was made. On March 20, 1998 curl 4
+was released. (The version numbering from the previous names was kept.)
 
 (Unrelated to this project a company called Curl Corporation registered a US
 trademark on the name "CURL" on May 18 1998. That company had then already
@@ -107,16 +126,18 @@
 code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
 The first experimental ftps:// support was added.
 
-August: curl is bundled in Mac OS X, 10.1. It was already becoming more and
-more of a standard utility of Linux distributions and a regular in the BSD
-ports collections. The curl website gets 8000 visits weekly. Curl Corporation
-contacted Daniel to discuss "the name issue". After Daniel's reply, they have
-never since got back in touch again.
+August: The curl website gets 8000 visits weekly. Curl Corporation contacted
+Daniel to discuss "the name issue". After Daniel's reply, they have never
+since got back in touch again.
 
 September: libcurl 7.9 introduces cookie jar and curl_formadd(). During the
 forthcoming 7.9.x releases, we introduced the multi interface slowly and
 without many whistles.
 
+September 25: curl (7.7.2) is bundled in Mac OS X (10.1) for the first time. It was
+already becoming more and more of a standard utility of Linux distributions
+and a regular in the BSD ports collections.
+
 2002
 ----
 
@@ -140,13 +161,13 @@
 January: Started working on the distributed curl tests. The autobuilds.
 
 February: the curl site averages at 20000 visits weekly. At any given moment,
-there's an average of 3 people browsing the curl.haxx.se site.
+there's an average of 3 people browsing the website.
 
 Multiple new authentication schemes are supported: Digest (May), NTLM (June)
 and Negotiate (June).
 
 November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
-to the curl.haxx.se site. Five official web mirrors.
+to the website. Five official web mirrors.
 
 December: full-fledged SSL for FTP is supported.
 
@@ -236,7 +257,7 @@
 
 February: security vulnerability: libcurl data callback excessive length
 
-March: The project switched over to use git (hosted by github) instead of CVS
+March: The project switched over to use git (hosted by GitHub) instead of CVS
 for source code control
 
 May: Added support for RTMP
@@ -382,3 +403,12 @@
  April: experimental MQTT support
 
  August: zstd support
+
+ November: the website moves to curl.se. The website serves 10TB data monthly.
+
+2021
+----
+
+ February 3: curl 7.75.0 ships with support for Hyper is a HTTP backend
+
+ March 31: curl 7.76.0 ships with support for rustls
diff --git a/docs/HSTS.md b/docs/HSTS.md
new file mode 100644
index 0000000..f63cfe3
--- /dev/null
+++ b/docs/HSTS.md
@@ -0,0 +1,44 @@
+# HSTS support
+
+HTTP Strict-Transport-Security. Added as experimental in curl
+7.74.0. Supported "for real" since 7.77.0.
+
+## Standard
+
+[HTTP Strict Transport Security](https://tools.ietf.org/html/rfc6797)
+
+## Behavior
+
+libcurl features an in-memory cache for HSTS hosts, so that subsequent
+HTTP-only requests to a host name present in the cache will get internally
+"redirected" to the HTTPS version.
+
+## `curl_easy_setopt()` options:
+
+ - `CURLOPT_HSTS_CTRL` - enable HSTS for this easy handle
+ - `CURLOPT_HSTS` - specify file name where to store the HSTS cache on close
+  (and possibly read from at startup)
+
+## curl cmdline options
+
+ - `--hsts [filename]` - enable HSTS, use the file as HSTS cache. If filename
+   is `""` (no length) then no file will be used, only in-memory cache.
+
+## HSTS cache file format
+
+Lines starting with `#` are ignored.
+
+For each hsts entry:
+
+    [host name] "YYYYMMDD HH:MM:SS"
+
+The `[host name]` is dot-prefixed if it is a includeSubDomain.
+
+The time stamp is when the entry expires.
+
+I considered using wget's file format for the HSTS cache. However, they store the time stamp as the epoch (number of seconds since 1970) and I strongly disagree with using that format. Instead I opted to use a format similar to the curl alt-svc cache file format.
+
+## Possible future additions
+
+ - `CURLOPT_HSTS_PRELOAD` - provide a set of preloaded HSTS host names
+ - ability to save to something else than a file
diff --git a/docs/HTTP-COOKIES.md b/docs/HTTP-COOKIES.md
index de9d1de..9d1e099 100644
--- a/docs/HTTP-COOKIES.md
+++ b/docs/HTTP-COOKIES.md
@@ -15,7 +15,7 @@
   servers with the Cookie: header.
 
   For a very long time, the only spec explaining how to use cookies was the
-  original [Netscape spec from 1994](https://curl.haxx.se/rfc/cookie_spec.html).
+  original [Netscape spec from 1994](https://curl.se/rfc/cookie_spec.html).
 
   In 2011, [RFC6265](https://www.ietf.org/rfc/rfc6265.txt) was finally
   published and details how cookies work within HTTP. In 2016, an update which
diff --git a/docs/HTTP2.md b/docs/HTTP2.md
index 4c72a29..d443067 100644
--- a/docs/HTTP2.md
+++ b/docs/HTTP2.md
@@ -7,7 +7,7 @@
 Build prerequisites
 -------------------
   - nghttp2
-  - OpenSSL, libressl, BoringSSL, NSS, GnutTLS, mbedTLS, wolfSSL or Schannel
+  - OpenSSL, libressl, BoringSSL, NSS, GnuTLS, mbedTLS, wolfSSL or Schannel
     with a new enough version.
 
 [nghttp2](https://nghttp2.org/)
@@ -105,14 +105,8 @@
 curl tool limitations
 ---------------------
 
-The command line tool won't do any HTTP/2 multiplexing even though libcurl
-supports it, simply because the curl tool is not written to take advantage of
-the libcurl API that's necessary for this (the multi interface). We have an
-outstanding TODO item for this and **you** can help us make it happen.
-
-The command line tool also doesn't support HTTP/2 server push for the same
-reason it doesn't do multiplexing: it needs to use the multi interface for
-that so that multiplexing is supported.
+The command line tool doesn't support HTTP/2 server push. It supports
+multiplexing when the parallel transfer option is used.
 
 HTTP Alternative Services
 -------------------------
diff --git a/docs/HTTP3.md b/docs/HTTP3.md
index fa9d244..2f377fd 100644
--- a/docs/HTTP3.md
+++ b/docs/HTTP3.md
@@ -33,7 +33,7 @@
 
 Build (patched) OpenSSL
 
-     % git clone --depth 1 -b OpenSSL_1_1_1g-quic-draft-29 https://github.com/tatsuhiro-t/openssl
+     % git clone --depth 1 -b OpenSSL_1_1_1k+quic https://github.com/quictls/openssl
      % cd openssl
      % ./config enable-tls1_3 --prefix=<somewhere1>
      % make
@@ -55,7 +55,7 @@
      % git clone https://github.com/ngtcp2/ngtcp2
      % cd ngtcp2
      % autoreconf -i
-     % ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3>
+     % ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only
      % make
      % make install
 
@@ -65,14 +65,14 @@
      % git clone https://github.com/curl/curl
      % cd curl
      % ./buildconf
-     % LDFLAGS="-Wl,-rpath,<somewhere1>/lib" ./configure --with-ssl=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3> --enable-alt-svc
+     % LDFLAGS="-Wl,-rpath,<somewhere1>/lib" ./configure --with-openssl=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3>
      % make
 
 ## Build with GnuTLS
 
-Build (patched) GnuTLS
+Build GnuTLS
 
-     % git clone --depth 1 -b tmp-quic https://gitlab.com/gnutls/gnutls.git
+     % git clone --depth 1 https://gitlab.com/gnutls/gnutls.git
      % cd gnutls
      % ./bootstrap
      % ./configure --disable-doc --prefix=<somewhere1>
@@ -95,7 +95,7 @@
      % git clone https://github.com/ngtcp2/ngtcp2
      % cd ngtcp2
      % autoreconf -i
-     % ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3>
+     % ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only --with-gnutls
      % make
      % make install
 
@@ -105,7 +105,7 @@
      % git clone https://github.com/curl/curl
      % cd curl
      % ./buildconf
-     % ./configure --without-ssl --with-gnutls=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3> --enable-alt-svc
+     % ./configure --without-openssl --with-gnutls=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3>
      % make
 
 # quiche version
@@ -116,7 +116,7 @@
 
      % git clone --recursive https://github.com/cloudflare/quiche
      % cd quiche
-     % cargo build --release --features pkg-config-meta,qlog
+     % cargo build --release --features ffi,pkg-config-meta,qlog
      % mkdir deps/boringssl/src/lib
      % ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) deps/boringssl/src/lib/
 
@@ -126,14 +126,14 @@
      % git clone https://github.com/curl/curl
      % cd curl
      % ./buildconf
-     % ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-ssl=$PWD/../quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release --enable-alt-svc
+     % ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-openssl=$PWD/../quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release
      % make
 
 ## Run
 
 Use HTTP/3 directly:
 
-    curl --http3 https://nghttp2.org:8443/
+    curl --http3 https://nghttp2.org:4433/
 
 Upgrade via Alt-Svc:
 
diff --git a/docs/HYPER.md b/docs/HYPER.md
new file mode 100644
index 0000000..da6c663
--- /dev/null
+++ b/docs/HYPER.md
@@ -0,0 +1,69 @@
+# Hyper
+
+Hyper is a separate HTTP library written in Rust. curl can be told to use this
+library as a backend to deal with HTTP.
+
+## Experimental!
+
+Hyper support in curl is considered **EXPERIMENTAL** until further notice. It
+needs to be explicitly enabled at build-time.
+
+Further development and tweaking of the Hyper backend support in curl will
+happen in in the master branch using pull-requests, just like ordinary
+changes.
+
+## Hyper version
+
+The C API for Hyper is brand new and is still under development.
+
+## build curl with hyper
+
+Build hyper and enable the C API:
+
+     % git clone https://github.com/hyperium/hyper
+     % cd hyper
+     % RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --features client,http1,http2,ffi
+
+Build curl to use hyper's C API:
+
+     % git clone https://github.com/curl/curl
+     % cd curl
+     % ./buildconf
+     % ./configure --with-hyper=<hyper dir>
+     % make
+
+# using Hyper internally
+
+Hyper is a low level HTTP transport library. curl itself provides all HTTP
+headers and Hyper provides all received headers back to curl.
+
+Therefore, most of the "header logic" in curl as in responding to and acting
+on specific input and output headers are done the same way in curl code.
+
+The API in Hyper delivers received HTTP headers as (cleaned up) name=value
+pairs, making it impossible for curl to know the exact byte representation
+over the wire with Hyper.
+
+## Limitations
+
+The hyper backend doesn't support
+
+- `CURLOPT_IGNORE_CONTENT_LENGTH`
+- RTSP
+
+## Remaining issues
+
+This backend is still not feature complete with the native backend. Areas that
+still need attention and verification include:
+
+- multiplexed HTTP/2
+- h2 Upgrade:
+- pausing transfers
+- co-exist with a HTTP/3 build
+- receiving HTTP/1 trailers
+- sending HTTP/1 trailers
+- accept-encoding
+- transfer encoding
+- alt-svc
+- hsts
+- DoH ([#6389](https://github.com/curl/curl/issues/6389))
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 33b439e..84fe829 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -30,11 +30,13 @@
 A normal Unix installation is made in three or four steps (after you've
 unpacked the source archive):
 
-    ./configure
+    ./configure --with-openssl [--with-gnutls --with-wolfssl]
     make
     make test (optional)
     make install
 
+(Adjust the configure line accordingly to use the TLS library you want.)
+
 You probably need to be root when doing the last command.
 
 Get a full listing of all available configure options by invoking it like:
@@ -59,16 +61,16 @@
 path for your compiler/linker, you don't need to do anything special. If you
 have OpenSSL installed in `/usr/local/ssl`, you can run configure like:
 
-    ./configure --with-ssl
+    ./configure --with-openssl
 
 If you have OpenSSL installed somewhere else (for example, `/opt/OpenSSL`) and
 you have pkg-config installed, set the pkg-config path first, like this:
 
-    env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl
+    env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-openssl
 
 Without pkg-config installed, use this:
 
-    ./configure --with-ssl=/opt/OpenSSL
+    ./configure --with-openssl=/opt/OpenSSL
 
 If you insist on forcing a build without SSL support, even though you may
 have OpenSSL installed in your system, you can run configure like this:
@@ -86,7 +88,7 @@
 linker doesn't find them (which usually causes configure failures), you can
 provide this option to gcc to set a hard-coded path to the run-time linker:
 
-    LDFLAGS=-Wl,-R/usr/local/ssl/lib ./configure --with-ssl
+    LDFLAGS=-Wl,-R/usr/local/ssl/lib ./configure --with-openssl
 
 ## More Options
 
@@ -109,17 +111,19 @@
 
 ## Select TLS backend
 
-The default OpenSSL configure check will also detect and use BoringSSL or
-libressl.
+These options are provided to select TLS backend to use.
 
- - GnuTLS: `--without-ssl --with-gnutls`.
- - wolfSSL: `--without-ssl --with-wolfssl`
- - NSS: `--without-ssl --with-nss`
- - mbedTLS: `--without-ssl --with-mbedtls`
- - schannel: `--without-ssl --with-schannel`
- - secure transport: `--without-ssl --with-secure-transport`
- - MesaLink: `--without-ssl --with-mesalink`
- - BearSSL: `--without-ssl --with-bearssl`
+ - AmiSSL: `--with-amissl`
+ - BearSSL: `--with-bearssl`
+ - GnuTLS: `--with-gnutls`.
+ - mbedTLS: `--with-mbedtls`
+ - MesaLink: `--with-mesalink`
+ - NSS: `--with-nss`
+ - OpenSSL: `--with-openssl` (also for BoringSSL and libressl)
+ - rustls: `--with-rustls`
+ - schannel: `--with-schannel`
+ - secure transport: `--with-secure-transport`
+ - wolfSSL: `--with-wolfssl`
 
 # Windows
 
@@ -148,7 +152,9 @@
 
 Make sure that MinGW32's bin dir is in the search path, for example:
 
-    set PATH=c:\mingw32\bin;%PATH%
+```cmd
+set PATH=c:\mingw32\bin;%PATH%
+```
 
 then run `mingw32-make mingw32` in the root dir. There are other
 make targets available to build libcurl with more features, use:
@@ -164,20 +170,26 @@
 adjust as necessary. It is also possible to override these paths with
 environment variables, for example:
 
-    set ZLIB_PATH=c:\zlib-1.2.8
-    set OPENSSL_PATH=c:\openssl-1.0.2c
-    set LIBSSH2_PATH=c:\libssh2-1.6.0
+```cmd
+set ZLIB_PATH=c:\zlib-1.2.8
+set OPENSSL_PATH=c:\openssl-1.0.2c
+set LIBSSH2_PATH=c:\libssh2-1.6.0
+```
 
 It is also possible to build with other LDAP SDKs than MS LDAP; currently
 it is possible to build with native Win32 OpenLDAP, or with the Novell CLDAP
 SDK. If you want to use these you need to set these vars:
 
-    set LDAP_SDK=c:\openldap
-    set USE_LDAP_OPENLDAP=1
+```cmd
+set LDAP_SDK=c:\openldap
+set USE_LDAP_OPENLDAP=1
+```
 
 or for using the Novell SDK:
 
-    set USE_LDAP_NOVELL=1
+```cmd
+set USE_LDAP_NOVELL=1
+```
 
 If you want to enable LDAPS support then set LDAPS=1.
 
@@ -196,7 +208,7 @@
 the configure utility on this platform.
 
 You can use specific defines to disable specific protocols and features. See
-[CURL-DISABLE.md](CURL-DISABLE-md) for the full list.
+[CURL-DISABLE.md](CURL-DISABLE.md) for the full list.
 
 If you want to set any of these defines you have the following options:
 
@@ -254,13 +266,12 @@
 versions. If you will be using curl in one of those earlier versions of
 Windows you should choose another SSL backend such as OpenSSL.
 
-# Apple iOS and macOS
+# Apple Platforms (macOS, iOS, tvOS, watchOS, and their simulator counterparts)
 
 On modern Apple operating systems, curl can be built to use Apple's SSL/TLS
 implementation, Secure Transport, instead of OpenSSL. To build with Secure
 Transport for SSL/TLS, use the configure option `--with-secure-transport`. (It
-is not necessary to use the option `--without-ssl`.) This feature requires iOS
-5.0 or later, or OS X 10.5 ("Leopard") or later.
+is not necessary to use the option `--without-openssl`.)
 
 When Secure Transport is in use, the curl options `--cacert` and `--capath`
 and their libcurl equivalents, will be ignored, because Secure Transport uses
@@ -269,20 +280,51 @@
 OS. The `--cert` and `--engine` options, and their libcurl equivalents, are
 currently unimplemented in curl with Secure Transport.
 
-For macOS users: In OS X 10.8 ("Mountain Lion"), Apple made a major overhaul
-to the Secure Transport API that, among other things, added support for the
-newer TLS 1.1 and 1.2 protocols. To get curl to support TLS 1.1 and 1.2, you
-must build curl on Mountain Lion or later, or by using the equivalent SDK. If
-you set the `MACOSX_DEPLOYMENT_TARGET` environmental variable to an earlier
-version of macOS prior to building curl, then curl will use the new Secure
-Transport API on Mountain Lion and later, and fall back on the older API when
-the same curl binary is executed on older cats. For example, running these
-commands in curl's directory in the shell will build the code such that it
-will run on cats as old as OS X 10.6 ("Snow Leopard") (using bash):
+In general, a curl build for an Apple `ARCH/SDK/DEPLOYMENT_TARGET` combination
+can be taken by providing appropriate values for `ARCH`, `SDK`, `DEPLOYMENT_TARGET`
+below and running the commands:
 
-    export MACOSX_DEPLOYMENT_TARGET="10.6"
-    ./configure --with-secure-transport
-    make
+```bash
+# Set these three according to your needs
+export ARCH=x86_64
+export SDK=macosx
+export DEPLOYMENT_TARGET=10.8
+
+export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET"
+./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts --with-secure-transport
+make -j8
+make install
+```
+
+Above will build curl for macOS platform with `x86_64` architecture and `10.8` as deployment target.
+
+Here is an example for iOS device:
+
+```bash
+export ARCH=arm64
+export SDK=iphoneos
+export DEPLOYMENT_TARGET=11.0
+
+export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET"
+./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts --with-secure-transport
+make -j8
+make install
+```
+
+Another example for watchOS simulator for macs with Apple Silicon:
+
+```bash
+export ARCH=arm64
+export SDK=watchsimulator
+export DEPLOYMENT_TARGET=5.0
+
+export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET"
+./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts --with-secure-transport
+make -j8
+make install
+```
+
+In all above, the built libraries and executables can be found in `artifacts` folder.
 
 # Android
 
@@ -295,16 +337,18 @@
 launching `configure`. On macOS, those variables could look like this to compile
 for `aarch64` and API level 29:
 
-    export NDK=~/Library/Android/sdk/ndk/20.1.5948944
-    export HOST_TAG=darwin-x86_64
-    export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
-    export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar
-    export AS=$TOOLCHAIN/bin/aarch64-linux-android-as
-    export CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang
-    export CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++
-    export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld
-    export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib
-    export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip
+```bash
+export NDK=~/Library/Android/sdk/ndk/20.1.5948944
+export HOST_TAG=darwin-x86_64
+export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
+export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar
+export AS=$TOOLCHAIN/bin/aarch64-linux-android-as
+export CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang
+export CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++
+export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld
+export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib
+export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip
+```
 
 When building on Linux or targeting other API levels or architectures, you need
 to adjust those variables accordingly. After that you can build curl like this:
@@ -318,13 +362,46 @@
 `libcrypto.a` to `$TOOLCHAIN/sysroot/usr/lib` and copy `include/openssl` to
 `$TOOLCHAIN/sysroot/usr/include`. Now you can build curl for Android using
 OpenSSL like this:
-    
-    ./configure --host aarch64-linux-android --with-pic --disable-shared --with-ssl="$TOOLCHAIN/sysroot/usr"
+
+    ./configure --host aarch64-linux-android --with-pic --disable-shared --with-openssl="$TOOLCHAIN/sysroot/usr"
 
 Note, however, that you must target at least Android M (API level 23) or `configure`
 won't be able to detect OpenSSL since `stderr` (and the like) weren't defined
 before Android M.
 
+# IBM i
+
+For IBM i (formerly OS/400), you can use curl in two different ways:
+
+- Natively, running in the **ILE**. The obvious use is being able to call curl
+  from ILE C or RPG applications.
+  - You will need to build this from source. See `packages/OS400/README` for
+    the ILE specific build instructions.
+- In the **PASE** environment, which runs AIX programs. curl will be built as
+  it would be on AIX.
+  - IBM provides builds of curl in their Yum repository for PASE software.
+  - To build from source, follow the Unix instructions.
+
+There are some additional limitations and quirks with curl on this platform;
+they affect both environments.
+
+## Multithreading notes
+
+By default, jobs in IBM i won't start with threading enabled. (Exceptions
+include interactive PASE sessions started by `QP2TERM` or SSH.) If you use
+curl in an environment without threading when options like async DNS were
+enabled, you'll messages like:
+
+```
+getaddrinfo() thread failed to start
+```
+
+Don't panic! curl and your program aren't broken. You can fix this by:
+
+- Set the environment variable `QIBM_MULTI_THREADED` to `Y` before starting
+  your program. This can be done at whatever scope you feel is appropriate.
+- Alternatively, start the job with the `ALWMLTTHD` parameter set to `*YES`.
+
 # Cross compile
 
 Download and unpack the curl package.
@@ -337,22 +414,24 @@
 example of cross-compiling for the IBM 405GP PowerPC processor using the
 toolchain from MonteVista for Hardhat Linux.
 
-    #! /bin/sh
+```bash
+#! /bin/sh
 
-    export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
-    export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
-    export AR=ppc_405-ar
-    export AS=ppc_405-as
-    export LD=ppc_405-ld
-    export RANLIB=ppc_405-ranlib
-    export CC=ppc_405-gcc
-    export NM=ppc_405-nm
+export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
+export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
+export AR=ppc_405-ar
+export AS=ppc_405-as
+export LD=ppc_405-ld
+export RANLIB=ppc_405-ranlib
+export CC=ppc_405-gcc
+export NM=ppc_405-nm
 
-    ./configure --target=powerpc-hardhat-linux
-        --host=powerpc-hardhat-linux
-        --build=i586-pc-linux-gnu
-        --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local
-        --exec-prefix=/usr/local
+./configure --target=powerpc-hardhat-linux
+    --host=powerpc-hardhat-linux
+    --build=i586-pc-linux-gnu
+    --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local
+    --exec-prefix=/usr/local
+```
 
 You may also need to provide a parameter like `--with-random=/dev/urandom` to
 configure as it cannot detect the presence of a random number generating
@@ -396,7 +475,7 @@
  - `--enable-hidden-symbols` (eliminates unneeded symbols in the shared library)
  - `--without-libidn` (disables support for the libidn DNS library)
  - `--without-librtmp` (disables support for RTMP)
- - `--without-ssl` (disables support for SSL/TLS)
+ - `--without-openssl` (disables support for SSL/TLS)
  - `--without-zlib` (disables support for on-the-fly decompression)
 
 The GNU compiler and linker have a number of options that can reduce the
@@ -433,77 +512,25 @@
 
 # PORTS
 
-This is a probably incomplete list of known hardware and operating systems
-that curl has been compiled for. If you know a system curl compiles and
-runs on, that isn't listed, please let us know!
+This is a probably incomplete list of known CPU architectures and operating
+systems that curl has been compiled for. If you know a system curl compiles
+and runs on, that isn't listed, please let us know!
 
-  - Alpha DEC OSF 4
-  - Alpha Digital UNIX v3.2
-  - Alpha FreeBSD 4.1, 4.5
-  - Alpha Linux 2.2, 2.4
-  - Alpha NetBSD 1.5.2
-  - Alpha OpenBSD 3.0
-  - Alpha OpenVMS V7.1-1H2
-  - Alpha Tru64 v5.0 5.1
-  - AVR32 Linux
-  - ARM Android 1.5, 2.1, 2.3, 3.2, 4.x
-  - ARM INTEGRITY
-  - ARM iOS
-  - Cell Linux
-  - Cell Cell OS
-  - HP-PA HP-UX 9.X 10.X 11.X
-  - HP-PA Linux
-  - HP3000 MPE/iX
-  - MicroBlaze uClinux
-  - MIPS IRIX 6.2, 6.5
-  - MIPS Linux
-  - OS/400
-  - Pocket PC/Win CE 3.0
-  - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
-  - PowerPC Darwin 1.0
-  - PowerPC INTEGRITY
-  - PowerPC Linux
-  - PowerPC Mac OS 9
-  - PowerPC Mac OS X
-  - SH4 Linux 2.6.X
-  - SH4 OS21
-  - SINIX-Z v5
-  - Sparc Linux
-  - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10
-  - Sparc SunOS 4.1.X
-  - StrongARM (and other ARM) RISC OS 3.1, 4.02
-  - StrongARM/ARM7/ARM9 Linux 2.4, 2.6
-  - StrongARM NetBSD 1.4.1
-  - Symbian OS (P.I.P.S.) 9.x
-  - TPF
-  - Ultrix 4.3a
-  - UNICOS 9.0
-  - i386 BeOS
-  - i386 DOS
-  - i386 eCos 1.3.1
-  - i386 Esix 4.1
-  - i386 FreeBSD
-  - i386 HURD
-  - i386 Haiku OS
-  - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
-  - i386 Mac OS X
-  - i386 MINIX 3.1
-  - i386 NetBSD
-  - i386 Novell NetWare
-  - i386 OS/2
-  - i386 OpenBSD
-  - i386 QNX 6
-  - i386 SCO unix
-  - i386 Solaris 2.7
-  - i386 Windows 95, 98, ME, NT, 2000, XP, 2003
-  - i486 ncr-sysv4.3.03 (NCR MP-RAS)
-  - ia64 Linux 2.3.99
-  - m68k AmigaOS 3
-  - m68k Linux
-  - m68k uClinux
-  - m68k OpenBSD
-  - m88k dg-dgux5.4R3.00
-  - s390 Linux
-  - x86_64 Linux
-  - XScale/PXA250 Linux 2.4
-  - Nios II uClinux
+## 85 Operating Systems
+
+AIX, AmigaOS, Android, Aros, BeOS, Blackberry 10, Blackberry Tablet OS, Cell
+OS, ChromeOS, Cisco IOS, Cygwin, Dragonfly BSD, eCOS, FreeBSD, FreeDOS,
+FreeRTOS, Fuchsia, Garmin OS, Genode, Haiku, HardenedBSD, HP-UX, Hurd,
+Illumos, Integrity, iOS, ipadOS, IRIX, LineageOS, Linux, Lua RTOS, Mac OS 9,
+macOS, Mbed, Micrium, MINIX, MorphOS, MPE/iX, MS-DOS, NCR MP-RAS, NetBSD,
+Netware, Nintendo Switch, NonStop OS, NuttX, OpenBSD, OpenStep, Orbis OS,
+OS/2, OS/400, OS21, Plan 9, PlayStation Portable, QNX, Qubes OS, ReactOS,
+Redox, RICS OS, Sailfish OS, SCO Unix, Serenity, SINIX-Z, Solaris, SunOS,
+Syllable OS, Symbian, Tizen, TPF, Tru64, tvOS, ucLinux, Ultrix, UNICOS,
+UnixWare, VMS, vxWorks, WebOS, Wii system software, Windows, Windows CE, Xbox
+System, z/OS, z/TPF, z/VM, z/VSE
+
+## 22 CPU Architectures
+
+Alpha, ARC, ARM, AVR32, Cell, HP-PA, Itanium, m68k, MicroBlaze, MIPS, Nios,
+OpenRISC, POWER, PowerPC, RISC-V, s390, SH4, SPARC, VAX, x86, x86-64, Xtensa
diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md
index e9be088..a1a8e11 100644
--- a/docs/INTERNALS.md
+++ b/docs/INTERNALS.md
@@ -87,7 +87,7 @@
  - OpenSSL      0.9.7
  - GnuTLS       3.1.10
  - zlib         1.1.4
- - libssh2      0.16
+ - libssh2      1.0
  - c-ares       1.6.0
  - libidn2      2.0.0
  - wolfSSL      2.0.0
@@ -145,7 +145,7 @@
 
    That's taken care of by the `curl_global_init()` call, but if other libs
    also do it etc there might be reasons for applications to alter that
-   behaviour.
+   behavior.
 
    We require WinSock version 2.2 and load this version during global init.
 
@@ -184,8 +184,9 @@
 
  `curl_global_init()` and `curl_global_cleanup()` should be called by the
  application to initialize and clean up global stuff in the library. As of
- today, it can handle the global SSL initing if SSL is enabled and it can init
- the socket layer on windows machines. libcurl itself has no "global" scope.
+ today, it can handle the global SSL initialization if SSL is enabled and it
+ can initialize the socket layer on Windows machines. libcurl itself has no
+ "global" scope.
 
  All printf()-style functions use the supplied clones in `lib/mprintf.c`. This
  makes sure we stay absolutely platform independent.
@@ -226,7 +227,7 @@
    This function makes sure there's an allocated and initiated `connectdata`
    struct that is used for this particular connection only (although there may
    be several requests performed on the same connect). A bunch of things are
-   inited/inherited from the `Curl_easy` struct.
+   initialized/inherited from the `Curl_easy` struct.
 
 <a name="multi_do"></a>
 multi_do()
@@ -236,11 +237,9 @@
    The functions are named after the protocols they handle.
 
    The protocol-specific functions of course deal with protocol-specific
-   negotiations and setup. They have access to the `Curl_sendf()` (from
-   `lib/sendf.c`) function to send printf-style formatted data to the remote
-   host and when they're ready to make the actual file transfer they call the
-   `Curl_setup_transfer()` function (in `lib/transfer.c`) to setup the
-   transfer and returns.
+   negotiations and setup. When they're ready to start the actual file
+   transfer they call the `Curl_setup_transfer()` function (in
+   `lib/transfer.c`) to setup the transfer and returns.
 
    If this DO function fails and the connection is being re-used, libcurl will
    then close this connection, setup a new connection and re-issue the DO
@@ -775,7 +774,9 @@
 
   Add a line in your application code:
 
-       `curl_dbg_memdebug("dump");`
+```c
+  curl_dbg_memdebug("dump");
+```
 
   This will make the malloc debug system output a full trace of all resource
   using functions to the given file name. Make sure you rebuild your program
@@ -975,6 +976,8 @@
   from a single array which is scanned through when a URL is given to libcurl
   to work with.
 
+  The concrete function pointer prototypes can be found in `lib/urldata.h`.
+
   `->scheme` is the URL scheme name, usually spelled out in uppercase. That's
   "HTTP" or "FTP" etc. SSL versions of the protocol need their own
   `Curl_handler` setup so HTTPS separate from HTTP.
@@ -983,8 +986,8 @@
   protocol specific data that then gets associated with that `Curl_easy` for
   the rest of this transfer. It gets freed again at the end of the transfer.
   It will be called before the `connectdata` for the transfer has been
-  selected/created. Most protocols will allocate its private
-  `struct [PROTOCOL]` here and assign `Curl_easy->req.protop` to point to it.
+  selected/created. Most protocols will allocate its private `struct
+  [PROTOCOL]` here and assign `Curl_easy->req.p.[protocol]` to it.
 
   `->connect_it` allows a protocol to do some specific actions after the TCP
   connect is done, that can still be considered part of the connection phase.
@@ -1016,13 +1019,15 @@
   `->domore_getsock`
   `->perform_getsock`
   Functions that return socket information. Which socket(s) to wait for which
-  action(s) during the particular multi state.
+  I/O action(s) during the particular multi state.
 
   `->disconnect` is called immediately before the TCP connection is shutdown.
 
   `->readwrite` gets called during transfer to allow the protocol to do extra
   reads/writes
 
+  `->attach` attaches a transfer to the connection.
+
   `->defport` is the default report TCP or UDP port this protocol uses
 
   `->protocol` is one or more bits in the `CURLPROTO_*` set. The SSL versions
@@ -1085,18 +1090,18 @@
   the share API.
 
 
-[1]: https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
-[2]: https://curl.haxx.se/libcurl/c/curl_easy_init.html
+[1]: https://curl.se/libcurl/c/curl_easy_setopt.html
+[2]: https://curl.se/libcurl/c/curl_easy_init.html
 [3]: https://c-ares.haxx.se/
 [4]: https://tools.ietf.org/html/rfc7230 "RFC 7230"
-[5]: https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
-[6]: https://curl.haxx.se/docs/manpage.html#--compressed
-[7]: https://curl.haxx.se/libcurl/c/curl_multi_socket_action.html
-[8]: https://curl.haxx.se/libcurl/c/curl_multi_timeout.html
-[9]: https://curl.haxx.se/libcurl/c/curl_multi_setopt.html
-[10]: https://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html
-[11]: https://curl.haxx.se/libcurl/c/curl_multi_perform.html
-[12]: https://curl.haxx.se/libcurl/c/curl_multi_fdset.html
-[13]: https://curl.haxx.se/libcurl/c/curl_multi_add_handle.html
-[14]: https://curl.haxx.se/libcurl/c/curl_multi_info_read.html
+[5]: https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
+[6]: https://curl.se/docs/manpage.html#--compressed
+[7]: https://curl.se/libcurl/c/curl_multi_socket_action.html
+[8]: https://curl.se/libcurl/c/curl_multi_timeout.html
+[9]: https://curl.se/libcurl/c/curl_multi_setopt.html
+[10]: https://curl.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html
+[11]: https://curl.se/libcurl/c/curl_multi_perform.html
+[12]: https://curl.se/libcurl/c/curl_multi_fdset.html
+[13]: https://curl.se/libcurl/c/curl_multi_add_handle.html
+[14]: https://curl.se/libcurl/c/curl_multi_info_read.html
 [15]: https://tools.ietf.org/html/rfc7231#section-3.1.2.2
diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS
index 1aa025f..eb31f70 100644
--- a/docs/KNOWN_BUGS
+++ b/docs/KNOWN_BUGS
@@ -19,7 +19,6 @@
  1.6 Unnecessary close when 401 received waiting for 100
  1.7 Deflate error after all content was received
  1.8 DoH isn't used for all name resolves when enabled
- 1.9 HTTP/2 frames while in the connection pool kill reuse
  1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM
 
  2. TLS
@@ -34,6 +33,8 @@
  2.9 TLS session cache doesn't work with TFO
  2.10 Store TLS context per transfer instead of per connection
  2.11 Schannel TLS 1.2 handshake bug in old Windows versions
+ 2.12 FTPS with Schannel times out file list operation
+ 2.14 Secure Transport disabling hostname validation also disables SNI
 
  3. Email protocols
  3.1 IMAP SEARCH ALL truncated response
@@ -45,7 +46,6 @@
  4.1 -J and -O with %-encoded file names
  4.2 -J with -C - fails
  4.3 --retry and transfer timeouts
- 4.4 Improve --data-urlencode space encoding
 
  5. Build and portability issues
  5.1 OS400 port requires deprecated IBM library
@@ -53,11 +53,12 @@
  5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10
  5.4 Build with statically built dependency
  5.5 can't handle Unicode arguments in non-Unicode builds on Windows
- 5.6 cmake support gaps
  5.7 Visual Studio project gaps
  5.8 configure finding libs in wrong directory
  5.9 Utilize Requires.private directives in libcurl.pc
+ 5.10 SMB tests fail with Python 2
  5.11 configure --with-gssapi with Heimdal is ignored on macOS
+ 5.12 flaky Windows CI builds
 
  6. Authentication
  6.1 NTLM authentication and unicode
@@ -68,6 +69,9 @@
  6.6 libcurl can fail to try alternatives with --proxy-any
  6.7 Don't clear digest for single realm
  6.8 RTSP authentication breaks without redirect support
+ 6.9 SHA-256 digest not supported in Windows SSPI builds
+ 6.10 curl never completes Negotiate over HTTP
+ 6.11 Negotiate on Windows fails
 
  7. FTP
  7.1 FTP without or slow 220 response
@@ -88,6 +92,7 @@
  9. SFTP and SCP
  9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct
  9.2 wolfssh: publickey auth doesn't work
+ 9.3 Remote recursive folder creation with SFTP
 
  10. SOCKS
  10.3 FTPS over SOCKS
@@ -105,19 +110,52 @@
  11.9 DoH doesn't inherit all transfer options
  11.10 Blocking socket operations in non-blocking API
  11.11 A shared connection cache is not thread-safe
- 11.12 'no_proxy' string-matches IPv6 numerical addreses
+ 11.12 'no_proxy' string-matches IPv6 numerical addresses
+ 11.13 wakeup socket disconnect causes havoc
+ 11.14 Multi perform hangs waiting for threaded resolver
+ 11.15 CURLOPT_OPENSOCKETPAIRFUNCTION is missing
+ 11.16 libcurl uses renames instead of locking for atomic operations
 
- 12. LDAP and OpenLDAP
+ 12. LDAP
  12.1 OpenLDAP hangs after returning results
  12.2 LDAP on Windows does authentication wrong?
  12.3 LDAP on Windows doesn't work
+ 12.4 LDAPS with NSS is slow
 
  13. TCP/IP
  13.1 --interface for ipv6 binds to unusable IP address
 
- 14 DICT
+ 14. DICT
  14.1 DICT responses show the underlying protocol
 
+ 15. CMake
+ 15.1 use correct SONAME
+ 15.2 support build with GnuTLS
+ 15.3 unusable tool_hugehelp.c with MinGW
+ 15.4 build docs/curl.1
+ 15.5 build on Linux links libcurl to libdl
+ 15.6 uses -lpthread instead of Threads::Threads
+ 15.7 generated .pc file contains strange entries
+ 15.8 libcurl.pc uses absolute library paths
+ 15.9 cert paths autodetected when cross-compiling
+ 15.10 libspsl is not supported
+ 15.11 ExternalProject_Add does not set CURL_CA_PATH
+ 15.12 cannot enable LDAPS on Windows
+
+ 16. Applications
+ 16.1 pulseUI VPN client
+
+ 17. HTTP/2
+ 17.1 Excessive HTTP/2 packets with TCP_NODELAY
+ 17.2 HTTP/2 frames while in the connection pool kill reuse
+ 17.3 ENHANCE_YOUR_CALM causes infinite retries
+ 17.4 Connection failures with parallel HTTP/2
+
+ 18. HTTP/3
+ 18.1 If the HTTP/3 server closes connection during upload curl hangs
+ 18.2 Uploading HTTP/3 files gets interrupted at certain file sizes
+ 18.3 HTTP/3 download is 5x times slower than HTTP/2
+
 ==============================================================================
 
 1. HTTP
@@ -137,7 +175,7 @@
  CURLINFO_PRETRANSFER_TIME is near to zero every time.
 
  https://github.com/curl/curl/issues/218
- https://curl.haxx.se/bug/view.cgi?id=1213
+ https://curl.se/bug/view.cgi?id=1213
 
 1.4 multipart formposts file name encoding
 
@@ -152,13 +190,13 @@
  If an upload using Expect: 100-continue receives an HTTP 417 response, it
  ought to be automatically resent without the Expect:.  A workaround is for
  the client application to redo the transfer after disabling Expect:.
- https://curl.haxx.se/mail/archive-2008-02/0043.html
+ https://curl.se/mail/archive-2008-02/0043.html
 
 1.6 Unnecessary close when 401 received waiting for 100
 
  libcurl closes the connection if an HTTP 401 reply is received while it is
  waiting for the 100-continue response.
- https://curl.haxx.se/mail/lib-2008-08/0462.html
+ https://curl.se/mail/lib-2008-08/0462.html
 
 1.7 Deflate error after all content was received
 
@@ -179,16 +217,6 @@
  See https://github.com/curl/curl/pull/3857 and
  https://github.com/curl/curl/pull/3850
 
-1.9 HTTP/2 frames while in the connection pool kill reuse
-
- If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to
- curl while the connection is held in curl's connection pool, the socket will
- be found readable when considered for reuse and that makes curl think it is
- dead and then it will be closed and a new connection gets created instead.
-
- This is *best* fixed by adding monitoring to connections while they are kept
- in the pool so that pings can be responded to appropriately.
-
 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM
 
  I'm using libcurl to POST form data using a FILE* with the CURLFORM_STREAM
@@ -211,7 +239,7 @@
 2.2 DER in keychain
 
  Curl doesn't recognize certificates in DER format in keychain, but it works
- with PEM.  https://curl.haxx.se/bug/view.cgi?id=1065
+ with PEM.  https://curl.se/bug/view.cgi?id=1065
 
 2.3 Unable to use PKCS12 certificate with Secure Transport
 
@@ -291,6 +319,26 @@
 
  https://github.com/curl/curl/issues/5488
 
+2.12 FTPS with Schannel times out file list operation
+
+ "Instead of the command completing, it just sits there until the timeout
+ expires." - the same command line seems to work with other TLS backends and
+ other operating systems. See https://github.com/curl/curl/issues/5284.
+
+2.14 Secure Transport disabling hostname validation also disables SNI
+
+ SNI is the hostname that is sent by the TLS library to the server as part of
+ the TLS handshake. Secure Transport does not send SNI when hostname validation
+ is disabled. Servers that host multiple websites may not know which
+ certificate to serve without SNI or which backend server to connect to. The
+ server may serve the certificate of a default server or abort.
+
+ If a server aborts a handshake then curl shows error "SSL peer handshake
+ failed, the server most likely requires a client certificate to connect".
+ In this case the error may also have been caused by lack of SNI.
+
+ https://github.com/curl/curl/issues/6347
+
 3. Email protocols
 
 3.1 IMAP SEARCH ALL truncated response
@@ -298,7 +346,7 @@
  IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
  code reveals that pingpong.c contains some truncation code, at line 408, when
  it deems the server response to be too large truncating it to 40 characters"
- https://curl.haxx.se/bug/view.cgi?id=1366
+ https://curl.se/bug/view.cgi?id=1366
 
 3.2 No disconnect command
 
@@ -309,7 +357,7 @@
 
  You have to tell libcurl not to expect a body, when dealing with one line
  response commands. Please see the POP3 examples and test cases which show
- this for the NOOP and DELE commands. https://curl.haxx.se/bug/?i=740
+ this for the NOOP and DELE commands. https://curl.se/bug/?i=740
 
 3.4 AUTH PLAIN for SMTP is not working on all servers
 
@@ -328,7 +376,7 @@
  decoding also means that we need to check for nastiness that is attempted,
  like "../" sequences and the like. Probably everything to the left of any
  embedded slashes should be cut off.
- https://curl.haxx.se/bug/view.cgi?id=1294
+ https://curl.se/bug/view.cgi?id=1294
 
  -O also doesn't decode %-encoded names, and while it has even less
  information about the charset involved the process is similar to the -J case.
@@ -343,7 +391,7 @@
  -" fails. Without -J the same command line works! This happens because the
  resume logic is worked out before the target file name (and thus its
  pre-transfer size) has been figured out!
- https://curl.haxx.se/bug/view.cgi?id=1169
+ https://curl.se/bug/view.cgi?id=1169
 
 4.3 --retry and transfer timeouts
 
@@ -351,16 +399,9 @@
  -y/-Y) the next attempt doesn't resume the transfer properly from what was
  downloaded in the previous attempt but will truncate and restart at the
  original position where it was at before the previous failed attempt. See
- https://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
+ https://curl.se/mail/lib-2008-01/0080.html and Mandriva bug report
  https://qa.mandriva.com/show_bug.cgi?id=22565
 
-4.4 Improve --data-urlencode space encoding
-
- ASCII space characters in --data-urlencode are currently encoded as %20
- rather than +, which RFC 1866 says should be used.
-
- See https://github.com/curl/curl/issues/3229
-
 5. Build and portability issues
 
 5.1 OS400 port requires deprecated IBM library
@@ -412,25 +453,9 @@
  _UNICODE and UNICODE defined. And, except for Cygwin, Windows can't use UTF-8
  as a locale.
 
-  https://curl.haxx.se/bug/?i=345
-  https://curl.haxx.se/bug/?i=731
-  https://curl.haxx.se/bug/?i=3747
-
-5.6 cmake support gaps
-
- The cmake build setup lacks several features that the autoconf build
- offers. This includes:
-
-  - use of correct soname for the shared library build
-
-  - support for several TLS backends are missing
-
-  - the unit tests cause link failures in regular non-static builds
-
-  - no nghttp2 check
-
-  - unusable tool_hugehelp.c with MinGW, see
-    https://github.com/curl/curl/issues/3125
+  https://curl.se/bug/?i=345
+  https://curl.se/bug/?i=731
+  https://curl.se/bug/?i=3747
 
 5.7 Visual Studio project gaps
 
@@ -467,12 +492,28 @@
 
  https://github.com/curl/curl/issues/864
 
+5.10 SMB tests fail with Python 2
+
+ The error message says "TreeConnectAndX not found".
+
+ See https://github.com/curl/curl/issues/5983
+
 5.11 configure --with-gssapi with Heimdal is ignored on macOS
 
  ... unless you also pass --with-gssapi-libs
 
  https://github.com/curl/curl/issues/3841
 
+5.12 flaky Windows CI builds
+
+ We run many CI builds for each commit and PR on github, and especially a
+ number of the Windows builds are very flaky. This means that we rarely get
+ all CI builds go green and complete without errors. This is very unfortunate
+ as it makes us sometimes miss actual build problems and it is surprising to
+ newcomers to the project who (rightfully) don't expect this.
+
+ See https://github.com/curl/curl/issues/6972
+
 6. Authentication
 
 6.1 NTLM authentication and unicode
@@ -480,11 +521,11 @@
  NTLM authentication involving unicode user name or password only works
  properly if built with UNICODE defined together with the Schannel
  backend. The original problem was mentioned in:
- https://curl.haxx.se/mail/lib-2009-10/0024.html
- https://curl.haxx.se/bug/view.cgi?id=896
+ https://curl.se/mail/lib-2009-10/0024.html
+ https://curl.se/bug/view.cgi?id=896
 
  The Schannel version verified to work as mentioned in
- https://curl.haxx.se/mail/lib-2012-07/0073.html
+ https://curl.se/mail/lib-2012-07/0073.html
 
 6.2 MIT Kerberos for Windows build
 
@@ -496,7 +537,7 @@
 
  NTLM authentication using SSPI (on Windows) when (lib)curl is running in
  "system context" will make it use wrong(?) user name - at least when compared
- to what winhttp does. See https://curl.haxx.se/bug/view.cgi?id=535
+ to what winhttp does. See https://curl.se/bug/view.cgi?id=535
 
 6.4 Negotiate and Kerberos V5 need a fake user name
 
@@ -504,8 +545,8 @@
  V5 in the e-mail protocols, you need to  provide a (fake) user name (this
  concerns both curl and the lib) because the code wrongly only considers
  authentication if there's a user name provided by setting
- conn->bits.user_passwd in url.c  https://curl.haxx.se/bug/view.cgi?id=440 How?
- https://curl.haxx.se/mail/lib-2004-08/0182.html A possible solution is to
+ conn->bits.user_passwd in url.c  https://curl.se/bug/view.cgi?id=440 How?
+ https://curl.se/mail/lib-2004-08/0182.html A possible solution is to
  either modify this variable to be set or introduce a variable such as
  new conn->bits.want_authentication which is set when any of the authentication
  options are set.
@@ -538,6 +579,32 @@
 
  See https://github.com/curl/curl/pull/4750
 
+6.9 SHA-256 digest not supported in Windows SSPI builds
+
+ Windows builds of curl that have SSPI enabled use the native Windows API calls
+ to create authentication strings. The call to InitializeSecurityContext fails
+ with SEC_E_QOP_NOT_SUPPORTED which causes curl to fail with CURLE_AUTH_ERROR.
+
+ Microsoft does not document supported digest algorithms and that SEC_E error
+ code is not a documented error for InitializeSecurityContext (digest).
+
+ https://github.com/curl/curl/issues/6302
+
+6.10 curl never completes Negotiate over HTTP
+
+ Apparently it isn't working correctly...?
+
+ See https://github.com/curl/curl/issues/5235
+
+6.11 Negotiate on Windows fails
+
+ When using --negotiate (or NTLM) with curl on Windows, SSL/TSL handshake
+ fails despite having a valid kerberos ticket cached. Works without any issue
+ in Unix/Linux.
+
+ https://github.com/curl/curl/issues/5881
+
+
 7. FTP
 
 7.1 FTP without or slow 220 response
@@ -547,7 +614,7 @@
  connection timeout during that phase but only the "real" timeout - which may
  surprise users as it is probably considered to be the connect phase to most
  people. Brought up (and is being misunderstood) in:
- https://curl.haxx.se/bug/view.cgi?id=856
+ https://curl.se/bug/view.cgi?id=856
 
 7.2 FTP with CONNECT and slow server
 
@@ -561,14 +628,14 @@
 
  It seems sensible to be able to use CURLOPT_NOBODY and CURLOPT_FAILONERROR
  with FTP to detect if a file exists or not, but it is not working:
- https://curl.haxx.se/mail/lib-2008-07/0295.html
+ https://curl.se/mail/lib-2008-07/0295.html
 
 7.4 FTP with ACCT
 
  When doing an operation over FTP that requires the ACCT command (but not when
  logging in), the operation will fail since libcurl doesn't detect this and
  thus fails to issue the correct command:
- https://curl.haxx.se/bug/view.cgi?id=635
+ https://curl.se/bug/view.cgi?id=635
 
 7.5 ASCII FTP
 
@@ -640,12 +707,12 @@
 8.1 TELNET and time limitations don't work
 
  When using telnet, the time limitation options don't work.
- https://curl.haxx.se/bug/view.cgi?id=846
+ https://curl.se/bug/view.cgi?id=846
 
 8.2 Microsoft telnet server
 
  There seems to be a problem when connecting to the Microsoft telnet server.
- https://curl.haxx.se/bug/view.cgi?id=649
+ https://curl.se/bug/view.cgi?id=649
 
 
 9. SFTP and SCP
@@ -657,7 +724,7 @@
  instead the connection is "cancelled" (the operation is considered done)
  prematurely. There is a half-baked (busy-looping) patch provided in the bug
  report but it cannot be accepted as-is. See
- https://curl.haxx.se/bug/view.cgi?id=748
+ https://curl.se/bug/view.cgi?id=748
 
 9.2 wolfssh: publickey auth doesn't work
 
@@ -667,6 +734,14 @@
 
  See https://github.com/curl/curl/issues/4820
 
+9.3 Remote recursive folder creation with SFTP
+
+ On this servers, the curl fails to create directories on the remote server
+ even when CURLOPT_FTP_CREATE_MISSING_DIRS option is set.
+
+ See https://github.com/curl/curl/issues/5204
+
+
 10. SOCKS
 
 10.3 FTPS over SOCKS
@@ -743,7 +818,7 @@
  signal handler back into the library with a sigsetjmp, which effectively
  causes libcurl to continue running within the signal handler. This is
  non-portable and could cause problems on some platforms. A discussion on the
- problem is available at https://curl.haxx.se/mail/lib-2008-09/0197.html
+ problem is available at https://curl.se/mail/lib-2008-09/0197.html
 
  Also, alarm() provides timeout resolution only to the nearest second. alarm
  ought to be replaced by setitimer on systems that support it.
@@ -754,7 +829,17 @@
 
 11.9 DoH doesn't inherit all transfer options
 
- https://github.com/curl/curl/issues/4578
+ Some options are not inherited because they are not relevant for the DoH SSL
+ connections, or inheriting the option may result in unexpected behavior. For
+ example the user's debug function callback is not inherited because it would
+ be unexpected for internal handles (ie DoH handles) to be passed to that
+ callback.
+
+ If an option is not inherited then it is not possible to set it separately for
+ DoH without a DoH-specific option. For example: CURLOPT_DOH_SSL_VERIFYHOST,
+ CURLOPT_DOH_SSL_VERIFYPEER and CURLOPT_DOH_SSL_VERIFYSTATUS.
+
+ See https://github.com/curl/curl/issues/6605
 
 11.10 Blocking socket operations in non-blocking API
 
@@ -768,14 +853,53 @@
 
  See https://github.com/curl/curl/issues/4915 and lib1541.c
 
-11.12 'no_proxy' string-matches IPv6 numerical addreses
+11.12 'no_proxy' string-matches IPv6 numerical addresses
 
  This has the downside that "::1" for example doesn't match "::0:1" even
  though they are in fact the same address.
 
  See https://github.com/curl/curl/issues/5745
 
-12. LDAP and OpenLDAP
+11.13 wakeup socket disconnect causes havoc
+
+ waking an iPad breaks the wakeup socket pair, triggering a POLLIN event and
+ resulting in SOCKERRNO being set to ENOTCONN.
+
+ This condition, and other possible error conditions on the wakeup socket, are
+ not handled, so the condition remains on the FD and curl_multi_poll will
+ never block again.
+
+ See https://github.com/curl/curl/issues/6132 and
+ https://github.com/curl/curl/pull/6133
+
+11.14 Multi perform hangs waiting for threaded resolver
+
+ If a threaded resolver takes a long time to complete, libcurl can be blocked
+ waiting for it for a longer time than expected - and longer than the set
+ timeouts.
+
+ See https://github.com/curl/curl/issues/2975 and
+ https://github.com/curl/curl/issues/4852
+
+11.15 CURLOPT_OPENSOCKETPAIRFUNCTION is missing
+
+ When libcurl creates sockets with socketpair(), those are not "exposed" in
+ CURLOPT_OPENSOCKETFUNCTION and therefore might surprise and be unknown to
+ applications that expects and wants all sockets known beforehand. One way to
+ address this issue is to introduce a CURLOPT_OPENSOCKETPAIRFUNCTION callback.
+
+ https://github.com/curl/curl/issues/5747
+
+11.16 libcurl uses renames instead of locking for atomic operations
+
+ For saving cookies, alt-svc and hsts files. This is bad when for example the
+ file is stored in a directory where the application has no write permission
+ but it has permission for the file.
+
+ https://github.com/curl/curl/issues/6882
+ https://github.com/curl/curl/pull/6884
+
+12. LDAP
 
 12.1 OpenLDAP hangs after returning results
 
@@ -794,7 +918,7 @@
  Generic LDAP is synchronous: OK.
 
  See https://github.com/curl/curl/issues/622 and
-     https://curl.haxx.se/mail/lib-2016-01/0101.html
+     https://curl.se/mail/lib-2016-01/0101.html
 
 12.2 LDAP on Windows does authentication wrong?
 
@@ -807,6 +931,10 @@
 
  https://github.com/curl/curl/issues/4261
 
+12.4 LDAPS with NSS is slow
+
+ See https://github.com/curl/curl/issues/5874
+
 13. TCP/IP
 
 13.1 --interface for ipv6 binds to unusable IP address
@@ -825,3 +953,134 @@
  from the output.
 
  https://github.com/curl/curl/issues/1809
+
+15. CMake
+
+15.1 use correct SONAME
+
+ The autotools build sets the SONAME properly according to VERSIONINFO in
+ lib/Makefile.am and so should cmake to make comparable build.
+
+ See https://github.com/curl/curl/pull/5935
+
+15.2 support build with GnuTLS
+
+15.3 unusable tool_hugehelp.c with MinGW
+
+ see https://github.com/curl/curl/issues/3125
+
+15.4 build docs/curl.1
+
+ The cmake build doesn't create the docs/curl.1 file and therefor must rely on
+ it being there already. This makes the --manual option not work and test
+ cases like 1139 can't function.
+
+15.5 build on Linux links libcurl to libdl
+
+ ... which it shouldn't need to!
+
+ See https://github.com/curl/curl/issues/6165
+
+15.6 uses -lpthread instead of Threads::Threads
+
+ See https://github.com/curl/curl/issues/6166
+
+15.7 generated .pc file contains strange entries
+
+ The Libs.private field of the generated .pc file contains -lgcc -lgcc_s -lc
+ -lgcc -lgcc_s
+
+ See https://github.com/curl/curl/issues/6167
+
+15.8 libcurl.pc uses absolute library paths
+
+ The libcurl.pc file generated by cmake contains things like Libs.private:
+ /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so. The
+ autotools equivalent would say Libs.private: -lssl -lcrypto -lz
+
+ See https://github.com/curl/curl/issues/6169
+
+15.9 cert paths autodetected when cross-compiling
+
+ The autotools build disables the ca_path/ca_bundle detection when
+ cross-compiling. The cmake build keeps doing the detection.
+
+ See https://github.com/curl/curl/issues/6178
+
+15.10 libspsl is not supported
+
+ See https://github.com/curl/curl/issues/6214
+
+15.11 ExternalProject_Add does not set CURL_CA_PATH
+
+ CURL_CA_BUNDLE and CURL_CA_PATH are not set properly when cmake's
+ ExternalProject_Add is used to build curl as a dependency.
+
+ See https://github.com/curl/curl/issues/6313
+
+15.12 cannot enable LDAPS on Windows
+
+ See https://github.com/curl/curl/issues/6284
+
+16. Applications
+
+16.1 pulseUI VPN client
+
+ This application crashes at startup with libcurl 7.74.0 (and presumably later
+ versions too) after we cleaned up OpenSSL initialization. Since this is the
+ only known application to do this, we suspect it is related to something they
+ are doing in their setup that isn't kosher. We have not been able to get in
+ contact with them nor got any technical details to help us debug this
+ further.
+
+ See
+ https://community.pulsesecure.net/t5/Pulse-Desktop-Clients/Linux-Pulse-Client-does-not-work-with-curl-7-74/m-p/44378
+ and https://github.com/curl/curl/issues/6306
+
+17. HTTP/2
+
+17.1 Excessive HTTP/2 packets with TCP_NODELAY
+
+ Because of how curl sets TCP_NODELAY by default, HTTP/2 requests are issued
+ using more separate TCP packets than it would otherwise need to use. This
+ means spending more bytes than it has to. Just disabling TCP_NODELAY for
+ HTTP/2 is also not the correct fix because that then makes the outgoing
+ packets to get delayed.
+
+ See https://github.com/curl/curl/issues/6363
+
+17.2 HTTP/2 frames while in the connection pool kill reuse
+
+ If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to
+ curl while the connection is held in curl's connection pool, the socket will
+ be found readable when considered for reuse and that makes curl think it is
+ dead and then it will be closed and a new connection gets created instead.
+
+ This is *best* fixed by adding monitoring to connections while they are kept
+ in the pool so that pings can be responded to appropriately.
+
+17.3 ENHANCE_YOUR_CALM causes infinite retries
+
+ Infinite retries with 2 parallel requests on one connection receiving GOAWAY
+ with ENHANCE_YOUR_CALM error code.
+
+ See https://github.com/curl/curl/issues/5119
+
+17.4 Connection failures with parallel HTTP/2
+
+ See https://github.com/curl/curl/issues/5611
+
+
+18. HTTP/3
+
+18.1 If the HTTP/3 server closes connection during upload curl hangs
+
+ See https://github.com/curl/curl/issues/6606
+
+18.2 Uploading HTTP/3 files gets interrupted at certain file sizes
+
+ See https://github.com/curl/curl/issues/6510
+
+18.3 HTTP/3 download is 5x times slower than HTTP/2
+
+ See https://github.com/curl/curl/issues/6494
diff --git a/docs/MAIL-ETIQUETTE b/docs/MAIL-ETIQUETTE
index 9d210a6..80d06b6 100644
--- a/docs/MAIL-ETIQUETTE
+++ b/docs/MAIL-ETIQUETTE
@@ -34,7 +34,7 @@
   1.1 Mailing Lists
 
   The mailing lists we have are all listed and described at
-  https://curl.haxx.se/mail/
+  https://curl.se/mail/
 
   Each mailing list is targeted to a specific set of users and subjects,
   please use the one or the ones that suit you the most.
diff --git a/docs/Makefile.am b/docs/Makefile.am
index b7d1792..656d1ac 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -44,6 +44,7 @@
  $(noinst_man_MANS)                             \
  ALTSVC.md                                      \
  BINDINGS.md                                    \
+ BUFREF.md                                      \
  BUG-BOUNTY.md                                  \
  BUGS.md                                        \
  CHECKSRC.md                                    \
@@ -59,13 +60,15 @@
  ECH.md                                         \
  EXPERIMENTAL.md                                \
  FAQ                                            \
- FEATURES                                       \
+ FEATURES.md                                    \
  GOVERNANCE.md                                  \
  HELP-US.md                                     \
  HISTORY.md                                     \
+ HSTS.md                                        \
  HTTP-COOKIES.md                                \
  HTTP2.md                                       \
  HTTP3.md                                       \
+ HYPER.md                                       \
  INSTALL                                        \
  INSTALL.cmake                                  \
  INSTALL.md                                     \
@@ -73,10 +76,12 @@
  KNOWN_BUGS                                     \
  MAIL-ETIQUETTE                                 \
  MQTT.md                                        \
+ NEW-PROTOCOL.md                                \
  options-in-versions                            \
  PARALLEL-TRANSFERS.md                          \
  README.md                                      \
  RELEASE-PROCEDURE.md                           \
+ RUSTLS.md                                      \
  ROADMAP.md                                     \
  SECURITY-PROCESS.md                            \
  SSL-PROBLEMS.md                                \
@@ -84,6 +89,7 @@
  THANKS                                         \
  TODO                                           \
  TheArtOfHttpScripting.md                       \
+ URL-SYNTAX.md                                  \
  VERSIONS.md
 
 MAN2HTML= roffit $< >$@
diff --git a/docs/NEW-PROTOCOL.md b/docs/NEW-PROTOCOL.md
new file mode 100644
index 0000000..9984eea
--- /dev/null
+++ b/docs/NEW-PROTOCOL.md
@@ -0,0 +1,110 @@
+# Adding a new protocol?
+
+Every once in a while someone comes up with the idea of adding support for yet
+another protocol to curl. After all, curl already supports 25 something
+protocols and it is the Internet transfer machine for the world.
+
+In the curl project we love protocols and we love supporting many protocols
+and do it well.
+
+So how do you proceed to add a new protocol and what are the requirements?
+
+## No fixed set of requirements
+
+This document is an attempt to describe things to consider. There is no
+checklist of the twenty-seven things you need to cross off. We view the entire
+effort as a whole and then judge if it seems to be the right thing - for
+now. The more things that look right, fit our patterns and are done in ways
+that align with our thinking, the better are the chances that we will agree
+that supporting this protocol is a grand idea.
+
+## Mutual benefit is preferred
+
+curl is not here for your protocol. Your protocol is not here for curl. The
+best cooperation and end result occur when all involved parties mutually see
+and agree that supporting this protocol in curl would be good for everyone.
+Heck, for the world!
+
+Consider "selling us" the idea that we need an implementation merged in curl,
+to be fairly important. *Why* do we want curl to support this new protocol?
+
+## Protocol requirements
+
+### Client-side
+
+The protocol implementation is for a client's side of a "communication
+session".
+
+### Transfer oriented
+
+The protocol itself should be focused on *transfers*. Be it uploads or
+downloads or both. It should at least be possible to view the transfers as
+such, like we can view reading emails over POP3 as a download and sending
+emails over SMTP as an upload.
+
+If you cannot even shoehorn the protocol into a transfer focused view, then
+you are up for a tough argument.
+
+### URL
+
+There should be a documented URL format. If there is an RFC for it there is no
+question about it but the syntax doesn't have to be a published RFC. It could
+be enough if it is already in use by other implementations.
+
+If you make up the syntax just in order to be able to propose it to curl, then
+you are in a bad place. URLs are designed and defined for interoperability.
+There should at least be a good chance that other clients and servers can be
+implemented supporting the same URL syntax and work the same or similar way.
+
+URLs work on registered 'schemes'. There is a register of [all officially
+recognized
+schemes](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml). If
+your protocol is not in there, is it really a protocol we want?
+
+### Wide and public use
+
+The protocol shall already be used or have an expectation of getting used
+widely. Experimental protocols are better off worked on in experiments first,
+to prove themselves before they are adopted by curl.
+
+## Code
+
+Of course the code needs to be written, provided, licensed agreeably and it
+should follow our code guidelines and review comments have to be dealt with.
+If the implementation needs third party code, that third party code should not
+have noticeably lesser standards than the curl project itself.
+
+## Tests
+
+As much of the protocol implementation as possible needs to be verified by
+curl test cases. We must have the implementation get tested by CI jobs,
+torture tests and more.
+
+We've experienced many times in the past how new implementations were brought
+to curl and immediately once the code had been merged, the originator vanished
+from the face of the earth. That is fine, but we need to take the necessary
+precautions so when it happens we are still fine.
+
+Our test infrastructure is powerful enough to test just about every possible
+protocol - but it might require a bit of an effort to make it happen.
+
+## Documentation
+
+We cannot assume that users are particularly familiar with specific details
+and peculiarities of the protocol. It needs documentation.
+
+Maybe it even needs some internal documentation so that the developers who
+will try to debug something five years from now can figure out functionality a
+little easier!
+
+The protocol specification itself should be freely available without requiring
+any NDA or similar.
+
+## Don't compare
+
+We are constantly raising the bar and we are constantly improving the
+project. A lot of things we did in the past would not be acceptable if done
+today.  Therefore, you might be tempted to use shortcuts or "hacks" you can
+spot other - existing - protocol implementations have used, but there is
+nothing to gain from that. The bar has been raised. Former "cheats" won't be
+tolerated anymore.
diff --git a/docs/README.md b/docs/README.md
index 0521937..0783850 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,4 +1,4 @@
-![curl logo](https://curl.haxx.se/logo/curl-logo.svg)
+![curl logo](https://curl.se/logo/curl-logo.svg)
 
 # Documentation
 
@@ -7,6 +7,6 @@
 for reading directly in your browser.
 
 If you'd rather see the rendered version of the documentation, check out the
-curl website's [documentation section](https://curl.haxx.se/docs/) for
-general curl stuff or the [libcurl section](https://curl.haxx.se/libcurl/) for
+curl website's [documentation section](https://curl.se/docs/) for
+general curl stuff or the [libcurl section](https://curl.se/libcurl/) for
 libcurl related documentation.
diff --git a/docs/RELEASE-PROCEDURE.md b/docs/RELEASE-PROCEDURE.md
index b53e5a3..3faad65 100644
--- a/docs/RELEASE-PROCEDURE.md
+++ b/docs/RELEASE-PROCEDURE.md
@@ -44,7 +44,7 @@
 
   (the website then updates its contents automatically)
 
-on github
+on GitHub
 ---------
 
 - edit the newly made release tag so that it is listed as the latest release
@@ -95,15 +95,16 @@
 Based on the description above, here are some planned release dates (at the
 time of this writing):
 
-- August 19, 2020 (7.72.0)
-- October 14, 2020
-- December 9, 2020
-- February 3, 2021
-- March 31, 2021
+- March 31, 2021 (7.76.0)
 - May 26, 2021
 - July 21, 2021
 - September 15, 2021
 - November 10, 2021
+- January 5, 2022
+- March 2, 2022
+- April 27, 2022
+- June 22, 2022
+- August 17, 2022
 
 The above (and more) curl-related dates are published in
 [iCalendar format](https://calendar.google.com/calendar/ical/c9u5d64odop9js55oltfarjk6g%40group.calendar.google.com/public/basic.ics)
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 574bd81..79e8b03 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -1,19 +1,24 @@
-curl the next few years - perhaps
-=================================
+# curl the next few years - perhaps
 
 Roadmap of things Daniel Stenberg wants to work on next. It is intended to
 serve as a guideline for others for information, feedback and possible
 participation.
 
-HSTS
-----
+## "Complete" the HTTP/3 support
 
- Merge [the existing PR](https://github.com/curl/curl/pull/5896).
+curl has experimental support for HTTP/3 since a good while back. There are
+some functionality missing and once the final specs are published we want to
+eventually remove the "experimental" label from this functionality.
 
-ECH (Encrypted Client Hello - formerly known as ESNI)
------------------------------------------------------
+## HTTPS DNS records
+
+As a DNS version of alt-svc and also a pre-requisite for ECH (see below).
+
+See: https://tools.ietf.org/html/draft-ietf-dnsop-svcb-https-02
+
+## ECH (Encrypted Client Hello - formerly known as ESNI)
 
  See Daniel's post on [Support of Encrypted
- SNI](https://curl.haxx.se/mail/lib-2019-03/0000.html) on the mailing list.
+ SNI](https://curl.se/mail/lib-2019-03/0000.html) on the mailing list.
 
  Initial work exists in https://github.com/curl/curl/pull/4011
diff --git a/docs/RUSTLS.md b/docs/RUSTLS.md
new file mode 100644
index 0000000..ecce430
--- /dev/null
+++ b/docs/RUSTLS.md
@@ -0,0 +1,26 @@
+# Rustls
+
+[Rustls is a TLS backend written in Rust.](https://docs.rs/rustls/). Curl can
+be built to use it as an alternative to OpenSSL or other TLS backends. We use
+the [rustls-ffi C bindings](https://github.com/rustls/rustls-ffi/). This
+version of curl depends on version v0.7.0 of rustls-ffi.
+
+# Building with rustls
+
+First, [install Rust](https://rustup.rs/).
+
+Next, check out, build, and install the appropriate version of rustls-ffi:
+
+    % cargo install cbindgen
+    % git clone https://github.com/rustls/rustls-ffi -b v0.7.0
+    % cd rustls-ffi
+    % make
+    % make DESTDIR=${HOME}/rustls-ffi-built/ install
+
+Now configure and build curl with rustls:
+
+    % git clone https://github.com/curl/curl
+    % cd curl
+    % ./buildconf
+    % ./configure --with-rustls=${HOME}/rustls-ffi-built
+    % make
diff --git a/docs/SECURITY-PROCESS.md b/docs/SECURITY-PROCESS.md
index d2ac1fd..a5d487a 100644
--- a/docs/SECURITY-PROCESS.md
+++ b/docs/SECURITY-PROCESS.md
@@ -8,7 +8,7 @@
 ----------------------
 
 All known and public curl or libcurl related vulnerabilities are listed on
-[the curl website security page](https://curl.haxx.se/docs/security.html).
+[the curl website security page](https://curl.se/docs/security.html).
 
 Security vulnerabilities **should not** be entered in the project's public bug
 tracker.
@@ -125,8 +125,16 @@
 6. On security advisory release day, push the changes on the curl-www
    repository's remote master branch.
 
+Hackerone
+---------
+
+Request the issue to be disclosed. If there are sensitive details present in
+the report and discussion, those should be redacted from the disclosure. The
+default policy is to disclose as much as possible as soon as the vulnerability
+has been published.
+
 Bug Bounty
 ----------
 
-See [BUG-BOUNTY](https://curl.haxx.se/docs/bugbounty.html) for details on the
+See [BUG-BOUNTY](https://curl.se/docs/bugbounty.html) for details on the
 bug bounty program.
diff --git a/docs/SSL-PROBLEMS.md b/docs/SSL-PROBLEMS.md
index 35000cf..54f9853 100644
--- a/docs/SSL-PROBLEMS.md
+++ b/docs/SSL-PROBLEMS.md
@@ -23,8 +23,18 @@
 ## CA bundle missing intermediate certificates
 
   When using said CA bundle to verify a server cert, you will experience
-  problems if your CA cert does not have the certificates for the
-  intermediates in the whole trust chain.
+  problems if your CA store does not contain the certificates for the
+  intermediates if the server doesn't provide them.
+
+  The TLS protocol mandates that the intermediate certificates are sent in the
+  handshake, but as browsers have ways to survive or work around such
+  omissions, missing intermediates in TLS handshakes still happen that
+  browser-users won't notice.
+
+  Browsers work around this problem in two ways: they cache intermediate
+  certificates from previous transfers and some implement the TLS "AIA"
+  extension that lets the client explicitly download such certificates on
+  demand.
 
 ## Protocol version
 
@@ -36,7 +46,8 @@
   An additional complication can be that modern SSL libraries sometimes are
   built with support for older SSL and TLS versions disabled!
 
-  All versions of SSL are considered insecure and should be avoided. Use TLS.
+  All versions of SSL and the TLS versions before 1.2 are considered insecure
+  and should be avoided. Use TLS 1.2 or later.
 
 ## Ciphers
 
@@ -84,4 +95,4 @@
 
   References:
 
-  https://curl.haxx.se/docs/ssl-compared.html
+  https://curl.se/docs/ssl-compared.html
diff --git a/docs/SSLCERTS.md b/docs/SSLCERTS.md
index c991f67..415b540 100644
--- a/docs/SSLCERTS.md
+++ b/docs/SSLCERTS.md
@@ -119,7 +119,7 @@
  5. Get a better/different/newer CA cert bundle! One option is to extract the
     one a recent Firefox browser uses by running 'make ca-bundle' in the curl
     build tree root, or possibly download a version that was generated this
-    way for you: [CA Extract](https://curl.haxx.se/docs/caextract.html)
+    way for you: [CA Extract](https://curl.se/docs/caextract.html)
 
 Neglecting to use one of the above methods when dealing with a server using a
 certificate that isn't signed by one of the certificates in the installed CA
diff --git a/docs/THANKS b/docs/THANKS
index 9e037ee..f003461 100644
--- a/docs/THANKS
+++ b/docs/THANKS
@@ -4,8 +4,10 @@
 
  If you have contributed but are missing here, please let us know!
 
+0xflotus on github
 1ocalhost on github
 3dyd on github
+3eka on github
 Aaro Koskinen
 Aaron Oneal
 Aaron Orenstein
@@ -43,9 +45,12 @@
 Alan Pinstein
 Albert Chin-A-Young
 Albert Choy
+Albin Vass
 Alejandro Alvarez Ayllon
+Alejandro Colomar
 Alejandro R. Sedeño
 Aleksandar Milivojevic
+Aleksander Mazur
 Aleksey Tulinov
 Ales Mlakar
 Ales Novak
@@ -71,6 +76,7 @@
 Alex Samorukov
 Alex Suykov
 Alex Vinnik
+Alex Xu
 Alexander Beedie
 Alexander Dyagilev
 Alexander Elgert
@@ -93,10 +99,12 @@
 Alexey Zakhlestin
 Alexis Carvalho
 Alexis La Goutte
+Alexis Vachette
 Alfonso Martone
 Alfred Gebert
 Allen Pulsifer
 Alona Rossen
+Amaury Denoyelle
 amishmm on github
 Amit Katyal
 Amol Pattekar
@@ -113,9 +121,11 @@
 Andi Jahja
 Andre Guibert de Bruet
 Andre Heinecke
+Andrea Pappacoda
 Andreas Damm
 Andreas Falkenhahn
 Andreas Farber
+Andreas Fischer
 Andreas Kostyrka
 Andreas Malzahn
 Andreas Ntaflos
@@ -127,14 +137,17 @@
 Andreas Streichardt
 Andreas Wurf
 Andrei Benea
+Andrei Bica
 Andrei Cipu
 Andrei Karas
 Andrei Kurushin
 Andrei Neculau
+Andrei Rybak
 Andrei Sedoi
 Andrei Valeriu BICA
 Andrei Virtosu
 Andrej E Baranov
+Andrew Barnert
 Andrew Barnes
 Andrew Benham
 Andrew Biggs
@@ -150,6 +163,7 @@
 Andrew Potter
 Andrew Robbins
 Andrew Wansink
+Andrey Gursky
 Andrey Labunets
 Andrii Moiseiev
 Andrius Merkys
@@ -166,6 +180,8 @@
 Anthony Avina
 Anthony Bryan
 Anthony G. Basile
+Anthony Ramine
+Anthony Shaw
 Antoine Aubert
 Antoine Calando
 Anton Bychkov
@@ -190,6 +206,7 @@
 Arthur Murray
 Arve Knudsen
 Arvid Norberg
+arvids-kokins-bidstack on github
 asavah on github
 Ashish Shukla
 Ashwin Metpalli
@@ -199,8 +216,12 @@
 Augustus Saunders
 Austin Green
 Avery Fay
+awesomenode on github
 Axel Tillequin
 Ayoub Boudhar
+Ayushman Singh Chauhan
+b9a1 on github
+Bachue Zhou
 Balaji Parasuram
 Balaji S Rao
 Balaji Salunke
@@ -212,6 +233,7 @@
 Baruch Siach
 Bas Mevissen
 Bas van Schaik
+Bastian Krause
 Bastien Bouclet
 Basuke Suzuki
 baumanj on github
@@ -231,6 +253,7 @@
 Benjamin Gilbert
 Benjamin Johnson
 Benjamin Kircher
+Benjamin Riefenstahl
 Benjamin Ritcey
 Benjamin Sergeant
 Benoit Neil
@@ -253,6 +276,8 @@
 Bill Nagel
 Bill Pyne
 Billyzou0741326 on github
+Bin Lan
+Bin Meng
 Bjarni Ingi Gislason
 Bjoern Franke
 Bjoern Sikora
@@ -260,11 +285,13 @@
 Bjorn Reese
 Björn Stenberg
 Blaise Potard
+Blake Burkhart
 bnfp on github
 Bob Relyea
 Bob Richmond
 Bob Schader
 bobmitchell1956 on github
+Bodo Bergmann
 Bogdan Nicula
 Brad Burdick
 Brad Fitzpatrick
@@ -303,6 +330,7 @@
 Bryan Henderson
 Bryan Kemp
 bsammon on github
+Bubu on github
 buzo-ffm on github
 bxac on github
 Bylon2 on github
@@ -316,6 +344,7 @@
 Caolan McNamara
 Captain Basil
 Carie Pointer
+Carl Zogheib
 Carlo Cannas
 Carlo Marcelo Arenas Belón
 Carlo Teubner
@@ -327,6 +356,7 @@
 causal-agent on github
 cbartl on github
 cclauss on github
+Cesar Eduardo Barros
 Chad Monroe
 Chandrakant Bagul
 Charles Kerr
@@ -375,6 +405,7 @@
 Christopher Stone
 Chungtsun Li
 Ciprian Badescu
+civodul on github
 Claes Jakobsson
 Clarence Gardner
 Claudio Neves
@@ -407,6 +438,7 @@
 crazydef on github
 Cris Bailiff
 Cristian Greco
+Cristian Morales Vega
 Cristian Rodríguez
 Curt Bogmine
 Cynthia Coan
@@ -415,6 +447,7 @@
 Cédric Connes
 Cédric Deltheil
 D. Flinkmann
+d4d on hackerone
 d912e3 on github
 Da-Yoon Chung
 daboul on github
@@ -442,6 +475,7 @@
 Daniel at touchtunes
 Daniel Bankhead
 Daniel Black
+Daniel Carpenter
 Daniel Cater
 Daniel Egger
 Daniel Gustafsson
@@ -450,6 +484,7 @@
 Daniel Johnson
 Daniel Kahn Gillmor
 Daniel Krügler
+Daniel Kurečka
 Daniel Lee Hwang
 Daniel Lublin
 Daniel Marjamäki
@@ -484,10 +519,15 @@
 David Blaikie
 David Byron
 David Cohen
+David Cook
+David Demelier
 David E. Narváez
+David Earl
 David Eriksson
 David Garske
+David Goerger
 David Houlder
+David Hu
 David Hull
 David J Meyer
 David James
@@ -516,11 +556,13 @@
 David Yan
 davidedec on github
 dbrowndan on github
+dEajL3kA on github
 Dengminwen
 Denis Baručić
 Denis Chaplygin
 Denis Feklushkin
 Denis Goleshchikhin
+Denis Laxalde
 Denis Ollier
 Dennis Clarke
 Dennis Felsing
@@ -532,6 +574,7 @@
 Didier Brisebourg
 Diego Bes
 Diego Casorran
+Dietmar Hauser
 Dilyan Palauzov
 Dima Barsky
 Dima Pasechnik
@@ -545,6 +588,7 @@
 Dirk Eddelbuettel
 Dirk Feytons
 Dirk Manske
+Dirk Wetter
 Dirkjan Bussink
 Diven Qi
 divinity76 on github
@@ -557,12 +601,14 @@
 Dmitry Bartsevich
 Dmitry Eremin-Solenikov
 Dmitry Falko
+Dmitry Karpov
 Dmitry Kostjuchenko
 Dmitry Kurochkin
 Dmitry Mikhirev
 Dmitry Popov
 Dmitry Rechkin
 Dmitry S. Baikov
+Dmitry Wagin
 dnivras on github
 Dolbneff A.V
 Domenico Andreoli
@@ -579,6 +625,7 @@
 Douglas Kilpatrick
 Douglas Mencken
 Douglas R. Horner
+Douglas R. Reno
 Douglas Steinwand
 Dov Murik
 dpull on github
@@ -597,6 +644,8 @@
 Early Ehlinger
 Earnestly on github
 Eason-Yu on github
+Ebe Janchivdorj
+ebejan on github
 Ebenezer Ikonne
 Ed Morley
 Edgaras Janušauskas
@@ -620,6 +669,7 @@
 Ellis Pritchard
 Elmira A Semenova
 elsamuko on github
+emanruse on github
 Emanuele Bovisio
 Emil Engler
 Emil Lerner
@@ -654,6 +704,7 @@
 Erik Janssen
 Erik Johansson
 Erik Minekus
+Erik Olsson
 Ernest Beinrohr
 Ernst Sjöstrand
 Erwan Legrand
@@ -678,6 +729,7 @@
 Fabrizio Ammollo
 Fahim Chandurwala
 Faizur Rahman
+Fawad Mirza
 fds242 on github
 Federico Bianchi
 Fedor Karpelevitch
@@ -691,6 +743,8 @@
 Feng Tu
 Fernando Muñoz
 Filip Salomonsson
+Firefox OS
+Flameborn on github
 Flavio Medeiros
 Florian Pritz
 Florian Schoppmann
@@ -698,6 +752,7 @@
 Florin Petriuc
 Forrest Cahoon
 Francisco Moraes
+Francisco Munoz
 Francisco Sedano
 Francois Petitjean
 Francois Rivard
@@ -723,7 +778,9 @@
 FuccDucc on github
 fullincome on github
 Gabriel Kuri
+Gabriel Simmer
 Gabriel Sjoberg
+Ganesh Kamath
 Garrett Holmstrom
 Gary Maxwell
 Gaurav Malhotra
@@ -733,8 +790,10 @@
 Gavrie Philipson
 Gaz Iqbal
 Gaël Portay
+Gealber Morales
 Geeknik Labs
 Geoff Beier
+Georeth Zhou
 Georg Horn
 Georg Huettenegger
 Georg Lippitsch
@@ -744,6 +803,7 @@
 Gergely Nagy
 Gerhard Herre
 Gerrit Bruchhäuser
+Gerrit Renker
 Ghennadi Procopciuc
 Giancarlo Formicuccia
 Giaslas Georgios
@@ -774,7 +834,9 @@
 Greg Pratt
 Greg Rowe
 Greg Zavertnik
+Gregor Jasny
 Gregory Jefferis
+Gregory Muchka
 Gregory Nicholls
 Gregory Szorc
 Griffin Downs
@@ -804,6 +866,7 @@
 Hanno Böck
 Hanno Kranzhoff
 Hans Steegers
+Hans-Christian Noren Egtvedt
 Hans-Jurgen May
 Hao Wu
 Hardeep Singh
@@ -827,14 +890,17 @@
 Henry Roeland
 Herve Amblard
 Hidemoto Nakada
+Himanshu Gupta
 Ho-chi Chen
 Hoi-Ho Chan
 Hongli Lai
+Hongyi Zhao
 Howard Blaise
 Howard Chu
 hsiao yi
 htasta on github
 Hubert Kario
+Hugh Macdonald
 Hugo van Kemenade
 Huzaifa Sidhpurwala
 huzunhao on github
@@ -846,6 +912,7 @@
 Ian Ford
 Ian Gulliver
 Ian Lynagh
+Ian Spence
 Ian Turner
 Ian Wilkes
 Ignacio Vazquez-Abrams
@@ -857,8 +924,10 @@
 Ihor Karpenko
 ihsinme on github
 Iida Yosiaki
+Ikko Ashimine
 Ilguiz Latypov
 Ilja van Sprundel
+Illarion Taev
 Ilya Kosarev
 imilli on github
 Immanuel Gregoire
@@ -879,10 +948,13 @@
 IvanoG on github
 Ivo Bellin Salarin
 iz8mbw on github
+J. Bromley
+Jack Boos Yu
 Jack Zhang
 Jackarain on github
 Jacky Lam
 Jacob Barthelmeh
+Jacob Hoffman-Andrews
 Jacob Meuser
 Jacob Moshenko
 Jactry Zeng
@@ -949,6 +1021,7 @@
 Jean-Marc Ranger
 Jean-Noël Rouvignac
 Jean-Philippe Barrette-LaPierre
+Jean-Philippe Menil
 Jeff Connelly
 Jeff Hodges
 Jeff Johnson
@@ -970,6 +1043,7 @@
 Jeremy Maitin-Shepard
 Jeremy Pearson
 Jeremy Tan
+Jeremy Thibault
 Jeroen Koekkoek
 Jeroen Ooms
 Jerome Muffat-Meridol
@@ -993,24 +1067,30 @@
 Jiri Dvorak
 Jiri Hruska
 Jiri Jaburek
+Jishan Shaikh
 Jiří Malák
 jmdavitt on github
 jnbr on github
 Jocelyn Jaubert
+Jochem Broekhoff
 Joe Halpin
 Joe Malicki
 Joe Mason
 Joel Chen
 Joel Depooter
+Joel Jakobsson
+Joel Teichroeb
 joey-l-us on github
 Jofell Gallardo
 Johan Anderson
 Johan Lantz
 Johan Nilsson
 Johan van Selst
+Johann150 on github
 Johannes Bauer
 Johannes Ernst
 Johannes G. Kristinsson
+Johannes Lesr
 Johannes Schindelin
 John A. Bristor
 John Bradshaw
@@ -1057,6 +1137,7 @@
 Jon Torrey
 Jon Travis
 Jon Turner
+Jon Wilkes
 Jonas Forsman
 Jonas Minnberg
 Jonas Schnelli
@@ -1067,20 +1148,25 @@
 Jonathan Hseu
 Jonathan Moerman
 Jonathan Nieder
+Jonathan Watt
+Jonathan Wernberg
 Jongki Suwandi
-jonrumsey on github
 Joombalaya on github
 Joonas Kuorilehto
+Jordan Brown
 Jose Alf
 Jose Kahan
 Josef Wolf
+Joseph Chen
 Josh Bialkowski
 Josh Kapell
+Josh Soref
 joshhe on github
 Joshua Kwan
 Joshua Swink
 Josie Huddleston
 Josue Andrade Gomes
+José Joaquín Atria
 Jozef Kralik
 JP Mens
 Juan Barreto
@@ -1091,6 +1177,7 @@
 Juergen Hoetzel
 Juergen Wilke
 Jukka Pihl
+Julian Montes
 Julian Noble
 Julian Ospald
 Julian Romero Nieto
@@ -1100,6 +1187,7 @@
 Julien Nabet
 Julien Royer
 Jun-ichiro itojun Hagino
+Jun-ya Kato
 jungle-boogie on github
 Junho Choi
 Jurij Smakov
@@ -1115,8 +1203,10 @@
 Jérémy Rocher
 Jörg Mueller-Tolk
 Jörn Hartroth
+Jürgen Gmach
 K. R. Walker
 ka7 on github
+Kael1117 on github
 Kai Engert
 Kai Noda
 Kai Sommerfeld
@@ -1142,10 +1232,12 @@
 Ken Brown
 Ken Hirsch
 Ken Rastatter
+Kenneth Davidson
 Kenny To
 Kent Boortz
 Keshav Krity
 Kevin Baughman
+Kevin Burke
 Kevin Fisk
 Kevin Ji
 Kevin Lussier
@@ -1153,6 +1245,7 @@
 Kevin Reed
 Kevin Roth
 Kevin Smith
+Kevin Ushey
 Kim Minjoong
 Kim Rinnewitz
 Kim Vandry
@@ -1160,14 +1253,18 @@
 Kirill Marchuk
 Kjell Ericson
 Kjetil Jacobsen
+Klaus Crusius
 Klaus Stein
 Klevtsov Vadim
 Kobi Gurkan
 Koen Dergent
+Koichi Shiraishi
+kokke on github
 Konstantin Isakov
 Konstantin Kushnir
 kotoriのねこ
 kouzhudong on github
+Kovalkov Dmitrii
 kreshano on github
 Kris Kennaway
 Krishnendu Majumdar
@@ -1205,9 +1302,11 @@
 Lars Nilsson
 Lars Torben Wilson
 Laurent Bonnans
+Laurent Dufresne
 Laurent Rabret
 Lauri Kasanen
 Laurie Clark-Michalek
+Lawrence Gripper
 Lawrence Matthews
 Lawrence Wagerfield
 Legoff Vincent
@@ -1224,6 +1323,7 @@
 Leon Winter
 Leonardo Rosati
 Leonardo Taccari
+Li Xinwei
 Liam Healy
 lijian996 on github
 Lijo Antony
@@ -1241,6 +1341,7 @@
 Liza Alenchery
 Lloyd Fournier
 Lluís Batlle i Rossell
+locpyl-tidnyd on github
 Loganaden Velvindron
 Loic Dachary
 Loren Kirkby
@@ -1248,7 +1349,9 @@
 Luca Altea
 Luca Boccassi
 Lucas Adamski
+Lucas Clemente Vella
 Lucas Pardue
+Lucas Servén Marín
 Lucas Severo
 Lucien Zürcher
 Ludek Finstrle
@@ -1260,6 +1363,7 @@
 Luke Amery
 Luke Call
 Luke Dashjr
+Luke Granger-Brown
 Luo Jinghua
 Luong Dinh Dung
 Luz Paz
@@ -1281,6 +1385,7 @@
 Manfred Schwarb
 MAntoniak on github
 Manuel Massing
+Manuj Bhatia
 Marc Aldorasi
 Marc Boucher
 Marc Deslauriers
@@ -1320,6 +1425,7 @@
 Mark Nottingham
 Mark Salisbury
 Mark Snelling
+Mark Swaanenburg
 Mark Tully
 Mark W. Eichin
 Mark Wotton
@@ -1336,13 +1442,16 @@
 Martin Ankerl
 Martin Bašti
 Martin C. Martin
+Martin Dorey
 Martin Drasar
 Martin Dreher
 Martin Frodl
 Martin Galvan
 Martin Gartner
 Martin Hager
+Martin Halle
 Martin Hedenfalk
+Martin Howarth
 Martin Jansen
 Martin Kammerhofer
 Martin Kepplinger
@@ -1363,9 +1472,11 @@
 Mathias Axelsson
 Mathias Gumz
 Mathieu Legare
+Matias N. Goldberg
 Mats Lidell
 Matt Arsenault
 Matt Ford
+Matt Holt
 Matt Kraai
 Matt McClure
 Matt Veenstra
@@ -1380,6 +1491,7 @@
 Matthew Kerwin
 Matthew Whitehead
 Matthias Bolte
+Matthias Gatto
 Matthias Naegler
 Mattias Fornander
 Matus Uzak
@@ -1392,6 +1504,7 @@
 Max Khon
 Max Peal
 Max Savenkov
+Max Zettlmeißl
 Maxim Ivanov
 Maxim Perenesenko
 Maxim Prohorov
@@ -1408,6 +1521,7 @@
 Michael Baentsch
 Michael Benedict
 Michael Brehm
+Michael Brown
 Michael Calmer
 Michael Cronenworth
 Michael Curtis
@@ -1416,11 +1530,13 @@
 Michael Forney
 Michael Gmelin
 Michael Goffioul
+Michael Hordijk
 Michael Jahn
 Michael Jerris
 Michael Kalinin
 Michael Kaufmann
 Michael Kilburn
+Michael Kolechkin
 Michael Kujawa
 Michael König
 Michael Lee
@@ -1428,6 +1544,7 @@
 Michael Mealling
 Michael Mueller
 Michael Musset
+Michael O'Farrell
 Michael Olbrich
 Michael Osipov
 Michael Schmid
@@ -1439,6 +1556,7 @@
 Michael Wallner
 Michal Bonino
 Michal Marek
+Michal Rus
 Michal Trybus
 Michal Čaplygin
 Michał Antoniak
@@ -1461,6 +1579,7 @@
 Mike Dobbs
 Mike Dowell
 Mike Frysinger
+Mike Gelfand
 Mike Giancola
 Mike Hasselberg
 Mike Henshaw
@@ -1470,6 +1589,7 @@
 Mike Power
 Mike Protts
 Mike Revi
+Mike Tzou
 Miklos Nemeth
 Miloš Ljumović
 Mingliang Zhu
@@ -1483,14 +1603,17 @@
 Mohamed Osama
 Mohammad AlSaleh
 Mohammad Hasbini
+Mohammed Naser
 Mohun Biswas
 momala454 on github
 moohoorama on github
+Morten Minde Neergaard
 Mostyn Bramley-Moore
 Moti Avrahami
 MrdUkk on github
 MrSorcus on github
 Muhammad Herdiansyah
+Muhammed Yavuz Nuzumlalı
 Murugan Balraj
 Muz Dima
 Myk Taylor
@@ -1518,6 +1641,7 @@
 nevv on HackerOne/curl
 Niall O'Reilly
 niallor on github
+nian6324 on github
 nianxuejie on github
 Nic Roets
 Nicholas Maniscalco
@@ -1547,6 +1671,7 @@
 niner on github
 Ning Dong
 Nir Soffer
+Niranjan Hasabnis
 Nis Jorgensen
 nk
 NobodyXu on github
@@ -1556,12 +1681,14 @@
 Norbert Frese
 Norbert Kett
 Norbert Novotny
+nosajsnikta on github
 NTMan on Github
 Octavio Schroeder
 Ofer
 Okhin Vasilij
 Ola Mork
 Olaf Flebbe
+Olaf Hering
 Olaf Stüben
 Oleg Pudeyev
 Olen Andoni
@@ -1571,6 +1698,7 @@
 Oliver Graute
 Oliver Kuckertz
 Oliver Schindler
+Oliver Urbann
 Olivier Berger
 Olivier Brunel
 Omar Ramadan
@@ -1591,6 +1719,7 @@
 Paolo Mossino
 Paolo Piacentini
 Paras Sethia
+parazyd on github
 Pascal Gaudette
 Pascal Terjan
 Pasha Kuznetsov
@@ -1640,13 +1769,17 @@
 Pavol Markovic
 Pawel A. Gajda
 Pawel Kierski
+Paweł Wegner
 Pedro Larroy
 Pedro Monreal
 Pedro Neves
 pendrek at hackerone
 Peng Li
+Peng-Yu Chen
+Per Jensen
 Per Lundberg
 Per Malmberg
+Per Nilsson
 Pete Lomax
 Peter Bray
 Peter Forret
@@ -1680,6 +1813,7 @@
 Petr Voytsik
 Phil Blundell
 Phil Crump
+Phil E. Taylor
 Phil Karn
 Phil Lisiecki
 Phil Pellouchoud
@@ -1687,6 +1821,7 @@
 Philip Gladstone
 Philip Langdale
 Philip Prindeville
+Philipp Klaus Krause
 Philipp Waehnert
 Philippe Hameau
 Philippe Marguinaud
@@ -1696,11 +1831,13 @@
 Pierre Brico
 Pierre Chapuis
 Pierre Joye
+Pierre Yager
 Pierre Ynard
 Pierre-Yves Bigourdan
 Piotr Dobrogost
 Piotr Komborski
 Po-Chuan Hsieh
+Pontus Lundkvist
 Pooyan McSporran
 Poul T Lomholt
 Pramod Sharma
@@ -1717,6 +1854,7 @@
 Quentin Balland
 Quinn Slack
 R. Dennis Steed
+Radek Zajic
 Radoslav Georgiev
 Radu Simionescu
 Rafa Muyo
@@ -1732,11 +1870,13 @@
 Rajkumar Mandal
 Ralf S. Engelschall
 Ralph Beckmann
+Ralph Langendam
 Ralph Mitchell
 Ram Krushna Mishra
 ramsay-jones on github
 Ran Mozes
 Randall S. Becker
+Randolf J
 Randy Armstrong
 Randy McMurchy
 Raphael Gozzo
@@ -1747,6 +1887,7 @@
 Ray Satiro
 Razvan Cojocaru
 rcombs on github
+Red Hat Product Security
 Reed Loden
 Reinhard Max
 Reinout van Schouwen
@@ -1766,6 +1907,7 @@
 Ricardo Cadime
 Ricardo Gomes
 Rich Burridge
+Rich FitzJohn
 Rich Gray
 Rich Mirch
 Rich Rauenzahn
@@ -1783,11 +1925,13 @@
 Richard Gray
 Richard Hosking
 Richard Hsu
+Richard Marion
 Richard Michael
 Richard Moore
 Richard Prescott
 Richard Silverman
 Richard van den Berg
+Richard Whitehouse
 Richy Kim
 Rici Lake
 Rick Deist
@@ -1818,6 +1962,7 @@
 Robert Linden
 Robert Olson
 Robert Prag
+Robert Ronto
 Robert Schumann
 Robert Weaver
 Robert Wruck
@@ -1842,6 +1987,7 @@
 Romain Coltel
 Romain Fliedel
 Romain Geissler
+romamik om github
 Roman Koifman
 Roman Mamedov
 Romulo A. Ceccon
@@ -1853,12 +1999,14 @@
 Ross Burton
 Roy Bellingan
 Roy Shan
+Rui LIU
 Rune Kleveland
 Ruslan Baratov
 Ruslan Gazizov
 Rutger Hofman
 Ruurd Beerstra
 RuurdBeerstra on github
+Ryan Beck-Buysse
 Ryan Braud
 Ryan Chan
 Ryan Nelson
@@ -1868,6 +2016,7 @@
 Ryuichi KAWAMATA
 Rémy Léone
 S. Moonesamy
+Sai Ram Kunala
 Salah-Eddin Shaban
 Saleem Abdulrasool
 Salvador Dávila
@@ -1904,6 +2053,7 @@
 Sean Boudreau
 Sean Burford
 Sean MacLennan
+Sean McArthur
 Sean Miller
 Sebastiaan van Erk
 Sebastian Haglund
@@ -1913,6 +2063,7 @@
 Senthil Raja Velu
 Sergei Kuzmin
 Sergei Nikulov
+Sergey Markelov
 Sergey Ogryzkov
 Sergey Tatarincev
 Sergii Kavunenko
@@ -1920,6 +2071,7 @@
 Sergio Ballestrero
 Sergio Barresi
 Sergio Borghese
+sergio-nsk on github
 Serj Kalichev
 Seshubabu Pasam
 Seth Mos
@@ -1934,8 +2086,10 @@
 Shaun Jackman
 Shawn Landden
 Shawn Poulson
+Shikha Sharma
 Shine Fan
 Shiraz Kanga
+shithappens2016 on github
 Shlomi Fish
 Shmulik Regev
 Siddhartha Prakash Jain
@@ -1975,6 +2129,7 @@
 Stefan Esser
 Stefan Grether
 Stefan Kanthak
+Stefan Karpinski
 Stefan Krause
 Stefan Neis
 Stefan Strogin
@@ -2027,6 +2182,7 @@
 Sven Wegener
 Svyatoslav Mishyn
 swalkaus at yahoo.com
+sylgal on github
 Sylvestre Ledru
 Symeon Paraschoudis
 Sébastien Willemijns
@@ -2053,6 +2209,7 @@
 tholin on github
 Thomas Bouzerar
 Thomas Braun
+Thomas Danielsson
 Thomas Gamper
 Thomas Glanzmann
 Thomas J. Moore
@@ -2085,18 +2242,23 @@
 Tim Starling
 Tim Tassonis
 Tim Verhoeven
+Timo Lange
 Timo Sirainen
 Timotej Lazar
 Timothe Litt
+Timothy Gu
 Timothy Polich
+Timur Artikov
 Tinus van den Berg
 TJ Saunders
 tmkk on github
 Tobias Blomberg
+Tobias Gabriel
 Tobias Hieta
 Tobias Hintze
 Tobias Lindgren
 Tobias Markus
+Tobias Nyholm
 Tobias Rundström
 Tobias Stoeckmann
 Toby Peterson
@@ -2107,6 +2269,7 @@
 Todd Vierling
 Tom Benoist
 Tom Donovan
+Tom G. Christensen
 Tom Grace
 Tom Greenslade
 Tom Lee
@@ -2131,6 +2294,8 @@
 Tomasz Lacki
 Tommie Gannert
 tommink[at]post.pl
+Tommy Chiang
+Tommy Odom
 Tommy Petty
 Tommy Tam
 Ton Voon
@@ -2151,6 +2316,7 @@
 Troels Walsted Hansen
 Troy Engel
 Tseng Jun
+Tuomas Siipola
 Tuomo Rinne
 Tupone Alfredo
 Tyler Hall
@@ -2160,10 +2326,16 @@
 Ulrich Doehner
 Ulrich Telle
 Ulrich Zadow
+UrsusArctos on github
+User Sg
+ustcqidi on github
+Vadim Grinshpun
 Valentin David
 Valentyn Korniienko
+Valentín Gutiérrez
 Valerii Zapodovnikov
 vanillajonathan on github
+Varnavas Papaioannou
 Vasiliy Faronov
 Vasily Lobaskin
 Vasy Okhin
@@ -2172,6 +2344,7 @@
 Vicente Garcia
 Victor Magierski
 Victor Snezhko
+Victor Vieux
 Vijay Panghal
 Vikram Saxena
 Viktor Szakats
@@ -2190,6 +2363,7 @@
 Vladimir Grishchenko
 Vladimir Kotal
 Vladimir Lazarenko
+Vladimir Varlamov
 Vlastimil Ovčáčík
 Vojtech Janota
 Vojtech Minarik
@@ -2208,6 +2382,7 @@
 Wenxiang Qian
 Werner Koch
 Werner Stolz
+Wes Hinsley
 wesinator on github
 Wesley Laxton
 Wesley Miaw
@@ -2219,18 +2394,22 @@
 Willem Sparreboom
 William A. Rowe Jr
 William Ahern
+William Desportes
 wmsch on github
 wncboy on github
 Wojciech Zwiefka
 Wouter Van Rooy
 Wu Yongzheng
 Wyatt O'Day
+Wyatt OʼDay
 Xavier Bouchoux
+XhmikosR on github
 XhstormR on github
 Xiang Xiao
 Xiangbin Li
 Xiaoyin Liu
 XmiliaH on github
+xnynx on github
 xwxbug on github
 Yaakov Selkowitz
 Yang Tse
@@ -2244,7 +2423,10 @@
 Yi Huang
 Yiming Jing
 Yingwei Liu
+Ymir1711 on github
 Yonggang Luo
+Yongkang Huang
+Younes El-karama
 youngchopin on github
 Yousuke Kimoto
 Yu Xin
@@ -2252,6 +2434,7 @@
 Yun SangHo
 Yuri Slobodyanyuk
 Yuriy Sosov
+Yusuke Nakamura
 Yves Arrouye
 Yves Lejeune
 Zachary Seguin
@@ -2260,17 +2443,23 @@
 zelinchen on github
 Zenju on github
 Zero King
+Zhang Xiuhua
 Zhao Yisha
 Zhaoyang Wu
 Zhibiao Wu
 Zhouyihai Ding
+ZimCodes on github
 zloi-user on github
 Zmey Petroff
 Zvi Har'El
 zzq1015 on github
+Ádler Jonas Gross
 İsmail Dönmez
 Łukasz Domeradzki
 Štefan Kremeň
+Борис Верховский
 Коваленко Анатолий Викторович
 Никита Дорохин
+ウさん
+不确定
 加藤郁之
diff --git a/docs/TODO b/docs/TODO
index d45319d..bdda190 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -35,7 +35,9 @@
  1.16 Try to URL encode given URL
  1.17 Add support for IRIs
  1.18 try next proxy if one doesn't work
+ 1.19 provide timing info for each redirect
  1.20 SRV and URI DNS records
+ 1.21 netrc caching and sharing
  1.22 CURLINFO_PAUSE_STATE
  1.23 Offer API to flush the connection pool
  1.24 TCP Fast Open for windows
@@ -73,6 +75,7 @@
  5.3 Rearrange request header order
  5.4 Allow SAN names in HTTP/2 server push
  5.5 auth= in URLs
+ 5.6 alt-svc should fallback if alt-svc doesn't work
 
  6. TELNET
  6.1 ditch stdin
@@ -100,23 +103,22 @@
  11.3 Use NTLMv2
  11.4 Create remote directories
 
- 12. New protocols
+ 12. FILE
+ 12.1 Directory listing for FILE:
 
  13. SSL
  13.1 TLS-PSK with OpenSSL
  13.2 Provide mutex locking API
- 13.3 Support in-memory certs/ca certs/keys
  13.4 Cache/share OpenSSL contexts
  13.5 Export session ids
  13.6 Provide callback for cert verification
- 13.7 improve configure --with-ssl
  13.8 Support DANE
  13.9 TLS record padding
  13.10 Support Authority Information Access certificate extension (AIA)
  13.11 Support intermediate & root pinning for PINNEDPUBLICKEY
- 13.12 Support HSTS
  13.13 Make sure we forbid TLS 1.3 post-handshake authentication
  13.14 Support the clienthello extension
+ 13.15 Support mbedTLS 3.0
 
  14. GnuTLS
  14.2 check connection
@@ -124,7 +126,6 @@
  15. Schannel
  15.1 Extend support for client certificate authentication
  15.2 Extend support for the --ciphers option
- 15.3 Add option to disable client certificate auto-send
  15.4 Add option to allow abrupt server closure
 
  16. SASL
@@ -163,11 +164,14 @@
  18.21 retry on the redirected-to URL
  18.23 Set the modification date on an uploaded file
  18.24 Use multiple parallel transfers for a single download
+ 18.25 Prevent terminal injection when writing to terminal
+ 18.26 Custom progress meter update interval
 
  19. Build
  19.1 roffit
  19.2 Enable PIE and RELRO by default
  19.3 Don't use GNU libtool on OpenBSD
+ 19.4 Package curl for Windows in a signed installer
 
  20. Test suite
  20.1 SSL tunnel
@@ -178,21 +182,10 @@
  20.6 Use the RFC6265 test suite
  20.7 Support LD_PRELOAD on macOS
  20.8 Run web-platform-tests url tests
- 20.9 Use "random" ports for the test servers
+ 20.9 Bring back libssh tests on Travis
 
- 21. Next SONAME bump
- 21.1 http-style HEAD output for FTP
- 21.2 combine error codes
- 21.3 extend CURLOPT_SOCKOPTFUNCTION prototype
-
- 22. Next major release
- 22.1 cleanup return codes
- 22.2 remove obsolete defines
- 22.3 size_t
- 22.4 remove several functions
- 22.5 remove CURLOPT_FAILONERROR
- 22.7 remove progress meter from libcurl
- 22.8 remove 'curl_httppost' from public
+ 21. MQTT
+ 21.1 Support rate-limiting
 
 ==============================================================================
 
@@ -360,11 +353,27 @@
 
  https://github.com/curl/curl/issues/896
 
+1.19 provide timing info for each redirect
+
+ curl and libcurl provide timing information via a set of different
+ time-stamps (CURLINFO_*_TIME). When curl is following redirects, those
+ returned time value are the accumulated sums. An improvement could be to
+ offer separate timings for each redirect.
+
+ https://github.com/curl/curl/issues/6743
+
 1.20 SRV and URI DNS records
 
  Offer support for resolving SRV and URI DNS records for libcurl to know which
  server to connect to for various protocols (including HTTP!).
 
+1.21 netrc caching and sharing
+
+ The netrc file is read and parsed each time a connection is setup, which
+ means that if a transfer needs multiple connections for authentication or
+ redirects, the file might be reread (and parsed) multiple times. This makes
+ it impossible to provide the file as a pipe.
+
 1.22 CURLINFO_PAUSE_STATE
 
  Return information about the transfer's current pause state, in both
@@ -415,7 +424,7 @@
  See https://github.com/curl/curl/issues/3523
 
  Michael Kaufmann suggestion here:
- https://curl.haxx.se/video/curlup-2017/2017-03-19_05_Michael_Kaufmann_Websocket_support_for_curl.mp4
+ https://curl.se/video/curlup-2017/2017-03-19_05_Michael_Kaufmann_Websocket_support_for_curl.mp4
 
 1.30 config file parsing
 
@@ -525,7 +534,7 @@
  When trying to connect passively to a server which only supports active
  connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
  connection. There could be a way to fallback to an active connection (and
- vice versa). https://curl.haxx.se/bug/feature.cgi?id=1754793
+ vice versa). https://curl.se/bug/feature.cgi?id=1754793
 
 4.3 Earlier bad letter detection
 
@@ -562,7 +571,7 @@
 5.1 Better persistency for HTTP 1.0
 
  "Better" support for persistent connections over HTTP 1.0
- https://curl.haxx.se/bug/feature.cgi?id=1089001
+ https://curl.se/bug/feature.cgi?id=1089001
 
 5.2 Set custom client ip when using haproxy protocol
 
@@ -604,6 +613,13 @@
 
  Additionally this should be implemented for proxy base URLs as well.
 
+5.6 alt-svc should fallback if alt-svc doesn't work
+
+ The alt-svc: header provides a set of alternative services for curl to use
+ instead of the original. If the first attempted one fails, it should try the
+ next etc and if all alternatives fail go back to the original.
+
+ See https://github.com/curl/curl/issues/4908
 
 6. TELNET
 
@@ -639,7 +655,7 @@
  hack ;-)
 
  Please see the following thread for more information:
- https://curl.haxx.se/mail/lib-2012-05/0178.html
+ https://curl.se/mail/lib-2012-05/0178.html
 
 
 8. POP3
@@ -681,23 +697,31 @@
 
 11.1 File listing support
 
-Add support for listing the contents of a SMB share. The output should probably
-be the same as/similar to FTP.
+ Add support for listing the contents of a SMB share. The output should
+ probably be the same as/similar to FTP.
 
 11.2 Honor file timestamps
 
-The timestamp of the transferred file should reflect that of the original file.
+ The timestamp of the transferred file should reflect that of the original
+ file.
 
 11.3 Use NTLMv2
 
-Currently the SMB authentication uses NTLMv1.
+ Currently the SMB authentication uses NTLMv1.
 
 11.4 Create remote directories
 
-Support for creating remote directories when uploading a file to a directory
-that doesn't exist on the server, just like --ftp-create-dirs.
+ Support for creating remote directories when uploading a file to a directory
+ that doesn't exist on the server, just like --ftp-create-dirs.
 
-12. New protocols
+
+12. FILE
+
+12.1 Directory listing for FILE:
+
+ Add support for listing the contents of a directory accessed with FILE. The
+ output should probably be the same as/similar to FTP.
+
 
 13. SSL
 
@@ -716,14 +740,6 @@
  library, so that the same application code can use mutex-locking
  independently of OpenSSL or GnutTLS being used.
 
-13.3 Support in-memory certs/ca certs/keys
-
- You can specify the private and public keys for SSH/SSL as file paths. Some
- programs want to avoid using files and instead just pass them as in-memory
- data blobs. There's probably a challenge to make this work across the
- plethory of different TLS and SSH backends that curl supports.
- https://github.com/curl/curl/issues/2310
-
 13.4 Cache/share OpenSSL contexts
 
  "Look at SSL cafile - quick traces look to me like these are done on every
@@ -754,11 +770,6 @@
  certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
  it be? There's so much that could be done if it were!
 
-13.7 improve configure --with-ssl
-
- make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
- then NSS...
-
 13.8 Support DANE
 
  DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
@@ -766,9 +777,9 @@
  https://www.rfc-editor.org/rfc/rfc6698.txt
 
  An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
- (https://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
+ (https://curl.se/mail/lib-2013-03/0075.html) but it was a too simple
  approach. See Daniel's comments:
- https://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
+ https://curl.se/mail/lib-2013-03/0103.html . libunbound may be the
  correct library to base this development on.
 
  Björn Stenberg wrote a separate initial take on DANE that was never
@@ -799,21 +810,11 @@
  certificates when comparing the pinned keys. Therefore it is not compatible
  with "HTTP Public Key Pinning" as there also intermediate and root
  certificates can be pinned. This is very useful as it prevents webadmins from
- "locking themself out of their servers".
+ "locking themselves out of their servers".
 
  Adding this feature would make curls pinning 100% compatible to HPKP and
  allow more flexible pinning.
 
-13.12 Support HSTS
-
- "HTTP Strict Transport Security" is TOFU (trust on first use), time-based
- features indicated by a HTTP header send by the webserver. It is widely used
- in browsers and it's purpose is to prevent insecure HTTP connections after a
- previous HTTPS connection. It protects against SSLStripping attacks.
-
- Doc: https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security
- RFC 6797: https://tools.ietf.org/html/rfc6797
-
 13.13 Make sure we forbid TLS 1.3 post-handshake authentication
 
  RFC 8740 explains how using HTTP/2 must forbid the use of TLS 1.3
@@ -824,13 +825,20 @@
 13.14 Support the clienthello extension
 
  Certain stupid networks and middle boxes have a problem with SSL handshake
- pakets that are within a certain size range because how that sets some bits
+ packets that are within a certain size range because how that sets some bits
  that previously (in older TLS version) were not set. The clienthello
  extension adds padding to avoid that size range.
 
  https://tools.ietf.org/html/rfc7685
  https://github.com/curl/curl/issues/2299
 
+13.15 Support mbedTLS 3.0
+
+ Version 3.0 is not backwards compatible with pre-3.0 versions, and curl no
+ longer builds due to breaking changes in the API.
+
+ See https://github.com/curl/curl/issues/7385
+
 14. GnuTLS
 
 14.2 check connection
@@ -854,19 +862,6 @@
  - Specifying Schannel Ciphers and Cipher Strengths
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
 
-15.3 Add option to disable client certificate auto-send
-
- Microsoft says "By default, Schannel will, with no notification to the client,
- attempt to locate a client certificate and send it to the server." That could
- be considered a privacy violation and unexpected.
-
- Some Windows users have come to expect that default behavior and to change the
- default to make it consistent with other SSL backends would be a breaking
- change. An option should be added that can be used to disable the default
- Schannel auto-send behavior.
-
- https://github.com/curl/curl/issues/2262
-
 15.4 Add option to allow abrupt server closure
 
  libcurl w/schannel will error without a known termination point from the
@@ -1054,7 +1049,7 @@
 
  Consider a command line option that can make curl do multiple serial requests
  slow, potentially with a (random) wait between transfers. There's also a
- propsed set of standard HTTP headers to let servers let the client adapt to
+ proposed set of standard HTTP headers to let servers let the client adapt to
  its rate limits:
  https://www.ietf.org/id/draft-polli-ratelimit-headers-02.html
 
@@ -1143,7 +1138,7 @@
 
 18.23 Set the modification date on an uploaded file
 
- For SFTP and posssibly FTP, curl could offer an option to set the
+ For SFTP and possibly FTP, curl could offer an option to set the
  modification time for the uploaded file.
 
  See https://github.com/curl/curl/issues/5768
@@ -1169,6 +1164,21 @@
 
  See https://github.com/curl/curl/issues/5774
 
+18.25 Prevent terminal injection when writing to terminal
+
+ curl could offer an option to make escape sequence either non-functional or
+ avoid cursor moves or similar to reduce the risk of a user getting tricked by
+ clever tricks.
+
+ See https://github.com/curl/curl/issues/6150
+
+18.26 Custom progress meter update interval
+
+ Users who are for example doing large downloads in CI or remote setups might
+ want the occasional progress meter update to see that the transfer is
+ progressing and hasn't stuck, but they may not appreciate the
+ many-times-a-second frequency curl can end up doing it with now.
+
 19. Build
 
 19.1 roffit
@@ -1198,6 +1208,10 @@
 
  See https://github.com/curl/curl/issues/5862
 
+19.4 Package curl for Windows in a signed installer
+
+ See https://github.com/curl/curl/issues/5424
+
 20. Test suite
 
 20.1 SSL tunnel
@@ -1259,112 +1273,16 @@
 
  See https://github.com/curl/curl/issues/4477
 
-20.9 Use "random" ports for the test servers
+20.9 Bring back libssh tests on Travis
 
- Instead of insisting and using fixed port numbers for the tests (even though
- they can be changed with a switch), consider letting each server pick a
- random available one at start-up, store that info in a file and let the test
- suite use that.
+ In https://github.com/curl/curl/pull/7012 we remove the libssh builds and
+ tests from Travis CI due to them not working. This should be remedied and
+ libssh builds be brought back.
 
- We could then remove the "check that it is our server that's running"-check
- and we would immediately detect when we write tests wrongly to use hard-coded
- port numbers.
 
-21. Next SONAME bump
+21. MQTT
 
-21.1 http-style HEAD output for FTP
+21.1 Support rate-limiting
 
- #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
- from being output in NOBODY requests over FTP
-
-21.2 combine error codes
-
- Combine some of the error codes to remove duplicates.  The original
- numbering should not be changed, and the old identifiers would be
- macroed to the new ones in an CURL_NO_OLDIES section to help with
- backward compatibility.
-
- Candidates for removal and their replacements:
-
-    CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
-
-    CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
-
-    CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
-
-    CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
-
-    CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
-
-    CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
-
-    CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
-
-    CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
-
-21.3 extend CURLOPT_SOCKOPTFUNCTION prototype
-
- The current prototype only provides 'purpose' that tells what the
- connection/socket is for, but not any protocol or similar. It makes it hard
- for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
- similar.
-
-22. Next major release
-
-22.1 cleanup return codes
-
- curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
- CURLMcode. These should be changed to be the same.
-
-22.2 remove obsolete defines
-
- remove obsolete defines from curl/curl.h
-
-22.3 size_t
-
- make several functions use size_t instead of int in their APIs
-
-22.4 remove several functions
-
- remove the following functions from the public API:
-
- curl_getenv
-
- curl_mprintf (and variations)
-
- curl_strequal
-
- curl_strnequal
-
- They will instead become curlx_ - alternatives. That makes the curl app
- still capable of using them, by building with them from source.
-
- These functions have no purpose anymore:
-
- curl_multi_socket
-
- curl_multi_socket_all
-
-22.5 remove CURLOPT_FAILONERROR
-
- Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
- internally. Let the app judge success or not for itself.
-
-22.7 remove progress meter from libcurl
-
- The internally provided progress meter output doesn't belong in the library.
- Basically no application wants it (apart from curl) but instead applications
- can and should do their own progress meters using the progress callback.
-
- The progress callback should then be bumped as well to get proper 64bit
- variable types passed to it instead of doubles so that big files work
- correctly.
-
-22.8 remove 'curl_httppost' from public
-
- curl_formadd() was made to fill in a public struct, but the fact that the
- struct is public is never really used by application for their own advantage
- but instead often restricts how the form functions can or can't be modified.
-
- Changing them to return a private handle will benefit the implementation and
- allow us much greater freedoms while still maintaining a solid API and ABI.
+ The rate-limiting logic is done in the PERFORMING state in multi.c but MQTT
+ is not (yet) implemented to use that!
diff --git a/docs/TheArtOfHttpScripting.md b/docs/TheArtOfHttpScripting.md
index 8de00f0..a6eb8b3 100644
--- a/docs/TheArtOfHttpScripting.md
+++ b/docs/TheArtOfHttpScripting.md
@@ -11,7 +11,7 @@
 
  Curl is a command line tool for doing all sorts of URL manipulations and
  transfers, but this particular document will focus on how to use it when
- doing HTTP requests for fun and profit. I willl assume that you know how to
+ doing HTTP requests for fun and profit. I will assume that you know how to
  invoke `curl --help` or `curl --manual` to get basic information about it.
 
  Curl is not written to do everything for you. It makes the requests, it gets
@@ -38,7 +38,7 @@
 
 ## See the Protocol
 
- Using curl's option [`--verbose`](https://curl.haxx.se/docs/manpage.html#-v)
+ Using curl's option [`--verbose`](https://curl.se/docs/manpage.html#-v)
  (`-v` as a short option) will display what kind of commands curl sends to the
  server, as well as a few other informational texts.
 
@@ -46,8 +46,8 @@
  understand the curl<->server interaction.
 
  Sometimes even `--verbose` is not enough. Then
- [`--trace`](https://curl.haxx.se/docs/manpage.html#-trace) and
- [`--trace-ascii`]((https://curl.haxx.se/docs/manpage.html#--trace-ascii)
+ [`--trace`](https://curl.se/docs/manpage.html#-trace) and
+ [`--trace-ascii`](https://curl.se/docs/manpage.html#--trace-ascii)
  offer even more details as they show **everything** curl sends and
  receives. Use it like this:
 
@@ -58,7 +58,7 @@
  Many times you may wonder what exactly is taking all the time, or you just
  want to know the amount of milliseconds between two points in a transfer. For
  those, and other similar situations, the
- [`--trace-time`]((https://curl.haxx.se/docs/manpage.html#--trace-time) option
+ [`--trace-time`](https://curl.se/docs/manpage.html#--trace-time) option
  is what you need. It'll prepend the time to each trace output line:
 
     curl --trace-ascii d.txt --trace-time http://example.com/
@@ -74,7 +74,7 @@
 
  The Uniform Resource Locator format is how you specify the address of a
  particular resource on the Internet. You know these, you've seen URLs like
- https://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the
+ https://curl.se or https://yourbank.com a million times. RFC 3986 is the
  canonical spec. And yeah, the formal name is not URL, it is URI.
 
 ## Host
@@ -85,7 +85,7 @@
 
  For development and other trying out situations, you can point to a different
  IP address for a host name than what would otherwise be used, by using curl's
- [`--resolve`](https://curl.haxx.se/docs/manpage.html#--resolve) option:
+ [`--resolve`](https://curl.se/docs/manpage.html#--resolve) option:
 
     curl --resolve www.example.org:80:127.0.0.1 http://www.example.org/
 
@@ -101,9 +101,9 @@
     curl http://www.example.org:1234/
 
  The port number you specify in the URL is the number that the server uses to
- offer its services. Sometimes you may use a local proxy, and then you may
- need to specify that proxy's port number separately for what curl needs to
- connect to locally. Like when using a HTTP proxy on port 4321:
+ offer its services. Sometimes you may use a proxy, and then you may
+ need to specify that proxy's port number separately from what curl needs to
+ connect to the server. Like when using a HTTP proxy on port 4321:
 
     curl --proxy http://proxy.example.org:4321 http://remote.example.org/
 
@@ -141,19 +141,19 @@
  issues a GET request to the server and receives the document it asked for.
  If you issue the command line
 
-    curl https://curl.haxx.se
+    curl https://curl.se
 
  you get a web page returned in your terminal window. The entire HTML document
  that that URL holds.
 
  All HTTP replies contain a set of response headers that are normally hidden,
- use curl's [`--include`](https://curl.haxx.se/docs/manpage.html#-i) (`-i`)
+ use curl's [`--include`](https://curl.se/docs/manpage.html#-i) (`-i`)
  option to display them as well as the rest of the document.
 
 ## HEAD
 
  You can ask the remote server for ONLY the headers by using the
- [`--head`](https://curl.haxx.se/docs/manpage.html#-I) (`-I`) option which
+ [`--head`](https://curl.se/docs/manpage.html#-I) (`-I`) option which
  will make curl issue a HEAD request. In some special cases servers deny the
  HEAD method while others still work, which is a particular kind of annoyance.
 
@@ -173,7 +173,7 @@
 
     curl http://url1.example.com http://url2.example.com
 
- If you use [`--data`](https://curl.haxx.se/docs/manpage.html#-d) to POST to
+ If you use [`--data`](https://curl.se/docs/manpage.html#-d) to POST to
  the URL, using multiple URLs means that you send that same POST to all the
  given URLs.
 
@@ -186,7 +186,7 @@
 
  Sometimes you need to operate on several URLs in a single command line and do
  different HTTP methods on each. For this, you'll enjoy the
- [`--next`](https://curl.haxx.se/docs/manpage.html#-:) option. It is basically
+ [`--next`](https://curl.se/docs/manpage.html#-:) option. It is basically
  a separator that separates a bunch of options from the next. All the URLs
  before `--next` will get the same method and will get all the POST data
  merged into one.
@@ -222,10 +222,12 @@
 
  A GET-form uses the method GET, as specified in HTML like:
 
-    <form method="GET" action="junk.cgi">
-      <input type=text name="birthyear">
-      <input type=submit name=press value="OK">
-    </form>
+```html
+<form method="GET" action="junk.cgi">
+  <input type=text name="birthyear">
+  <input type=submit name=press value="OK">
+</form>
+```
 
  In your favorite browser, this form will appear with a text box to fill in
  and a press-button labeled "OK". If you fill in '1905' and press the OK
@@ -258,10 +260,12 @@
 
  The form would look very similar to the previous one:
 
-    <form method="POST" action="junk.cgi">
-      <input type=text name="birthyear">
-      <input type=submit name=press value=" OK ">
-    </form>
+```html
+<form method="POST" action="junk.cgi">
+  <input type=text name="birthyear">
+  <input type=submit name=press value=" OK ">
+</form>
+```
 
  And to use curl to post this form with the same data filled in as before, we
  could do it like:
@@ -269,11 +273,11 @@
     curl --data "birthyear=1905&press=%20OK%20" http://www.example.com/when.cgi
 
  This kind of POST will use the Content-Type
- `application/x-www-form-urlencoded' and is the most widely used POST kind.
+ `application/x-www-form-urlencoded` and is the most widely used POST kind.
 
  The data you send to the server MUST already be properly encoded, curl will
  not do that for you. For example, if you want the data to contain a space,
- you need to replace that space with %20 etc. Failing to comply with this will
+ you need to replace that space with `%20`, etc. Failing to comply with this will
  most likely cause your data to be received wrongly and messed up.
 
  Recent curl versions can in fact url-encode POST data for you, like this:
@@ -293,10 +297,12 @@
  This method is mainly designed to better support file uploads. A form that
  allows a user to upload a file could be written like this in HTML:
 
-    <form method="POST" enctype='multipart/form-data' action="upload.cgi">
-      <input type=file name=upload>
-      <input type=submit name=press value="OK">
-    </form>
+```html
+<form method="POST" enctype='multipart/form-data' action="upload.cgi">
+  <input type=file name=upload>
+  <input type=submit name=press value="OK">
+</form>
+```
 
  This clearly shows that the Content-Type about to be sent is
  `multipart/form-data`.
@@ -315,11 +321,13 @@
  A similar example form with one visible field, one hidden field and one
  submit button could look like:
 
-    <form method="POST" action="foobar.cgi">
-      <input type=text name="birthyear">
-      <input type=hidden name="person" value="daniel">
-      <input type=submit name="press" value="OK">
-    </form>
+```html
+<form method="POST" action="foobar.cgi">
+  <input type=text name="birthyear">
+  <input type=hidden name="person" value="daniel">
+  <input type=submit name="press" value="OK">
+</form>
+```
 
  To POST this with curl, you won't have to think about if the fields are
  hidden or not. To curl they're all the same:
@@ -370,10 +378,10 @@
 
  The site might require a different authentication method (check the headers
  returned by the server), and then
- [`--ntlm`](https://curl.haxx.se/docs/manpage.html#--ntlm),
- [`--digest`](https://curl.haxx.se/docs/manpage.html#--digest),
- [`--negotiate`](https://curl.haxx.se/docs/manpage.html#--negotiate) or even
- [`--anyauth`](https://curl.haxx.se/docs/manpage.html#--anyauth) might be
+ [`--ntlm`](https://curl.se/docs/manpage.html#--ntlm),
+ [`--digest`](https://curl.se/docs/manpage.html#--digest),
+ [`--negotiate`](https://curl.se/docs/manpage.html#--negotiate) or even
+ [`--anyauth`](https://curl.se/docs/manpage.html#--anyauth) might be
  options that suit you.
 
 ## Proxy Authentication
@@ -383,12 +391,12 @@
  may require its own user and password to allow the client to get through to
  the Internet. To specify those with curl, run something like:
 
-        curl --proxy-user proxyuser:proxypassword curl.haxx.se
+    curl --proxy-user proxyuser:proxypassword curl.se
 
  If your proxy requires the authentication to be done using the NTLM method,
- use [`--proxy-ntlm`](https://curl.haxx.se/docs/manpage.html#--proxy-ntlm), if
+ use [`--proxy-ntlm`](https://curl.se/docs/manpage.html#--proxy-ntlm), if
  it requires Digest use
- [`--proxy-digest`](https://curl.haxx.se/docs/manpage.html#--proxy-digest).
+ [`--proxy-digest`](https://curl.se/docs/manpage.html#--proxy-digest).
 
  If you use any one of these user+password options but leave out the password
  part, curl will prompt for the password interactively.
@@ -462,7 +470,7 @@
 
  If you use curl to POST to a site that immediately redirects you to another
  page, you can safely use
- [`--location`](https://curl.haxx.se/docs/manpage.html#-L) (`-L`) and
+ [`--location`](https://curl.se/docs/manpage.html#-L) (`-L`) and
  `--data`/`--form` together. curl will only use POST in the first request, and
  then revert to GET in the following operations.
 
@@ -501,13 +509,13 @@
 
  Cookies are sent as common HTTP headers. This is practical as it allows curl
  to record cookies simply by recording headers. Record cookies with curl by
- using the [`--dump-header`](https://curl.haxx.se/docs/manpage.html#-D) (`-D`)
+ using the [`--dump-header`](https://curl.se/docs/manpage.html#-D) (`-D`)
  option like:
 
     curl --dump-header headers_and_cookies http://www.example.com
 
  (Take note that the
- [`--cookie-jar`](https://curl.haxx.se/docs/manpage.html#-c) option described
+ [`--cookie-jar`](https://curl.se/docs/manpage.html#-c) option described
  below is a better way to store cookies.)
 
  Curl has a full blown cookie parsing engine built-in that comes in use if you
@@ -519,7 +527,7 @@
     curl --cookie stored_cookies_in_file http://www.example.com
 
  Curl's "cookie engine" gets enabled when you use the
- [`--cookie`](https://curl.haxx.se/docs/manpage.html#-b) option. If you only
+ [`--cookie`](https://curl.se/docs/manpage.html#-b) option. If you only
  want curl to understand received cookies, use `--cookie` with a file that
  doesn't exist. Example, if you want to let curl understand cookies from a
  page and follow a location (and thus possibly send back cookies it received),
@@ -571,12 +579,12 @@
  curl also tries to verify that the server is who it claims to be, by
  verifying the server's certificate against a locally stored CA cert
  bundle. Failing the verification will cause curl to deny the connection. You
- must then use [`--insecure`](https://curl.haxx.se/docs/manpage.html#-k)
+ must then use [`--insecure`](https://curl.se/docs/manpage.html#-k)
  (`-k`) in case you want to tell curl to ignore that the server can't be
  verified.
 
  More about server certificate verification and ca cert bundles can be read in
- the [SSLCERTS document](https://curl.haxx.se/docs/sslcerts.html).
+ the [SSLCERTS document](https://curl.se/docs/sslcerts.html).
 
  At times you may end up with your own CA cert store and then you can tell
  curl to use that to verify the server's certificate:
@@ -611,7 +619,7 @@
  It should be noted that curl selects which methods to use on its own
  depending on what action to ask for. `-d` will do POST, `-I` will do HEAD and
  so on. If you use the
- [`--request`](https://curl.haxx.se/docs/manpage.html#-X) / `-X` option you
+ [`--request`](https://curl.se/docs/manpage.html#-X) / `-X` option you
  can change the method keyword curl selects, but you will not modify curl's
  behavior. This means that if you for example use -d "data" to do a POST, you
  can modify the method to a `PROPFIND` with `-X` and curl will still think it
@@ -671,10 +679,10 @@
  - Make sure you check for and use cookies when needed (both reading with
    `--cookie` and writing with `--cookie-jar`)
 
- - Set user-agent (with [`-A`](https://curl.haxx.se/docs/manpage.html#-A)) to
+ - Set user-agent (with [`-A`](https://curl.se/docs/manpage.html#-A)) to
    one like a recent popular browser does
 
- - Set referer (with [`-E`](https://curl.haxx.se/docs/manpage.html#-E)) like
+ - Set referer (with [`-E`](https://curl.se/docs/manpage.html#-E)) like
    it is set by the browser
 
  - If you use POST, make sure you send all the fields and in the same order as
diff --git a/docs/URL-SYNTAX.md b/docs/URL-SYNTAX.md
new file mode 100644
index 0000000..a97eb0d
--- /dev/null
+++ b/docs/URL-SYNTAX.md
@@ -0,0 +1,366 @@
+# URL syntax and their use in curl
+
+## Specifications
+
+The official "URL syntax" is primarily defined in these two different
+specifications:
+
+ - [RFC 3986](https://tools.ietf.org/html/rfc3986) (although URL is called "URI" in there)
+ - [The WHATWG URL Specification](https://url.spec.whatwg.org/)
+
+RFC 3986 is the earlier one, and curl has always tried to adhere to that one
+(since it shipped in January 2005).
+
+The WHATWG URL spec was written later, is incompatible with the RFC 3986 and
+changes over time.
+
+## Variations
+
+URL parsers as implemented in browsers, libraries and tools usually opt to
+support one of the mentioned specifications. Bugs, differences in
+interpretations and the moving nature of the WHATWG spec does however make it
+very unlikely that multiple parsers treat URLs the exact same way!
+
+## Security
+
+Due to the inherent differences between URL parser implementations, it is
+considered a security risk to mix different implementations and assume the
+same behavior!
+
+For example, if you use one parser to check if a URL uses a good host name or
+the correct auth field, and then pass on that same URL to a *second* parser,
+there will always be a risk it treats the same URL differently. There is no
+right and wrong in URL land, only differences of opinions.
+
+libcurl offers a separate API to its URL parser for this reason, among others.
+
+Applications may at times find it convenient to allow users to specify URLs
+for various purposes and that string would then end up fed to curl. Getting a
+URL from an external untrusted party and using it with curl brings several
+security concerns:
+
+1. If you have an application that runs as or in a server application, getting
+   an unfiltered URL can trick your application to access a local resource
+   instead of a remote resource. Protecting yourself against localhost accesses is very
+   hard when accepting user provided URLs.
+
+2. Such custom URLs can access other ports than you planned as port numbers
+   are part of the regular URL format. The combination of a local host and a
+   custom port number can allow external users to play tricks with your local
+   services.
+
+3. Such a URL might use other schemes than you thought of or planned for.
+
+## "RFC3986 plus"
+
+curl recognizes a URL syntax that we call "RFC 3986 plus". It is grounded on
+the well established RFC 3986 to make sure previously written command lines and
+curl using scripts will remain working.
+
+curl's URL parser allows a few deviations from the spec in order to
+inter-operate better with URLs that appear in the wild.
+
+### spaces
+
+In particular `Location:` headers that indicate to the client where a resource
+has been redirected to, sometimes contain spaces. This is a violation of RFC
+3986 but is fine in the WHATWG spec. curl handles these by re-encoding them to
+`%20`.
+
+### non-ASCII
+
+Byte values in a provided URL that are outside of the printable ASCII range
+are percent-encoded by curl.
+
+### multiple slashes
+
+An absolute URL always starts with a "scheme" followed by a colon. For all the
+schemes curl supports, the colon must be followed by two slashes according to
+RFC 3986 but not according to the WHATWG spec - which allows one to infinity
+amount.
+
+curl allows one, two or three slashes after the colon to still be considered a
+valid URL.
+
+### "scheme-less"
+
+curl supports "URLs" that do not start with a scheme. This is not supported by
+any of the specifications. This is a shortcut to entering URLs that was
+supported by browsers early on and has been mimicked by curl.
+
+Based on what the host name starts with, curl will "guess" what protocol to
+use:
+
+ - `ftp.` means FTP
+ - `dict.` means DICT
+ - `ldap.` means LDAP
+ - `imap.` means IMAP
+ - `smtp.` means SMTP
+ - `pop3.` means POP3
+ - all other means HTTP
+
+### globbing letters
+
+The curl command line tool supports "globbing" of URLs. It means that you can
+create ranges and lists using `[N-M]` and `{one,two,three}` sequences. The
+letters used for this (`[]{}`) are reserved in RFC 3986 and can therefore not
+legitimately be part of such a URL.
+
+They are however not reserved or special in the WHATWG specification, so
+globbing can mess up such URLs. Globbing can be turned off for such occasions
+(using `--globoff`).
+
+# URL syntax details
+
+A URL may consist of the following components - many of them are optional:
+
+    [scheme][divider][userinfo][hostname][port number][path][query][fragment]
+
+Each component is separated from the following component with a divider
+character or string.
+
+For example, this could look like:
+
+    http://user:password@www.example.com:80/index.hmtl?foo=bar#top
+
+## Scheme
+
+The scheme specifies the protocol to use. A curl build can support a few or
+many different schemes. You can limit what schemes curl should accept.
+
+curl supports the following schemes on URLs specified to transfer. They are
+matched case insensitively:
+
+`dict`, `file`, `ftp`, `ftps`, `gopher`, `gophers`, `http`, `https`, `imap`,
+`imaps`, `ldap`, `ldaps`, `mqtt`, `pop3`, `pop3s`, `rtmp`, `rtmpe`, `rtmps`,
+`rtmpt`, `rtmpte`, `rtmpts`, `rtsp`, `smb`, `smbs`, `smtp`, `smtps`, `telnet`,
+`tftp`
+
+When the URL is specified to identify a proxy, curl recognizes the following
+schemes:
+
+`http`, `https`, `socks4`, `socks4a`, `socks5`, `socks5h`, `socks`
+
+## Userinfo
+
+The userinfo field can be used to set user name and password for
+authentication purposes in this transfer. The use of this field is discouraged
+since it often means passing around the password in plain text and is thus a
+security risk.
+
+URLs for IMAP, POP3 and SMTP also support *login options* as part of the
+userinfo field. They're provided as a semicolon after the password and then
+the options.
+
+## Hostname
+
+The hostname part of the URL contains the address of the server that you want
+to connect to. This can be the fully qualified domain name of the server, the
+local network name of the machine on your network or the IP address of the
+server or machine represented by either an IPv4 or IPv6 address (within
+brackets). For example:
+
+    http://www.example.com/
+
+    http://hostname/
+
+    http://192.168.0.1/
+
+    http://[2001:1890:1112:1::20]/
+
+### "localhost"
+
+Starting in curl 7.77.0, curl will use loopback IP addresses for the name
+`localhost`: `127.0.0.1` and `::1`. It will not try to resolve the name using
+the resolver functions.
+
+This is done to make sure the host accessed is truly the localhost - the local
+machine.
+
+### IDNA
+
+If curl was built with International Domain Name (IDN) support, it can also
+handle host names using non-ASCII characters.
+
+When built with libidn2, curl uses the IDNA 2008 standard. This is equivalent
+to the WHATWG URL spec, but differs from certain browsers that use IDNA 2003
+Transitional Processing. The two standards have a huge overlap but differ
+slightly, perhaps most famously in how they deal with the German "double s"
+(`ß`).
+
+When winidn is used, curl uses IDNA 2003 Transitional Processing, like the rest
+of Windows.
+
+## Port number
+
+If there's a colon after the hostname, that should be followed by the port
+number to use. 1 - 65535. curl also supports a blank port number field - but
+only if the URL starts with a scheme.
+
+If the port number is not specified in the URL, curl will used a default port
+based on the provide scheme:
+
+DICT 2628, FTP 21, FTPS 990, GOPHER 70, GOPHERS 70, HTTP 80, HTTPS 443,
+IMAP 132, IMAPS 993, LDAP 369, LDAPS 636, MQTT 1883, POP3 110, POP3S 995,
+RTMP 1935, RTMPS 443, RTMPT 80, RTSP 554, SCP 22, SFTP 22, SMB 445, SMBS 445,
+SMTP 25, SMTPS 465, TELNET 23, TFTP 69
+
+# Scheme specific behaviors
+
+## FTP
+
+The path part of an FTP request specifies the file to retrieve and from which
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the directory is omitted then the
+directory listing for the root / home directory will be returned.
+
+FTP servers typically put the user in its "home directory" after login, which
+then differs between users. To explicitly specify the root directory of an FTP
+server start the path with double slash `//` or `/%2f` (2F is the hexadecimal
+value of the ascii code for the slash).
+
+## FILE
+
+When a `FILE://` URL is accessed on Windows systems, it can be crafted in a
+way so that Windows attempts to connect to a (remote) machine when curl wants
+to read or write such a path.
+
+curl only allows the hostname part of a FILE URL to be one out of these three
+alternatives: `localhost`, `127.0.0.1` or blank ("", zero characters).
+Anything else will make curl fail to parse the URL.
+
+### Windows-specific FILE details
+
+curl accepts that the FILE URL's path starts with a "drive letter". That's a
+single letter `a` to `z` followed by a colon or a pipe character (`|`).
+
+The Windows operating system itself will convert some file accesses to perform
+network accesses over SMB/CIFS, through several different file path patterns.
+This way, a `file://` URL passed to curl *might* be converted into a network
+access inadvertently and unknowingly to curl. This is a Windows feature curl
+cannot control or disable.
+
+## IMAP
+
+The path part of an IMAP request not only specifies the mailbox to list or
+select, but can also be used to check the `UIDVALIDITY` of the mailbox, to
+specify the `UID`, `SECTION` and `PARTIAL` octets of the message to fetch and
+to specify what messages to search for.
+
+A top level folder list:
+
+    imap://user:password@mail.example.com
+
+A folder list on the user's inbox:
+
+    imap://user:password@mail.example.com/INBOX
+
+Select the user's inbox and fetch message with uid = 1:
+
+    imap://user:password@mail.example.com/INBOX/;UID=1
+
+Select the user's inbox and fetch the first message in the mail box:
+
+    imap://user:password@mail.example.com/INBOX/;MAILINDEX=1
+
+Select the user's inbox, check the `UIDVALIDITY` of the mailbox is 50 and
+fetch message 2 if it is:
+
+    imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2
+
+Select the user's inbox and fetch the text portion of message 3:
+
+    imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT
+
+Select the user's inbox and fetch the first 1024 octets of message 4:
+
+    imap://user:password@mail.example.com/INBOX/;UID=4/;PARTIAL=0.1024
+
+Select the user's inbox and check for NEW messages:
+
+    imap://user:password@mail.example.com/INBOX?NEW
+
+Select the user's inbox and search for messages containing "shadows" in the
+subject line:
+
+    imap://user:password@mail.example.com/INBOX?SUBJECT%20shadows
+
+For more information about the individual components of an IMAP URL please see
+RFC 5092.
+
+## LDAP
+
+The path part of a LDAP request can be used to specify the: Distinguished
+Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field is
+separated by a question mark and when that field is not required an empty
+string with the question mark separator should be included.
+
+Search for the DN as `My Organisation`:
+
+    ldap://ldap.example.com/o=My%20Organisation
+
+the same search but will only return postalAddress attributes:
+
+    ldap://ldap.example.com/o=My%20Organisation?postalAddress
+
+Search for an empty DN and request information about the
+`rootDomainNamingContext` attribute for an Active Directory server:
+
+    ldap://ldap.example.com/?rootDomainNamingContext
+
+For more information about the individual components of a LDAP URL please
+see [RFC 4516](https://tools.ietf.org/html/rfc4516).
+
+## POP3
+
+The path part of a POP3 request specifies the message ID to retrieve. If the
+ID is not specified then a list of waiting messages is returned instead.
+
+## SCP
+
+The path part of an SCP URL specifies the path and file to retrieve or
+upload. The file is taken as an absolute path from the root directory on the
+server.
+
+To specify a path relative to the user's home directory on the server, prepend
+`~/` to the path portion.
+
+## SFTP
+
+The path part of an SFTP URL specifies the file to retrieve or upload. If the
+path ends with a slash (`/`) then a directory listing is returned instead of a
+file. If the path is omitted entirely then the directory listing for the root
+/ home directory will be returned.
+
+## SMB
+The path part of a SMB request specifies the file to retrieve and from what
+share and directory or the share to upload to and as such, may not be omitted.
+If the user name is embedded in the URL then it must contain the domain name
+and as such, the backslash must be URL encoded as %2f.
+
+curl supports SMB version 1 (only)
+
+## SMTP
+
+The path part of a SMTP request specifies the host name to present during
+communication with the mail server. If the path is omitted, then libcurl will
+attempt to resolve the local computer's host name. However, this may not
+return the fully qualified domain name that is required by some mail servers
+and specifying this path allows you to set an alternative name, such as your
+machine's fully qualified domain name, which you might have obtained from an
+external function such as gethostname or getaddrinfo.
+
+The default smtp port is 25. Some servers use port 587 as an alternative.
+
+## RTMP
+
+There's no official URL spec for RTMP so libcurl uses the URL syntax supported
+by the underlying librtmp library. It has a syntax where it wants a
+traditional URL, followed by a space and a series of space-separated
+`name=value` pairs.
+
+While space is not typically a "legal" letter, libcurl accepts them. When a
+user wants to pass in a `#` (hash) character it will be treated as a fragment
+and get cut off by libcurl if provided literally. You will instead have to
+escape it by providing it as backslash and its ASCII value in hexadecimal:
+`\23`.
diff --git a/docs/VERSIONS.md b/docs/VERSIONS.md
index 72a4547..bcc7474 100644
--- a/docs/VERSIONS.md
+++ b/docs/VERSIONS.md
@@ -2,7 +2,7 @@
 ============================
 
  Curl is not only curl. Curl is also libcurl. They're actually individually
- versioned, but they mostly follow each other rather closely.
+ versioned, but they usually follow each other closely.
 
  The version numbering is always built up using the same system:
 
@@ -15,22 +15,21 @@
 ## Bumping numbers
 
  One of these numbers will get bumped in each new release. The numbers to the
- right of a bumped number will be reset to zero. If Z is zero, it may not be
- included in the version number.
+ right of a bumped number will be reset to zero.
 
  The main version number will get bumped when *really* big, world colliding
  changes are made. The release number is bumped when changes are performed or
  things/features are added. The patch number is bumped when the changes are
  mere bugfixes.
 
- It means that after release 1.2.3, we can release 2.0 if something really big
- has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs
- were fixed.
+ It means that after release 1.2.3, we can release 2.0.0 if something really
+ big has been made, 1.3.0 if not that big changes were made or 1.2.4 if only
+ bugs were fixed.
 
  Bumping, as in increasing the number with 1, is unconditionally only
  affecting one of the numbers (except the ones to the right of it, that may be
  set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99
- becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100 might come.
+ becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100.0 might come.
 
  All original curl source release archives are named according to the libcurl
  version (not according to the curl client version that, as said before, might
@@ -42,7 +41,9 @@
  numbering scheme that can be used for comparison. The version number is
  defined as:
 
-        #define LIBCURL_VERSION_NUM 0xXXYYZZ
+```c
+#define LIBCURL_VERSION_NUM 0xXXYYZZ
+```
 
  Where XX, YY and ZZ are the main version, release and patch numbers in
  hexadecimal. All three number fields are always represented using two digits
diff --git a/docs/cmdline-opts/CMakeLists.txt b/docs/cmdline-opts/CMakeLists.txt
index a63f4ed..ae25c5c 100644
--- a/docs/cmdline-opts/CMakeLists.txt
+++ b/docs/cmdline-opts/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/cmdline-opts/MANPAGE.md b/docs/cmdline-opts/MANPAGE.md
index 3a8270b..b903bc2 100644
--- a/docs/cmdline-opts/MANPAGE.md
+++ b/docs/cmdline-opts/MANPAGE.md
@@ -3,7 +3,8 @@
 This is the curl man page generator. It generates a single nroff man page
 output from the set of sources files in this directory.
 
-There is one source file for each supported command line option. The format is
+There is one source file for each supported command line option. The output
+gets `page-header` prepended and `page-footer` appended. The format is
 described below.
 
 ## Option files
@@ -32,13 +33,18 @@
 ### Body
 
 The body of the description. Only refer to options with their long form option
-version, like --verbose. The output generator will replace such with the
+version, like `--verbose`. The output generator will replace such with the
 correct markup that shows both short and long version.
 
-## Header
+Text written within `*asterisks*` will get shown using italics. Text within
+two `**asterisks**` will get shown using bold.
 
-`page-header` is the nroff formatted file that will be output before the
-generated options output for the master man page.
+## Header and footer
+
+`page-header` is the file that will be output before the generated options
+output for the master man page.
+
+`page-footer` is appended after all the individual options.
 
 ## Generate
 
diff --git a/docs/cmdline-opts/Makefile.am b/docs/cmdline-opts/Makefile.am
index 0c81b62..f416d55 100644
--- a/docs/cmdline-opts/Makefile.am
+++ b/docs/cmdline-opts/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/cmdline-opts/Makefile.inc b/docs/cmdline-opts/Makefile.inc
index 792cadb..6e04552 100644
--- a/docs/cmdline-opts/Makefile.inc
+++ b/docs/cmdline-opts/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -21,221 +21,248 @@
 ###########################################################################
 # Shared between Makefile.am and CMakeLists.txt
 
-DPAGES =					\
-  abstract-unix-socket.d			\
-  alt-svc.d                                     \
-  anyauth.d					\
-  append.d basic.d				\
-  cacert.d capath.d				\
-  cert-status.d					\
-  cert-type.d					\
-  cert.d					\
-  ciphers.d					\
-  compressed-ssh.d				\
-  compressed.d					\
-  config.d					\
-  connect-timeout.d				\
-  connect-to.d					\
-  continue-at.d					\
-  cookie-jar.d					\
-  cookie.d					\
-  create-dirs.d					\
-  crlf.d crlfile.d				\
-  curves.d					\
-  data-ascii.d					\
-  data-binary.d					\
-  data-urlencode.d				\
-  data.d data-raw.d				\
-  delegation.d					\
-  digest.d					\
-  disable-eprt.d				\
-  disable-epsv.d				\
-  disable.d					\
-  disallow-username-in-url.d			\
-  dns-interface.d				\
-  dns-ipv4-addr.d				\
-  dns-ipv6-addr.d				\
-  dns-servers.d					\
-  doh-url.d					\
-  dump-header.d					\
-  egd-file.d					\
-  engine.d					\
-  etag-compare.d                \
-  etag-save.d                   \
-  expect100-timeout.d				\
-  fail-early.d					\
-  fail.d					\
-  false-start.d					\
-  form-string.d					\
-  form.d					\
-  ftp-account.d					\
-  ftp-alternative-to-user.d			\
-  ftp-create-dirs.d				\
-  ftp-method.d					\
-  ftp-pasv.d					\
-  ftp-port.d					\
-  ftp-pret.d					\
-  ftp-skip-pasv-ip.d				\
-  ftp-ssl-ccc-mode.d				\
-  ftp-ssl-ccc.d					\
-  ftp-ssl-control.d				\
-  get.d globoff.d				\
-  happy-eyeballs-timeout-ms.d			\
-  haproxy-protocol.d				\
-  head.d header.d				\
-  help.d					\
-  hostpubmd5.d					\
-  http0.9.d					\
-  http1.0.d					\
-  http1.1.d http2.d				\
-  http2-prior-knowledge.d			\
-  http3.d                                       \
-  ignore-content-length.d			\
-  include.d					\
-  insecure.d					\
-  interface.d					\
-  ipv4.d ipv6.d					\
-  junk-session-cookies.d			\
-  keepalive-time.d				\
-  key.d key-type.d				\
-  krb.d libcurl.d				\
-  limit-rate.d					\
-  list-only.d					\
-  local-port.d					\
-  location-trusted.d				\
-  location.d					\
-  login-options.d				\
-  mail-auth.d					\
-  mail-from.d					\
-  mail-rcpt-allowfails.d                        \
-  mail-rcpt.d					\
-  manual.d					\
-  max-filesize.d				\
-  max-redirs.d					\
-  max-time.d					\
-  metalink.d					\
-  negotiate.d					\
-  netrc-file.d					\
-  netrc-optional.d				\
-  netrc.d					\
-  next.d no-alpn.d				\
-  no-buffer.d					\
-  no-keepalive.d				\
-  no-npn.d					\
-  no-progress-meter.d                           \
-  no-sessionid.d				\
-  noproxy.d					\
-  ntlm.d ntlm-wb.d				\
-  oauth2-bearer.d				\
-  output.d                                      \
-  output-dir.d                                  \
-  parallel-immediate.d                          \
-  parallel-max.d                                \
-  parallel.d                                    \
-  pass.d                			\
-  path-as-is.d					\
-  pinnedpubkey.d				\
-  post301.d					\
-  post302.d					\
-  post303.d					\
-  preproxy.d					\
-  progress-bar.d				\
-  proto-default.d				\
-  proto-redir.d					\
-  proto.d					\
-  proxy-anyauth.d				\
-  proxy-basic.d					\
-  proxy-cacert.d				\
-  proxy-capath.d				\
-  proxy-cert-type.d				\
-  proxy-cert.d					\
-  proxy-ciphers.d				\
-  proxy-crlfile.d				\
-  proxy-digest.d				\
-  proxy-header.d				\
-  proxy-insecure.d				\
-  proxy-key-type.d				\
-  proxy-key.d					\
-  proxy-negotiate.d				\
-  proxy-ntlm.d					\
-  proxy-pass.d					\
-  proxy-pinnedpubkey.d				\
-  proxy-service-name.d				\
-  proxy-ssl-allow-beast.d			\
-  proxy-tls13-ciphers.d				\
-  proxy-tlsauthtype.d				\
-  proxy-tlspassword.d				\
-  proxy-tlsuser.d				\
-  proxy-tlsv1.d					\
-  proxy-user.d					\
-  proxy.d					\
-  proxy1.0.d					\
-  proxytunnel.d					\
-  pubkey.d quote.d				\
-  random-file.d					\
-  range.d raw.d					\
-  referer.d					\
-  remote-header-name.d				\
-  remote-name-all.d				\
-  remote-name.d					\
-  remote-time.d					\
-  request-target.d				\
-  request.d					\
-  resolve.d					\
-  retry-all-errors.d				\
-  retry-connrefused.d				\
-  retry-delay.d					\
-  retry-max-time.d				\
-  retry.d					\
-  sasl-authzid.d				\
-  sasl-ir.d					\
-  service-name.d				\
-  show-error.d					\
-  silent.d					\
-  socks4.d socks5.d				\
-  socks4a.d					\
-  socks5-basic.d				\
-  socks5-gssapi-nec.d				\
-  socks5-gssapi-service.d			\
-  socks5-gssapi.d				\
-  socks5-hostname.d				\
-  speed-limit.d					\
-  speed-time.d					\
-  ssl-allow-beast.d				\
-  ssl-no-revoke.d				\
-  ssl-reqd.d					\
-  ssl-revoke-best-effort.d			\
-  ssl.d						\
-  sslv2.d sslv3.d				\
-  stderr.d					\
-  styled-output.d				\
-  suppress-connect-headers.d			\
-  tcp-fastopen.d				\
-  tcp-nodelay.d					\
-  telnet-option.d				\
-  tftp-blksize.d				\
-  tftp-no-options.d				\
-  time-cond.d					\
-  tls-max.d					\
-  tls13-ciphers.d				\
-  tlsauthtype.d					\
-  tlspassword.d					\
-  tlsuser.d					\
-  tlsv1.0.d					\
-  tlsv1.1.d					\
-  tlsv1.2.d					\
-  tlsv1.3.d tlsv1.d				\
-  tr-encoding.d					\
-  trace-ascii.d					\
-  trace-time.d					\
-  trace.d					\
-  unix-socket.d					\
-  upload-file.d					\
-  url.d use-ascii.d				\
-  user-agent.d					\
-  user.d verbose.d				\
-  version.d					\
-  write-out.d					\
+DPAGES = \
+  abstract-unix-socket.d \
+  alt-svc.d \
+  anyauth.d \
+  append.d \
+  aws-sigv4.d \
+  basic.d \
+  cacert.d \
+  capath.d \
+  cert-status.d \
+  cert-type.d \
+  cert.d \
+  ciphers.d \
+  compressed-ssh.d \
+  compressed.d \
+  config.d \
+  connect-timeout.d \
+  connect-to.d \
+  continue-at.d \
+  cookie-jar.d \
+  cookie.d \
+  create-dirs.d \
+  create-file-mode.d \
+  crlf.d \
+  crlfile.d \
+  curves.d \
+  data-ascii.d \
+  data-binary.d \
+  data-raw.d \
+  data-urlencode.d \
+  data.d \
+  delegation.d \
+  digest.d \
+  disable-eprt.d \
+  disable-epsv.d \
+  disable.d \
+  disallow-username-in-url.d \
+  dns-interface.d \
+  dns-ipv4-addr.d \
+  dns-ipv6-addr.d \
+  dns-servers.d \
+  doh-cert-status.d \
+  doh-insecure.d \
+  doh-url.d \
+  dump-header.d \
+  egd-file.d \
+  engine.d \
+  etag-compare.d \
+  etag-save.d \
+  expect100-timeout.d \
+  fail-early.d \
+  fail-with-body.d \
+  fail.d \
+  false-start.d \
+  form-string.d \
+  form.d \
+  ftp-account.d \
+  ftp-alternative-to-user.d \
+  ftp-create-dirs.d \
+  ftp-method.d \
+  ftp-pasv.d \
+  ftp-port.d \
+  ftp-pret.d \
+  ftp-skip-pasv-ip.d \
+  ftp-ssl-ccc-mode.d \
+  ftp-ssl-ccc.d \
+  ftp-ssl-control.d \
+  get.d \
+  globoff.d \
+  happy-eyeballs-timeout-ms.d \
+  haproxy-protocol.d \
+  head.d \
+  header.d \
+  help.d \
+  hostpubmd5.d \
+  hsts.d \
+  http0.9.d \
+  http1.0.d \
+  http1.1.d \
+  http2-prior-knowledge.d \
+  http2.d \
+  http3.d \
+  ignore-content-length.d \
+  include.d \
+  insecure.d \
+  interface.d \
+  ipv4.d \
+  ipv6.d \
+  junk-session-cookies.d \
+  keepalive-time.d \
+  key-type.d \
+  key.d \
+  krb.d \
+  libcurl.d \
+  limit-rate.d \
+  list-only.d \
+  local-port.d \
+  location-trusted.d \
+  location.d \
+  login-options.d \
+  mail-auth.d \
+  mail-from.d \
+  mail-rcpt-allowfails.d \
+  mail-rcpt.d \
+  manual.d \
+  max-filesize.d \
+  max-redirs.d \
+  max-time.d \
+  metalink.d \
+  negotiate.d \
+  netrc-file.d \
+  netrc-optional.d \
+  netrc.d \
+  next.d \
+  no-alpn.d \
+  no-buffer.d \
+  no-keepalive.d \
+  no-npn.d \
+  no-progress-meter.d \
+  no-sessionid.d \
+  noproxy.d \
+  ntlm-wb.d \
+  ntlm.d \
+  oauth2-bearer.d \
+  output-dir.d \
+  output.d \
+  parallel-immediate.d \
+  parallel-max.d \
+  parallel.d \
+  pass.d \
+  path-as-is.d \
+  pinnedpubkey.d \
+  post301.d \
+  post302.d \
+  post303.d \
+  preproxy.d \
+  progress-bar.d \
+  proto-default.d \
+  proto-redir.d \
+  proto.d \
+  proxy-anyauth.d \
+  proxy-basic.d \
+  proxy-cacert.d \
+  proxy-capath.d \
+  proxy-cert-type.d \
+  proxy-cert.d \
+  proxy-ciphers.d \
+  proxy-crlfile.d \
+  proxy-digest.d \
+  proxy-header.d \
+  proxy-insecure.d \
+  proxy-key-type.d \
+  proxy-key.d \
+  proxy-negotiate.d \
+  proxy-ntlm.d \
+  proxy-pass.d \
+  proxy-pinnedpubkey.d \
+  proxy-service-name.d \
+  proxy-ssl-allow-beast.d \
+  proxy-ssl-auto-client-cert.d \
+  proxy-tls13-ciphers.d \
+  proxy-tlsauthtype.d \
+  proxy-tlspassword.d \
+  proxy-tlsuser.d \
+  proxy-tlsv1.d \
+  proxy-user.d \
+  proxy.d \
+  proxy1.0.d \
+  proxytunnel.d \
+  pubkey.d \
+  quote.d \
+  random-file.d \
+  range.d \
+  raw.d \
+  referer.d \
+  remote-header-name.d \
+  remote-name-all.d \
+  remote-name.d \
+  remote-time.d \
+  request-target.d \
+  request.d \
+  resolve.d \
+  retry-all-errors.d \
+  retry-connrefused.d \
+  retry-delay.d \
+  retry-max-time.d \
+  retry.d \
+  sasl-authzid.d \
+  sasl-ir.d \
+  service-name.d \
+  show-error.d \
+  silent.d \
+  socks4.d \
+  socks4a.d \
+  socks5-basic.d \
+  socks5-gssapi-nec.d \
+  socks5-gssapi-service.d \
+  socks5-gssapi.d \
+  socks5-hostname.d \
+  socks5.d \
+  speed-limit.d \
+  speed-time.d \
+  ssl-allow-beast.d \
+  ssl-auto-client-cert.d \
+  ssl-no-revoke.d \
+  ssl-reqd.d \
+  ssl-revoke-best-effort.d \
+  ssl.d \
+  sslv2.d \
+  sslv3.d \
+  stderr.d \
+  styled-output.d \
+  suppress-connect-headers.d \
+  tcp-fastopen.d \
+  tcp-nodelay.d \
+  telnet-option.d \
+  tftp-blksize.d \
+  tftp-no-options.d \
+  time-cond.d \
+  tls-max.d \
+  tls13-ciphers.d \
+  tlsauthtype.d \
+  tlspassword.d \
+  tlsuser.d \
+  tlsv1.0.d \
+  tlsv1.1.d \
+  tlsv1.2.d \
+  tlsv1.3.d \
+  tlsv1.d \
+  tr-encoding.d \
+  trace-ascii.d \
+  trace-time.d \
+  trace.d \
+  unix-socket.d \
+  upload-file.d \
+  url.d \
+  use-ascii.d \
+  user-agent.d \
+  user.d \
+  verbose.d \
+  version.d \
+  write-out.d \
   xattr.d
 
 OTHERPAGES = page-footer page-header
diff --git a/docs/cmdline-opts/aws-sigv4.d b/docs/cmdline-opts/aws-sigv4.d
new file mode 100644
index 0000000..26546df
--- /dev/null
+++ b/docs/cmdline-opts/aws-sigv4.d
@@ -0,0 +1,17 @@
+Long: aws-sigv4
+Arg: <provider1[:provider2[:region[:service]]]>
+Help: Use AWS V4 signature authentication
+Category: auth http
+Added: 7.75.0
+---
+Use AWS V4 signature authentication in the transfer.
+
+The provider argument is a string that is used by the algorithm when creating
+outgoing authentication headers.
+
+The region argument is a string that points to a geographic area of
+a resources collection (region-code) when the region name is omitted from
+the endpoint.
+
+The service argument is a string that points to a function provided by a cloud
+(service-code) when the service name is omitted from the endpoint.
diff --git a/docs/cmdline-opts/cert-status.d b/docs/cmdline-opts/cert-status.d
index 1342b09..63e3520 100644
--- a/docs/cmdline-opts/cert-status.d
+++ b/docs/cmdline-opts/cert-status.d
@@ -1,7 +1,7 @@
 Long: cert-status
 Protocols: TLS
 Added: 7.41.0
-Help: Verify the status of the server certificate
+Help: Verify the status of the server cert via OCSP-staple
 Category: tls
 ---
 Tells curl to verify the status of the server certificate by using the
diff --git a/docs/cmdline-opts/ciphers.d b/docs/cmdline-opts/ciphers.d
index ed7438a..723b959 100644
--- a/docs/cmdline-opts/ciphers.d
+++ b/docs/cmdline-opts/ciphers.d
@@ -7,6 +7,6 @@
 Specifies which ciphers to use in the connection. The list of ciphers must
 specify valid ciphers. Read up on SSL cipher list details on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/config.d b/docs/cmdline-opts/config.d
index 2634679..1c46e41 100644
--- a/docs/cmdline-opts/config.d
+++ b/docs/cmdline-opts/config.d
@@ -19,9 +19,12 @@
 If the parameter contains whitespace (or starts with : or =), the parameter
 must be enclosed within quotes. Within double quotes, the following escape
 sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash
-preceding any other letter is ignored. If the first column of a config line is
-a '#' character, the rest of the line will be treated as a comment. Only write
-one option per physical line in the config file.
+preceding any other letter is ignored.
+
+If the first column of a config line is a '#' character, the rest of the line
+will be treated as a comment.
+
+Only write one option per physical line in the config file.
 
 Specify the filename to --config as '-' to make curl read the file from stdin.
 
@@ -29,7 +32,7 @@
 it using the --url option, and not by simply writing the URL on its own
 line. So, it could look similar to this:
 
-url = "https://curl.haxx.se/docs/"
+url = "https://curl.se/docs/"
 
 When curl is invoked, it (unless --disable is used) checks for a default
 config file and uses it if found. The default config file is checked for in
diff --git a/docs/cmdline-opts/cookie.d b/docs/cmdline-opts/cookie.d
index 5d2c9d7..5c40cf2 100644
--- a/docs/cmdline-opts/cookie.d
+++ b/docs/cmdline-opts/cookie.d
@@ -22,16 +22,12 @@
 The file specified with --cookie is only used as input. No cookies will be
 written to the file. To store cookies, use the --cookie-jar option.
 
-Exercise caution if you are using this option and multiple transfers may
-occur.  If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie
-format and don't specify a domain, then the cookie is sent for any domain
-(even after redirects are followed) and cannot be modified by a server-set
-cookie. If the cookie engine is enabled and a server sets a cookie of the same
-name then both will be sent on a future transfer to that server, likely not
-what you intended.  To address these issues set a domain in Set-Cookie (doing
-that will include sub domains) or use the Netscape format.
+If you use the Set-Cookie file format and don't specify a domain then the
+cookie is not sent since the domain will never match. To address this, set a
+domain in Set-Cookie line (doing that will include sub-domains) or preferably:
+use the Netscape format.
 
-If this option is used several times, the last one will be used.
+This option can be used multiple times.
 
 Users very often want to both read cookies from a file and write updated
 cookies back to a file, so using both --cookie and --cookie-jar in the same
diff --git a/docs/cmdline-opts/create-dirs.d b/docs/cmdline-opts/create-dirs.d
index 48a8fd4..801e95d 100644
--- a/docs/cmdline-opts/create-dirs.d
+++ b/docs/cmdline-opts/create-dirs.d
@@ -3,9 +3,10 @@
 Category: curl
 ---
 When used in conjunction with the --output option, curl will create the
-necessary local directory hierarchy as needed. This option creates the dirs
-mentioned with the --output option, nothing else. If the --output file name
-uses no dir or if the dirs it mentions already exist, no dir will be created.
+necessary local directory hierarchy as needed. This option creates the
+directories mentioned with the --output option, nothing else. If the --output
+file name uses no directory, or if the directories it mentions already exist,
+no directories will be created.
 
 Created dirs are made with mode 0750 on unix style file systems.
 
diff --git a/docs/cmdline-opts/create-file-mode.d b/docs/cmdline-opts/create-file-mode.d
new file mode 100644
index 0000000..275fc6c
--- /dev/null
+++ b/docs/cmdline-opts/create-file-mode.d
@@ -0,0 +1,15 @@
+Long: create-file-mode
+Arg: <mode>
+Help: File mode for created files
+Protocols: SFTP SCP FILE
+Category: sftp scp file upload
+See-also: ftp-create-dirs
+Added: 7.75.0
+---
+When curl is used to create files remotely using one of the supported
+protocols, this option allows the user to set which 'mode' to set on the file
+at creation time, instead of the default 0644.
+
+This option takes an octal number as argument.
+
+If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/data-urlencode.d b/docs/cmdline-opts/data-urlencode.d
index 2f2a364..2205f9d 100644
--- a/docs/cmdline-opts/data-urlencode.d
+++ b/docs/cmdline-opts/data-urlencode.d
@@ -9,7 +9,7 @@
 This posts data, similar to the other --data options with the exception
 that this performs URL-encoding.
 
-To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
+To be CGI-compliant, the <data> part should begin with a *name* followed
 by a separator and a content specification. The <data> part can be passed to
 curl using one of the following syntaxes:
 .RS
@@ -29,6 +29,6 @@
 .IP "name@filename"
 This will make curl load data from the given file (including any newlines),
 URL-encode that data and pass it on in the POST. The name part gets an equal
-sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
+sign appended, resulting in *name=urlencoded-file-content*. Note that the
 name is expected to be URL-encoded already.
 .RE
diff --git a/docs/cmdline-opts/delegation.d b/docs/cmdline-opts/delegation.d
index fa2795f..41fa940 100644
--- a/docs/cmdline-opts/delegation.d
+++ b/docs/cmdline-opts/delegation.d
@@ -15,3 +15,5 @@
 .IP "always"
 Unconditionally allow the server to delegate.
 .RE
+
+If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/disable-epsv.d b/docs/cmdline-opts/disable-epsv.d
index df1de83..dadef09 100644
--- a/docs/cmdline-opts/disable-epsv.d
+++ b/docs/cmdline-opts/disable-epsv.d
@@ -3,9 +3,9 @@
 Protocols: FTP
 Category: ftp
 ---
-(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
-transfers. Curl will normally always first attempt to use EPSV before PASV,
-but with this option, it will not try using EPSV.
+Tell curl to disable the use of the EPSV command when doing passive FTP
+transfers. Curl will normally always first attempt to use EPSV before
+PASV, but with this option, it will not try using EPSV.
 
 --epsv can be used to explicitly enable EPSV again and --no-epsv is an alias
 for --disable-epsv.
diff --git a/docs/cmdline-opts/disable.d b/docs/cmdline-opts/disable.d
index 688fc0c..d909608 100644
--- a/docs/cmdline-opts/disable.d
+++ b/docs/cmdline-opts/disable.d
@@ -3,6 +3,6 @@
 Help: Disable .curlrc
 Category: curl
 ---
-If used as the first parameter on the command line, the \fIcurlrc\fP config
+If used as the first parameter on the command line, the *curlrc* config
 file will not be read and used. See the --config for details on the default
 config file search path.
diff --git a/docs/cmdline-opts/dns-ipv4-addr.d b/docs/cmdline-opts/dns-ipv4-addr.d
index 5ebdda5..0d7bae6 100644
--- a/docs/cmdline-opts/dns-ipv4-addr.d
+++ b/docs/cmdline-opts/dns-ipv4-addr.d
@@ -10,3 +10,5 @@
 Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
 the DNS requests originate from this address. The argument should be a
 single IPv4 address.
+
+If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/dns-ipv6-addr.d b/docs/cmdline-opts/dns-ipv6-addr.d
index 10e8076..a964dbb 100644
--- a/docs/cmdline-opts/dns-ipv6-addr.d
+++ b/docs/cmdline-opts/dns-ipv6-addr.d
@@ -10,3 +10,5 @@
 Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
 the DNS requests originate from this address. The argument should be a
 single IPv6 address.
+
+If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/dns-servers.d b/docs/cmdline-opts/dns-servers.d
index 8665426..a0954b3 100644
--- a/docs/cmdline-opts/dns-servers.d
+++ b/docs/cmdline-opts/dns-servers.d
@@ -7,5 +7,7 @@
 ---
 Set the list of DNS servers to be used instead of the system default.
 The list of IP addresses should be separated with commas. Port numbers
-may also optionally be given as \fI:<port-number>\fP after each IP
+may also optionally be given as *:<port-number>* after each IP
 address.
+
+If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/doh-cert-status.d b/docs/cmdline-opts/doh-cert-status.d
new file mode 100644
index 0000000..1442fc8
--- /dev/null
+++ b/docs/cmdline-opts/doh-cert-status.d
@@ -0,0 +1,7 @@
+Long: doh-cert-status
+Help: Verify the status of the DoH server cert via OCSP-staple
+Protocols: all
+Added: 7.76.0
+Category: dns tls
+---
+Same as --cert-status but used for DoH (DNS-over-HTTPS).
diff --git a/docs/cmdline-opts/doh-insecure.d b/docs/cmdline-opts/doh-insecure.d
new file mode 100644
index 0000000..fe399a2
--- /dev/null
+++ b/docs/cmdline-opts/doh-insecure.d
@@ -0,0 +1,7 @@
+Long: doh-insecure
+Help: Allow insecure DoH server connections
+Protocols: all
+Added: 7.76.0
+Category: dns tls
+---
+Same as --insecure but used for DoH (DNS-over-HTTPS).
diff --git a/docs/cmdline-opts/doh-url.d b/docs/cmdline-opts/doh-url.d
index 7fce446..612945a 100644
--- a/docs/cmdline-opts/doh-url.d
+++ b/docs/cmdline-opts/doh-url.d
@@ -1,11 +1,16 @@
 Long: doh-url
 Arg: <URL>
-Help: Resolve host names over DOH
+Help: Resolve host names over DoH
 Protocols: all
 Added: 7.62.0
 Category: dns
 ---
-Specifies which DNS-over-HTTPS (DOH) server to use to resolve hostnames,
+Specifies which DNS-over-HTTPS (DoH) server to use to resolve hostnames,
 instead of using the default name resolver mechanism. The URL must be HTTPS.
 
+Some SSL options that you set for your transfer will apply to DoH since the
+name lookups take place over SSL. However, the certificate verification
+settings are not inherited and can be controlled separately via
+--doh-insecure and --doh-cert-status.
+
 If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/dump-header.d b/docs/cmdline-opts/dump-header.d
index 8449dfe..aa3bd9e 100644
--- a/docs/cmdline-opts/dump-header.d
+++ b/docs/cmdline-opts/dump-header.d
@@ -6,14 +6,8 @@
 See-also: output
 Category: http ftp
 ---
-Write the received protocol headers to the specified file.
-
-This option is handy to use when you want to store the headers that an HTTP
-site sends to you. Cookies from the headers could then be read in a second
-curl invocation by using the --cookie option! The --cookie-jar option is a
-better way to store cookies.
-
-If no headers are received, the use of this option will create an empty file.
+Write the received protocol headers to the specified file. If no headers are
+received, the use of this option will create an empty file.
 
 When used in FTP, the FTP server response lines are considered being "headers"
 and thus are saved there.
diff --git a/docs/cmdline-opts/engine.d b/docs/cmdline-opts/engine.d
index 9ed0cf1..034796c 100644
--- a/docs/cmdline-opts/engine.d
+++ b/docs/cmdline-opts/engine.d
@@ -5,5 +5,5 @@
 Category: tls
 ---
 Select the OpenSSL crypto engine to use for cipher operations. Use --engine
-list to print a list of build-time supported engines. Note that not all (or
-none) of the engines may be available at run-time.
+list to print a list of build-time supported engines. Note that not all (and
+possibly none) of the engines may be available at run-time.
diff --git a/docs/cmdline-opts/etag-compare.d b/docs/cmdline-opts/etag-compare.d
index cbf48ac..c984cc9 100644
--- a/docs/cmdline-opts/etag-compare.d
+++ b/docs/cmdline-opts/etag-compare.d
@@ -5,15 +5,14 @@
 Added: 7.68.0
 Category: http
 ---
-This option makes a conditional HTTP request for the specific
-ETag read from the given file by sending a custom If-None-Match
-header using the extracted ETag.
+This option makes a conditional HTTP request for the specific ETag read
+from the given file by sending a custom If-None-Match header using the
+stored ETag.
 
-For correct results, make sure that specified file contains only a single
-line with a desired ETag. An empty file is parsed as an empty ETag.
+For correct results, make sure that the specified file contains only a
+single line with the desired ETag. An empty file is parsed as an empty
+ETag.
 
 Use the option --etag-save to first save the ETag from a response, and
-then use this option to compare using the saved ETag in a subsequent request.
-
-\fCOMPARISON\fP: There are 2 types of comparison or ETags, Weak and Strong.
-This option expects, and uses a strong comparison.
+then use this option to compare against the saved ETag in a subsequent
+request.
diff --git a/docs/cmdline-opts/etag-save.d b/docs/cmdline-opts/etag-save.d
index 82e6dfa..dc2484c 100644
--- a/docs/cmdline-opts/etag-save.d
+++ b/docs/cmdline-opts/etag-save.d
@@ -5,13 +5,7 @@
 Added: 7.68.0
 Category: http
 ---
-This option saves an HTTP ETag to the specified file. Etag is
-usually part of headers returned by a request. When server sends an
-ETag, it must be enveloped by a double quote. This option extracts the
-ETag without the double quotes and saves it into the <file>.
+This option saves an HTTP ETag to the specified file. An ETag is a
+caching related header, usually returned in a response.
 
-A server can send a week ETag which is prefixed by "W/". This identifier
-is not considered, and only relevant ETag between quotation marks is parsed.
-
-It an ETag wasn't send by the server or it cannot be parsed, and empty
-file is created.
+If no ETag is sent by the server, an empty file is created.
diff --git a/docs/cmdline-opts/fail-with-body.d b/docs/cmdline-opts/fail-with-body.d
new file mode 100644
index 0000000..13609ff
--- /dev/null
+++ b/docs/cmdline-opts/fail-with-body.d
@@ -0,0 +1,16 @@
+Long: fail-with-body
+Protocols: HTTP
+Help: Fail on HTTP errors but save the body
+Category: http output
+Added: 7.76.0
+See-also: fail
+---
+
+Return an error on server errors where the HTTP response code is 400 or
+greater). In normal cases when an HTTP server fails to deliver a document, it
+returns an HTML document stating so (which often also describes why and
+more). This flag will still allow curl to output and save that content but
+also to return error 22.
+
+This is an alternative option to --fail which makes curl fail for the same
+circumstances but without saving the content.
diff --git a/docs/cmdline-opts/fail.d b/docs/cmdline-opts/fail.d
index 7fc76fb..d4d65fb 100644
--- a/docs/cmdline-opts/fail.d
+++ b/docs/cmdline-opts/fail.d
@@ -2,10 +2,11 @@
 Short: f
 Protocols: HTTP
 Help: Fail silently (no output at all) on HTTP errors
+See-also: fail-with-body
 Category: important http
 ---
 Fail silently (no output at all) on server errors. This is mostly done to
-better enable scripts etc to better deal with failed attempts. In normal cases
+enable scripts etc to better deal with failed attempts. In normal cases
 when an HTTP server fails to deliver a document, it returns an HTML document
 stating so (which often also describes why and more). This flag will prevent
 curl from outputting that and return error 22.
diff --git a/docs/cmdline-opts/form.d b/docs/cmdline-opts/form.d
index 3cd8dce..eec9aac 100644
--- a/docs/cmdline-opts/form.d
+++ b/docs/cmdline-opts/form.d
@@ -10,7 +10,7 @@
 user has pressed the submit button. This causes curl to POST data using the
 Content-Type multipart/form-data according to RFC 2388.
 
-For SMTP and IMAP protocols, this is the mean to compose a multipart mail
+For SMTP and IMAP protocols, this is the means to compose a multipart mail
 message to transmit.
 
 This enables uploading of binary files etc. To force the 'content' part to be
@@ -59,11 +59,11 @@
 
 If filename/path contains ',' or ';', it must be quoted by double-quotes like:
 
- curl -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" example.com
+ curl -F "file=@\\"local,file\\";filename=\\"name;in;post\\"" example.com
 
 or
 
- curl -F 'file=@"localfile";filename="nameinpost"' example.com
+ curl -F 'file=@"local,file";filename="name;in;post"' example.com
 
 Note that if a filename/path is quoted by double-quotes, any double-quote
 or backslash within the filename must be escaped by backslash.
@@ -121,11 +121,11 @@
       -F '=)' -F '=@textfile.txt' ...  smtp://example.com
 
 Data can be encoded for transfer using encoder=. Available encodings are
-\fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding
-Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters
-with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes
-data according to the corresponding schemes, limiting lines length to
-76 characters.
+*binary* and *8bit* that do nothing else than adding the corresponding
+Content-Transfer-Encoding header, *7bit* that only rejects 8-bit characters
+with a transfer error, *quoted-printable* and *base64* that encodes data
+according to the corresponding schemes, limiting lines length to 76
+characters.
 
 Example: send multipart mail with a quoted-printable text message and a
 base64 attached file:
diff --git a/docs/cmdline-opts/ftp-skip-pasv-ip.d b/docs/cmdline-opts/ftp-skip-pasv-ip.d
index d6fd458..bcf4e7e 100644
--- a/docs/cmdline-opts/ftp-skip-pasv-ip.d
+++ b/docs/cmdline-opts/ftp-skip-pasv-ip.d
@@ -10,4 +10,6 @@
 will re-use the same IP address it already uses for the control
 connection.
 
+Since curl 7.74.0 this option is enabled by default.
+
 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl
index 3fec164..e651f02 100755
--- a/docs/cmdline-opts/gen.pl
+++ b/docs/cmdline-opts/gen.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -63,6 +63,12 @@
 sub printdesc {
     my @desc = @_;
     for my $d (@desc) {
+        if($d !~ /^.\\"/) {
+            # **bold**
+            $d =~ s/\*\*([^ ]*)\*\*/\\fB$1\\fP/g;
+            # *italics*
+            $d =~ s/\*([^ ]*)\*/\\fI$1\\fP/g;
+        }
         # skip lines starting with space (examples)
         if($d =~ /^[^ ]/) {
             for my $k (keys %optlong) {
@@ -70,6 +76,9 @@
                 $d =~ s/--$k([^a-z0-9_-])/$l$1/;
             }
         }
+        # quote "bare" minuses in the output
+        $d =~ s/( |\\fI|^)--/$1\\-\\-/g;
+        $d =~ s/([ -]|\\fI|^)-/$1\\-/g;
         print $d;
     }
 }
@@ -169,10 +178,12 @@
         }
         elsif(/^---/) {
             if(!$long) {
-                print STDERR "WARN: no 'Long:' in $f\n";
+                print STDERR "ERROR: no 'Long:' in $f\n";
+                exit 1;
             }
             if(!$category) {
-                print STDERR "WARN: no 'Category:' in $f\n";
+                print STDERR "ERROR: no 'Category:' in $f\n";
+                exit 2;
             }
             last;
         }
@@ -201,6 +212,9 @@
         $opt .= " $arg";
     }
 
+    # quote "bare" minuses in opt
+    $opt =~ s/( |^)--/$1\\-\\-/g;
+    $opt =~ s/( |^)-/$1\\-/g;
     if($standalone) {
         print ".TH curl 1 \"30 Nov 2016\" \"curl 7.52.0\" \"curl manual\"\n";
         print ".SH OPTION\n";
@@ -367,8 +381,11 @@
 
         my $line = sprintf "  {\"%s\",\n   \"%s\",\n   %s},\n", $opt, $desc, $bitmask;
 
-        if(length($opt) + length($desc) > 78) {
-            print STDERR "WARN: the --$long line is too long\n";
+        if(length($opt) > 78) {
+            print STDERR "WARN: the --$long name is too long\n";
+        }
+        elsif(length($desc) > 78) {
+            print STDERR "WARN: the --$long description is too long\n";
         }
         print $line;
     }
diff --git a/docs/cmdline-opts/globoff.d b/docs/cmdline-opts/globoff.d
index 4b5f30d..1db0fa2 100644
--- a/docs/cmdline-opts/globoff.d
+++ b/docs/cmdline-opts/globoff.d
@@ -4,6 +4,6 @@
 Category: curl
 ---
 This option switches off the "URL globbing parser". When you set this option,
-you can specify URLs that contain the letters {}[] without having them being
-interpreted by curl itself. Note that these letters are not normal legal URL
-contents but they should be encoded according to the URI standard.
+you can specify URLs that contain the letters {}[] without having curl itself
+interpret them. Note that these letters are not normal legal URL contents but
+they should be encoded according to the URI standard.
diff --git a/docs/cmdline-opts/header.d b/docs/cmdline-opts/header.d
index e841689..121285a 100644
--- a/docs/cmdline-opts/header.d
+++ b/docs/cmdline-opts/header.d
@@ -4,6 +4,7 @@
 Help: Pass custom header(s) to server
 Protocols: HTTP
 Category: http
+See-also: user-agent referer
 ---
 Extra header to include in the request when sending HTTP to a server. You may
 specify any number of extra headers. Note that if you should add a custom
@@ -17,24 +18,25 @@
 as \-H \&"X-Custom-Header;" to send "X-Custom-Header:".
 
 curl will make sure that each header you add/replace is sent with the proper
-end-of-line marker, you should thus \fBnot\fP add that as a part of the header
-content: do not add newlines or carriage returns, they will only mess things up
-for you.
+end-of-line marker, you should thus **not** add that as a part of the header
+content: do not add newlines or carriage returns, they will only mess things
+up for you.
 
-Starting in 7.55.0, this option can take an argument in @filename style, which
-then adds a header for each line in the input file. Using @- will make curl
-read the header file from stdin.
+This option can take an argument in @filename style, which then adds a header
+for each line in the input file. Using @- will make curl read the header file
+from stdin. Added in 7.55.0.
 
-See also the --user-agent and --referer options.
+You need --proxy-header to send custom headers intended for a HTTP
+proxy. Added in 7.37.0.
 
-Starting in 7.37.0, you need --proxy-header to send custom headers intended
-for a proxy.
+Passing on a "Transfer-Encoding: chunked" header when doing a HTTP request
+with a request body, will make curl send the data using chunked encoding.
 
 Example:
 
  curl -H "X-First-Name: Joe" http://example.com/
 
-\fBWARNING\fP: headers set with this option will be set in all requests - even
+**WARNING**: headers set with this option will be set in all requests - even
 after redirects are followed, like when told with --location. This can lead to
 the header being sent to other hosts than the original host, so sensitive
 headers should be used with caution combined with following redirects.
diff --git a/docs/cmdline-opts/help.d b/docs/cmdline-opts/help.d
index bf80b78..b7c6823 100644
--- a/docs/cmdline-opts/help.d
+++ b/docs/cmdline-opts/help.d
@@ -6,7 +6,7 @@
 ---
 Usage help. This lists all commands of the <category>.
 If no arg was provided, curl will display the most important
-command line arguments and the list of categories.
+command line arguments.
 If the argument "all" was provided, curl will display all options available.
 If the argument "category" was provided, curl will display all categories and
 their meanings.
diff --git a/docs/cmdline-opts/hsts.d b/docs/cmdline-opts/hsts.d
new file mode 100644
index 0000000..2399084
--- /dev/null
+++ b/docs/cmdline-opts/hsts.d
@@ -0,0 +1,18 @@
+Long: hsts
+Arg: <file name>
+Protocols: HTTPS
+Help: Enable HSTS with this cache file
+Added: 7.74.0
+Category: http
+---
+WARNING: this option is experimental. Do not use in production.
+
+This option enables HSTS for the transfer. If the file name points to an
+existing HSTS cache file, that will be used. After a completed transfer, the
+cache will be saved to the file name again if it has been modified.
+
+Specify a "" file name (zero length) to avoid loading/saving and make curl
+just handle HSTS in memory.
+
+If this option is used several times, curl will load contents from all the
+files but the last one will be used for saving.
diff --git a/docs/cmdline-opts/http3.d b/docs/cmdline-opts/http3.d
index 478b662..8e3c301 100644
--- a/docs/cmdline-opts/http3.d
+++ b/docs/cmdline-opts/http3.d
@@ -13,7 +13,7 @@
 
 Tells curl to use HTTP version 3 directly to the host and port number used in
 the URL. A normal HTTP/3 transaction will be done to a host and then get
-redirected via Alt-SVc, but this option allows a user to circumvent that when
+redirected via Alt-Svc, but this option allows a user to circumvent that when
 you know that the target speaks HTTP/3 on the given host and port.
 
 This option will make curl fail if a QUIC connection cannot be established, it
diff --git a/docs/cmdline-opts/ignore-content-length.d b/docs/cmdline-opts/ignore-content-length.d
index 82ac5da..cec990a 100644
--- a/docs/cmdline-opts/ignore-content-length.d
+++ b/docs/cmdline-opts/ignore-content-length.d
@@ -9,3 +9,5 @@
 
 For FTP (since 7.46.0), skip the RETR command to figure out the size before
 downloading a file.
+
+This option doesn't work if libcurl was built to use hyper for HTTP.
diff --git a/docs/cmdline-opts/insecure.d b/docs/cmdline-opts/insecure.d
index 35f4a2e..636f121 100644
--- a/docs/cmdline-opts/insecure.d
+++ b/docs/cmdline-opts/insecure.d
@@ -14,4 +14,4 @@
 contains the right name and verifies successfully using the cert store.
 
 See this online resource for further details:
- https://curl.haxx.se/docs/sslcerts.html
+ https://curl.se/docs/sslcerts.html
diff --git a/docs/cmdline-opts/libcurl.d b/docs/cmdline-opts/libcurl.d
index eb9850c..60921f5 100644
--- a/docs/cmdline-opts/libcurl.d
+++ b/docs/cmdline-opts/libcurl.d
@@ -4,7 +4,7 @@
 Added: 7.16.1
 Category: curl
 ---
-Append this option to any ordinary curl command line, and you will get a
+Append this option to any ordinary curl command line, and you will get
 libcurl-using C source code written to the file that does the equivalent
 of what your command-line operation does!
 
diff --git a/docs/cmdline-opts/list-only.d b/docs/cmdline-opts/list-only.d
index c698858..ac39906 100644
--- a/docs/cmdline-opts/list-only.d
+++ b/docs/cmdline-opts/list-only.d
@@ -9,7 +9,7 @@
 When listing an FTP directory, this switch forces a name-only view. This is
 especially useful if the user wants to machine-parse the contents of an FTP
 directory since the normal directory view doesn't use a standard look or
-format. When used like this, the option causes a NLST command to be sent to
+format. When used like this, the option causes an NLST command to be sent to
 the server instead of LIST.
 
 Note: Some FTP servers list only files in their response to NLST; they do not
@@ -18,8 +18,8 @@
 (POP3)
 When retrieving a specific email from POP3, this switch forces a LIST command
 to be performed instead of RETR. This is particularly useful if the user wants
-to see if a specific message id exists on the server and what size it is.
+to see if a specific message-id exists on the server and what size it is.
 
-Note: When combined with --request, this option can be used to send an UIDL
+Note: When combined with --request, this option can be used to send a UIDL
 command instead, so the user may use the email's unique identifier rather than
-it's message id to make the request.
+its message-id to make the request.
diff --git a/docs/cmdline-opts/login-options.d b/docs/cmdline-opts/login-options.d
index 887d5d5..b122468 100644
--- a/docs/cmdline-opts/login-options.d
+++ b/docs/cmdline-opts/login-options.d
@@ -7,9 +7,9 @@
 ---
 Specify the login options to use during server authentication.
 
-You can use the login options to specify protocol specific options that may
-be used during authentication. At present only IMAP, POP3 and SMTP support
-login options. For more information about the login options please see
-RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
+You can use login options to specify protocol specific options that may be
+used during authentication. At present only IMAP, POP3 and SMTP support
+login options. For more information about login options please see RFC
+2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
 
 If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/max-filesize.d b/docs/cmdline-opts/max-filesize.d
index 1f6bdc6..2f82998 100644
--- a/docs/cmdline-opts/max-filesize.d
+++ b/docs/cmdline-opts/max-filesize.d
@@ -12,6 +12,6 @@
 number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
 gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
 
-\fBNOTE:\fP The file size is not always known prior to download, and for such
-files this option has no effect even if the file transfer ends up being larger
-than this given limit. This concerns both FTP and HTTP transfers.
+**NOTE**: For protocols where the size is not known in advance (including FTP
+and HTTP) this option has no effect even if the file transfer ends up being
+larger than the given limit.
diff --git a/docs/cmdline-opts/max-redirs.d b/docs/cmdline-opts/max-redirs.d
index ba16c43..1b5de5b 100644
--- a/docs/cmdline-opts/max-redirs.d
+++ b/docs/cmdline-opts/max-redirs.d
@@ -4,8 +4,8 @@
 Protocols: HTTP
 Category: http
 ---
-Set maximum number of redirection-followings allowed. When --location is used,
-is used to prevent curl from following redirections too much. By default, the
-limit is set to 50 redirections. Set this option to -1 to make it unlimited.
+Set maximum number of redirections to follow. When --location is used, to
+prevent curl from following too many redirects, by default, the limit is
+set to 50 redirects. Set this option to -1 to make it unlimited.
 
 If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/metalink.d b/docs/cmdline-opts/metalink.d
index 8837664..4725b38 100644
--- a/docs/cmdline-opts/metalink.d
+++ b/docs/cmdline-opts/metalink.d
@@ -1,27 +1,7 @@
 Long: metalink
 Help: Process given URLs as metalink XML file
 Added: 7.27.0
-Requires: metalink
 Category: misc
 ---
-This option can tell curl to parse and process a given URI as Metalink file
-(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
-listed within for failover if there are errors (such as the file or server not
-being available). It will also verify the hash of the file after the download
-completes. The Metalink file itself is downloaded and processed in memory and
-not stored in the local file system.
-
-Example to use a remote Metalink file:
-
- curl --metalink http://www.example.com/example.metalink
-
-To use a Metalink file in the local file system, use FILE protocol (file://):
-
- curl --metalink file://example.metalink
-
-Please note that if FILE protocol is disabled, there is no way to use a local
-Metalink file at the time of this writing. Also note that if --metalink and
---include are used together, --include will be ignored. This is because
-including headers in the response will break Metalink parser and if the
-headers are included in the file described in Metalink file, hash check will
-fail.
+This option was previously used to specify a metalink resource. Metalink
+support has been disabled in curl since 7.78.0 for security reasons.
diff --git a/docs/cmdline-opts/netrc-optional.d b/docs/cmdline-opts/netrc-optional.d
index fa92032..e0b59d1 100644
--- a/docs/cmdline-opts/netrc-optional.d
+++ b/docs/cmdline-opts/netrc-optional.d
@@ -4,5 +4,5 @@
 See-also: netrc-file
 Category: curl
 ---
-Very similar to --netrc, but this option makes the .netrc usage \fBoptional\fP
+Very similar to --netrc, but this option makes the .netrc usage **optional**
 and not mandatory as the --netrc option does.
diff --git a/docs/cmdline-opts/netrc.d b/docs/cmdline-opts/netrc.d
index 6aac568..a31e2ed 100644
--- a/docs/cmdline-opts/netrc.d
+++ b/docs/cmdline-opts/netrc.d
@@ -3,15 +3,15 @@
 Help: Must read .netrc for user name and password
 Category: curl
 ---
-Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
-home directory for login name and password. This is typically used for FTP on
+Makes curl scan the *.netrc* (*_netrc* on Windows) file in the user's home
+directory for login name and password. This is typically used for FTP on
 Unix. If used with HTTP, curl will enable user authentication. See
-\fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
-complain if that file doesn't have the right permissions (it should not be
-either world- or group-readable). The environment variable "HOME" is used to
-find the home directory.
+*netrc(5)* and *ftp(1)* for details on the file format. Curl will not
+complain if that file doesn't have the right permissions (it should be
+neither world- nor group-readable). The environment variable "HOME" is used
+to find the home directory.
 
-A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
+A quick and very simple example of how to setup a *.netrc* to allow curl
 to FTP to the machine host.domain.com with user name \&'myself' and password
 \&'secret' should look similar to:
 
diff --git a/docs/cmdline-opts/noproxy.d b/docs/cmdline-opts/noproxy.d
index 12ce6d3..c49e6d1 100644
--- a/docs/cmdline-opts/noproxy.d
+++ b/docs/cmdline-opts/noproxy.d
@@ -4,13 +4,13 @@
 Added: 7.19.4
 Category: proxy
 ---
-Comma-separated list of hosts which do not use a proxy, if one is specified.
-The only wildcard is a single * character, which matches all hosts, and
-effectively disables the proxy. Each name in this list is matched as either
-a domain which contains the hostname, or the hostname itself. For example,
-local.com would match local.com, local.com:80, and www.local.com, but not
-www.notlocal.com.
+Comma-separated list of hosts for which not to use a proxy, if one is
+specified. The only wildcard is a single * character, which matches all hosts,
+and effectively disables the proxy. Each name in this list is matched as
+either a domain which contains the hostname, or the hostname itself. For
+example, local.com would match local.com, local.com:80, and www.local.com, but
+not www.notlocal.com.
 
 Since 7.53.0, This option overrides the environment variables that disable the
-proxy. If there's an environment variable disabling a proxy, you can set
-noproxy list to \&"" to override it.
+proxy ('no_proxy' and 'NO_PROXY'). If there's an environment variable
+disabling a proxy, you can set the noproxy list to \&"" to override it.
diff --git a/docs/cmdline-opts/page-footer b/docs/cmdline-opts/page-footer
index 479c712..c88cd5f 100644
--- a/docs/cmdline-opts/page-footer
+++ b/docs/cmdline-opts/page-footer
@@ -17,7 +17,7 @@
 .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
 Sets the proxy server to use for [url-protocol], where the protocol is a
 protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
-SMTP, LDAP etc.
+SMTP, LDAP, etc.
 .IP "ALL_PROXY [protocol://]<host>[:port]"
 Sets the proxy server to use if no protocol-specific proxy is set.
 .IP "NO_PROXY <comma-separated list of hosts/domains>"
@@ -44,8 +44,11 @@
 If curl was built with support for "MultiSSL", meaning that it has built-in
 support for more than one TLS backend, this environment variable can be set to
 the case insensitive name of the particular backend to use when curl is
-invoked. Setting a name that isn't a built-in alternative, will make curl
+invoked. Setting a name that isn't a built-in alternative will make curl
 stay with the default.
+
+SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
+mesalink, nss, openssl, rustls, schannel, secure-transport, wolfssl
 .IP "QLOGDIR <directory name>"
 If curl was built with HTTP/3 support, setting this environment variable to a
 local directory will make curl produce qlogs in that directory, using file
@@ -68,7 +71,7 @@
 .IP "http://"
 Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
 .IP "https://"
-Makes it treated as an \fBHTTPS\fP proxy.
+Makes it treated as an **HTTPS** proxy.
 .IP "socks4://"
 Makes it the equivalent of --socks4
 .IP "socks4a://"
@@ -79,7 +82,7 @@
 Makes it the equivalent of --socks5-hostname
 .SH EXIT CODES
 There are a bunch of different error codes and their corresponding error
-messages that may appear during bad conditions. At the time of this writing,
+messages that may appear under error conditions. At the time of this writing,
 the exit codes are:
 .IP 1
 Unsupported protocol. This build of curl has no support for this protocol.
@@ -94,7 +97,7 @@
 .IP 5
 Couldn't resolve proxy. The given proxy host could not be resolved.
 .IP 6
-Couldn't resolve host. The given remote host was not resolved.
+Couldn't resolve host. The given remote host could not be resolved.
 .IP 7
 Failed to connect to host.
 .IP 8
@@ -234,7 +237,7 @@
 .IP 76
 Character conversion functions required.
 .IP 77
-Problem with reading the SSL CA cert (path? access rights?).
+Problem reading the SSL CA cert (path? access rights?).
 .IP 78
 The resource referenced in the URL does not exist.
 .IP 79
@@ -246,19 +249,19 @@
 .IP 83
 Issuer check failed (added in 7.19.0).
 .IP 84
-The FTP PRET command failed
+The FTP PRET command failed.
 .IP 85
-RTSP: mismatch of CSeq numbers
+Mismatch of RTSP CSeq numbers.
 .IP 86
-RTSP: mismatch of Session Identifiers
+Mismatch of RTSP Session Identifiers.
 .IP 87
-unable to parse FTP file list
+Unable to parse FTP file list.
 .IP 88
-FTP chunk callback reported error
+FTP chunk callback reported error.
 .IP 89
-No connection available, the session will be queued
+No connection available, the session will be queued.
 .IP 90
-SSL public key does not matched pinned public key
+SSL public key does not matched pinned public key.
 .IP 91
 Invalid SSL certificate status.
 .IP 92
@@ -280,7 +283,7 @@
 Daniel Stenberg is the main author, but the whole list of contributors is
 found in the separate THANKS file.
 .SH WWW
-https://curl.haxx.se
+https://curl.se
 .SH "SEE ALSO"
 .BR ftp (1),
 .BR wget (1)
diff --git a/docs/cmdline-opts/page-header b/docs/cmdline-opts/page-header
index a51e485..f96ed65 100644
--- a/docs/cmdline-opts/page-header
+++ b/docs/cmdline-opts/page-header
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -32,16 +32,16 @@
 is a tool to transfer data from or to a server, using one of the supported
 protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
 LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP,
-SMTPS, TELNET and TFTP). The command is designed to work without user
+SMTPS, TELNET or TFTP). The command is designed to work without user
 interaction.
 
 curl offers a busload of useful tricks like proxy support, user
 authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
-resume, Metalink, and more. As you will see below, the number of features will
-make your head spin!
+resume and more. As you will see below, the number of features will make your
+head spin!
 
 curl is powered by libcurl for all transfer-related features. See
-\fIlibcurl(3)\fP for details.
+*libcurl(3)* for details.
 .SH URL
 The URL syntax is protocol-dependent. You'll find a detailed description in
 RFC 3986.
@@ -92,13 +92,22 @@
 
 curl will do its best to use what you pass to it as a URL. It is not trying to
 validate it as a syntactically correct URL by any means but is instead
-\fBvery\fP liberal with what it accepts.
+**very** liberal with what it accepts.
 
 curl will attempt to re-use connections for multiple file transfers, so that
 getting many files from the same server will not do multiple connects /
 handshakes. This improves speed. Of course this is only done on files
 specified on a single command line and cannot be used between separate curl
-invokes.
+invocations.
+.SH OUTPUT
+If not told otherwise, curl writes the received data to stdout. It can be
+instructed to instead save that data into a local file, using the --output or
+--remote-name options. If curl is given multiple URLs to transfer on the
+command line, it similarly needs multiple options for where to save them.
+
+curl does not parse or otherwise "understand" the content it gets or writes as
+output. It does no encoding or decoding, unless explicitly asked to with
+dedicated command line options.
 .SH PROTOCOLS
 curl supports numerous protocols, or put in URL terms: schemes. Your
 particular build may not support them all.
@@ -106,7 +115,7 @@
 Lets you lookup words using online dictionaries.
 .IP FILE
 Read or write local files. curl does not support accessing file:// URL
-remotely, but when running on Microsft Windows using the native UNC approach
+remotely, but when running on Microsoft Windows using the native UNC approach
 will work.
 .IP FTP(S)
 curl supports the File Transfer Protocol with a lot of tweaks and levers. With
@@ -157,15 +166,15 @@
 
 curl displays this data to the terminal by default, so if you invoke curl to
 do an operation and it is about to write data to the terminal, it
-\fIdisables\fP the progress meter as otherwise it would mess up the output
+*disables* the progress meter as otherwise it would mess up the output
 mixing progress meter and response data.
 
 If you want a progress meter for HTTP POST or PUT requests, you need to
 redirect the response output to a file, using shell redirect (>), --output or
 similar.
 
-It is not the same case for FTP upload as that operation does not spit out
-any response data to the terminal.
+This does not apply to FTP upload as that operation does not spit out any
+response data to the terminal.
 
 If you prefer a progress "bar" instead of the regular meter, --progress-bar is
 your friend. You can also disable the progress meter completely with the
@@ -183,9 +192,9 @@
 immediately next to each other, like for example you can specify all the
 options -O, -L and -v at once as -OLv.
 
-In general, all boolean options are enabled with --\fBoption\fP and yet again
-disabled with --\fBno-\fPoption. That is, you use the exact same option name
+In general, all boolean options are enabled with --**option** and yet again
+disabled with --**no-**option. That is, you use the exact same option name
 but prefix it with "no-". However, in this list we mostly only list and show
 the --option version of them. (This concept with --no options was added in
-7.19.0. Previously most options were toggled on/off on repeated use of the
-same command line option.)
+7.19.0. Previously most options were toggled on/off through repeated use of
+the same command line option.)
diff --git a/docs/cmdline-opts/parallel-max.d b/docs/cmdline-opts/parallel-max.d
index d49aeb7..c265b72 100644
--- a/docs/cmdline-opts/parallel-max.d
+++ b/docs/cmdline-opts/parallel-max.d
@@ -1,4 +1,5 @@
 Long: parallel-max
+Arg: <num>
 Help: Maximum concurrency for parallel transfers
 Added: 7.66.0
 See-also: parallel
diff --git a/docs/cmdline-opts/pass.d b/docs/cmdline-opts/pass.d
index f6633d2..e3fb97a 100644
--- a/docs/cmdline-opts/pass.d
+++ b/docs/cmdline-opts/pass.d
@@ -4,6 +4,6 @@
 Protocols: SSH TLS
 Category: ssh tls auth
 ---
-Passphrase for the private key
+Passphrase for the private key.
 
 If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/pinnedpubkey.d b/docs/cmdline-opts/pinnedpubkey.d
index 617252c..4e0ed5e 100644
--- a/docs/cmdline-opts/pinnedpubkey.d
+++ b/docs/cmdline-opts/pinnedpubkey.d
@@ -15,12 +15,19 @@
 abort the connection before sending or receiving any data.
 
 PEM/DER support:
-  7.39.0: OpenSSL, GnuTLS and GSKit
-  7.43.0: NSS and wolfSSL
-  7.47.0: mbedtls
+
+7.39.0: OpenSSL, GnuTLS and GSKit
+
+7.43.0: NSS and wolfSSL
+
+7.47.0: mbedtls
+
 sha256 support:
-  7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
-  7.47.0: mbedtls
+
+7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
+
+7.47.0: mbedtls
+
 Other SSL backends not supported.
 
 If this option is used several times, the last one will be used.
diff --git a/docs/cmdline-opts/post301.d b/docs/cmdline-opts/post301.d
index 9cc2ad0..64ead05 100644
--- a/docs/cmdline-opts/post301.d
+++ b/docs/cmdline-opts/post301.d
@@ -6,7 +6,7 @@
 Category: http post
 ---
 Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET
-requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
+requests when following a 301 redirection. The non-RFC behavior is ubiquitous
 in web browsers, so curl does the conversion by default to maintain
 consistency. However, a server may require a POST to remain a POST after such
 a redirection. This option is meaningful only when using --location.
diff --git a/docs/cmdline-opts/post302.d b/docs/cmdline-opts/post302.d
index 0274903..d73cb9d 100644
--- a/docs/cmdline-opts/post302.d
+++ b/docs/cmdline-opts/post302.d
@@ -6,7 +6,7 @@
 Category: http post
 ---
 Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET
-requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
+requests when following a 302 redirection. The non-RFC behavior is ubiquitous
 in web browsers, so curl does the conversion by default to maintain
 consistency. However, a server may require a POST to remain a POST after such
 a redirection. This option is meaningful only when using --location.
diff --git a/docs/cmdline-opts/proto-default.d b/docs/cmdline-opts/proto-default.d
index 1c2afea..74d3932 100644
--- a/docs/cmdline-opts/proto-default.d
+++ b/docs/cmdline-opts/proto-default.d
@@ -4,14 +4,14 @@
 Added: 7.45.0
 Category: connection curl
 ---
-Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
+Tells curl to use *protocol* for any URL missing a scheme name.
 
 Example:
 
  curl --proto-default https ftp.mozilla.org
 
 An unknown or unsupported protocol causes error
-\fICURLE_UNSUPPORTED_PROTOCOL\fP (1).
+*CURLE_UNSUPPORTED_PROTOCOL* (1).
 
 This option does not change the default proxy protocol (http).
 
diff --git a/docs/cmdline-opts/proto-redir.d b/docs/cmdline-opts/proto-redir.d
index 9a096f5..10580ad 100644
--- a/docs/cmdline-opts/proto-redir.d
+++ b/docs/cmdline-opts/proto-redir.d
@@ -15,5 +15,5 @@
 By default curl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2).
 Older versions of curl allowed all protocols on redirect except several
 disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and
-since 7.40.0 SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP
+since 7.40.0 SMB and SMBS are also disabled. Specifying *all* or *+all*
 enables all protocols on redirect, including those disabled for security.
diff --git a/docs/cmdline-opts/proto.d b/docs/cmdline-opts/proto.d
index 46c9122..1e269a5 100644
--- a/docs/cmdline-opts/proto.d
+++ b/docs/cmdline-opts/proto.d
@@ -5,7 +5,7 @@
 Added: 7.20.2
 Category: connection curl
 ---
-Tells curl to limit what protocols it may use in the transfer. Protocols are
+Tells curl to limit what protocols it may use for transfers. Protocols are
 evaluated left to right, are comma separated, and are each a protocol name or
 \&'all', optionally prefixed by zero or more modifiers. Available modifiers are:
 .RS
@@ -35,7 +35,7 @@
 .B --proto =http,https
 also only enables http and https
 .RE
-
+.IP
 Unknown protocols produce a warning. This allows scripts to safely rely on
 being able to disable potentially dangerous protocols, without relying upon
 support for that protocol being built into curl to avoid an error.
diff --git a/docs/cmdline-opts/proxy-header.d b/docs/cmdline-opts/proxy-header.d
index 9f1121d..c2b0928 100644
--- a/docs/cmdline-opts/proxy-header.d
+++ b/docs/cmdline-opts/proxy-header.d
@@ -11,7 +11,7 @@
 separate header sent to the proxy to what is sent to the actual remote host.
 
 curl will make sure that each header you add/replace is sent with the proper
-end-of-line marker, you should thus \fBnot\fP add that as a part of the header
+end-of-line marker, you should thus **not** add that as a part of the header
 content: do not add newlines or carriage returns, they will only mess things
 up for you.
 
diff --git a/docs/cmdline-opts/proxy-ssl-auto-client-cert.d b/docs/cmdline-opts/proxy-ssl-auto-client-cert.d
new file mode 100644
index 0000000..0541754
--- /dev/null
+++ b/docs/cmdline-opts/proxy-ssl-auto-client-cert.d
@@ -0,0 +1,6 @@
+Long: proxy-ssl-auto-client-cert
+Help: Use auto client certificate for proxy (Schannel)
+Added: 7.77.0
+Category: proxy tls
+---
+Same as --ssl-auto-client-cert but used in HTTPS proxy context.
diff --git a/docs/cmdline-opts/proxy-tls13-ciphers.d b/docs/cmdline-opts/proxy-tls13-ciphers.d
index 19add22..9f03f13 100644
--- a/docs/cmdline-opts/proxy-tls13-ciphers.d
+++ b/docs/cmdline-opts/proxy-tls13-ciphers.d
@@ -8,7 +8,7 @@
 when it negotiates TLS 1.3. The list of ciphers suites must specify valid
 ciphers. Read up on TLS 1.3 cipher suite details on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 later. If you are using a different SSL backend you can try setting TLS 1.3
diff --git a/docs/cmdline-opts/quote.d b/docs/cmdline-opts/quote.d
index a33ed35..6e4fd08 100644
--- a/docs/cmdline-opts/quote.d
+++ b/docs/cmdline-opts/quote.d
@@ -1,4 +1,5 @@
 Long: quote
+Arg: <command>
 Short: Q
 Help: Send command(s) to server before transfer
 Protocols: FTP SFTP
@@ -30,7 +31,7 @@
 .IP "atime date file"
 The atime command sets the last access time of the file named by the file
 operand. The <date expression> can be all sorts of date strings, see the
-\fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
+*curl_getdate(3)* man page for date expression details. (Added in 7.73.0)
 .IP "chgrp group file"
 The chgrp command sets the group ID of the file named by the file operand to
 the group ID specified by the group operand. The group operand is a decimal
@@ -50,7 +51,7 @@
 .IP "mtime date file"
 The mtime command sets the last modification time of the file named by the
 file operand. The <date expression> can be all sorts of date strings, see the
-\fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0)
+*curl_getdate(3)* man page for date expression details. (Added in 7.73.0)
 .IP "pwd"
 The pwd command returns the absolute pathname of the current working directory.
 .IP "rename source target"
diff --git a/docs/cmdline-opts/range.d b/docs/cmdline-opts/range.d
index 17c6c2a..e2d1f62 100644
--- a/docs/cmdline-opts/range.d
+++ b/docs/cmdline-opts/range.d
@@ -29,7 +29,8 @@
 .RE
 .IP
 (*) = NOTE that this will cause the server to reply with a multipart
-response!
+response, which will be returned as-is by curl! Parsing or otherwise
+transforming this response is the responsibility of the caller.
 
 Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
 \&'start-stop' range syntax. If a non-digit character is given in the range,
diff --git a/docs/cmdline-opts/remote-header-name.d b/docs/cmdline-opts/remote-header-name.d
index 700da69..325dade 100644
--- a/docs/cmdline-opts/remote-header-name.d
+++ b/docs/cmdline-opts/remote-header-name.d
@@ -15,6 +15,6 @@
 There's no attempt to decode %-sequences (yet) in the provided file name, so
 this option may provide you with rather unexpected file names.
 
-\fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A
+**WARNING**: Exercise judicious use of this option, especially on Windows. A
 rogue server could send you the name of a DLL or other file that could possibly
 be loaded automatically by Windows or some third party software.
diff --git a/docs/cmdline-opts/request-target.d b/docs/cmdline-opts/request-target.d
index df423f8..4422611 100644
--- a/docs/cmdline-opts/request-target.d
+++ b/docs/cmdline-opts/request-target.d
@@ -1,4 +1,5 @@
 Long: request-target
+Arg: <path>
 Help: Specify the target for this request
 Protocols: HTTP
 Added: 7.55.0
diff --git a/docs/cmdline-opts/resolve.d b/docs/cmdline-opts/resolve.d
index 41f6a1b..ff10f28 100644
--- a/docs/cmdline-opts/resolve.d
+++ b/docs/cmdline-opts/resolve.d
@@ -1,5 +1,5 @@
 Long: resolve
-Arg: <host:port:addr[,addr]...>
+Arg: <[+]host:port:addr[,addr]...>
 Help: Resolve the host+port to this address
 Added: 7.21.3
 Category: connection
@@ -19,10 +19,18 @@
 The provided address set by this option will be used even if --ipv4 or --ipv6
 is set to make curl use another IP version.
 
+By prefixing the host with a '+' you can make the entry time out after curl's
+default timeout (1 minute). Note that this will only make sense for long
+running parallel transfers with a lot of files. In such cases, if this option
+is used curl will try to resolve the host as it normally would once the
+timeout has expired.
+
 Support for providing the IP address within [brackets] was added in 7.57.0.
 
 Support for providing multiple IP addresses per entry was added in 7.59.0.
 
 Support for resolving with wildcard was added in 7.64.0.
 
+Support for the '+' prefix was was added in 7.75.0.
+
 This option can be used many times to add many host names to resolve.
diff --git a/docs/cmdline-opts/retry-all-errors.d b/docs/cmdline-opts/retry-all-errors.d
index 6bda52b..5ad1da0 100644
--- a/docs/cmdline-opts/retry-all-errors.d
+++ b/docs/cmdline-opts/retry-all-errors.d
@@ -18,3 +18,11 @@
 is not true of data redirected to a | pipe or > file, which are not reset. We
 strongly suggest don't parse or record output via redirect in combination with
 this option, since you may receive duplicate data.
+
+By default curl will not error on an HTTP response code that indicates an HTTP
+error, if the transfer was successful. For example, if a server replies 404
+Not Found and the reply is fully received then that is not an error. When
+--retry is used then curl will retry on some HTTP response codes that indicate
+transient HTTP errors, but that does not include most 4xx response codes such
+as 404. If you want to retry on all response codes that indicate HTTP errors
+(4xx and 5xx) then combine with --fail.
diff --git a/docs/cmdline-opts/retry.d b/docs/cmdline-opts/retry.d
index 70f6e7b..bff0ef2 100644
--- a/docs/cmdline-opts/retry.d
+++ b/docs/cmdline-opts/retry.d
@@ -7,7 +7,8 @@
 If a transient error is returned when curl tries to perform a transfer, it
 will retry this number of times before giving up. Setting the number to 0
 makes curl do no retries (which is the default). Transient error means either:
-a timeout, an FTP 4xx response code or an HTTP 408 or 5xx response code.
+a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
+response code.
 
 When curl is about to retry a transfer, it will first wait one second and then
 for all forthcoming retries it will double the waiting time until it reaches
diff --git a/docs/cmdline-opts/socks4.d b/docs/cmdline-opts/socks4.d
index bc095d5..3cfb254 100644
--- a/docs/cmdline-opts/socks4.d
+++ b/docs/cmdline-opts/socks4.d
@@ -5,7 +5,8 @@
 Category: proxy
 ---
 Use the specified SOCKS4 proxy. If the port number is not specified, it is
-assumed at port 1080.
+assumed at port 1080. Using this socket type make curl resolve the host name
+and passing the address on to the proxy.
 
 This option overrides any previous use of --proxy, as they are mutually
 exclusive.
diff --git a/docs/cmdline-opts/socks4a.d b/docs/cmdline-opts/socks4a.d
index d3177a9..d820566 100644
--- a/docs/cmdline-opts/socks4a.d
+++ b/docs/cmdline-opts/socks4a.d
@@ -5,7 +5,7 @@
 Category: proxy
 ---
 Use the specified SOCKS4a proxy. If the port number is not specified, it is
-assumed at port 1080.
+assumed at port 1080. This asks the proxy to resolve the host name.
 
 This option overrides any previous use of --proxy, as they are mutually
 exclusive.
diff --git a/docs/cmdline-opts/ssl-auto-client-cert.d b/docs/cmdline-opts/ssl-auto-client-cert.d
new file mode 100644
index 0000000..16108ae
--- /dev/null
+++ b/docs/cmdline-opts/ssl-auto-client-cert.d
@@ -0,0 +1,12 @@
+Long: ssl-auto-client-cert
+Help: Use auto client certificate (Schannel)
+Added: 7.77.0
+See-also: proxy-ssl-auto-client-cert
+Category: tls
+---
+Tell libcurl to automatically locate and use a client certificate for
+authentication, when requested by the server. This option is only supported
+for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
+default behavior in libcurl with Schannel. Since the server can request any
+certificate that supports client authentication in the OS certificate store it
+could be a privacy violation and unexpected.
diff --git a/docs/cmdline-opts/sslv2.d b/docs/cmdline-opts/sslv2.d
index 773ab69..f9ee99d 100644
--- a/docs/cmdline-opts/sslv2.d
+++ b/docs/cmdline-opts/sslv2.d
@@ -9,6 +9,5 @@
 Help: Use SSLv2
 Category: tls
 ---
-Forces curl to use SSL version 2 when negotiating with a remote SSL
-server. Sometimes curl is built without SSLv2 support. SSLv2 is widely
-considered insecure (see RFC 6176).
+This option previously asked curl to use SSLv2, but starting in curl 7.77.0 this
+instruction is ignored. SSLv2 is widely considered insecure (see RFC 6176).
diff --git a/docs/cmdline-opts/sslv3.d b/docs/cmdline-opts/sslv3.d
index 7beed8f..e8b2c35 100644
--- a/docs/cmdline-opts/sslv3.d
+++ b/docs/cmdline-opts/sslv3.d
@@ -9,6 +9,6 @@
 Help: Use SSLv3
 Category: tls
 ---
-Forces curl to use SSL version 3 when negotiating with a remote SSL
-server. Sometimes curl is built without SSLv3 support. SSLv3 is widely
-considered insecure (see RFC 7568).
+This option previously asked curl to use SSLv3, but starting in curl 7.77.0
+this instruction is ignored. SSLv3 is widely considered insecure (see RFC
+7568).
diff --git a/docs/cmdline-opts/stderr.d b/docs/cmdline-opts/stderr.d
index 6da0401..1154efb 100644
--- a/docs/cmdline-opts/stderr.d
+++ b/docs/cmdline-opts/stderr.d
@@ -1,4 +1,5 @@
 Long: stderr
+Arg: <file>
 Help: Where to redirect stderr
 See-also: verbose silent
 Category: verbose
diff --git a/docs/cmdline-opts/tcp-nodelay.d b/docs/cmdline-opts/tcp-nodelay.d
index f1cf644..90483d2 100644
--- a/docs/cmdline-opts/tcp-nodelay.d
+++ b/docs/cmdline-opts/tcp-nodelay.d
@@ -3,7 +3,7 @@
 Added: 7.11.2
 Category: connection
 ---
-Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
+Turn on the TCP_NODELAY option. See the *curl_easy_setopt(3)* man page for
 details about this option.
 
 Since 7.50.2, curl sets this option by default and you need to explicitly
diff --git a/docs/cmdline-opts/time-cond.d b/docs/cmdline-opts/time-cond.d
index f733eeb..0b56c6e 100644
--- a/docs/cmdline-opts/time-cond.d
+++ b/docs/cmdline-opts/time-cond.d
@@ -9,7 +9,7 @@
 one that has been modified before that time. The <date expression> can be all
 sorts of date strings or if it doesn't match any internal ones, it is taken as
 a filename and tries to get the modification date (mtime) from <file>
-instead. See the \fIcurl_getdate(3)\fP man pages for date expression details.
+instead. See the *curl_getdate(3)* man pages for date expression details.
 
 Start the date expression with a dash (-) to make it request for a document
 that is older than the given date/time, default is a document that is newer
diff --git a/docs/cmdline-opts/tls13-ciphers.d b/docs/cmdline-opts/tls13-ciphers.d
index 0f906ce..0df1695 100644
--- a/docs/cmdline-opts/tls13-ciphers.d
+++ b/docs/cmdline-opts/tls13-ciphers.d
@@ -8,7 +8,7 @@
 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3
 cipher suite details on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 later. If you are using a different SSL backend you can try setting TLS 1.3
diff --git a/docs/cmdline-opts/tlspassword.d b/docs/cmdline-opts/tlspassword.d
index 5c6a0fa..e7e3780 100644
--- a/docs/cmdline-opts/tlspassword.d
+++ b/docs/cmdline-opts/tlspassword.d
@@ -1,4 +1,5 @@
 Long: tlspassword
+Arg: <string>
 Help: TLS password
 Added: 7.21.4
 Category: tls auth
diff --git a/docs/cmdline-opts/version.d b/docs/cmdline-opts/version.d
index 52c29f1..a257ebd 100644
--- a/docs/cmdline-opts/version.d
+++ b/docs/cmdline-opts/version.d
@@ -26,8 +26,13 @@
 .IP "Debug"
 This curl uses a libcurl built with Debug. This enables more error-tracking
 and memory debugging etc. For curl-developers only!
+.IP "gsasl"
+The built-in SASL authentication includes extensions to support SCRAM because
+libcurl was built with libgsasl.
 .IP "GSS-API"
 GSS-API is supported.
+.IP "HSTS"
+HSTS support is present.
 .IP "HTTP2"
 HTTP/2 support has been built-in.
 .IP "HTTP3"
@@ -38,20 +43,19 @@
 This curl supports IDN - international domain names.
 .IP "IPv6"
 You can use IPv6 with this.
-.IP "krb4"
-Krb4 for FTP is supported.
+.IP "Kerberos"
+Kerberos V5 authentication is supported.
 .IP "Largefile"
 This curl supports transfers of large files, files larger than 2GB.
 .IP "libz"
-Automatic decompression of compressed files over HTTP is supported.
-.IP "Metalink"
-This curl supports Metalink
+Automatic decompression (via gzip, deflate) of compressed files over HTTP is
+supported.
 .IP "MultiSSL"
 This curl supports multiple TLS backends.
 .IP "NTLM"
 NTLM authentication is supported.
-.IP "NTLM"
-NTLM authentication is supported.
+.IP "NTLM_WB"
+NTLM delegation to winbind helper is supported.
 .IP "PSL"
 PSL is short for Public Suffix List and means that this curl has been built
 with knowledge about "public suffixes".
@@ -64,6 +68,12 @@
 SSPI is supported.
 .IP "TLS-SRP"
 SRP (Secure Remote Password) authentication is supported for TLS.
+.IP "TrackMemory"
+Debug memory tracking is supported.
+.IP "Unicode"
+Unicode support on Windows.
 .IP "UnixSockets"
 Unix sockets support is provided.
+.IP "zstd"
+Automatic decompression (via zstd) of compressed files over HTTP is supported.
 .RE
diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d
index 28b9a13..df50c31 100644
--- a/docs/cmdline-opts/write-out.d
+++ b/docs/cmdline-opts/write-out.d
@@ -29,6 +29,12 @@
 .B content_type
 The Content-Type of the requested document, if there was any.
 .TP
+.B errormsg
+The error message. (Added in 7.75.0)
+.TP
+.B exitcode
+The numerical exitcode of the transfer. (Added in 7.75.0)
+.TP
 .B filename_effective
 The ultimate filename that curl writes out to. This is only meaningful if curl
 is told to write to a file with the --remote-name or --output
@@ -41,7 +47,7 @@
 .TP
 .B http_code
 The numerical response code that was found in the last retrieved HTTP(S) or
-FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
+FTP(s) transfer. In 7.18.2 the alias **response_code** was added to show the
 same info.
 .TP
 .B http_connect
@@ -56,13 +62,13 @@
 .TP
 .B local_ip
 The IP address of the local end of the most recently done connection - can be
-either IPv4 or IPv6 (Added in 7.29.0)
+either IPv4 or IPv6. (Added in 7.29.0)
 .TP
 .B local_port
-The local port number of the most recently done connection (Added in 7.29.0)
+The local port number of the most recently done connection. (Added in 7.29.0)
 .TP
 .B method
-The http method used in the most recent HTTP request (Added in 7.72.0)
+The http method used in the most recent HTTP request. (Added in 7.72.0)
 .TP
 .B num_connects
 Number of new connects made in the recent transfer. (Added in 7.12.3)
@@ -74,28 +80,35 @@
 .B num_redirects
 Number of redirects that were followed in the request. (Added in 7.12.3)
 .TP
+.B onerror
+The rest of the output is only shown if the transfer returned a non-zero error
+(Added in 7.75.0)
+.TP
 .B proxy_ssl_verify_result
 The result of the HTTPS proxy's SSL peer certificate verification that was
 requested. 0 means the verification was successful. (Added in 7.52.0)
 .TP
 .B redirect_url
 When an HTTP request was made without --location to follow redirects (or when
---max-redir is met), this variable will show the actual URL a redirect
-\fIwould\fP have gone to. (Added in 7.18.2)
+--max-redirs is met), this variable will show the actual URL a redirect
+*would* have gone to. (Added in 7.18.2)
+.TP
+.B referer
+The Referer: header, if there was any. (Added in 7.76.0)
 .TP
 .B remote_ip
 The remote IP address of the most recently done connection - can be either
-IPv4 or IPv6 (Added in 7.29.0)
+IPv4 or IPv6. (Added in 7.29.0)
 .TP
 .B remote_port
-The remote port number of the most recently done connection (Added in 7.29.0)
+The remote port number of the most recently done connection. (Added in 7.29.0)
 .TP
 .B response_code
 The numerical response code that was found in the last transfer (formerly
 known as "http_code"). (Added in 7.18.2)
 .TP
 .B scheme
-The URL scheme (sometimes called protocol) that was effectively used (Added in 7.52.0)
+The URL scheme (sometimes called protocol) that was effectively used. (Added in 7.52.0)
 .TP
 .B size_download
 The total amount of bytes that were downloaded.
@@ -161,6 +174,13 @@
 .B time_total
 The total time, in seconds, that the full operation lasted.
 .TP
+.B url
+The URL that was fetched. (Added in 7.75.0)
+.TP
+.B urlnum
+The URL index number of this transfer, 0-indexed. De-globbed URLs share the
+same index number as the origin globbed URL. (Added in 7.75.0)
+.TP
 .B url_effective
 The URL that was fetched last. This is most meaningful if you've told curl
 to follow location: headers.
diff --git a/docs/curl-config.1 b/docs/curl-config.1
index 2bf853a..7323347 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl-config 1 "April 26, 2020" "Curl 7.73.0" "curl-config manual"
+.TH curl-config 1 "November 04, 2020" "Curl 7.78.0" "curl-config manual"
 
 .SH NAME
 curl-config \- Get information about a libcurl installation
diff --git a/docs/curl.1 b/docs/curl.1
index cf42b91..e418ad1 100644
--- a/docs/curl.1
+++ b/docs/curl.1
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 \- 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -22,7 +22,7 @@
 .\"
 .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
 .\"
-.TH curl 1 "November 16, 2016" "Curl 7.73.0" "Curl Manual"
+.TH curl 1 "November 16, 2016" "Curl 7.78.0" "Curl Manual"
 
 .SH NAME
 curl \- transfer a URL
@@ -33,13 +33,13 @@
 is a tool to transfer data from or to a server, using one of the supported
 protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
 LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP,
-SMTPS, TELNET and TFTP). The command is designed to work without user
+SMTPS, TELNET or TFTP). The command is designed to work without user
 interaction.
 
 curl offers a busload of useful tricks like proxy support, user
 authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
-resume, Metalink, and more. As you will see below, the number of features will
-make your head spin!
+resume and more. As you will see below, the number of features will make your
+head spin!
 
 curl is powered by libcurl for all transfer-related features. See
 \fIlibcurl(3)\fP for details.
@@ -99,7 +99,16 @@
 getting many files from the same server will not do multiple connects /
 handshakes. This improves speed. Of course this is only done on files
 specified on a single command line and cannot be used between separate curl
-invokes.
+invocations.
+.SH OUTPUT
+If not told otherwise, curl writes the received data to stdout. It can be
+instructed to instead save that data into a local file, using the \fI\-o, \-\-output\fP or
+\fI\-O, \-\-remote-name\fP options. If curl is given multiple URLs to transfer on the
+command line, it similarly needs multiple options for where to save them.
+
+curl does not parse or otherwise "understand" the content it gets or writes as
+output. It does no encoding or decoding, unless explicitly asked to with
+dedicated command line options.
 .SH PROTOCOLS
 curl supports numerous protocols, or put in URL terms: schemes. Your
 particular build may not support them all.
@@ -107,7 +116,7 @@
 Lets you lookup words using online dictionaries.
 .IP FILE
 Read or write local files. curl does not support accessing file:// URL
-remotely, but when running on Microsft Windows using the native UNC approach
+remotely, but when running on Microsoft Windows using the native UNC approach
 will work.
 .IP FTP(S)
 curl supports the File Transfer Protocol with a lot of tweaks and levers. With
@@ -162,41 +171,41 @@
 mixing progress meter and response data.
 
 If you want a progress meter for HTTP POST or PUT requests, you need to
-redirect the response output to a file, using shell redirect (>), \fI-o, --output\fP or
+redirect the response output to a file, using shell redirect (>), \fI\-o, \-\-output\fP or
 similar.
 
-It is not the same case for FTP upload as that operation does not spit out
-any response data to the terminal.
+This does not apply to FTP upload as that operation does not spit out any
+response data to the terminal.
 
-If you prefer a progress "bar" instead of the regular meter, \fI-#, --progress-bar\fP is
+If you prefer a progress "bar" instead of the regular meter, \fI\-#, \-\-progress-bar\fP is
 your friend. You can also disable the progress meter completely with the
-\fI-s, --silent\fP option.
+\fI\-s, \-\-silent\fP option.
 .SH OPTIONS
 Options start with one or two dashes. Many of the options require an
 additional value next to them.
 
-The short "single-dash" form of the options, -d for example, may be used with
+The short "single-dash" form of the options, \-d for example, may be used with
 or without a space between it and its value, although a space is a recommended
-separator. The long "double-dash" form, \fI-d, --data\fP for example, requires a space
+separator. The long "double-dash" form, \fI\-d, \-\-data\fP for example, requires a space
 between it and its value.
 
 Short version options that don't need any additional values can be used
 immediately next to each other, like for example you can specify all the
-options -O, -L and -v at once as -OLv.
+options \-O, \-L and \-v at once as \-OLv.
 
-In general, all boolean options are enabled with --\fBoption\fP and yet again
-disabled with --\fBno-\fPoption. That is, you use the exact same option name
+In general, all boolean options are enabled with \-\-\fBoption\fP and yet again
+disabled with \-\-\fBno-\fPoption. That is, you use the exact same option name
 but prefix it with "no-". However, in this list we mostly only list and show
-the --option version of them. (This concept with --no options was added in
-7.19.0. Previously most options were toggled on/off on repeated use of the
-same command line option.)
-.IP "--abstract-unix-socket <path>"
+the \-\-option version of them. (This concept with \-\-no options was added in
+7.19.0. Previously most options were toggled on/off through repeated use of
+the same command line option.)
+.IP "\-\-abstract-unix-socket <path>"
 (HTTP) Connect through an abstract Unix domain socket, instead of using the network.
 Note: netstat shows the path of an abstract socket prefixed with '@', however
 the <path> argument should not have this leading character.
 
 Added in 7.53.0.
-.IP "--alt-svc <file name>"
+.IP "\-\-alt-svc <file name>"
 (HTTPS) WARNING: this option is experimental. Do not use in production.
 
 This option enables the alt-svc parser in curl. If the file name points to an
@@ -210,35 +219,49 @@
 files but the last one will be used for saving.
 
 Added in 7.64.1.
-.IP "--anyauth"
+.IP "\-\-anyauth"
 (HTTP) Tells curl to figure out authentication method by itself, and use the most
 secure one the remote site claims to support. This is done by first doing a
 request and checking the response-headers, thus possibly inducing an extra
 network round-trip. This is used instead of setting a specific authentication
-method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and \fI--negotiate\fP.
+method, which you can do with \fI\-\-basic\fP, \fI\-\-digest\fP, \fI\-\-ntlm\fP, and \fI\-\-negotiate\fP.
 
-Using \fI--anyauth\fP is not recommended if you do uploads from stdin, since it may
+Using \fI\-\-anyauth\fP is not recommended if you do uploads from stdin, since it may
 require data to be sent twice and then the client must be able to rewind. If
 the need should arise when uploading from stdin, the upload operation will
 fail.
 
-Used together with \fI-u, --user\fP.
+Used together with \fI\-u, \-\-user\fP.
 
 See also \fI--proxy-anyauth\fP, \fI--basic\fP and \fI--digest\fP.
-.IP "-a, --append"
+.IP "\-a, \-\-append"
 (FTP SFTP) When used in an upload, this makes curl append to the target file instead of
 overwriting it. If the remote file doesn't exist, it will be created.  Note
 that this flag is ignored by some SFTP servers (including OpenSSH).
-.IP "--basic"
+.IP "\-\-aws-sigv4 <provider1[:provider2[:region[:service]]]>"
+Use AWS V4 signature authentication in the transfer.
+
+The provider argument is a string that is used by the algorithm when creating
+outgoing authentication headers.
+
+The region argument is a string that points to a geographic area of
+a resources collection (region-code) when the region name is omitted from
+the endpoint.
+
+The service argument is a string that points to a function provided by a cloud
+(service-code) when the service name is omitted from the endpoint.
+
+Added in 7.75.0.
+.IP "\-\-basic"
 (HTTP) Tells curl to use HTTP Basic authentication with the remote host. This is the
 default and this option is usually pointless, unless you use it to override a
 previously set option that sets a different authentication method (such as
-\fI--ntlm\fP, \fI--digest\fP, or \fI--negotiate\fP).
+\fI\-\-ntlm\fP, \fI\-\-digest\fP, or \fI\-\-negotiate\fP).
 
-Used together with \fI-u, --user\fP.
+Used together with \fI\-u, \-\-user\fP.
 
 See also \fI--proxy-basic\fP.
-.IP "--cacert <file>"
+.IP "\-\-cacert <file>"
 (TLS) Tells curl to use the specified certificate file to verify the peer. The file
 may contain multiple CA certificates. The certificate(s) must be in PEM
 format. Normally curl is built to use a default file for this, so this option
@@ -267,18 +290,18 @@
 root certificates (the default for Schannel).
 
 If this option is used several times, the last one will be used.
-.IP "--capath <dir>"
+.IP "\-\-capath <dir>"
 (TLS) Tells curl to use the specified certificate directory to verify the
 peer. Multiple paths can be provided by separating them with ":" (e.g.
 \&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
 built against OpenSSL, the directory must have been processed using the
-c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
+c_rehash utility supplied with OpenSSL. Using \fI\-\-capath\fP can allow
 OpenSSL-powered curl to make SSL-connections much more efficiently than using
-\fI--cacert\fP if the --cacert file contains many CA certificates.
+\fI\-\-cacert\fP if the \-\-cacert file contains many CA certificates.
 
 If this option is set, the default capath value will be ignored, and if it is
 used several times, the last one will be used.
-.IP "--cert-status"
+.IP "\-\-cert-status"
 (TLS) Tells curl to verify the status of the server certificate by using the
 Certificate Status Request (aka. OCSP stapling) TLS extension.
 
@@ -289,20 +312,20 @@
 This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
 
 Added in 7.41.0.
-.IP "--cert-type <type>"
+.IP "\-\-cert-type <type>"
 (TLS) Tells curl what type the provided client certificate is using. PEM, DER, ENG
 and P12 are recognized types.  If not specified, PEM is assumed.
 
 If this option is used several times, the last one will be used.
 
 See also \fI-E, --cert\fP, \fI--key\fP and \fI--key-type\fP.
-.IP "-E, --cert <certificate[:password]>"
+.IP "\-E, \-\-cert <certificate[:password]>"
 (TLS) Tells curl to use the specified client certificate file when getting a file
 with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
 PKCS#12 format if using Secure Transport, or PEM format if using any other
 engine.  If the optional password isn't specified, it will be queried for on
 the terminal. Note that this option assumes a \&"certificate" file that is the
-private key and the client certificate concatenated! See \fI-E, --cert\fP and \fI--key\fP to
+private key and the client certificate concatenated! See \fI\-E, \-\-cert\fP and \fI\-\-key\fP to
 specify them independently.
 
 If curl is built against the NSS SSL library then this option can tell
@@ -318,8 +341,8 @@
 If curl is built against OpenSSL library, and the engine pkcs11 is available,
 then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
 a PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
-PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI--engine\fP option will be set
-as "pkcs11" if none was provided and the \fI--cert-type\fP option will be set as
+PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option will be set
+as "pkcs11" if none was provided and the \fI\-\-cert-type\fP option will be set as
 "ENG" if none was provided.
 
 (iOS and macOS only) If curl is built against Secure Transport, then the
@@ -342,25 +365,25 @@
 If this option is used several times, the last one will be used.
 
 See also \fI--cert-type\fP, \fI--key\fP and \fI--key-type\fP.
-.IP "--ciphers <list of ciphers>"
+.IP "\-\-ciphers <list of ciphers>"
 (TLS) Specifies which ciphers to use in the connection. The list of ciphers must
 specify valid ciphers. Read up on SSL cipher list details on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 If this option is used several times, the last one will be used.
-.IP "--compressed-ssh"
+.IP "\-\-compressed-ssh"
 (SCP SFTP) Enables built-in SSH compression.
 This is a request, not an order; the server may or may not do it.
 
 Added in 7.56.0.
-.IP "--compressed"
+.IP "\-\-compressed"
 (HTTP) Request a compressed response using one of the algorithms curl supports, and
 automatically decompress the content. Headers are not modified.
 
 If this option is used and the server sends an unsupported encoding, curl will
 report an error.
-.IP "-K, --config <file>"
+.IP "\-K, \-\-config <file>"
 
 Specify a text file to read curl arguments from. The command line arguments
 found in the text file will be used as if they were provided on the command
@@ -376,19 +399,22 @@
 If the parameter contains whitespace (or starts with : or =), the parameter
 must be enclosed within quotes. Within double quotes, the following escape
 sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash
-preceding any other letter is ignored. If the first column of a config line is
-a '#' character, the rest of the line will be treated as a comment. Only write
-one option per physical line in the config file.
+preceding any other letter is ignored.
 
-Specify the filename to \fI-K, --config\fP as '-' to make curl read the file from stdin.
+If the first column of a config line is a '#' character, the rest of the line
+will be treated as a comment.
+
+Only write one option per physical line in the config file.
+
+Specify the filename to \fI\-K, \-\-config\fP as '-' to make curl read the file from stdin.
 
 Note that to be able to specify a URL in the config file, you need to specify
-it using the \fI--url\fP option, and not by simply writing the URL on its own
+it using the \fI\-\-url\fP option, and not by simply writing the URL on its own
 line. So, it could look similar to this:
 
-url = "https://curl.haxx.se/docs/"
+url = "https://curl.se/docs/"
 
-When curl is invoked, it (unless \fI-q, --disable\fP is used) checks for a default
+When curl is invoked, it (unless \fI\-q, \-\-disable\fP is used) checks for a default
 config file and uses it if found. The default config file is checked for in
 the following places in this order:
 
@@ -409,7 +435,7 @@
 simply try to load .curlrc from the determined home dir.
 
 .nf
-# --- Example file ---
+# \-\-\- Example file \-\-\-
 # this is a comment
 url = "example.com"
 output = "curlhere.html"
@@ -417,22 +443,22 @@
 
 # and fetch another URL too
 url = "example.com/docs/manpage.html"
--O
+\-O
 referer = "http://nowhereatall.example.com/"
-# --- End of example file ---
+# \-\-\- End of example file \-\-\-
 .fi
 
 This option can be used multiple times to load multiple config files.
-.IP "--connect-timeout <seconds>"
+.IP "\-\-connect-timeout <seconds>"
 Maximum time in seconds that you allow curl's connection to take.  This only
 limits the connection phase, so if curl connects within the given period it
-will continue - if not it will exit.  Since version 7.32.0, this option
+will continue \- if not it will exit.  Since version 7.32.0, this option
 accepts decimal values.
 
 If this option is used several times, the last one will be used.
 
 See also \fI-m, --max-time\fP.
-.IP "--connect-to <HOST1:PORT1:HOST2:PORT2>"
+.IP "\-\-connect-to <HOST1:PORT1:HOST2:PORT2>"
 
 For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead.
 This option is suitable to direct requests at a specific server, e.g. at a
@@ -450,19 +476,19 @@
 This option can be used many times to add many connect rules.
 
 See also \fI--resolve\fP and \fI-H, --header\fP. Added in 7.49.0.
-.IP "-C, --continue-at <offset>"
+.IP "\-C, \-\-continue-at <offset>"
 Continue/Resume a previous file transfer at the given offset. The given offset
 is the exact number of bytes that will be skipped, counting from the beginning
 of the source file before it is transferred to the destination.  If used with
 uploads, the FTP server command SIZE will not be used by curl.
 
-Use "-C -" to tell curl to automatically find out where/how to resume the
+Use "-C \-" to tell curl to automatically find out where/how to resume the
 transfer. It then uses the given output/input files to figure that out.
 
 If this option is used several times, the last one will be used.
 
 See also \fI-r, --range\fP.
-.IP "-c, --cookie-jar <filename>"
+.IP "\-c, \-\-cookie-jar <filename>"
 (HTTP) Specify to which file you want curl to write all cookies after a completed
 operation. Curl writes all cookies from its in-memory cookie storage to the
 given file at the end of operations. If no cookies are known, no data will be
@@ -471,17 +497,17 @@
 stdout.
 
 This command line option will activate the cookie engine that makes curl
-record and use cookies. Another way to activate it is to use the \fI-b, --cookie\fP
+record and use cookies. Another way to activate it is to use the \fI\-b, \-\-cookie\fP
 option.
 
 If the cookie jar can't be created or written to, the whole curl operation
-won't fail or even report an error clearly. Using \fI-v, --verbose\fP will get a warning
+won't fail or even report an error clearly. Using \fI\-v, \-\-verbose\fP will get a warning
 displayed, but that is the only visible feedback you get about this possibly
 lethal situation.
 
 If this option is used several times, the last specified file name will be
 used.
-.IP "-b, --cookie <data|filename>"
+.IP "\-b, \-\-cookie <data|filename>"
 (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly
 the data previously received from the server in a "Set-Cookie:" line.  The
 data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
@@ -489,57 +515,64 @@
 If no '=' symbol is used in the argument, it is instead treated as a filename
 to read previously stored cookie from. This option also activates the cookie
 engine which will make curl record incoming cookies, which may be handy if
-you're using this in combination with the \fI-L, --location\fP option or do multiple URL
+you're using this in combination with the \fI\-L, \-\-location\fP option or do multiple URL
 transfers on the same invoke. If the file name is exactly a minus ("-"), curl
 will instead read the contents from stdin.
 
 The file format of the file to read cookies from should be plain HTTP headers
 (Set-Cookie style) or the Netscape/Mozilla cookie file format.
 
-The file specified with \fI-b, --cookie\fP is only used as input. No cookies will be
-written to the file. To store cookies, use the \fI-c, --cookie-jar\fP option.
+The file specified with \fI\-b, \-\-cookie\fP is only used as input. No cookies will be
+written to the file. To store cookies, use the \fI\-c, \-\-cookie-jar\fP option.
 
-Exercise caution if you are using this option and multiple transfers may
-occur.  If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie
-format and don't specify a domain, then the cookie is sent for any domain
-(even after redirects are followed) and cannot be modified by a server-set
-cookie. If the cookie engine is enabled and a server sets a cookie of the same
-name then both will be sent on a future transfer to that server, likely not
-what you intended.  To address these issues set a domain in Set-Cookie (doing
-that will include sub domains) or use the Netscape format.
+If you use the Set-Cookie file format and don't specify a domain then the
+cookie is not sent since the domain will never match. To address this, set a
+domain in Set-Cookie line (doing that will include sub-domains) or preferably:
+use the Netscape format.
 
-If this option is used several times, the last one will be used.
+This option can be used multiple times.
 
 Users very often want to both read cookies from a file and write updated
-cookies back to a file, so using both \fI-b, --cookie\fP and \fI-c, --cookie-jar\fP in the same
+cookies back to a file, so using both \fI\-b, \-\-cookie\fP and \fI\-c, \-\-cookie-jar\fP in the same
 command line is common.
-.IP "--create-dirs"
-When used in conjunction with the \fI-o, --output\fP option, curl will create the
-necessary local directory hierarchy as needed. This option creates the dirs
-mentioned with the \fI-o, --output\fP option, nothing else. If the --output file name
-uses no dir or if the dirs it mentions already exist, no dir will be created.
+.IP "\-\-create-dirs"
+When used in conjunction with the \fI\-o, \-\-output\fP option, curl will create the
+necessary local directory hierarchy as needed. This option creates the
+directories mentioned with the \fI\-o, \-\-output\fP option, nothing else. If the \-\-output
+file name uses no directory, or if the directories it mentions already exist,
+no directories will be created.
 
 Created dirs are made with mode 0750 on unix style file systems.
 
-To create remote directories when using FTP or SFTP, try \fI--ftp-create-dirs\fP.
-.IP "--crlf"
+To create remote directories when using FTP or SFTP, try \fI\-\-ftp-create-dirs\fP.
+.IP "\-\-create-file-mode <mode>"
+(SFTP SCP FILE) When curl is used to create files remotely using one of the supported
+protocols, this option allows the user to set which 'mode' to set on the file
+at creation time, instead of the default 0644.
+
+This option takes an octal number as argument.
+
+If this option is used several times, the last one will be used.
+
+See also \fI--ftp-create-dirs\fP. Added in 7.75.0.
+.IP "\-\-crlf"
 (FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
 
 (SMTP added in 7.40.0)
-.IP "--crlfile <file>"
+.IP "\-\-crlfile <file>"
 (TLS) Provide a file using PEM format with a Certificate Revocation List that may
 specify peer certificates that are to be considered revoked.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.19.7.
-.IP "--curves <algorithm list>"
+.IP "\-\-curves <algorithm list>"
 (TLS) Tells curl to request specific curves to use during SSL session establishment
 according to RFC 8422, 5.1.  Multiple algorithms can be provided by separating
 them with ":" (e.g.  "X25519:P-521").  The parameter is available identically
 in the "openssl s_client/s_server" utilities.
 
-\fI--curves\fP allows a OpenSSL powered curl to make SSL-connections with exactly
+\fI\-\-curves\fP allows a OpenSSL powered curl to make SSL-connections with exactly
 the (EC) curve requested by the client, avoiding intransparent client/server
 negotiations.
 
@@ -547,29 +580,29 @@
 ignored.
 
 Added in 7.73.0.
-.IP "--data-ascii <data>"
-(HTTP) This is just an alias for \fI-d, --data\fP.
-.IP "--data-binary <data>"
+.IP "\-\-data-ascii <data>"
+(HTTP) This is just an alias for \fI\-d, \-\-data\fP.
+.IP "\-\-data-binary <data>"
 (HTTP) This posts data exactly as specified with no extra processing whatsoever.
 
 If you start the data with the letter @, the rest should be a filename.  Data
-is posted in a similar manner as \fI-d, --data\fP does, except that newlines and
+is posted in a similar manner as \fI\-d, \-\-data\fP does, except that newlines and
 carriage returns are preserved and conversions are never done.
 
-Like \fI-d, --data\fP the default content-type sent to the server is
+Like \fI\-d, \-\-data\fP the default content-type sent to the server is
 application/x-www-form-urlencoded. If you want the data to be treated as
 arbitrary binary data by the server then set the content-type to octet-stream:
--H "Content-Type: application/octet-stream".
+\-H "Content-Type: application/octet-stream".
 
 If this option is used several times, the ones following the first will append
-data as described in \fI-d, --data\fP.
-.IP "--data-raw <data>"
-(HTTP) This posts data similarly to \fI-d, --data\fP but without the special
+data as described in \fI\-d, \-\-data\fP.
+.IP "\-\-data-raw <data>"
+(HTTP) This posts data similarly to \fI\-d, \-\-data\fP but without the special
 interpretation of the @ character.
 
 See also \fI-d, --data\fP. Added in 7.43.0.
-.IP "--data-urlencode <data>"
-(HTTP) This posts data, similar to the other \fI-d, --data\fP options with the exception
+.IP "\-\-data-urlencode <data>"
+(HTTP) This posts data, similar to the other \fI\-d, \-\-data\fP options with the exception
 that this performs URL-encoding.
 
 To be CGI-compliant, the <data> part should begin with a \fIname\fP followed
@@ -597,31 +630,31 @@
 .RE
 
 See also \fI-d, --data\fP and \fI--data-raw\fP. Added in 7.18.0.
-.IP "-d, --data <data>"
+.IP "\-d, \-\-data <data>"
 (HTTP MQTT) Sends the specified data in a POST request to the HTTP server, in the same way
 that a browser does when a user has filled in an HTML form and presses the
 submit button. This will cause curl to pass the data to the server using the
-content-type application/x-www-form-urlencoded.  Compare to \fI-F, --form\fP.
+content-type application/x-www-form-urlencoded.  Compare to \fI\-F, \-\-form\fP.
 
-\fI--data-raw\fP is almost the same but does not have a special interpretation of
+\fI\-\-data-raw\fP is almost the same but does not have a special interpretation of
 the @ character. To post data purely binary, you should instead use the
-\fI--data-binary\fP option.  To URL-encode the value of a form field you may use
-\fI--data-urlencode\fP.
+\fI\-\-data-binary\fP option.  To URL-encode the value of a form field you may use
+\fI\-\-data-urlencode\fP.
 
 If any of these options is used more than once on the same command line, the
 data pieces specified will be merged together with a separating
-&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
+&-symbol. Thus, using '-d name=daniel \-d skill=lousy' would generate a post
 chunk that looks like \&'name=daniel&skill=lousy'.
 
 If you start the data with the letter @, the rest should be a file name to
-read the data from, or - if you want curl to read the data from stdin. Posting
-data from a file named \&'foobar' would thus be done with \fI-d, --data\fP @foobar. When
-\fI-d, --data\fP is told to read from a file like that, carriage returns and newlines
+read the data from, or \- if you want curl to read the data from stdin. Posting
+data from a file named \&'foobar' would thus be done with \fI\-d, \-\-data\fP @foobar. When
+\fI\-d, \-\-data\fP is told to read from a file like that, carriage returns and newlines
 will be stripped out. If you don't want the @ character to have a special
-interpretation use \fI--data-raw\fP instead.
+interpretation use \fI\-\-data-raw\fP instead.
 
 See also \fI--data-binary\fP, \fI--data-urlencode\fP and \fI--data-raw\fP. This option overrides \fI-F, --form\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP.
-.IP "--delegation <LEVEL>"
+.IP "\-\-delegation <LEVEL>"
 (GSS/kerberos) Set LEVEL to tell the server what it is allowed to delegate when it
 comes to user credentials.
 .RS
@@ -633,15 +666,17 @@
 .IP "always"
 Unconditionally allow the server to delegate.
 .RE
-.IP "--digest"
+
+If this option is used several times, the last one will be used.
+.IP "\-\-digest"
 (HTTP) Enables HTTP Digest authentication. This is an authentication scheme that
 prevents the password from being sent over the wire in clear text. Use this in
-combination with the normal \fI-u, --user\fP option to set user name and password.
+combination with the normal \fI\-u, \-\-user\fP option to set user name and password.
 
 If this option is used several times, only the first one is used.
 
 See also \fI-u, --user\fP, \fI--proxy-digest\fP and \fI--anyauth\fP. This option overrides \fI--basic\fP and \fI--ntlm\fP and \fI--negotiate\fP.
-.IP "--disable-eprt"
+.IP "\-\-disable-eprt"
 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active
 FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT
 before using PORT, but with this option, it will use PORT right away. EPRT and
@@ -649,76 +684,89 @@
 servers, but they enable more functionality in a better way than the
 traditional PORT command.
 
---eprt can be used to explicitly enable EPRT again and --no-eprt is an alias
-for \fI--disable-eprt\fP.
+\-\-eprt can be used to explicitly enable EPRT again and \-\-no-eprt is an alias
+for \fI\-\-disable-eprt\fP.
 
 If the server is accessed using IPv6, this option will have no effect as EPRT
 is necessary then.
 
 Disabling EPRT only changes the active behavior. If you want to switch to
-passive mode you need to not use \fI-P, --ftp-port\fP or force it with \fI--ftp-pasv\fP.
-.IP "--disable-epsv"
-(FTP) (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
-transfers. Curl will normally always first attempt to use EPSV before PASV,
-but with this option, it will not try using EPSV.
+passive mode you need to not use \fI\-P, \-\-ftp-port\fP or force it with \fI\-\-ftp-pasv\fP.
+.IP "\-\-disable-epsv"
+(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
+transfers. Curl will normally always first attempt to use EPSV before
+PASV, but with this option, it will not try using EPSV.
 
---epsv can be used to explicitly enable EPSV again and --no-epsv is an alias
-for \fI--disable-epsv\fP.
+\-\-epsv can be used to explicitly enable EPSV again and \-\-no-epsv is an alias
+for \fI\-\-disable-epsv\fP.
 
 If the server is an IPv6 host, this option will have no effect as EPSV is
 necessary then.
 
 Disabling EPSV only changes the passive behavior. If you want to switch to
-active mode you need to use \fI-P, --ftp-port\fP.
-.IP "-q, --disable"
+active mode you need to use \fI\-P, \-\-ftp-port\fP.
+.IP "\-q, \-\-disable"
 If used as the first parameter on the command line, the \fIcurlrc\fP config
-file will not be read and used. See the \fI-K, --config\fP for details on the default
+file will not be read and used. See the \fI\-K, \-\-config\fP for details on the default
 config file search path.
-.IP "--disallow-username-in-url"
+.IP "\-\-disallow-username-in-url"
 (HTTP) This tells curl to exit if passed a url containing a username.
 
 See also \fI--proto\fP. Added in 7.61.0.
-.IP "--dns-interface <interface>"
+.IP "\-\-dns-interface <interface>"
 (DNS) Tell curl to send outgoing DNS requests through <interface>. This option is a
-counterpart to \fI--interface\fP (which does not affect DNS). The supplied string
+counterpart to \fI\-\-interface\fP (which does not affect DNS). The supplied string
 must be an interface name (not an address).
 
 See also \fI--dns-ipv4-addr\fP and \fI--dns-ipv6-addr\fP. \fI--dns-interface\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
-.IP "--dns-ipv4-addr <address>"
+.IP "\-\-dns-ipv4-addr <address>"
 (DNS) Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
 the DNS requests originate from this address. The argument should be a
 single IPv4 address.
 
+If this option is used several times, the last one will be used.
+
 See also \fI--dns-interface\fP and \fI--dns-ipv6-addr\fP. \fI--dns-ipv4-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
-.IP "--dns-ipv6-addr <address>"
+.IP "\-\-dns-ipv6-addr <address>"
 (DNS) Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
 the DNS requests originate from this address. The argument should be a
 single IPv6 address.
 
+If this option is used several times, the last one will be used.
+
 See also \fI--dns-interface\fP and \fI--dns-ipv4-addr\fP. \fI--dns-ipv6-addr\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
-.IP "--dns-servers <addresses>"
+.IP "\-\-dns-servers <addresses>"
 Set the list of DNS servers to be used instead of the system default.
 The list of IP addresses should be separated with commas. Port numbers
 may also optionally be given as \fI:<port-number>\fP after each IP
 address.
 
+If this option is used several times, the last one will be used.
+
 \fI--dns-servers\fP requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
-.IP "--doh-url <URL>"
-(all) Specifies which DNS-over-HTTPS (DOH) server to use to resolve hostnames,
+.IP "\-\-doh-cert-status"
+(all) Same as \fI\-\-cert-status\fP but used for DoH (DNS-over-HTTPS).
+
+Added in 7.76.0.
+.IP "\-\-doh-insecure"
+(all) Same as \fI\-k, \-\-insecure\fP but used for DoH (DNS-over-HTTPS).
+
+Added in 7.76.0.
+.IP "\-\-doh-url <URL>"
+(all) Specifies which DNS-over-HTTPS (DoH) server to use to resolve hostnames,
 instead of using the default name resolver mechanism. The URL must be HTTPS.
 
+Some SSL options that you set for your transfer will apply to DoH since the
+name lookups take place over SSL. However, the certificate verification
+settings are not inherited and can be controlled separately via
+\fI\-\-doh-insecure\fP and \fI\-\-doh-cert-status\fP.
+
 If this option is used several times, the last one will be used.
 
 Added in 7.62.0.
-.IP "-D, --dump-header <filename>"
-(HTTP FTP) Write the received protocol headers to the specified file.
-
-This option is handy to use when you want to store the headers that an HTTP
-site sends to you. Cookies from the headers could then be read in a second
-curl invocation by using the \fI-b, --cookie\fP option! The \fI-c, --cookie-jar\fP option is a
-better way to store cookies.
-
-If no headers are received, the use of this option will create an empty file.
+.IP "\-D, \-\-dump-header <filename>"
+(HTTP FTP) Write the received protocol headers to the specified file. If no headers are
+received, the use of this option will create an empty file.
 
 When used in FTP, the FTP server response lines are considered being "headers"
 and thus are saved there.
@@ -726,51 +774,44 @@
 If this option is used several times, the last one will be used.
 
 See also \fI-o, --output\fP.
-.IP "--egd-file <file>"
+.IP "\-\-egd-file <file>"
 (TLS) Specify the path name to the Entropy Gathering Daemon socket. The socket is
 used to seed the random engine for SSL connections.
 
 See also \fI--random-file\fP.
-.IP "--engine <name>"
-(TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI--engine\fP
-list to print a list of build-time supported engines. Note that not all (or
-none) of the engines may be available at run-time.
-.IP "--etag-compare <file>"
-(HTTP) This option makes a conditional HTTP request for the specific
-ETag read from the given file by sending a custom If-None-Match
-header using the extracted ETag.
+.IP "\-\-engine <name>"
+(TLS) Select the OpenSSL crypto engine to use for cipher operations. Use \fI\-\-engine\fP
+list to print a list of build-time supported engines. Note that not all (and
+possibly none) of the engines may be available at run-time.
+.IP "\-\-etag-compare <file>"
+(HTTP) This option makes a conditional HTTP request for the specific ETag read
+from the given file by sending a custom If-None-Match header using the
+stored ETag.
 
-For correct results, make sure that specified file contains only a single
-line with a desired ETag. An empty file is parsed as an empty ETag.
+For correct results, make sure that the specified file contains only a
+single line with the desired ETag. An empty file is parsed as an empty
+ETag.
 
-Use the option \fI--etag-save\fP to first save the ETag from a response, and
-then use this option to compare using the saved ETag in a subsequent request.
-
-\fCOMPARISON\fP: There are 2 types of comparison or ETags, Weak and Strong.
-This option expects, and uses a strong comparison.
+Use the option \fI\-\-etag-save\fP to first save the ETag from a response, and
+then use this option to compare against the saved ETag in a subsequent
+request.
 
 Added in 7.68.0.
-.IP "--etag-save <file>"
-(HTTP) This option saves an HTTP ETag to the specified file. Etag is
-usually part of headers returned by a request. When server sends an
-ETag, it must be enveloped by a double quote. This option extracts the
-ETag without the double quotes and saves it into the <file>.
+.IP "\-\-etag-save <file>"
+(HTTP) This option saves an HTTP ETag to the specified file. An ETag is a
+caching related header, usually returned in a response.
 
-A server can send a week ETag which is prefixed by "W/". This identifier
-is not considered, and only relevant ETag between quotation marks is parsed.
-
-It an ETag wasn't send by the server or it cannot be parsed, and empty
-file is created.
+If no ETag is sent by the server, an empty file is created.
 
 Added in 7.68.0.
-.IP "--expect100-timeout <seconds>"
+.IP "\-\-expect100-timeout <seconds>"
 (HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue
 response when curl emits an Expects: 100-continue header in its request. By
 default curl will wait one second. This option accepts decimal values! When
 curl stops waiting, it will continue as if the response has been received.
 
 See also \fI--connect-timeout\fP. Added in 7.47.0.
-.IP "--fail-early"
+.IP "\-\-fail-early"
 Fail and exit on the first detected transfer error.
 
 When curl is used to do multiple transfers on the command line, it will
@@ -783,16 +824,28 @@
 that fails, independent of the amount of URLs that are given on the command
 line. This way, no transfer failures go undetected by scripts and similar.
 
-This option is global and does not need to be specified for each use of \fI-:, --next\fP.
+This option is global and does not need to be specified for each use of \fI\-:, \-\-next\fP.
 
-This option does not imply \fI-f, --fail\fP, which causes transfers to fail due to the
-server's HTTP status code. You can combine the two options, however note \fI-f, --fail\fP
-is not global and is therefore contained by \fI-:, --next\fP.
+This option does not imply \fI\-f, \-\-fail\fP, which causes transfers to fail due to the
+server's HTTP status code. You can combine the two options, however note \fI\-f, \-\-fail\fP
+is not global and is therefore contained by \fI\-:, \-\-next\fP.
 
 Added in 7.52.0.
-.IP "-f, --fail"
+.IP "\-\-fail-with-body"
+(HTTP) 
+Return an error on server errors where the HTTP response code is 400 or
+greater). In normal cases when an HTTP server fails to deliver a document, it
+returns an HTML document stating so (which often also describes why and
+more). This flag will still allow curl to output and save that content but
+also to return error 22.
+
+This is an alternative option to \fI\-f, \-\-fail\fP which makes curl fail for the same
+circumstances but without saving the content.
+
+See also \fI-f, --fail\fP. Added in 7.76.0.
+.IP "\-f, \-\-fail"
 (HTTP) Fail silently (no output at all) on server errors. This is mostly done to
-better enable scripts etc to better deal with failed attempts. In normal cases
+enable scripts etc to better deal with failed attempts. In normal cases
 when an HTTP server fails to deliver a document, it returns an HTML document
 stating so (which often also describes why and more). This flag will prevent
 curl from outputting that and return error 22.
@@ -800,7 +853,9 @@
 This method is not fail-safe and there are occasions where non-successful
 response codes will slip through, especially when authentication is involved
 (response codes 401 and 407).
-.IP "--false-start"
+
+See also \fI--fail-with-body\fP.
+.IP "\-\-false-start"
 (TLS) Tells curl to use false start during the TLS handshake. False start is a mode
 where a TLS client will start sending application data before verifying the
 server's Finished message, thus saving a round trip when performing a full
@@ -810,20 +865,20 @@
 or later, or OS X 10.9 or later) backends.
 
 Added in 7.42.0.
-.IP "--form-string <name=string>"
-(HTTP SMTP IMAP) Similar to \fI-F, --form\fP except that the value string for the named parameter is used
+.IP "\-\-form-string <name=string>"
+(HTTP SMTP IMAP) Similar to \fI\-F, \-\-form\fP except that the value string for the named parameter is used
 literally. Leading \&'@' and \&'<' characters, and the \&';type=' string in
-the value have no special meaning. Use this in preference to \fI-F, --form\fP if
+the value have no special meaning. Use this in preference to \fI\-F, \-\-form\fP if
 there's any possibility that the string value may accidentally trigger the
-\&'@' or \&'<' features of \fI-F, --form\fP.
+\&'@' or \&'<' features of \fI\-F, \-\-form\fP.
 
 See also \fI-F, --form\fP.
-.IP "-F, --form <name=content>"
+.IP "\-F, \-\-form <name=content>"
 (HTTP SMTP IMAP) For HTTP protocol family, this lets curl emulate a filled-in form in which a
 user has pressed the submit button. This causes curl to POST data using the
 Content-Type multipart/form-data according to RFC 2388.
 
-For SMTP and IMAP protocols, this is the mean to compose a multipart mail
+For SMTP and IMAP protocols, this is the means to compose a multipart mail
 message to transmit.
 
 This enables uploading of binary files etc. To force the 'content' part to be
@@ -833,7 +888,7 @@
 the < makes a text field and just get the contents for that text field from a
 file.
 
-Tell curl to read content from stdin instead of a file by using - as
+Tell curl to read content from stdin instead of a file by using \- as
 filename. This goes for both @ and < constructs. When stdin is used, the
 contents is buffered in memory first by curl to determine its size and allow a
 possible resend.  Defining a part's data from a named non-regular file (such
@@ -845,38 +900,38 @@
 Example: send an image to an HTTP server, where \&'profile' is the name of the
 form-field to which the file portrait.jpg will be the input:
 
- curl -F profile=@portrait.jpg https://example.com/upload.cgi
+ curl \-F profile=@portrait.jpg https://example.com/upload.cgi
 
 Example: send your name and shoe size in two text fields to the server:
 
- curl -F name=John -F shoesize=11 https://example.com/
+ curl \-F name=John \-F shoesize=11 https://example.com/
 
 Example: send your essay in a text field to the server. Send it as a plain
 text field, but get the contents for it from a local file:
 
- curl -F "story=<hugefile.txt" https://example.com/
+ curl \-F "story=<hugefile.txt" https://example.com/
 
 You can also tell curl what Content-Type to use by using 'type=', in a manner
 similar to:
 
- curl -F "web=@index.html;type=text/html" example.com
+ curl \-F "web=@index.html;type=text/html" example.com
 
 or
 
- curl -F "name=daniel;type=text/foo" example.com
+ curl \-F "name=daniel;type=text/foo" example.com
 
 You can also explicitly change the name field of a file upload part by setting
 filename=, like this:
 
- curl -F "file=@localfile;filename=nameinpost" example.com
+ curl \-F "file=@localfile;filename=nameinpost" example.com
 
 If filename/path contains ',' or ';', it must be quoted by double-quotes like:
 
- curl -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" example.com
+ curl \-F "file=@\\"local,file\\";filename=\\"name;in;post\\"" example.com
 
 or
 
- curl -F 'file=@"localfile";filename="nameinpost"' example.com
+ curl \-F 'file=@"local,file";filename="name;in;post"' example.com
 
 Note that if a filename/path is quoted by double-quotes, any double-quote
 or backslash within the filename must be escaped by backslash.
@@ -884,15 +939,15 @@
 Quoting must also be applied to non-file data if it contains semicolons,
 leading/trailing spaces or leading double quotes:
 
- curl -F 'colors="red; green; blue";type=text/x-myapp' example.com
+ curl \-F 'colors="red; green; blue";type=text/x-myapp' example.com
 
 You can add custom headers to the field by setting headers=, like
 
-  curl -F "submit=OK;headers=\\"X-submit-type: OK\\"" example.com
+  curl \-F "submit=OK;headers=\\"X-submit-type: OK\\"" example.com
 
 or
 
-  curl -F "submit=OK;headers=@headerfile" example.com
+  curl \-F "submit=OK;headers=@headerfile" example.com
 
 The headers= keyword may appear more that once and above notes about quoting
 apply. When headers are read from a file, Empty lines and lines starting
@@ -914,65 +969,65 @@
 
 To support sending multipart mail messages, the syntax is extended as follows:
 .br
-- name can be omitted: the equal sign is the first character of the argument,
+\- name can be omitted: the equal sign is the first character of the argument,
 .br
-- if data starts with '(', this signals to start a new multipart: it can be
+\- if data starts with '(', this signals to start a new multipart: it can be
 followed by a content type specification.
 .br
-- a multipart can be terminated with a '=)' argument.
+\- a multipart can be terminated with a '=)' argument.
 
 Example: the following command sends an SMTP mime e-mail consisting in an
 inline part in two alternative formats: plain text and HTML. It attaches a
 text file:
 
- curl -F '=(;type=multipart/alternative' \\
+ curl \-F '=(;type=multipart/alternative' \\
 .br
-         -F '=plain text message' \\
+         \-F '=plain text message' \\
 .br
-         -F '= <body>HTML message</body>;type=text/html' \\
+         \-F '= <body>HTML message</body>;type=text/html' \\
 .br
-      -F '=)' -F '=@textfile.txt' ...  smtp://example.com
+      \-F '=)' \-F '=@textfile.txt' ...  smtp://example.com
 
 Data can be encoded for transfer using encoder=. Available encodings are
 \fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding
 Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters
-with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes
-data according to the corresponding schemes, limiting lines length to
-76 characters.
+with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes data
+according to the corresponding schemes, limiting lines length to 76
+characters.
 
 Example: send multipart mail with a quoted-printable text message and a
 base64 attached file:
 
- curl -F '=text message;encoder=quoted-printable' \\
+ curl \-F '=text message;encoder=quoted-printable' \\
 .br
-      -F '=@localfile;encoder=base64' ... smtp://example.com
+      \-F '=@localfile;encoder=base64' ... smtp://example.com
 
 See further examples and details in the MANUAL.
 
 This option can be used multiple times.
 
 This option overrides \fI-d, --data\fP and \fI-I, --head\fP and \fI-T, --upload-file\fP.
-.IP "--ftp-account <data>"
+.IP "\-\-ftp-account <data>"
 (FTP) When an FTP server asks for "account data" after user name and password has
 been provided, this data is sent off using the ACCT command.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.13.0.
-.IP "--ftp-alternative-to-user <command>"
+.IP "\-\-ftp-alternative-to-user <command>"
 (FTP) If authenticating with the USER and PASS commands fails, send this command.
 When connecting to Tumbleweed's Secure Transport server over FTPS using a
 client certificate, using "SITE AUTH" will tell the server to retrieve the
 username from the certificate.
 
 Added in 7.15.5.
-.IP "--ftp-create-dirs"
+.IP "\-\-ftp-create-dirs"
 (FTP SFTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on
 the server, the standard behavior of curl is to fail. Using this option, curl
 will instead attempt to create missing directories.
 
 See also \fI--create-dirs\fP.
-.IP "--ftp-method <method>"
+.IP "\-\-ftp-method <method>"
 (FTP) Control what method curl should use to reach a file on an FTP(S)
 server. The method argument should be one of the following alternatives:
 .RS
@@ -990,20 +1045,20 @@
 .RE
 
 Added in 7.15.1.
-.IP "--ftp-pasv"
+.IP "\-\-ftp-pasv"
 (FTP) Use passive mode for the data connection. Passive is the internal default
-behavior, but using this option can be used to override a previous \fI-P, --ftp-port\fP
+behavior, but using this option can be used to override a previous \fI\-P, \-\-ftp-port\fP
 option.
 
 If this option is used several times, only the first one is used. Undoing an
 enforced passive really isn't doable but you must then instead enforce the
-correct \fI-P, --ftp-port\fP again.
+correct \fI\-P, \-\-ftp-port\fP again.
 
 Passive mode means that curl will try the EPSV command first and then PASV,
-unless \fI--disable-epsv\fP is used.
+unless \fI\-\-disable-epsv\fP is used.
 
 See also \fI--disable-epsv\fP. Added in 7.11.0.
-.IP "-P, --ftp-port <address>"
+.IP "\-P, \-\-ftp-port <address>"
 (FTP) Reverses the default initiator/listener roles when connecting with FTP. This
 option makes curl use active mode. curl then tells the server to connect back
 to the client's specified address and port, while passive mode asks the server
@@ -1022,8 +1077,8 @@
 .RE
 
 If this option is used several times, the last one will be used. Disable the
-use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
-instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
+use of PORT with \fI\-\-ftp-pasv\fP. Disable the attempt to use the EPRT command
+instead of PORT by using \fI\-\-disable-eprt\fP. EPRT is really PORT++.
 
 Since 7.19.5, you can append \&":[start]-[end]\&" to the right of the address,
 to tell curl what TCP port range to use. That means you specify a port range,
@@ -1031,59 +1086,61 @@
 that it increases the risk of failure since the port may not be available.
 
 See also \fI--ftp-pasv\fP and \fI--disable-eprt\fP.
-.IP "--ftp-pret"
+.IP "\-\-ftp-pret"
 (FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers,
 mainly drftpd, require this non-standard command for directory listings as
 well as up and downloads in PASV mode.
 
 Added in 7.20.0.
-.IP "--ftp-skip-pasv-ip"
+.IP "\-\-ftp-skip-pasv-ip"
 (FTP) Tell curl to not use the IP address the server suggests in its response
 to curl's PASV command when curl connects the data connection. Instead curl
 will re-use the same IP address it already uses for the control
 connection.
 
+Since curl 7.74.0 this option is enabled by default.
+
 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
 
 See also \fI--ftp-pasv\fP. Added in 7.14.2.
-.IP "--ftp-ssl-ccc-mode <active/passive>"
+.IP "\-\-ftp-ssl-ccc-mode <active/passive>"
 (FTP) Sets the CCC mode. The passive mode will not initiate the shutdown, but
 instead wait for the server to do it, and will not reply to the shutdown from
 the server. The active mode initiates the shutdown and waits for a reply from
 the server.
 
 See also \fI--ftp-ssl-ccc\fP. Added in 7.16.2.
-.IP "--ftp-ssl-ccc"
+.IP "\-\-ftp-ssl-ccc"
 (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after
 authenticating. The rest of the control channel communication will be
 unencrypted. This allows NAT routers to follow the FTP transaction. The
 default mode is passive.
 
 See also \fI--ssl\fP and \fI--ftp-ssl-ccc-mode\fP. Added in 7.16.1.
-.IP "--ftp-ssl-control"
+.IP "\-\-ftp-ssl-control"
 (FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure
 authentication, but non-encrypted data transfers for efficiency.  Fails the
 transfer if the server doesn't support SSL/TLS.
 
 Added in 7.16.0.
-.IP "-G, --get"
-When used, this option will make all data specified with \fI-d, --data\fP, \fI--data-binary\fP
-or \fI--data-urlencode\fP to be used in an HTTP GET request instead of the POST
+.IP "\-G, \-\-get"
+When used, this option will make all data specified with \fI\-d, \-\-data\fP, \fI\-\-data-binary\fP
+or \fI\-\-data-urlencode\fP to be used in an HTTP GET request instead of the POST
 request that otherwise would be used. The data will be appended to the URL
 with a '?' separator.
 
-If used in combination with \fI-I, --head\fP, the POST data will instead be appended to
+If used in combination with \fI\-I, \-\-head\fP, the POST data will instead be appended to
 the URL with a HEAD request.
 
 If this option is used several times, only the first one is used. This is
 because undoing a GET doesn't make sense, but you should then instead enforce
 the alternative method you prefer.
-.IP "-g, --globoff"
+.IP "\-g, \-\-globoff"
 This option switches off the "URL globbing parser". When you set this option,
-you can specify URLs that contain the letters {}[] without having them being
-interpreted by curl itself. Note that these letters are not normal legal URL
-contents but they should be encoded according to the URI standard.
-.IP "--happy-eyeballs-timeout-ms <milliseconds>"
+you can specify URLs that contain the letters {}[] without having curl itself
+interpret them. Note that these letters are not normal legal URL contents but
+they should be encoded according to the URI standard.
+.IP "\-\-happy-eyeballs-timeout-ms <milliseconds>"
 Happy eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6
 addresses for dual-stack hosts, preferring IPv6 first for the number of
 milliseconds. If the IPv6 address cannot be connected to within that time then
@@ -1098,7 +1155,7 @@
 If this option is used several times, the last one will be used.
 
 Added in 7.59.0.
-.IP "--haproxy-protocol"
+.IP "\-\-haproxy-protocol"
 (HTTP) Send a HAProxy PROXY protocol v1 header at the beginning of the connection. This
 is used by some load balancers and reverse proxies to indicate the client's
 true IP address and port.
@@ -1107,11 +1164,11 @@
 expects this header.
 
 Added in 7.60.0.
-.IP "-I, --head"
+.IP "\-I, \-\-head"
 (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses
 to get nothing but the header of a document. When used on an FTP or FILE file,
 curl displays the file size and last modification time only.
-.IP "-H, --header <header/@file>"
+.IP "\-H, \-\-header <header/@file>"
 (HTTP) Extra header to include in the request when sending HTTP to a server. You may
 specify any number of extra headers. Note that if you should add a custom
 header that has the same name as one of the internal ones curl would use, your
@@ -1119,104 +1176,123 @@
 you to make even trickier stuff than curl would normally do. You should not
 replace internally set headers without knowing perfectly well what you're
 doing. Remove an internal header by giving a replacement without content on
-the right side of the colon, as in: -H \&"Host:". If you send the custom
+the right side of the colon, as in: \-H \&"Host:". If you send the custom
 header with no-value then its header must be terminated with a semicolon, such
 as \-H \&"X-Custom-Header;" to send "X-Custom-Header:".
 
 curl will make sure that each header you add/replace is sent with the proper
 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
-content: do not add newlines or carriage returns, they will only mess things up
-for you.
+content: do not add newlines or carriage returns, they will only mess things
+up for you.
 
-Starting in 7.55.0, this option can take an argument in @filename style, which
-then adds a header for each line in the input file. Using @- will make curl
-read the header file from stdin.
+This option can take an argument in @filename style, which then adds a header
+for each line in the input file. Using @- will make curl read the header file
+from stdin. Added in 7.55.0.
 
-See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
+You need \fI\-\-proxy-header\fP to send custom headers intended for a HTTP
+proxy. Added in 7.37.0.
 
-Starting in 7.37.0, you need \fI--proxy-header\fP to send custom headers intended
-for a proxy.
+Passing on a "Transfer-Encoding: chunked" header when doing a HTTP request
+with a request body, will make curl send the data using chunked encoding.
 
 Example:
 
- curl -H "X-First-Name: Joe" http://example.com/
+ curl \-H "X-First-Name: Joe" http://example.com/
 
-\fBWARNING\fP: headers set with this option will be set in all requests - even
-after redirects are followed, like when told with \fI-L, --location\fP. This can lead to
+\fBWARNING\fP: headers set with this option will be set in all requests \- even
+after redirects are followed, like when told with \fI\-L, \-\-location\fP. This can lead to
 the header being sent to other hosts than the original host, so sensitive
 headers should be used with caution combined with following redirects.
 
 This option can be used multiple times to add/replace/remove multiple headers.
-.IP "-h, --help <category>"
+
+See also \fI-A, --user-agent\fP and \fI-e, --referer\fP.
+.IP "\-h, \-\-help <category>"
 Usage help. This lists all commands of the <category>.
 If no arg was provided, curl will display the most important
-command line arguments and the list of categories.
+command line arguments.
 If the argument "all" was provided, curl will display all options available.
 If the argument "category" was provided, curl will display all categories and
 their meanings.
-.IP "--hostpubmd5 <md5>"
+.IP "\-\-hostpubmd5 <md5>"
 (SFTP SCP) Pass a string containing 32 hexadecimal digits. The string should
 be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
 the connection with the host unless the md5sums match.
 
 Added in 7.17.1.
-.IP "--http0.9"
+.IP "\-\-hsts <file name>"
+(HTTPS) WARNING: this option is experimental. Do not use in production.
+
+This option enables HSTS for the transfer. If the file name points to an
+existing HSTS cache file, that will be used. After a completed transfer, the
+cache will be saved to the file name again if it has been modified.
+
+Specify a "" file name (zero length) to avoid loading/saving and make curl
+just handle HSTS in memory.
+
+If this option is used several times, curl will load contents from all the
+files but the last one will be used for saving.
+
+Added in 7.74.0.
+.IP "\-\-http0.9"
 (HTTP) Tells curl to be fine with HTTP version 0.9 response.
 
 HTTP/0.9 is a completely headerless response and therefore you can also
 connect with this to non-HTTP servers and still get a response since curl will
-simply transparently downgrade - if allowed.
+simply transparently downgrade \- if allowed.
 
 Since curl 7.66.0, HTTP/0.9 is disabled by default.
-.IP "-0, --http1.0"
+.IP "\-0, \-\-http1.0"
 (HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred
 HTTP version.
 
 This option overrides \fI--http1.1\fP and \fI--http2\fP.
-.IP "--http1.1"
+.IP "\-\-http1.1"
 (HTTP) Tells curl to use HTTP version 1.1.
 
 This option overrides \fI-0, --http1.0\fP and \fI--http2\fP. Added in 7.33.0.
-.IP "--http2-prior-knowledge"
+.IP "\-\-http2-prior-knowledge"
 (HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1
 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight
 away. HTTPS requests will still do HTTP/2 the standard way with negotiated
 protocol version in the TLS handshake.
 
 \fI--http2-prior-knowledge\fP requires that the underlying libcurl was built to support HTTP/2. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2\fP. Added in 7.49.0.
-.IP "--http2"
+.IP "\-\-http2"
 (HTTP) Tells curl to use HTTP version 2.
 
 See also \fI--http1.1\fP and \fI--http3\fP. \fI--http2\fP requires that the underlying libcurl was built to support HTTP/2. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2-prior-knowledge\fP. Added in 7.33.0.
-.IP "--http3"
+.IP "\-\-http3"
 (HTTP) 
 WARNING: this option is experimental. Do not use in production.
 
 Tells curl to use HTTP version 3 directly to the host and port number used in
 the URL. A normal HTTP/3 transaction will be done to a host and then get
-redirected via Alt-SVc, but this option allows a user to circumvent that when
+redirected via Alt-Svc, but this option allows a user to circumvent that when
 you know that the target speaks HTTP/3 on the given host and port.
 
 This option will make curl fail if a QUIC connection cannot be established, it
 cannot fall back to a lower HTTP version on its own.
 
 See also \fI--http1.1\fP and \fI--http2\fP. \fI--http3\fP requires that the underlying libcurl was built to support HTTP/3. This option overrides \fI--http1.1\fP and \fI-0, --http1.0\fP and \fI--http2\fP and \fI--http2-prior-knowledge\fP. Added in 7.66.0.
-.IP "--ignore-content-length"
+.IP "\-\-ignore-content-length"
 (FTP HTTP) For HTTP, Ignore the Content-Length header. This is particularly useful for
 servers running Apache 1.x, which will report incorrect Content-Length for
 files larger than 2 gigabytes.
 
 For FTP (since 7.46.0), skip the RETR command to figure out the size before
 downloading a file.
-.IP "-i, --include"
+
+This option doesn't work if libcurl was built to use hyper for HTTP.
+.IP "\-i, \-\-include"
 Include the HTTP response headers in the output. The HTTP response headers can
 include things like server name, cookies, date of the document, HTTP version
 and more...
 
-To view the request headers, consider the \fI-v, --verbose\fP option.
+To view the request headers, consider the \fI\-v, \-\-verbose\fP option.
 
 See also \fI-v, --verbose\fP.
-.IP "-k, --insecure"
+.IP "\-k, \-\-insecure"
 (TLS) 
 By default, every SSL connection curl makes is verified to be secure. This
 option allows curl to proceed and operate even for server connections
@@ -1226,15 +1302,15 @@
 contains the right name and verifies successfully using the cert store.
 
 See this online resource for further details:
- https://curl.haxx.se/docs/sslcerts.html
+ https://curl.se/docs/sslcerts.html
 
 See also \fI--proxy-insecure\fP and \fI--cacert\fP.
-.IP "--interface <name>"
+.IP "\-\-interface <name>"
 
 Perform an operation using a specified interface. You can enter interface
 name, IP address or host name. An example could look like:
 
- curl --interface eth0:1 https://www.example.com/
+ curl \-\-interface eth0:1 https://www.example.com/
 
 If this option is used several times, the last one will be used.
 
@@ -1243,40 +1319,40 @@
 https://www.kernel.org/doc/Documentation/networking/vrf.txt
 
 See also \fI--dns-interface\fP.
-.IP "-4, --ipv4"
+.IP "\-4, \-\-ipv4"
 This option tells curl to resolve names to IPv4 addresses only, and not for
 example try IPv6.
 
 See also \fI--http1.1\fP and \fI--http2\fP. This option overrides \fI-6, --ipv6\fP.
-.IP "-6, --ipv6"
+.IP "\-6, \-\-ipv6"
 This option tells curl to resolve names to IPv6 addresses only, and not for
 example try IPv4.
 
 See also \fI--http1.1\fP and \fI--http2\fP. This option overrides \fI-4, --ipv4\fP.
-.IP "-j, --junk-session-cookies"
+.IP "\-j, \-\-junk-session-cookies"
 (HTTP) When curl is told to read cookies from a given file, this option will make it
 discard all "session cookies". This will basically have the same effect as if
 a new session is started. Typical browsers always discard session cookies when
 they're closed down.
 
 See also \fI-b, --cookie\fP and \fI-c, --cookie-jar\fP.
-.IP "--keepalive-time <seconds>"
+.IP "\-\-keepalive-time <seconds>"
 This option sets the time a connection needs to remain idle before sending
 keepalive probes and the time between individual keepalive probes. It is
 currently effective on operating systems offering the TCP_KEEPIDLE and
 TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
-option has no effect if \fI--no-keepalive\fP is used.
+option has no effect if \fI\-\-no-keepalive\fP is used.
 
 If this option is used several times, the last one will be used. If
 unspecified, the option defaults to 60 seconds.
 
 Added in 7.18.0.
-.IP "--key-type <type>"
-(TLS) Private key file type. Specify which type your \fI--key\fP provided private key
+.IP "\-\-key-type <type>"
+(TLS) Private key file type. Specify which type your \fI\-\-key\fP provided private key
 is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
 
 If this option is used several times, the last one will be used.
-.IP "--key <key>"
+.IP "\-\-key <key>"
 (TLS SSH) Private key file name. Allows you to provide your private key in this separate
 file. For SSH, if not specified, curl tries the following candidates in order:
 \&'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
@@ -1284,12 +1360,12 @@
 If curl is built against OpenSSL library, and the engine pkcs11 is available,
 then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a
 PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
-PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI--engine\fP option will be set
-as "pkcs11" if none was provided and the \fI--key-type\fP option will be set as
+PKCS#11 URI. If a PKCS#11 URI is provided, then the \fI\-\-engine\fP option will be set
+as "pkcs11" if none was provided and the \fI\-\-key-type\fP option will be set as
 "ENG" if none was provided.
 
 If this option is used several times, the last one will be used.
-.IP "--krb <level>"
+.IP "\-\-krb <level>"
 (FTP) Enable Kerberos authentication and use. The level must be entered and should
 be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a
 level that is not one of these, 'private' will instead be used.
@@ -1297,8 +1373,8 @@
 If this option is used several times, the last one will be used.
 
 \fI--krb\fP requires that the underlying libcurl was built to support Kerberos.
-.IP "--libcurl <file>"
-Append this option to any ordinary curl command line, and you will get a
+.IP "\-\-libcurl <file>"
+Append this option to any ordinary curl command line, and you will get
 libcurl-using C source code written to the file that does the equivalent
 of what your command-line operation does!
 
@@ -1306,8 +1382,8 @@
 used.
 
 Added in 7.16.1.
-.IP "--limit-rate <speed>"
-Specify the maximum transfer rate you want curl to use - for both downloads
+.IP "\-\-limit-rate <speed>"
+Specify the maximum transfer rate you want curl to use \- for both downloads
 and uploads. This feature is useful if you have a limited pipe and you'd like
 your transfer not to use your entire bandwidth. To make it slower than it
 otherwise would be.
@@ -1316,17 +1392,17 @@
 Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it
 megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
 
-If you also use the \fI-Y, --speed-limit\fP option, that option will take precedence and
+If you also use the \fI\-Y, \-\-speed-limit\fP option, that option will take precedence and
 might cripple the rate-limiting slightly, to help keeping the speed-limit
 logic working.
 
 If this option is used several times, the last one will be used.
-.IP "-l, --list-only"
+.IP "\-l, \-\-list-only"
 (FTP POP3) (FTP)
 When listing an FTP directory, this switch forces a name-only view. This is
 especially useful if the user wants to machine-parse the contents of an FTP
 directory since the normal directory view doesn't use a standard look or
-format. When used like this, the option causes a NLST command to be sent to
+format. When used like this, the option causes an NLST command to be sent to
 the server instead of LIST.
 
 Note: Some FTP servers list only files in their response to NLST; they do not
@@ -1335,37 +1411,37 @@
 (POP3)
 When retrieving a specific email from POP3, this switch forces a LIST command
 to be performed instead of RETR. This is particularly useful if the user wants
-to see if a specific message id exists on the server and what size it is.
+to see if a specific message-id exists on the server and what size it is.
 
-Note: When combined with \fI-X, --request\fP, this option can be used to send an UIDL
+Note: When combined with \fI\-X, \-\-request\fP, this option can be used to send a UIDL
 command instead, so the user may use the email's unique identifier rather than
-it's message id to make the request.
+its message-id to make the request.
 
 Added in 4.0.
-.IP "--local-port <num/range>"
+.IP "\-\-local-port <num/range>"
 Set a preferred single number or range (FROM-TO) of local port numbers to use
 for the connection(s).  Note that port numbers by nature are a scarce resource
 that will be busy at times so setting this range to something too narrow might
 cause unnecessary connection setup failures.
 
 Added in 7.15.2.
-.IP "--location-trusted"
-(HTTP) Like \fI-L, --location\fP, but will allow sending the name + password to all hosts that
+.IP "\-\-location-trusted"
+(HTTP) Like \fI\-L, \-\-location\fP, but will allow sending the name + password to all hosts that
 the site may redirect to. This may or may not introduce a security breach if
 the site redirects you to a site to which you'll send your authentication info
 (which is plaintext in the case of HTTP Basic authentication).
 
 See also \fI-u, --user\fP.
-.IP "-L, --location"
+.IP "\-L, \-\-location"
 (HTTP) If the server reports that the requested page has moved to a different
 location (indicated with a Location: header and a 3XX response code), this
 option will make curl redo the request on the new place. If used together with
-\fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages will be shown. When
+\fI\-i, \-\-include\fP or \fI\-I, \-\-head\fP, headers from all requested pages will be shown. When
 authentication is used, curl only sends its credentials to the initial
 host. If a redirect takes curl to a different host, it won't be able to
-intercept the user+password. See also \fI--location-trusted\fP on how to change
+intercept the user+password. See also \fI\-\-location-trusted\fP on how to change
 this. You can limit the amount of redirects to follow by using the
-\fI--max-redirs\fP option.
+\fI\-\-max-redirs\fP option.
 
 When curl follows a redirect and if the request is a POST, it will do the
 following request with a GET if the HTTP response was 301, 302, or 303. If the
@@ -1373,44 +1449,44 @@
 using the same unmodified method.
 
 You can tell curl to not change POST requests to GET after a 30x response by
-using the dedicated options for that: \fI--post301\fP, \fI--post302\fP and \fI--post303\fP.
+using the dedicated options for that: \fI\-\-post301\fP, \fI\-\-post302\fP and \fI\-\-post303\fP.
 
-The method set with \fI-X, --request\fP overrides the method curl would otherwise select
+The method set with \fI\-X, \-\-request\fP overrides the method curl would otherwise select
 to use.
-.IP "--login-options <options>"
+.IP "\-\-login-options <options>"
 (IMAP POP3 SMTP) Specify the login options to use during server authentication.
 
-You can use the login options to specify protocol specific options that may
-be used during authentication. At present only IMAP, POP3 and SMTP support
-login options. For more information about the login options please see
-RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
+You can use login options to specify protocol specific options that may be
+used during authentication. At present only IMAP, POP3 and SMTP support
+login options. For more information about login options please see RFC
+2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
 
 If this option is used several times, the last one will be used.
 
 Added in 7.34.0.
-.IP "--mail-auth <address>"
+.IP "\-\-mail-auth <address>"
 (SMTP) Specify a single address. This will be used to specify the authentication
 address (identity) of a submitted message that is being relayed to another
 server.
 
 See also \fI--mail-rcpt\fP and \fI--mail-from\fP. Added in 7.25.0.
-.IP "--mail-from <address>"
+.IP "\-\-mail-from <address>"
 (SMTP) Specify a single address that the given mail should get sent from.
 
 See also \fI--mail-rcpt\fP and \fI--mail-auth\fP. Added in 7.20.0.
-.IP "--mail-rcpt-allowfails"
+.IP "\-\-mail-rcpt-allowfails"
 (SMTP) When sending data to multiple recipients, by default curl will abort SMTP
 conversation if at least one of the recipients causes RCPT TO command to
 return an error.
 
-The default behavior can be changed by passing \fI--mail-rcpt-allowfails\fP
+The default behavior can be changed by passing \fI\-\-mail-rcpt-allowfails\fP
 command-line option which will make curl ignore errors and proceed with the
 remaining valid recipients.
 
 In case when all recipients cause RCPT TO command to fail, curl will abort SMTP
 conversation and return the error received from to the last RCPT TO command.
 Added in 7.69.0.
-.IP "--mail-rcpt <address>"
+.IP "\-\-mail-rcpt <address>"
 (SMTP) Specify a single address, user name or mailing list name. Repeat this
 option several times to send to multiple recipients.
 
@@ -1426,9 +1502,9 @@
 (Added in 7.34.0)
 
 Added in 7.20.0.
-.IP "-M, --manual"
+.IP "\-M, \-\-manual"
 Manual. Display the huge help text.
-.IP "--max-filesize <bytes>"
+.IP "\-\-max-filesize <bytes>"
 Specify the maximum size (in bytes) of a file to download. If the file
 requested is larger than this value, the transfer will not start and curl will
 return with exit code 63.
@@ -1437,18 +1513,18 @@
 number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
 gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
 
-\fBNOTE:\fP The file size is not always known prior to download, and for such
-files this option has no effect even if the file transfer ends up being larger
-than this given limit. This concerns both FTP and HTTP transfers.
+\fBNOTE\fP: For protocols where the size is not known in advance (including FTP
+and HTTP) this option has no effect even if the file transfer ends up being
+larger than the given limit.
 
 See also \fI--limit-rate\fP.
-.IP "--max-redirs <num>"
-(HTTP) Set maximum number of redirection-followings allowed. When \fI-L, --location\fP is used,
-is used to prevent curl from following redirections too much. By default, the
-limit is set to 50 redirections. Set this option to -1 to make it unlimited.
+.IP "\-\-max-redirs <num>"
+(HTTP) Set maximum number of redirections to follow. When \fI\-L, \-\-location\fP is used, to
+prevent curl from following too many redirects, by default, the limit is
+set to 50 redirects. Set this option to \-1 to make it unlimited.
 
 If this option is used several times, the last one will be used.
-.IP "-m, --max-time <seconds>"
+.IP "\-m, \-\-max-time <seconds>"
 Maximum time in seconds that you allow the whole operation to take.  This is
 useful for preventing your batch jobs from hanging for hours due to slow
 networks or links going down.  Since 7.32.0, this option accepts decimal
@@ -1458,121 +1534,102 @@
 If this option is used several times, the last one will be used.
 
 See also \fI--connect-timeout\fP.
-.IP "--metalink"
-This option can tell curl to parse and process a given URI as Metalink file
-(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
-listed within for failover if there are errors (such as the file or server not
-being available). It will also verify the hash of the file after the download
-completes. The Metalink file itself is downloaded and processed in memory and
-not stored in the local file system.
+.IP "\-\-metalink"
+This option was previously used to specify a metalink resource. Metalink
+support has been disabled in curl since 7.78.0 for security reasons.
 
-Example to use a remote Metalink file:
-
- curl --metalink http://www.example.com/example.metalink
-
-To use a Metalink file in the local file system, use FILE protocol (file://):
-
- curl --metalink file://example.metalink
-
-Please note that if FILE protocol is disabled, there is no way to use a local
-Metalink file at the time of this writing. Also note that if \fI--metalink\fP and
-\fI-i, --include\fP are used together, --include will be ignored. This is because
-including headers in the response will break Metalink parser and if the
-headers are included in the file described in Metalink file, hash check will
-fail.
-
-\fI--metalink\fP requires that the underlying libcurl was built to support metalink. Added in 7.27.0.
-.IP "--negotiate"
+Added in 7.27.0.
+.IP "\-\-negotiate"
 (HTTP) Enables Negotiate (SPNEGO) authentication.
 
 This option requires a library built with GSS-API or SSPI support. Use
-\fI-V, --version\fP to see if your curl supports GSS-API/SSPI or SPNEGO.
+\fI\-V, \-\-version\fP to see if your curl supports GSS-API/SSPI or SPNEGO.
 
-When using this option, you must also provide a fake \fI-u, --user\fP option to activate
+When using this option, you must also provide a fake \fI\-u, \-\-user\fP option to activate
 the authentication code properly. Sending a '-u :' is enough as the user name
-and password from the \fI-u, --user\fP option aren't actually used.
+and password from the \fI\-u, \-\-user\fP option aren't actually used.
 
 If this option is used several times, only the first one is used.
 
 See also \fI--basic\fP, \fI--ntlm\fP, \fI--anyauth\fP and \fI--proxy-negotiate\fP.
-.IP "--netrc-file <filename>"
-This option is similar to \fI-n, --netrc\fP, except that you provide the path (absolute
+.IP "\-\-netrc-file <filename>"
+This option is similar to \fI\-n, \-\-netrc\fP, except that you provide the path (absolute
 or relative) to the netrc file that curl should use.  You can only specify one
-netrc file per invocation. If several \fI--netrc-file\fP options are provided,
+netrc file per invocation. If several \fI\-\-netrc-file\fP options are provided,
 the last one will be used.
 
-It will abide by \fI--netrc-optional\fP if specified.
+It will abide by \fI\-\-netrc-optional\fP if specified.
 
 This option overrides \fI-n, --netrc\fP. Added in 7.21.5.
-.IP "--netrc-optional"
-Very similar to \fI-n, --netrc\fP, but this option makes the .netrc usage \fBoptional\fP
-and not mandatory as the \fI-n, --netrc\fP option does.
+.IP "\-\-netrc-optional"
+Very similar to \fI\-n, \-\-netrc\fP, but this option makes the .netrc usage \fBoptional\fP
+and not mandatory as the \fI\-n, \-\-netrc\fP option does.
 
 See also \fI--netrc-file\fP. This option overrides \fI-n, --netrc\fP.
-.IP "-n, --netrc"
-Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
-home directory for login name and password. This is typically used for FTP on
+.IP "\-n, \-\-netrc"
+Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's home
+directory for login name and password. This is typically used for FTP on
 Unix. If used with HTTP, curl will enable user authentication. See
-\fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
-complain if that file doesn't have the right permissions (it should not be
-either world- or group-readable). The environment variable "HOME" is used to
-find the home directory.
+\fInetrc(5)\fP and \fIftp(1)\fP for details on the file format. Curl will not
+complain if that file doesn't have the right permissions (it should be
+neither world- nor group-readable). The environment variable "HOME" is used
+to find the home directory.
 
 A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
 to FTP to the machine host.domain.com with user name \&'myself' and password
 \&'secret' should look similar to:
 
 .B "machine host.domain.com login myself password secret"
-.IP "-:, --next"
+.IP "\-:, \-\-next"
 Tells curl to use a separate operation for the following URL and associated
 options. This allows you to send several URL requests, each with their own
 specific options, for example, such as different user names or custom requests
 for each.
 
-\fI-:, --next\fP will reset all local options and only global ones will have their
-values survive over to the operation following the \fI-:, --next\fP instruction. Global
-options include \fI-v, --verbose\fP, \fI--trace\fP, \fI--trace-ascii\fP and \fI--fail-early\fP.
+\fI\-:, \-\-next\fP will reset all local options and only global ones will have their
+values survive over to the operation following the \fI\-:, \-\-next\fP instruction. Global
+options include \fI\-v, \-\-verbose\fP, \fI\-\-trace\fP, \fI\-\-trace-ascii\fP and \fI\-\-fail-early\fP.
 
 For example, you can do both a GET and a POST in a single command line:
 
- curl www1.example.com --next -d postthis www2.example.com
+ curl www1.example.com \-\-next \-d postthis www2.example.com
 
 Added in 7.36.0.
-.IP "--no-alpn"
+.IP "\-\-no-alpn"
 (HTTPS) Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
 with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
 HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
 
 See also \fI--no-npn\fP and \fI--http2\fP. \fI--no-alpn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0.
-.IP "-N, --no-buffer"
+.IP "\-N, \-\-no-buffer"
 Disables the buffering of the output stream. In normal work situations, curl
 will use a standard buffered output stream that will have the effect that it
 will output the data in chunks, not necessarily exactly when the data arrives.
 Using this option will disable that buffering.
 
 Note that this is the negated option name documented. You can thus use
---buffer to enforce the buffering.
-.IP "--no-keepalive"
+\-\-buffer to enforce the buffering.
+.IP "\-\-no-keepalive"
 Disables the use of keepalive messages on the TCP connection. curl otherwise
 enables them by default.
 
 Note that this is the negated option name documented. You can thus use
---keepalive to enforce keepalive.
-.IP "--no-npn"
+\-\-keepalive to enforce keepalive.
+.IP "\-\-no-npn"
 (HTTPS) Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
 with an SSL library that supports NPN. NPN is used by a libcurl that supports
 HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
 
 See also \fI--no-alpn\fP and \fI--http2\fP. \fI--no-npn\fP requires that the underlying libcurl was built to support TLS. Added in 7.36.0.
-.IP "--no-progress-meter"
+.IP "\-\-no-progress-meter"
 Option to switch off the progress meter output without muting or otherwise
-affecting warning and informational messages like \fI-s, --silent\fP does.
+affecting warning and informational messages like \fI\-s, \-\-silent\fP does.
 
 Note that this is the negated option name documented. You can thus use
---progress-meter to enable the progress meter again.
+\-\-progress-meter to enable the progress meter again.
 
 See also \fI-v, --verbose\fP and \fI-s, --silent\fP. Added in 7.67.0.
-.IP "--no-sessionid"
+.IP "\-\-no-sessionid"
 (TLS) Disable curl's use of SSL session-ID caching.  By default all transfers are
 done using the cache. Note that while nothing should ever get hurt by
 attempting to reuse SSL session-IDs, there seem to be broken SSL
@@ -1580,28 +1637,28 @@
 you to succeed.
 
 Note that this is the negated option name documented. You can thus use
---sessionid to enforce session-ID caching.
+\-\-sessionid to enforce session-ID caching.
 
 Added in 7.16.0.
-.IP "--noproxy <no-proxy-list>"
-Comma-separated list of hosts which do not use a proxy, if one is specified.
-The only wildcard is a single * character, which matches all hosts, and
-effectively disables the proxy. Each name in this list is matched as either
-a domain which contains the hostname, or the hostname itself. For example,
-local.com would match local.com, local.com:80, and www.local.com, but not
-www.notlocal.com.
+.IP "\-\-noproxy <no-proxy-list>"
+Comma-separated list of hosts for which not to use a proxy, if one is
+specified. The only wildcard is a single * character, which matches all hosts,
+and effectively disables the proxy. Each name in this list is matched as
+either a domain which contains the hostname, or the hostname itself. For
+example, local.com would match local.com, local.com:80, and www.local.com, but
+not www.notlocal.com.
 
 Since 7.53.0, This option overrides the environment variables that disable the
-proxy. If there's an environment variable disabling a proxy, you can set
-noproxy list to \&"" to override it.
+proxy ('no_proxy' and 'NO_PROXY'). If there's an environment variable
+disabling a proxy, you can set the noproxy list to \&"" to override it.
 
 Added in 7.19.4.
-.IP "--ntlm-wb"
-(HTTP) Enables NTLM much in the style \fI--ntlm\fP does, but hand over the authentication
+.IP "\-\-ntlm-wb"
+(HTTP) Enables NTLM much in the style \fI\-\-ntlm\fP does, but hand over the authentication
 to the separate binary ntlmauth application that is executed when needed.
 
 See also \fI--ntlm\fP and \fI--proxy-ntlm\fP.
-.IP "--ntlm"
+.IP "\-\-ntlm"
 (HTTP) Enables NTLM authentication. The NTLM authentication method was designed by
 Microsoft and is used by IIS web servers. It is a proprietary protocol,
 reverse-engineered by clever people and implemented in curl based on their
@@ -1610,93 +1667,93 @@
 method instead, such as Digest.
 
 If you want to enable NTLM for your proxy authentication, then use
-\fI--proxy-ntlm\fP.
+\fI\-\-proxy-ntlm\fP.
 
 If this option is used several times, only the first one is used.
 
 See also \fI--proxy-ntlm\fP. \fI--ntlm\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI--basic\fP and \fI--negotiate\fP and \fI--digest\fP and \fI--anyauth\fP.
-.IP "--oauth2-bearer <token>"
+.IP "\-\-oauth2-bearer <token>"
 (IMAP POP3 SMTP HTTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
 is used in conjunction with the user name which can be specified as part of
-the \fI--url\fP or \fI-u, --user\fP options.
+the \fI\-\-url\fP or \fI\-u, \-\-user\fP options.
 
 The Bearer Token and user name are formatted according to RFC 6750.
 
 If this option is used several times, the last one will be used.
-.IP "--output-dir <dir>"
+.IP "\-\-output-dir <dir>"
 
 This option specifies the directory in which files should be stored, when
-\fI-O, --remote-name\fP or \fI-o, --output\fP are used.
+\fI\-O, \-\-remote-name\fP or \fI\-o, \-\-output\fP are used.
 
 The given output directory is used for all URLs and output options on the
-command line, up until the first \fI-:, --next\fP.
+command line, up until the first \fI\-:, \-\-next\fP.
 
 If the specified target directory doesn't exist, the operation will fail
-unless \fI--create-dirs\fP is also used.
+unless \fI\-\-create-dirs\fP is also used.
 
 If this option is used multiple times, the last specified directory will be
 used.
 
 See also \fI-O, --remote-name\fP and \fI-J, --remote-header-name\fP. Added in 7.73.0.
-.IP "-o, --output <file>"
+.IP "\-o, \-\-output <file>"
 Write output to <file> instead of stdout. If you are using {} or [] to fetch
 multiple documents, you should quote the URL and you can use '#' followed by a
 number in the <file> specifier. That variable will be replaced with the current
 string for the URL being fetched. Like in:
 
- curl "http://{one,two}.example.com" -o "file_#1.txt"
+ curl "http://{one,two}.example.com" \-o "file_#1.txt"
 
 or use several variables like:
 
- curl "http://{site,host}.host[1-5].com" -o "#1_#2"
+ curl "http://{site,host}.host[1-5].com" \-o "#1_#2"
 
 You may use this option as many times as the number of URLs you have. For
 example, if you specify two URLs on the same command line, you can use it like
 this:
 
-  curl -o aa example.com -o bb example.net
+  curl \-o aa example.com \-o bb example.net
 
-and the order of the -o options and the URLs doesn't matter, just that the
-first -o is for the first URL and so on, so the above command line can also be
+and the order of the \-o options and the URLs doesn't matter, just that the
+first \-o is for the first URL and so on, so the above command line can also be
 written as
 
-  curl example.com example.net -o aa -o bb
+  curl example.com example.net \-o aa \-o bb
 
-See also the \fI--create-dirs\fP option to create the local directories
+See also the \fI\-\-create-dirs\fP option to create the local directories
 dynamically. Specifying the output as '-' (a single dash) will force the
 output to be done to stdout.
 
 See also \fI-O, --remote-name\fP, \fI--remote-name-all\fP and \fI-J, --remote-header-name\fP.
-.IP "--parallel-immediate"
+.IP "\-\-parallel-immediate"
 When doing parallel transfers, this option will instruct curl that it should
 rather prefer opening up more connections in parallel at once rather than
 waiting to see if new transfers can be added as multiplexed streams on another
 connection.
 
 See also \fI-Z, --parallel\fP and \fI--parallel-max\fP. Added in 7.68.0.
-.IP "--parallel-max"
-When asked to do parallel transfers, using \fI-Z, --parallel\fP, this option controls
+.IP "\-\-parallel-max <num>"
+When asked to do parallel transfers, using \fI\-Z, \-\-parallel\fP, this option controls
 the maximum amount of transfers to do simultaneously.
 
 The default is 50.
 
 See also \fI-Z, --parallel\fP. Added in 7.66.0.
-.IP "-Z, --parallel"
+.IP "\-Z, \-\-parallel"
 Makes curl perform its transfers in parallel as compared to the regular serial
 manner.
 
 Added in 7.66.0.
-.IP "--pass <phrase>"
-(SSH TLS) Passphrase for the private key
+.IP "\-\-pass <phrase>"
+(SSH TLS) Passphrase for the private key.
 
 If this option is used several times, the last one will be used.
-.IP "--path-as-is"
+.IP "\-\-path-as-is"
 Tell curl to not handle sequences of /../ or /./ in the given URL
 path. Normally curl will squash or merge them according to standards but with
 this option set you tell it not to do that.
 
 Added in 7.42.0.
-.IP "--pinnedpubkey <hashes>"
+.IP "\-\-pinnedpubkey <hashes>"
 (TLS) Tells curl to use the specified public key file (or hashes) to verify the
 peer. This can be a path to a file which contains a single public key in PEM
 or DER format, or any number of base64 encoded sha256 hashes preceded by
@@ -1708,40 +1765,47 @@
 abort the connection before sending or receiving any data.
 
 PEM/DER support:
-  7.39.0: OpenSSL, GnuTLS and GSKit
-  7.43.0: NSS and wolfSSL
-  7.47.0: mbedtls
+
+7.39.0: OpenSSL, GnuTLS and GSKit
+
+7.43.0: NSS and wolfSSL
+
+7.47.0: mbedtls
+
 sha256 support:
-  7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
-  7.47.0: mbedtls
+
+7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
+
+7.47.0: mbedtls
+
 Other SSL backends not supported.
 
 If this option is used several times, the last one will be used.
-.IP "--post301"
+.IP "\-\-post301"
 (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET
-requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
+requests when following a 301 redirection. The non-RFC behavior is ubiquitous
 in web browsers, so curl does the conversion by default to maintain
 consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L, --location\fP.
+a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
 
 See also \fI--post302\fP, \fI--post303\fP and \fI-L, --location\fP. Added in 7.17.1.
-.IP "--post302"
+.IP "\-\-post302"
 (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET
-requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
+requests when following a 302 redirection. The non-RFC behavior is ubiquitous
 in web browsers, so curl does the conversion by default to maintain
 consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L, --location\fP.
+a redirection. This option is meaningful only when using \fI\-L, \-\-location\fP.
 
 See also \fI--post301\fP, \fI--post303\fP and \fI-L, --location\fP. Added in 7.19.1.
-.IP "--post303"
+.IP "\-\-post303"
 (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST requests into GET
 requests when following 303 redirections. A server may require a POST to
 remain a POST after a 303 redirection. This option is meaningful only when
-using \fI-L, --location\fP.
+using \fI\-L, \-\-location\fP.
 
 See also \fI--post302\fP, \fI--post301\fP and \fI-L, --location\fP. Added in 7.26.0.
-.IP "--preproxy [protocol://]host[:port]"
-Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI-x, --proxy\fP. In
+.IP "\-\-preproxy [protocol://]host[:port]"
+Use the specified SOCKS proxy before connecting to an HTTP or HTTPS \fI\-x, \-\-proxy\fP. In
 such a case curl first connects to the SOCKS proxy and then connects (through
 SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy.
 
@@ -1760,7 +1824,7 @@
 If this option is used several times, the last one will be used.
 
 Added in 7.52.0.
-.IP "-#, --progress-bar"
+.IP "\-#, \-\-progress-bar"
 Make curl display transfer progress as a simple progress bar instead of the
 standard, more informational, meter.
 
@@ -1769,30 +1833,30 @@
 known size, there will be space ship (-=o=-) that moves back and forth but
 only while data is being transferred, with a set of flying hash sign symbols on
 top.
-.IP "--proto-default <protocol>"
+.IP "\-\-proto-default <protocol>"
 Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
 
 Example:
 
- curl --proto-default https ftp.mozilla.org
+ curl \-\-proto-default https ftp.mozilla.org
 
 An unknown or unsupported protocol causes error
 \fICURLE_UNSUPPORTED_PROTOCOL\fP (1).
 
 This option does not change the default proxy protocol (http).
 
-Without this option curl would make a guess based on the host, see \fI--url\fP for
+Without this option curl would make a guess based on the host, see \fI\-\-url\fP for
 details.
 
 Added in 7.45.0.
-.IP "--proto-redir <protocols>"
+.IP "\-\-proto-redir <protocols>"
 Tells curl to limit what protocols it may use on redirect. Protocols denied by
-\fI--proto\fP are not overridden by this option. See --proto for how protocols are
+\fI\-\-proto\fP are not overridden by this option. See \-\-proto for how protocols are
 represented.
 
 Example, allow only HTTP and HTTPS on redirect:
 
- curl --proto-redir -all,http,https http://example.com
+ curl \-\-proto-redir \-all,http,https http://example.com
 
 By default curl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2).
 Older versions of curl allowed all protocols on redirect except several
@@ -1801,8 +1865,8 @@
 enables all protocols on redirect, including those disabled for security.
 
 Added in 7.20.2.
-.IP "--proto <protocols>"
-Tells curl to limit what protocols it may use in the transfer. Protocols are
+.IP "\-\-proto <protocols>"
+Tells curl to limit what protocols it may use for transfers. Protocols are
 evaluated left to right, are comma separated, and are each a protocol name or
 \&'all', optionally prefixed by zero or more modifiers. Available modifiers are:
 .RS
@@ -1811,7 +1875,7 @@
 Permit this protocol in addition to protocols already permitted (this is
 the default if no modifier is used).
 .TP
-.B -
+.B \-
 Deny this protocol, removing it from the list of protocols already permitted.
 .TP
 .B =
@@ -1823,16 +1887,16 @@
 For example:
 .RS
 .TP 15
-.B \fI--proto\fP -ftps
+.B \fI\-\-proto\fP \-ftps
 uses the default protocols, but disables ftps
 .TP
-.B  \fI--proto\fP -all,https,+http
+.B  \fI\-\-proto\fP \-all,https,+http
 only enables http and https
 .TP
-.B \fI--proto\fP =http,https
+.B \fI\-\-proto\fP =http,https
 also only enables http and https
 .RE
-
+.IP
 Unknown protocols produce a warning. This allows scripts to safely rely on
 being able to disable potentially dangerous protocols, without relying upon
 support for that protocol being built into curl to avoid an error.
@@ -1841,49 +1905,49 @@
 as concatenating the protocols into one instance of the option.
 
 See also \fI--proto-redir\fP and \fI--proto-default\fP. Added in 7.20.2.
-.IP "--proxy-anyauth"
+.IP "\-\-proxy-anyauth"
 Tells curl to pick a suitable authentication method when communicating with
 the given HTTP proxy. This might cause an extra request/response round-trip.
 
 See also \fI-x, --proxy\fP, \fI--proxy-basic\fP and \fI--proxy-digest\fP. Added in 7.13.2.
-.IP "--proxy-basic"
+.IP "\-\-proxy-basic"
 Tells curl to use HTTP Basic authentication when communicating with the given
-proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is the
+proxy. Use \fI\-\-basic\fP for enabling HTTP Basic with a remote host. Basic is the
 default authentication method curl uses with proxies.
 
 See also \fI-x, --proxy\fP, \fI--proxy-anyauth\fP and \fI--proxy-digest\fP.
-.IP "--proxy-cacert <file>"
-Same as \fI--cacert\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-cacert <file>"
+Same as \fI\-\-cacert\fP but used in HTTPS proxy context.
 
 See also \fI--proxy-capath\fP, \fI--cacert\fP, \fI--capath\fP and \fI-x, --proxy\fP. Added in 7.52.0.
-.IP "--proxy-capath <dir>"
-Same as \fI--capath\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-capath <dir>"
+Same as \fI\-\-capath\fP but used in HTTPS proxy context.
 
 See also \fI--proxy-cacert\fP, \fI-x, --proxy\fP and \fI--capath\fP. Added in 7.52.0.
-.IP "--proxy-cert-type <type>"
-Same as \fI--cert-type\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-cert-type <type>"
+Same as \fI\-\-cert-type\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-cert <cert[:passwd]>"
-Same as \fI-E, --cert\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-cert <cert[:passwd]>"
+Same as \fI\-E, \-\-cert\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-ciphers <list>"
-Same as \fI--ciphers\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-ciphers <list>"
+Same as \fI\-\-ciphers\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-crlfile <file>"
-Same as \fI--crlfile\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-crlfile <file>"
+Same as \fI\-\-crlfile\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-digest"
+.IP "\-\-proxy-digest"
 Tells curl to use HTTP Digest authentication when communicating with the given
-proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
+proxy. Use \fI\-\-digest\fP for enabling HTTP Digest with a remote host.
 
 See also \fI-x, --proxy\fP, \fI--proxy-anyauth\fP and \fI--proxy-basic\fP.
-.IP "--proxy-header <header/@file>"
+.IP "\-\-proxy-header <header/@file>"
 (HTTP) Extra header to include in the request when sending HTTP to a proxy. You may
-specify any number of extra headers. This is the equivalent option to \fI-H, --header\fP
+specify any number of extra headers. This is the equivalent option to \fI\-H, \-\-header\fP
 but is for proxy communication only like in CONNECT requests when you want a
 separate header sent to the proxy to what is sent to the actual remote host.
 
@@ -1902,32 +1966,32 @@
 This option can be used multiple times to add/replace/remove multiple headers.
 
 Added in 7.37.0.
-.IP "--proxy-insecure"
-Same as \fI-k, --insecure\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-insecure"
+Same as \fI\-k, \-\-insecure\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-key-type <type>"
-Same as \fI--key-type\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-key-type <type>"
+Same as \fI\-\-key-type\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-key <key>"
-Same as \fI--key\fP but used in HTTPS proxy context.
-.IP "--proxy-negotiate"
+.IP "\-\-proxy-key <key>"
+Same as \fI\-\-key\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-negotiate"
 Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
-with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO)
+with the given proxy. Use \fI\-\-negotiate\fP for enabling HTTP Negotiate (SPNEGO)
 with a remote host.
 
 See also \fI--proxy-anyauth\fP and \fI--proxy-basic\fP. Added in 7.17.1.
-.IP "--proxy-ntlm"
+.IP "\-\-proxy-ntlm"
 Tells curl to use HTTP NTLM authentication when communicating with the given
-proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
+proxy. Use \fI\-\-ntlm\fP for enabling NTLM with a remote host.
 
 See also \fI--proxy-negotiate\fP and \fI--proxy-anyauth\fP.
-.IP "--proxy-pass <phrase>"
-Same as \fI--pass\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-pass <phrase>"
+Same as \fI\-\-pass\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-pinnedpubkey <hashes>"
+.IP "\-\-proxy-pinnedpubkey <hashes>"
 (TLS) Tells curl to use the specified public key file (or hashes) to verify the
 proxy. This can be a path to a file which contains a single public key in PEM
 or DER format, or any number of base64 encoded sha256 hashes preceded by
@@ -1939,43 +2003,47 @@
 abort the connection before sending or receiving any data.
 
 If this option is used several times, the last one will be used.
-.IP "--proxy-service-name <name>"
+.IP "\-\-proxy-service-name <name>"
 This option allows you to change the service name for proxy negotiation.
 
 Added in 7.43.0.
-.IP "--proxy-ssl-allow-beast"
-Same as \fI--ssl-allow-beast\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-ssl-allow-beast"
+Same as \fI\-\-ssl-allow-beast\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-tls13-ciphers <ciphersuite list>"
+.IP "\-\-proxy-ssl-auto-client-cert"
+Same as \fI\-\-ssl-auto-client-cert\fP but used in HTTPS proxy context.
+
+Added in 7.77.0.
+.IP "\-\-proxy-tls13-ciphers <ciphersuite list>"
 (TLS) Specifies which cipher suites to use in the connection to your HTTPS proxy
 when it negotiates TLS 1.3. The list of ciphers suites must specify valid
 ciphers. Read up on TLS 1.3 cipher suite details on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 later. If you are using a different SSL backend you can try setting TLS 1.3
-cipher suites by using the \fI--proxy-ciphers\fP option.
+cipher suites by using the \fI\-\-proxy-ciphers\fP option.
 
 If this option is used several times, the last one will be used.
-.IP "--proxy-tlsauthtype <type>"
-Same as \fI--tlsauthtype\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-tlsauthtype <type>"
+Same as \fI\-\-tlsauthtype\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-tlspassword <string>"
-Same as \fI--tlspassword\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-tlspassword <string>"
+Same as \fI\-\-tlspassword\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-tlsuser <name>"
-Same as \fI--tlsuser\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-tlsuser <name>"
+Same as \fI\-\-tlsuser\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "--proxy-tlsv1"
-Same as \fI-1, --tlsv1\fP but used in HTTPS proxy context.
+.IP "\-\-proxy-tlsv1"
+Same as \fI\-1, \-\-tlsv1\fP but used in HTTPS proxy context.
 
 Added in 7.52.0.
-.IP "-U, --proxy-user <user:password>"
+.IP "\-U, \-\-proxy-user <user:password>"
 Specify the user name and password to use for proxy authentication.
 
 If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM
@@ -1989,7 +2057,7 @@
 from a file instead or similar and never used in clear text in a command line.
 
 If this option is used several times, the last one will be used.
-.IP "-x, --proxy [protocol://]host[:port]"
+.IP "\-x, \-\-proxy [protocol://]host[:port]"
 Use the specified proxy.
 
 The proxy string can be specified with a protocol:// prefix. No protocol
@@ -2013,7 +2081,7 @@
 All operations that are performed over an HTTP proxy will transparently be
 converted to HTTP. It means that certain protocol specific operations might
 not be available. This is not the case if you can tunnel through the proxy, as
-one with the \fI-p, --proxytunnel\fP option.
+one with the \fI\-p, \-\-proxytunnel\fP option.
 
 User and password that might be provided in the proxy string are URL decoded
 by curl. This allows you to pass in special characters such as @ by using %40
@@ -2024,24 +2092,24 @@
 password.
 
 If this option is used several times, the last one will be used.
-.IP "--proxy1.0 <host[:port]>"
+.IP "\-\-proxy1.0 <host[:port]>"
 Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
 assumed at port 1080.
 
-The only difference between this and the HTTP proxy option \fI-x, --proxy\fP, is that
+The only difference between this and the HTTP proxy option \fI\-x, \-\-proxy\fP, is that
 attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol
 instead of the default HTTP 1.1.
-.IP "-p, --proxytunnel"
-When an HTTP proxy is used \fI-x, --proxy\fP, this option will make curl tunnel through
+.IP "\-p, \-\-proxytunnel"
+When an HTTP proxy is used \fI\-x, \-\-proxy\fP, this option will make curl tunnel through
 the proxy. The tunnel approach is made with the HTTP proxy CONNECT request and
 requires that the proxy allows direct connect to the remote port number curl
 wants to tunnel through to.
 
 To suppress proxy CONNECT response headers when curl is set to output headers
-use \fI--suppress-connect-headers\fP.
+use \fI\-\-suppress-connect-headers\fP.
 
 See also \fI-x, --proxy\fP.
-.IP "--pubkey <key>"
+.IP "\-\-pubkey <key>"
 (SFTP SCP) Public key file name. Allows you to provide your public key in this separate
 file.
 
@@ -2051,7 +2119,7 @@
 private key file, so passing this option is generally not required. Note that
 this public key extraction requires libcurl to be linked against a copy of
 libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
-.IP "-Q, --quote"
+.IP "\-Q, \-\-quote <command>"
 (FTP SFTP) 
 Send an arbitrary command to the remote FTP or SFTP server. Quote commands are
 sent BEFORE the transfer takes place (just after the initial PWD command in an
@@ -2112,11 +2180,11 @@
 .IP "symlink source_file target_file"
 See ln.
 .RE
-.IP "--random-file <file>"
+.IP "\-\-random-file <file>"
 Specify the path name to file containing what will be considered as random
 data. The data may be used to seed the random engine for SSL connections.  See
-also the \fI--egd-file\fP option.
-.IP "-r, --range <range>"
+also the \fI\-\-egd-file\fP option.
+.IP "\-r, \-\-range <range>"
 (HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
 server or a local FILE. Ranges can be specified in a number of ways.
 .RS
@@ -2127,7 +2195,7 @@
 .B 500-999
 specifies the second 500 bytes
 .TP
-.B -500
+.B \-500
 specifies the last 500 bytes
 .TP
 .B 9500-
@@ -2141,7 +2209,8 @@
 .RE
 .IP
 (*) = NOTE that this will cause the server to reply with a multipart
-response!
+response, which will be returned as-is by curl! Parsing or otherwise
+transforming this response is the responsibility of the caller.
 
 Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
 \&'start-stop' range syntax. If a non-digit character is given in the range,
@@ -2157,23 +2226,23 @@
 FTP command SIZE.
 
 If this option is used several times, the last one will be used.
-.IP "--raw"
+.IP "\-\-raw"
 (HTTP) When used, it disables all internal HTTP decoding of content or transfer
 encodings and instead makes them passed on unaltered, raw.
 
 Added in 7.16.2.
-.IP "-e, --referer <URL>"
+.IP "\-e, \-\-referer <URL>"
 (HTTP) Sends the "Referrer Page" information to the HTTP server. This can also be set
-with the \fI-H, --header\fP flag of course.  When used with \fI-L, --location\fP you can append
-";auto" to the \fI-e, --referer\fP URL to make curl automatically set the previous URL
+with the \fI\-H, \-\-header\fP flag of course.  When used with \fI\-L, \-\-location\fP you can append
+";auto" to the \fI\-e, \-\-referer\fP URL to make curl automatically set the previous URL
 when it follows a Location: header. The \&";auto" string can be used alone,
-even if you don't set an initial \fI-e, --referer\fP.
+even if you don't set an initial \fI\-e, \-\-referer\fP.
 
 If this option is used several times, the last one will be used.
 
 See also \fI-A, --user-agent\fP and \fI-H, --header\fP.
-.IP "-J, --remote-header-name"
-(HTTP) This option tells the \fI-O, --remote-name\fP option to use the server-specified
+.IP "\-J, \-\-remote-header-name"
+(HTTP) This option tells the \fI\-O, \-\-remote-name\fP option to use the server-specified
 Content-Disposition filename instead of extracting a filename from the URL.
 
 If the server specifies a file name and a file with that name already exists
@@ -2187,14 +2256,14 @@
 \fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A
 rogue server could send you the name of a DLL or other file that could possibly
 be loaded automatically by Windows or some third party software.
-.IP "--remote-name-all"
+.IP "\-\-remote-name-all"
 This option changes the default action for all given URLs to be dealt with as
-if \fI-O, --remote-name\fP were used for each one. So if you want to disable that for a
-specific URL after \fI--remote-name-all\fP has been used, you must use "-o -" or
---no-remote-name.
+if \fI\-O, \-\-remote-name\fP were used for each one. So if you want to disable that for a
+specific URL after \fI\-\-remote-name-all\fP has been used, you must use "-o \-" or
+\-\-no-remote-name.
 
 Added in 7.19.0.
-.IP "-O, --remote-name"
+.IP "\-O, \-\-remote-name"
 Write output to a local file named like the remote file we get. (Only the file
 part of the remote file is used, the path is cut off.)
 
@@ -2204,7 +2273,7 @@
 
 The remote file name to use for saving is extracted from the given URL,
 nothing else, and if it already exists it will be overwritten. If you want the
-server to be able to choose the file name refer to \fI-J, --remote-header-name\fP which
+server to be able to choose the file name refer to \fI\-J, \-\-remote-header-name\fP which
 can be used in addition to this option. If the server chooses a file name and
 that name already exists it will not be overwritten.
 
@@ -2212,18 +2281,18 @@
 encoded parts of the name, they will end up as-is as file name.
 
 You may use this option as many times as the number of URLs you have.
-.IP "-R, --remote-time"
+.IP "\-R, \-\-remote-time"
 When used, this will make curl attempt to figure out the timestamp of the
 remote file, and if that is available make the local file get that same
 timestamp.
-.IP "--request-target"
+.IP "\-\-request-target <path>"
 (HTTP) Tells curl to use an alternative "target" (path) instead of using the path as
 provided in the URL. Particularly useful when wanting to issue HTTP requests
 without leading slash or other data that doesn't follow the regular URL
 pattern, like "OPTIONS *".
 
 Added in 7.55.0.
-.IP "-X, --request <command>"
+.IP "\-X, \-\-request <command>"
 (HTTP) Specifies a custom request method to use when communicating with the
 HTTP server.  The specified request method will be used instead of the method
 otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
@@ -2236,11 +2305,11 @@
 
 This option only changes the actual word used in the HTTP request, it does not
 alter the way curl behaves. So for example if you want to make a proper HEAD
-request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP option.
+request, using \-X HEAD will not suffice. You need to use the \fI\-I, \-\-head\fP option.
 
-The method string you set with \fI-X, --request\fP will be used for all requests, which
-if you for example use \fI-L, --location\fP may cause unintended side-effects when curl
-doesn't change request method according to the HTTP 30x response codes - and
+The method string you set with \fI\-X, \-\-request\fP will be used for all requests, which
+if you for example use \fI\-L, \-\-location\fP may cause unintended side-effects when curl
+doesn't change request method according to the HTTP 30x response codes \- and
 similar.
 
 (FTP)
@@ -2258,7 +2327,7 @@
 Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
 
 If this option is used several times, the last one will be used.
-.IP "--resolve <host:port:addr[,addr]...>"
+.IP "\-\-resolve <[+]host:port:addr[,addr]...>"
 Provide a custom address for a specific host and port pair. Using this, you
 can make the curl requests(s) use a specified address and prevent the
 otherwise normally resolved address to be used. Consider it a sort of
@@ -2268,23 +2337,31 @@
 different ports.
 
 By specifying '*' as host you can tell curl to resolve any host and specific
-port pair to the specified address. Wildcard is resolved last so any \fI--resolve\fP
+port pair to the specified address. Wildcard is resolved last so any \fI\-\-resolve\fP
 with a specific host and port will be used first.
 
-The provided address set by this option will be used even if \fI-4, --ipv4\fP or \fI-6, --ipv6\fP
+The provided address set by this option will be used even if \fI\-4, \-\-ipv4\fP or \fI\-6, \-\-ipv6\fP
 is set to make curl use another IP version.
 
+By prefixing the host with a '+' you can make the entry time out after curl's
+default timeout (1 minute). Note that this will only make sense for long
+running parallel transfers with a lot of files. In such cases, if this option
+is used curl will try to resolve the host as it normally would once the
+timeout has expired.
+
 Support for providing the IP address within [brackets] was added in 7.57.0.
 
 Support for providing multiple IP addresses per entry was added in 7.59.0.
 
 Support for resolving with wildcard was added in 7.64.0.
 
+Support for the '+' prefix was was added in 7.75.0.
+
 This option can be used many times to add many host names to resolve.
 
 Added in 7.21.3.
-.IP "--retry-all-errors"
-Retry on any error. This option is used together with \fI--retry\fP.
+.IP "\-\-retry-all-errors"
+Retry on any error. This option is used together with \fI\-\-retry\fP.
 
 This option is the "sledgehammer" of retrying. Do not use this option by
 default (eg in curlrc), there may be unintended consequences such as sending or
@@ -2300,43 +2377,52 @@
 strongly suggest don't parse or record output via redirect in combination with
 this option, since you may receive duplicate data.
 
+By default curl will not error on an HTTP response code that indicates an HTTP
+error, if the transfer was successful. For example, if a server replies 404
+Not Found and the reply is fully received then that is not an error. When
+\fI\-\-retry\fP is used then curl will retry on some HTTP response codes that indicate
+transient HTTP errors, but that does not include most 4xx response codes such
+as 404. If you want to retry on all response codes that indicate HTTP errors
+(4xx and 5xx) then combine with \fI\-f, \-\-fail\fP.
+
 Added in 7.71.0.
-.IP "--retry-connrefused"
+.IP "\-\-retry-connrefused"
 In addition to the other conditions, consider ECONNREFUSED as a transient
-error too for \fI--retry\fP. This option is used together with --retry.
+error too for \fI\-\-retry\fP. This option is used together with \-\-retry.
 
 Added in 7.52.0.
-.IP "--retry-delay <seconds>"
+.IP "\-\-retry-delay <seconds>"
 Make curl sleep this amount of time before each retry when a transfer has
 failed with a transient error (it changes the default backoff time algorithm
-between retries). This option is only interesting if \fI--retry\fP is also
+between retries). This option is only interesting if \fI\-\-retry\fP is also
 used. Setting this delay to zero will make curl use the default backoff time.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.12.3.
-.IP "--retry-max-time <seconds>"
+.IP "\-\-retry-max-time <seconds>"
 The retry timer is reset before the first transfer attempt. Retries will be
-done as usual (see \fI--retry\fP) as long as the timer hasn't reached this given
+done as usual (see \fI\-\-retry\fP) as long as the timer hasn't reached this given
 limit. Notice that if the timer hasn't reached the limit, the request will be
 made and while performing, it may take longer than this given time period. To
-limit a single request\'s maximum time, use \fI-m, --max-time\fP.  Set this option to
+limit a single request\'s maximum time, use \fI\-m, \-\-max-time\fP.  Set this option to
 zero to not timeout retries.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.12.3.
-.IP "--retry <num>"
+.IP "\-\-retry <num>"
 If a transient error is returned when curl tries to perform a transfer, it
 will retry this number of times before giving up. Setting the number to 0
 makes curl do no retries (which is the default). Transient error means either:
-a timeout, an FTP 4xx response code or an HTTP 408 or 5xx response code.
+a timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504
+response code.
 
 When curl is about to retry a transfer, it will first wait one second and then
 for all forthcoming retries it will double the waiting time until it reaches
 10 minutes which then will be the delay between the rest of the retries.  By
-using \fI--retry-delay\fP you disable this exponential backoff algorithm. See also
-\fI--retry-max-time\fP to limit the total time allowed for retries.
+using \fI\-\-retry-delay\fP you disable this exponential backoff algorithm. See also
+\fI\-\-retry-max-time\fP to limit the total time allowed for retries.
 
 Since curl 7.66.0, curl will comply with the Retry-After: response header if
 one was present to know when to issue the next retry.
@@ -2344,9 +2430,9 @@
 If this option is used several times, the last one will be used.
 
 Added in 7.12.3.
-.IP "--sasl-authzid <identity>"
+.IP "\-\-sasl-authzid <identity>"
 Use this authorisation identity (authzid), during SASL PLAIN authentication,
-in addition to the authentication identity (authcid) as specified by \fI-u, --user\fP.
+in addition to the authentication identity (authcid) as specified by \fI\-u, \-\-user\fP.
 
 If the option isn't specified, the server will derive the authzid from the
 authcid, but if specified, and depending on the server implementation, it may
@@ -2354,145 +2440,146 @@
 to, or a shared mailbox for example.
 
 Added in 7.66.0.
-.IP "--sasl-ir"
+.IP "\-\-sasl-ir"
 Enable initial response in SASL authentication.
 
 Added in 7.31.0.
-.IP "--service-name <name>"
+.IP "\-\-service-name <name>"
 This option allows you to change the service name for SPNEGO.
 
-Examples: \fI--negotiate\fP \fI--service-name\fP sockd would use sockd/server-name.
+Examples: \fI\-\-negotiate\fP \fI\-\-service-name\fP sockd would use sockd/server-name.
 
 Added in 7.43.0.
-.IP "-S, --show-error"
-When used with \fI-s, --silent\fP, it makes curl show an error message if it fails.
+.IP "\-S, \-\-show-error"
+When used with \fI\-s, \-\-silent\fP, it makes curl show an error message if it fails.
 
 See also \fI--no-progress-meter\fP.
-.IP "-s, --silent"
+.IP "\-s, \-\-silent"
 Silent or quiet mode. Don't show progress meter or error messages.  Makes Curl
 mute. It will still output the data you ask for, potentially even to the
 terminal/stdout unless you redirect it.
 
-Use \fI-S, --show-error\fP in addition to this option to disable progress meter but
+Use \fI\-S, \-\-show-error\fP in addition to this option to disable progress meter but
 still show error messages.
 
 See also \fI-v, --verbose\fP, \fI--stderr\fP and \fI--no-progress-meter\fP.
-.IP "--socks4 <host[:port]>"
+.IP "\-\-socks4 <host[:port]>"
 Use the specified SOCKS4 proxy. If the port number is not specified, it is
-assumed at port 1080.
+assumed at port 1080. Using this socket type make curl resolve the host name
+and passing the address on to the proxy.
 
-This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually
+This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
 exclusive.
 
 Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
-with \fI-x, --proxy\fP using a socks4:// protocol prefix.
+with \fI\-x, \-\-proxy\fP using a socks4:// protocol prefix.
 
-Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time
-\fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
+Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
+\fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
 the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.15.2.
-.IP "--socks4a <host[:port]>"
+.IP "\-\-socks4a <host[:port]>"
 Use the specified SOCKS4a proxy. If the port number is not specified, it is
-assumed at port 1080.
+assumed at port 1080. This asks the proxy to resolve the host name.
 
-This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually
+This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
 exclusive.
 
 Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
-with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
+with \fI\-x, \-\-proxy\fP using a socks4a:// protocol prefix.
 
-Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time
-\fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
+Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
+\fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
 the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.18.0.
-.IP "--socks5-basic"
+.IP "\-\-socks5-basic"
 Tells curl to use username/password authentication when connecting to a SOCKS5
 proxy.  The username/password authentication is enabled by default.  Use
-\fI--socks5-gssapi\fP to force GSS-API authentication to SOCKS5 proxies.
+\fI\-\-socks5-gssapi\fP to force GSS-API authentication to SOCKS5 proxies.
 
 Added in 7.55.0.
-.IP "--socks5-gssapi-nec"
+.IP "\-\-socks5-gssapi-nec"
 As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
 says in section 4.3/4.4 it should be protected, but the NEC reference
-implementation does not.  The option \fI--socks5-gssapi-nec\fP allows the
+implementation does not.  The option \fI\-\-socks5-gssapi-nec\fP allows the
 unprotected exchange of the protection mode negotiation.
 
 Added in 7.19.4.
-.IP "--socks5-gssapi-service <name>"
+.IP "\-\-socks5-gssapi-service <name>"
 The default service name for a socks server is rcmd/server-fqdn. This option
 allows you to change it.
 
-Examples: \fI--socks5\fP proxy-name \fI--socks5-gssapi-service\fP sockd would use
-sockd/proxy-name \fI--socks5\fP proxy-name \fI--socks5-gssapi-service\fP sockd/real-name
+Examples: \fI\-\-socks5\fP proxy-name \fI\-\-socks5-gssapi-service\fP sockd would use
+sockd/proxy-name \fI\-\-socks5\fP proxy-name \fI\-\-socks5-gssapi-service\fP sockd/real-name
 would use sockd/real-name for cases where the proxy-name does not match the
 principal name.
 
 Added in 7.19.4.
-.IP "--socks5-gssapi"
+.IP "\-\-socks5-gssapi"
 Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy.
 The GSS-API authentication is enabled by default (if curl is compiled with
-GSS-API support).  Use \fI--socks5-basic\fP to force username/password authentication
+GSS-API support).  Use \fI\-\-socks5-basic\fP to force username/password authentication
 to SOCKS5 proxies.
 
 Added in 7.55.0.
-.IP "--socks5-hostname <host[:port]>"
+.IP "\-\-socks5-hostname <host[:port]>"
 Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
 the port number is not specified, it is assumed at port 1080.
 
-This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually
+This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
 exclusive.
 
 Since 7.21.7, this option is superfluous since you can specify a socks5
-hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
+hostname proxy with \fI\-x, \-\-proxy\fP using a socks5h:// protocol prefix.
 
-Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time
-\fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
+Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
+\fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
 the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
 
 If this option is used several times, the last one will be used.
 
 Added in 7.18.0.
-.IP "--socks5 <host[:port]>"
-Use the specified SOCKS5 proxy - but resolve the host name locally. If the
+.IP "\-\-socks5 <host[:port]>"
+Use the specified SOCKS5 proxy \- but resolve the host name locally. If the
 port number is not specified, it is assumed at port 1080.
 
-This option overrides any previous use of \fI-x, --proxy\fP, as they are mutually
+This option overrides any previous use of \fI\-x, \-\-proxy\fP, as they are mutually
 exclusive.
 
 Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
-with \fI-x, --proxy\fP using a socks5:// protocol prefix.
+with \fI\-x, \-\-proxy\fP using a socks5:// protocol prefix.
 
-Since 7.52.0, \fI--preproxy\fP can be used to specify a SOCKS proxy at the same time
-\fI-x, --proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
+Since 7.52.0, \fI\-\-preproxy\fP can be used to specify a SOCKS proxy at the same time
+\fI\-x, \-\-proxy\fP is used with an HTTP/HTTPS proxy. In such a case curl first connects to
 the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
 
 If this option is used several times, the last one will be used.
 
-This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
+This option (as well as \fI\-\-socks4\fP) does not work with IPV6, FTPS or LDAP.
 
 Added in 7.18.0.
-.IP "-Y, --speed-limit <speed>"
+.IP "\-Y, \-\-speed-limit <speed>"
 If a download is slower than this given speed (in bytes per second) for
-speed-time seconds it gets aborted. speed-time is set with \fI-y, --speed-time\fP and is
+speed-time seconds it gets aborted. speed-time is set with \fI\-y, \-\-speed-time\fP and is
 30 if not set.
 
 If this option is used several times, the last one will be used.
-.IP "-y, --speed-time <seconds>"
+.IP "\-y, \-\-speed-time <seconds>"
 If a download is slower than speed-limit bytes per second during a speed-time
 period, the download gets aborted. If speed-time is used, the default
-speed-limit will be 1 unless set with \fI-Y, --speed-limit\fP.
+speed-limit will be 1 unless set with \fI\-Y, \-\-speed-limit\fP.
 
 This option controls transfers and thus will not affect slow connects etc. If
-this is a concern for you, try the \fI--connect-timeout\fP option.
+this is a concern for you, try the \fI\-\-connect-timeout\fP option.
 
 If this option is used several times, the last one will be used.
-.IP "--ssl-allow-beast"
+.IP "\-\-ssl-allow-beast"
 This option tells curl to not work around a security flaw in the SSL3 and
 TLS1.0 protocols known as BEAST.  If this option isn't used, the SSL layer may
 use workarounds known to cause interoperability problems with some older SSL
@@ -2500,71 +2587,79 @@
 this flag you ask for exactly that.
 
 Added in 7.25.0.
-.IP "--ssl-no-revoke"
+.IP "\-\-ssl-auto-client-cert"
+Tell libcurl to automatically locate and use a client certificate for
+authentication, when requested by the server. This option is only supported
+for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
+default behavior in libcurl with Schannel. Since the server can request any
+certificate that supports client authentication in the OS certificate store it
+could be a privacy violation and unexpected.
+
+See also \fI--proxy-ssl-auto-client-cert\fP. Added in 7.77.0.
+.IP "\-\-ssl-no-revoke"
 (Schannel) This option tells curl to disable certificate revocation checks.
 WARNING: this option loosens the SSL security, and by using this flag you ask
 for exactly that.
 
 Added in 7.44.0.
-.IP "--ssl-reqd"
+.IP "\-\-ssl-reqd"
 (FTP IMAP POP3 SMTP) Require SSL/TLS for the connection.  Terminates the connection if the server
 doesn't support SSL/TLS.
 
-This option was formerly known as --ftp-ssl-reqd.
+This option was formerly known as \-\-ftp-ssl-reqd.
 
 Added in 7.20.0.
-.IP "--ssl-revoke-best-effort"
+.IP "\-\-ssl-revoke-best-effort"
 (Schannel) This option tells curl to ignore certificate revocation checks when
 they failed due to missing/offline distribution points for the revocation check
 lists.
 
 Added in 7.70.0.
-.IP "--ssl"
+.IP "\-\-ssl"
 (FTP IMAP POP3 SMTP) 
 Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if
-the server doesn't support SSL/TLS.  See also \fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP
+the server doesn't support SSL/TLS.  See also \fI\-\-ftp-ssl-control\fP and \fI\-\-ssl-reqd\fP
 for different levels of encryption required.
 
-This option was formerly known as --ftp-ssl (Added in 7.11.0). That option
+This option was formerly known as \-\-ftp-ssl (Added in 7.11.0). That option
 name can still be used but will be removed in a future version.
 
 Added in 7.20.0.
-.IP "-2, --sslv2"
-(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL
-server. Sometimes curl is built without SSLv2 support. SSLv2 is widely
-considered insecure (see RFC 6176).
+.IP "\-2, \-\-sslv2"
+(SSL) This option previously asked curl to use SSLv2, but starting in curl 7.77.0 this
+instruction is ignored. SSLv2 is widely considered insecure (see RFC 6176).
 
 See also \fI--http1.1\fP and \fI--http2\fP. \fI-2, --sslv2\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI-3, --sslv3\fP and \fI-1, --tlsv1\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP.
-.IP "-3, --sslv3"
-(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL
-server. Sometimes curl is built without SSLv3 support. SSLv3 is widely
-considered insecure (see RFC 7568).
+.IP "\-3, \-\-sslv3"
+(SSL) This option previously asked curl to use SSLv3, but starting in curl 7.77.0
+this instruction is ignored. SSLv3 is widely considered insecure (see RFC
+7568).
 
 See also \fI--http1.1\fP and \fI--http2\fP. \fI-3, --sslv3\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI-2, --sslv2\fP and \fI-1, --tlsv1\fP and \fI--tlsv1.1\fP and \fI--tlsv1.2\fP.
-.IP "--stderr"
+.IP "\-\-stderr <file>"
 Redirect all writes to stderr to the specified file instead. If the file name
 is a plain '-', it is instead written to stdout.
 
 If this option is used several times, the last one will be used.
 
 See also \fI-v, --verbose\fP and \fI-s, --silent\fP.
-.IP "--styled-output"
+.IP "\-\-styled-output"
 Enables the automatic use of bold font styles when writing HTTP headers to the
-terminal. Use --no-styled-output to switch them off.
+terminal. Use \-\-no-styled-output to switch them off.
 
 Added in 7.61.0.
-.IP "--suppress-connect-headers"
-When \fI-p, --proxytunnel\fP is used and a CONNECT request is made don't output proxy
-CONNECT response headers. This option is meant to be used with \fI-D, --dump-header\fP or
-\fI-i, --include\fP which are used to show protocol headers in the output. It has no
-effect on debug options such as \fI-v, --verbose\fP or \fI--trace\fP, or any statistics.
+.IP "\-\-suppress-connect-headers"
+When \fI\-p, \-\-proxytunnel\fP is used and a CONNECT request is made don't output proxy
+CONNECT response headers. This option is meant to be used with \fI\-D, \-\-dump-header\fP or
+\fI\-i, \-\-include\fP which are used to show protocol headers in the output. It has no
+effect on debug options such as \fI\-v, \-\-verbose\fP or \fI\-\-trace\fP, or any statistics.
 
 See also \fI-D, --dump-header\fP, \fI-i, --include\fP and \fI-p, --proxytunnel\fP.
-.IP "--tcp-fastopen"
+.IP "\-\-tcp-fastopen"
 Enable use of TCP Fast Open (RFC7413).
 
 Added in 7.49.0.
-.IP "--tcp-nodelay"
+.IP "\-\-tcp-nodelay"
 Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
 details about this option.
 
@@ -2572,7 +2667,7 @@
 switch it off if you don't want it on.
 
 Added in 7.11.2.
-.IP "-t, --telnet-option <opt=val>"
+.IP "\-t, \-\-telnet-option <opt=val>"
 Pass options to the telnet protocol. Supported options are:
 
 TTYPE=<term> Sets the terminal type.
@@ -2580,7 +2675,7 @@
 XDISPLOC=<X display> Sets the X display location.
 
 NEW_ENV=<var,val> Sets an environment variable.
-.IP "--tftp-blksize <value>"
+.IP "\-\-tftp-blksize <value>"
 (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that curl will
 try to use when transferring data to or from a TFTP server. By default 512
 bytes will be used.
@@ -2588,15 +2683,15 @@
 If this option is used several times, the last one will be used.
 
 Added in 7.20.0.
-.IP "--tftp-no-options"
+.IP "\-\-tftp-no-options"
 (TFTP) Tells curl not to send TFTP options requests.
 
 This option improves interop with some legacy servers that do not acknowledge
-or properly implement TFTP options. When this option is used \fI--tftp-blksize\fP is
+or properly implement TFTP options. When this option is used \fI\-\-tftp-blksize\fP is
 ignored.
 
 Added in 7.48.0.
-.IP "-z, --time-cond <time>"
+.IP "\-z, \-\-time-cond <time>"
 (HTTP FTP) Request a file that has been modified later than the given time and date, or
 one that has been modified before that time. The <date expression> can be all
 sorts of date strings or if it doesn't match any internal ones, it is taken as
@@ -2608,7 +2703,7 @@
 than the specified date/time.
 
 If this option is used several times, the last one will be used.
-.IP "--tls-max <VERSION>"
+.IP "\-\-tls-max <VERSION>"
 (SSL) VERSION defines maximum supported TLS version. The minimum acceptable version
 is set by tlsv1.0, tlsv1.1, tlsv1.2 or tlsv1.3.
 
@@ -2629,65 +2724,65 @@
 .RE
 
 See also \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, \fI--tlsv1.2\fP and \fI--tlsv1.3\fP. \fI--tls-max\fP requires that the underlying libcurl was built to support TLS. Added in 7.54.0.
-.IP "--tls13-ciphers <ciphersuite list>"
+.IP "\-\-tls13-ciphers <ciphersuite list>"
 (TLS) Specifies which cipher suites to use in the connection if it negotiates TLS
 1.3. The list of ciphers suites must specify valid ciphers. Read up on TLS 1.3
 cipher suite details on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 later. If you are using a different SSL backend you can try setting TLS 1.3
-cipher suites by using the \fI--ciphers\fP option.
+cipher suites by using the \fI\-\-ciphers\fP option.
 
 If this option is used several times, the last one will be used.
-.IP "--tlsauthtype <type>"
+.IP "\-\-tlsauthtype <type>"
 Set TLS authentication type. Currently, the only supported option is "SRP",
-for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are specified but
-\fI--tlsauthtype\fP is not, then this option defaults to "SRP".  This option works
+for TLS-SRP (RFC 5054). If \fI\-\-tlsuser\fP and \fI\-\-tlspassword\fP are specified but
+\fI\-\-tlsauthtype\fP is not, then this option defaults to "SRP".  This option works
 only if the underlying libcurl is built with TLS-SRP support, which requires
 OpenSSL or GnuTLS with TLS-SRP support.
 
 Added in 7.21.4.
-.IP "--tlspassword"
+.IP "\-\-tlspassword <string>"
 Set password for use with the TLS authentication method specified with
-\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set.
+\fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlsuser\fP also be set.
 
 This doesn't work with TLS 1.3.
 
 Added in 7.21.4.
-.IP "--tlsuser <name>"
+.IP "\-\-tlsuser <name>"
 Set username for use with the TLS authentication method specified with
-\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also is set.
+\fI\-\-tlsauthtype\fP. Requires that \fI\-\-tlspassword\fP also is set.
 
 This doesn't work with TLS 1.3.
 
 Added in 7.21.4.
-.IP "--tlsv1.0"
+.IP "\-\-tlsv1.0"
 (TLS) Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
 
 In old versions of curl this option was documented to allow _only_ TLS 1.0,
-but behavior was inconsistent depending on the TLS library. Use \fI--tls-max\fP if
+but behavior was inconsistent depending on the TLS library. Use \fI\-\-tls-max\fP if
 you want to set a maximum TLS version.
 
 Added in 7.34.0.
-.IP "--tlsv1.1"
+.IP "\-\-tlsv1.1"
 (TLS) Forces curl to use TLS version 1.1 or later when connecting to a remote TLS server.
 
 In old versions of curl this option was documented to allow _only_ TLS 1.1,
-but behavior was inconsistent depending on the TLS library. Use \fI--tls-max\fP if
+but behavior was inconsistent depending on the TLS library. Use \fI\-\-tls-max\fP if
 you want to set a maximum TLS version.
 
 Added in 7.34.0.
-.IP "--tlsv1.2"
+.IP "\-\-tlsv1.2"
 (TLS) Forces curl to use TLS version 1.2 or later when connecting to a remote TLS server.
 
 In old versions of curl this option was documented to allow _only_ TLS 1.2,
-but behavior was inconsistent depending on the TLS library. Use \fI--tls-max\fP if
+but behavior was inconsistent depending on the TLS library. Use \fI\-\-tls-max\fP if
 you want to set a maximum TLS version.
 
 Added in 7.34.0.
-.IP "--tlsv1.3"
+.IP "\-\-tlsv1.3"
 (TLS) Forces curl to use TLS version 1.3 or later when connecting to a remote TLS
 server.
 
@@ -2697,33 +2792,33 @@
 Note that TLS 1.3 is not supported by all TLS backends.
 
 Added in 7.52.0.
-.IP "-1, --tlsv1"
+.IP "\-1, \-\-tlsv1"
 (SSL) Tells curl to use at least TLS version 1.x when negotiating with a remote TLS
 server. That means TLS version 1.0 or higher
 
 See also \fI--http1.1\fP and \fI--http2\fP. \fI-1, --tlsv1\fP requires that the underlying libcurl was built to support TLS. This option overrides \fI--tlsv1.1\fP and \fI--tlsv1.2\fP and \fI--tlsv1.3\fP.
-.IP "--tr-encoding"
+.IP "\-\-tr-encoding"
 (HTTP) Request a compressed Transfer-Encoding response using one of the algorithms
 curl supports, and uncompress the data while receiving it.
 
 Added in 7.21.6.
-.IP "--trace-ascii <file>"
+.IP "\-\-trace-ascii <file>"
 Enables a full trace dump of all incoming and outgoing data, including
 descriptive information, to the given output file. Use "-" as filename to have
 the output sent to stdout.
 
-This is very similar to \fI--trace\fP, but leaves out the hex part and only shows
+This is very similar to \fI\-\-trace\fP, but leaves out the hex part and only shows
 the ASCII part of the dump. It makes smaller output that might be easier to
 read for untrained humans.
 
 If this option is used several times, the last one will be used.
 
 This option overrides \fI--trace\fP and \fI-v, --verbose\fP.
-.IP "--trace-time"
+.IP "\-\-trace-time"
 Prepends a time stamp to each trace or verbose line that curl displays.
 
 Added in 7.14.0.
-.IP "--trace <file>"
+.IP "\-\-trace <file>"
 Enables a full trace dump of all incoming and outgoing data, including
 descriptive information, to the given output file. Use "-" as filename to have
 the output sent to stdout. Use "%" as filename to have the output sent to
@@ -2732,11 +2827,11 @@
 If this option is used several times, the last one will be used.
 
 This option overrides \fI-v, --verbose\fP and \fI--trace-ascii\fP.
-.IP "--unix-socket <path>"
+.IP "\-\-unix-socket <path>"
 (HTTP) Connect through this Unix domain socket, instead of using the network.
 
 Added in 7.40.0.
-.IP "-T, --upload-file <file>"
+.IP "\-T, \-\-upload-file <file>"
 This transfers the specified local file to the remote URL. If there is no file
 part in the specified URL, curl will append the local file name. NOTE that you
 must use a trailing / on the last directory to really prove to Curl that there
@@ -2749,23 +2844,23 @@
 of "-" to use stdin in non-blocking mode to allow reading server output
 while stdin is being uploaded.
 
-You can specify one \fI-T, --upload-file\fP for each URL on the command line. Each
-\fI-T, --upload-file\fP + URL pair specifies what to upload and to where. curl also
-supports "globbing" of the \fI-T, --upload-file\fP argument, meaning that you can upload
+You can specify one \fI\-T, \-\-upload-file\fP for each URL on the command line. Each
+\fI\-T, \-\-upload-file\fP + URL pair specifies what to upload and to where. curl also
+supports "globbing" of the \fI\-T, \-\-upload-file\fP argument, meaning that you can upload
 multiple files to a single URL by using the same URL globbing style supported
 in the URL, like this:
 
- curl --upload-file "{file1,file2}" http://www.example.com
+ curl \-\-upload-file "{file1,file2}" http://www.example.com
 
 or even
 
- curl -T "img[1-1000].png" ftp://ftp.example.com/upload/
+ curl \-T "img[1-1000].png" ftp://ftp.example.com/upload/
 
 When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322
 formatted. It has to feature the necessary set of headers and mail body
 formatted correctly by the user as curl will not transcode nor encode it
 further in any way.
-.IP "--url <url>"
+.IP "\-\-url <url>"
 Specify a URL to fetch. This option is mostly handy when you want to specify
 URL(s) in a config file.
 
@@ -2773,31 +2868,31 @@
 then curl will make a guess based on the host. If the outermost sub-domain
 name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol will be
 used, otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by
-setting a default protocol, see \fI--proto-default\fP for details.
+setting a default protocol, see \fI\-\-proto-default\fP for details.
 
 This option may be used any number of times. To control where this URL is
-written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
+written, use the \fI\-o, \-\-output\fP or the \fI\-O, \-\-remote-name\fP options.
 
 Warning: On Windows, particular file:// accesses can be converted to network
 accesses by the operating system. Beware!
-.IP "-B, --use-ascii"
+.IP "\-B, \-\-use-ascii"
 (FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that
 ends with ";type=A". This option causes data sent to stdout to be in text mode
 for win32 systems.
-.IP "-A, --user-agent <name>"
+.IP "\-A, \-\-user-agent <name>"
 (HTTP) 
 Specify the User-Agent string to send to the HTTP server. To encode blanks in
 the string, surround the string with single quote marks. This header can also
-be set with the \fI-H, --header\fP or the \fI--proxy-header\fP options.
+be set with the \fI\-H, \-\-header\fP or the \fI\-\-proxy-header\fP options.
 
-If you give an empty argument to \fI-A, --user-agent\fP (""), it will remove the header
+If you give an empty argument to \fI\-A, \-\-user-agent\fP (""), it will remove the header
 completely from the request. If you prefer a blank header, you can set it to a
 single space (" ").
 
 If this option is used several times, the last one will be used.
-.IP "-u, --user <user:password>"
+.IP "\-u, \-\-user <user:password>"
 Specify the user name and password to use for server authentication. Overrides
-\fI-n, --netrc\fP and \fI--netrc-optional\fP.
+\fI\-n, \-\-netrc\fP and \fI\-\-netrc-optional\fP.
 
 If you simply specify the user name, curl will prompt for a password.
 
@@ -2830,23 +2925,23 @@
 with this option: "-u :".
 
 If this option is used several times, the last one will be used.
-.IP "-v, --verbose"
+.IP "\-v, \-\-verbose"
 Makes curl verbose during the operation. Useful for debugging and seeing
 what's going on "under the hood". A line starting with '>' means "header data"
 sent by curl, '<' means "header data" received by curl that is hidden in
 normal cases, and a line starting with '*' means additional info provided by
 curl.
 
-If you only want HTTP headers in the output, \fI-i, --include\fP might be the option
+If you only want HTTP headers in the output, \fI\-i, \-\-include\fP might be the option
 you're looking for.
 
 If you think this option still doesn't give you enough details, consider using
-\fI--trace\fP or \fI--trace-ascii\fP instead.
+\fI\-\-trace\fP or \fI\-\-trace-ascii\fP instead.
 
-Use \fI-s, --silent\fP to make curl really quiet.
+Use \fI\-s, \-\-silent\fP to make curl really quiet.
 
 See also \fI-i, --include\fP. This option overrides \fI--trace\fP and \fI--trace-ascii\fP.
-.IP "-V, --version"
+.IP "\-V, \-\-version"
 Displays information about curl and the libcurl version it uses.
 
 The first line includes the full version of curl, libcurl and other 3rd party
@@ -2870,8 +2965,13 @@
 .IP "Debug"
 This curl uses a libcurl built with Debug. This enables more error-tracking
 and memory debugging etc. For curl-developers only!
+.IP "gsasl"
+The built-in SASL authentication includes extensions to support SCRAM because
+libcurl was built with libgsasl.
 .IP "GSS-API"
 GSS-API is supported.
+.IP "HSTS"
+HSTS support is present.
 .IP "HTTP2"
 HTTP/2 support has been built-in.
 .IP "HTTP3"
@@ -2879,23 +2979,22 @@
 .IP "HTTPS-proxy"
 This curl is built to support HTTPS proxy.
 .IP "IDN"
-This curl supports IDN - international domain names.
+This curl supports IDN \- international domain names.
 .IP "IPv6"
 You can use IPv6 with this.
-.IP "krb4"
-Krb4 for FTP is supported.
+.IP "Kerberos"
+Kerberos V5 authentication is supported.
 .IP "Largefile"
 This curl supports transfers of large files, files larger than 2GB.
 .IP "libz"
-Automatic decompression of compressed files over HTTP is supported.
-.IP "Metalink"
-This curl supports Metalink
+Automatic decompression (via gzip, deflate) of compressed files over HTTP is
+supported.
 .IP "MultiSSL"
 This curl supports multiple TLS backends.
 .IP "NTLM"
 NTLM authentication is supported.
-.IP "NTLM"
-NTLM authentication is supported.
+.IP "NTLM_WB"
+NTLM delegation to winbind helper is supported.
 .IP "PSL"
 PSL is short for Public Suffix List and means that this curl has been built
 with knowledge about "public suffixes".
@@ -2908,10 +3007,16 @@
 SSPI is supported.
 .IP "TLS-SRP"
 SRP (Secure Remote Password) authentication is supported for TLS.
+.IP "TrackMemory"
+Debug memory tracking is supported.
+.IP "Unicode"
+Unicode support on Windows.
 .IP "UnixSockets"
 Unix sockets support is provided.
+.IP "zstd"
+Automatic decompression (via zstd) of compressed files over HTTP is supported.
 .RE
-.IP "-w, --write-out <format>"
+.IP "\-w, \-\-write-out <format>"
 Make curl display information on stdout after a completed transfer. The format
 is a string that may contain plain text mixed with any number of
 variables. The format can be specified as a literal "string", or you can have
@@ -2937,10 +3042,16 @@
 .B content_type
 The Content-Type of the requested document, if there was any.
 .TP
+.B errormsg
+The error message. (Added in 7.75.0)
+.TP
+.B exitcode
+The numerical exitcode of the transfer. (Added in 7.75.0)
+.TP
 .B filename_effective
 The ultimate filename that curl writes out to. This is only meaningful if curl
-is told to write to a file with the \fI-O, --remote-name\fP or \fI-o, --output\fP
-option. It's most useful in combination with the \fI-J, --remote-header-name\fP
+is told to write to a file with the \fI\-O, \-\-remote-name\fP or \fI\-o, \-\-output\fP
+option. It's most useful in combination with the \fI\-J, \-\-remote-header-name\fP
 option. (Added in 7.26.0)
 .TP
 .B ftp_entry_path
@@ -2963,14 +3074,14 @@
 A JSON object with all available keys.
 .TP
 .B local_ip
-The IP address of the local end of the most recently done connection - can be
-either IPv4 or IPv6 (Added in 7.29.0)
+The IP address of the local end of the most recently done connection \- can be
+either IPv4 or IPv6. (Added in 7.29.0)
 .TP
 .B local_port
-The local port number of the most recently done connection (Added in 7.29.0)
+The local port number of the most recently done connection. (Added in 7.29.0)
 .TP
 .B method
-The http method used in the most recent HTTP request (Added in 7.72.0)
+The http method used in the most recent HTTP request. (Added in 7.72.0)
 .TP
 .B num_connects
 Number of new connects made in the recent transfer. (Added in 7.12.3)
@@ -2982,28 +3093,35 @@
 .B num_redirects
 Number of redirects that were followed in the request. (Added in 7.12.3)
 .TP
+.B onerror
+The rest of the output is only shown if the transfer returned a non-zero error
+(Added in 7.75.0)
+.TP
 .B proxy_ssl_verify_result
 The result of the HTTPS proxy's SSL peer certificate verification that was
 requested. 0 means the verification was successful. (Added in 7.52.0)
 .TP
 .B redirect_url
-When an HTTP request was made without \fI-L, --location\fP to follow redirects (or when
---max-redir is met), this variable will show the actual URL a redirect
+When an HTTP request was made without \fI\-L, \-\-location\fP to follow redirects (or when
+\fI\-\-max-redirs\fP is met), this variable will show the actual URL a redirect
 \fIwould\fP have gone to. (Added in 7.18.2)
 .TP
+.B referer
+The Referer: header, if there was any. (Added in 7.76.0)
+.TP
 .B remote_ip
-The remote IP address of the most recently done connection - can be either
-IPv4 or IPv6 (Added in 7.29.0)
+The remote IP address of the most recently done connection \- can be either
+IPv4 or IPv6. (Added in 7.29.0)
 .TP
 .B remote_port
-The remote port number of the most recently done connection (Added in 7.29.0)
+The remote port number of the most recently done connection. (Added in 7.29.0)
 .TP
 .B response_code
 The numerical response code that was found in the last transfer (formerly
 known as "http_code"). (Added in 7.18.2)
 .TP
 .B scheme
-The URL scheme (sometimes called protocol) that was effectively used (Added in 7.52.0)
+The URL scheme (sometimes called protocol) that was effectively used. (Added in 7.52.0)
 .TP
 .B size_download
 The total amount of bytes that were downloaded.
@@ -3030,11 +3148,11 @@
 means the verification was successful. (Added in 7.19.0)
 .TP
 .B stderr
-From this point on, the \fI-w, --write-out\fP output will be written to standard
+From this point on, the \fI\-w, \-\-write-out\fP output will be written to standard
 error. (Added in 7.63.0)
 .TP
 .B stdout
-From this point on, the \fI-w, --write-out\fP output will be written to standard output.
+From this point on, the \fI\-w, \-\-write-out\fP output will be written to standard output.
 This is the default, but can be used to switch back after switching to stderr.
 (Added in 7.63.0)
 .TP
@@ -3069,13 +3187,20 @@
 .B time_total
 The total time, in seconds, that the full operation lasted.
 .TP
+.B url
+The URL that was fetched. (Added in 7.75.0)
+.TP
+.B urlnum
+The URL index number of this transfer, 0-indexed. De-globbed URLs share the
+same index number as the origin globbed URL. (Added in 7.75.0)
+.TP
 .B url_effective
 The URL that was fetched last. This is most meaningful if you've told curl
 to follow location: headers.
 .RE
 .IP
 If this option is used several times, the last one will be used.
-.IP "--xattr"
+.IP "\-\-xattr"
 When saving output to a file, this option tells curl to store certain file
 metadata in extended file attributes. Currently, the URL is stored in the
 xdg.origin.url attribute and, for HTTP, the content type is stored in
@@ -3084,14 +3209,14 @@
 .SH FILES
 .I ~/.curlrc
 .RS
-Default config file, see \fI-K, --config\fP for details.
+Default config file, see \fI\-K, \-\-config\fP for details.
 .SH ENVIRONMENT
 The environment variables can be specified in lower case or upper case. The
 lower case version has precedence. http_proxy is an exception as it is only
 available in lower case.
 
 Using an environment variable to set the proxy has the same effect as using
-the \fI-x, --proxy\fP option.
+the \fI\-x, \-\-proxy\fP option.
 
 .IP "http_proxy [protocol://]<host>[:port]"
 Sets the proxy server to use for HTTP.
@@ -3100,7 +3225,7 @@
 .IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
 Sets the proxy server to use for [url-protocol], where the protocol is a
 protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
-SMTP, LDAP etc.
+SMTP, LDAP, etc.
 .IP "ALL_PROXY [protocol://]<host>[:port]"
 Sets the proxy server to use if no protocol-specific proxy is set.
 .IP "NO_PROXY <comma-separated list of hosts/domains>"
@@ -3109,11 +3234,11 @@
 a domain name which contains the hostname, or the hostname itself.
 
 This environment variable disables use of the proxy even when specified with
-the \fI-x, --proxy\fP option. That is
-.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
+the \fI\-x, \-\-proxy\fP option. That is
+.B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
 .B http://direct.example.com
 accesses the target URL directly, and
-.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
+.B NO_PROXY=direct.example.com curl \-x http://proxy.example.com
 .B http://somewhere.example.com
 accesses the target URL through the proxy.
 
@@ -3127,8 +3252,11 @@
 If curl was built with support for "MultiSSL", meaning that it has built-in
 support for more than one TLS backend, this environment variable can be set to
 the case insensitive name of the particular backend to use when curl is
-invoked. Setting a name that isn't a built-in alternative, will make curl
+invoked. Setting a name that isn't a built-in alternative will make curl
 stay with the default.
+
+SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
+mesalink, nss, openssl, rustls, schannel, secure-transport, wolfssl
 .IP "QLOGDIR <directory name>"
 If curl was built with HTTP/3 support, setting this environment variable to a
 local directory will make curl produce qlogs in that directory, using file
@@ -3153,16 +3281,16 @@
 .IP "https://"
 Makes it treated as an \fBHTTPS\fP proxy.
 .IP "socks4://"
-Makes it the equivalent of \fI--socks4\fP
+Makes it the equivalent of \fI\-\-socks4\fP
 .IP "socks4a://"
-Makes it the equivalent of \fI--socks4a\fP
+Makes it the equivalent of \fI\-\-socks4a\fP
 .IP "socks5://"
-Makes it the equivalent of \fI--socks5\fP
+Makes it the equivalent of \fI\-\-socks5\fP
 .IP "socks5h://"
-Makes it the equivalent of \fI--socks5-hostname\fP
+Makes it the equivalent of \fI\-\-socks5-hostname\fP
 .SH EXIT CODES
 There are a bunch of different error codes and their corresponding error
-messages that may appear during bad conditions. At the time of this writing,
+messages that may appear under error conditions. At the time of this writing,
 the exit codes are:
 .IP 1
 Unsupported protocol. This build of curl has no support for this protocol.
@@ -3177,7 +3305,7 @@
 .IP 5
 Couldn't resolve proxy. The given proxy host could not be resolved.
 .IP 6
-Couldn't resolve host. The given remote host was not resolved.
+Couldn't resolve host. The given remote host could not be resolved.
 .IP 7
 Failed to connect to host.
 .IP 8
@@ -3217,7 +3345,7 @@
 .IP 22
 HTTP page not retrieved. The requested url was not found or returned another
 error with the HTTP error code being 400 or above. This return code only
-appears if \fI-f, --fail\fP is used.
+appears if \fI\-f, \-\-fail\fP is used.
 .IP 23
 Write error. Curl couldn't write data to a local filesystem or similar.
 .IP 25
@@ -3317,7 +3445,7 @@
 .IP 76
 Character conversion functions required.
 .IP 77
-Problem with reading the SSL CA cert (path? access rights?).
+Problem reading the SSL CA cert (path? access rights?).
 .IP 78
 The resource referenced in the URL does not exist.
 .IP 79
@@ -3329,19 +3457,19 @@
 .IP 83
 Issuer check failed (added in 7.19.0).
 .IP 84
-The FTP PRET command failed
+The FTP PRET command failed.
 .IP 85
-RTSP: mismatch of CSeq numbers
+Mismatch of RTSP CSeq numbers.
 .IP 86
-RTSP: mismatch of Session Identifiers
+Mismatch of RTSP Session Identifiers.
 .IP 87
-unable to parse FTP file list
+Unable to parse FTP file list.
 .IP 88
-FTP chunk callback reported error
+FTP chunk callback reported error.
 .IP 89
-No connection available, the session will be queued
+No connection available, the session will be queued.
 .IP 90
-SSL public key does not matched pinned public key
+SSL public key does not matched pinned public key.
 .IP 91
 Invalid SSL certificate status.
 .IP 92
@@ -3363,7 +3491,7 @@
 Daniel Stenberg is the main author, but the whole list of contributors is
 found in the separate THANKS file.
 .SH WWW
-https://curl.haxx.se
+https://curl.se
 .SH "SEE ALSO"
 .BR ftp (1),
 .BR wget (1)
diff --git a/docs/examples/.checksrc b/docs/examples/.checksrc
new file mode 100644
index 0000000..dea90aa
--- /dev/null
+++ b/docs/examples/.checksrc
@@ -0,0 +1,3 @@
+disable TYPEDEFSTRUCT
+disable SNPRINTF
+disable BANNEDFUNC
diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c
index b50eaa6..9f45e45 100644
--- a/docs/examples/10-at-a-time.c
+++ b/docs/examples/10-at-a-time.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am
index b8fd1ff..1da1e8d 100644
--- a/docs/examples/Makefile.am
+++ b/docs/examples/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -23,7 +23,7 @@
 AUTOMAKE_OPTIONS = foreign nostdinc
 
 EXTRA_DIST = README.md Makefile.example Makefile.inc Makefile.m32 \
-  Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES)
+  Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES) .checksrc
 
 # Specify our include paths here, and do it relative to $(top_srcdir) and
 # $(top_builddir), to ensure that these paths which belong to the library
diff --git a/docs/examples/Makefile.example b/docs/examples/Makefile.example
index 72e762f..e598d35 100644
--- a/docs/examples/Makefile.example
+++ b/docs/examples/Makefile.example
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc
index 79c9e50..028956f 100644
--- a/docs/examples/Makefile.inc
+++ b/docs/examples/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -21,28 +21,125 @@
 ###########################################################################
 
 # These are all libcurl example programs to be test compiled
-check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
-  fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput  \
-  https multi-app multi-debugcallback multi-double multi-post multi-single \
-  persistent post-callback postit2 sepheaders simple simplepost simplessl  \
-  sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard      \
-  smtp-mail smtp-mime smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn     \
-  rtsp externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl   \
-  pop3-dele pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi      \
-  imap-list imap-lsub imap-fetch imap-store imap-append imap-examine       \
-  imap-search imap-create imap-delete imap-copy imap-noop imap-ssl         \
-  imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \
-  http2-upload http2-serverpush getredirect ftpuploadfrommem               \
-  ftpuploadresume sslbackend postit2-formadd multi-formadd                 \
-  shared-connection-cache sftpuploadresume http2-pushinmemory parseurl     \
-  urlapi imap-authzid pop3-authzid smtp-authzid http3 altsvc               \
-  http3-present multi-poll
+check_PROGRAMS = \
+  10-at-a-time \
+  altsvc \
+  anyauthput \
+  certinfo \
+  chkspeed \
+  cookie_interface \
+  debug \
+  externalsocket \
+  fileupload \
+  fopen \
+  ftp-wildcard \
+  ftpget \
+  ftpgetinfo \
+  ftpgetresp \
+  ftpsget \
+  ftpupload \
+  ftpuploadfrommem \
+  ftpuploadresume \
+  getinfo \
+  getinmemory \
+  getredirect \
+  getreferrer \
+  http-post \
+  http2-download \
+  http2-pushinmemory \
+  http2-serverpush \
+  http2-upload \
+  http3 \
+  http3-present \
+  httpcustomheader \
+  httpput \
+  httpput-postfields \
+  https \
+  imap-append \
+  imap-authzid \
+  imap-copy \
+  imap-create \
+  imap-delete \
+  imap-examine \
+  imap-fetch \
+  imap-list \
+  imap-lsub \
+  imap-multi \
+  imap-noop \
+  imap-search \
+  imap-ssl \
+  imap-store \
+  imap-tls \
+  multi-app \
+  multi-debugcallback \
+  multi-double \
+  multi-formadd \
+  multi-legacy \
+  multi-post \
+  multi-single \
+  parseurl \
+  persistent \
+  pop3-authzid \
+  pop3-dele \
+  pop3-list \
+  pop3-multi \
+  pop3-noop \
+  pop3-retr \
+  pop3-ssl \
+  pop3-stat \
+  pop3-tls \
+  pop3-top \
+  pop3-uidl \
+  post-callback \
+  postinmemory \
+  postit2 \
+  postit2-formadd \
+  progressfunc \
+  resolve \
+  rtsp \
+  sendrecv \
+  sepheaders \
+  sftpget \
+  sftpuploadresume \
+  shared-connection-cache \
+  simple \
+  simplepost \
+  simplessl \
+  smtp-authzid \
+  smtp-expn \
+  smtp-mail \
+  smtp-mime \
+  smtp-multi \
+  smtp-ssl \
+  smtp-tls \
+  smtp-vrfy \
+  sslbackend \
+  url2file \
+  urlapi
 
 # These examples require external dependencies that may not be commonly
 # available on POSIX systems, so don't bother attempting to compile them here.
-COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \
-  ghiper.c hiperfifo.c htmltidy.c multithread.c opensslthreadlock.c \
-  sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
-  smooth-gtk-thread.c version-check.pl href_extractor.c \
-  multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c \
-  threaded-shared-conn.c crawler.c ephiperfifo.c multi-event.c
+COMPLICATED_EXAMPLES = \
+  cacertinmem.c \
+  crawler.c \
+  curlgtk.c \
+  curlx.c \
+  ephiperfifo.c \
+  evhiperfifo.c \
+  ghiper.c \
+  hiperfifo.c \
+  href_extractor.c \
+  htmltidy.c \
+  htmltitle.cpp \
+  multi-event.c \
+  multi-uv.c \
+  multithread.c \
+  opensslthreadlock.c \
+  sampleconv.c \
+  sessioninfo.c \
+  smooth-gtk-thread.c \
+  synctime.c \
+  threaded-ssl.c \
+  usercertinmem.c \
+  version-check.pl \
+  xmlstream.c
diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32
index a2dca6b..45ec867 100644
--- a/docs/examples/Makefile.m32
+++ b/docs/examples/Makefile.m32
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -59,10 +59,6 @@
 ifndef LIBRTMP_PATH
 LIBRTMP_PATH = ../../../librtmp-2.4
 endif
-# Edit the path below to point to the base of your libmetalink package.
-ifndef LIBMETALINK_PATH
-LIBMETALINK_PATH = ../../../libmetalink-0.1.3
-endif
 # Edit the path below to point to the base of your libexpat package.
 ifndef LIBEXPAT_PATH
 LIBEXPAT_PATH = ../../../expat-2.1.0
@@ -71,6 +67,10 @@
 ifndef LIBXML2_PATH
 LIBXML2_PATH = ../../../libxml2-2.9.2
 endif
+# Edit the path below to point to the base of your libgsasl package.
+ifndef LIBGSASL_PATH
+LIBGSASL_PATH = ../../../libgsasl-1.10.0
+endif
 # Edit the path below to point to the base of your libidn2 package.
 ifndef LIBIDN2_PATH
 LIBIDN2_PATH = ../../../libidn2-2.0.3
@@ -89,6 +89,14 @@
 ifndef NGHTTP2_PATH
 NGHTTP2_PATH = ../../../nghttp2-1.0.0
 endif
+# Edit the path below to point to the base of your nghttp3 package.
+ifndef NGHTTP3_PATH
+NGHTTP3_PATH = ../../../nghttp3-1.0.0
+endif
+# Edit the path below to point to the base of your ngtcp2 package.
+ifndef NGTCP2_PATH
+NGTCP2_PATH = ../../../ngtcp2-1.0.0
+endif
 
 PROOT = ../..
 
@@ -190,6 +198,9 @@
 ifeq ($(findstring -brotli,$(CFG)),-brotli)
 BROTLI = 1
 endif
+ifeq ($(findstring -gsasl,$(CFG)),-gsasl)
+GSASL = 1
+endif
 ifeq ($(findstring -idn2,$(CFG)),-idn2)
 IDN2 = 1
 endif
@@ -205,9 +216,6 @@
 ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
 IPV6 = 1
 endif
-ifeq ($(findstring -metalink,$(CFG)),-metalink)
-METALINK = 1
-endif
 ifeq ($(findstring -winssl,$(CFG)),-winssl)
 WINSSL = 1
 SSPI = 1
@@ -215,6 +223,12 @@
 ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
 NGHTTP2 = 1
 endif
+ifeq ($(findstring -nghttp3,$(CFG)),-nghttp3)
+NGHTTP3 = 1
+endif
+ifeq ($(findstring -ngtcp2,$(CFG)),-ngtcp2)
+NGTCP2 = 1
+endif
 
 INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
 
@@ -252,6 +266,15 @@
   endif
 endif
 ifdef SSL
+  ifdef NGHTTP3
+    CFLAGS += -DUSE_NGHTTP3
+    curl_LDADD += -L"$(NGHTTP3_PATH)/lib" -lnghttp3
+    ifdef NGTCP2
+      CFLAGS += -DUSE_NGTCP2
+      curl_LDADD += -L"$(NGTCP2_PATH)/lib" -lngtcp2 -lngtcp2_crypto_openssl
+    endif
+  endif
+
   ifndef OPENSSL_INCLUDE
     ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
       OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
@@ -311,6 +334,10 @@
     curl_LDADD += -lbrotlidec
   endif
 endif
+ifdef GSASL
+  CFLAGS += -DUSE_GSASL
+  curl_LDADD += -L"$(LIBGSASL_PATH)/lib" -lgsasl
+endif
 ifdef IDN2
   CFLAGS += -DUSE_LIBIDN2
   curl_LDADD += -L"$(LIBIDN2_PATH)/lib" -lidn2
@@ -320,18 +347,6 @@
   curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
 endif
 endif
-ifdef METALINK
-  INCLUDES += -I"$(LIBMETALINK_PATH)/include"
-  CFLAGS += -DUSE_METALINK
-  curl_LDADD += -L"$(LIBMETALINK_PATH)/lib" -lmetalink
-  ifndef DYN
-    ifeq ($(findstring libexpat_metalink_parser.o,$(shell $(AR) t "$(LIBMETALINK_PATH)/lib/libmetalink.a")),libexpat_metalink_parser.o)
-      curl_LDADD += -L"$(LIBEXPAT_PATH)/lib" -lexpat
-    else
-      curl_LDADD += -L"$(LIBXML2_PATH)/lib" -lxml2
-    endif
-  endif
-endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
 endif
diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware
index 260c557..3198e26 100644
--- a/docs/examples/Makefile.netware
+++ b/docs/examples/Makefile.netware
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/README.md b/docs/examples/README.md
index f2ba061..c838465 100644
--- a/docs/examples/README.md
+++ b/docs/examples/README.md
@@ -21,7 +21,7 @@
 
     `curl-config --cc` -o example example.c `curl-config --cflags --libs`
 
-**Please** do not use the `curl.haxx.se` site as a test target for your
+**Please** do not use the `curl.se` site as a test target for your
 libcurl applications/experiments. Even if some of the examples use that site
 as a URL at some places, it doesn't mean that the URLs work or that we expect
 you to actually torture our website with your tests!  Thanks.
diff --git a/docs/examples/altsvc.c b/docs/examples/altsvc.c
index 24ef425..ffca057 100644
--- a/docs/examples/altsvc.c
+++ b/docs/examples/altsvc.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index 7faf93d..47b713a 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -78,7 +78,7 @@
 }
 
 /* read callback function, fread() look alike */
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   ssize_t retcode;
   curl_off_t nread;
diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c
index ea295d0..880b7b1 100644
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -129,9 +129,9 @@
   curl_easy_setopt(ch, CURLOPT_HEADER, 0L);
   curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L);
   curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
-  curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, *writefunction);
+  curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction);
   curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout);
-  curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, *writefunction);
+  curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction);
   curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr);
   curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
   curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L);
@@ -168,7 +168,7 @@
    * load the certificate by installing a function doing the necessary
    * "modifications" to the SSL CONTEXT just before link init
    */
-  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
   rv = curl_easy_perform(ch);
   if(rv == CURLE_OK)
     printf("*** transfer succeeded ***\n");
diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c
index 1aee614..6e622c4 100644
--- a/docs/examples/certinfo.c
+++ b/docs/examples/certinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/chkspeed.c b/docs/examples/chkspeed.c
index bf9c487..f9e6f13 100644
--- a/docs/examples/chkspeed.c
+++ b/docs/examples/chkspeed.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index 32e9a1d..42cbe46 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c
index 5990799..51f4b45 100644
--- a/docs/examples/curlgtk.c
+++ b/docs/examples/curlgtk.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- *  Copyright (c) 2000 - 2019 David Odin (aka DindinX) for MandrakeSoft
+ * Copyright (c) 2000 - 2020 David Odin (aka DindinX) for MandrakeSoft
  */
 /* <DESC>
  * use the libcurl in a gtk-threaded application
@@ -19,21 +19,21 @@
 
 GtkWidget *Bar;
 
-size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
+static size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
 {
   return fwrite(ptr, size, nmemb, stream);
 }
 
-size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
+static size_t my_read_func(char *ptr, size_t size, size_t nmemb, FILE *stream)
 {
   return fread(ptr, size, nmemb, stream);
 }
 
-int my_progress_func(GtkWidget *bar,
-                     double t, /* dltotal */
-                     double d, /* dlnow */
-                     double ultotal,
-                     double ulnow)
+static int my_progress_func(GtkWidget *bar,
+                            double t, /* dltotal */
+                            double d, /* dlnow */
+                            double ultotal,
+                            double ulnow)
 {
 /*  printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
   gdk_threads_enter();
@@ -42,7 +42,7 @@
   return 0;
 }
 
-void *my_thread(void *ptr)
+static void *my_thread(void *ptr)
 {
   CURL *curl;
 
@@ -98,7 +98,6 @@
   if(!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
     g_warning("can't create the thread");
 
-
   gdk_threads_enter();
   gtk_main();
   gdk_threads_leave();
diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c
index 8b48c99..3e3e353 100644
--- a/docs/examples/curlx.c
+++ b/docs/examples/curlx.c
@@ -15,7 +15,7 @@
  */
 
 /*
- * Copyright (c) 2003 - 2020 The OpenEvidence Project.  All rights reserved.
+ * Copyright (c) 2003 - 2021 The OpenEvidence Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -372,7 +372,7 @@
     args++;
   }
 
-  if(mimetype == NULL || mimetypeaccept == NULL || p.p12file == NULL)
+  if(!mimetype || !mimetypeaccept || !p.p12file)
     badarg = 1;
 
   if(badarg) {
@@ -385,11 +385,11 @@
   /* set input */
 
   in = BIO_new(BIO_s_file());
-  if(in == NULL) {
+  if(!in) {
     BIO_printf(p.errorbio, "Error setting input bio\n");
     goto err;
   }
-  else if(infile == NULL)
+  else if(!infile)
     BIO_set_fp(in, stdin, BIO_NOCLOSE|BIO_FP_TEXT);
   else if(BIO_read_filename(in, infile) <= 0) {
     BIO_printf(p.errorbio, "Error opening input file %s\n", infile);
@@ -400,11 +400,11 @@
   /* set output  */
 
   out = BIO_new(BIO_s_file());
-  if(out == NULL) {
+  if(!out) {
     BIO_printf(p.errorbio, "Error setting output bio.\n");
     goto err;
   }
-  else if(outfile == NULL)
+  else if(!outfile)
     BIO_set_fp(out, stdout, BIO_NOCLOSE|BIO_FP_TEXT);
   else if(BIO_write_filename(out, outfile) <= 0) {
     BIO_printf(p.errorbio, "Error opening output file %s\n", outfile);
@@ -453,8 +453,8 @@
     serverurl = malloc(len);
     snprintf(serverurl, len, "https://%s", hostporturl);
   }
-  else if(p.accesstype != 0) { /* see whether we can find an AIA or SIA for a
-                                  given access type */
+  else if(p.accesstype) { /* see whether we can find an AIA or SIA for a
+                             given access type */
     serverurl = my_get_ext(p.usercert, p.accesstype, NID_info_access);
     if(!serverurl) {
       int j = 0;
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index 884184a..87492aa 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c
index c27d7c1..11761b9 100644
--- a/docs/examples/ephiperfifo.c
+++ b/docs/examples/ephiperfifo.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c
index 4d77d52..95c6486 100644
--- a/docs/examples/evhiperfifo.c
+++ b/docs/examples/evhiperfifo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c
index bd0adf2..bb29b0e 100644
--- a/docs/examples/externalsocket.c
+++ b/docs/examples/externalsocket.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -98,7 +98,7 @@
 #ifdef WIN32
   WSADATA wsaData;
   int initwsa = WSAStartup(MAKEWORD(2, 0), &wsaData);
-  if(initwsa != 0) {
+  if(initwsa) {
     printf("WSAStartup failed: %d\n", initwsa);
     return 1;
   }
diff --git a/docs/examples/fileupload.c b/docs/examples/fileupload.c
index 0689275..eb484e9 100644
--- a/docs/examples/fileupload.c
+++ b/docs/examples/fileupload.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index a11a522..932140e 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -13,7 +13,7 @@
  * See the main() function at the bottom that shows an app that retrieves from
  * a specified url using fgets() and fread() and saves as two output files.
  *
- * Copyright (c) 2003 - 2019 Simtec Electronics
+ * Copyright (c) 2003 - 2021 Simtec Electronics
  *
  * Re-implemented by Vincent Sanders <vince@kyllikki.org> with extensive
  * reference to original curl example code
@@ -107,7 +107,7 @@
   if(size > rembuff) {
     /* not enough space in buffer */
     newbuff = realloc(url->buffer, url->buffer_len + (size - rembuff));
-    if(newbuff == NULL) {
+    if(!newbuff) {
       fprintf(stderr, "callback buffer grow failed\n");
       size = rembuff;
     }
diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c
index c7ed23f..14f5d5d 100644
--- a/docs/examples/ftp-wildcard.c
+++ b/docs/examples/ftp-wildcard.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c
index fc7ab4a..300a282 100644
--- a/docs/examples/ftpget.c
+++ b/docs/examples/ftpget.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c
index db16408..89ffe75 100644
--- a/docs/examples/ftpgetinfo.c
+++ b/docs/examples/ftpgetinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -64,7 +64,7 @@
     res = curl_easy_perform(curl);
 
     if(CURLE_OK == res) {
-      /* https://curl.haxx.se/libcurl/c/curl_easy_getinfo.html */
+      /* https://curl.se/libcurl/c/curl_easy_getinfo.html */
       res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
       if((CURLE_OK == res) && (filetime >= 0)) {
         time_t file_time = (time_t)filetime;
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index 7dc3440..93945ed 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c
index 91162e6..44ae3ff 100644
--- a/docs/examples/ftpsget.c
+++ b/docs/examples/ftpsget.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 25e292d..7ed7634 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,7 +48,7 @@
    DLL, you MUST also provide a read callback with CURLOPT_READFUNCTION.
    Failing to do so will give you a crash since a DLL may not use the
    variable's memory when passed in to it from an app like this. */
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   curl_off_t nread;
   /* in real-world cases, this would probably get this data differently
diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c
index 134cda3..fbbc01b 100644
--- a/docs/examples/ftpuploadfrommem.c
+++ b/docs/examples/ftpuploadfrommem.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -43,7 +43,7 @@
   size_t sizeleft;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *upload = (struct WriteThis *)userp;
   size_t max = size*nmemb;
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c
index fc7f803..50166bf 100644
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -51,7 +51,7 @@
 }
 
 /* read data to upload */
-static size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t readfunc(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   FILE *f = stream;
   size_t n;
diff --git a/docs/examples/getinfo.c b/docs/examples/getinfo.c
index d5a820d..bd18384 100644
--- a/docs/examples/getinfo.c
+++ b/docs/examples/getinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index 130d821..120ceac 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -43,7 +43,7 @@
   struct MemoryStruct *mem = (struct MemoryStruct *)userp;
 
   char *ptr = realloc(mem->memory, mem->size + realsize + 1);
-  if(ptr == NULL) {
+  if(!ptr) {
     /* out of memory! */
     printf("not enough memory (realloc returned NULL)\n");
     return 0;
diff --git a/docs/examples/getredirect.c b/docs/examples/getredirect.c
index 64157f9..97da943 100644
--- a/docs/examples/getredirect.c
+++ b/docs/examples/getredirect.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/getreferrer.c b/docs/examples/getreferrer.c
new file mode 100644
index 0000000..faefc61
--- /dev/null
+++ b/docs/examples/getreferrer.c
@@ -0,0 +1,57 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Show how to extract referrer header.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+  CURL *curl;
+
+  curl = curl_easy_init();
+  if(curl) {
+    CURLcode res;
+
+    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+    curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
+
+    /* Perform the request, res will get the return code */
+    res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
+    else {
+      char *hdr;
+      res = curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
+      if((res == CURLE_OK) && hdr)
+        printf("Referrer header: %s\n", hdr);
+    }
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+  }
+  return 0;
+}
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index 1fa3b59..d58adb1 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c
index c02659b..d7d8725 100644
--- a/docs/examples/hiperfifo.c
+++ b/docs/examples/hiperfifo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -234,7 +234,9 @@
 static void remsock(SockInfo *f)
 {
   if(f) {
-    event_del(&f->ev);
+    if(event_initialized(&f->ev)) {
+      event_del(&f->ev);
+    }
     free(f);
   }
 }
@@ -252,7 +254,9 @@
   f->sockfd = s;
   f->action = act;
   f->easy = e;
-  event_del(&f->ev);
+  if(event_initialized(&f->ev)) {
+    event_del(&f->ev);
+  }
   event_assign(&f->ev, g->evbase, f->sockfd, kind, event_cb, g);
   event_add(&f->ev, NULL);
 }
diff --git a/docs/examples/href_extractor.c b/docs/examples/href_extractor.c
index c04733c..eb0c729 100644
--- a/docs/examples/href_extractor.c
+++ b/docs/examples/href_extractor.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c
index 1cfb273..be5350c 100644
--- a/docs/examples/htmltidy.c
+++ b/docs/examples/htmltidy.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp
index e31e3e3..3baba6f 100644
--- a/docs/examples/htmltitle.cpp
+++ b/docs/examples/htmltitle.cpp
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c
index b4c7d37..4807a73 100644
--- a/docs/examples/http-post.c
+++ b/docs/examples/http-post.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c
index bb854cb..6ba82f3 100644
--- a/docs/examples/http2-download.c
+++ b/docs/examples/http2-download.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -212,79 +212,16 @@
 
   curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
+  do {
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
-    struct timeval timeout;
-    int rc; /* select() return code */
-    CURLMcode mc; /* curl_multi_fdset() return code */
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
-
-    long curl_timeo = -1;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(multi_handle, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
-
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      break;
-    case 0:
-    default:
-      /* timeout or readable/writable sockets */
-      curl_multi_perform(multi_handle, &still_running);
-      break;
-    }
-  }
+  } while(still_running);
 
   for(i = 0; i < num_transfers; i++) {
     curl_multi_remove_handle(multi_handle, trans[i].easy);
diff --git a/docs/examples/http2-pushinmemory.c b/docs/examples/http2-pushinmemory.c
index 00406a8..7610ccc 100644
--- a/docs/examples/http2-pushinmemory.c
+++ b/docs/examples/http2-pushinmemory.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -163,7 +163,7 @@
      * easy handles but *we* need to clean them up when they are done.
      */
     do {
-      int msgq = 0;;
+      int msgq = 0;
       m = curl_multi_info_read(multi, &msgq);
       if(m && (m->msg == CURLMSG_DONE)) {
         CURL *e = m->easy_handle;
diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c
index 63dff4c..3d32f22 100644
--- a/docs/examples/http2-serverpush.c
+++ b/docs/examples/http2-serverpush.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -213,7 +213,6 @@
 {
   CURL *easy;
   CURLM *multi_handle;
-  int still_running; /* keep number of running handles */
   int transfers = 1; /* we start with one */
   struct CURLMsg *m;
 
@@ -235,78 +234,16 @@
   curl_multi_setopt(multi_handle, CURLMOPT_PUSHFUNCTION, server_push_callback);
   curl_multi_setopt(multi_handle, CURLMOPT_PUSHDATA, &transfers);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
-
   do {
-    struct timeval timeout;
-    int rc; /* select() return code */
-    CURLMcode mc; /* curl_multi_fdset() return code */
+    int still_running; /* keep number of running handles */
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    long curl_timeo = -1;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(multi_handle, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
-
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      break;
-    case 0:
-    default:
-      /* timeout or readable/writable sockets */
-      curl_multi_perform(multi_handle, &still_running);
-      break;
-    }
 
     /*
      * A little caution when doing server push is that libcurl itself has
@@ -315,7 +252,7 @@
      */
 
     do {
-      int msgq = 0;;
+      int msgq = 0;
       m = curl_multi_info_read(multi_handle, &msgq);
       if(m && (m->msg == CURLMSG_DONE)) {
         CURL *e = m->easy_handle;
diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c
index b8fc277..9485825 100644
--- a/docs/examples/http2-upload.c
+++ b/docs/examples/http2-upload.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -159,7 +159,7 @@
   return 0;
 }
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct input *i = userp;
   size_t retcode = fread(ptr, size, nmemb, i->in);
@@ -279,79 +279,17 @@
   /* We do HTTP/2 so let's stick to one connection per host */
   curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 1L);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
+  do {
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
-    struct timeval timeout;
-    int rc; /* select() return code */
-    CURLMcode mc; /* curl_multi_fdset() return code */
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
-
-    long curl_timeo = -1;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(multi_handle, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
 
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      break;
-    case 0:
-    default:
-      /* timeout or readable/writable sockets */
-      curl_multi_perform(multi_handle, &still_running);
-      break;
-    }
-  }
+  } while(still_running);
 
   curl_multi_cleanup(multi_handle);
 
diff --git a/docs/examples/http3-present.c b/docs/examples/http3-present.c
index 857952d..f0dc7aa 100644
--- a/docs/examples/http3-present.c
+++ b/docs/examples/http3-present.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/http3.c b/docs/examples/http3.c
index 240a7ed..d462d2a 100644
--- a/docs/examples/http3.c
+++ b/docs/examples/http3.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c
index 6712f8c..7a1e1d8 100644
--- a/docs/examples/httpcustomheader.c
+++ b/docs/examples/httpcustomheader.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/httpput-postfields.c b/docs/examples/httpput-postfields.c
new file mode 100644
index 0000000..83c2d1f
--- /dev/null
+++ b/docs/examples/httpput-postfields.c
@@ -0,0 +1,101 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP PUT using CURLOPT_POSTFIELDS
+ * </DESC>
+ */
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <curl/curl.h>
+
+static const char olivertwist[]=
+  "Among other public buildings in a certain town, which for many reasons "
+  "it will be prudent to refrain from mentioning, and to which I will assign "
+  "no fictitious name, there is one anciently common to most towns, great or "
+  "small: to wit, a workhouse; and in this workhouse was born; on a day and "
+  "date which I need not trouble myself to repeat, inasmuch as it can be of "
+  "no possible consequence to the reader, in this stage of the business at "
+  "all events; the item of mortality whose name is prefixed to the head of "
+  "this chapter.";
+
+/*
+ * This example shows a HTTP PUT operation that sends a fixed buffer with
+ * CURLOPT_POSTFIELDS to the URL given as an argument.
+ */
+
+int main(int argc, char **argv)
+{
+  CURL *curl;
+  CURLcode res;
+  char *url;
+
+  if(argc < 2)
+    return 1;
+
+  url = argv[1];
+
+  /* In windows, this will init the winsock stuff */
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  /* get a curl handle */
+  curl = curl_easy_init();
+  if(curl) {
+    struct curl_slist *headers = NULL;
+
+    /* default type with postfields is application/x-www-form-urlencoded,
+       change it if you want */
+    headers = curl_slist_append(headers, "Content-Type: literature/classic");
+    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+
+    /* pass on content in request body. When CURLOPT_POSTFIELDSIZE isn't used,
+       curl does strlen to get the size. */
+    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, olivertwist);
+
+    /* override the POST implied by CURLOPT_POSTFIELDS
+     *
+     * Warning: CURLOPT_CUSTOMREQUEST is problematic, especially if you want
+     * to follow redirects. Be aware.
+     */
+    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
+
+    /* specify target URL, and note that this URL should include a file
+       name, not only a directory */
+    curl_easy_setopt(curl, CURLOPT_URL, url);
+
+    /* Now run off and do what you've been told! */
+    res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+
+    /* free headers */
+    curl_slist_free_all(headers);
+  }
+
+  curl_global_cleanup();
+  return 0;
+}
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 6be9b8d..8365ab2 100644
--- a/docs/examples/httpput.c
+++ b/docs/examples/httpput.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -38,7 +38,7 @@
  * http://www.apacheweek.com/features/put
  */
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t retcode;
   curl_off_t nread;
@@ -89,12 +89,9 @@
     /* we want to use our own read function */
     curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
 
-    /* enable uploading */
+    /* enable uploading (implies PUT over HTTP) */
     curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
-    /* HTTP PUT please */
-    curl_easy_setopt(curl, CURLOPT_PUT, 1L);
-
     /* specify target URL, and note that this URL should include a file
        name, not only a directory */
     curl_easy_setopt(curl, CURLOPT_URL, url);
diff --git a/docs/examples/https.c b/docs/examples/https.c
index 07b417f..6dbf8bd 100644
--- a/docs/examples/https.c
+++ b/docs/examples/https.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c
index ab05433..8dc6d23 100644
--- a/docs/examples/imap-append.c
+++ b/docs/examples/imap-append.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -39,41 +39,42 @@
 #define TO      "<addressee@example.net>"
 #define CC      "<info@example.org>"
 
-static const char *payload_text[] = {
-  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
-  "To: " TO "\r\n",
-  "From: " FROM "(Example User)\r\n",
-  "Cc: " CC "(Another example User)\r\n",
+static const char *payload_text =
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+  "To: " TO "\r\n"
+  "From: " FROM "(Example User)\r\n"
+  "Cc: " CC "(Another example User)\r\n"
   "Message-ID: "
-  "<dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n",
-  "Subject: IMAP example message\r\n",
-  "\r\n", /* empty line to divide headers from body, see RFC5322 */
-  "The body of the message starts here.\r\n",
-  "\r\n",
-  "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
-  "Check RFC5322.\r\n",
-  NULL
-};
+  "<dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n"
+  "Subject: IMAP example message\r\n"
+  "\r\n" /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\r\n"
+  "\r\n"
+  "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+  "Check RFC5322.\r\n";
 
 struct upload_status {
-  int lines_read;
+  size_t bytes_read;
 };
 
-static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
+  size_t room = size * nmemb;
 
   if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
     return 0;
   }
 
-  data = payload_text[upload_ctx->lines_read];
+  data = &payload_text[upload_ctx->bytes_read];
 
   if(data) {
     size_t len = strlen(data);
+    if(room < len)
+      len = room;
     memcpy(ptr, data, len);
-    upload_ctx->lines_read++;
+    upload_ctx->bytes_read += len;
 
     return len;
   }
@@ -88,11 +89,8 @@
 
   curl = curl_easy_init();
   if(curl) {
-    const char **p;
     long infilesize;
-    struct upload_status upload_ctx;
-
-    upload_ctx.lines_read = 0;
+    struct upload_status upload_ctx = { 0 };
 
     /* Set username and password */
     curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
@@ -110,10 +108,7 @@
     curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
     curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
-    infilesize = 0;
-    for(p = payload_text; *p; ++p) {
-      infilesize += (long)strlen(*p);
-    }
+    infilesize = strlen(payload_text);
     curl_easy_setopt(curl, CURLOPT_INFILESIZE, infilesize);
 
     /* Perform the append */
diff --git a/docs/examples/imap-authzid.c b/docs/examples/imap-authzid.c
index bfe7d71..12b566e 100644
--- a/docs/examples/imap-authzid.c
+++ b/docs/examples/imap-authzid.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c
index 1ef43f8..3efa713 100644
--- a/docs/examples/imap-copy.c
+++ b/docs/examples/imap-copy.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-create.c b/docs/examples/imap-create.c
index 6f04453..edb7daa 100644
--- a/docs/examples/imap-create.c
+++ b/docs/examples/imap-create.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-delete.c b/docs/examples/imap-delete.c
index cf1ae0b..9eaf8d7 100644
--- a/docs/examples/imap-delete.c
+++ b/docs/examples/imap-delete.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-examine.c b/docs/examples/imap-examine.c
index b89e9dc..6bc1c94 100644
--- a/docs/examples/imap-examine.c
+++ b/docs/examples/imap-examine.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-fetch.c b/docs/examples/imap-fetch.c
index 192d2e9..0fa584a 100644
--- a/docs/examples/imap-fetch.c
+++ b/docs/examples/imap-fetch.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c
index cbd3ebb..90b556d 100644
--- a/docs/examples/imap-list.c
+++ b/docs/examples/imap-list.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-lsub.c b/docs/examples/imap-lsub.c
index c77d46a..0597edd 100644
--- a/docs/examples/imap-lsub.c
+++ b/docs/examples/imap-lsub.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c
index 07d1b8b..d4ad958 100644
--- a/docs/examples/imap-multi.c
+++ b/docs/examples/imap-multi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,35 +32,13 @@
 /* This is a simple example showing how to fetch mail using libcurl's IMAP
  * capabilities. It builds on the imap-fetch.c example to demonstrate how to
  * use libcurl's multi interface.
- *
- * Note that this example requires libcurl 7.30.0 or above.
  */
 
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
-
-static struct timeval tvnow(void)
-{
-  struct timeval now;
-
-  /* time() returns the value of time in seconds since the epoch */
-  now.tv_sec = (long)time(NULL);
-  now.tv_usec = 0;
-
-  return now;
-}
-
-static long tvdiff(struct timeval newer, struct timeval older)
-{
-  return (newer.tv_sec - older.tv_sec) * 1000 +
-    (newer.tv_usec - older.tv_usec) / 1000;
-}
-
 int main(void)
 {
   CURL *curl;
   CURLM *mcurl;
   int still_running = 1;
-  struct timeval mp_start;
 
   curl_global_init(CURL_GLOBAL_DEFAULT);
 
@@ -82,86 +60,16 @@
   /* Tell the multi stack about our easy handle */
   curl_multi_add_handle(mcurl, curl);
 
-  /* Record the start time which we can use later */
-  mp_start = tvnow();
+  do {
+    CURLMcode mc = curl_multi_perform(mcurl, &still_running);
 
-  /* We start some action by calling perform right away */
-  curl_multi_perform(mcurl, &still_running);
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(mcurl, NULL, 0, 1000, NULL);
 
-  while(still_running) {
-    struct timeval timeout;
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
-    int rc;
-    CURLMcode mc; /* curl_multi_fdset() return code */
-
-    long curl_timeo = -1;
-
-    /* Initialise the file descriptors */
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* Set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(mcurl, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
-
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
-      fprintf(stderr,
-              "ABORTING: Since it seems that we would have run forever.\n");
-      break;
-    }
-
-    switch(rc) {
-    case -1:  /* select error */
-      break;
-    case 0:   /* timeout */
-    default:  /* action */
-      curl_multi_perform(mcurl, &still_running);
-      break;
-    }
-  }
+  } while(still_running);
 
   /* Always cleanup */
   curl_multi_remove_handle(mcurl, curl);
diff --git a/docs/examples/imap-noop.c b/docs/examples/imap-noop.c
index 719919a..3cea5ca 100644
--- a/docs/examples/imap-noop.c
+++ b/docs/examples/imap-noop.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-search.c b/docs/examples/imap-search.c
index 427dcc9..da3f2f9 100644
--- a/docs/examples/imap-search.c
+++ b/docs/examples/imap-search.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c
index 69839ad..ce890c9 100644
--- a/docs/examples/imap-ssl.c
+++ b/docs/examples/imap-ssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-store.c b/docs/examples/imap-store.c
index b08dd42..d39c6ea 100644
--- a/docs/examples/imap-store.c
+++ b/docs/examples/imap-store.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/imap-tls.c b/docs/examples/imap-tls.c
index 7daa0bf..d80f54d 100644
--- a/docs/examples/imap-tls.c
+++ b/docs/examples/imap-tls.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/makefile.dj b/docs/examples/makefile.dj
index eca16b8..3a1f05c 100644
--- a/docs/examples/makefile.dj
+++ b/docs/examples/makefile.dj
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c
index dc03d0e..76c2575 100644
--- a/docs/examples/multi-app.c
+++ b/docs/examples/multi-app.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,7 +48,7 @@
   CURL *handles[HANDLECOUNT];
   CURLM *multi_handle;
 
-  int still_running = 0; /* keep number of running handles */
+  int still_running = 1; /* keep number of running handles */
   int i;
 
   CURLMsg *msg; /* for picking up messages with the transfer status */
@@ -71,79 +71,16 @@
   for(i = 0; i<HANDLECOUNT; i++)
     curl_multi_add_handle(multi_handle, handles[i]);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
-
   while(still_running) {
-    struct timeval timeout;
-    int rc; /* select() return code */
-    CURLMcode mc; /* curl_multi_fdset() return code */
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    long curl_timeo = -1;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(multi_handle, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
-
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      break;
-    case 0: /* timeout */
-    default: /* action */
-      curl_multi_perform(multi_handle, &still_running);
-      break;
-    }
   }
-
   /* See how the transfers went */
   while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
     if(msg->msg == CURLMSG_DONE) {
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 59f7244..af79e56 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -147,81 +147,17 @@
   /* add the individual transfers */
   curl_multi_add_handle(multi_handle, http_handle);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
+  do {
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
-    struct timeval timeout;
-    int rc; /* select() return code */
-    CURLMcode mc; /* curl_multi_fdset() return code */
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
-
-    long curl_timeo = -1;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(multi_handle, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
 
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      still_running = 0;
-      printf("select() returns error, this is badness\n");
-      break;
-    case 0:
-    default:
-      /* timeout or readable/writable sockets */
-      curl_multi_perform(multi_handle, &still_running);
-      break;
-    }
-  }
+  } while(still_running);
 
   curl_multi_cleanup(multi_handle);
 
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index 644e64b..efcace0 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -42,7 +42,7 @@
   CURL *http_handle2;
   CURLM *multi_handle;
 
-  int still_running = 0; /* keep number of running handles */
+  int still_running = 1; /* keep number of running handles */
 
   http_handle = curl_easy_init();
   http_handle2 = curl_easy_init();
@@ -60,80 +60,32 @@
   curl_multi_add_handle(multi_handle, http_handle);
   curl_multi_add_handle(multi_handle, http_handle2);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
-
   while(still_running) {
-    struct timeval timeout;
-    int rc; /* select() return code */
-    CURLMcode mc; /* curl_multi_fdset() return code */
+    CURLMsg *msg;
+    int queued;
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    long curl_timeo = -1;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(multi_handle, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
 
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      break;
-    case 0:
-    default:
-      /* timeout or readable/writable sockets */
-      curl_multi_perform(multi_handle, &still_running);
-      break;
-    }
+    do {
+      msg = curl_multi_info_read(multi_handle, &queued);
+      if(msg) {
+        if(msg->msg == CURLMSG_DONE) {
+          /* a transfer ended */
+          fprintf(stderr, "Transfer completed\n");
+        }
+      }
+    } while(msg);
   }
 
+  curl_multi_remove_handle(multi_handle, http_handle);
+  curl_multi_remove_handle(multi_handle, http_handle2);
+
   curl_multi_cleanup(multi_handle);
 
   curl_easy_cleanup(http_handle);
diff --git a/docs/examples/multi-event.c b/docs/examples/multi-event.c
index 34bb0d6..ebe9513 100644
--- a/docs/examples/multi-event.c
+++ b/docs/examples/multi-event.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/multi-formadd.c b/docs/examples/multi-formadd.c
index c1bb135..b9defd4 100644
--- a/docs/examples/multi-formadd.c
+++ b/docs/examples/multi-formadd.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -81,80 +81,17 @@
 
     curl_multi_add_handle(multi_handle, curl);
 
-    curl_multi_perform(multi_handle, &still_running);
+    do {
+      CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-    while(still_running) {
-      struct timeval timeout;
-      int rc; /* select() return code */
-      CURLMcode mc; /* curl_multi_fdset() return code */
+      if(still_running)
+        /* wait for activity, timeout or "nothing" */
+        mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-      fd_set fdread;
-      fd_set fdwrite;
-      fd_set fdexcep;
-      int maxfd = -1;
-
-      long curl_timeo = -1;
-
-      FD_ZERO(&fdread);
-      FD_ZERO(&fdwrite);
-      FD_ZERO(&fdexcep);
-
-      /* set a suitable timeout to play around with */
-      timeout.tv_sec = 1;
-      timeout.tv_usec = 0;
-
-      curl_multi_timeout(multi_handle, &curl_timeo);
-      if(curl_timeo >= 0) {
-        timeout.tv_sec = curl_timeo / 1000;
-        if(timeout.tv_sec > 1)
-          timeout.tv_sec = 1;
-        else
-          timeout.tv_usec = (curl_timeo % 1000) * 1000;
-      }
-
-      /* get file descriptors from the transfers */
-      mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-      if(mc != CURLM_OK) {
-        fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+      if(mc)
         break;
-      }
 
-      /* On success the value of maxfd is guaranteed to be >= -1. We call
-         select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-         no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-         to sleep 100ms, which is the minimum suggested value in the
-         curl_multi_fdset() doc. */
-
-      if(maxfd == -1) {
-#ifdef _WIN32
-        Sleep(100);
-        rc = 0;
-#else
-        /* Portable sleep for platforms other than Windows. */
-        struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-        rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-      }
-      else {
-        /* Note that on some platforms 'timeout' may be modified by select().
-           If you need access to the original value save a copy beforehand. */
-        rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-      }
-
-      switch(rc) {
-      case -1:
-        /* select error */
-        break;
-      case 0:
-      default:
-        /* timeout or readable/writable sockets */
-        printf("perform!\n");
-        curl_multi_perform(multi_handle, &still_running);
-        printf("running: %d!\n", still_running);
-        break;
-      }
-    }
+    } while(still_running);
 
     curl_multi_cleanup(multi_handle);
 
diff --git a/docs/examples/multi-legacy.c b/docs/examples/multi-legacy.c
new file mode 100644
index 0000000..ca1a9b9
--- /dev/null
+++ b/docs/examples/multi-legacy.c
@@ -0,0 +1,177 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+/* <DESC>
+ * A basic application source code using the multi interface doing two
+ * transfers in parallel without curl_multi_wait/poll.
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+/*
+ * Download a HTTP file and upload an FTP file simultaneously.
+ */
+
+#define HANDLECOUNT 2   /* Number of simultaneous transfers */
+#define HTTP_HANDLE 0   /* Index for the HTTP transfer */
+#define FTP_HANDLE 1    /* Index for the FTP transfer */
+
+int main(void)
+{
+  CURL *handles[HANDLECOUNT];
+  CURLM *multi_handle;
+
+  int still_running = 0; /* keep number of running handles */
+  int i;
+
+  CURLMsg *msg; /* for picking up messages with the transfer status */
+  int msgs_left; /* how many messages are left */
+
+  /* Allocate one CURL handle per transfer */
+  for(i = 0; i<HANDLECOUNT; i++)
+    handles[i] = curl_easy_init();
+
+  /* set the options (I left out a few, you'll get the point anyway) */
+  curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "https://example.com");
+
+  curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
+  curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
+
+  /* init a multi stack */
+  multi_handle = curl_multi_init();
+
+  /* add the individual transfers */
+  for(i = 0; i<HANDLECOUNT; i++)
+    curl_multi_add_handle(multi_handle, handles[i]);
+
+  /* we start some action by calling perform right away */
+  curl_multi_perform(multi_handle, &still_running);
+
+  while(still_running) {
+    struct timeval timeout;
+    int rc; /* select() return code */
+    CURLMcode mc; /* curl_multi_fdset() return code */
+
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    int maxfd = -1;
+
+    long curl_timeo = -1;
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    /* set a suitable timeout to play around with */
+    timeout.tv_sec = 1;
+    timeout.tv_usec = 0;
+
+    curl_multi_timeout(multi_handle, &curl_timeo);
+    if(curl_timeo >= 0) {
+      timeout.tv_sec = curl_timeo / 1000;
+      if(timeout.tv_sec > 1)
+        timeout.tv_sec = 1;
+      else
+        timeout.tv_usec = (curl_timeo % 1000) * 1000;
+    }
+
+    /* get file descriptors from the transfers */
+    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    if(mc != CURLM_OK) {
+      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+      break;
+    }
+
+    /* On success the value of maxfd is guaranteed to be >= -1. We call
+       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+       to sleep 100ms, which is the minimum suggested value in the
+       curl_multi_fdset() doc. */
+
+    if(maxfd == -1) {
+#ifdef _WIN32
+      Sleep(100);
+      rc = 0;
+#else
+      /* Portable sleep for platforms other than Windows. */
+      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+      rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+    }
+    else {
+      /* Note that on some platforms 'timeout' may be modified by select().
+         If you need access to the original value save a copy beforehand. */
+      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
+    }
+
+    switch(rc) {
+    case -1:
+      /* select error */
+      break;
+    case 0: /* timeout */
+    default: /* action */
+      curl_multi_perform(multi_handle, &still_running);
+      break;
+    }
+  }
+
+  /* See how the transfers went */
+  while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
+    if(msg->msg == CURLMSG_DONE) {
+      int idx;
+
+      /* Find out which handle this message is about */
+      for(idx = 0; idx<HANDLECOUNT; idx++) {
+        int found = (msg->easy_handle == handles[idx]);
+        if(found)
+          break;
+      }
+
+      switch(idx) {
+      case HTTP_HANDLE:
+        printf("HTTP transfer completed with status %d\n", msg->data.result);
+        break;
+      case FTP_HANDLE:
+        printf("FTP transfer completed with status %d\n", msg->data.result);
+        break;
+      }
+    }
+  }
+
+  curl_multi_cleanup(multi_handle);
+
+  /* Free the CURL handles */
+  for(i = 0; i<HANDLECOUNT; i++)
+    curl_easy_cleanup(handles[i]);
+
+  return 0;
+}
diff --git a/docs/examples/multi-poll.c b/docs/examples/multi-poll.c
deleted file mode 100644
index 255a3d4..0000000
--- a/docs/examples/multi-poll.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-/* <DESC>
- * single download with the multi interface's curl_multi_poll
- * </DESC>
- */
-
-#include <stdio.h>
-#include <string.h>
-
-/* somewhat unix-specific */
-#include <sys/time.h>
-#include <unistd.h>
-
-/* curl stuff */
-#include <curl/curl.h>
-
-int main(void)
-{
-  CURL *http_handle;
-  CURLM *multi_handle;
-  int still_running = 1; /* keep number of running handles */
-
-  curl_global_init(CURL_GLOBAL_DEFAULT);
-
-  http_handle = curl_easy_init();
-
-  curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
-
-  multi_handle = curl_multi_init();
-
-  curl_multi_add_handle(multi_handle, http_handle);
-
-  while(still_running) {
-    CURLMcode mc; /* curl_multi_poll() return code */
-    int numfds;
-
-    /* we start some action by calling perform right away */
-    mc = curl_multi_perform(multi_handle, &still_running);
-
-    if(still_running)
-      /* wait for activity, timeout or "nothing" */
-      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, &numfds);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_wait() failed, code %d.\n", mc);
-      break;
-    }
-  }
-
-  curl_multi_remove_handle(multi_handle, http_handle);
-  curl_easy_cleanup(http_handle);
-  curl_multi_cleanup(multi_handle);
-  curl_global_cleanup();
-
-  return 0;
-}
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c
index fe66ca9..a7af040 100644
--- a/docs/examples/multi-post.c
+++ b/docs/examples/multi-post.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -77,80 +77,16 @@
 
     curl_multi_add_handle(multi_handle, curl);
 
-    curl_multi_perform(multi_handle, &still_running);
+    do {
+      CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-    while(still_running) {
-      struct timeval timeout;
-      int rc; /* select() return code */
-      CURLMcode mc; /* curl_multi_fdset() return code */
+      if(still_running)
+        /* wait for activity, timeout or "nothing" */
+        mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-      fd_set fdread;
-      fd_set fdwrite;
-      fd_set fdexcep;
-      int maxfd = -1;
-
-      long curl_timeo = -1;
-
-      FD_ZERO(&fdread);
-      FD_ZERO(&fdwrite);
-      FD_ZERO(&fdexcep);
-
-      /* set a suitable timeout to play around with */
-      timeout.tv_sec = 1;
-      timeout.tv_usec = 0;
-
-      curl_multi_timeout(multi_handle, &curl_timeo);
-      if(curl_timeo >= 0) {
-        timeout.tv_sec = curl_timeo / 1000;
-        if(timeout.tv_sec > 1)
-          timeout.tv_sec = 1;
-        else
-          timeout.tv_usec = (curl_timeo % 1000) * 1000;
-      }
-
-      /* get file descriptors from the transfers */
-      mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-      if(mc != CURLM_OK) {
-        fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+      if(mc)
         break;
-      }
-
-      /* On success the value of maxfd is guaranteed to be >= -1. We call
-         select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-         no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-         to sleep 100ms, which is the minimum suggested value in the
-         curl_multi_fdset() doc. */
-
-      if(maxfd == -1) {
-#ifdef _WIN32
-        Sleep(100);
-        rc = 0;
-#else
-        /* Portable sleep for platforms other than Windows. */
-        struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-        rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-      }
-      else {
-        /* Note that on some platforms 'timeout' may be modified by select().
-           If you need access to the original value save a copy beforehand. */
-        rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-      }
-
-      switch(rc) {
-      case -1:
-        /* select error */
-        break;
-      case 0:
-      default:
-        /* timeout or readable/writable sockets */
-        printf("perform!\n");
-        curl_multi_perform(multi_handle, &still_running);
-        printf("running: %d!\n", still_running);
-        break;
-      }
-    }
+    } while(still_running);
 
     curl_multi_cleanup(multi_handle);
 
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index 530a5f5..e340231 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -40,7 +40,7 @@
 /* Portable sleep for platforms other than Windows. */
 #define WAITMS(x)                               \
   struct timeval wait = { 0, (x) * 1000 };      \
-  (void)select(0, NULL, NULL, NULL, &wait);
+  (void)select(0, NULL, NULL, NULL, &wait)
 #endif
 
 /*
@@ -50,9 +50,7 @@
 {
   CURL *http_handle;
   CURLM *multi_handle;
-
-  int still_running = 0; /* keep number of running handles */
-  int repeats = 0;
+  int still_running = 1; /* keep number of running handles */
 
   curl_global_init(CURL_GLOBAL_DEFAULT);
 
@@ -67,37 +65,19 @@
   /* add the individual transfers */
   curl_multi_add_handle(multi_handle, http_handle);
 
-  /* we start some action by calling perform right away */
-  curl_multi_perform(multi_handle, &still_running);
+  do {
+    CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
-    CURLMcode mc; /* curl_multi_wait() return code */
-    int numfds;
+    if(!mc)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
 
-    /* wait for activity, timeout or "nothing" */
-    mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_wait() failed, code %d.\n", mc);
+    if(mc) {
+      fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mc);
       break;
     }
 
-    /* 'numfds' being zero means either a timeout or no file descriptors to
-       wait for. Try timeout on first occurrence, then assume no file
-       descriptors and no file descriptors to wait for means wait for 100
-       milliseconds. */
-
-    if(!numfds) {
-      repeats++; /* count number of repeated zero numfds */
-      if(repeats > 1) {
-        WAITMS(100); /* sleep 100 milliseconds */
-      }
-    }
-    else
-      repeats = 0;
-
-    curl_multi_perform(multi_handle, &still_running);
-  }
+  } while(still_running);
 
   curl_multi_remove_handle(multi_handle, http_handle);
 
diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c
index 1b4a752..3da61a2 100644
--- a/docs/examples/multi-uv.c
+++ b/docs/examples/multi-uv.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c
index 5777e5c..ada1e4a 100644
--- a/docs/examples/multithread.c
+++ b/docs/examples/multithread.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,11 +36,11 @@
   If you intend to use a SSL-based protocol here you might need to setup TLS
   library mutex callbacks as described here:
 
-  https://curl.haxx.se/libcurl/c/threadsafe.html
+  https://curl.se/libcurl/c/threadsafe.html
 
 */
 const char * const urls[NUMT]= {
-  "https://curl.haxx.se/",
+  "https://curl.se/",
   "ftp://cool.haxx.se/",
   "https://www.cag.se/",
   "www.haxx.se"
diff --git a/docs/examples/opensslthreadlock.c b/docs/examples/opensslthreadlock.c
index 649ef93..dac987e 100644
--- a/docs/examples/opensslthreadlock.c
+++ b/docs/examples/opensslthreadlock.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/parseurl.c b/docs/examples/parseurl.c
index ee42776..0c84eee 100644
--- a/docs/examples/parseurl.c
+++ b/docs/examples/parseurl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/persistent.c b/docs/examples/persistent.c
index 723b68b..390d7b1 100644
--- a/docs/examples/persistent.c
+++ b/docs/examples/persistent.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-authzid.c b/docs/examples/pop3-authzid.c
index 5736357..55a9ef6 100644
--- a/docs/examples/pop3-authzid.c
+++ b/docs/examples/pop3-authzid.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-dele.c b/docs/examples/pop3-dele.c
index ca07515..ce6deee 100644
--- a/docs/examples/pop3-dele.c
+++ b/docs/examples/pop3-dele.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c
index ef3c6d3..7ed072d 100644
--- a/docs/examples/pop3-list.c
+++ b/docs/examples/pop3-list.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c
index 4b87886..c819aab 100644
--- a/docs/examples/pop3-multi.c
+++ b/docs/examples/pop3-multi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,35 +32,13 @@
 /* This is a simple example showing how to retrieve mail using libcurl's POP3
  * capabilities. It builds on the pop3-retr.c example to demonstrate how to use
  * libcurl's multi interface.
- *
- * Note that this example requires libcurl 7.20.0 or above.
  */
 
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
-
-static struct timeval tvnow(void)
-{
-  struct timeval now;
-
-  /* time() returns the value of time in seconds since the epoch */
-  now.tv_sec = (long)time(NULL);
-  now.tv_usec = 0;
-
-  return now;
-}
-
-static long tvdiff(struct timeval newer, struct timeval older)
-{
-  return (newer.tv_sec - older.tv_sec) * 1000 +
-    (newer.tv_usec - older.tv_usec) / 1000;
-}
-
 int main(void)
 {
   CURL *curl;
   CURLM *mcurl;
   int still_running = 1;
-  struct timeval mp_start;
 
   curl_global_init(CURL_GLOBAL_DEFAULT);
 
@@ -82,86 +60,17 @@
   /* Tell the multi stack about our easy handle */
   curl_multi_add_handle(mcurl, curl);
 
-  /* Record the start time which we can use later */
-  mp_start = tvnow();
+  do {
+    CURLMcode mc = curl_multi_perform(mcurl, &still_running);
 
-  /* We start some action by calling perform right away */
-  curl_multi_perform(mcurl, &still_running);
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(mcurl, NULL, 0, 1000, NULL);
 
-  while(still_running) {
-    struct timeval timeout;
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
-    int rc;
-    CURLMcode mc; /* curl_multi_fdset() return code */
-
-    long curl_timeo = -1;
-
-    /* Initialise the file descriptors */
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* Set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(mcurl, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
 
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
-      fprintf(stderr,
-              "ABORTING: Since it seems that we would have run forever.\n");
-      break;
-    }
-
-    switch(rc) {
-    case -1:  /* select error */
-      break;
-    case 0:   /* timeout */
-    default:  /* action */
-      curl_multi_perform(mcurl, &still_running);
-      break;
-    }
-  }
+  } while(still_running);
 
   /* Always cleanup */
   curl_multi_remove_handle(mcurl, curl);
diff --git a/docs/examples/pop3-noop.c b/docs/examples/pop3-noop.c
index 6242d32..db385f2 100644
--- a/docs/examples/pop3-noop.c
+++ b/docs/examples/pop3-noop.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c
index 61cb424..aef20d4 100644
--- a/docs/examples/pop3-retr.c
+++ b/docs/examples/pop3-retr.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c
index b557906..4362925 100644
--- a/docs/examples/pop3-ssl.c
+++ b/docs/examples/pop3-ssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-stat.c b/docs/examples/pop3-stat.c
index 5b3a8de..7350dc9 100644
--- a/docs/examples/pop3-stat.c
+++ b/docs/examples/pop3-stat.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-tls.c b/docs/examples/pop3-tls.c
index 1a6c447..1ce97a5 100644
--- a/docs/examples/pop3-tls.c
+++ b/docs/examples/pop3-tls.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-top.c b/docs/examples/pop3-top.c
index 4f5937f..56d76a6 100644
--- a/docs/examples/pop3-top.c
+++ b/docs/examples/pop3-top.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/pop3-uidl.c b/docs/examples/pop3-uidl.c
index 578844a..3dc8a5a 100644
--- a/docs/examples/pop3-uidl.c
+++ b/docs/examples/pop3-uidl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index ebb4e2a..f9c8160 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,7 +41,7 @@
   size_t sizeleft;
 };
 
-static size_t read_callback(void *dest, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *dest, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *wt = (struct WriteThis *)userp;
   size_t buffer_size = size*nmemb;
diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c
index e2718c5..e3a676f 100644
--- a/docs/examples/postinmemory.c
+++ b/docs/examples/postinmemory.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/postit2-formadd.c b/docs/examples/postit2-formadd.c
index 21d2a9f..43dbb39 100644
--- a/docs/examples/postit2-formadd.c
+++ b/docs/examples/postit2-formadd.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c
index b3a1a93..95b565e 100644
--- a/docs/examples/postit2.c
+++ b/docs/examples/postit2.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c
index 86ad0d9..00c67fa 100644
--- a/docs/examples/progressfunc.c
+++ b/docs/examples/progressfunc.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c
index 81a2862..88e5285 100644
--- a/docs/examples/resolve.c
+++ b/docs/examples/resolve.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c
index c1fc653..6f27b57 100644
--- a/docs/examples/rtsp.c
+++ b/docs/examples/rtsp.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 - 2020, Jim Hollinger
+ * Copyright (c) 2011 - 2021, Jim Hollinger
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -61,17 +61,20 @@
 #define VERSION_STR  "V1.0"
 
 /* error handling macros */
-#define my_curl_easy_setopt(A, B, C)                             \
-  res = curl_easy_setopt((A), (B), (C));                         \
-  if(res != CURLE_OK)                                            \
-    fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
-            #A, #B, #C, res);
+#define my_curl_easy_setopt(A, B, C)                               \
+  do {                                                             \
+    res = curl_easy_setopt((A), (B), (C));                         \
+    if(res != CURLE_OK)                                            \
+      fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
+              #A, #B, #C, res);                                    \
+  } while(0)
 
-#define my_curl_easy_perform(A)                                     \
-  res = curl_easy_perform(A);                                       \
-  if(res != CURLE_OK)                                               \
-    fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);
-
+#define my_curl_easy_perform(A)                                         \
+  do {                                                                  \
+    res = curl_easy_perform(A);                                         \
+    if(res != CURLE_OK)                                                 \
+      fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);   \
+  } while(0)
 
 /* send RTSP OPTIONS request */
 static void rtsp_options(CURL *curl, const char *uri)
@@ -91,7 +94,7 @@
   CURLcode res = CURLE_OK;
   FILE *sdp_fp = fopen(sdp_filename, "wb");
   printf("\nRTSP: DESCRIBE %s\n", uri);
-  if(sdp_fp == NULL) {
+  if(!sdp_fp) {
     fprintf(stderr, "Could not open '%s' for writing\n", sdp_filename);
     sdp_fp = stdout;
   }
@@ -170,7 +173,7 @@
   control[0] = '\0';
   if(sdp_fp != NULL) {
     while(fgets(s, max_len - 2, sdp_fp) != NULL) {
-      sscanf(s, " a = control: %s", control);
+      sscanf(s, " a = control: %32s", control);
     }
     fclose(sdp_fp);
   }
@@ -199,10 +202,10 @@
   /* check command line */
   if((argc != 2) && (argc != 3)) {
     base_name = strrchr(argv[0], '/');
-    if(base_name == NULL) {
+    if(!base_name) {
       base_name = strrchr(argv[0], '\\');
     }
-    if(base_name == NULL) {
+    if(!base_name) {
       base_name = argv[0];
     }
     else {
diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c
index a81747b..7aa169f 100644
--- a/docs/examples/sampleconv.c
+++ b/docs/examples/sampleconv.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index c6f1b1a..9f40829 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index 8f3a5ff..cf05706 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c
index 98bf2bf..0d8d708 100644
--- a/docs/examples/sessioninfo.c
+++ b/docs/examples/sessioninfo.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c
index e5a74b9..37840c9 100644
--- a/docs/examples/sftpget.c
+++ b/docs/examples/sftpget.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c
index e7d9d23..e2aa373 100644
--- a/docs/examples/sftpuploadresume.c
+++ b/docs/examples/sftpuploadresume.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -29,7 +29,7 @@
 #include <curl/curl.h>
 
 /* read data to upload */
-static size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t readfunc(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   FILE *f = (FILE *)stream;
   size_t n;
diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c
index 2ccb9ea..3c05c40 100644
--- a/docs/examples/shared-connection-cache.c
+++ b/docs/examples/shared-connection-cache.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -63,7 +63,7 @@
     if(curl) {
       CURLcode res;
 
-      curl_easy_setopt(curl, CURLOPT_URL, "https://curl.haxx.se/");
+      curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
 
       /* use the share object */
       curl_easy_setopt(curl, CURLOPT_SHARE, share);
diff --git a/docs/examples/simple.c b/docs/examples/simple.c
index c612270..cf8dd3d 100644
--- a/docs/examples/simple.c
+++ b/docs/examples/simple.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c
index 8ec537b..8580c5e 100644
--- a/docs/examples/simplepost.c
+++ b/docs/examples/simplepost.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c
index fdc7cf1..d4d8b9e 100644
--- a/docs/examples/simplessl.c
+++ b/docs/examples/simplessl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c
index ed404e8..81d405e 100644
--- a/docs/examples/smooth-gtk-thread.c
+++ b/docs/examples/smooth-gtk-thread.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/smtp-authzid.c b/docs/examples/smtp-authzid.c
index decdb71..e541f09 100644
--- a/docs/examples/smtp-authzid.c
+++ b/docs/examples/smtp-authzid.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -47,41 +47,42 @@
 #define SENDER_MAIL  "Kurt " SENDER_ADDR
 #define TO_MAIL      "A Receiver " TO_ADDR
 
-static const char *payload_text[] = {
-  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
-  "To: " TO_MAIL "\r\n",
-  "From: " FROM_MAIL "\r\n",
-  "Sender: " SENDER_MAIL "\r\n",
+static const char *payload_text =
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+  "To: " TO_MAIL "\r\n"
+  "From: " FROM_MAIL "\r\n"
+  "Sender: " SENDER_MAIL "\r\n"
   "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
-  "rfcpedant.example.org>\r\n",
-  "Subject: SMTP example message\r\n",
-  "\r\n", /* empty line to divide headers from body, see RFC5322 */
-  "The body of the message starts here.\r\n",
-  "\r\n",
-  "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
-  "Check RFC5322.\r\n",
-  NULL
-};
+  "rfcpedant.example.org>\r\n"
+  "Subject: SMTP example message\r\n"
+  "\r\n" /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\r\n"
+  "\r\n"
+  "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+  "Check RFC5322.\r\n";
 
 struct upload_status {
-  int lines_read;
+  size_t bytes_read;
 };
 
-static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
+  size_t room = size * nmemb;
 
   if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
     return 0;
   }
 
-  data = payload_text[upload_ctx->lines_read];
+  data = &payload_text[upload_ctx->bytes_read];
 
   if(data) {
     size_t len = strlen(data);
+    if(room < len)
+      len = room;
     memcpy(ptr, data, len);
-    upload_ctx->lines_read++;
+    upload_ctx->bytes_read += len;
 
     return len;
   }
@@ -94,9 +95,7 @@
   CURL *curl;
   CURLcode res = CURLE_OK;
   struct curl_slist *recipients = NULL;
-  struct upload_status upload_ctx;
-
-  upload_ctx.lines_read = 0;
+  struct upload_status upload_ctx = { 0 };
 
   curl = curl_easy_init();
   if(curl) {
diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c
index bc23c42..9de5b32 100644
--- a/docs/examples/smtp-expn.c
+++ b/docs/examples/smtp-expn.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c
index 3285b31..5159786 100644
--- a/docs/examples/smtp-mail.c
+++ b/docs/examples/smtp-mail.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,41 +44,42 @@
 #define TO_MAIL   "A Receiver " TO_ADDR
 #define CC_MAIL   "John CC Smith " CC_ADDR
 
-static const char *payload_text[] = {
-  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
-  "To: " TO_MAIL "\r\n",
-  "From: " FROM_MAIL "\r\n",
-  "Cc: " CC_MAIL "\r\n",
+static const char *payload_text =
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+  "To: " TO_MAIL "\r\n"
+  "From: " FROM_MAIL "\r\n"
+  "Cc: " CC_MAIL "\r\n"
   "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
-  "rfcpedant.example.org>\r\n",
-  "Subject: SMTP example message\r\n",
-  "\r\n", /* empty line to divide headers from body, see RFC5322 */
-  "The body of the message starts here.\r\n",
-  "\r\n",
-  "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
-  "Check RFC5322.\r\n",
-  NULL
-};
+  "rfcpedant.example.org>\r\n"
+  "Subject: SMTP example message\r\n"
+  "\r\n" /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\r\n"
+  "\r\n"
+  "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+  "Check RFC5322.\r\n";
 
 struct upload_status {
-  int lines_read;
+  size_t bytes_read;
 };
 
-static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
+  size_t room = size * nmemb;
 
   if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
     return 0;
   }
 
-  data = payload_text[upload_ctx->lines_read];
+  data = &payload_text[upload_ctx->bytes_read];
 
   if(data) {
     size_t len = strlen(data);
+    if(room < len)
+      len = room;
     memcpy(ptr, data, len);
-    upload_ctx->lines_read++;
+    upload_ctx->bytes_read += len;
 
     return len;
   }
@@ -91,9 +92,7 @@
   CURL *curl;
   CURLcode res = CURLE_OK;
   struct curl_slist *recipients = NULL;
-  struct upload_status upload_ctx;
-
-  upload_ctx.lines_read = 0;
+  struct upload_status upload_ctx = { 0 };
 
   curl = curl_easy_init();
   if(curl) {
diff --git a/docs/examples/smtp-mime.c b/docs/examples/smtp-mime.c
index 1cf575c..4a2ff19 100644
--- a/docs/examples/smtp-mime.c
+++ b/docs/examples/smtp-mime.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c
index bd70bdb..ac867a2 100644
--- a/docs/examples/smtp-multi.c
+++ b/docs/examples/smtp-multi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,51 +31,48 @@
 /* This is an example showing how to send mail using libcurl's SMTP
  * capabilities. It builds on the smtp-mail.c example to demonstrate how to use
  * libcurl's multi interface.
- *
- * Note that this example requires libcurl 7.20.0 or above.
  */
 
-#define FROM     "<sender@example.com>"
-#define TO       "<recipient@example.com>"
-#define CC       "<info@example.com>"
+#define FROM_MAIL     "<sender@example.com>"
+#define TO_MAIL       "<recipient@example.com>"
+#define CC_MAIL       "<info@example.com>"
 
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
-
-static const char *payload_text[] = {
-  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
-  "To: " TO "\r\n",
-  "From: " FROM " (Example User)\r\n",
-  "Cc: " CC " (Another example User)\r\n",
+static const char *payload_text =
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+  "To: " TO_MAIL "\r\n"
+  "From: " FROM_MAIL "\r\n"
+  "Cc: " CC_MAIL "\r\n"
   "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
-  "rfcpedant.example.org>\r\n",
-  "Subject: SMTP multi example message\r\n",
-  "\r\n", /* empty line to divide headers from body, see RFC5322 */
-  "The body of the message starts here.\r\n",
-  "\r\n",
-  "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
-  "Check RFC5322.\r\n",
-  NULL
-};
+  "rfcpedant.example.org>\r\n"
+  "Subject: SMTP example message\r\n"
+  "\r\n" /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\r\n"
+  "\r\n"
+  "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+  "Check RFC5322.\r\n";
 
 struct upload_status {
-  int lines_read;
+  size_t bytes_read;
 };
 
-static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
+  size_t room = size * nmemb;
 
   if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
     return 0;
   }
 
-  data = payload_text[upload_ctx->lines_read];
+  data = &payload_text[upload_ctx->bytes_read];
 
   if(data) {
     size_t len = strlen(data);
+    if(room < len)
+      len = room;
     memcpy(ptr, data, len);
-    upload_ctx->lines_read++;
+    upload_ctx->bytes_read += len;
 
     return len;
   }
@@ -83,33 +80,13 @@
   return 0;
 }
 
-static struct timeval tvnow(void)
-{
-  struct timeval now;
-
-  /* time() returns the value of time in seconds since the epoch */
-  now.tv_sec = (long)time(NULL);
-  now.tv_usec = 0;
-
-  return now;
-}
-
-static long tvdiff(struct timeval newer, struct timeval older)
-{
-  return (newer.tv_sec - older.tv_sec) * 1000 +
-    (newer.tv_usec - older.tv_usec) / 1000;
-}
-
 int main(void)
 {
   CURL *curl;
   CURLM *mcurl;
   int still_running = 1;
-  struct timeval mp_start;
   struct curl_slist *recipients = NULL;
-  struct upload_status upload_ctx;
-
-  upload_ctx.lines_read = 0;
+  struct upload_status upload_ctx = { 0 };
 
   curl_global_init(CURL_GLOBAL_DEFAULT);
 
@@ -130,13 +107,13 @@
    * to the address in the reverse-path which triggered them. Otherwise, they
    * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
    */
-  curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+  curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_MAIL);
 
   /* Add two recipients, in this particular case they correspond to the
    * To: and Cc: addressees in the header, but they could be any kind of
    * recipient. */
-  recipients = curl_slist_append(recipients, TO);
-  recipients = curl_slist_append(recipients, CC);
+  recipients = curl_slist_append(recipients, TO_MAIL);
+  recipients = curl_slist_append(recipients, CC_MAIL);
   curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
   /* We're using a callback function to specify the payload (the headers and
@@ -149,86 +126,17 @@
   /* Tell the multi stack about our easy handle */
   curl_multi_add_handle(mcurl, curl);
 
-  /* Record the start time which we can use later */
-  mp_start = tvnow();
+  do {
+    CURLMcode mc = curl_multi_perform(mcurl, &still_running);
 
-  /* We start some action by calling perform right away */
-  curl_multi_perform(mcurl, &still_running);
+    if(still_running)
+      /* wait for activity, timeout or "nothing" */
+      mc = curl_multi_poll(mcurl, NULL, 0, 1000, NULL);
 
-  while(still_running) {
-    struct timeval timeout;
-    fd_set fdread;
-    fd_set fdwrite;
-    fd_set fdexcep;
-    int maxfd = -1;
-    int rc;
-    CURLMcode mc; /* curl_multi_fdset() return code */
-
-    long curl_timeo = -1;
-
-    /* Initialise the file descriptors */
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* Set a suitable timeout to play around with */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    curl_multi_timeout(mcurl, &curl_timeo);
-    if(curl_timeo >= 0) {
-      timeout.tv_sec = curl_timeo / 1000;
-      if(timeout.tv_sec > 1)
-        timeout.tv_sec = 1;
-      else
-        timeout.tv_usec = (curl_timeo % 1000) * 1000;
-    }
-
-    /* get file descriptors from the transfers */
-    mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    if(mc != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+    if(mc)
       break;
-    }
 
-    /* On success the value of maxfd is guaranteed to be >= -1. We call
-       select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
-       no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
-       to sleep 100ms, which is the minimum suggested value in the
-       curl_multi_fdset() doc. */
-
-    if(maxfd == -1) {
-#ifdef _WIN32
-      Sleep(100);
-      rc = 0;
-#else
-      /* Portable sleep for platforms other than Windows. */
-      struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
-      rc = select(0, NULL, NULL, NULL, &wait);
-#endif
-    }
-    else {
-      /* Note that on some platforms 'timeout' may be modified by select().
-         If you need access to the original value save a copy beforehand. */
-      rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    }
-
-    if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
-      fprintf(stderr,
-              "ABORTING: Since it seems that we would have run forever.\n");
-      break;
-    }
-
-    switch(rc) {
-    case -1:  /* select error */
-      break;
-    case 0:   /* timeout */
-    default:  /* action */
-      curl_multi_perform(mcurl, &still_running);
-      break;
-    }
-  }
+  } while(still_running);
 
   /* Free the list of recipients */
   curl_slist_free_all(recipients);
diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c
index 7c62966..6181bb0 100644
--- a/docs/examples/smtp-ssl.c
+++ b/docs/examples/smtp-ssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -37,45 +37,46 @@
  * Note that this example requires libcurl 7.20.0 or above.
  */
 
-#define FROM    "<sender@example.org>"
-#define TO      "<addressee@example.net>"
-#define CC      "<info@example.org>"
+#define FROM_MAIL     "<sender@example.com>"
+#define TO_MAIL       "<recipient@example.com>"
+#define CC_MAIL       "<info@example.com>"
 
-static const char *payload_text[] = {
-  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
-  "To: " TO "\r\n",
-  "From: " FROM " (Example User)\r\n",
-  "Cc: " CC " (Another example User)\r\n",
+static const char *payload_text =
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+  "To: " TO_MAIL "\r\n"
+  "From: " FROM_MAIL "\r\n"
+  "Cc: " CC_MAIL "\r\n"
   "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
-  "rfcpedant.example.org>\r\n",
-  "Subject: SMTP SSL example message\r\n",
-  "\r\n", /* empty line to divide headers from body, see RFC5322 */
-  "The body of the message starts here.\r\n",
-  "\r\n",
-  "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
-  "Check RFC5322.\r\n",
-  NULL
-};
+  "rfcpedant.example.org>\r\n"
+  "Subject: SMTP example message\r\n"
+  "\r\n" /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\r\n"
+  "\r\n"
+  "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+  "Check RFC5322.\r\n";
 
 struct upload_status {
-  int lines_read;
+  size_t bytes_read;
 };
 
-static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
+  size_t room = size * nmemb;
 
   if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
     return 0;
   }
 
-  data = payload_text[upload_ctx->lines_read];
+  data = &payload_text[upload_ctx->bytes_read];
 
   if(data) {
     size_t len = strlen(data);
+    if(room < len)
+      len = room;
     memcpy(ptr, data, len);
-    upload_ctx->lines_read++;
+    upload_ctx->bytes_read += len;
 
     return len;
   }
@@ -88,9 +89,7 @@
   CURL *curl;
   CURLcode res = CURLE_OK;
   struct curl_slist *recipients = NULL;
-  struct upload_status upload_ctx;
-
-  upload_ctx.lines_read = 0;
+  struct upload_status upload_ctx = { 0 };
 
   curl = curl_easy_init();
   if(curl) {
@@ -129,13 +128,13 @@
      * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
      * details.
      */
-    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_MAIL);
 
     /* Add two recipients, in this particular case they correspond to the
      * To: and Cc: addressees in the header, but they could be any kind of
      * recipient. */
-    recipients = curl_slist_append(recipients, TO);
-    recipients = curl_slist_append(recipients, CC);
+    recipients = curl_slist_append(recipients, TO_MAIL);
+    recipients = curl_slist_append(recipients, CC_MAIL);
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
     /* We're using a callback function to specify the payload (the headers and
diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c
index 94d918b..a9c45fa 100644
--- a/docs/examples/smtp-tls.c
+++ b/docs/examples/smtp-tls.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -37,45 +37,46 @@
  * Note that this example requires libcurl 7.20.0 or above.
  */
 
-#define FROM    "<sender@example.org>"
-#define TO      "<addressee@example.net>"
-#define CC      "<info@example.org>"
+#define FROM_MAIL     "<sender@example.com>"
+#define TO_MAIL       "<recipient@example.com>"
+#define CC_MAIL       "<info@example.com>"
 
-static const char *payload_text[] = {
-  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
-  "To: " TO "\r\n",
-  "From: " FROM " (Example User)\r\n",
-  "Cc: " CC " (Another example User)\r\n",
+static const char *payload_text =
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+  "To: " TO_MAIL "\r\n"
+  "From: " FROM_MAIL "\r\n"
+  "Cc: " CC_MAIL "\r\n"
   "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
-  "rfcpedant.example.org>\r\n",
-  "Subject: SMTP TLS example message\r\n",
-  "\r\n", /* empty line to divide headers from body, see RFC5322 */
-  "The body of the message starts here.\r\n",
-  "\r\n",
-  "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
-  "Check RFC5322.\r\n",
-  NULL
-};
+  "rfcpedant.example.org>\r\n"
+  "Subject: SMTP example message\r\n"
+  "\r\n" /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\r\n"
+  "\r\n"
+  "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+  "Check RFC5322.\r\n";
 
 struct upload_status {
-  int lines_read;
+  size_t bytes_read;
 };
 
-static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
+  size_t room = size * nmemb;
 
   if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
     return 0;
   }
 
-  data = payload_text[upload_ctx->lines_read];
+  data = &payload_text[upload_ctx->bytes_read];
 
   if(data) {
     size_t len = strlen(data);
+    if(room < len)
+      len = room;
     memcpy(ptr, data, len);
-    upload_ctx->lines_read++;
+    upload_ctx->bytes_read += len;
 
     return len;
   }
@@ -88,9 +89,7 @@
   CURL *curl;
   CURLcode res = CURLE_OK;
   struct curl_slist *recipients = NULL;
-  struct upload_status upload_ctx;
-
-  upload_ctx.lines_read = 0;
+  struct upload_status upload_ctx = { 0 };
 
   curl = curl_easy_init();
   if(curl) {
@@ -131,13 +130,13 @@
      * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
      * details.
      */
-    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_MAIL);
 
     /* Add two recipients, in this particular case they correspond to the
      * To: and Cc: addressees in the header, but they could be any kind of
      * recipient. */
-    recipients = curl_slist_append(recipients, TO);
-    recipients = curl_slist_append(recipients, CC);
+    recipients = curl_slist_append(recipients, TO_MAIL);
+    recipients = curl_slist_append(recipients, CC_MAIL);
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
     /* We're using a callback function to specify the payload (the headers and
diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c
index 50bdc06..7d02101 100644
--- a/docs/examples/smtp-vrfy.c
+++ b/docs/examples/smtp-vrfy.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/sslbackend.c b/docs/examples/sslbackend.c
index 12e5150..f1f66d5 100644
--- a/docs/examples/sslbackend.c
+++ b/docs/examples/sslbackend.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c
index 29ceaa5..d55bb1e 100644
--- a/docs/examples/synctime.c
+++ b/docs/examples/synctime.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -155,7 +155,7 @@
                                          TmpStr1 & 2? */
         AutoSyncTime = 0;
       else {
-        int RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu",
+        int RetVal = sscanf((char *)(ptr), "Date: %25s %hu %s %hu %hu:%hu:%hu",
                             TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
                             &SYSTime.wHour, &SYSTime.wMinute,
                             &SYSTime.wSecond);
@@ -198,8 +198,8 @@
 #ifdef SYNCTIME_UA
   curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
 #endif
-  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
-  curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
+  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, SyncTime_CURL_WriteOutput);
+  curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, SyncTime_CURL_WriteHeader);
 }
 
 int SyncTime_CURL_Fetch(CURL *curl, char *URL_Str, char *OutFileName,
diff --git a/docs/examples/threaded-shared-conn.c b/docs/examples/threaded-shared-conn.c
deleted file mode 100644
index f20b8a4..0000000
--- a/docs/examples/threaded-shared-conn.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-/* <DESC>
- * Multi-threaded transfers sharing a single connection pool
- * </DESC>
- *
- * This example fires up NUM_THREADS threads and in each single thread, it
- * downloads the same fixed URL a URL_ITERATIONS number of times. The received
- * data is just thrown away. It sets up a single shared object that holds the
- * connection cache and all easy handles in all threads share that same cache.
- *
- * This example uses pthreads for threads and mutexes, but should be easy to
- * modify to use different thread/mutex system should you want to.
- *
- */
-
-#include <stdio.h>
-#include <pthread.h>
-#include <curl/curl.h>
-
-/*
-  URL to fetch. If you select HTTPS, you need to use a TLS backend with mutex
-  locks taken care of (OpenSSL 1.1.x, NSS, etc) or add SSL mutex callbacks!
-*/
-#define URL "http://localhost/4KB"
-
-/* number of threads to fire up in parallel */
-#define NUM_THREADS 67
-
-/* how many times each URL is transferred per thread */
-#define URL_ITERATIONS 11235
-
-static pthread_mutex_t connlock;
-
-static size_t write_db(void *ptr, size_t size, size_t nmemb, void *data)
-{
-  /* not interested in the downloaded bytes, return the size */
-  (void)ptr;  /* unused */
-  (void)data; /* unused */
-  return (size_t)(size * nmemb);
-}
-
-static void lock_cb(CURL *handle, curl_lock_data data,
-                    curl_lock_access access, void *userptr)
-{
-  (void)access; /* unused */
-  (void)userptr; /* unused */
-  (void)handle; /* unused */
-  (void)data; /* unused */
-  pthread_mutex_lock(&connlock);
-}
-
-static void unlock_cb(CURL *handle, curl_lock_data data,
-                      void *userptr)
-{
-  (void)userptr; /* unused */
-  (void)handle;  /* unused */
-  (void)data;    /* unused */
-  pthread_mutex_unlock(&connlock);
-}
-
-static void init_locks(void)
-{
-  pthread_mutex_init(&connlock, NULL);
-}
-
-static void kill_locks(void)
-{
-  pthread_mutex_destroy(&connlock);
-}
-
-struct initurl {
-  const char *url;
-  CURLSH *share;
-  int threadno;
-};
-
-static void *run_thread(void *ptr)
-{
-  struct initurl *u = (struct initurl *)ptr;
-  int i;
-
-  for(i = 0; i < URL_ITERATIONS; i++) {
-    CURL *curl = curl_easy_init();
-    curl_easy_setopt(curl, CURLOPT_URL, u->url);
-    curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
-    curl_easy_setopt(curl, CURLOPT_SHARE, u->share);
-    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_db);
-    curl_easy_perform(curl); /* ignores error */
-    curl_easy_cleanup(curl);
-    fprintf(stderr, "Thread %d transfer %d\n", u->threadno, i);
-  }
-
-  return NULL;
-}
-
-int main(void)
-{
-  pthread_t tid[NUM_THREADS];
-  int i;
-  CURLSH *share;
-  struct initurl url[NUM_THREADS];
-
-  /* Must initialize libcurl before any threads are started */
-  curl_global_init(CURL_GLOBAL_ALL);
-
-  share = curl_share_init();
-  curl_share_setopt(share, CURLSHOPT_LOCKFUNC, lock_cb);
-  curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, unlock_cb);
-  curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
-
-  init_locks();
-
-  for(i = 0; i< NUM_THREADS; i++) {
-    int error;
-    url[i].url = URL;
-    url[i].share = share;
-    url[i].threadno = i;
-    error = pthread_create(&tid[i], NULL, run_thread, &url[i]);
-    if(0 != error)
-      fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
-    else
-      fprintf(stderr, "Thread %d, gets %s\n", i, URL);
-  }
-
-  /* now wait for all threads to terminate */
-  for(i = 0; i< NUM_THREADS; i++) {
-    pthread_join(tid[i], NULL);
-    fprintf(stderr, "Thread %d terminated\n", i);
-  }
-
-  kill_locks();
-
-  curl_share_cleanup(share);
-  curl_global_cleanup();
-  return 0;
-}
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index f61d728..44c6a6c 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c
index 314cbe0..949f8a1 100644
--- a/docs/examples/url2file.c
+++ b/docs/examples/url2file.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/urlapi.c b/docs/examples/urlapi.c
index 594f942..229954d 100644
--- a/docs/examples/urlapi.c
+++ b/docs/examples/urlapi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c
index 7427ae7..a31cbfc 100644
--- a/docs/examples/usercertinmem.c
+++ b/docs/examples/usercertinmem.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2013 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2013 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -119,7 +119,7 @@
   /* get a BIO */
   bio = BIO_new_mem_buf((char *)mypem, -1);
 
-  if(bio == NULL) {
+  if(!bio) {
     printf("BIO_new_mem_buf failed\n");
   }
 
@@ -127,7 +127,7 @@
    * structure that SSL can use
    */
   cert = PEM_read_bio_X509(bio, NULL, 0, NULL);
-  if(cert == NULL) {
+  if(!cert) {
     printf("PEM_read_bio_X509 failed...\n");
   }
 
@@ -139,13 +139,13 @@
 
   /*create a bio for the RSA key*/
   kbio = BIO_new_mem_buf((char *)mykey, -1);
-  if(kbio == NULL) {
+  if(!kbio) {
     printf("BIO_new_mem_buf failed\n");
   }
 
   /*read the key bio into an RSA object*/
   rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL);
-  if(rsa == NULL) {
+  if(!rsa) {
     printf("Failed to create key bio\n");
   }
 
@@ -211,7 +211,7 @@
    * load the certificate and key by installing a function doing the necessary
    * "modifications" to the SSL CONTEXT just before link init
    */
-  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
   rv = curl_easy_perform(ch);
   if(rv == CURLE_OK) {
     printf("*** transfer succeeded ***\n");
diff --git a/docs/examples/version-check.pl b/docs/examples/version-check.pl
index 1495981..38f4ce8 100755
--- a/docs/examples/version-check.pl
+++ b/docs/examples/version-check.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c
index 8036e48..e6416c3 100644
--- a/docs/examples/xmlstream.c
+++ b/docs/examples/xmlstream.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/ABI.md b/docs/libcurl/ABI.md
index 39134a1..8cf5162 100644
--- a/docs/libcurl/ABI.md
+++ b/docs/libcurl/ABI.md
@@ -9,17 +9,16 @@
 
 ## Upgrades
 
- In the vast majority of all cases, a typical libcurl upgrade does not break
- the ABI at all. Your application can remain using libcurl just as before,
- only with less bugs and possibly with added new features. You need to read
- the release notes, and if they mention an ABI break/soname bump, you may have
- to verify that your application still builds fine and uses libcurl as it now
- is defined to work.
+ A libcurl upgrade does not break the ABI or change established and documented
+ behavior. Your application can remain using libcurl just as before, only with
+ fewer bugs and possibly with added new features.
 
 ## Version Numbers
 
- In libcurl land, you really can't tell by the libcurl version number if that
- libcurl is binary compatible or not with another libcurl version.
+ In libcurl land, you cannot tell by the libcurl version number if that
+ libcurl is binary compatible or not with another libcurl version. As a rule,
+ we don't break the ABI so you can *always* upgrade to a later version without
+ any loss or change in functionality.
 
 ## Soname Bumps
 
@@ -50,7 +49,7 @@
 ## History
 
  The previous major library soname number bumps (breaking backwards
- compatibility) have happened the following times:
+ compatibility) happened the following times:
 
  0 - libcurl 7.1,   August 2000
 
diff --git a/docs/libcurl/CMakeLists.txt b/docs/libcurl/CMakeLists.txt
index 8ef604a..948a721 100644
--- a/docs/libcurl/CMakeLists.txt
+++ b/docs/libcurl/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/Makefile.am b/docs/libcurl/Makefile.am
index 8681dbd..6905a7b 100644
--- a/docs/libcurl/Makefile.am
+++ b/docs/libcurl/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/Makefile.inc b/docs/libcurl/Makefile.inc
index fb7ea89..30eb779 100644
--- a/docs/libcurl/Makefile.inc
+++ b/docs/libcurl/Makefile.inc
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3
index bcef9e2..d173202 100644
--- a/docs/libcurl/curl_easy_cleanup.3
+++ b/docs/libcurl/curl_easy_cleanup.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_cleanup 3 "September 16, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_cleanup 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_cleanup - End a libcurl easy handle
diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3
index b757e8c..a1da59d 100644
--- a/docs/libcurl/curl_easy_duphandle.3
+++ b/docs/libcurl/curl_easy_duphandle.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_duphandle 3 "March 01, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_duphandle 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_duphandle - Clone a libcurl session handle
diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3
index 015b5d9..d5aa503 100644
--- a/docs/libcurl/curl_easy_escape.3
+++ b/docs/libcurl/curl_easy_escape.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_escape 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_escape 3 "November 09, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_escape - URL encodes the given string
@@ -37,7 +37,8 @@
 version (%NN where NN is a two-digit hexadecimal number).
 
 If \fIlength\fP is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on
-the input \fIstring\fP to find out the size.
+the input \fIstring\fP to find out the size. This function does not accept
+input strings longer than \fBCURL_MAX_INPUT_LENGTH\fP (8 MB).
 
 You must \fIcurl_free(3)\fP the returned string when you're done with it.
 .SH ENCODING
diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3
index 938ccd1..61d165f 100644
--- a/docs/libcurl/curl_easy_getinfo.3
+++ b/docs/libcurl/curl_easy_getinfo.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_getinfo 3 "August 24, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_getinfo 3 "February 19, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_getinfo - extract information from a curl handle
@@ -51,6 +51,9 @@
 .IP CURLINFO_RESPONSE_CODE
 Last received response code.
 See \fICURLINFO_RESPONSE_CODE(3)\fP
+.IP CURLINFO_REFERER
+Referrer header.
+See \fICURLINFO_REFERER(3)\fP
 .IP CURLINFO_HTTP_CONNECTCODE
 Last proxy CONNECT response code.
 See \fICURLINFO_HTTP_CONNECTCODE(3)\fP
diff --git a/docs/libcurl/curl_easy_init.3 b/docs/libcurl/curl_easy_init.3
index 38e062e..b77f098 100644
--- a/docs/libcurl/curl_easy_init.3
+++ b/docs/libcurl/curl_easy_init.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_init 3 "September 16, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_init 3 "December 31, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_init - Start a libcurl easy session
@@ -38,7 +38,7 @@
 \fIcurl_global_init(3)\fP is not thread-safe, and it may result in resource
 problems because there is no corresponding cleanup.
 
-You are strongly advised to not allow this automatic behaviour, by calling
+You are strongly advised to not allow this automatic behavior, by calling
 \fIcurl_global_init(3)\fP yourself properly.  See the description in
 \fBlibcurl\fP(3) of global environment requirements for details of how to use
 this function.
diff --git a/docs/libcurl/curl_easy_option_by_id.3 b/docs/libcurl/curl_easy_option_by_id.3
index 5aab60b..a7a722b 100644
--- a/docs/libcurl/curl_easy_option_by_id.3
+++ b/docs/libcurl/curl_easy_option_by_id.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_option_by_id 3 "August 27, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_option_by_id 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_option_by_id - find an easy setopt option by id
diff --git a/docs/libcurl/curl_easy_option_by_name.3 b/docs/libcurl/curl_easy_option_by_name.3
index a44006a..deb0f30 100644
--- a/docs/libcurl/curl_easy_option_by_name.3
+++ b/docs/libcurl/curl_easy_option_by_name.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_option_by_name 3 "August 27, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_option_by_name 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_option_by_name - find an easy setopt option by name
diff --git a/docs/libcurl/curl_easy_option_next.3 b/docs/libcurl/curl_easy_option_next.3
index 56132c9..a28990d 100644
--- a/docs/libcurl/curl_easy_option_next.3
+++ b/docs/libcurl/curl_easy_option_next.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_option_next 3 "August 27, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_option_next 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_option_next - iterate over easy setopt options
diff --git a/docs/libcurl/curl_easy_pause.3 b/docs/libcurl/curl_easy_pause.3
index 37d3f05..b97da63 100644
--- a/docs/libcurl/curl_easy_pause.3
+++ b/docs/libcurl/curl_easy_pause.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,15 +19,16 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_pause 3 "May 01, 2016" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_pause 3 "December 22, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_pause - pause and unpause a connection
 .SH SYNOPSIS
+.nf
 .B #include <curl/curl.h>
 
-.BI "CURLcode curl_easy_pause(CURL *"handle ", int "bitmask " );"
-
+.BI "CURLcode curl_easy_pause(CURL *"handle ", int "bitmask ");"
+.fi
 .SH DESCRIPTION
 Using this function, you can explicitly mark a running connection to get
 paused, and you can unpause a connection that was previously paused.
@@ -37,18 +38,22 @@
 (\fICURL_READFUNC_PAUSE\fP and \fICURL_WRITEFUNC_PAUSE\fP). A write callback
 that returns pause signals to the library that it couldn't take care of any
 data at all, and that data will then be delivered again to the callback when
-the writing is later unpaused.
+the transfer is unpaused.
 
 While it may feel tempting, take care and notice that you cannot call this
 function from another thread. To unpause, you may for example call it from the
 progress callback (\fICURLOPT_PROGRESSFUNCTION(3)\fP), which gets called at
 least once per second, even if the connection is paused.
 
-When this function is called to unpause reading, the chance is high that you
+When this function is called to unpause receiving, the chance is high that you
 will get your write callback called before this function returns.
 
-The \fBhandle\fP argument is of course identifying the handle that operates on
-the connection you want to pause or unpause.
+The \fBhandle\fP argument identifies the transfer you want to pause or
+unpause.
+
+A paused transfer is excluded from low speed cancels via the
+\fICURLOPT_LOW_SPEED_LIMIT(3)\fP option and unpausing a transfer will reset
+the time period required for the low speed limit to be met.
 
 The \fBbitmask\fP argument is a set of bits that sets the new state of the
 connection. The following bits can be used:
@@ -72,25 +77,24 @@
 The pausing of transfers does not work with protocols that work without
 network connectivity, like FILE://. Trying to pause such a transfer, in any
 direction, will cause problems in the worst case or an error in the best case.
-.SH AVAILABILITY
-This function was added in libcurl 7.18.0. Before this version, there was no
-explicit support for pausing transfers.
-.SH "USAGE WITH THE MULTI-SOCKET INTERFACE"
-Before libcurl 7.32.0, when a specific handle was unpaused with this function,
-there was no particular forced rechecking or similar of the socket's state,
-which made the continuation of the transfer get delayed until next
-multi-socket call invoke or even longer. Alternatively, the user could
-forcibly call for example \fIcurl_multi_socket_all(3)\fP - with a rather hefty
-performance penalty.
+.SH MULTIPLEXED
+When a connection is used multiplexed, like for HTTP/2, and one of the
+transfers over the connection is paused and the others continue flowing,
+libcurl might end up buffering contents for the paused transfer. It has to do
+this because it needs to drain the socket for the other transfers and the
+already announced window size for the paused transfer will allow the server to
+continue sending data up to that window size amount. By default, libcurl
+announces a 32 megabyte window size, which thus can make libcurl end up
+buffering 32 megabyte of data for a paused stream.
 
-Starting in libcurl 7.32.0, unpausing a transfer will schedule a timeout
-trigger for that handle 1 millisecond into the future, so that a
-curl_multi_socket_action( ... CURL_SOCKET_TIMEOUT) can be used immediately
-afterwards to get the transfer going again as desired.
+When such a paused stream is unpaused again, any buffered data will be
+delivered first.
+.SH AVAILABILITY
+Added in libcurl 7.18.0.
 .SH "MEMORY USE"
 When pausing a read by returning the magic return code from a write callback,
 the read data is already in libcurl's internal buffers so it'll have to keep
-it in an allocated buffer until the reading is again unpaused using this
+it in an allocated buffer until the receiving is again unpaused using this
 function.
 
 If the downloaded data is compressed and is asked to get uncompressed
@@ -98,7 +102,7 @@
 downloaded chunk and it will cache the data uncompressed. This has the side-
 effect that if you download something that is compressed a lot, it can result
 in a very large data amount needing to be allocated to save the data during
-the pause. This said, you should probably consider not using paused reading if
-you allow libcurl to uncompress data automatically.
+the pause. This said, you should probably consider not using paused receiving
+if you allow libcurl to uncompress data automatically.
 .SH "SEE ALSO"
 .BR curl_easy_cleanup "(3), " curl_easy_reset "(3)"
diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3
index eeeb5df..17e6042 100644
--- a/docs/libcurl/curl_easy_perform.3
+++ b/docs/libcurl/curl_easy_perform.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_perform 3 "September 16, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_perform 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_perform - perform a blocking file transfer
diff --git a/docs/libcurl/curl_easy_recv.3 b/docs/libcurl/curl_easy_recv.3
index 3212e2c..76ed187 100644
--- a/docs/libcurl/curl_easy_recv.3
+++ b/docs/libcurl/curl_easy_recv.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_recv 3 "December 18, 2016" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_recv 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_recv - receives raw data on an "easy" connection
diff --git a/docs/libcurl/curl_easy_reset.3 b/docs/libcurl/curl_easy_reset.3
index f9caabb..0e064ca 100644
--- a/docs/libcurl/curl_easy_reset.3
+++ b/docs/libcurl/curl_easy_reset.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_reset 3 "February 09, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_reset 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_reset - reset all options of a libcurl session handle
diff --git a/docs/libcurl/curl_easy_send.3 b/docs/libcurl/curl_easy_send.3
index 480b4a2..4db7f54 100644
--- a/docs/libcurl/curl_easy_send.3
+++ b/docs/libcurl/curl_easy_send.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_send 3 "December 18, 2016" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_send 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_send - sends raw data over an "easy" connection
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 2b67d4a..16f5278 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_setopt 3 "September 21, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_setopt 3 "July 16, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_setopt \- set options for a curl easy handle
@@ -49,7 +49,8 @@
 after \fIcurl_easy_setopt(3)\fP returns. The only exception to this rule is
 really \fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string
 \fICURLOPT_COPYPOSTFIELDS(3)\fP has some usage characteristics you need to
-read up on.
+read up on. This function does not accept input strings longer than
+\fBCURL_MAX_INPUT_LENGTH\fP (8 MB).
 
 The order in which the options are set does not matter.
 
@@ -201,7 +202,7 @@
 .IP CURLOPT_DNS_USE_GLOBAL_CACHE
 OBSOLETE Enable global DNS cache. See \fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP
 .IP CURLOPT_DOH_URL
-Use this DOH server for name resolves. See \fICURLOPT_DOH_URL(3)\fP
+Use this DoH server for name resolves. See \fICURLOPT_DOH_URL(3)\fP
 .IP CURLOPT_BUFFERSIZE
 Ask for alternate buffer size. See \fICURLOPT_BUFFERSIZE(3)\fP
 .IP CURLOPT_PORT
@@ -320,6 +321,18 @@
 Specify the Alt-Svc: cache file name. See \fICURLOPT_ALTSVC(3)\fP
 .IP CURLOPT_ALTSVC_CTRL
 Enable and configure Alt-Svc: treatment. See \fICURLOPT_ALTSVC_CTRL(3)\fP
+.IP CURLOPT_HSTS
+Set HSTS cache file. See \fICURLOPT_HSTS(3)\fP
+.IP CURLOPT_HSTS_CTRL
+Enable HSTS. See \fICURLOPT_HSTS_CTRL(3)\fP
+.IP CURLOPT_HSTSREADFUNCTION
+Set HSTS read callback. See \fICURLOPT_HSTSREADFUNCTION(3)\fP
+.IP CURLOPT_HSTSREADDATA
+Pass pointer to the HSTS read callback. See \fICURLOPT_HSTSREADDATA(3)\fP
+.IP CURLOPT_HSTSWRITEFUNCTION
+Set HSTS write callback. See \fICURLOPT_HSTSWRITEFUNCTION(3)\fP
+.IP CURLOPT_HSTSWRITEDATA
+Pass pointer to the HSTS write callback. See \fICURLOPT_HSTSWRITEDATA(3)\fP
 .IP CURLOPT_HTTPGET
 Do an HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP
 .IP CURLOPT_REQUEST_TARGET
@@ -411,6 +424,8 @@
 Client CSEQ number. See \fICURLOPT_RTSP_CLIENT_CSEQ(3)\fP
 .IP CURLOPT_RTSP_SERVER_CSEQ
 CSEQ number for RTSP Server->Client request. See \fICURLOPT_RTSP_SERVER_CSEQ(3)\fP
+.IP CURLOPT_AWS_SIGV4
+AWS HTTP V4 Signature. See \fICURLOPT_AWS_SIGV4(3)\fP
 .SH PROTOCOL OPTIONS
 .IP CURLOPT_TRANSFERTEXT
 Use text transfer. See \fICURLOPT_TRANSFERTEXT(3)\fP
@@ -480,7 +495,7 @@
 .IP CURLOPT_CONNECTTIMEOUT_MS
 Millisecond timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
 .IP CURLOPT_IPRESOLVE
-IP version to resolve to. See \fICURLOPT_IPRESOLVE(3)\fP
+IP version to use. See \fICURLOPT_IPRESOLVE(3)\fP
 .IP CURLOPT_CONNECT_ONLY
 Only connect, nothing else. See \fICURLOPT_CONNECT_ONLY(3)\fP
 .IP CURLOPT_USE_SSL
@@ -551,18 +566,31 @@
 Proxy SSL version to use. See \fICURLOPT_PROXY_SSLVERSION(3)\fP
 .IP CURLOPT_SSL_VERIFYHOST
 Verify the host name in the SSL certificate. See \fICURLOPT_SSL_VERIFYHOST(3)\fP
+.IP CURLOPT_DOH_SSL_VERIFYHOST
+Verify the host name in the DoH (DNS-over-HTTPS) SSL certificate. See
+\fICURLOPT_DOH_SSL_VERIFYHOST(3)\fP
 .IP CURLOPT_PROXY_SSL_VERIFYHOST
 Verify the host name in the proxy SSL certificate. See \fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP
 .IP CURLOPT_SSL_VERIFYPEER
 Verify the SSL certificate. See \fICURLOPT_SSL_VERIFYPEER(3)\fP
+.IP CURLOPT_DOH_SSL_VERIFYPEER
+Verify the DoH (DNS-over-HTTPS) SSL certificate. See
+\fICURLOPT_DOH_SSL_VERIFYPEER(3)\fP
 .IP CURLOPT_PROXY_SSL_VERIFYPEER
 Verify the proxy SSL certificate. See \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP
 .IP CURLOPT_SSL_VERIFYSTATUS
 Verify the SSL certificate's status. See \fICURLOPT_SSL_VERIFYSTATUS(3)\fP
+.IP CURLOPT_DOH_SSL_VERIFYSTATUS
+Verify the DoH (DNS-over-HTTPS) SSL certificate's status. See
+\fICURLOPT_DOH_SSL_VERIFYSTATUS(3)\fP
 .IP CURLOPT_CAINFO
 CA cert bundle. See \fICURLOPT_CAINFO(3)\fP
+.IP CURLOPT_CAINFO_BLOB
+CA cert bundle memory buffer. See \fICURLOPT_CAINFO_BLOB(3)\fP
 .IP CURLOPT_PROXY_CAINFO
 Proxy CA cert bundle. See \fICURLOPT_PROXY_CAINFO(3)\fP
+.IP CURLOPT_PROXY_CAINFO_BLOB
+Proxy CA cert bundle memory buffer. See \fICURLOPT_PROXY_CAINFO_BLOB(3)\fP
 .IP CURLOPT_ISSUERCERT
 Issuer certificate. See \fICURLOPT_ISSUERCERT(3)\fP
 .IP CURLOPT_ISSUERCERT_BLOB
@@ -647,7 +675,7 @@
 7.65.0).
 
 \fBCURLE_BAD_FUNCTION_ARGUMENT\fP is returned when the argument to an option
-is invalid, like perhaps out of range.a
+is invalid, like perhaps out of range.
 
 If you try to set an option that libcurl doesn't know about, perhaps because
 the library is too old to support it or the option was removed in a recent
@@ -667,3 +695,5 @@
 .SH "SEE ALSO"
 .BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), "
 .BR curl_easy_getinfo "(3), " curl_multi_setopt "(3), "
+.BR curl_easy_option_next "(3), " curl_easy_option_by_name "(3), "
+.BR curl_easy_option_by_id "(3), "
diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3
index ce274ac..51fc271 100644
--- a/docs/libcurl/curl_easy_strerror.3
+++ b/docs/libcurl/curl_easy_strerror.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_easy_strerror 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_strerror 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_strerror - return string describing error code
diff --git a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3
index 29029a2..ec9ff93 100644
--- a/docs/libcurl/curl_easy_unescape.3
+++ b/docs/libcurl/curl_easy_unescape.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_unescape 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_easy_unescape 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_easy_unescape - URL decodes the given string
diff --git a/docs/libcurl/curl_easy_upkeep.3 b/docs/libcurl/curl_easy_upkeep.3
index f705b61..689bee4 100644
--- a/docs/libcurl/curl_easy_upkeep.3
+++ b/docs/libcurl/curl_easy_upkeep.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_easy_upkeep 3 "31 Oct 2018" "libcurl 7.62.0" "libcurl Manual"
+.TH curl_easy_upkeep 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
+
 .SH NAME
 curl_easy_upkeep - Perform any connection upkeep checks.
 .SH SYNOPSIS
diff --git a/docs/libcurl/curl_escape.3 b/docs/libcurl/curl_escape.3
index 73951cd..65b8c6a 100644
--- a/docs/libcurl/curl_escape.3
+++ b/docs/libcurl/curl_escape.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_escape 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_escape 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_escape - URL encodes the given string
diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3
index f906a74..baf20db 100644
--- a/docs/libcurl/curl_formadd.3
+++ b/docs/libcurl/curl_formadd.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_formadd 3 "March 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_formadd 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_formadd - add a section to a multipart/formdata HTTP POST
diff --git a/docs/libcurl/curl_formfree.3 b/docs/libcurl/curl_formfree.3
index c027253..a0423cf 100644
--- a/docs/libcurl/curl_formfree.3
+++ b/docs/libcurl/curl_formfree.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_formfree 3 "August 09, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_formfree 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_formfree - free a previously build multipart/formdata HTTP POST chain
diff --git a/docs/libcurl/curl_formget.3 b/docs/libcurl/curl_formget.3
index 950bc5d..77e9f0f 100644
--- a/docs/libcurl/curl_formget.3
+++ b/docs/libcurl/curl_formget.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_formget 3 "September 02, 2017" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_formget 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_formget - serialize a previously built multipart/formdata HTTP POST chain
diff --git a/docs/libcurl/curl_free.3 b/docs/libcurl/curl_free.3
index 99b76e1..6251a5a 100644
--- a/docs/libcurl/curl_free.3
+++ b/docs/libcurl/curl_free.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_free 3 "August 09, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_free 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_free - reclaim memory that has been obtained through a libcurl call
diff --git a/docs/libcurl/curl_getdate.3 b/docs/libcurl/curl_getdate.3
index 6b2e2b5..e01c88e 100644
--- a/docs/libcurl/curl_getdate.3
+++ b/docs/libcurl/curl_getdate.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_getdate 3 "January 18, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_getdate 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_getdate - Convert a date string to number of seconds
diff --git a/docs/libcurl/curl_getenv.3 b/docs/libcurl/curl_getenv.3
index 1be19e5..d8b4582 100644
--- a/docs/libcurl/curl_getenv.3
+++ b/docs/libcurl/curl_getenv.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_getenv 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_getenv 3 "December 31, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_getenv - return value for environment name
@@ -30,7 +30,7 @@
 .ad
 .SH DESCRIPTION
 curl_getenv() is a portable wrapper for the getenv() function, meant to
-emulate its behaviour and provide an identical interface for all operating
+emulate its behavior and provide an identical interface for all operating
 systems libcurl builds on (including win32).
 
 You must \fIcurl_free(3)\fP the returned string when you're done with it.
diff --git a/docs/libcurl/curl_global_cleanup.3 b/docs/libcurl/curl_global_cleanup.3
index e114882..c3622f4 100644
--- a/docs/libcurl/curl_global_cleanup.3
+++ b/docs/libcurl/curl_global_cleanup.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_global_cleanup 3 "September 20, 2016" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_global_cleanup 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_global_cleanup - global libcurl cleanup
diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3
index 1ff813b..f844543 100644
--- a/docs/libcurl/curl_global_init.3
+++ b/docs/libcurl/curl_global_init.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_global_init 3 "January 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_global_init 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_global_init - Global libcurl initialisation
diff --git a/docs/libcurl/curl_global_init_mem.3 b/docs/libcurl/curl_global_init_mem.3
index 81d6425..4f39a64 100644
--- a/docs/libcurl/curl_global_init_mem.3
+++ b/docs/libcurl/curl_global_init_mem.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_global_init_mem 3 "August 11, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_global_init_mem 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_global_init_mem - Global libcurl initialisation with memory callbacks
diff --git a/docs/libcurl/curl_global_sslset.3 b/docs/libcurl/curl_global_sslset.3
index 1b65390..ab172d3 100644
--- a/docs/libcurl/curl_global_sslset.3
+++ b/docs/libcurl/curl_global_sslset.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_global_sslset 3 "August 07, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_global_sslset 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_global_sslset - Select SSL backend to use with libcurl
diff --git a/docs/libcurl/curl_mime_addpart.3 b/docs/libcurl/curl_mime_addpart.3
index 46264c6..5b080d0 100644
--- a/docs/libcurl/curl_mime_addpart.3
+++ b/docs/libcurl/curl_mime_addpart.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_addpart 3 "September 22, 2017" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_addpart 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_addpart - append a new empty part to a mime structure
diff --git a/docs/libcurl/curl_mime_data.3 b/docs/libcurl/curl_mime_data.3
index dee6b74..de9241e 100644
--- a/docs/libcurl/curl_mime_data.3
+++ b/docs/libcurl/curl_mime_data.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_data 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_data 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_data - set a mime part's body data from memory
diff --git a/docs/libcurl/curl_mime_data_cb.3 b/docs/libcurl/curl_mime_data_cb.3
index 9733d44..b0cd3aa 100644
--- a/docs/libcurl/curl_mime_data_cb.3
+++ b/docs/libcurl/curl_mime_data_cb.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_data_cb 3 "April 17, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_data_cb 3 "July 13, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_data_cb - set a callback-based data source for a mime part's body
@@ -62,7 +62,7 @@
 The read callback function gets called by libcurl as soon as it needs to
 read data in order to send it to the peer - like if you ask it to upload or
 post data to the server. The data area pointed at by the pointer \fIbuffer\fP
-should be filled up with at most \fIsize\fP multiplied with \fInmemb\fP number
+should be filled up with at most \fIsize\fP multiplied with \fInitems\fP number
 of bytes by your function.
 
 Your read function must then return the actual number of bytes that it stored
diff --git a/docs/libcurl/curl_mime_encoder.3 b/docs/libcurl/curl_mime_encoder.3
index 279ce9e..9a2b1c8 100644
--- a/docs/libcurl/curl_mime_encoder.3
+++ b/docs/libcurl/curl_mime_encoder.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_encoder 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_encoder 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_encoder - set a mime part's encoder and content transfer encoding
diff --git a/docs/libcurl/curl_mime_filedata.3 b/docs/libcurl/curl_mime_filedata.3
index 38bc284..512ebd7 100644
--- a/docs/libcurl/curl_mime_filedata.3
+++ b/docs/libcurl/curl_mime_filedata.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_filedata 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_filedata 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_filedata - set a mime part's body data from a file contents
diff --git a/docs/libcurl/curl_mime_filename.3 b/docs/libcurl/curl_mime_filename.3
index ebf4325..17160e5 100644
--- a/docs/libcurl/curl_mime_filename.3
+++ b/docs/libcurl/curl_mime_filename.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_filename 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_filename 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_filename - set a mime part's remote file name
diff --git a/docs/libcurl/curl_mime_free.3 b/docs/libcurl/curl_mime_free.3
index bf7753c..0468403 100644
--- a/docs/libcurl/curl_mime_free.3
+++ b/docs/libcurl/curl_mime_free.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_free 3 "August 09, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_free 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_free - free a previously built mime structure
diff --git a/docs/libcurl/curl_mime_headers.3 b/docs/libcurl/curl_mime_headers.3
index af148b5..9c0c4d8 100644
--- a/docs/libcurl/curl_mime_headers.3
+++ b/docs/libcurl/curl_mime_headers.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_headers 3 "September 08, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_headers 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_headers - set a mime part's custom headers
diff --git a/docs/libcurl/curl_mime_init.3 b/docs/libcurl/curl_mime_init.3
index b3a1da9..3531e4a 100644
--- a/docs/libcurl/curl_mime_init.3
+++ b/docs/libcurl/curl_mime_init.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_init 3 "September 16, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_init 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_init - create a mime handle
diff --git a/docs/libcurl/curl_mime_name.3 b/docs/libcurl/curl_mime_name.3
index 10c5b12..d61cc00 100644
--- a/docs/libcurl/curl_mime_name.3
+++ b/docs/libcurl/curl_mime_name.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_name 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_name 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_name - set a mime part's name
diff --git a/docs/libcurl/curl_mime_subparts.3 b/docs/libcurl/curl_mime_subparts.3
index 9240e81..9a1b8c3 100644
--- a/docs/libcurl/curl_mime_subparts.3
+++ b/docs/libcurl/curl_mime_subparts.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_subparts 3 "September 05, 2017" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_subparts 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_subparts - set subparts of a multipart mime part
diff --git a/docs/libcurl/curl_mime_type.3 b/docs/libcurl/curl_mime_type.3
index 3d9ecbb..7958acd 100644
--- a/docs/libcurl/curl_mime_type.3
+++ b/docs/libcurl/curl_mime_type.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_mime_type 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_mime_type 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_mime_type - set a mime part's content type
diff --git a/docs/libcurl/curl_mprintf.3 b/docs/libcurl/curl_mprintf.3
index 253490b..d795e14 100644
--- a/docs/libcurl/curl_mprintf.3
+++ b/docs/libcurl/curl_mprintf.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_printf 3 "April 01, 2016" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_printf 3 "July 07, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
@@ -48,57 +48,207 @@
 .br
 .BI "char *curl_mvaprintf(const char *" format ", va_list " args ");"
 .SH DESCRIPTION
-These are all functions that produce output according to a format string and
-given arguments. These are mostly clones of the well-known C-style functions
-and there will be no detailed explanation of all available formatting rules
-and usage here.
+These functions produce output according to the format string and given
+arguments. They are mostly clones of the well-known C-style functions but
+there are slight differences in behavior.
 
-See this table for notable exceptions.
-.RS
+We discourage users from using any of these functions in new applications.
+
+Functions in the curl_mprintf() family produce output according to a format as
+described below.  The functions \fBcurl_mprintf()\fP and \fBcurl_mvprintf()\fP
+write output to stdout, the standard output stream; \fBcurl_mfprintf()\fP and
+\fBcurl_mvfprintf()\fP write output to the given output stream;
+\fBcurl_msprintf()\fP, \fBcurl_msnprintf()\fP, \fBcurl_mvsprintf()\fP, and
+\fBcurl_mvsnprintf()\fP write to the character string \fBbuffer\fP.
+
+The functions \fBcurl_msnprintf()\fP and \fBcurl_mvsnprintf()\fP write at most
+\fImaxlength\fP bytes (including the terminating null byte ('\\0')) to
+\fIbuffer\fP.
+
+The functions \fBcurl_mvprintf()\fP, \fBcurl_mvfprintf()\fP,
+\fBcurl_mvsprintf()\fP, \fBcurl_mvsnprintf()\fP are equivalent to the
+functions \fBcurl_mprintf()\fP, \fBcurl_mfprintf()\fP, \fBcurl_msprintf()\fP,
+\fBcurl_msnprintf()\fP, respectively, except that they are called with a
+va_list instead of a variable number of arguments.  These functions do not
+call the va_end macro.  Because they invoke the va_arg macro, the value of ap
+is undefined after the call.
+
+The functions \fBcurl_maprintf()\fP and \fBcurl_mvaprintf()\fP return the
+output string as pointer to a newly allocated memory area. The returned string
+must be \fIcurl_free(3)\fPed by the receiver.
+
+All of these functions write the output under the control of a format string
+that specifies how subsequent arguments are converted for output.
+
+.SH FORMAT STRING
+The format string is composed of zero or more directives: ordinary characters
+(not %), which are copied unchanged to the output stream; and conversion
+specifications, each of which results in fetching zero or more subsequent
+arguments. Each conversion specification is introduced by the character %, and
+ends with a conversion specifier. In between there may be (in this order) zero
+or more \fIflags\fP, an optional minimum \fIfield width\fP, an optional
+\fIprecision\fP and an optional \fIlength modifier\fP.
+
+.SH "The $ modifier"
+The arguments must correspond properly with the conversion specifier. By
+default, the arguments are used in the order given, where each '*' (see Field
+width and Precision below) and each conversion specifier asks for the next
+argument (and it is an error if insufficiently many arguments are given).  One
+can also specify explicitly which argument is taken, at each place where an
+argument is required, by writing "%m$" instead of '%' and "*m$" instead
+of '*', where the decimal integer m denotes the position in the argument list
+of the desired argument, indexed starting from 1.  Thus,
+
+    curl_mprintf("%*d", width, num);
+
+and
+
+    curl_mprintf("%2$*1$d", width, num);
+
+are equivalent. The second style allows repeated references to the same
+argument.
+
+If the style using '$' is used, it must be used throughout for all conversions
+taking an argument and all width and precision arguments, but it may be mixed
+with "%%" formats, which do not consume an argument.  There may be no gaps in
+the numbers of argu‐ ments specified using '$'; for example, if arguments 1
+and 3 are specified, argument 2 must also be specified somewhere in the format
+string.
+
+.SH "Flag characters"
+The character % is followed by zero or more of the following flags:
 .TP
-.B curl_mprintf()
-Normal printf() clone.
+.B #
+The value should be converted to its "alternate form".
 .TP
-.B curl_mfprintf()
-Normal fprintf() clone.
+.B 0
+The value should be zero padded.
 .TP
-.B curl_msprintf()
-Normal sprintf() clone.
+.B -
+The converted value is to be left adjusted on the field boundary.  (The
+default is right justification.)  The converted value is padded on the right
+with blanks, rather than on the left with blanks or zeros. A '-' overrides a
+\&'0' if both are given.
 .TP
-.B curl_msnprintf()
-snprintf() clone. Many systems don't have this. It is just like \fBsprintf\fP
-but with an extra argument after the buffer that specifies the length of the
-target buffer.
+.B ' '
+(a space) A blank should be left before a positive number (or empty string)
+produced by a signed conversion.
 .TP
-.B curl_mvprintf()
-Normal vprintf() clone.
+.B +
+A sign (+ or -) should always be placed before a number produced by a signed
+conversion. By default, a sign is used only for negative numbers.  A '+'
+overrides a space if both are used.
+.SH "Field width"
+An optional decimal digit string (with nonzero first digit) specifying a
+minimum field width. If the converted value has fewer characters than the
+field width, it will be padded with spaces on the left (or right, if the
+left-adjustment flag has been given). Instead of a decimal digit string one
+may write "*" or "*m$" (for some decimal integer m) to specify that the field
+width is given in the next argument, or in the m-th argument, respec‐ tively,
+which must be of type int.  A negative field width is taken as a '-' flag
+followed by a positive field width.  In no case does a nonexistent or small
+field width cause truncation of a field; if the result of a conversion is
+wider than the field width, the field is expanded to contain the conversion
+result.
+.SH "Precision"
+An optional precision in the form of a period ('.') followed by an optional
+decimal digit string. Instead of a decimal digit string one may write "*" or
+"*m$" (for some decimal integer m) to specify that the precision is given in
+the next argument, or in the m-th argument, respectively, which must be of
+type int. If the precision is given as just '.', the precision is taken to be
+zero. A negative precision is taken as if the precision were omitted. This
+gives the minimum number of digits to appear for \fBd\fP, \fBi\fP, \fBo\fP,
+\fBu\fP, \fBx\fP, and \fBX\fP conversions, the number of digits to appear
+after the radix character for \fBa\fP, \fBA\fP, \fBe\fP, \fBE\fP, \fBf\fP, and
+\fBF\fP conversions, the maximum number of significant digits for \fBg\fP and
+\fBG\fP conversions, or the maximum number of characters to be printed from a
+string for \fBs\fP and \fBS\fP conversions.
+.SH "Length modifier"
 .TP
-.B curl_mvfprintf()
-Normal vfprintf() clone.
+.B h
+A following integer conversion corresponds to a \fIshort\fP or \fIunsigned
+short\fP argument.
 .TP
-.B curl_mvsprintf()
-Normal vsprintf() clone.
+.B l
+(ell) A following integer conversion corresponds to a \fIlong\fP or
+\fIunsigned long\fP argument, or a following n conversion corresponds to a
+pointer to a long argument
 .TP
-.B curl_mvsnprintf()
-vsnprintf() clone.  Many systems don't have this. It is just like
-\fBvsprintf\fP but with an extra argument after the buffer that specifies the
-length of the target buffer.
+.B ll
+(ell-ell).  A following integer conversion corresponds to a \fIlong long\fP or
+\fIunsigned long long\fP argument, or a following n conversion corresponds to
+a pointer to a long long argument.
 .TP
-.B curl_maprintf()
-Like printf() but returns the output string as a malloc()ed string. The
-returned string must be free()ed by the receiver.
+.B q
+A synonym for \fBll\fP.
 .TP
-.B curl_mvaprintf()
-Like curl_maprintf() but takes a va_list pointer argument instead of a
-variable amount of arguments.
-.RE
+.B L
+A following a, A, e, E, f, F, g, or G conversion corresponds to a long double
+argument.
+.TP
+.B z
+A following integer conversion corresponds to a \fIsize_t\fP or \fIssize_t\fP
+argument.
+.SH "Conversion specifiers"
+A character that specifies the type of conversion to be applied. The
+conversion specifiers and their meanings are:
+.TP
+.B d, i
+The int argument is converted to signed decimal notation.  The precision, if
+any, gives the minimum number of digits that must appear; if the converted
+value requires fewer digits, it is padded on the left with zeros. The default
+precision is 1. When 0 is printed with an explicit precision 0, the output is
+empty.
+.TP
+.B o, u, x, X
+The unsigned int argument is converted to unsigned octal (o), unsigned decimal
+(u), or unsigned hexadecimal (\fBx\fP and \fBX\fP) notation.  The letters
+abcdef are used for \fBx\fP conversions; the letters ABCDEF are used for
+\fBX\fP conversions. The precision, if any, gives the minimum number of digits
+that must appear; if the converted value requires fewer digits, it is padded
+on the left with zeros.  The default precision is 1.  When 0 is printed with
+an explicit precision 0, the output is empty.
+.TP
+.B e, E
+The double argument is rounded and output in the style "[-]d.ddde±dd"
+.TP
+.B f, F
+The double argument is rounded and output to decimal notiation in the style
+[-]ddd.ddd.
+.TP
+.B g, G
+The double argument is converted in style f or e.
+.TP
+.B c
+The int argument is converted to an unsigned char, and the resulting character
+is written.
+.TP
+.B s
+The const char * argument is expected to be a pointer to an array of character
+type (pointer to a string). Characters from the array are written up to (but
+not including) a terminating null byte. If a precision is specified, no more
+than the number specified are written. If a precision is given, no null byte
+need be present; if the precision is not specified, or is greater than the
+size of the array, the array must contain a terminating null byte.
+.TP
+.B p
+The \fIvoid *\fP pointer argument is printed in hexadecimal.
+.TP
+.B n
+The number of characters written so far is stored into the integer pointed to
+by the corresponding argument.
+.TP
+.B %
+A '%' is written. No argument is converted.
 .SH AVAILABILITY
 These functions will be removed from the public libcurl API in the future. Do
-not use them in any new programs or projects.
+not use them in new programs or projects.
 .SH RETURN VALUE
 The \fBcurl_maprintf\fP and \fBcurl_mvaprintf\fP functions return a pointer to
 a newly allocated string, or NULL if it failed.
 
-All other functions return the number of characters they actually outputted.
+All other functions return the number of characters actually printed
+(excluding the null byte used to end output to strings). Note that this
+sometimes differ from how the POSIX versions of these functions work.
 .SH "SEE ALSO"
 .BR printf "(3), " sprintf "(3), " fprintf "(3), " vprintf "(3) "
diff --git a/docs/libcurl/curl_multi_add_handle.3 b/docs/libcurl/curl_multi_add_handle.3
index 568a74f..589b955 100644
--- a/docs/libcurl/curl_multi_add_handle.3
+++ b/docs/libcurl/curl_multi_add_handle.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_add_handle 3 "June 30, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_add_handle 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_add_handle - add an easy handle to a multi session
diff --git a/docs/libcurl/curl_multi_assign.3 b/docs/libcurl/curl_multi_assign.3
index 6fd1f2e..67b18ad 100644
--- a/docs/libcurl/curl_multi_assign.3
+++ b/docs/libcurl/curl_multi_assign.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_assign 3 "March 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_assign 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_assign \- set data to associate with an internal socket
diff --git a/docs/libcurl/curl_multi_cleanup.3 b/docs/libcurl/curl_multi_cleanup.3
index 8b22a2d..0d4eb36 100644
--- a/docs/libcurl/curl_multi_cleanup.3
+++ b/docs/libcurl/curl_multi_cleanup.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_cleanup 3 "August 09, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_cleanup 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_cleanup - close down a multi session
diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3
index f1f8d60..ce3fb85 100644
--- a/docs/libcurl/curl_multi_fdset.3
+++ b/docs/libcurl/curl_multi_fdset.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_fdset 3 "November 09, 2017" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_fdset 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_fdset - extracts file descriptor information from a multi handle
diff --git a/docs/libcurl/curl_multi_info_read.3 b/docs/libcurl/curl_multi_info_read.3
index 1a67710..d2aeb4e 100644
--- a/docs/libcurl/curl_multi_info_read.3
+++ b/docs/libcurl/curl_multi_info_read.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_info_read 3 "March 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_info_read 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_info_read - read multi stack informationals
diff --git a/docs/libcurl/curl_multi_init.3 b/docs/libcurl/curl_multi_init.3
index e62a848..fda0510 100644
--- a/docs/libcurl/curl_multi_init.3
+++ b/docs/libcurl/curl_multi_init.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_init 3 "March 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_init 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_init - create a multi handle
diff --git a/docs/libcurl/curl_multi_perform.3 b/docs/libcurl/curl_multi_perform.3
index 179fbfd..6365e03 100644
--- a/docs/libcurl/curl_multi_perform.3
+++ b/docs/libcurl/curl_multi_perform.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_perform 3 "August 14, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_perform 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_perform - reads/writes available data from each easy handle
diff --git a/docs/libcurl/curl_multi_poll.3 b/docs/libcurl/curl_multi_poll.3
index 1a0888e..5757de4 100644
--- a/docs/libcurl/curl_multi_poll.3
+++ b/docs/libcurl/curl_multi_poll.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_poll 3 "November 17, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_poll 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_poll - polls on all easy handles in a multi handle
diff --git a/docs/libcurl/curl_multi_remove_handle.3 b/docs/libcurl/curl_multi_remove_handle.3
index 2395e30..099b929 100644
--- a/docs/libcurl/curl_multi_remove_handle.3
+++ b/docs/libcurl/curl_multi_remove_handle.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_remove_handle 3 "February 19, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_remove_handle 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_remove_handle - remove an easy handle from a multi session
diff --git a/docs/libcurl/curl_multi_setopt.3 b/docs/libcurl/curl_multi_setopt.3
index d548c58..51fe710 100644
--- a/docs/libcurl/curl_multi_setopt.3
+++ b/docs/libcurl/curl_multi_setopt.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_setopt 3 "September 24, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_setopt 3 "December 31, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_setopt \- set options for a curl multi handle
@@ -30,7 +30,7 @@
 .SH DESCRIPTION
 \fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to
 behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you
-can change libcurl's behaviour when using that multi handle.  All options are
+can change libcurl's behavior when using that multi handle.  All options are
 set with the \fIoption\fP followed by the parameter \fIparam\fP. That
 parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
 pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option
diff --git a/docs/libcurl/curl_multi_socket.3 b/docs/libcurl/curl_multi_socket.3
index c8f0492..32416d1 100644
--- a/docs/libcurl/curl_multi_socket.3
+++ b/docs/libcurl/curl_multi_socket.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_socket 3 "June 30, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_socket 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_socket \- reads/writes available data
diff --git a/docs/libcurl/curl_multi_socket_action.3 b/docs/libcurl/curl_multi_socket_action.3
index 121ac0b..61d9979 100644
--- a/docs/libcurl/curl_multi_socket_action.3
+++ b/docs/libcurl/curl_multi_socket_action.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_socket_action 3 "June 10, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_socket_action 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_socket_action \- reads/writes available data given an action
diff --git a/docs/libcurl/curl_multi_strerror.3 b/docs/libcurl/curl_multi_strerror.3
index b5e5f73..ce7b38b 100644
--- a/docs/libcurl/curl_multi_strerror.3
+++ b/docs/libcurl/curl_multi_strerror.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_strerror 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_strerror 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_strerror - return string describing error code
diff --git a/docs/libcurl/curl_multi_timeout.3 b/docs/libcurl/curl_multi_timeout.3
index cdbc3de..3e69f17 100644
--- a/docs/libcurl/curl_multi_timeout.3
+++ b/docs/libcurl/curl_multi_timeout.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_timeout 3 "March 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_timeout 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_timeout \- how long to wait for action before proceeding
diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3
index 61fe44b..911d1e8 100644
--- a/docs/libcurl/curl_multi_wait.3
+++ b/docs/libcurl/curl_multi_wait.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_wait 3 "November 28, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_wait 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_wait - polls on all easy handles in a multi handle
diff --git a/docs/libcurl/curl_multi_wakeup.3 b/docs/libcurl/curl_multi_wakeup.3
index a6be263..ef04dcb 100644
--- a/docs/libcurl/curl_multi_wakeup.3
+++ b/docs/libcurl/curl_multi_wakeup.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_multi_wakeup 3 "November 25, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_multi_wakeup 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_multi_wakeup - wakes up a sleeping curl_multi_poll call
diff --git a/docs/libcurl/curl_share_cleanup.3 b/docs/libcurl/curl_share_cleanup.3
index b5bdb5d..b4214d6 100644
--- a/docs/libcurl/curl_share_cleanup.3
+++ b/docs/libcurl/curl_share_cleanup.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_share_cleanup 3 "August 09, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_share_cleanup 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_share_cleanup - Clean up a shared object
diff --git a/docs/libcurl/curl_share_init.3 b/docs/libcurl/curl_share_init.3
index afbbfad..f20141a 100644
--- a/docs/libcurl/curl_share_init.3
+++ b/docs/libcurl/curl_share_init.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_share_init 3 "March 23, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_share_init 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_share_init - Create a shared object
diff --git a/docs/libcurl/curl_share_setopt.3 b/docs/libcurl/curl_share_setopt.3
index f2e5c8c..6d26460 100644
--- a/docs/libcurl/curl_share_setopt.3
+++ b/docs/libcurl/curl_share_setopt.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_share_setopt 3 "August 11, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_share_setopt 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_share_setopt - Set options for a shared object
diff --git a/docs/libcurl/curl_share_strerror.3 b/docs/libcurl/curl_share_strerror.3
index 7667570..e003ae1 100644
--- a/docs/libcurl/curl_share_strerror.3
+++ b/docs/libcurl/curl_share_strerror.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_share_strerror 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_share_strerror 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_share_strerror - return string describing error code
diff --git a/docs/libcurl/curl_slist_append.3 b/docs/libcurl/curl_slist_append.3
index 3c84193..3d3bef2 100644
--- a/docs/libcurl/curl_slist_append.3
+++ b/docs/libcurl/curl_slist_append.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_slist_append 3 "January 02, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_slist_append 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_slist_append - add a string to an slist
diff --git a/docs/libcurl/curl_slist_free_all.3 b/docs/libcurl/curl_slist_free_all.3
index 39b09d7..9aed31d 100644
--- a/docs/libcurl/curl_slist_free_all.3
+++ b/docs/libcurl/curl_slist_free_all.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_slist_free_all 3 "September 23, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_slist_free_all 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_slist_free_all - free an entire curl_slist list
diff --git a/docs/libcurl/curl_strequal.3 b/docs/libcurl/curl_strequal.3
index 481b4fd..0684af2 100644
--- a/docs/libcurl/curl_strequal.3
+++ b/docs/libcurl/curl_strequal.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_strequal 3 "June 29, 2017" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_strequal 3 "November 05, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_strequal, curl_strnequal - case insensitive string comparisons
diff --git a/docs/libcurl/curl_unescape.3 b/docs/libcurl/curl_unescape.3
index 9775efb..192ff3b 100644
--- a/docs/libcurl/curl_unescape.3
+++ b/docs/libcurl/curl_unescape.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_unescape 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_unescape 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_unescape - URL decodes the given string
diff --git a/docs/libcurl/curl_url.3 b/docs/libcurl/curl_url.3
index 98435d3..b53cfcd 100644
--- a/docs/libcurl/curl_url.3
+++ b/docs/libcurl/curl_url.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_url 3 "March 22, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_url 3 "March 27, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_url - returns a new CURLU handle
@@ -51,4 +51,4 @@
 Added in curl 7.62.0
 .SH "SEE ALSO"
 .BR curl_url_cleanup "(3), " curl_url_get "(3), " curl_url_set "(3), "
-.BR curl_url_dup "(3), "
+.BR curl_url_dup "(3), " CURLOPT_CURLU "(3), "
diff --git a/docs/libcurl/curl_url_cleanup.3 b/docs/libcurl/curl_url_cleanup.3
index 33b0998..4e8085b 100644
--- a/docs/libcurl/curl_url_cleanup.3
+++ b/docs/libcurl/curl_url_cleanup.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_url_cleanup 3 "September 08, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_url_cleanup 3 "March 27, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_url_cleanup - free a CURLU handle
@@ -42,4 +42,4 @@
 Added in curl 7.62.0
 .SH "SEE ALSO"
 .BR curl_url_dup "(3), " curl_url "(3), " curl_url_set "(3), "
-.BR curl_url_get "(3), "
+.BR curl_url_get "(3), " CURLOPT_CURLU "(3), "
diff --git a/docs/libcurl/curl_url_dup.3 b/docs/libcurl/curl_url_dup.3
index 8ab084b..f851edd 100644
--- a/docs/libcurl/curl_url_dup.3
+++ b/docs/libcurl/curl_url_dup.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_url_dup 3 "September 08, 2018" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_url_dup 3 "March 27, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_url_dup - duplicate a CURLU handle
@@ -50,4 +50,4 @@
 Added in curl 7.62.0
 .SH "SEE ALSO"
 .BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_set "(3), "
-.BR curl_url_get "(3), "
+.BR curl_url_get "(3), " CURLOPT_CURLU "(3), "
diff --git a/docs/libcurl/curl_url_get.3 b/docs/libcurl/curl_url_get.3
index 3209931..a93400b 100644
--- a/docs/libcurl/curl_url_get.3
+++ b/docs/libcurl/curl_url_get.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_url_get 3 "September 25, 2019" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_url_get 3 "March 27, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_url_get - extract a part from a URL
@@ -113,4 +113,4 @@
 Added in curl 7.62.0. CURLUPART_ZONEID was added in 7.65.0.
 .SH "SEE ALSO"
 .BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_set "(3), "
-.BR curl_url_dup "(3), "
+.BR curl_url_dup "(3), " CURLOPT_CURLU "(3), "
diff --git a/docs/libcurl/curl_url_set.3 b/docs/libcurl/curl_url_set.3
index 6a6c54f..7328025 100644
--- a/docs/libcurl/curl_url_set.3
+++ b/docs/libcurl/curl_url_set.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_url_set 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_url_set 3 "May 31, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_url_set - set a URL part
@@ -40,6 +40,9 @@
 string with the new contents for that URL part. The contents should be in the
 form and encoding they'd use in a URL: URL encoded.
 
+The application does not have to keep \fIcontent\fP around after a successful
+call.
+
 Setting a part to a NULL pointer will effectively remove that part's contents
 from the CURLU handle.
 
@@ -118,7 +121,20 @@
 host part (normally the only mandatory part of the authority), but libcurl
 cannot know whether this is permitted for custom schemes. Specifying the flag
 permits empty authority sections, similar to how file scheme is handled.
-
+.IP CURLU_PATH_AS_IS
+When set for \fBCURLUPART_URL\fP, this makes libcurl skip the normalization of
+the path. That's the procedure where curl otherwise removes sequences of
+dot-slash and dot-dot etc. The same option used for transfers is called
+\fICURLOPT_PATH_AS_IS(3)\fP.
+.IP CURLU_ALLOW_SPACE
+If set, a the URL parser allows space (ASCII 32) where possible. The URL
+syntax does normally not allow spaces anywhere, but they should be encoded as
+%20 or '+'. When spaces are allowed, they are still not allowed in the scheme.
+When space is used and allowed in a URL, it will be stored as-is unless
+\fICURLU_URLENCODE\fP is also set, which then makes libcurl URL-encode the
+space before stored. This affects how the URL will be constructed when
+\fIcurl_url_get(3)\fP is subsequently used to extract the full URL or
+individual parts.
 .SH RETURN VALUE
 Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went
 fine.
@@ -127,7 +143,7 @@
 part, must be shorter than 8000000 bytes otherwise it returns
 \fBCURLUE_MALFORMED_INPUT\fP (added in 7.65.0).
 
-If this function returns an error, no URL part is returned.
+If this function returns an error, no URL part is set.
 .SH EXAMPLE
 .nf
   CURLUcode rc;
@@ -144,4 +160,4 @@
 Added in curl 7.62.0. CURLUPART_ZONEID was added in 7.65.0.
 .SH "SEE ALSO"
 .BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_get "(3), "
-.BR curl_url_dup "(3), "
+.BR curl_url_dup "(3), " CURLOPT_CURLU "(3), "
diff --git a/docs/libcurl/curl_version.3 b/docs/libcurl/curl_version.3
index b192b32..d738f38 100644
--- a/docs/libcurl/curl_version.3
+++ b/docs/libcurl/curl_version.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH curl_version 3 "June 25, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_version 3 "November 04, 2020" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_version - returns the libcurl version string
diff --git a/docs/libcurl/curl_version_info.3 b/docs/libcurl/curl_version_info.3
index 9e224b9..080de24 100644
--- a/docs/libcurl/curl_version_info.3
+++ b/docs/libcurl/curl_version_info.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl_version_info 3 "August 27, 2020" "libcurl 7.73.0" "libcurl Manual"
+.TH curl_version_info 3 "April 03, 2021" "libcurl 7.78.0" "libcurl Manual"
 
 .SH NAME
 curl_version_info - returns run-time libcurl version info
@@ -98,6 +98,12 @@
   unsigned int zstd_ver_num; /* Numeric Zstd version
                                   (MAJOR << 24) | (MINOR << 12) | PATCH */
   const char *zstd_version; /* human readable string. */
+  /* when 'age' is CURLVERSION_NINTH or higher (>= 7.75.0), the members
+     below exist */
+  const char *hyper_version; /* human readable string. */
+  /* when 'age' is CURLVERSION_TENTH or higher (>= 7.77.0), the members
+     below exist */
+  const char *gsasl_version; /* human readable string. */
 } curl_version_info_data;
 .fi
 
@@ -137,6 +143,9 @@
 interest for libcurl hackers. (added in 7.19.6)
 .IP CURL_VERSION_DEBUG
 libcurl was built with debug capabilities (added in 7.10.6)
+.IP CURL_VERSION_GSASL
+libcurl was built with libgsasl and thus with some extra SCRAM-SHA
+authentication methods. (added in 7.76.0)
 .IP CURL_VERSION_GSSAPI
 libcurl was built with support for GSS-API. This makes libcurl use provided
 functions for Kerberos and SPNEGO authentication. It also allows libcurl
@@ -144,6 +153,9 @@
 (Added in 7.38.0)
 .IP CURL_VERSION_GSSNEGOTIATE
 supports HTTP GSS-Negotiate (added in 7.10.6)
+.IP CURL_VERSION_HSTS
+libcurl was built with support for HSTS (HTTP Strict Transport Security)
+(Added in 7.74.0)
 .IP CURL_VERSION_HTTPS_PROXY
 libcurl was built with support for HTTPS-proxy.
 (Added in 7.52.0)
diff --git a/docs/libcurl/libcurl-easy.3 b/docs/libcurl/libcurl-easy.3
index 78cae73..fd3edae 100644
--- a/docs/libcurl/libcurl-easy.3
+++ b/docs/libcurl/libcurl-easy.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH libcurl 3 "March 23, 2020" "libcurl 7.73.0" "libcurl easy interface"
+.TH libcurl 3 "November 04, 2020" "libcurl 7.78.0" "libcurl easy interface"
 
 .SH NAME
 libcurl-easy \- easy interface overview
diff --git a/docs/libcurl/libcurl-env.3 b/docs/libcurl/libcurl-env.3
index f81244d..4419584 100644
--- a/docs/libcurl/libcurl-env.3
+++ b/docs/libcurl/libcurl-env.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH libcurl-env 3 "September 16, 2020" "libcurl 7.73.0" "libcurl environment variables"
+.TH libcurl-env 3 "March 27, 2021" "libcurl 7.78.0" "libcurl environment variables"
 
 .SH NAME
 libcurl-env \- environment variables libcurl understands
@@ -46,8 +46,11 @@
 .IP CURL_SSL_BACKEND
 When libcurl is built to support multiple SSL backends, it will select a
 specific backend at first use. If no selection is done by the program using
-libcurl, this variable's selection will be used. It should be set to the full
-SSL backend name to use (case insensitive).
+libcurl, this variable's selection will be used. Setting a name that isn't a
+built-in alternative will make libcurl stay with the default.
+
+SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
+mesalink, nss, openssl, rustls, schannel, secure-transport, wolfssl
 .IP HOME
 When the netrc feature is used (\fICURLOPT_NETRC(3)\fP), this variable is
 checked as the primary way to find the "current" home directory in which
diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3
index b16cfc3..8070af3 100644
--- a/docs/libcurl/libcurl-errors.3
+++ b/docs/libcurl/libcurl-errors.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH libcurl-errors 3 "July 29, 2020" "libcurl 7.73.0" "libcurl errors"
+.TH libcurl-errors 3 "June 02, 2021" "libcurl 7.78.0" "libcurl errors"
 
 .SH NAME
 libcurl-errors \- error codes in libcurl
@@ -161,8 +161,9 @@
 documentation. This is most likely a problem in the program that uses
 libcurl. The error buffer might contain more specific information about which
 exact option it concerns.
-.IP "CURLE_TELNET_OPTION_SYNTAX (49)"
-A telnet option string was Illegally formatted.
+.IP "CURLE_SETOPT_OPTION_SYNTAX (49)"
+An option passed in to a setopt was wrongly formatted. See error message for
+details about what option.
 .IP "CURLE_GOT_NOTHING (52)"
 Nothing was returned from the server, and under the circumstances, getting
 nothing is considered an error.
@@ -263,6 +264,8 @@
 .IP "CURLE_QUIC_CONNECT_ERROR (96)"
 QUIC connection error. This error may be caused by an SSL library error. QUIC
 is the protocol used for HTTP/3 transfers.
+.IP "CURLE_SSL_CLIENTCERT (98)"
+SSL Client Certificate required.
 .IP "CURLE_OBSOLETE*"
 These error codes will never be returned. They were used in an old libcurl
 version and are currently unused.
diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3
index 95c3681..0ac2cf0 100644
--- a/docs/libcurl/libcurl-multi.3
+++ b/docs/libcurl/libcurl-multi.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH libcurl-multi 3 "April 26, 2020" "libcurl 7.73.0" "libcurl multi interface"
+.TH libcurl-multi 3 "November 04, 2020" "libcurl 7.78.0" "libcurl multi interface"
 
 .SH NAME
 libcurl-multi \- how to use the multi interface
diff --git a/docs/libcurl/libcurl-security.3 b/docs/libcurl/libcurl-security.3
index 2460058..ef65206 100644
--- a/docs/libcurl/libcurl-security.3
+++ b/docs/libcurl/libcurl-security.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH libcurl-security 3 "September 16, 2020" "libcurl 7.73.0" "libcurl security"
+.TH libcurl-security 3 "June 17, 2021" "libcurl 7.78.0" "libcurl security"
 
 .SH NAME
 libcurl-security \- security considerations when using libcurl
@@ -163,6 +163,12 @@
 that runs the application or a machine on the same local network, might be
 possible to exploit by an attacker who then perhaps can "port-scan" the
 particular hosts - depending on how the application and servers acts.
+.SH "IPv4 Addresses"
+Some users might be tempted to filter access to local resources or similar
+based on numerical IPv4 addresses used in URLs. This is a bad and error-prone
+idea because of the many different ways a numerical IPv4 address can be
+specified and libcurl accepts: one to four dot-separated fields using one of
+or a mix of decimal, octal or hexadecimal encoding.
 .SH "IPv6 Addresses"
 libcurl will normally handle IPv6 addresses transparently and just as easily
 as IPv4 addresses. That means that a sanitizing function that filters out
@@ -346,10 +352,6 @@
 certificates, thus enabling a malicious server to spoof a legitimate
 one. HTTPS without validated certificates is potentially as insecure as a
 plain HTTP connection.
-.SH "Report Security Problems"
-Should you detect or just suspect a security problem in libcurl or curl,
-contact the project curl security team immediately. See
-https://curl.haxx.se/dev/secprocess.html for details.
 .SH "Showing What You Do"
 Relatedly, be aware that in situations when you have problems with libcurl and
 ask someone for help, everything you reveal in order to get best possible help
@@ -366,3 +368,28 @@
 To avoid this problem, you must of course use your common sense. Often, you
 can just edit out the sensitive data or just search/replace your true
 information with faked data.
+.SH "Setuid applications using libcurl"
+libcurl-using applications that set the 'setuid' bit to run with elevated or
+modified rights also implicitly give that extra power to libcurl and this
+should only be done after very careful considerations.
+
+Giving setuid powers to the application means that libcurl can save files using
+those new rights (if for example the `SSLKEYLOGFILE` environment variable is
+set). Also: if the application wants these powers to read or manage secrets
+that the user is otherwise not able to view (like credentials for a login
+etc), it should be noted that libcurl still might understand proxy environment
+variables that allow the user to redirect libcurl operations to use a proxy
+controlled by the user.
+.SH "File descriptors, fork and ntlm_wb"
+An application that uses libcurl and invokes `fork()` will get all file
+descriptors duplicated in the child process, including the ones libcurl
+created.
+
+libcurl itself uses `fork()` and `execl()` if told to use the
+`CURLAUTH_NTLM_WB` authentication method which then will invoke the helper
+command in a child process with file descriptors duplicated. Make sure that
+only the trusted and reliable helper program is invoked!
+.SH "Report Security Problems"
+Should you detect or just suspect a security problem in libcurl or curl,
+contact the project curl security team immediately. See
+https://curl.se/dev/secprocess.html for details.
diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3
index decfdf3..eb7d16f 100644
--- a/docs/libcurl/libcurl-share.3
+++ b/docs/libcurl/libcurl-share.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH libcurl-share 3 "November 27, 2017" "libcurl 7.73.0" "libcurl share interface"
+.TH libcurl-share 3 "November 05, 2020" "libcurl 7.78.0" "libcurl share interface"
 
 .SH NAME
 libcurl-share \- how to use the share interface
diff --git a/docs/libcurl/libcurl-symbols.3 b/docs/libcurl/libcurl-symbols.3
index 22c7b4b..59888c2 100644
--- a/docs/libcurl/libcurl-symbols.3
+++ b/docs/libcurl/libcurl-symbols.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,7 +19,7 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH libcurl-symbols 3 "Oct 14, 2020" "libcurl 7.41.0" "libcurl symbols"
+.TH libcurl-symbols 3 "Jul 21, 2021" "libcurl 7.41.0" "libcurl symbols"
 .SH NAME
 libcurl-symbols \- libcurl symbol version information
 .SH "libcurl symbols"
@@ -41,8 +41,6 @@
 Introduced in 7.64.1
 .IP CURLALTSVC_H3
 Introduced in 7.64.1
-.IP CURLALTSVC_IMMEDIATELY
-Introduced in 7.64.1
 .IP CURLALTSVC_READONLYFILE
 Introduced in 7.64.1
 .IP CURLAUTH_ANY
@@ -72,6 +70,8 @@
 Introduced in 7.22.0
 .IP CURLAUTH_ONLY
 Introduced in 7.21.3
+.IP CURLAUTH_AWS_SIGV4
+Introduced in 7.75.0
 .IP CURLCLOSEPOLICY_CALLBACK
 Introduced in 7.7
 .IP CURLCLOSEPOLICY_LEAST_RECENTLY_USED
@@ -275,6 +275,8 @@
 Introduced in 7.10
 .IP CURLE_SEND_FAIL_REWIND
 Introduced in 7.12.3
+.IP CURLE_SETOPT_OPTION_SYNTAX
+Introduced in 7.78.0
 .IP CURLE_SHARE_IN_USE
 Introduced in 7.9.6
 Deprecated since 7.17.0
@@ -289,6 +291,8 @@
 Introduced in 7.10
 .IP CURLE_SSL_CIPHER
 Introduced in 7.10
+.IP CURLE_SSL_CLIENTCERT
+Introduced in 7.77.0
 .IP CURLE_SSL_CONNECT_ERROR
 Introduced in 7.1
 .IP CURLE_SSL_CRL_BADFILE
@@ -497,6 +501,10 @@
 Introduced in 7.37.0
 .IP CURLHEADER_UNIFIED
 Introduced in 7.37.0
+.IP CURLHSTS_ENABLE
+Introduced in 7.74.0
+.IP CURLHSTS_READONLYFILE
+Introduced in 7.74.0
 .IP CURLINFO_ACTIVESOCKET
 Introduced in 7.45.0
 .IP CURLINFO_APPCONNECT_TIME
@@ -608,6 +616,8 @@
 Introduced in 7.61.0
 .IP CURLINFO_REDIRECT_URL
 Introduced in 7.18.2
+.IP CURLINFO_REFERER
+Introduced in 7.76.0
 .IP CURLINFO_REQUEST_SIZE
 Introduced in 7.4.1
 .IP CURLINFO_RESPONSE_CODE
@@ -811,6 +821,8 @@
 Introduced in 7.10
 .IP CURLOPT_CAINFO
 Introduced in 7.4.2
+.IP CURLOPT_CAINFO_BLOB
+Introduced in 7.77.0
 .IP CURLOPT_CAPATH
 Introduced in 7.9.8
 .IP CURLOPT_CERTINFO
@@ -891,6 +903,12 @@
 .IP CURLOPT_DNS_USE_GLOBAL_CACHE
 Introduced in 7.9.3
 Deprecated since 7.11.1
+.IP CURLOPT_DOH_SSL_VERIFYHOST
+Introduced in 7.76.0
+.IP CURLOPT_DOH_SSL_VERIFYPEER
+Introduced in 7.76.0
+.IP CURLOPT_DOH_SSL_VERIFYSTATUS
+Introduced in 7.76.0
 .IP CURLOPT_DOH_URL
 Introduced in 7.62.0
 .IP CURLOPT_EGDSOCKET
@@ -969,6 +987,18 @@
 Introduced in 7.7.2
 .IP CURLOPT_HEADEROPT
 Introduced in 7.37.0
+.IP CURLOPT_HSTS
+Introduced in 7.74.0
+.IP CURLOPT_HSTS_CTRL
+Introduced in 7.74.0
+.IP CURLOPT_HSTSREADDATA
+Introduced in 7.74.0
+.IP CURLOPT_HSTSREADFUNCTION
+Introduced in 7.74.0
+.IP CURLOPT_HSTSWRITEDATA
+Introduced in 7.74.0
+.IP CURLOPT_HSTSWRITEFUNCTION
+Introduced in 7.74.0
 .IP CURLOPT_HTTP09_ALLOWED
 Introduced in 7.64.0
 .IP CURLOPT_HTTP200ALIASES
@@ -1156,6 +1186,8 @@
 Introduced in 7.1
 .IP CURLOPT_PROXY_CAINFO
 Introduced in 7.52.0
+.IP CURLOPT_PROXY_CAINFO_BLOB
+Introduced in 7.77.0
 .IP CURLOPT_PROXY_CAPATH
 Introduced in 7.52.0
 .IP CURLOPT_PROXY_CRLFILE
@@ -1421,6 +1453,8 @@
 Introduced in 7.1
 .IP CURLOPT_USE_SSL
 Introduced in 7.17.0
+.IP CURLOPT_AWS_SIGV4
+Introduced in 7.75.0
 .IP CURLOPT_VERBOSE
 Introduced in 7.1
 .IP CURLOPT_WILDCARDMATCH
@@ -1487,6 +1521,8 @@
 Introduced in 7.19.4
 .IP CURLPROTO_GOPHER
 Introduced in 7.21.2
+.IP CURLPROTO_GOPHERS
+Introduced in 7.75.0
 .IP CURLPROTO_HTTP
 Introduced in 7.19.4
 .IP CURLPROTO_HTTPS
@@ -1694,6 +1730,8 @@
 .IP CURLSSLBACKEND_POLARSSL
 Introduced in 7.34.0
 Deprecated since 7.69.0
+.IP CURLSSLBACKEND_RUSTLS
+Introduced in 7.76.0
 .IP CURLSSLBACKEND_QSOSSL
 Introduced in 7.34.0
 .IP CURLSSLBACKEND_SCHANNEL
@@ -1704,6 +1742,8 @@
 Introduced in 7.49.0
 .IP CURLSSLOPT_ALLOW_BEAST
 Introduced in 7.25.0
+.IP CURLSSLOPT_AUTO_CLIENT_CERT
+Introduced in 7.77.0
 .IP CURLSSLOPT_NATIVE_CA
 Introduced in 7.71.0
 .IP CURLSSLOPT_NO_PARTIALCHAIN
@@ -1720,6 +1760,12 @@
 Introduced in 7.56.0
 .IP CURLSSLSET_UNKNOWN_BACKEND
 Introduced in 7.56.0
+.IP CURLSTS_DONE
+Introduced in 7.74.0
+.IP CURLSTS_FAIL
+Introduced in 7.74.0
+.IP CURLSTS_OK
+Introduced in 7.74.0
 .IP CURLUE_BAD_HANDLE
 Introduced in 7.62.0
 .IP CURLUE_BAD_PARTPOINTER
@@ -1786,6 +1832,8 @@
 Introduced in 7.17.0
 .IP CURLUSESSL_TRY
 Introduced in 7.17.0
+.IP CURLU_ALLOW_SPACE
+Introduced in 7.78.0
 .IP CURLU_APPENDQUERY
 Introduced in 7.62.0
 .IP CURLU_DEFAULT_PORT
@@ -1816,6 +1864,8 @@
 Introduced in 7.10
 .IP CURLVERSION_FOURTH
 Introduced in 7.16.1
+.IP CURLVERSION_NINTH
+Introduced in 7.75.0
 .IP CURLVERSION_NOW
 Introduced in 7.10
 .IP CURLVERSION_SECOND
@@ -1824,6 +1874,8 @@
 Introduced in 7.70.0
 .IP CURLVERSION_SIXTH
 Introduced in 7.66.0
+.IP CURLVERSION_TENTH
+Introduced in 7.77.0
 .IP CURLVERSION_THIRD
 Introduced in 7.12.0
 .IP CURL_CHUNK_BGN_FUNC_FAIL
@@ -2110,11 +2162,15 @@
 Introduced in 7.19.6
 .IP CURL_VERSION_DEBUG
 Introduced in 7.10.6
+.IP CURL_VERSION_GSASL
+Introduced in 7.76.0
 .IP CURL_VERSION_GSSAPI
 Introduced in 7.38.0
 .IP CURL_VERSION_GSSNEGOTIATE
 Introduced in 7.10.6
 Deprecated since 7.38.0
+.IP CURL_VERSION_HSTS
+Introduced in 7.74.0
 .IP CURL_VERSION_HTTP2
 Introduced in 7.33.0
 .IP CURL_VERSION_HTTP3
diff --git a/docs/libcurl/libcurl-thread.3 b/docs/libcurl/libcurl-thread.3
index 1205c1b..65d6613 100644
--- a/docs/libcurl/libcurl-thread.3
+++ b/docs/libcurl/libcurl-thread.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH libcurl-thread 3 "August 07, 2020" "libcurl 7.73.0" "libcurl thread safety"
+.TH libcurl-thread 3 "November 04, 2020" "libcurl 7.78.0" "libcurl thread safety"
 
 .SH NAME
 libcurl-thread \- libcurl thread safety
@@ -52,7 +52,7 @@
 
 https://www.openssl.org/docs/man1.0.2/man3/CRYPTO_set_locking_callback.html#DESCRIPTION
 
-https://curl.haxx.se/libcurl/c/opensslthreadlock.html
+https://curl.se/libcurl/c/opensslthreadlock.html
 
 .IP GnuTLS
 https://gnutls.org/manual/html_node/Thread-safety.html
diff --git a/docs/libcurl/libcurl-tutorial.3 b/docs/libcurl/libcurl-tutorial.3
index 853c1f0..333fc8b 100644
--- a/docs/libcurl/libcurl-tutorial.3
+++ b/docs/libcurl/libcurl-tutorial.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH libcurl-tutorial 3 "October 31, 2019" "libcurl 7.73.0" "libcurl programming"
+.TH libcurl-tutorial 3 "November 05, 2020" "libcurl 7.78.0" "libcurl programming"
 
 .SH NAME
 libcurl-tutorial \- libcurl programming tutorial
diff --git a/docs/libcurl/libcurl-url.3 b/docs/libcurl/libcurl-url.3
index f912fce..26ebe99 100644
--- a/docs/libcurl/libcurl-url.3
+++ b/docs/libcurl/libcurl-url.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,15 +19,14 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH libcurl 3 "September 10, 2018" "libcurl 7.73.0" "libcurl url interface"
+.TH libcurl 3 "May 05, 2021" "libcurl 7.78.0" "libcurl url interface"
 
 .SH NAME
 libcurl-url \- URL interface overview
 .SH DESCRIPTION
-The URL interface provides a set of functions for parsing and generating URLs.
+The URL interface provides functions for parsing and generating URLs.
 .SH INCLUDE
-You still only include <curl/curl.h> in your code. Note that the URL API was
-introduced in 7.62.0.
+You still only include <curl/curl.h> in your code.
 .SH CREATE
 Create a handle that holds URL info and resources with \fIcurl_url(3)\fP:
 
@@ -133,6 +132,8 @@
 .nf
   https://example.com/?shoes=2&hat=1&candy=N%26N`
 .fi
+.SH AVALABILITY
+The URL API was introduced in libcurl 7.62.0.
 .SH "SEE ALSO"
 .BR curl_url "(3), " curl_url_cleanup "(3), " curl_url_get "(3), "
 .BR curl_url_dup "(3), " curl_url_set "(3), " CURLOPT_URL "(3), "
diff --git a/docs/libcurl/libcurl.3 b/docs/libcurl/libcurl.3
index 15ac51b..275cd3f 100644
--- a/docs/libcurl/libcurl.3
+++ b/docs/libcurl/libcurl.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -19,16 +19,16 @@
 .\" * KIND, either express or implied.
 .\" *
 .\" **************************************************************************
-.TH libcurl 3 "March 23, 2020" "libcurl 7.73.0" "libcurl overview"
+.TH libcurl 3 "May 05, 2021" "libcurl 7.78.0" "libcurl overview"
 
 .SH NAME
 libcurl \- client-side URL transfers
 .SH DESCRIPTION
 This is a short overview on how to use libcurl in your C programs. There are
-specific man pages for each function mentioned in here. There are also the
-\fIlibcurl-easy(3)\fP man page, the \fIlibcurl-multi(3)\fP man page, the
-\fIlibcurl-share(3)\fP man page and the \fIlibcurl-tutorial(3)\fP man page for
-in-depth understanding on how to program with libcurl.
+specific man pages for each function mentioned in here. See
+\fIlibcurl-easy(3)\fP, \fIlibcurl-multi(3)\fP, \fIlibcurl-share(3)\fP,
+\fIlibcurl-url(3)\fP and \fIlibcurl-tutorial(3)\fP for in-depth understanding
+on how to program with libcurl.
 
 There are many bindings available that bring libcurl access to your favourite
 language. Look elsewhere for documentation on those.
@@ -85,6 +85,8 @@
 builds a linked list
 .IP curl_slist_free_all()
 frees a whole curl_slist
+.IP curl_url_set()
+parses a URL
 .RE
 
 .SH "LINKING WITH LIBCURL"
diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4
index c3c1766..ad53a44 100644
--- a/docs/libcurl/libcurl.m4
+++ b/docs/libcurl/libcurl.m4
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/mksymbolsmanpage.pl b/docs/libcurl/mksymbolsmanpage.pl
index 21860a0..5a117d6 100755
--- a/docs/libcurl/mksymbolsmanpage.pl
+++ b/docs/libcurl/mksymbolsmanpage.pl
@@ -10,7 +10,7 @@
 # *
 # * This software is licensed as described in the file COPYING, which
 # * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
+# * are also available at https://curl.se/docs/copyright.html.
 # *
 # * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # * copies of the Software, and permit persons to whom the Software is
@@ -39,7 +39,7 @@
 .\\" *
 .\\" * This software is licensed as described in the file COPYING, which
 .\\" * you should have received as part of this distribution. The terms
-.\\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\\" * are also available at https://curl.se/docs/copyright.html.
 .\\" *
 .\\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\\" * copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/opts/CMakeLists.txt b/docs/libcurl/opts/CMakeLists.txt
index 98acedf..d003501 100644
--- a/docs/libcurl/opts/CMakeLists.txt
+++ b/docs/libcurl/opts/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3
index bd38d48..39c787a 100644
--- a/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3
+++ b/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_ACTIVESOCKET 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_ACTIVESOCKET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_ACTIVESOCKET \- get the active socket
diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3
index bd50055..55de8db 100644
--- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_APPCONNECT_TIME 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_APPCONNECT_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed
diff --git a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3
index 498053a..b97600e 100644
--- a/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_APPCONNECT_TIME_T 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_APPCONNECT_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_APPCONNECT_TIME_T \- get the time until the SSL/SSH handshake is completed
diff --git a/docs/libcurl/opts/CURLINFO_CERTINFO.3 b/docs/libcurl/opts/CURLINFO_CERTINFO.3
index f7be320..4d7e72d 100644
--- a/docs/libcurl/opts/CURLINFO_CERTINFO.3
+++ b/docs/libcurl/opts/CURLINFO_CERTINFO.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CERTINFO 3 "July 04, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CERTINFO 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CERTINFO \- get the TLS certificate chain
diff --git a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3
index 98d72d1..ba91ebd 100644
--- a/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3
+++ b/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONDITION_UNMET 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONDITION_UNMET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONDITION_UNMET \- get info on unmet time conditional or 304 HTTP response.
diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3
index bee7a2f..8de98f7 100644
--- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONNECT_TIME 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONNECT_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONNECT_TIME \- get the time until connect
diff --git a/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3 b/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3
index a924573..0a09e74 100644
--- a/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONNECT_TIME_T 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONNECT_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONNECT_TIME_T \- get the time until connect
diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3
index d01f107..e0ea8b6 100644
--- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download
diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3
index 6564728..8cd4636 100644
--- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3
+++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONTENT_LENGTH_DOWNLOAD_T \- get content-length of download
diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
index ab45f58..dd90261 100644
--- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload
diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3
index e562e80..a2ec4c8 100644
--- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3
+++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONTENT_LENGTH_UPLOAD_T \- get the specified size of the upload
diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3
index 6a739d6..189f0db 100644
--- a/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3
+++ b/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_CONTENT_TYPE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_CONTENT_TYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_CONTENT_TYPE \- get Content-Type
diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 b/docs/libcurl/opts/CURLINFO_COOKIELIST.3
index 4ce9ba3..2f1aa27 100644
--- a/docs/libcurl/opts/CURLINFO_COOKIELIST.3
+++ b/docs/libcurl/opts/CURLINFO_COOKIELIST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_COOKIELIST 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_COOKIELIST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_COOKIELIST \- get all known cookies
diff --git a/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3 b/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3
index 36cf621..3a587e0 100644
--- a/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3
+++ b/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_EFFECTIVE_METHOD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_EFFECTIVE_METHOD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_EFFECTIVE_METHOD \- get the last used HTTP method
diff --git a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3
index a3066ef..3bea12f 100644
--- a/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3
+++ b/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_EFFECTIVE_URL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_EFFECTIVE_URL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_EFFECTIVE_URL \- get the last used URL
diff --git a/docs/libcurl/opts/CURLINFO_FILETIME.3 b/docs/libcurl/opts/CURLINFO_FILETIME.3
index 04185bb..ea95421 100644
--- a/docs/libcurl/opts/CURLINFO_FILETIME.3
+++ b/docs/libcurl/opts/CURLINFO_FILETIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_FILETIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_FILETIME \- get the remote time of the retrieved document
diff --git a/docs/libcurl/opts/CURLINFO_FILETIME_T.3 b/docs/libcurl/opts/CURLINFO_FILETIME_T.3
index 4d3556a..185fc26 100644
--- a/docs/libcurl/opts/CURLINFO_FILETIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_FILETIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_FILETIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_FILETIME_T \- get the remote time of the retrieved document
diff --git a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3
index c38dc54..4e534a7 100644
--- a/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3
+++ b/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_FTP_ENTRY_PATH 3 "May 06, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_FTP_ENTRY_PATH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server
diff --git a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3
index 71aa2d9..8c0fd6f 100644
--- a/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3
+++ b/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_HEADER_SIZE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_HEADER_SIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_HEADER_SIZE \- get size of retrieved headers
diff --git a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3
index 0dadef4..68a8983 100644
--- a/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3
+++ b/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_HTTPAUTH_AVAIL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_HTTPAUTH_AVAIL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods
diff --git a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3
index 68e2b98..d6d2f11 100644
--- a/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3
+++ b/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_HTTP_CONNECTCODE 3 "May 06, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_HTTP_CONNECTCODE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code
diff --git a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3
index 8600f64..48127c6 100644
--- a/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3
+++ b/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_HTTP_VERSION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_HTTP_VERSION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_HTTP_VERSION \- get the http version used in the connection
diff --git a/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 b/docs/libcurl/opts/CURLINFO_LASTSOCKET.3
index 9e436a1..83f9ad5 100644
--- a/docs/libcurl/opts/CURLINFO_LASTSOCKET.3
+++ b/docs/libcurl/opts/CURLINFO_LASTSOCKET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_LASTSOCKET 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_LASTSOCKET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_LASTSOCKET \- get the last socket used
diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 b/docs/libcurl/opts/CURLINFO_LOCAL_IP.3
index f336c40..898e261 100644
--- a/docs/libcurl/opts/CURLINFO_LOCAL_IP.3
+++ b/docs/libcurl/opts/CURLINFO_LOCAL_IP.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_LOCAL_IP 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_LOCAL_IP 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_LOCAL_IP \- get local IP address of last connection
diff --git a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3
index 5e690c7..93cce5f 100644
--- a/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3
+++ b/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_LOCAL_PORT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_LOCAL_PORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_LOCAL_PORT \- get the latest local port number
diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3
index 40e936e..18423a6 100644
--- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_NAMELOOKUP_TIME 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_NAMELOOKUP_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_NAMELOOKUP_TIME \- get the name lookup time
diff --git a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3
index 833991a..34b0139 100644
--- a/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_NAMELOOKUP_TIME_T 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_NAMELOOKUP_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_NAMELOOKUP_TIME_T \- get the name lookup time in microseconds
diff --git a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3
index 96f7d5f..b29bb9a 100644
--- a/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3
+++ b/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_NUM_CONNECTS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_NUM_CONNECTS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_NUM_CONNECTS \- get number of created connections
diff --git a/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 b/docs/libcurl/opts/CURLINFO_OS_ERRNO.3
index ef58727..461cf4f 100644
--- a/docs/libcurl/opts/CURLINFO_OS_ERRNO.3
+++ b/docs/libcurl/opts/CURLINFO_OS_ERRNO.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_OS_ERRNO 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_OS_ERRNO 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_OS_ERRNO \- get errno number from last connect failure
diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3
index 97f7d43..e6dbb12 100644
--- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PRETRANSFER_TIME 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PRETRANSFER_TIME 3 "January 14, 2021" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start
@@ -30,10 +30,11 @@
 CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRETRANSFER_TIME, double *timep);
 .SH DESCRIPTION
 Pass a pointer to a double to receive the time, in seconds, it took from the
-start until the file transfer is just about to begin. This includes all
-pre-transfer commands and negotiations that are specific to the particular
-protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
-specific request that triggers a transfer.
+start until the file transfer is just about to begin.
+
+This time-stamp includes all pre-transfer commands and negotiations that are
+specific to the particular protocol(s) involved. It includes the sending of
+the protocol- specific protocol instructions that triggers a transfer.
 
 When a redirect is followed, the time from each request is added together.
 
diff --git a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3 b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3
index ecbd4f4..4b7530f 100644
--- a/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PRETRANSFER_TIME_T 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PRETRANSFER_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PRETRANSFER_TIME_T \- get the time until the file transfer start
diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3
index f78097b..e110ca1 100644
--- a/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3
+++ b/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PRIMARY_IP 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PRIMARY_IP 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PRIMARY_IP \- get IP address of last connection
diff --git a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3
index 622cb99..eae2353 100644
--- a/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3
+++ b/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PRIMARY_PORT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PRIMARY_PORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PRIMARY_PORT \- get the latest destination port number
diff --git a/docs/libcurl/opts/CURLINFO_PRIVATE.3 b/docs/libcurl/opts/CURLINFO_PRIVATE.3
index 3373922..74714ba 100644
--- a/docs/libcurl/opts/CURLINFO_PRIVATE.3
+++ b/docs/libcurl/opts/CURLINFO_PRIVATE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PRIVATE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PRIVATE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PRIVATE \- get the private pointer
diff --git a/docs/libcurl/opts/CURLINFO_PROTOCOL.3 b/docs/libcurl/opts/CURLINFO_PROTOCOL.3
index cecf679..d24c013 100644
--- a/docs/libcurl/opts/CURLINFO_PROTOCOL.3
+++ b/docs/libcurl/opts/CURLINFO_PROTOCOL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PROTOCOL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PROTOCOL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PROTOCOL \- get the protocol used in the connection
diff --git a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3
index 5b8da3d..8d38b9d 100644
--- a/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3
+++ b/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PROXYAUTH_AVAIL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PROXYAUTH_AVAIL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods
diff --git a/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3 b/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3
index 5d95a43..6da00a0 100644
--- a/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3
+++ b/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PROXY_ERROR 3 "August 24, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PROXY_ERROR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PROXY_ERROR \- get the detailed (SOCKS) proxy error
diff --git a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3
index c48e6ba..5eec425 100644
--- a/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3
+++ b/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification
diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3
index bf88f44..297aa11 100644
--- a/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3
+++ b/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_REDIRECT_COUNT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_REDIRECT_COUNT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_REDIRECT_COUNT \- get the number of redirects
diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3
index 5748f16..b8b6cb7 100644
--- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_REDIRECT_TIME 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_REDIRECT_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_REDIRECT_TIME \- get the time for all redirection steps
diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3
index ca87a6f..f466fec 100644
--- a/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_REDIRECT_TIME_T 3 "May 17, 2018" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_REDIRECT_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_REDIRECT_TIME_T \- get the time for all redirection steps
diff --git a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3
index 8d3f917..7c15479 100644
--- a/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3
+++ b/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_REDIRECT_URL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_REDIRECT_URL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_REDIRECT_URL \- get the URL a redirect would go to
diff --git a/docs/libcurl/opts/CURLINFO_REFERER.3 b/docs/libcurl/opts/CURLINFO_REFERER.3
new file mode 100644
index 0000000..3febff1
--- /dev/null
+++ b/docs/libcurl/opts/CURLINFO_REFERER.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLINFO_REFERER 3 "February 19, 2021" "libcurl 7.78.0" "curl_easy_getinfo options"
+
+.SH NAME
+CURLINFO_REFERER \- get the referrer header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REFERER, char **hdrp);
+.SH DESCRIPTION
+Pass in a pointer to a char pointer and get the referrer header.
+
+The \fBhdrp\fP pointer will be NULL or pointing to private memory you MUST NOT
+free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
+corresponding CURL handle.
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  CURLcode res;
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+  curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
+  res = curl_easy_perform(curl);
+  if(res == CURLE_OK) {
+    char *hdr = NULL;
+    curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
+    if(hdr)
+      printf("Referrer header: %s\\n", hdr);
+  }
+  curl_easy_cleanup(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.76.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
+.BR CURLOPT_REFERER "(3), "
diff --git a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3
index af83f1e..7dac290 100644
--- a/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3
+++ b/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_REQUEST_SIZE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_REQUEST_SIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_REQUEST_SIZE \- get size of sent request
diff --git a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3
index 649f9d6..fe86b25 100644
--- a/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3
+++ b/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_RESPONSE_CODE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_RESPONSE_CODE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_RESPONSE_CODE \- get the last response code
diff --git a/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3 b/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3
index 8ad9e56..185fb98 100644
--- a/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3
+++ b/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_RETRY_AFTER 3 "October 03, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_RETRY_AFTER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_RETRY_AFTER \- returns the Retry-After retry delay
diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3
index 4dfe53d..305273b 100644
--- a/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3
+++ b/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq
diff --git a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3
index 33edf44..75b26cf 100644
--- a/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3
+++ b/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_RTSP_CSEQ_RECV 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_RTSP_CSEQ_RECV 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq
diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3
index dd3f0de..175db73 100644
--- a/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3
+++ b/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_RTSP_SERVER_CSEQ 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq
diff --git a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3
index 2467209..b77e38e 100644
--- a/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3
+++ b/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_RTSP_SESSION_ID 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_RTSP_SESSION_ID \- get RTSP session ID
diff --git a/docs/libcurl/opts/CURLINFO_SCHEME.3 b/docs/libcurl/opts/CURLINFO_SCHEME.3
index ed10154..bc64958 100644
--- a/docs/libcurl/opts/CURLINFO_SCHEME.3
+++ b/docs/libcurl/opts/CURLINFO_SCHEME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SCHEME 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SCHEME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SCHEME \- get the URL scheme (sometimes called protocol) used in the connection
diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3
index db5763a..5076a98 100644
--- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SIZE_DOWNLOAD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SIZE_DOWNLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes
diff --git a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3
index 8efd0a8..2c414ae 100644
--- a/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3
+++ b/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SIZE_DOWNLOAD_T 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SIZE_DOWNLOAD_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SIZE_DOWNLOAD_T \- get the number of downloaded bytes
diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3
index 3f2bd19..6232e8d 100644
--- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SIZE_UPLOAD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SIZE_UPLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes
diff --git a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3
index bc639dd..ca2c79e 100644
--- a/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3
+++ b/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SIZE_UPLOAD_T 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SIZE_UPLOAD_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SIZE_UPLOAD_T \- get the number of uploaded bytes
diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3
index e8a78d5..981ddde 100644
--- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SPEED_DOWNLOAD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SPEED_DOWNLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SPEED_DOWNLOAD \- get download speed
diff --git a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3
index 9a9f66a..813f2ed 100644
--- a/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3
+++ b/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SPEED_DOWNLOAD_T 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SPEED_DOWNLOAD_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SPEED_DOWNLOAD_T \- get download speed
diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3
index fccc1ce..697fce7 100644
--- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SPEED_UPLOAD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SPEED_UPLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SPEED_UPLOAD \- get upload speed
diff --git a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3
index 7590497..b910e09 100644
--- a/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3
+++ b/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SPEED_UPLOAD_T 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SPEED_UPLOAD_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SPEED_UPLOAD_T \- get upload speed
diff --git a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3
index 6cccb93..29ee9b9 100644
--- a/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3
+++ b/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SSL_ENGINES 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SSL_ENGINES 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines
diff --git a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3
index 2ab59be..8e0e5a1 100644
--- a/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3
+++ b/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_SSL_VERIFYRESULT 3 "May 02, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_SSL_VERIFYRESULT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_SSL_VERIFYRESULT \- get the result of the certificate verification
diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3
index e0407fd..1e5452a 100644
--- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_STARTTRANSFER_TIME 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_STARTTRANSFER_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received
diff --git a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3 b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3
index 972ebe3..a153777 100644
--- a/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_STARTTRANSFER_TIME_T 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_STARTTRANSFER_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_STARTTRANSFER_TIME_T \- get the time until the first byte is received
diff --git a/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 b/docs/libcurl/opts/CURLINFO_TLS_SESSION.3
index 05c88e1..3b2ce7b 100644
--- a/docs/libcurl/opts/CURLINFO_TLS_SESSION.3
+++ b/docs/libcurl/opts/CURLINFO_TLS_SESSION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_TLS_SESSION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_TLS_SESSION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_TLS_SESSION \- get TLS session info
diff --git a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3
index a74e519..abe31a1 100644
--- a/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3
+++ b/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_TLS_SSL_PTR 3 "August 07, 2020" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_TLS_SSL_PTR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_TLS_SESSION, CURLINFO_TLS_SSL_PTR \- get TLS session info
diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3
index 13f84ee..f1da089 100644
--- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3
+++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_TOTAL_TIME 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_TOTAL_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_TOTAL_TIME \- get total time of previous transfer
diff --git a/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 b/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3
index a96148c..55f6e5f 100644
--- a/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3
+++ b/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLINFO_TOTAL_TIME_T 3 "August 26, 2019" "libcurl 7.73.0" "curl_easy_getinfo options"
+.TH CURLINFO_TOTAL_TIME_T 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_getinfo options"
 
 .SH NAME
 CURLINFO_TOTAL_TIME_T \- get total time of previous transfer in microseconds
diff --git a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
index 6971263..1299ea2 100644
--- a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
+++ b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "April 05, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining
diff --git a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
index c2728ea..17e60a2 100644
--- a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
+++ b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "April 05, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty
diff --git a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
index 6420cff..4dfee71 100644
--- a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
+++ b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_MAXCONNECTS 3 "March 23, 2020" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_MAXCONNECTS 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_MAXCONNECTS \- set size of connection cache
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3 b/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3
index 99cd86c..82392fc 100644
--- a/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3
+++ b/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_MAX_CONCURRENT_STREAMS 3 "06 Nov 2019" "libcurl 7.67.0" "curl_multi_setopt options"
+.TH CURLMOPT_MAX_CONCURRENT_STREAMS 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
+
 .SH NAME
 CURLMOPT_MAX_CONCURRENT_STREAMS \- set max concurrent streams for http2
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
index d825dc8..0974c5d 100644
--- a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
+++ b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "May 27, 2017" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "March 17, 2021" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host
@@ -45,6 +45,15 @@
 
 This set limit is also used for proxy connections, and then the proxy is
 considered to be the host for which this limit counts.
+
+When more transfers are added to the multi handle than what can be performed
+due to the set limit, they will be queued up waiting for their chance. When
+that happens, the \fICURLOPT_TIMEOUT_MS(3)\fP timeout will be counted
+inclusive of the waiting time, meaning that if you set a too narrow timeout in
+such a case the transfer might never even start before it times out.
+
+Even in the queued up situation, the \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
+timeout is however treated as a per-connect timeout.
 .SH DEFAULT
 0
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
index dc97a65..c4e1a47 100644
--- a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
+++ b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "April 05, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
index a616bdb..9d1cacd 100644
--- a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
+++ b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "May 27, 2017" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "March 17, 2021" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections
@@ -35,7 +35,16 @@
 limit set by \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP. When the limit is
 reached, the sessions will be pending until there are available
 connections. If \fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to
-pipeline or use multiplexing if the host is capable of it.
+use multiplexing if the host is capable of it.
+
+When more transfers are added to the multi handle than what can be performed
+due to the set limit, they will be queued up waiting for their chance. When
+that happens, the \fICURLOPT_TIMEOUT_MS(3)\fP timeout will be counted
+inclusive of the waiting time, meaning that if you set a too narrow timeout in
+such a case the transfer might never even start before it times out.
+
+Even in the queued up situation, the \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
+timeout is however treated as a per-connect timeout.
 .SH DEFAULT
 The default value is 0, which means that there is no limit. It is then simply
 controlled by the number of easy handles added.
diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING.3
index d8f1475..ee8db98 100644
--- a/docs/libcurl/opts/CURLMOPT_PIPELINING.3
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_PIPELINING 3 "April 05, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_PIPELINING 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_PIPELINING \- enable HTTP pipelining and multiplexing
diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
index 8982359..cd6a694 100644
--- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_PIPELINING_SERVER_BL 3 "June 09, 2020" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_PIPELINING_SERVER_BL 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_PIPELINING_SERVER_BL \- pipelining server block list
diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
index 1cc3da3..9b5d908 100644
--- a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_PIPELINING_SITE_BL 3 "June 09, 2020" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_PIPELINING_SITE_BL 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_PIPELINING_SITE_BL \- pipelining host block list
diff --git a/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 b/docs/libcurl/opts/CURLMOPT_PUSHDATA.3
index 50d9291..54797b0 100644
--- a/docs/libcurl/opts/CURLMOPT_PUSHDATA.3
+++ b/docs/libcurl/opts/CURLMOPT_PUSHDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_PUSHDATA 3 "May 27, 2017" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_PUSHDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_PUSHDATA \- pointer to pass to push callback
diff --git a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3
index ca46813..8925841 100644
--- a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3
+++ b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_PUSHFUNCTION 3 "July 16, 2020" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_PUSHFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes
diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
index e547e9e..e2d5bbd 100644
--- a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_SOCKETDATA 3 "May 31, 2017" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_SOCKETDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback
diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
index 5cfcad9..d1a34ee 100644
--- a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_SOCKETFUNCTION 3 "June 24, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_SOCKETFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
diff --git a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
index 72d2326..e3d7aee 100644
--- a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
+++ b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_TIMERDATA 3 "May 27, 2017" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_TIMERDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback
diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
index 4498c24..4b9b448 100644
--- a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
+++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLMOPT_TIMERFUNCTION 3 "May 03, 2019" "libcurl 7.73.0" "curl_multi_setopt options"
+.TH CURLMOPT_TIMERFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_multi_setopt options"
 
 .SH NAME
 CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values
diff --git a/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 b/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3
index 85ddd2b..a74ce6b 100644
--- a/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3
+++ b/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket
diff --git a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
index bb436fe..f9e8236 100644
--- a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
+++ b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "March 06, 2016" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
index 0e2d370..1cf927d 100644
--- a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
+++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ACCEPT_ENCODING 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ACCEPT_ENCODING 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads
diff --git a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
index 13de8f0..0acd0b0 100644
--- a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
+++ b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ADDRESS_SCOPE 3 "March 07, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ADDRESS_SCOPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ADDRESS_SCOPE \- set scope id for IPv6 addresses
diff --git a/docs/libcurl/opts/CURLOPT_ALTSVC.3 b/docs/libcurl/opts/CURLOPT_ALTSVC.3
index f229e8b..263591e 100644
--- a/docs/libcurl/opts/CURLOPT_ALTSVC.3
+++ b/docs/libcurl/opts/CURLOPT_ALTSVC.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ALTSVC 3 "August 14, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ALTSVC 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ALTSVC \- set alt-svc cache file name
@@ -30,11 +30,6 @@
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC, char *filename);
 .fi
-.SH EXPERIMENTAL
-Warning: this feature is early code and is marked as experimental. It can only
-be enabled by explicitly telling configure with \fB--enable-alt-svc\fP. You are
-advised to not ship this in production before the experimental label is
-removed.
 .SH DESCRIPTION
 Pass in a pointer to a \fIfilename\fP to instruct libcurl to use that file as
 the Alt-Svc cache to read existing cache contents from and possibly also write
diff --git a/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3 b/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3
index a14737d..9586824 100644
--- a/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3
+++ b/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ALTSVC_CTRL 3 "February 11, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ALTSVC_CTRL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ALTSVC_CTRL \- control alt-svc behavior
@@ -28,7 +28,6 @@
 .nf
 #include <curl/curl.h>
 
-#define CURLALTSVC_IMMEDIATELY  (1<<0)
 #define CURLALTSVC_READONLYFILE (1<<2)
 #define CURLALTSVC_H1           (1<<3)
 #define CURLALTSVC_H2           (1<<4)
@@ -36,11 +35,6 @@
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC_CTRL, long bitmask);
 .fi
-.SH EXPERIMENTAL
-Warning: this feature is early code and is marked as experimental. It can only
-be enabled by explicitly telling configure with \fB--enable-alt-svc\fP. You are
-advised to not ship this in production before the experimental label is
-removed.
 .SH DESCRIPTION
 Populate the long \fIbitmask\fP with the correct set of features to instruct
 libcurl how to handle Alt-Svc for the transfers using this handle.
@@ -51,10 +45,6 @@
 sure both the source and the destination are legitimate.
 
 Setting any bit will enable the alt-svc engine.
-.IP "CURLALTSVC_IMMEDIATELY"
-If an Alt-Svc: header is received, this instructs libcurl to switch to one of
-those alternatives asap rather than to save it and use for the next
-request. (Not currently supported).
 .IP "CURLALTSVC_READONLYFILE"
 Do not write the alt-svc cache back to the file specified with
 \fICURLOPT_ALTSVC(3)\fP even if it gets updated. By default a file specified
diff --git a/docs/libcurl/opts/CURLOPT_APPEND.3 b/docs/libcurl/opts/CURLOPT_APPEND.3
index 8f0724e..09b04cc 100644
--- a/docs/libcurl/opts/CURLOPT_APPEND.3
+++ b/docs/libcurl/opts/CURLOPT_APPEND.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_APPEND 3 "March 06, 2016" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_APPEND 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_APPEND \- enable appending to the remote file
diff --git a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
index c020fe1..75f46c1 100644
--- a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
+++ b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_AUTOREFERER 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_AUTOREFERER 3 "March 30, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_AUTOREFERER \- automatically update the referer header
@@ -30,8 +30,8 @@
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AUTOREFERER, long autorefer);
 .SH DESCRIPTION
 Pass a parameter set to 1 to enable this. When enabled, libcurl will
-automatically set the Referer: header field in HTTP requests where it follows
-a Location: redirect.
+automatically set the Referer: header field in HTTP requests to the full URL
+where it follows a Location: redirect.
 .SH DEFAULT
 0, disabled
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLOPT_AWS_SIGV4.3 b/docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
new file mode 100644
index 0000000..40dbd00
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
@@ -0,0 +1,98 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_AWS_SIGV4 3 "January 25, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_AWS_SIGV4 \- V4 signature
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AWS_SIGV4, char *param);
+.fi
+.SH DESCRIPTION
+Provides AWS V4 signature authentication on HTTP(S) header.
+.PP
+Pass a char * that is the collection of specific arguments are used for
+creating outgoing authentication headers.
+The format of the param option is:
+.IP provider1[:provider2[:region[:service]]]
+.IP provider1,\ provider2
+The providers arguments are used for generating some authentication parameters
+such as "Algorithm", "date", "request type" and "signed headers".
+.IP region
+The argument is a geographic area of a resources collection.
+It is extracted from the host name specified in the URL if omitted.
+.IP service
+The argument is a function provided by a cloud.
+It is extracted from the host name specified in the URL if omitted.
+.PP
+NOTE: This call set \fICURLOPT_HTTPAUTH(3)\fP to CURLAUTH_AWS_SIGV4.
+Calling \fICURLOPT_HTTPAUTH(3)\fP with CURLAUTH_AWS_SIGV4 is the same
+as calling this with "aws:amz" in parameter.
+.PP
+Example with "Test:Try", when curl will do the algorithm, it will generate
+"TEST-HMAC-SHA256" for "Algorithm", "x-try-date" and "X-Try-Date" for "date",
+"test4_request" for "request type",
+"SignedHeaders=content-type;host;x-try-date" for "signed headers"
+.PP
+If you use just "test", instead of "test:try",
+test will be use for every strings generated
+.SH DEFAULT
+By default, the value of this parameter is NULL.
+Calling \fICURLOPT_HTTPAUTH(3)\fP with CURLAUTH_AWS_SIGV4 is the same
+as calling this with "aws:amz" in parameter.
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+
+struct curl_slist *list = NULL;
+
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL,
+                  "https://service.region.example.com/uri");
+  curl_easy_setopt(c, CURLOPT_AWS_SIGV4, "provider1:provider2");
+
+  /* service and region also could be set in CURLOPT_AWS_SIGV4 */
+  /*
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/uri");
+  curl_easy_setopt(c, CURLOPT_AWS_SIGV4,
+                   "provider1:provider2:region:service");
+  */
+
+  curl_easy_setopt(c, CURLOPT_USERPWD, "MY_ACCESS_KEY:MY_SECRET_KEY");
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.75.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH NOTES
+This option overrides the other auth types you might have set in CURL_HTTPAUTH
+which should be highlighted as this makes this auth method special.
+This method can't be combined with other auth types.
+.SH "SEE ALSO"
+.BR CURLOPT_HEADEROPT "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
index 70bea72..6408ffc 100644
--- a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
+++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2017, 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_BUFFERSIZE 3 "May 13, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_BUFFERSIZE 3 "May 06, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_BUFFERSIZE \- set preferred receive buffer size
@@ -40,6 +40,9 @@
 This buffer size is by default \fICURL_MAX_WRITE_SIZE\fP (16kB). The maximum
 buffer size allowed to be set is \fICURL_MAX_READ_SIZE\fP (512kB). The minimum
 buffer size allowed to be set is 1024.
+
+DO NOT set this option on a handle that is currently used for an active
+transfer as that may lead to unintended consequences.
 .SH DEFAULT
 CURL_MAX_WRITE_SIZE (16kB)
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLOPT_CAINFO.3 b/docs/libcurl/opts/CURLOPT_CAINFO.3
index a3b5719..a1d7b61 100644
--- a/docs/libcurl/opts/CURLOPT_CAINFO.3
+++ b/docs/libcurl/opts/CURLOPT_CAINFO.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CAINFO 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CAINFO 3 "July 13, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle
@@ -80,5 +80,5 @@
 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 .SH "SEE ALSO"
-.BR CURLOPT_CAPATH "(3), "
+.BR CURLOPT_CAINFO_BLOB "(3), " CURLOPT_CAPATH "(3), "
 .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.3 b/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.3
new file mode 100644
index 0000000..5a3f34f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.3
@@ -0,0 +1,69 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_CAINFO_BLOB 3 "July 13, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_CAINFO_BLOB \- Certificate Authority (CA) bundle in PEM format
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO_BLOB, struct curl_blob *stblob);
+.SH DESCRIPTION
+Pass a pointer to a curl_blob structure, which contains information (pointer
+and size) about a memory block with binary data of PEM encoded content holding
+one or more certificates to verify the HTTPS server with.
+
+If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
+server's certificate, \fICURLOPT_CAINFO_BLOB(3)\fP is not needed.
+
+This option overrides \fICURLOPT_CAINFO(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
+.SH EXAMPLE
+.nf
+char *strpem; /* strpem must point to a PEM string */
+CURL *curl = curl_easy_init();
+if(curl) {
+  struct curl_blob blob;
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
+  blob.data = strpem;
+  blob.len = strlen(strpem);
+  blob.flags = CURL_BLOB_COPY;
+  curl_easy_setopt(curl, CURLOPT_CAINFO_BLOB, &blob);
+  ret = curl_easy_perform(curl);
+  curl_easy_cleanup(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.77.0.
+
+This option is supported by the OpenSSL, Secure
+Transport and Schannel backends.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_CAINFO "(3), " CURLOPT_CAPATH "(3), "
+.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3
index 00c7d62..d0028fb 100644
--- a/docs/libcurl/opts/CURLOPT_CAPATH.3
+++ b/docs/libcurl/opts/CURLOPT_CAPATH.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CAPATH 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CAPATH 3 "May 14, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CAPATH \- specify directory holding CA certificates
@@ -41,7 +41,7 @@
 The application does not have to keep the string around after setting this
 option.
 .SH DEFAULT
-NULL
+A default path detected at build time.
 .SH PROTOCOLS
 All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
 .SH EXAMPLE
diff --git a/docs/libcurl/opts/CURLOPT_CERTINFO.3 b/docs/libcurl/opts/CURLOPT_CERTINFO.3
index d406c71..46c09fb 100644
--- a/docs/libcurl/opts/CURLOPT_CERTINFO.3
+++ b/docs/libcurl/opts/CURLOPT_CERTINFO.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CERTINFO 3 "January 29, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CERTINFO 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CERTINFO \- request SSL certificate information
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
index a49568d..c821fc6 100644
--- a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "May 03, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
index c92002c..a736f81 100644
--- a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CHUNK_DATA 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CHUNK_DATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
index c680aec..bc6bf09 100644
--- a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CHUNK_END_FUNCTION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CHUNK_END_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch
diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
index 4399b39..71a027f 100644
--- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
+++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CLOSESOCKETDATA 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CLOSESOCKETDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback
diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
index a5c16a9..3090446 100644
--- a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CLOSESOCKETFUNCTION 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CLOSESOCKETFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function
diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
index f63fd30..de2c738 100644
--- a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
+++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONNECTTIMEOUT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONNECTTIMEOUT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase
diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
index 03c4109..87dc23a 100644
--- a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
+++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONNECTTIMEOUT_MS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONNECTTIMEOUT_MS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase
diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
index 60ca535..dfea371 100644
--- a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
+++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONNECT_ONLY 3 "February 18, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONNECT_ONLY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONNECT_ONLY \- stop when connected to target server
diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3
index ecf3d42..a9b5709 100644
--- a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3
+++ b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONNECT_TO 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONNECT_TO 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONNECT_TO \- Connect to a specific host and port instead of the URL's host and port
diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
index 3d23dec..77961ba 100644
--- a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding
diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
index 8fd45af..ed37268 100644
--- a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding
diff --git a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
index fb682b2..055439c 100644
--- a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding
diff --git a/docs/libcurl/opts/CURLOPT_COOKIE.3 b/docs/libcurl/opts/CURLOPT_COOKIE.3
index c169efa..5581038 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIE.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_COOKIE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COOKIE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_COOKIE \- set contents of HTTP Cookie header
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
index fc4bf93..c720e79 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_COOKIEFILE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COOKIEFILE 3 "May 16, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_COOKIEFILE \- file name to read cookies from
@@ -45,19 +45,19 @@
 This option only \fBreads\fP cookies. To make libcurl write cookies to file,
 see \fICURLOPT_COOKIEJAR(3)\fP.
 
-Exercise caution if you are using this option and multiple transfers may occur.
-If you use the Set-Cookie format and don't specify a domain then the cookie is
-sent for any domain (even after redirects are followed) and cannot be modified
-by a server-set cookie. If a server sets a cookie of the same name then both
-will be sent on a future transfer to that server, likely not what you intended.
-To address these issues set a domain in Set-Cookie (doing that will include
-sub-domains) or use the Netscape format.
+If you use the Set-Cookie file format and don't specify a domain then the
+cookie is not sent since the domain will never match. To address this, set a
+domain in Set-Cookie line (doing that will include sub-domains) or preferably:
+use the Netscape format.
 
 If you use this option multiple times, you just add more files to read.
 Subsequent files will add more cookies.
 
 The application does not have to keep the string around after setting this
 option.
+
+Setting this option to NULL will (since 7.77.0) explicitly disable the cookie
+engine and clear the list of files to read cookies from.
 .SH DEFAULT
 NULL
 .SH PROTOCOLS
@@ -79,7 +79,7 @@
 .SH "Cookie file format"
 The cookie file format and general cookie concepts in curl are described in
 the HTTP-COOKIES.md file, also hosted online here:
-https://curl.haxx.se/docs/http-cookies.html
+https://curl.se/docs/http-cookies.html
 .SH AVAILABILITY
 As long as HTTP is supported
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
index c5c4294..70d2fa4 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_COOKIEJAR 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COOKIEJAR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_COOKIEJAR \- file name to store cookies to
diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
index 007baf5..84b02ed 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIELIST.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_COOKIELIST 3 "January 10, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COOKIELIST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory
@@ -108,7 +108,7 @@
 .SH "Cookie file format"
 The cookie file format and general cookie concepts in curl are described in
 the HTTP-COOKIES.md file, also hosted online here:
-https://curl.haxx.se/docs/http-cookies.html
+https://curl.se/docs/http-cookies.html
 .SH AVAILABILITY
 ALL was added in 7.14.1
 
diff --git a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
index d3a57b0..dde63f5 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_COOKIESESSION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COOKIESESSION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_COOKIESESSION \- start a new cookie session
diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
index 98be432..d1dbdbb 100644
--- a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
+++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_COPYPOSTFIELDS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_COPYPOSTFIELDS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST
diff --git a/docs/libcurl/opts/CURLOPT_CRLF.3 b/docs/libcurl/opts/CURLOPT_CRLF.3
index 8a5912f..0d276a6 100644
--- a/docs/libcurl/opts/CURLOPT_CRLF.3
+++ b/docs/libcurl/opts/CURLOPT_CRLF.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CRLF 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CRLF 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CRLF \- enable/disable CRLF conversion
diff --git a/docs/libcurl/opts/CURLOPT_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_CRLFILE.3
index b8995d2..c896f0c 100644
--- a/docs/libcurl/opts/CURLOPT_CRLFILE.3
+++ b/docs/libcurl/opts/CURLOPT_CRLFILE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CRLFILE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CRLFILE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CRLFILE \- specify a Certificate Revocation List file
diff --git a/docs/libcurl/opts/CURLOPT_CURLU.3 b/docs/libcurl/opts/CURLOPT_CURLU.3
index d5e1d7f..7f23da1 100644
--- a/docs/libcurl/opts/CURLOPT_CURLU.3
+++ b/docs/libcurl/opts/CURLOPT_CURLU.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CURLU 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CURLU 3 "February 21, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CURLU \- set URL with CURLU *
@@ -68,3 +68,4 @@
 .SH "SEE ALSO"
 .BR CURLOPT_URL "(3), "
 .BR curl_url "(3), " curl_url_get "(3), " curl_url_set "(3), "
+.BR curl_url_dup "(3), " curl_url_cleanup "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
index 77da01b..40b649d 100644
--- a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
+++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_CUSTOMREQUEST 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_CUSTOMREQUEST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_CUSTOMREQUEST \- custom string for request
diff --git a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
index 1a6e8f5..284e93a 100644
--- a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
+++ b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DEBUGDATA 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DEBUGDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DEBUGDATA \- custom pointer for debug callback
@@ -37,7 +37,7 @@
 .SH PROTOCOLS
 All
 .SH EXAMPLE
-https://curl.haxx.se/libcurl/c/debug.html
+https://curl.se/libcurl/c/debug.html
 .SH AVAILABILITY
 Always
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
index 9b6f984..1fdff77 100644
--- a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DEBUGFUNCTION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DEBUGFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DEBUGFUNCTION \- debug callback
diff --git a/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 b/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3
index 3a2c33d..2c3fdcb 100644
--- a/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3
+++ b/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DEFAULT_PROTOCOL 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DEFAULT_PROTOCOL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DEFAULT_PROTOCOL \- default protocol to use if the URL is missing a
diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
index ad496d7..74e615e 100644
--- a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
+++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DIRLISTONLY 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DIRLISTONLY 3 "December 31, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DIRLISTONLY \- ask for names only in a directory listing
@@ -34,7 +34,7 @@
 that would normally include file sizes, dates etc.
 
 For POP3 a parameter of 1 tells the library to list the email message or
-messages on the POP3 server. This can be used to change the default behaviour
+messages on the POP3 server. This can be used to change the default behavior
 of libcurl, when combined with a URL that contains a message ID, to perform a
 "scan listing" which can then be used to determine the size of an email.
 
diff --git a/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 b/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3
index 0a00131..61b1902 100644
--- a/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3
+++ b/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DISALLOW_USERNAME_IN_URL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DISALLOW_USERNAME_IN_URL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DISALLOW_USERNAME_IN_URL \- disallow specifying username in the url
diff --git a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
index db2d648..6ba426f 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries
diff --git a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
index a675ca8..2d565c8 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_INTERFACE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_INTERFACE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_INTERFACE \- set interface to speak DNS over
diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
index 18f9a51..79144da 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_LOCAL_IP4 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_LOCAL_IP4 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to
diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
index 5acb8f6..42a1dce 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_LOCAL_IP6 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_LOCAL_IP6 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to
diff --git a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
index 7ad020b..d73fdf6 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_SERVERS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_SERVERS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_SERVERS \- set preferred DNS servers
diff --git a/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 b/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3
index 74011b4..7d2f71c 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_SHUFFLE_ADDRESSES 3 "March 17, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_SHUFFLE_ADDRESSES 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_SHUFFLE_ADDRESSES \- Shuffle addresses when a hostname returns more than one
diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
index c098a61..a682252 100644
--- a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
+++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "March 07, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache
@@ -30,7 +30,7 @@
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_USE_GLOBAL_CACHE,
                           long enable);
 .SH DESCRIPTION
-Has no function since 7.62.0. Do note use!
+Has no function since 7.62.0. Do not use!
 
 Pass a long. If the \fIenable\fP value is 1, it tells curl to use a global DNS
 cache that will survive between easy handle creations and deletions. This is
diff --git a/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYHOST.3
new file mode 100644
index 0000000..27efa2a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYHOST.3
@@ -0,0 +1,86 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_DOH_SSL_VERIFYHOST 3 "July 16, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_DOH_SSL_VERIFYHOST \- verify the host name in the DoH SSL certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DOH_SSL_VERIFYHOST, long verify);
+.SH DESCRIPTION
+Pass a long set to 2L as asking curl to \fIverify\fP the DoH (DNS-over-HTTPS)
+server's certificate name fields against the host name.
+
+This option is the DoH equivalent of \fICURLOPT_SSL_VERIFYHOST(3)\fP and
+only affects requests to the DoH server.
+
+When \fICURLOPT_DOH_SSL_VERIFYHOST(3)\fP is 2, the SSL certificate provided by
+the DoH server must indicate that the server name is the same as the server
+name to which you meant to connect to, or the connection fails.
+
+Curl considers the DoH server the intended one when the Common Name field or a
+Subject Alternate Name field in the certificate matches the host name in the
+DoH URL to which you told Curl to connect.
+
+When the \fIverify\fP value is set to 1L it is treated the same as 2L. However
+for consistency with the other VERIFYHOST options we suggest use 2 and not 1.
+
+When the \fIverify\fP value is set to 0L, the connection succeeds regardless of
+the names used in the certificate. Use that ability with caution!
+
+See also \fICURLOPT_DOH_SSL_VERIFYPEER(3)\fP to verify the digital signature
+of the DoH server certificate.  If libcurl is built against NSS and
+\fICURLOPT_DOH_SSL_VERIFYPEER(3)\fP is zero,
+\fICURLOPT_DOH_SSL_VERIFYHOST(3)\fP is also set to zero and cannot be
+overridden.
+.SH DEFAULT
+2
+.SH PROTOCOLS
+DoH
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+  curl_easy_setopt(curl, CURLOPT_DOH_URL, "https://cloudflare-dns.com/dns-query");
+
+  /* Disable host name verification of the DoH server */
+  curl_easy_setopt(curl, CURLOPT_DOH_SSL_VERIFYHOST, 0L);
+
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.76.0
+
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_DOH_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYPEER.3
new file mode 100644
index 0000000..79d4015
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYPEER.3
@@ -0,0 +1,97 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_DOH_SSL_VERIFYPEER 3 "July 16, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_DOH_SSL_VERIFYPEER \- verify the DoH SSL certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DOH_SSL_VERIFYPEER, long verify);
+.SH DESCRIPTION
+Pass a long as parameter set to 1L to enable or 0L to disable.
+
+This option tells curl to verify the authenticity of the DoH (DNS-over-HTTPS)
+server's certificate. A value of 1 means curl verifies; 0 (zero) means it
+doesn't.
+
+This option is the DoH equivalent of \fICURLOPT_SSL_VERIFYPEER(3)\fP and
+only affects requests to the DoH server.
+
+When negotiating a TLS or SSL connection, the server sends a certificate
+indicating its identity. Curl verifies whether the certificate is authentic,
+i.e. that you can trust that the server is who the certificate says it is.
+This trust is based on a chain of digital signatures, rooted in certification
+authority (CA) certificates you supply.  curl uses a default bundle of CA
+certificates (the path for that is determined at build time) and you can
+specify alternate certificates with the \fICURLOPT_CAINFO(3)\fP option
+or the \fICURLOPT_CAPATH(3)\fP option.
+
+When \fICURLOPT_DOH_SSL_VERIFYPEER(3)\fP is enabled, and the verification
+fails to prove that the certificate is authentic, the connection fails.  When
+the option is zero, the peer certificate verification succeeds regardless.
+
+Authenticating the certificate is not enough to be sure about the server. You
+typically also want to ensure that the server is the server you mean to be
+talking to.  Use \fICURLOPT_DOH_SSL_VERIFYHOST(3)\fP for that. The check
+that the host name in the certificate is valid for the host name you're
+connecting to is done independently of the
+\fICURLOPT_DOH_SSL_VERIFYPEER(3)\fP option.
+
+WARNING: disabling verification of the certificate allows bad guys to
+man-in-the-middle the communication without you knowing it. Disabling
+verification makes the communication insecure. Just having encryption on a
+transfer is not enough as you cannot be sure that you are communicating with
+the correct end-point.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+DoH
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+  curl_easy_setopt(curl, CURLOPT_DOH_URL, "https://cloudflare-dns.com/dns-query");
+
+  /* Disable certificate verification of the DoH server */
+  curl_easy_setopt(curl, CURLOPT_DOH_SSL_VERIFYPEER, 0L);
+
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.76.0
+
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_DOH_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_CAINFO "(3), "
+.BR CURLOPT_CAPATH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYSTATUS.3
new file mode 100644
index 0000000..f0ebca7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DOH_SSL_VERIFYSTATUS.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_DOH_SSL_VERIFYSTATUS 3 "July 16, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_DOH_SSL_VERIFYSTATUS \- verify the DoH SSL certificate's status
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DOH_SSL_VERIFYSTATUS, long verify);
+.SH DESCRIPTION
+Pass a long as parameter set to 1 to enable or 0 to disable.
+
+This option determines whether libcurl verifies the status of the DoH
+(DNS-over-HTTPS) server cert using the "Certificate Status Request" TLS
+extension (aka. OCSP stapling).
+
+This option is the DoH equivalent of \fICURLOPT_SSL_VERIFYSTATUS(3)\fP and
+only affects requests to the DoH server.
+
+Note that if this option is enabled but the server does not support the TLS
+extension, the verification will fail.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+DoH
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+  curl_easy_setopt(curl, CURLOPT_DOH_URL, "https://cloudflare-dns.com/dns-query");
+
+  /* Ask for OCSP stapling when verifying the DoH server */
+  curl_easy_setopt(curl, CURLOPT_DOH_SSL_VERIFYSTATUS, 1L);
+
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.76.0. This option is currently only supported by the OpenSSL, GnuTLS
+and NSS TLS backends.
+.SH RETURN VALUE
+Returns CURLE_OK if OCSP stapling is supported by the SSL backend, otherwise
+returns CURLE_NOT_BUILT_IN.
+.SH "SEE ALSO"
+.BR CURLOPT_DOH_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_DOH_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_SSL_VERIFYSTATUS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DOH_URL.3 b/docs/libcurl/opts/CURLOPT_DOH_URL.3
index 007f4c2..f06d471 100644
--- a/docs/libcurl/opts/CURLOPT_DOH_URL.3
+++ b/docs/libcurl/opts/CURLOPT_DOH_URL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_DOH_URL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_DOH_URL 3 "July 16, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_DOH_URL \- provide the DNS-over-HTTPS URL
@@ -29,7 +29,7 @@
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DOH_URL, char *URL);
 .SH DESCRIPTION
-Pass in a pointer to a \fIURL\fP for the DOH server to use for name
+Pass in a pointer to a \fIURL\fP for the DoH server to use for name
 resolving. The parameter should be a char * to a null-terminated string which
 must be URL-encoded in the following format: "https://host:port/path". It MUST
 specify a HTTPS URL.
@@ -40,13 +40,19 @@
 
 curl sends POST requests to the given DNS-over-HTTPS URL.
 
-To find the DOH server itself, which might be specified using a name, libcurl
+To find the DoH server itself, which might be specified using a name, libcurl
 will use the default name lookup function. You can bootstrap that by providing
-the address for the DOH server with \fICURLOPT_RESOLVE(3)\fP.
+the address for the DoH server with \fICURLOPT_RESOLVE(3)\fP.
 
-Disable DOH use again by setting this option to NULL.
+Disable DoH use again by setting this option to NULL.
+
+\fBAdvanced:\fP The DoH lookups use SSL so some SSL settings from your transfer
+are inherited. The hostname and peer certificate verification settings are not
+inherited and can be controlled separately via
+\fICURLOPT_DOH_SSL_VERIFYHOST(3)\fP and \fICURLOPT_DOH_SSL_VERIFYPEER(3)\fP.
+Note \fICURLOPT_SSL_CTX_FUNCTION(3)\fP is inherited.
 .SH DEFAULT
-NULL - there is no default DOH URL. If this option isn't set, libcurl will use
+NULL - there is no default DoH URL. If this option isn't set, libcurl will use
 the default name resolver.
 .SH PROTOCOLS
 All
@@ -66,7 +72,7 @@
 heap space.
 
 Note that \fIcurl_easy_setopt(3)\fP won't actually parse the given string so
-given a bad DOH URL, curl will not detect a problem until it tries to resolve
+given a bad DoH URL, curl will not detect a problem until it tries to resolve
 a name with it.
 .SH "SEE ALSO"
 .BR CURLOPT_VERBOSE "(3), " CURLOPT_RESOLVE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
index bf59784..ca85340 100644
--- a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
+++ b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_EGDSOCKET 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_EGDSOCKET 3 "July 14, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_EGDSOCKET \- set EGD socket path
@@ -30,7 +30,7 @@
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);
 .SH DESCRIPTION
 Pass a char * to the null-terminated path name to the Entropy Gathering Daemon
-socket. It will be used to seed the random engine for SSL.
+socket. It will be used to seed the random engine for TLS.
 
 The application does not have to keep the string around after setting this
 option.
@@ -49,7 +49,7 @@
 }
 .fi
 .SH AVAILABILITY
-If built TLS enabled. Only the OpenSSL and GnuTLS backends will use this.
+If built with TLS enabled. Only the OpenSSL backend will use this.
 .SH RETURN VALUE
 Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
index 17f2bc7..80df8e6 100644
--- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
+++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ERRORBUFFER 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ERRORBUFFER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ERRORBUFFER \- set error buffer for error messages
diff --git a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
index c33f324..b002a43 100644
--- a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
+++ b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response
diff --git a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 b/docs/libcurl/opts/CURLOPT_FAILONERROR.3
index 8d15b4f..3f9a5f8 100644
--- a/docs/libcurl/opts/CURLOPT_FAILONERROR.3
+++ b/docs/libcurl/opts/CURLOPT_FAILONERROR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FAILONERROR 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FAILONERROR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FAILONERROR \- request failure on HTTP response >= 400
diff --git a/docs/libcurl/opts/CURLOPT_FILETIME.3 b/docs/libcurl/opts/CURLOPT_FILETIME.3
index 1f33d67..fa2ff0e 100644
--- a/docs/libcurl/opts/CURLOPT_FILETIME.3
+++ b/docs/libcurl/opts/CURLOPT_FILETIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FILETIME 3 "April 03, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FILETIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FILETIME \- get the modification time of the remote resource
diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
index c41be71..f2ebbc7 100644
--- a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
+++ b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FNMATCH_DATA 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FNMATCH_DATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback
diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
index afa6feb..7df0cac 100644
--- a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FNMATCH_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback
diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
index aa65625..742baf8 100644
--- a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
+++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FOLLOWLOCATION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FOLLOWLOCATION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
diff --git a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
index 0830b5f..c3e659a 100644
--- a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
+++ b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FORBID_REUSE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FORBID_REUSE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FORBID_REUSE \- make connection get closed at once after use
diff --git a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
index 408b11e..30d2503 100644
--- a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
+++ b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FRESH_CONNECT 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FRESH_CONNECT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FRESH_CONNECT \- force a new connection to be used
diff --git a/docs/libcurl/opts/CURLOPT_FTPPORT.3 b/docs/libcurl/opts/CURLOPT_FTPPORT.3
index 66f65e5..8203aff 100644
--- a/docs/libcurl/opts/CURLOPT_FTPPORT.3
+++ b/docs/libcurl/opts/CURLOPT_FTPPORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTPPORT 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTPPORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTPPORT \- make FTP transfer active
diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
index 79a14c8..7bed1b7 100644
--- a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
+++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTPSSLAUTH 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTPSSLAUTH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP
diff --git a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
index 47d46f3..ad83700 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_ACCOUNT 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_ACCOUNT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_ACCOUNT \- set account info for FTP
diff --git a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
index 0ef996f..c76dd03 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP
diff --git a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
index e037d98..2170112 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP
diff --git a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
index 1c7059f..380e615 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_FILEMETHOD 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_FILEMETHOD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP
diff --git a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
index 739c261..0a36ea8 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "October 03, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response
diff --git a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
index 8fb839e..1c4b685 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_SKIP_PASV_IP 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_SKIP_PASV_IP 3 "November 24, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response
@@ -36,11 +36,13 @@
 number from the 227-response.
 
 This option thus allows libcurl to work around broken server installations
-that due to NATs, firewalls or incompetence report the wrong IP address back.
+that due to NATs, firewalls or incompetence report the wrong IP address
+back. Setting the option also reduces the risk for various sorts of client
+abuse by malicious servers.
 
 This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
 .SH DEFAULT
-0
+1 since 7.74.0, was 0 before then.
 .SH PROTOCOLS
 FTP
 .SH EXAMPLE
diff --git a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
index febf311..a0bb82a 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_SSL_CCC 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_SSL_CCC 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
index c29d03d..94a9f3c 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_USE_EPRT 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_USE_EPRT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
index 9a00ef3..7600021 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_USE_EPSV 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_USE_EPSV 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
index aa3e515..35e41d4 100644
--- a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_FTP_USE_PRET 3 "May 05, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_FTP_USE_PRET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_FTP_USE_PRET \- enable the PRET command
diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
index f3c4b0e..cf3342b 100644
--- a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
+++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_GSSAPI_DELEGATION 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_GSSAPI_DELEGATION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation
diff --git a/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3
index ef843d0..f196884 100644
--- a/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3
+++ b/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for ipv6 for happy eyeballs
diff --git a/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 b/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3
index 843f75c..59c1fb3 100644
--- a/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3
+++ b/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HAPROXYPROTOCOL 3 "May 18, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HAPROXYPROTOCOL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HAPROXYPROTOCOL \- send HAProxy PROXY protocol v1 header
diff --git a/docs/libcurl/opts/CURLOPT_HEADER.3 b/docs/libcurl/opts/CURLOPT_HEADER.3
index 4a7c5d2..b2640fa 100644
--- a/docs/libcurl/opts/CURLOPT_HEADER.3
+++ b/docs/libcurl/opts/CURLOPT_HEADER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HEADER 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HEADER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HEADER \- pass headers to the data stream
diff --git a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 b/docs/libcurl/opts/CURLOPT_HEADERDATA.3
index af3b8c7..b8b20c0 100644
--- a/docs/libcurl/opts/CURLOPT_HEADERDATA.3
+++ b/docs/libcurl/opts/CURLOPT_HEADERDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HEADERDATA 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HEADERDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HEADERDATA \- pointer to pass to header callback
diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
index 9b2ce77..f9e7525 100644
--- a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HEADERFUNCTION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HEADERFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HEADERFUNCTION \- callback that receives header data
diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 b/docs/libcurl/opts/CURLOPT_HEADEROPT.3
index 9f1a7b4..2d75c62 100644
--- a/docs/libcurl/opts/CURLOPT_HEADEROPT.3
+++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HEADEROPT 3 "October 31, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HEADEROPT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HEADEROPT \- set how to send HTTP headers
diff --git a/docs/libcurl/opts/CURLOPT_HSTS.3 b/docs/libcurl/opts/CURLOPT_HSTS.3
new file mode 100644
index 0000000..6d107e7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HSTS.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HSTS 3 "November 13, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_HSTS \- set HSTS cache file name
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS, char *filename);
+.fi
+.SH EXPERIMENTAL
+Warning: this feature is early code and is marked as experimental. It can only
+be enabled by explicitly telling configure with \fB--enable-hsts\fP. You are
+advised to not ship this in production before the experimental label is
+removed.
+.SH DESCRIPTION
+Make the \fIfilename\fP point to a file name to load an existing HSTS cache
+from, and to store the cache in when the easy handle is closed. Setting a file
+name with this option will also enable HSTS for this handle (the equivalent of
+setting \fICURLHSTS_ENABLE\fP with \fICURLOPT_HSTS_CTRL(3)\fP).
+
+If the given file does not exist or contains no HSTS entries at startup, the
+HSTS cache will simply start empty. Setting the file name to NULL or "" will
+only enable HSTS without reading from or writing to any file.
+
+If this option is set multiple times, libcurl will load cache entries from
+each given file but will only store the last used name for later writing.
+.SH "FILE FORMAT"
+The HSTS cache is saved to and loaded from a text file with one entry per
+physical line. Each line in the file has the following format:
+
+[host] [stamp]
+
+[host] is the domain name for the entry and the name is dot-prefixed if it is
+a includeSubDomain entry (if the entry is valid for all subdmains to the name
+as well or only for the exact name).
+
+[stamp] is the time (in UTC) when the entry expires and it uses the format
+\&"YYYYMMDD HH:MM:SS".
+
+Lines starting with "#" are treated as comments and are ignored. There is
+currently no length or size limit.
+.SH DEFAULT
+NULL, no file name
+.SH PROTOCOLS
+HTTPS and HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_HSTS, "/home/user/.hsts-cache");
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.74.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HSTS_CTRL "(3), " CURLOPT_ALTSVC "(3), " CURLOPT_RESOLVE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HSTSREADDATA.3 b/docs/libcurl/opts/CURLOPT_HSTSREADDATA.3
new file mode 100644
index 0000000..2eda548
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HSTSREADDATA.3
@@ -0,0 +1,67 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HSTSREADDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_HSTSREADDATA \- pointer passed to the HSTS read callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSREADDATA, void *pointer);
+.SH EXPERIMENTAL
+Warning: this feature is early code and is marked as experimental. It can only
+be enabled by explicitly telling configure with \fB--enable-hsts\fP. You are
+advised to not ship this in production before the experimental label is
+removed.
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the HSTS read function. If you use the
+\fICURLOPT_HSTSREADFUNCTION(3)\fP option, this is the pointer you'll get as
+input in the 3rd argument to the callback.
+
+This option doesn't enable HSTS, you need to use \fICURLOPT_HSTS_CTRL(3)\fP to
+do that.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+This feature is only used for HTTP(S) transfer.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct MyData this;
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+  /* pass pointer that gets passed in to the
+     CURLOPT_HSTSREADFUNCTION callback */
+  curl_easy_setopt(curl, CURLOPT_HSTSREADDATA, &this);
+
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.74.0
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_HSTSREADFUNCTION "(3), " CURLOPT_HSTSWRITEDATA "(3), "
+.BR CURLOPT_HSTSWRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.3
new file mode 100644
index 0000000..bc69425
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HSTSREADFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_HSTSREADFUNCTION \- read callback for HSTS hosts
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLSTScode hstsread(CURL *easy, struct curl_hstsentry *sts, void *userp);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSREADFUNCTION, hstsread);
+.SH EXPERIMENTAL
+Warning: this feature is early code and is marked as experimental. It can only
+be enabled by explicitly telling configure with \fB--enable-hsts\fP. You are
+advised to not ship this in production before the experimental label is
+removed.
+.SH DESCRIPTION
+Pass a pointer to your callback function, as the prototype shows above.
+
+This callback function gets called by libcurl repeatedly when it populates the
+in-memory HSTS cache.
+
+Set the \fIuserp\fP argument with the \fICURLOPT_HSTSREADDATA(3)\fP option or
+it will be NULL.
+
+When this callback is invoked, the \fIsts\fP pointer points to a populated
+struct: Copy the host name to 'name' (no longer than 'namelen' bytes). Make it
+null-terminated. Set 'includeSubDomains' to TRUE or FALSE. Set 'expire' to a
+date stamp or a zero length string for *forever* (wrong date stamp format
+might cause the name to not get accepted)
+
+The callback should return \fICURLSTS_OK\fP if it returns a name and is
+prepared to be called again (for another host) or \fICURLSTS_DONE\fP if it has
+no entry to return. It can also return \fICURLSTS_FAIL\fP to signal error.
+
+This option doesn't enable HSTS, you need to use \fICURLOPT_HSTS_CTRL(3)\fP to
+do that.
+.SH DEFAULT
+NULL - no callback.
+.SH PROTOCOLS
+This feature is only used for HTTP(S) transfer.
+.SH EXAMPLE
+.nf
+{
+  /* set HSTS read callback */
+  curl_easy_setopt(curl, CURLOPT_HSTSREADFUNCTION, hstsread);
+
+  /* pass in suitable argument to the callback */
+  curl_easy_setopt(curl, CURLOPT_HSTSREADDATA, &hstspreload[0]);
+
+  result = curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.74.0
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_HSTSREADDATA "(3), " CURLOPT_HSTSWRITEFUNCTION "(3), "
+.BR CURLOPT_HSTS "(3), " CURLOPT_HSTS_CTRL "(3), "
+
diff --git a/docs/libcurl/opts/CURLOPT_HSTSWRITEDATA.3 b/docs/libcurl/opts/CURLOPT_HSTSWRITEDATA.3
new file mode 100644
index 0000000..aa64a03
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HSTSWRITEDATA.3
@@ -0,0 +1,67 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HSTSWRITEDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_HSTSWRITEDATA \- pointer passed to the HSTS write callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEDATA, void *pointer);
+.SH EXPERIMENTAL
+Warning: this feature is early code and is marked as experimental. It can only
+be enabled by explicitly telling configure with \fB--enable-hsts\fP. You are
+advised to not ship this in production before the experimental label is
+removed.
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the HSTS write function. If you use the
+\fICURLOPT_HSTSWRITEFUNCTION(3)\fP option, this is the pointer you'll get as
+input in the 4th argument to the callback.
+
+This option doesn't enable HSTS, you need to use \fICURLOPT_HSTS_CTRL(3)\fP to
+do that.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+This feature is only used for HTTP(S) transfer.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct MyData this;
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+  /* pass pointer that gets passed in to the
+     CURLOPT_HSTSWRITEFUNCTION callback */
+  curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &this);
+
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.74.0
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_HSTSWRITEFUNCTION "(3), " CURLOPT_HSTSREADDATA "(3), "
+.BR CURLOPT_HSTSREADFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.3
new file mode 100644
index 0000000..a8bcd75
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.3
@@ -0,0 +1,80 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HSTSWRITEFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_HSTSWRITEFUNCTION \- write callback for HSTS hosts
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *sts,
+                      struct curl_index *count, void *userp);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEFUNCTION, hstswrite);
+.SH EXPERIMENTAL
+Warning: this feature is early code and is marked as experimental. It can only
+be enabled by explicitly telling configure with \fB--enable-hsts\fP. You are
+advised to not ship this in production before the experimental label is
+removed.
+.SH DESCRIPTION
+Pass a pointer to your callback function, as the prototype shows above.
+
+This callback function gets called by libcurl repeatedly to allow the
+application to store the in-memory HSTS cache when libcurl is about to discard
+it.
+
+Set the \fIuserp\fP argument with the \fICURLOPT_HSTSWRITEDATA(3)\fP option or
+it will be NULL.
+
+When the callback is invoked, the \fIsts\fP pointer points to a populated
+struct: Read the host name to 'name' (it is 'namelen' bytes long and null
+terminated. The 'includeSubDomains' field is non-zero if the entry matches
+subdomains. The 'expire' string is a date stamp null-terminated string using
+the syntax YYYYMMDD HH:MM:SS.
+
+The callback should return \fICURLSTS_OK\fP if it succeeded and is prepared to
+be called again (for another host) or \fICURLSTS_DONE\fP if there's nothing
+more to do. It can also return \fICURLSTS_FAIL\fP to signal error.
+.SH DEFAULT
+NULL - no callback.
+.SH PROTOCOLS
+This feature is only used for HTTP(S) transfer.
+.SH EXAMPLE
+.nf
+{
+  /* set HSTS read callback */
+  curl_easy_setopt(curl, CURLOPT_HSTSWRITEFUNCTION, hstswrite);
+
+  /* pass in suitable argument to the callback */
+  curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &hstspreload[0]);
+
+  result = curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.74.0
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_HSTSWRITEDATA "(3), " CURLOPT_HSTSWRITEFUNCTION "(3), "
+.BR CURLOPT_HSTS "(3), " CURLOPT_HSTS_CTRL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HSTS_CTRL.3 b/docs/libcurl/opts/CURLOPT_HSTS_CTRL.3
new file mode 100644
index 0000000..2887b64
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HSTS_CTRL.3
@@ -0,0 +1,74 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HSTS_CTRL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_HSTS_CTRL \- control HSTS behavior
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+#define CURLHSTS_ENABLE       (1<<0)
+#define CURLHSTS_READONLYFILE (1<<1)
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS_CTRL, long bitmask);
+.fi
+.SH EXPERIMENTAL
+Warning: this feature is early code and is marked as experimental. It can only
+be enabled by explicitly telling configure with \fB--enable-hsts\fP. You are
+advised to not ship this in production before the experimental label is
+removed.
+.SH DESCRIPTION
+HSTS (HTTP Strict Transport Security) means that an HTTPS server can instruct
+the client to not contact it again over clear-text HTTP for a certain period
+into the future. libcurl will then automatically redirect HTTP attempts to
+such hosts to instead use HTTPS. This is done by libcurl retaining this
+knowledge in an in-memory cache.
+
+Populate the long \fIbitmask\fP with the correct set of features to instruct
+libcurl how to handle HSTS for the transfers using this handle.
+.SH BITS
+.IP "CURLHSTS_ENABLE"
+Enable the in-memory HSTS cache for this handle.
+.IP "CURLHSTS_READONLYFILE"
+Make the HSTS file (if specified) read-only - makes libcurl not save the cache
+to the file when closing the handle.
+.SH DEFAULT
+0. HSTS is disabled by default.
+.SH PROTOCOLS
+HTTPS and HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
+  curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.74.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HSTS "(3), " CURLOPT_CONNECT_TO "(3), " CURLOPT_RESOLVE "(3), "
+.BR CURLOPT_ALTSVC "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3 b/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3
index 53718db..5b9401a 100644
--- a/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3
+++ b/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTP09_ALLOWED 3 "August 05, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTP09_ALLOWED 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTP09 \- allow HTTP/0.9 response
diff --git a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
index 8c66345..029818c 100644
--- a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
+++ b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTP200ALIASES 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTP200ALIASES 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK
diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
index 7579695..6a68afa 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTPAUTH 3 "June 15, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTPAUTH 3 "July 03, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try
@@ -99,6 +99,9 @@
 This is a meta symbol. OR this value together with a single specific auth
 value to force libcurl to probe for un-restricted auth and if not, only that
 single auth algorithm is acceptable.
+.IP CURLAUTH_AWS_SIGV4
+provides AWS V4 signature authentication on HTTPS header
+see \fICURLOPT_AWS_SIGV4(3)\fP.
 .SH DEFAULT
 CURLAUTH_BASIC
 .SH PROTOCOLS
@@ -125,6 +128,8 @@
 CURLAUTH_NTLM_WB was added in 7.22.0
 
 CURLAUTH_BEARER was added in 7.61.0
+
+CURLAUTH_AWS_SIGV4 was added in 7.74.0
 .SH RETURN VALUE
 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
 CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3
index 305ce27..bae84bc 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPGET.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTPGET 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTPGET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTPGET \- ask for an HTTP GET request
diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
index f13b9d3..7aa5366 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTPHEADER 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTPHEADER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTPHEADER \- set custom HTTP headers
diff --git a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 b/docs/libcurl/opts/CURLOPT_HTTPPOST.3
index 41af023..cb75f8e 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPPOST.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPPOST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTPPOST 3 "September 02, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTPPOST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTPPOST \- specify the multipart formpost content
diff --git a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
index 639f64f..93b491b 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTPPROXYTUNNEL 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTPPROXYTUNNEL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
index 812d774..1a85c41 100644
--- a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
+++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTP_CONTENT_DECODING 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTP_CONTENT_DECODING 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
index bd0a45d..9184ad9 100644
--- a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
+++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
index 8674519..91d5bc7 100644
--- a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
+++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_HTTP_VERSION 3 "September 14, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_HTTP_VERSION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
diff --git a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
index d350d30..6999d0d 100644
--- a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
+++ b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "June 03, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_IGNORE_CONTENT_LENGTH \- ignore content length
@@ -61,7 +61,8 @@
 }
 .fi
 .SH AVAILABILITY
-Added in 7.14.1. Support for FTP added in 7.46.0.
+Added in 7.14.1. Support for FTP added in 7.46.0. This option is not working
+for the hyper backend.
 .SH RETURN VALUE
 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 .SH "SEE ALSO"
diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE.3
index f1b8291..3e5eb57 100644
--- a/docs/libcurl/opts/CURLOPT_INFILESIZE.3
+++ b/docs/libcurl/opts/CURLOPT_INFILESIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_INFILESIZE 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_INFILESIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_INFILESIZE \- set size of the input file to send off
diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
index def8299..cd0104b 100644
--- a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_INFILESIZE_LARGE 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_INFILESIZE_LARGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off
diff --git a/docs/libcurl/opts/CURLOPT_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_INTERFACE.3
index 52e73de..7e77fb5 100644
--- a/docs/libcurl/opts/CURLOPT_INTERFACE.3
+++ b/docs/libcurl/opts/CURLOPT_INTERFACE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_INTERFACE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_INTERFACE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_INTERFACE \- source interface for outgoing traffic
diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
index 95f695c..1985d73 100644
--- a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
+++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_INTERLEAVEDATA 3 "September 15, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_INTERLEAVEDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_INTERLEAVEDATA \- custom pointer passed to RTSP interleave callback
diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
index 5f9755c..7139271 100644
--- a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_INTERLEAVEFUNCTION 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_INTERLEAVEFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data
diff --git a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
index d05b4ad..3d59c86 100644
--- a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
+++ b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_IOCTLDATA 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_IOCTLDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback
diff --git a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
index ba5606c..0ccf51d 100644
--- a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_IOCTLFUNCTION 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_IOCTLFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_IOCTLFUNCTION \- callback for I/O operations
diff --git a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
index 9516852..5ce9e20 100644
--- a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
+++ b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_IPRESOLVE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_IPRESOLVE 3 "April 24, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_IPRESOLVE \- specify which IP protocol version to use
@@ -30,14 +30,15 @@
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IPRESOLVE, long resolve);
 .SH DESCRIPTION
 Allows an application to select what kind of IP addresses to use when
-resolving host names. This is only interesting when using host names that
-resolve addresses using more than one version of IP. The allowed values are:
+establishing a connection or choosing one from the connection pool. This is
+interesting when using host names that resolve addresses using more than
+one version of IP. The allowed values are:
 .IP CURL_IPRESOLVE_WHATEVER
-Default, resolves addresses to all IP versions that your system allows.
+Default, can use addresses of all IP versions that your system allows.
 .IP CURL_IPRESOLVE_V4
-Resolve to IPv4 addresses.
+Uses only IPv4 addresses.
 .IP CURL_IPRESOLVE_V6
-Resolve to IPv6 addresses.
+Uses only IPv6 addresses.
 .SH DEFAULT
 CURL_IPRESOLVE_WHATEVER
 .SH PROTOCOLS
@@ -48,7 +49,7 @@
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
-  /* resolve host name using IPv6-names only */
+  /* of all addresses example.com resolves to, only IPv6 ones are used */
   curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
 
   ret = curl_easy_perform(curl);
diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
index 7abe206..a19913c 100644
--- a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
+++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ISSUERCERT 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_ISSUERCERT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_ISSUERCERT \- issuer SSL certificate filename
diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.3 b/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.3
index 5fbf86d..f3f1bf0 100644
--- a/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.3
+++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_ISSUERCERT_BLOB 3 "24 Jun 2020" "libcurl 7.71.0" "curl_easy_setopt options"
+.TH CURLOPT_ISSUERCERT_BLOB 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_ISSUERCERT_BLOB \- issuer SSL certificate from memory blob
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3
index 46e4f01..d096cc3 100644
--- a/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3
+++ b/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_KEEP_SENDING_ON_ERROR \- keep sending on early HTTP response >= 300
diff --git a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
index d8c27d0..6e6afec 100644
--- a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
+++ b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_KEYPASSWD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_KEYPASSWD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_KEYPASSWD \- set passphrase to private key
diff --git a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
index ac8497d..b92131f 100644
--- a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
+++ b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_KRBLEVEL 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_KRBLEVEL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_KRBLEVEL \- set FTP kerberos security level
diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 b/docs/libcurl/opts/CURLOPT_LOCALPORT.3
index 18e0801..741eaac 100644
--- a/docs/libcurl/opts/CURLOPT_LOCALPORT.3
+++ b/docs/libcurl/opts/CURLOPT_LOCALPORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_LOCALPORT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_LOCALPORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_LOCALPORT \- set local port number to use for socket
diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
index 63a2f19..f1827d7 100644
--- a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
+++ b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_LOCALPORTRANGE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_LOCALPORTRANGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_LOCALPORTRANGE \- number of additional local ports to try
diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
index 6b593f4..400dfe8 100644
--- a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
+++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_LOGIN_OPTIONS 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_LOGIN_OPTIONS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_LOGIN_OPTIONS \- set login options
diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
index f29df3a..9094c9e 100644
--- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
+++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_LOW_SPEED_LIMIT 3 "May 06, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_LOW_SPEED_LIMIT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second
diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
index 2696e54..3aa0f55 100644
--- a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
+++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_LOW_SPEED_TIME 3 "May 06, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_LOW_SPEED_TIME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_LOW_SPEED_TIME \- set low speed limit time period
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
index 61ce76c..ed6b7a5 100644
--- a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
+++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAIL_AUTH 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAIL_AUTH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAIL_AUTH \- SMTP authentication address
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
index f707022..ad6d48d 100644
--- a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
+++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAIL_FROM 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAIL_FROM 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAIL_FROM \- SMTP sender address
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
index cc6026b..8b67164 100644
--- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
+++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAIL_RCPT 3 "July 16, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAIL_RCPT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAIL_RCPT \- list of SMTP mail recipients
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLLOWFAILS.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLLOWFAILS.3
index 9966191..b2e4b3a 100644
--- a/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLLOWFAILS.3
+++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLLOWFAILS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAIL_RCPT_ALLLOWFAILS 3 "January 14, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAIL_RCPT_ALLLOWFAILS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAIL_RCPT_ALLLOWFAILS \- allow RCPT TO command to fail for some recipients
diff --git a/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3 b/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3
index d36767b..ca8b370 100644
--- a/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3
+++ b/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAXAGE_CONN 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAXAGE_CONN 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAXAGE_CONN \- max idle time allowed for reusing a connection
diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
index 85821f5..c0f4a00 100644
--- a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
+++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAXCONNECTS 3 "May 30, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAXCONNECTS 3 "December 31, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAXCONNECTS \- maximum connection cache size
@@ -33,7 +33,7 @@
 open persistent connections that libcurl may cache in the pool associated with
 this handle. The default is 5, and there isn't much point in changing this
 value unless you are perfectly aware of how this works and changes libcurl's
-behaviour. This concerns connections using any of the protocols that support
+behavior. This concerns connections using any of the protocols that support
 persistent connections.
 
 When reaching the maximum limit, curl closes the oldest one in the cache to
diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
index ab2ae4e..1e33502 100644
--- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
+++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAXFILESIZE 3 "May 30, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAXFILESIZE 3 "July 21, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAXFILESIZE \- maximum file size allowed to download
@@ -34,15 +34,15 @@
 this value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will
 be returned.
 
-The file size is not always known prior to download, and for such files this
-option has no effect even if the file transfer ends up being larger than this
-given limit. This concerns both FTP and HTTP transfers.
+For protocols where the size is not known in advance (including FTP and HTTP)
+this option has no effect even if the file transfer ends up being larger than
+the given limit.
 
 If you want a limit above 2GB, use \fICURLOPT_MAXFILESIZE_LARGE(3)\fP.
 .SH DEFAULT
 None
 .SH PROTOCOLS
-FTP and HTTP
+FTP, HTTP and MQTT
 .SH EXAMPLE
 .nf
 CURL *curl = curl_easy_init();
diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
index f4166e0..e6d4bb9 100644
--- a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAXFILESIZE_LARGE 3 "May 30, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAXFILESIZE_LARGE 3 "July 21, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download
@@ -36,13 +36,13 @@
 larger than this value, the transfer will not start and
 \fICURLE_FILESIZE_EXCEEDED\fP will be returned.
 
-The file size is not always known prior to download, and for such files this
-option has no effect even if the file transfer ends up being larger than this
-given limit. This concerns both FTP and HTTP transfers.
+For protocols where the size is not known in advance (including FTP and HTTP)
+this option has no effect even if the file transfer ends up being larger than
+the given limit.
 .SH DEFAULT
 None
 .SH PROTOCOLS
-FTP and HTTP
+FTP, HTTP and MQTT
 .SH EXAMPLE
 .nf
 CURL *curl = curl_easy_init();
diff --git a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
index ec02679..dd688c1 100644
--- a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
+++ b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAXREDIRS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAXREDIRS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAXREDIRS \- maximum number of redirects allowed
diff --git a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
index 264a40d..1395f33 100644
--- a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "August 14, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed
diff --git a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
index 31e0db0..baf959d 100644
--- a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "August 14, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed
diff --git a/docs/libcurl/opts/CURLOPT_MIMEPOST.3 b/docs/libcurl/opts/CURLOPT_MIMEPOST.3
index 79d7b8b..a97188c 100644
--- a/docs/libcurl/opts/CURLOPT_MIMEPOST.3
+++ b/docs/libcurl/opts/CURLOPT_MIMEPOST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_MIMEPOST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_MIMEPOST \- set post/send data from mime structure
@@ -47,7 +47,7 @@
 This will return CURLE_OK.
 .SH EXAMPLE
 Using this option implies the use of several mime structure building
-functions: see https://curl.haxx.se/libcurl/c/smtp-mime.html for a complete
+functions: see https://curl.se/libcurl/c/smtp-mime.html for a complete
 example.
 .SH "SEE ALSO"
 .BR curl_mime_init "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_NETRC.3 b/docs/libcurl/opts/CURLOPT_NETRC.3
index 2e9476b..8ac5167 100644
--- a/docs/libcurl/opts/CURLOPT_NETRC.3
+++ b/docs/libcurl/opts/CURLOPT_NETRC.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NETRC 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NETRC 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NETRC \- request that .netrc is used
diff --git a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
index 544a767..f56af13 100644
--- a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
+++ b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NETRC_FILE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NETRC_FILE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NETRC_FILE \- file name to read .netrc info from
diff --git a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
index 89db0bc..f565f4e 100644
--- a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
+++ b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories
diff --git a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
index d22de64..7bac6a1 100644
--- a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
+++ b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NEW_FILE_PERMS 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NEW_FILE_PERMS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files
diff --git a/docs/libcurl/opts/CURLOPT_NOBODY.3 b/docs/libcurl/opts/CURLOPT_NOBODY.3
index e87b17a..b643146 100644
--- a/docs/libcurl/opts/CURLOPT_NOBODY.3
+++ b/docs/libcurl/opts/CURLOPT_NOBODY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NOBODY 3 "July 27, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NOBODY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NOBODY \- do the download request without getting the body
@@ -37,7 +37,7 @@
 For HTTP operations when \fICURLOPT_NOBODY(3)\fP has been set, unsetting the
 option (with 0) will make it a GET again - only if the method is still set to
 be HEAD. The proper way to get back to a GET request is to set
-\fICURLOPT_HTTPGET(3)\fP and for other methods, use the POST ur UPLOAD
+\fICURLOPT_HTTPGET(3)\fP and for other methods, use the POST or UPLOAD
 options.
 
 Enabling \fICURLOPT_NOBODY(3)\fP means asking for a download without a body.
diff --git a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
index 13512ec..b5f7027 100644
--- a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
+++ b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NOPROGRESS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NOPROGRESS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NOPROGRESS \- switch off the progress meter
diff --git a/docs/libcurl/opts/CURLOPT_NOPROXY.3 b/docs/libcurl/opts/CURLOPT_NOPROXY.3
index 597468e..9a2142a 100644
--- a/docs/libcurl/opts/CURLOPT_NOPROXY.3
+++ b/docs/libcurl/opts/CURLOPT_NOPROXY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NOPROXY 3 "August 22, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NOPROXY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NOPROXY \- disable proxy use for specific hosts
diff --git a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
index 466273d..a5cf9d0 100644
--- a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
+++ b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_NOSIGNAL 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_NOSIGNAL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_NOSIGNAL \- skip all signal handling
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
index 10beb2c..3c964e5 100644
--- a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_OPENSOCKETDATA 3 "May 15, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_OPENSOCKETDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
index 0f88f19..ec1a309 100644
--- a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_OPENSOCKETFUNCTION 3 "June 09, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_OPENSOCKETFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets
diff --git a/docs/libcurl/opts/CURLOPT_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PASSWORD.3
index eff48dc..345580b 100644
--- a/docs/libcurl/opts/CURLOPT_PASSWORD.3
+++ b/docs/libcurl/opts/CURLOPT_PASSWORD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PASSWORD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PASSWORD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PASSWORD \- password to use in authentication
diff --git a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
index 8d8ca0d..dbbe280 100644
--- a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
+++ b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PATH_AS_IS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PATH_AS_IS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PATH_AS_IS \- do not handle dot dot sequences
diff --git a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
index 21ed6e9..5b89003 100644
--- a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
+++ b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PINNEDPUBLICKEY 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PINNEDPUBLICKEY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PINNEDPUBLICKEY \- set pinned public key
diff --git a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
index 32fcdb5..41c8227 100644
--- a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
+++ b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PIPEWAIT 3 "May 01, 2016" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PIPEWAIT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing
diff --git a/docs/libcurl/opts/CURLOPT_PORT.3 b/docs/libcurl/opts/CURLOPT_PORT.3
index c50828d..74c55cd 100644
--- a/docs/libcurl/opts/CURLOPT_PORT.3
+++ b/docs/libcurl/opts/CURLOPT_PORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PORT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PORT \- set remote port number to work with
diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3
index e43203b..68ba739 100644
--- a/docs/libcurl/opts/CURLOPT_POST.3
+++ b/docs/libcurl/opts/CURLOPT_POST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_POST 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_POST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_POST \- request an HTTP POST
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
index 6727222..e662bba 100644
--- a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_POSTFIELDS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_POSTFIELDS 3 "April 23, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_POSTFIELDS \- specify data to POST to server
@@ -36,7 +36,7 @@
 
 The data pointed to is NOT copied by the library: as a consequence, it must be
 preserved by the calling application until the associated transfer finishes.
-This behaviour can be changed (so libcurl does copy the data) by setting the
+This behavior can be changed (so libcurl does copy the data) by setting the
 \fICURLOPT_COPYPOSTFIELDS(3)\fP option.
 
 This POST is a normal application/x-www-form-urlencoded kind (and libcurl will
@@ -53,6 +53,11 @@
 \fICURLOPT_POSTFIELDS(3)\fP to an empty string, or set \fICURLOPT_POST(3)\fP to
 1 and \fICURLOPT_POSTFIELDSIZE(3)\fP to 0.
 
+libcurl will use assume this option points to a nul-terminated string unless
+you also set \fICURLOPT_POSTFIELDSIZE(3)\fP to specify the length of the
+provided data, which then is strictly required if you want to send off nul
+bytes included in the data.
+
 Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header,
 and libcurl will add that header automatically if the POST is either known to
 be larger than 1MB or if the expected size is unknown. You can disable this
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
index c3ea8c9..f6f7d60 100644
--- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_POSTFIELDSIZE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_POSTFIELDSIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_POSTFIELDSIZE \- size of POST data pointed to
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
index d330c25..2a8684b 100644
--- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to
diff --git a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
index 9d1f433..0d2d2c2 100644
--- a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
+++ b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_POSTQUOTE 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_POSTQUOTE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer
diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 b/docs/libcurl/opts/CURLOPT_POSTREDIR.3
index 6ee0620..7755c15 100644
--- a/docs/libcurl/opts/CURLOPT_POSTREDIR.3
+++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_POSTREDIR 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_POSTREDIR 3 "December 31, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_POSTREDIR \- how to act on an HTTP POST redirect
@@ -41,7 +41,7 @@
 after a 303 redirect. The value \fBCURL_REDIR_POST_ALL\fP is a convenience
 define that sets all three bits.
 
-The non-RFC behaviour is ubiquitous in web browsers, so the library does the
+The non-RFC behavior is ubiquitous in web browsers, so the library does the
 conversion by default to maintain consistency. However, a server may require a
 POST to remain a POST after such a redirection. This option is meaningful only
 when setting \fICURLOPT_FOLLOWLOCATION(3)\fP.
diff --git a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 b/docs/libcurl/opts/CURLOPT_PREQUOTE.3
index 959fbbb..d3a56d4 100644
--- a/docs/libcurl/opts/CURLOPT_PREQUOTE.3
+++ b/docs/libcurl/opts/CURLOPT_PREQUOTE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PREQUOTE 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PREQUOTE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PREQUOTE \- commands to run before an FTP transfer
diff --git a/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 b/docs/libcurl/opts/CURLOPT_PRE_PROXY.3
index c535565..220ced2 100644
--- a/docs/libcurl/opts/CURLOPT_PRE_PROXY.3
+++ b/docs/libcurl/opts/CURLOPT_PRE_PROXY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PRE_PROXY 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PRE_PROXY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PRE_PROXY \- set pre-proxy to use
diff --git a/docs/libcurl/opts/CURLOPT_PRIVATE.3 b/docs/libcurl/opts/CURLOPT_PRIVATE.3
index e814457..404b266 100644
--- a/docs/libcurl/opts/CURLOPT_PRIVATE.3
+++ b/docs/libcurl/opts/CURLOPT_PRIVATE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PRIVATE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PRIVATE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PRIVATE \- store a private pointer
diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
index 1ff69e2..edf1986 100644
--- a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
+++ b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROGRESSDATA 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROGRESSDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback
@@ -36,7 +36,7 @@
 .SH PROTOCOLS
 All
 .SH EXAMPLE
-https://curl.haxx.se/libcurl/c/progressfunc.html
+https://curl.se/libcurl/c/progressfunc.html
 .SH AVAILABILITY
 Always
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
index 9d33878..239fa47 100644
--- a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROGRESSFUNCTION 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROGRESSFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROGRESSFUNCTION \- callback to progress meter function
@@ -79,7 +79,7 @@
 .SH PROTOCOLS
 All
 .SH EXAMPLE
-https://curl.haxx.se/libcurl/c/progressfunc.html
+https://curl.se/libcurl/c/progressfunc.html
 .SH AVAILABILITY
 Always
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
index 2f3e8c5e..11ca374 100644
--- a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
+++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROTOCOLS 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROTOCOLS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROTOCOLS \- set allowed protocols
diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3
index 9f1c45b..09c2268 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY \- set proxy to use
diff --git a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
index cf3c083..87bbe3e 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYAUTH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try
diff --git a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
index a1b9aaa..824fcf8 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYHEADER 3 "May 30, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYHEADER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy
diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
index 49a7c31..481f553 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYPASSWORD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYPASSWORD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYPASSWORD \- password to use with proxy authentication
diff --git a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 b/docs/libcurl/opts/CURLOPT_PROXYPORT.3
index d72fd0a..6ff3c99 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYPORT.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYPORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYPORT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYPORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYPORT \- port number the proxy listens on
diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
index 14d3603..817628f 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYTYPE 3 "May 30, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYTYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYTYPE \- proxy protocol type
diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
index 55b8ac4..8ff955d 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYUSERNAME 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYUSERNAME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication
diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
index 868fcfa..cd06486 100644
--- a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
+++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXYUSERPWD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXYUSERPWD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3
index e838f86..64a64ca 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_CAINFO 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_CAINFO 3 "July 13, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_CAINFO \- path to proxy Certificate Authority (CA) bundle
@@ -73,12 +73,13 @@
 
 For TLS backends that don't support certificate files, the
 \fICURLOPT_PROXY_CAINFO(3)\fP option is ignored. Refer to
-https://curl.haxx.se/docs/ssl-compared.html
+https://curl.se/docs/ssl-compared.html
 .SH RETURN VALUE
 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 .SH "SEE ALSO"
-.BR CURLOPT_PROXY_CAPATH "(3), "
+.BR CURLOPT_PROXY_CAINFO_BLOB "(3), " CURLOPT_PROXY_CAPATH "(3), "
 .BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_CAINFO "(3), " CURLOPT_CAINFO_BLOB "(3), "
 .BR CURLOPT_CAPATH "(3), "
 .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.3
new file mode 100644
index 0000000..bec3622
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_PROXY_CAINFO_BLOB 3 "July 13, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
+.SH NAME
+CURLOPT_PROXY_CAINFO_BLOB \- proxy Certificate Authority (CA) bundle in PEM format
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAINFO_BLOB, struct curl_blob *stblob);
+.SH DESCRIPTION
+This option is for connecting to an HTTPS proxy, not an HTTPS server.
+
+Pass a pointer to a curl_blob structure, which contains information (pointer
+and size) about a memory block with binary data of PEM encoded content holding
+one or more certificates to verify the HTTPS proxy with.
+
+If \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
+server's certificate, \fICURLOPT_PROXY_CAINFO_BLOB(3)\fP is not needed.
+
+This option overrides \fICURLOPT_PROXY_CAINFO(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Used with HTTPS proxy
+.SH EXAMPLE
+.nf
+char *strpem; /* strpem must point to a PEM string */
+CURL *curl = curl_easy_init();
+if(curl) {
+  struct curl_blob blob;
+  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
+  /* using an HTTPS proxy */
+  curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
+  blob.data = strpem;
+  blob.len = strlen(strpem);
+  blob.flags = CURL_BLOB_COPY;  
+  curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO_BLOB, &blob);
+  ret = curl_easy_perform(curl);
+  curl_easy_cleanup(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.77.0.
+
+This option is supported by the OpenSSL, Secure
+Transport and Schannel backends.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY_CAINFO "(3), " CURLOPT_PROXY_CAPATH "(3), "
+.BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_CAINFO "(3), " CURLOPT_CAINFO_BLOB "(3), "
+.BR CURLOPT_CAPATH "(3), "
+.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3
index 6b36f72..b666d85 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_CAPATH 3 "August 24, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_CAPATH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_CAPATH \- specify directory holding proxy CA certificates
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3
index 5465fa2..fe3be27 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_CRLFILE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_CRLFILE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_CRLFILE \- specify a proxy Certificate Revocation List file
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.3 b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.3
index 821ebe7..d010b44 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_ISSUERCERT 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_ISSUERCERT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_ISSUERCERT \- proxy issuer SSL certificate filename
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.3 b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.3
index 857fffd..6331cc2 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_ISSUERCERT_BLOB 3 "24 Jun 2020" "libcurl 7.71.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_ISSUERCERT_BLOB 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_ISSUERCERT_BLOB \- proxy issuer SSL certificate from memory blob
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3
index 29128d4..6dfd896 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_KEYPASSWD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_KEYPASSWD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_KEYPASSWD \- set passphrase to proxy private key
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3
index 2b3eac5..9b4c51d 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_PINNEDPUBLICKEY \- set pinned public key for https proxy
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
index 2850258..7424ead 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SERVICE_NAME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SERVICE_NAME \- proxy authentication service name
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3
index 1bfb8e8..31b1127 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLCERT 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLCERT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSLCERT \- set SSL proxy client certificate
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3
index 917c026..2b8fafa 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLCERTTYPE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLCERTTYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSLCERTTYPE \- specify type of the proxy client SSL certificate
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.3
index 8b5a133..f127ded 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLCERT_BLOB 3 "24 Jun 2020" "libcurl 7.71.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLCERT_BLOB 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_PROXY_SSLCERT_BLOB \- SSL proxy client certificate from memory blob
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3
index 4cc4bcd..b768ffb 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLKEY 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLKEY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSLKEY \- specify private keyfile for TLS and SSL proxy client cert
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3
index e1c615f..95d8462 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLKEYTYPE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLKEYTYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSLKEYTYPE \- set type of the proxy private key file
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.3
index daaff0d..85d99b0 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLKEY_BLOB 3 "24 Jun 2020" "libcurl 7.71.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLKEY_BLOB 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_PROXY_SSLKEY_BLOB \- private key for proxy cert from memory blob
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3
index f436be5..9919e91 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSLVERSION 3 "October 31, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSLVERSION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3
index 626a782..7b8f836 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSL_CIPHER_LIST \- specify ciphers to use for proxy TLS
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3
index 0a6bbf0..57fbc60 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSL_OPTIONS 3 "July 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSL_OPTIONS 3 "February 27, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSL_OPTIONS \- set proxy SSL behavior options
@@ -50,13 +50,20 @@
 does by default. This option is only supported for OpenSSL and will fail the
 certificate verification if the chain ends with an intermediate certificate
 and not with a root cert. (Added in 7.68.0)
-
 .IP CURLSSLOPT_REVOKE_BEST_EFFORT
 Tells libcurl to ignore certificate revocation checks in case of missing or
 offline distribution points for those SSL backends where such behavior is
 present. This option is only supported for Schannel (the native Windows SSL
 library). If combined with \fICURLSSLOPT_NO_REVOKE\fP, the latter takes
 precedence. (Added in 7.70.0)
+.IP CURLSSLOPT_AUTO_CLIENT_CERT
+Tell libcurl to automatically locate and use a client certificate for
+authentication, when requested by the server. This option is only supported
+for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
+default behavior in libcurl with Schannel. Since the server can request any
+certificate that supports client authentication in the OS certificate store it
+could be a privacy violation and unexpected.
+(Added in 7.77.0)
 .SH DEFAULT
 0
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3
index e3bc216..a3bbfb9 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "August 20, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSL_VERIFYHOST \- verify the proxy certificate's name against host
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3
index ec54366..ace18ad 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "December 16, 2016" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_SSL_VERIFYPEER \- verify the proxy's SSL certificate
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3
index c862359..53fd528 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_TLS13_CIPHERS 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_TLS13_CIPHERS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_TLS13_CIPHERS \- ciphers suites for proxy TLS 1.3
@@ -36,7 +36,7 @@
 
 You'll find more details about cipher lists on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 later. If you are using a different SSL backend you can try setting TLS 1.3
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3
index 4f318d5..8010380 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_TLSAUTH_PASSWORD \- password to use for proxy TLS authentication
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3
index 917bc4f..22ad1d6 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_TLSAUTH_TYPE \- set proxy TLS authentication methods
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3
index 7e54fbf..f273458 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_TLSAUTH_USERNAME \- user name to use for proxy TLS authentication
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
index fc33373..9083a1e 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PROXY_TRANSFER_MODE 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PROXY_TRANSFER_MODE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy
diff --git a/docs/libcurl/opts/CURLOPT_PUT.3 b/docs/libcurl/opts/CURLOPT_PUT.3
index 0581b7f..092159b 100644
--- a/docs/libcurl/opts/CURLOPT_PUT.3
+++ b/docs/libcurl/opts/CURLOPT_PUT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_PUT 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_PUT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_PUT \- make an HTTP PUT request
diff --git a/docs/libcurl/opts/CURLOPT_QUOTE.3 b/docs/libcurl/opts/CURLOPT_QUOTE.3
index d5501f5..0dacc6f 100644
--- a/docs/libcurl/opts/CURLOPT_QUOTE.3
+++ b/docs/libcurl/opts/CURLOPT_QUOTE.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_QUOTE 3 "August 14, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_QUOTE 3 "February 08, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_QUOTE \- (S)FTP commands to run before transfer
@@ -34,14 +34,21 @@
 (even before the CWD command for FTP). The linked list should be a fully valid
 list of 'struct curl_slist' structs properly filled in with text strings. Use
 \fIcurl_slist_append(3)\fP to append strings (commands) to the list, and clear
-the entire list afterwards with \fIcurl_slist_free_all(3)\fP. Disable this
-operation again by setting a NULL to this option. When speaking to an FTP
-server, prefix the command with an asterisk (*) to make libcurl continue even
-if the command fails as by default libcurl will stop at first failure.
+the entire list afterwards with \fIcurl_slist_free_all(3)\fP.
+
+Disable this operation again by setting a NULL to this option.
+
+When speaking to an FTP server, prefix the command with an asterisk (*) to
+make libcurl continue even if the command fails as by default libcurl will
+stop at first failure.
 
 The set of valid FTP commands depends on the server (see RFC959 for a list of
 mandatory commands).
 
+libcurl does not inspect, parse or "understand" the commands passed to the
+server using this option. If you change connection state, working directory or
+similar using quote commands, libcurl will not know about it.
+
 The valid SFTP commands are:
 .RS
 .IP "atime date file"
diff --git a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
index 0477485..a2c6987 100644
--- a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
+++ b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RANDOM_FILE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RANDOM_FILE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RANDOM_FILE \- specify a source for random data
diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3
index cf77786..541af64 100644
--- a/docs/libcurl/opts/CURLOPT_RANGE.3
+++ b/docs/libcurl/opts/CURLOPT_RANGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RANGE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RANGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RANGE \- set byte range to request
@@ -50,7 +50,7 @@
 \fICURLOPT_RESUME_FROM(3)\fP, set end (resume+size) position using
 \fICURLOPT_INFILESIZE(3)\fP and seek to the resume position before initiating
 the transfer for each part. For more information refer to
-https://curl.haxx.se/mail/lib-2019-05/0012.html
+https://curl.se/mail/lib-2019-05/0012.html
 
 Pass a NULL to this option to disable the use of ranges.
 
diff --git a/docs/libcurl/opts/CURLOPT_READDATA.3 b/docs/libcurl/opts/CURLOPT_READDATA.3
index 778a6d0..b8e6917 100644
--- a/docs/libcurl/opts/CURLOPT_READDATA.3
+++ b/docs/libcurl/opts/CURLOPT_READDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_READDATA 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_READDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_READDATA \- custom pointer passed to the read callback
diff --git a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 b/docs/libcurl/opts/CURLOPT_READFUNCTION.3
index c6c3af1..ba1ee92 100644
--- a/docs/libcurl/opts/CURLOPT_READFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_READFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_READFUNCTION 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_READFUNCTION 3 "December 30, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_READFUNCTION \- read callback for data uploads
@@ -76,7 +76,7 @@
 This is used for all protocols when doing uploads.
 .SH EXAMPLE
 .nf
-size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userdata)
+size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userdata)
 {
   FILE *readhere = (FILE *)userdata;
   curl_off_t nread;
diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
index 1bc786f..8239ea1 100644
--- a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
+++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_REDIR_PROTOCOLS 3 "February 18, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_REDIR_PROTOCOLS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to
diff --git a/docs/libcurl/opts/CURLOPT_REFERER.3 b/docs/libcurl/opts/CURLOPT_REFERER.3
index b95f897..eb77867 100644
--- a/docs/libcurl/opts/CURLOPT_REFERER.3
+++ b/docs/libcurl/opts/CURLOPT_REFERER.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_REFERER 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_REFERER 3 "February 19, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_REFERER \- set the HTTP referer header
@@ -59,3 +59,4 @@
 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 .SH "SEE ALSO"
 .BR CURLOPT_USERAGENT "(3), " CURLOPT_HTTPHEADER "(3), "
+.BR CURLINFO_REFERER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 b/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3
index 04ed9f3..1ba67ea 100644
--- a/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3
+++ b/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_REQUEST_TARGET 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_REQUEST_TARGET 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_REQUEST_TARGET \- specify an alternative target for this request
diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3
index 43763cf..89e2596 100644
--- a/docs/libcurl/opts/CURLOPT_RESOLVE.3
+++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RESOLVE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RESOLVE 3 "April 24, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RESOLVE \- provide custom host name to IP address resolves
@@ -38,7 +38,7 @@
 to clean up an entire list.
 
 Each single name resolve string should be written using the format
-HOST:PORT:ADDRESS[,ADDRESS]... where HOST is the name libcurl will try
+[+]HOST:PORT:ADDRESS[,ADDRESS]... where HOST is the name libcurl will try
 to resolve, PORT is the port number of the service where libcurl wants
 to connect to the HOST and ADDRESS is one or more numerical IP
 addresses. If you specify multiple ip addresses they need to be
@@ -47,17 +47,19 @@
 
 This option effectively pre-populates the DNS cache with entries for the
 host+port pair so redirects and everything that operations against the
-HOST+PORT will instead use your provided ADDRESS. Addresses set with
-\fICURLOPT_RESOLVE(3)\fP will not time-out from the DNS cache like ordinary
-entries.
+HOST+PORT will instead use your provided ADDRESS.
 
-If the DNS cache already have an entry for the given host+port pair, then
+The optional leading "+" signifies whether the new entry should time-out or
+not. Entries added with "HOST:..." will never time-out whereas entries added
+with "+HOST:..." will time-out just like ordinary DNS cache entries.
+
+If the DNS cache already has an entry for the given host+port pair, then
 this entry will be removed and a new entry will be created. This is because
-old entry may have have different addresses or be ordinary entries with
-time-outs.
+the old entry may have have different addresses or a different time-out
+setting.
 
-The provided ADDRESS set by this option will be used even if
-\fICURLOPT_IPRESOLVE(3)\fP is set to make libcurl use another IP version.
+An ADDRESS provided by this option will only be use if not restricted by
+the setting of \fICURLOPT_IPRESOLVE(3)\fP to a different IP version.
 
 Remove names from the DNS cache again, to stop providing these fake resolves,
 by including a string in the linked list that uses the format
@@ -67,6 +69,9 @@
 Support for providing the ADDRESS within [brackets] was added in 7.57.0.
 
 Support for providing multiple IP addresses per entry was added in 7.59.0.
+
+Support for adding non-permanent entries by using the "+" prefix was added in
+7.75.0.
 .SH DEFAULT
 NULL
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 b/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3
index 4347e49..d352db3 100644
--- a/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3
+++ b/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RESOLVER_START_DATA 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RESOLVER_START_DATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RESOLVER_START_DATA \- custom pointer passed to the resolver start callback
diff --git a/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3
index 9b8250c..0cc2b1d 100644
--- a/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RESOLVER_START_FUNCTION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RESOLVER_START_FUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RESOLVER_START_FUNCTION \- set callback to be called before a new resolve request is started
diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
index fa0484c..22ff50a 100644
--- a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
+++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RESUME_FROM 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RESUME_FROM 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RESUME_FROM \- set a point to resume transfer from
diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3
index 9826552..722405a 100644
--- a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RESUME_FROM_LARGE 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RESUME_FROM_LARGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
index c944cf6..effdaa1 100644
--- a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
+++ b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
index 49a5c7b..1d4413a 100644
--- a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
+++ b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RTSP_REQUEST 3 "July 16, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RTSP_REQUEST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RTSP_REQUEST \- specify RTSP request
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
index 96fb872..1aaa252 100644
--- a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
+++ b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RTSP_SERVER_CSEQ 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
index 131a210..a5fa3ed 100644
--- a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
+++ b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RTSP_SESSION_ID 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RTSP_SESSION_ID \- set RTSP session ID
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
index 6d8c450..753c275 100644
--- a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
+++ b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RTSP_STREAM_URI 3 "July 16, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RTSP_STREAM_URI 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
index 96c262f..48c63f0 100644
--- a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
+++ b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_RTSP_TRANSPORT 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_RTSP_TRANSPORT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header
diff --git a/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3 b/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3
index 35e6c00..1dcd46a 100644
--- a/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3
+++ b/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SASL_AUTHZID 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SASL_AUTHZID 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SASL_AUTHZID \- authorisation identity (identity to act as)
diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.3 b/docs/libcurl/opts/CURLOPT_SASL_IR.3
index 09a2bec..7242faa 100644
--- a/docs/libcurl/opts/CURLOPT_SASL_IR.3
+++ b/docs/libcurl/opts/CURLOPT_SASL_IR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SASL_IR 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SASL_IR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SASL_IR \- enable sending initial response in first packet
diff --git a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 b/docs/libcurl/opts/CURLOPT_SEEKDATA.3
index 4c71c5a..97a42f2 100644
--- a/docs/libcurl/opts/CURLOPT_SEEKDATA.3
+++ b/docs/libcurl/opts/CURLOPT_SEEKDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SEEKDATA 3 "October 31, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SEEKDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SEEKDATA \- custom pointer passed to the seek callback
diff --git a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
index d740abf..1bfd853 100644
--- a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SEEKFUNCTION 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SEEKFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream
diff --git a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
index 9411772..b157095 100644
--- a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
+++ b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SERVICE_NAME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SERVICE_NAME \- authentication service name
diff --git a/docs/libcurl/opts/CURLOPT_SHARE.3 b/docs/libcurl/opts/CURLOPT_SHARE.3
index 193d811..3f7b4cd 100644
--- a/docs/libcurl/opts/CURLOPT_SHARE.3
+++ b/docs/libcurl/opts/CURLOPT_SHARE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SHARE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SHARE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SHARE \- specify share handle to use
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
index cc43ac4..deeffc2 100644
--- a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SOCKOPTDATA 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SOCKOPTDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
index efce2a6..af256e8 100644
--- a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SOCKOPTFUNCTION 3 "May 15, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SOCKOPTFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3
index 1dc698f..86efa97 100644
--- a/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SOCKS5_AUTH 3 "April 27, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SOCKS5_AUTH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SOCKS5_AUTH \- set allowed methods for SOCKS5 proxy authentication
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
index 7bbae66..89cbbaa 100644
--- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
index 59d5b63..79d2a4d 100644
--- a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SOCKS5_GSSAPI_SERVICE \- SOCKS5 proxy authentication service name
diff --git a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
index 09b8b40..4834a14 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_AUTH_TYPES 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_AUTH_TYPES 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP
diff --git a/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 b/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3
index 9fea861..3ba3672 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_COMPRESSION 3 "August 10, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_COMPRESSION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_COMPRESSION \- enables compression / decompression of SSH traffic
diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
index cb8b3fa..ce9ac5f 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
index 2c09702..0f36a4e 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_KEYDATA 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_KEYDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
index fcd95a2..d4857e8 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_KEYFUNCTION 3 "July 15, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_KEYFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
index dcdc909..1453f08 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_KNOWNHOSTS 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_KNOWNHOSTS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts
diff --git a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
index 402e57b..64d8be4 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth
diff --git a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
index 75c05ec..f381e6a 100644
--- a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
+++ b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_SSLCERT.3
index 5af0e95..87068e9 100644
--- a/docs/libcurl/opts/CURLOPT_SSLCERT.3
+++ b/docs/libcurl/opts/CURLOPT_SSLCERT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLCERT 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLCERT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLCERT \- set SSL client certificate
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
index 324996a..66c6ccd 100644
--- a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
+++ b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLCERTTYPE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLCERTTYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.3 b/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.3
index ed13d6c..348652c 100644
--- a/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.3
+++ b/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLCERT_BLOB 3 "24 Jun 2020" "libcurl 7.71.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLCERT_BLOB 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_SSLCERT_BLOB \- SSL client certificate from memory blob
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE.3
index 7be56ea..d7802bc 100644
--- a/docs/libcurl/opts/CURLOPT_SSLENGINE.3
+++ b/docs/libcurl/opts/CURLOPT_SSLENGINE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLENGINE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLENGINE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLENGINE \- set SSL engine identifier
diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
index 559a4f0..025979e 100644
--- a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
+++ b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLENGINE_DEFAULT 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLENGINE_DEFAULT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_SSLKEY.3
index ce1208a..8fc7431 100644
--- a/docs/libcurl/opts/CURLOPT_SSLKEY.3
+++ b/docs/libcurl/opts/CURLOPT_SSLKEY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLKEY 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLKEY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
index 2b71c08..5202a8f 100644
--- a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
+++ b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLKEYTYPE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLKEYTYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLKEYTYPE \- set type of the private key file
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.3 b/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.3
index 1f657c8..8ee4a52 100644
--- a/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.3
+++ b/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLKEY_BLOB 3 "24 Jun 2020" "libcurl 7.71.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLKEY_BLOB 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_SSLKEY_BLOB \- private key for client cert from memory blob
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_SSLVERSION.3
index 7b12b9d..38c60d0 100644
--- a/docs/libcurl/opts/CURLOPT_SSLVERSION.3
+++ b/docs/libcurl/opts/CURLOPT_SSLVERSION.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2019, 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSLVERSION 3 "October 31, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSLVERSION 3 "March 22, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSLVERSION \- set preferred TLS/SSL version
@@ -44,9 +44,9 @@
 .IP CURL_SSLVERSION_TLSv1
 TLS v1.0 or later
 .IP CURL_SSLVERSION_SSLv2
-SSL v2 (but not SSLv3)
+SSL v2 - refused
 .IP CURL_SSLVERSION_SSLv3
-SSL v3 (but not SSLv2)
+SSL v3 - refused
 .IP CURL_SSLVERSION_TLSv1_0
 TLS v1.0 or later (Added in 7.34.0)
 .IP CURL_SSLVERSION_TLSv1_1
@@ -103,6 +103,8 @@
 }
 .fi
 .SH AVAILABILITY
+SSLv2 and SSLv3 are refused completely since curl 7.77.0
+
 SSLv2 is disabled by default since 7.18.1. Other SSL versions availability may
 vary depending on which backend libcurl has been built to use.
 
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
index 2c6ef0d..5a72874 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_CIPHER_LIST 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_CIPHER_LIST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS
@@ -41,7 +41,7 @@
 
 You'll find more details about cipher lists on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
 \'rsa_aes_128_sha\', etc. With NSS you don't add/remove ciphers. If one uses
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
index 167fe32..807a793 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_CTX_DATA 3 "June 02, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_CTX_DATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
index ed23889..a0bc569 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_CTX_FUNCTION 3 "June 02, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_CTX_FUNCTION 3 "July 16, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL or mbedTLS
@@ -63,6 +63,14 @@
 knowing anything about it, which then subsequently can lead to libcurl
 unknowingly reusing SSL connections with different properties. To remedy this
 you may set \fICURLOPT_FORBID_REUSE(3)\fP from the callback function.
+
+WARNING: If you are using DNS-over-HTTPS (DoH) via \fICURLOPT_DOH_URL(3)\fP
+then the CTX callback will also be called for those transfers and the curl
+handle is set to an internal handle. \fBThis behavior is subject to change.\fP
+We recommend before performing your transfer set \fICURLOPT_PRIVATE(3)\fP on
+your curl handle so you can identify it in the CTX callback. If you have a
+reason to modify DoH SSL context please let us know on the curl-library mailing
+list because we are considering removing this capability.
 .SH DEFAULT
 NULL
 .SH PROTOCOLS
@@ -70,7 +78,7 @@
 .SH EXAMPLE
 See cacertinmem.c in docs/examples directory for usage example.
 
-https://curl.haxx.se/libcurl/c/cacertinmem.html
+https://curl.se/libcurl/c/cacertinmem.html
 .SH AVAILABILITY
 Added in 7.11.0 for OpenSSL, in 7.42.0 for wolfSSL and in 7.54.0 for
 mbedTLS. Other SSL backends are not supported.
diff --git a/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.3 b/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.3
index db2d873..dca1a88 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_EC_CURVES 3 "August 29, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_EC_CURVES 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_EC_CURVES \- set key exchange curves
diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
index db7b7c2..d4cce50 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_ENABLE_ALPN 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_ENABLE_ALPN 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_ENABLE_ALPN \- enable ALPN
diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
index 5f4fae6..276c4d6 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_ENABLE_NPN 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_ENABLE_NPN 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_ENABLE_NPN \- enable NPN
diff --git a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
index c0bb767..0b2f027 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_FALSESTART 3 "May 15, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_FALSESTART 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_FALSESTART \- enable TLS false start
diff --git a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
index 46b5f08..a8cfb31 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_OPTIONS 3 "July 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_OPTIONS 3 "February 27, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_OPTIONS \- set SSL behavior options
@@ -61,6 +61,14 @@
 verification. Works only on Windows when built to use OpenSSL. This option is
 experimental and behavior is subject to change.
 (Added in 7.71.0)
+.IP CURLSSLOPT_AUTO_CLIENT_CERT
+Tell libcurl to automatically locate and use a client certificate for
+authentication, when requested by the server. This option is only supported
+for Schannel (the native Windows SSL library). Prior to 7.77.0 this was the
+default behavior in libcurl with Schannel. Since the server can request any
+certificate that supports client authentication in the OS certificate store it
+could be a privacy violation and unexpected.
+(Added in 7.77.0)
 .SH DEFAULT
 0
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
index fdc1077..3601e64 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_SESSIONID_CACHE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_SESSIONID_CACHE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
index 2190541..d76387b 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_VERIFYHOST 3 "July 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_VERIFYHOST 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
index 47d5a26..8676e64 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_VERIFYPEER 3 "June 24, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_VERIFYPEER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
index fcbfe6f..9c8f0bd 100644
--- a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SSL_VERIFYSTATUS 3 "October 09, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SSL_VERIFYSTATUS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status
diff --git a/docs/libcurl/opts/CURLOPT_STDERR.3 b/docs/libcurl/opts/CURLOPT_STDERR.3
index ce20f2d..1a599ed 100644
--- a/docs/libcurl/opts/CURLOPT_STDERR.3
+++ b/docs/libcurl/opts/CURLOPT_STDERR.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_STDERR 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_STDERR 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_STDERR \- redirect stderr to another stream
diff --git a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3
index 38da9c8..e0a1137 100644
--- a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3
+++ b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_STREAM_DEPENDS 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_STREAM_DEPENDS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_STREAM_DEPENDS \- set stream this transfer depends on
diff --git a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3
index f472a75..c88208b 100644
--- a/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3
+++ b/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_STREAM_DEPENDS_E 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_STREAM_DEPENDS_E 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_STREAM_DEPENDS_E \- set stream this transfer depends on exclusively
diff --git a/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 b/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3
index c063050..cce0610 100644
--- a/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3
+++ b/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_STREAM_WEIGHT 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_STREAM_WEIGHT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_STREAM_WEIGHT \- set numerical stream weight
diff --git a/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 b/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3
index e23b557..c4495ae 100644
--- a/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3
+++ b/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "April 28, 2016" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_SUPPRESS_CONNECT_HEADERS \- Suppress proxy CONNECT response headers from user callbacks
diff --git a/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 b/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3
index 1a39db2..13c676f 100644
--- a/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3
+++ b/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TCP_FASTOPEN 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TCP_FASTOPEN 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TCP_FASTOPEN \- enable TCP Fast Open
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
index 3a4a69e..cb270f0 100644
--- a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TCP_KEEPALIVE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TCP_KEEPALIVE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
index 26bb554..b56eb76 100644
--- a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TCP_KEEPIDLE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TCP_KEEPIDLE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
index b4d2c6f..44b4871 100644
--- a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TCP_KEEPINTVL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TCP_KEEPINTVL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval
diff --git a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
index 53a41d7..1868fb2 100644
--- a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
+++ b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TCP_NODELAY 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TCP_NODELAY 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option
@@ -52,7 +52,7 @@
 CURL *curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-  /* disable Nagle */
+  /* leave Nagle enabled */
   curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 0);
   curl_easy_perform(curl);
 }
diff --git a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
index 913a5f3..a61e848 100644
--- a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
+++ b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TELNETOPTIONS 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TELNETOPTIONS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TELNETOPTIONS \- custom telnet options
diff --git a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
index 55bd09d..6670f01 100644
--- a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
+++ b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TFTP_BLKSIZE 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TFTP_BLKSIZE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TFTP_BLKSIZE \- TFTP block size
diff --git a/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3
index 9d9ab50..7c2eb0d 100644
--- a/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3
+++ b/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TFTP_NO_OPTIONS 3 "April 06, 2016" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TFTP_NO_OPTIONS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TFTP_NO_OPTIONS \- Do not send TFTP options requests.
diff --git a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
index 00e9432..5e97354 100644
--- a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
+++ b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TIMECONDITION 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TIMECONDITION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TIMECONDITION \- select condition for a time request
diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT.3
index 19d5749..07321ba 100644
--- a/docs/libcurl/opts/CURLOPT_TIMEOUT.3
+++ b/docs/libcurl/opts/CURLOPT_TIMEOUT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TIMEOUT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TIMEOUT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
index 103692b..5d61a8f 100644
--- a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
+++ b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TIMEOUT_MS 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TIMEOUT_MS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take
diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
index b352f67..8bf177f 100644
--- a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
+++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TIMEVALUE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TIMEVALUE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TIMEVALUE \- set time value for conditional
diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3
index 4ebfb01..5827c8d 100644
--- a/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TIMEVALUE_LARGE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TIMEVALUE_LARGE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TIMEVALUE_LARGE \- set time value for conditional
diff --git a/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 b/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3
index abd767b..0dc89f2 100644
--- a/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3
+++ b/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TLS13_CIPHERS 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TLS13_CIPHERS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TLS13_CIPHERS \- specify ciphers suites to use for TLS 1.3
@@ -35,7 +35,7 @@
 
 You'll find more details about cipher lists on this URL:
 
- https://curl.haxx.se/docs/ssl-ciphers.html
+ https://curl.se/docs/ssl-ciphers.html
 
 This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 later. If you are using a different SSL backend you can try setting TLS 1.3
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
index 7b9a97c..ba65dc0 100644
--- a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TLSAUTH_PASSWORD 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TLSAUTH_PASSWORD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
index e52efb4..fdcfb7e 100644
--- a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TLSAUTH_TYPE 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TLSAUTH_TYPE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
index ceecec0..1b3f383 100644
--- a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TLSAUTH_USERNAME 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TLSAUTH_USERNAME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication
diff --git a/docs/libcurl/opts/CURLOPT_TRAILERDATA.3 b/docs/libcurl/opts/CURLOPT_TRAILERDATA.3
index d5133d7..1d395da 100644
--- a/docs/libcurl/opts/CURLOPT_TRAILERDATA.3
+++ b/docs/libcurl/opts/CURLOPT_TRAILERDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TRAILERDATA 3 "October 31, 2019" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TRAILERDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TRAILERDATA \- Custom pointer passed to the trailing headers callback
diff --git a/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3
index 42bcc16..1b521cf 100644
--- a/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TRAILERFUNCTION 3 "October 03, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TRAILERFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TRAILERFUNCTION \- Set callback for sending trailing headers
diff --git a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
index cb59cb7..2ef66a8 100644
--- a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
+++ b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TRANSFERTEXT 3 "May 31, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TRANSFERTEXT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP
diff --git a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
index c3cc93f..630c2d4 100644
--- a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
+++ b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_TRANSFER_ENCODING 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_TRANSFER_ENCODING 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding
diff --git a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
index fa6544f..b8c6f0b 100644
--- a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
+++ b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_UNIX_SOCKET_PATH 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_UNIX_SOCKET_PATH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket
diff --git a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
index 92fede0..2cc20d1 100644
--- a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
+++ b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_UNRESTRICTED_AUTH 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_UNRESTRICTED_AUTH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too
diff --git a/docs/libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3 b/docs/libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3
index 91eea1b..969d1f3 100644
--- a/docs/libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3
+++ b/docs/libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_UPKEEP_INTERVAL_MS 3 "31 Oct 2018" "libcurl 7.62.0" "curl_easy_setopt options"
+.TH CURLOPT_UPKEEP_INTERVAL_MS 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
+
 .SH NAME
 CURLOPT_UPKEEP_INTERVAL_MS \- connection upkeep interval
 .SH SYNOPSIS
diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3
index 668ee89..5c24e6a 100644
--- a/docs/libcurl/opts/CURLOPT_UPLOAD.3
+++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_UPLOAD 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_UPLOAD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_UPLOAD \- enable data upload
diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3
index 184b12b..ac6505e 100644
--- a/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3
+++ b/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2018, 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_UPLOAD_BUFFERSIZE 3 "August 18, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_UPLOAD_BUFFERSIZE 3 "May 06, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_UPLOAD_BUFFERSIZE \- set preferred upload buffer size
@@ -44,6 +44,9 @@
 
 Since curl 7.61.1 the upload buffer is allocated on-demand - so if the handle
 isn't used for upload, this buffer will not be allocated at all.
+
+DO NOT set this option on a handle that is currently used for an active
+transfer as that may lead to unintended consequences.
 .SH DEFAULT
 64 kB
 .SH PROTOCOLS
diff --git a/docs/libcurl/opts/CURLOPT_URL.3 b/docs/libcurl/opts/CURLOPT_URL.3
index bb2916d..2423d79 100644
--- a/docs/libcurl/opts/CURLOPT_URL.3
+++ b/docs/libcurl/opts/CURLOPT_URL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_URL 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_URL 3 "June 15, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_URL \- provide the URL to use in the request
@@ -65,237 +65,6 @@
 \fICURLOPT_URL(3)\fP or \fICURLOPT_CURLU(3)\fP \fBmust\fP be set before a
 transfer is started.
 
-The host part of the URL contains the address of the server that you want to
-connect to. This can be the fully qualified domain name of the server, the
-local network name of the machine on your network or the IP address of the
-server or machine represented by either an IPv4 or IPv6 address. For example:
-
-http://www.example.com/
-
-http://hostname/
-
-http://192.168.0.1/
-
-http://[2001:1890:1112:1::20]/
-
-It is also possible to specify the user name, password and any supported login
-options as part of the host, for the following protocols, when connecting to
-servers that require authentication:
-
-http://user:password@www.example.com
-
-ftp://user:password@ftp.example.com
-
-smb://domain%2fuser:password@server.example.com
-
-imap://user:password;options@mail.example.com
-
-pop3://user:password;options@mail.example.com
-
-smtp://user:password;options@mail.example.com
-
-At present only IMAP, POP3 and SMTP support login options as part of the host.
-For more information about the login options in URL syntax please see RFC2384,
-RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
-
-The port is optional and when not specified libcurl will use the default port
-based on the determined or specified protocol: 80 for HTTP, 21 for FTP and 25
-for SMTP, etc. The following examples show how to specify the port:
-
-http://www.example.com:8080/ - This will connect to a web server using port
-8080 rather than 80.
-
-smtp://mail.example.com:587/ - This will connect to a SMTP server on the
-alternative mail port.
-
-The path part of the URL is protocol specific and whilst some examples are
-given below this list is not conclusive:
-
-.IP HTTP
-The path part of an HTTP request specifies the file to retrieve and from what
-directory. If the directory is not specified then the web server's root
-directory is used. If the file is omitted then the default document will be
-retrieved for either the directory specified or the root directory. The exact
-resource returned for each URL is entirely dependent on the server's
-configuration.
-
-http://www.example.com - This gets the main page from the web server.
-
-http://www.example.com/index.html - This returns the main page by explicitly
-requesting it.
-
-http://www.example.com/contactus/ - This returns the default document from
-the contactus directory.
-
-.IP FTP
-The path part of an FTP request specifies the file to retrieve and from what
-directory. If the file part is omitted then libcurl downloads the directory
-listing for the directory specified. If the directory is omitted then
-the directory listing for the root / home directory will be returned.
-
-ftp://ftp.example.com - This retrieves the directory listing for the root
-directory.
-
-ftp://ftp.example.com/readme.txt - This downloads the file readme.txt from the
-root directory.
-
-ftp://ftp.example.com/libcurl/readme.txt - This downloads readme.txt from the
-libcurl directory.
-
-ftp://user:password@ftp.example.com/readme.txt - This retrieves the readme.txt
-file from the user's home directory. When a username and password is
-specified, everything that is specified in the path part is relative to the
-user's home directory. To retrieve files from the root directory or a
-directory underneath the root directory then the absolute path must be
-specified by prepending an additional forward slash to the beginning of the
-path.
-
-ftp://user:password@ftp.example.com//readme.txt - This retrieves the readme.txt
-from the root directory when logging in as a specified user.
-
-.IP FILE
-When a FILE:// URL is accessed on Windows systems, it can be crafted in a way
-so that Windows attempts to connect to a (remote) machine when curl wants to
-read or write such a path.
-.IP SMTP
-The path part of a SMTP request specifies the host name to present during
-communication with the mail server. If the path is omitted then libcurl will
-attempt to resolve the local computer's host name. However, this may not
-return the fully qualified domain name that is required by some mail servers
-and specifying this path allows you to set an alternative name, such as
-your machine's fully qualified domain name, which you might have obtained
-from an external function such as gethostname or getaddrinfo.
-
-smtp://mail.example.com - This connects to the mail server at example.com and
-sends your local computer's host name in the HELO / EHLO command.
-
-smtp://mail.example.com/client.example.com - This will send client.example.com in
-the HELO / EHLO command to the mail server at example.com.
-
-.IP POP3
-The path part of a POP3 request specifies the message ID to retrieve. If the
-ID is not specified then a list of waiting messages is returned instead.
-
-pop3://user:password@mail.example.com - This lists the available messages for
-the user
-
-pop3://user:password@mail.example.com/1 - This retrieves the first message for
-the user
-
-.IP IMAP
-The path part of an IMAP request not only specifies the mailbox to list (Added
-in 7.30.0) or select, but can also be used to check the UIDVALIDITY of the
-mailbox, to specify the UID, SECTION (Added in 7.30.0) and PARTIAL octets
-(Added in 7.37.0) of the message to fetch and to specify what messages to
-search for (Added in 7.37.0).
-
-imap://user:password@mail.example.com - Performs a top level folder list
-
-imap://user:password@mail.example.com/INBOX - Performs a folder list on the
-user's inbox
-
-imap://user:password@mail.example.com/INBOX/;UID=1 - Selects the user's inbox
-and fetches message with uid = 1
-
-imap://user:password@mail.example.com/INBOX/;MAILINDEX=1 - Selects the user's inbox
-and fetches the first message in the mail box
-
-imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2 - Selects
-the user's inbox, checks the UIDVALIDITY of the mailbox is 50 and fetches
-message 2 if it is
-
-imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT - Selects the
-user's inbox and fetches the text portion of message 3
-
-imap://user:password@mail.example.com/INBOX/;UID=4/;PARTIAL=0.1024 - Selects
-the user's inbox and fetches the first 1024 octets of message 4
-
-imap://user:password@mail.example.com/INBOX?NEW - Selects the user's inbox and
-checks for NEW messages
-
-imap://user:password@mail.example.com/INBOX?SUBJECT%20shadows - Selects the
-user's inbox and searches for messages containing "shadows" in the subject
-line
-
-For more information about the individual components of an IMAP URL please
-see RFC5092.
-
-.IP SCP
-The path part of a SCP request specifies the file to retrieve and from what
-directory. The file part may not be omitted. The file is taken as an absolute
-path from the root directory on the server. To specify a path relative to the
-user's home directory on the server, prepend ~/ to the path portion.  If the
-user name is not embedded in the URL, it can be set with the
-\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option.
-
-scp://user@example.com/etc/issue - This specifies the file /etc/issue
-
-scp://example.com/~/my-file - This specifies the file my-file in the
-user's home directory on the server
-.IP SFTP
-The path part of a SFTP request specifies the file to retrieve and from what
-directory. If the file part is omitted then libcurl downloads the directory
-listing for the directory specified.  If the path ends in a / then a directory
-listing is returned instead of a file.  If the path is omitted entirely then
-the directory listing for the root / home directory will be returned.  If the
-user name is not embedded in the URL, it can be set with the
-\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option.
-
-sftp://user:password@example.com/etc/issue - This specifies the file
-/etc/issue
-
-sftp://user@example.com/~/my-file - This specifies the file my-file in the
-user's home directory
-
-sftp://ssh.example.com/~/Documents/ - This requests a directory listing
-of the Documents directory under the user's home directory
-
-.IP SMB
-The path part of a SMB request specifies the file to retrieve and from what
-share and directory or the share to upload to and as such, may not be omitted.
-If the user name is not embedded in the URL, it can be set with the
-\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option. If the user name
-is embedded in the URL then it must contain the domain name and as such, the
-backslash must be URL encoded as %2f.
-
-smb://server.example.com/files/issue - This specifies the file "issue" located
-in the root of the "files" share
-
-smb://server.example.com/files/ -T issue - This specifies the file "issue" will
-be uploaded to the root of the "files" share.
-
-curl supports SMB version 1 (only)
-.IP LDAP
-The path part of a LDAP request can be used to specify the: Distinguished
-Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field
-is separated by a question mark and when that field is not required an empty
-string with the question mark separator should be included.
-
-ldap://ldap.example.com/o=My%20Organisation - This will perform a LDAP search
-with the DN as My Organisation.
-
-ldap://ldap.example.com/o=My%20Organisation?postalAddress - This will perform
-the same search but will only return postalAddress attributes.
-
-ldap://ldap.example.com/?rootDomainNamingContext - This specifies an empty DN
-and requests information about the rootDomainNamingContext attribute for an
-Active Directory server.
-
-For more information about the individual components of a LDAP URL please
-see RFC4516.
-.IP RTMP
-There's no official URL spec for RTMP so libcurl uses the URL syntax supported
-by the underlying librtmp library. It has a syntax where it wants a
-traditional URL, followed by a space and a series of space-separated
-name=value pairs.
-
-While space is not typically a "legal" letter, libcurl accepts them. When a
-user wants to pass in a '#' (hash) character it will be treated as a fragment
-and get cut off by libcurl if provided literally. You will instead have to
-escape it by providing it as backslash and its ASCII value in hexadecimal:
-"\\23".
-
-.RS 0
 The application does not have to keep the string around after setting this
 option.
 .SH ENCODING
@@ -304,7 +73,7 @@
 
 If libcurl is built with IDN support, the server name part of the URL can use
 an "international name" by using the current encoding (according to locale) or
-UTF-8 (when winidn is used).
+UTF-8 (when winidn is used; or a Windows Unicode build using libidn2).
 
 If libcurl is built without IDN support, the server name is used exactly as
 specified when passed to the name resolver functions.
diff --git a/docs/libcurl/opts/CURLOPT_USERAGENT.3 b/docs/libcurl/opts/CURLOPT_USERAGENT.3
index 06bf2a2..2c9a80e 100644
--- a/docs/libcurl/opts/CURLOPT_USERAGENT.3
+++ b/docs/libcurl/opts/CURLOPT_USERAGENT.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_USERAGENT 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_USERAGENT 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_USERAGENT \- set HTTP user-agent header
diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.3 b/docs/libcurl/opts/CURLOPT_USERNAME.3
index 89497e7..9ced4f1 100644
--- a/docs/libcurl/opts/CURLOPT_USERNAME.3
+++ b/docs/libcurl/opts/CURLOPT_USERNAME.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_USERNAME 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_USERNAME 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_USERNAME \- user name to use in authentication
diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.3 b/docs/libcurl/opts/CURLOPT_USERPWD.3
index 2706bbf..fe89d84 100644
--- a/docs/libcurl/opts/CURLOPT_USERPWD.3
+++ b/docs/libcurl/opts/CURLOPT_USERPWD.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_USERPWD 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_USERPWD 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_USERPWD \- user name and password to use in authentication
diff --git a/docs/libcurl/opts/CURLOPT_USE_SSL.3 b/docs/libcurl/opts/CURLOPT_USE_SSL.3
index 8382a37..3bc98a2 100644
--- a/docs/libcurl/opts/CURLOPT_USE_SSL.3
+++ b/docs/libcurl/opts/CURLOPT_USE_SSL.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_USE_SSL 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_USE_SSL 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_USE_SSL \- request using SSL / TLS for the transfer
diff --git a/docs/libcurl/opts/CURLOPT_VERBOSE.3 b/docs/libcurl/opts/CURLOPT_VERBOSE.3
index 8b307c1..b9125c1 100644
--- a/docs/libcurl/opts/CURLOPT_VERBOSE.3
+++ b/docs/libcurl/opts/CURLOPT_VERBOSE.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_VERBOSE 3 "September 16, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_VERBOSE 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_VERBOSE \- set verbose mode on/off
diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
index b90fca6..91b9a97 100644
--- a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
+++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_WILDCARDMATCH 3 "May 18, 2018" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_WILDCARDMATCH 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers
@@ -79,7 +79,7 @@
 .SH PROTOCOLS
 This feature is only supported for FTP download.
 .SH EXAMPLE
-See https://curl.haxx.se/libcurl/c/ftp-wildcard.html
+See https://curl.se/libcurl/c/ftp-wildcard.html
 .SH AVAILABILITY
 Added in 7.21.0
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 b/docs/libcurl/opts/CURLOPT_WRITEDATA.3
index f6b6764..adc5b51 100644
--- a/docs/libcurl/opts/CURLOPT_WRITEDATA.3
+++ b/docs/libcurl/opts/CURLOPT_WRITEDATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_WRITEDATA 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_WRITEDATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_WRITEDATA \- custom pointer passed to the write callback
@@ -50,7 +50,7 @@
 into a dynamically growing allocated buffer, and then this
 \fICURLOPT_WRITEDATA(3)\fP is used to point to a struct or the buffer to store
 data in. Like in the getinmemory example:
-https://curl.haxx.se/libcurl/c/getinmemory.html
+https://curl.se/libcurl/c/getinmemory.html
 .SH AVAILABILITY
 Available in all libcurl versions. This option was formerly known as
 \fICURLOPT_FILE\fP, the name \fICURLOPT_WRITEDATA(3)\fP was introduced in
diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
index 3156c8f..facfeca 100644
--- a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_WRITEFUNCTION 3 "August 24, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_WRITEFUNCTION 3 "June 09, 2021" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_WRITEFUNCTION \- set callback for writing received data
@@ -68,6 +68,9 @@
 Set this option to NULL to get the internal default function used instead of
 your callback. The internal default function will write the data to the FILE *
 given with \fICURLOPT_WRITEDATA(3)\fP.
+
+This option doesn't enable HSTS, you need to use \fICURLOPT_HSTS_CTRL(3)\fP to
+do that.
 .SH DEFAULT
 libcurl will use 'fwrite' as a callback by default.
 .SH PROTOCOLS
@@ -100,7 +103,7 @@
    return realsize;
  }
 
- struct memory chunk;
+ struct memory chunk = {0};
 
  /* send all data to this function  */
  curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, cb);
diff --git a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
index 1678932..2f378a8 100644
--- a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
+++ b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_XFERINFODATA 3 "October 09, 2017" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_XFERINFODATA 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback
@@ -38,7 +38,7 @@
 .SH PROTOCOLS
 All
 .SH EXAMPLE
-https://curl.haxx.se/libcurl/c/progressfunc.html
+https://curl.se/libcurl/c/progressfunc.html
 .SH AVAILABILITY
 Added in 7.32.0
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
index 0deb566..267ec75 100644
--- a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
+++ b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_XFERINFOFUNCTION 3 "March 23, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_XFERINFOFUNCTION 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_XFERINFOFUNCTION \- callback to progress meter function
@@ -76,7 +76,7 @@
 .SH PROTOCOLS
 All
 .SH EXAMPLE
-https://curl.haxx.se/libcurl/c/progressfunc.html
+https://curl.se/libcurl/c/progressfunc.html
 .SH AVAILABILITY
 Added in 7.32.0. This callback replaces \fICURLOPT_PROGRESSFUNCTION(3)\fP
 .SH RETURN VALUE
diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
index bbdfb9f..3906ef1 100644
--- a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
+++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH CURLOPT_XOAUTH2_BEARER 3 "June 25, 2020" "libcurl 7.73.0" "curl_easy_setopt options"
+.TH CURLOPT_XOAUTH2_BEARER 3 "November 04, 2020" "libcurl 7.78.0" "curl_easy_setopt options"
 
 .SH NAME
 CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token
diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am
index 3765ea7..6596ae3 100644
--- a/docs/libcurl/opts/Makefile.am
+++ b/docs/libcurl/opts/Makefile.am
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/libcurl/opts/Makefile.inc b/docs/libcurl/opts/Makefile.inc
index fe41775..1181331 100644
--- a/docs/libcurl/opts/Makefile.inc
+++ b/docs/libcurl/opts/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -64,6 +64,7 @@
   CURLINFO_REDIRECT_TIME.3                      \
   CURLINFO_REDIRECT_TIME_T.3                    \
   CURLINFO_REDIRECT_URL.3                       \
+  CURLINFO_REFERER.3                            \
   CURLINFO_REQUEST_SIZE.3                       \
   CURLINFO_RESPONSE_CODE.3                      \
   CURLINFO_RETRY_AFTER.3                        \
@@ -114,6 +115,7 @@
   CURLOPT_AUTOREFERER.3                         \
   CURLOPT_BUFFERSIZE.3                          \
   CURLOPT_CAINFO.3                              \
+  CURLOPT_CAINFO_BLOB.3                         \
   CURLOPT_CAPATH.3                              \
   CURLOPT_CERTINFO.3                            \
   CURLOPT_CHUNK_BGN_FUNCTION.3                  \
@@ -150,6 +152,9 @@
   CURLOPT_DNS_SERVERS.3                         \
   CURLOPT_DNS_SHUFFLE_ADDRESSES.3               \
   CURLOPT_DNS_USE_GLOBAL_CACHE.3                \
+  CURLOPT_DOH_SSL_VERIFYHOST.3                  \
+  CURLOPT_DOH_SSL_VERIFYPEER.3                  \
+  CURLOPT_DOH_SSL_VERIFYSTATUS.3                \
   CURLOPT_DOH_URL.3                             \
   CURLOPT_EGDSOCKET.3                           \
   CURLOPT_ERRORBUFFER.3                         \
@@ -180,6 +185,12 @@
   CURLOPT_HEADERDATA.3                          \
   CURLOPT_HEADERFUNCTION.3                      \
   CURLOPT_HEADEROPT.3                           \
+  CURLOPT_HSTS.3                                \
+  CURLOPT_HSTSREADDATA.3                        \
+  CURLOPT_HSTSREADFUNCTION.3                    \
+  CURLOPT_HSTSWRITEDATA.3                       \
+  CURLOPT_HSTSWRITEFUNCTION.3                   \
+  CURLOPT_HSTS_CTRL.3                           \
   CURLOPT_HTTP09_ALLOWED.3                      \
   CURLOPT_HTTP200ALIASES.3                      \
   CURLOPT_HTTPAUTH.3                            \
@@ -257,6 +268,7 @@
   CURLOPT_PROXYUSERNAME.3                       \
   CURLOPT_PROXYUSERPWD.3                        \
   CURLOPT_PROXY_CAINFO.3                        \
+  CURLOPT_PROXY_CAINFO_BLOB.3                   \
   CURLOPT_PROXY_CAPATH.3                        \
   CURLOPT_PROXY_CRLFILE.3                       \
   CURLOPT_PROXY_KEYPASSWD.3                     \
@@ -376,6 +388,7 @@
   CURLOPT_USERNAME.3                            \
   CURLOPT_USERPWD.3                             \
   CURLOPT_USE_SSL.3                             \
+  CURLOPT_AWS_SIGV4.3                           \
   CURLOPT_VERBOSE.3                             \
   CURLOPT_WILDCARDMATCH.3                       \
   CURLOPT_WRITEDATA.3                           \
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
index 74b9550..2dc0af2 100644
--- a/docs/libcurl/symbols-in-versions
+++ b/docs/libcurl/symbols-in-versions
@@ -15,7 +15,6 @@
 CURLALTSVC_H1                   7.64.1
 CURLALTSVC_H2                   7.64.1
 CURLALTSVC_H3                   7.64.1
-CURLALTSVC_IMMEDIATELY          7.64.1
 CURLALTSVC_READONLYFILE         7.64.1
 CURLAUTH_ANY                    7.10.6
 CURLAUTH_ANYSAFE                7.10.6
@@ -30,6 +29,7 @@
 CURLAUTH_NTLM                   7.10.6
 CURLAUTH_NTLM_WB                7.22.0
 CURLAUTH_ONLY                   7.21.3
+CURLAUTH_AWS_SIGV4              7.75.0
 CURLCLOSEPOLICY_CALLBACK        7.7
 CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7
 CURLCLOSEPOLICY_LEAST_TRAFFIC   7.7
@@ -120,12 +120,14 @@
 CURLE_RTSP_SESSION_ERROR        7.20.0
 CURLE_SEND_ERROR                7.10
 CURLE_SEND_FAIL_REWIND          7.12.3
+CURLE_SETOPT_OPTION_SYNTAX      7.78.0
 CURLE_SHARE_IN_USE              7.9.6         7.17.0
 CURLE_SSH                       7.16.1
 CURLE_SSL_CACERT                7.10          7.62.0
 CURLE_SSL_CACERT_BADFILE        7.16.0
 CURLE_SSL_CERTPROBLEM           7.10
 CURLE_SSL_CIPHER                7.10
+CURLE_SSL_CLIENTCERT            7.77.0
 CURLE_SSL_CONNECT_ERROR         7.1
 CURLE_SSL_CRL_BADFILE           7.19.0
 CURLE_SSL_ENGINE_INITFAILED     7.12.3
@@ -214,6 +216,8 @@
 CURLGSSAPI_DELEGATION_POLICY_FLAG 7.22.0
 CURLHEADER_SEPARATE             7.37.0
 CURLHEADER_UNIFIED              7.37.0
+CURLHSTS_ENABLE                 7.74.0
+CURLHSTS_READONLYFILE           7.74.0
 CURLINFO_ACTIVESOCKET           7.45.0
 CURLINFO_APPCONNECT_TIME        7.19.0
 CURLINFO_APPCONNECT_TIME_T      7.61.0
@@ -269,6 +273,7 @@
 CURLINFO_REDIRECT_TIME          7.9.7
 CURLINFO_REDIRECT_TIME_T        7.61.0
 CURLINFO_REDIRECT_URL           7.18.2
+CURLINFO_REFERER                7.76.0
 CURLINFO_REQUEST_SIZE           7.4.1
 CURLINFO_RESPONSE_CODE          7.10.8
 CURLINFO_RETRY_AFTER            7.66.0
@@ -370,6 +375,7 @@
 CURLOPT_AUTOREFERER             7.1
 CURLOPT_BUFFERSIZE              7.10
 CURLOPT_CAINFO                  7.4.2
+CURLOPT_CAINFO_BLOB             7.77.0
 CURLOPT_CAPATH                  7.9.8
 CURLOPT_CERTINFO                7.19.1
 CURLOPT_CHUNK_BGN_FUNCTION      7.21.0
@@ -408,6 +414,9 @@
 CURLOPT_DNS_SERVERS             7.24.0
 CURLOPT_DNS_SHUFFLE_ADDRESSES   7.60.0
 CURLOPT_DNS_USE_GLOBAL_CACHE    7.9.3         7.11.1
+CURLOPT_DOH_SSL_VERIFYHOST      7.76.0
+CURLOPT_DOH_SSL_VERIFYPEER      7.76.0
+CURLOPT_DOH_SSL_VERIFYSTATUS    7.76.0
 CURLOPT_DOH_URL                 7.62.0
 CURLOPT_EGDSOCKET               7.7
 CURLOPT_ENCODING                7.10
@@ -444,6 +453,12 @@
 CURLOPT_HEADERDATA              7.10
 CURLOPT_HEADERFUNCTION          7.7.2
 CURLOPT_HEADEROPT               7.37.0
+CURLOPT_HSTS                    7.74.0
+CURLOPT_HSTS_CTRL               7.74.0
+CURLOPT_HSTSREADDATA            7.74.0
+CURLOPT_HSTSREADFUNCTION        7.74.0
+CURLOPT_HSTSWRITEDATA           7.74.0
+CURLOPT_HSTSWRITEFUNCTION       7.74.0
 CURLOPT_HTTP09_ALLOWED          7.64.0
 CURLOPT_HTTP200ALIASES          7.10.3
 CURLOPT_HTTPAUTH                7.10.6
@@ -530,6 +545,7 @@
 CURLOPT_PROXYUSERNAME           7.19.1
 CURLOPT_PROXYUSERPWD            7.1
 CURLOPT_PROXY_CAINFO            7.52.0
+CURLOPT_PROXY_CAINFO_BLOB       7.77.0
 CURLOPT_PROXY_CAPATH            7.52.0
 CURLOPT_PROXY_CRLFILE           7.52.0
 CURLOPT_PROXY_ISSUERCERT        7.71.0
@@ -661,6 +677,7 @@
 CURLOPT_USERNAME                7.19.1
 CURLOPT_USERPWD                 7.1
 CURLOPT_USE_SSL                 7.17.0
+CURLOPT_AWS_SIGV4               7.75.0
 CURLOPT_VERBOSE                 7.1
 CURLOPT_WILDCARDMATCH           7.21.0
 CURLOPT_WRITEDATA               7.9.7
@@ -694,6 +711,7 @@
 CURLPROTO_FTP                   7.19.4
 CURLPROTO_FTPS                  7.19.4
 CURLPROTO_GOPHER                7.21.2
+CURLPROTO_GOPHERS               7.75.0
 CURLPROTO_HTTP                  7.19.4
 CURLPROTO_HTTPS                 7.19.4
 CURLPROTO_IMAP                  7.20.0
@@ -796,11 +814,13 @@
 CURLSSLBACKEND_NSS              7.34.0
 CURLSSLBACKEND_OPENSSL          7.34.0
 CURLSSLBACKEND_POLARSSL         7.34.0       7.69.0
+CURLSSLBACKEND_RUSTLS           7.76.0
 CURLSSLBACKEND_QSOSSL           7.34.0        -           7.38.1
 CURLSSLBACKEND_SCHANNEL         7.34.0
 CURLSSLBACKEND_SECURETRANSPORT  7.64.1
 CURLSSLBACKEND_WOLFSSL          7.49.0
 CURLSSLOPT_ALLOW_BEAST          7.25.0
+CURLSSLOPT_AUTO_CLIENT_CERT     7.77.0
 CURLSSLOPT_NATIVE_CA            7.71.0
 CURLSSLOPT_NO_PARTIALCHAIN      7.68.0
 CURLSSLOPT_NO_REVOKE            7.44.0
@@ -809,6 +829,9 @@
 CURLSSLSET_OK                   7.56.0
 CURLSSLSET_TOO_LATE             7.56.0
 CURLSSLSET_UNKNOWN_BACKEND      7.56.0
+CURLSTS_DONE                    7.74.0
+CURLSTS_FAIL                    7.74.0
+CURLSTS_OK                      7.74.0
 CURLUE_BAD_HANDLE               7.62.0
 CURLUE_BAD_PARTPOINTER          7.62.0
 CURLUE_BAD_PORT_NUMBER          7.62.0
@@ -842,6 +865,7 @@
 CURLUSESSL_CONTROL              7.17.0
 CURLUSESSL_NONE                 7.17.0
 CURLUSESSL_TRY                  7.17.0
+CURLU_ALLOW_SPACE               7.78.0
 CURLU_APPENDQUERY               7.62.0
 CURLU_DEFAULT_PORT              7.62.0
 CURLU_DEFAULT_SCHEME            7.62.0
@@ -857,10 +881,12 @@
 CURLVERSION_FIFTH               7.57.0
 CURLVERSION_FIRST               7.10
 CURLVERSION_FOURTH              7.16.1
+CURLVERSION_NINTH               7.75.0
 CURLVERSION_NOW                 7.10
 CURLVERSION_SECOND              7.11.1
 CURLVERSION_SEVENTH             7.70.0
 CURLVERSION_SIXTH               7.66.0
+CURLVERSION_TENTH               7.77.0
 CURLVERSION_THIRD               7.12.0
 CURL_CHUNK_BGN_FUNC_FAIL        7.21.0
 CURL_CHUNK_BGN_FUNC_OK          7.21.0
@@ -1000,8 +1026,10 @@
 CURL_VERSION_CONV               7.15.4
 CURL_VERSION_CURLDEBUG          7.19.6
 CURL_VERSION_DEBUG              7.10.6
+CURL_VERSION_GSASL              7.76.0
 CURL_VERSION_GSSAPI             7.38.0
 CURL_VERSION_GSSNEGOTIATE       7.10.6        7.38.0
+CURL_VERSION_HSTS               7.74.0
 CURL_VERSION_HTTP2              7.33.0
 CURL_VERSION_HTTP3              7.66.0
 CURL_VERSION_HTTPS_PROXY        7.52.0
diff --git a/docs/libcurl/symbols.pl b/docs/libcurl/symbols.pl
index ed614ca..76384a6 100755
--- a/docs/libcurl/symbols.pl
+++ b/docs/libcurl/symbols.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/docs/mk-ca-bundle.1 b/docs/mk-ca-bundle.1
index 2f3d933..3502ade 100644
--- a/docs/mk-ca-bundle.1
+++ b/docs/mk-ca-bundle.1
@@ -9,7 +9,7 @@
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -113,7 +113,7 @@
 .BR curl (1)
 .SH HISTORY
 \fBmk-ca-bundle\fP is a command line tool that is shipped as part of every
-curl and libcurl release (see https://curl.haxx.se/). It was originally based
+curl and libcurl release (see https://curl.se/). It was originally based
 on the parse-certs script written by Roland Krikava and was later much
 improved by Guenter Knauf.  This manual page was initially written by Jan
 Schaumann \&<jschauma@netmeister.org>.
diff --git a/docs/options-in-versions b/docs/options-in-versions
index 6833632..6fada93 100644
--- a/docs/options-in-versions
+++ b/docs/options-in-versions
@@ -14,6 +14,7 @@
 --alt-svc                            7.64.1
 --anyauth                            7.10.6
 --append (-a)                        4.8
+--aws-sigv4                          7.75.0
 --basic                              7.10.6
 --cacert                             7.5
 --capath                             7.9.8
@@ -30,6 +31,7 @@
 --cookie (-b)                        4.9
 --cookie-jar (-c)                    7.9
 --create-dirs                        7.10.3
+--create-file-mode                   7.75.0
 --crlf                               5.7
 --crlfile                            7.19.7
 --curves                             7.73.0
@@ -48,6 +50,8 @@
 --dns-ipv4-addr                      7.33.0
 --dns-ipv6-addr                      7.33.0
 --dns-servers                        7.33.0
+--doh-cert-status                    7.76.0
+--doh-insecure                       7.76.0
 --doh-url                            7.62.0
 --dump-header (-D)                   5.7
 --egd-file                           7.7
@@ -57,6 +61,7 @@
 --expect100-timeout                  7.47.0
 --fail (-f)                          4.0
 --fail-early                         7.52.0
+--fail-with-body                     7.76.0
 --false-start                        7.42.0
 --form (-F)                          5.0
 --form-string                        7.13.2
@@ -79,6 +84,7 @@
 --header (-H)                        5.0
 --help (-h)                          4.0
 --hostpubmd5                         7.17.1
+--hsts                               7.74.0
 --http0.9                            7.64.0
 --http1.0 (-0)                       7.9.1
 --http1.1                            7.33.0
@@ -163,6 +169,7 @@
 --proxy-pinnedpubkey                 7.59.0
 --proxy-service-name                 7.43.0
 --proxy-ssl-allow-beast              7.52.0
+--proxy-ssl-auto-client-cert         7.77.0
 --proxy-tls13-ciphers                7.61.0
 --proxy-tlsauthtype                  7.52.0
 --proxy-tlspassword                  7.52.0
@@ -206,6 +213,7 @@
 --speed-time (-y)                    4.7
 --ssl                                7.20.0
 --ssl-allow-beast                    7.25.0
+--ssl-auto-client-cert               7.77.0
 --ssl-no-revoke                      7.44.0
 --ssl-reqd                           7.20.0
 --ssl-revoke-best-effort             7.70.0
diff --git a/include/Makefile.am b/include/Makefile.am
index 611ebdf..a334fdc 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/Makefile.am b/include/curl/Makefile.am
index db96ace..e772737 100644
--- a/include/curl/Makefile.am
+++ b/include/curl/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 9026aa5..521c254 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,7 +24,7 @@
 
 /*
  * If you have libcurl problems, all docs and details are found here:
- *   https://curl.haxx.se/libcurl/
+ *   https://curl.se/libcurl/
  *
  * curl-library mailing list subscription and unsubscription web interface:
  *   https://cool.haxx.se/mailman/listinfo/curl-library/
@@ -74,8 +74,9 @@
 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
     defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
     defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
-    defined(__CYGWIN__) || \
-   (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
+    defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
+   (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
+    defined(__VXWORKS__)
 #include <sys/select.h>
 #endif
 
@@ -155,7 +156,8 @@
   CURLSSLBACKEND_AXTLS = 10, /* never used since 7.63.0 */
   CURLSSLBACKEND_MBEDTLS = 11,
   CURLSSLBACKEND_MESALINK = 12,
-  CURLSSLBACKEND_BEARSSL = 13
+  CURLSSLBACKEND_BEARSSL = 13,
+  CURLSSLBACKEND_RUSTLS = 14
 } curl_sslbackend;
 
 /* aliases for library clones and renames */
@@ -540,7 +542,7 @@
   CURLE_OBSOLETE46,              /* 46 - NOT USED */
   CURLE_TOO_MANY_REDIRECTS,      /* 47 - catch endless re-direct loops */
   CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */
-  CURLE_TELNET_OPTION_SYNTAX,    /* 49 - Malformed telnet option */
+  CURLE_SETOPT_OPTION_SYNTAX,    /* 49 - Malformed setopt option */
   CURLE_OBSOLETE50,              /* 50 - NOT USED */
   CURLE_OBSOLETE51,              /* 51 - NOT USED */
   CURLE_GOT_NOTHING,             /* 52 - when this is a specific error */
@@ -611,6 +613,7 @@
   CURLE_HTTP3,                   /* 95 - An HTTP/3 layer problem */
   CURLE_QUIC_CONNECT_ERROR,      /* 96 - QUIC connection error */
   CURLE_PROXY,                   /* 97 - proxy handshake error */
+  CURLE_SSL_CLIENTCERT,          /* 98 - client-side certificate required */
   CURL_LAST /* never use! */
 } CURLcode;
 
@@ -634,6 +637,9 @@
 /* The following were added in 7.21.5, April 2011 */
 #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
 
+/* Added for 7.78.0 */
+#define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
+
 /* The following were added in 7.17.1 */
 /* These are scheduled to disappear by 2009 */
 #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
@@ -787,6 +793,7 @@
 #define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)
 #define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)
 #define CURLAUTH_BEARER       (((unsigned long)1)<<6)
+#define CURLAUTH_AWS_SIGV4    (((unsigned long)1)<<7)
 #define CURLAUTH_ONLY         (((unsigned long)1)<<31)
 #define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)
 #define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
@@ -886,6 +893,10 @@
    operating system. Currently implemented under MS-Windows. */
 #define CURLSSLOPT_NATIVE_CA (1<<4)
 
+/* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
+   a client certificate for authentication. (Schannel) */
+#define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
+
 /* The default connection attempt delay in milliseconds for happy eyeballs.
    CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
    this value, keep them in sync. */
@@ -949,13 +960,42 @@
 #define CURLHEADER_SEPARATE (1<<0)
 
 /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
-#define CURLALTSVC_IMMEDIATELY  (1<<0)
-
 #define CURLALTSVC_READONLYFILE (1<<2)
 #define CURLALTSVC_H1           (1<<3)
 #define CURLALTSVC_H2           (1<<4)
 #define CURLALTSVC_H3           (1<<5)
 
+
+struct curl_hstsentry {
+  char *name;
+  size_t namelen;
+  unsigned int includeSubDomains:1;
+  char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
+};
+
+struct curl_index {
+  size_t index; /* the provided entry's "index" or count */
+  size_t total; /* total number of entries to save */
+};
+
+typedef enum {
+  CURLSTS_OK,
+  CURLSTS_DONE,
+  CURLSTS_FAIL
+} CURLSTScode;
+
+typedef CURLSTScode (*curl_hstsread_callback)(CURL *easy,
+                                              struct curl_hstsentry *e,
+                                              void *userp);
+typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
+                                               struct curl_hstsentry *e,
+                                               struct curl_index *i,
+                                               void *userp);
+
+/* CURLHSTS_* are bits for the CURLOPT_HSTS option */
+#define CURLHSTS_ENABLE       (long)(1<<0)
+#define CURLHSTS_READONLYFILE (long)(1<<1)
+
 /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
 #define CURLPROTO_HTTP   (1<<0)
 #define CURLPROTO_HTTPS  (1<<1)
@@ -986,6 +1026,7 @@
 #define CURLPROTO_SMB    (1<<26)
 #define CURLPROTO_SMBS   (1<<27)
 #define CURLPROTO_MQTT   (1<<28)
+#define CURLPROTO_GOPHERS (1<<29)
 #define CURLPROTO_ALL    (~0) /* enable everything */
 
 /* long may be 32 or 64 bits, but we should never depend on anything else
@@ -1429,8 +1470,8 @@
 #define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
 
   /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
-     tell libcurl to resolve names to those IP versions only. This only has
-     affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
+     tell libcurl to use those IP versions only. This only has effect on
+     systems with support for more than one, i.e IPv4 _and_ IPv6. */
   CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
 
   /* Set this option to limit the size of a file that will be downloaded from
@@ -1585,7 +1626,7 @@
   CURLOPT(CURLOPT_NEW_FILE_PERMS, CURLOPTTYPE_LONG, 159),
   CURLOPT(CURLOPT_NEW_DIRECTORY_PERMS, CURLOPTTYPE_LONG, 160),
 
-  /* Set the behaviour of POST when redirecting. Values must be set to one
+  /* Set the behavior of POST when redirecting. Values must be set to one
      of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
   CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_VALUES, 161),
 
@@ -2031,6 +2072,39 @@
    */
   CURLOPT(CURLOPT_SSL_EC_CURVES, CURLOPTTYPE_STRINGPOINT, 298),
 
+  /* HSTS bitmask */
+  CURLOPT(CURLOPT_HSTS_CTRL, CURLOPTTYPE_LONG, 299),
+  /* HSTS file name */
+  CURLOPT(CURLOPT_HSTS, CURLOPTTYPE_STRINGPOINT, 300),
+
+  /* HSTS read callback */
+  CURLOPT(CURLOPT_HSTSREADFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 301),
+  CURLOPT(CURLOPT_HSTSREADDATA, CURLOPTTYPE_CBPOINT, 302),
+
+  /* HSTS write callback */
+  CURLOPT(CURLOPT_HSTSWRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 303),
+  CURLOPT(CURLOPT_HSTSWRITEDATA, CURLOPTTYPE_CBPOINT, 304),
+
+  /* Parameters for V4 signature */
+  CURLOPT(CURLOPT_AWS_SIGV4, CURLOPTTYPE_STRINGPOINT, 305),
+
+  /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
+  CURLOPT(CURLOPT_DOH_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 306),
+
+  /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
+  CURLOPT(CURLOPT_DOH_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 307),
+
+  /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
+  CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
+
+  /* The CA certificates as "blob" used to validate the peer certificate
+     this option is used only if SSL_VERIFYPEER is true */
+  CURLOPT(CURLOPT_CAINFO_BLOB, CURLOPTTYPE_BLOB, 309),
+
+  /* The CA certificates as "blob" used to validate the proxy certificate
+     this option is used only if PROXY_SSL_VERIFYPEER is true */
+  CURLOPT(CURLOPT_PROXY_CAINFO_BLOB, CURLOPTTYPE_BLOB, 310),
+
   CURLOPT_LASTENTRY /* the last unused */
 } CURLoption;
 
@@ -2065,10 +2139,10 @@
   /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
      name resolves addresses using more than one IP protocol version, this
      option might be handy to force libcurl to use a specific IP version. */
-#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
+#define CURL_IPRESOLVE_WHATEVER 0 /* default, uses addresses to all IP
                                      versions that your system allows */
-#define CURL_IPRESOLVE_V4       1 /* resolve to IPv4 addresses */
-#define CURL_IPRESOLVE_V6       2 /* resolve to IPv6 addresses */
+#define CURL_IPRESOLVE_V4       1 /* uses only IPv4 addresses/connections */
+#define CURL_IPRESOLVE_V6       2 /* uses only IPv6 addresses/connections */
 
   /* three convenient "aliases" that follow the name scheme better */
 #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
@@ -2704,8 +2778,9 @@
   CURLINFO_RETRY_AFTER      = CURLINFO_OFF_T + 57,
   CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
   CURLINFO_PROXY_ERROR      = CURLINFO_LONG + 59,
+  CURLINFO_REFERER          = CURLINFO_STRING + 60,
 
-  CURLINFO_LASTONE          = 59
+  CURLINFO_LASTONE          = 60
 } CURLINFO;
 
 /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -2807,6 +2882,8 @@
   CURLVERSION_SIXTH,
   CURLVERSION_SEVENTH,
   CURLVERSION_EIGHTH,
+  CURLVERSION_NINTH,
+  CURLVERSION_TENTH,
   CURLVERSION_LAST /* never actually use this */
 } CURLversion;
 
@@ -2815,7 +2892,7 @@
    meant to be a built-in version number for what kind of struct the caller
    expects. If the struct ever changes, we redefine the NOW to another enum
    from above. */
-#define CURLVERSION_NOW CURLVERSION_EIGHTH
+#define CURLVERSION_NOW CURLVERSION_TENTH
 
 struct curl_version_info_data {
   CURLversion age;          /* age of the returned struct */
@@ -2866,6 +2943,11 @@
                                   (MAJOR << 24) | (MINOR << 12) | PATCH */
   const char *zstd_version; /* human readable string. */
 
+  /* These fields were added in CURLVERSION_NINTH */
+  const char *hyper_version; /* human readable string. */
+
+  /* These fields were added in CURLVERSION_TENTH */
+  const char *gsasl_version; /* human readable string. */
 };
 typedef struct curl_version_info_data curl_version_info_data;
 
@@ -2902,6 +2984,8 @@
 #define CURL_VERSION_HTTP3        (1<<25) /* HTTP3 support built-in */
 #define CURL_VERSION_ZSTD         (1<<26) /* zstd features are present */
 #define CURL_VERSION_UNICODE      (1<<27) /* Unicode support on Windows */
+#define CURL_VERSION_HSTS         (1<<28) /* HSTS is supported */
+#define CURL_VERSION_GSASL        (1<<29) /* libgsasl is supported */
 
  /*
  * NAME curl_version_info()
diff --git a/include/curl/curlver.h b/include/curl/curlver.h
index 2c3010e..d2ccdba 100644
--- a/include/curl/curlver.h
+++ b/include/curl/curlver.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -26,16 +26,16 @@
    a script at release-time. This was made its own header file in 7.11.2 */
 
 /* This is the global package copyright */
-#define LIBCURL_COPYRIGHT "1996 - 2020 Daniel Stenberg, <daniel@haxx.se>."
+#define LIBCURL_COPYRIGHT "1996 - 2021 Daniel Stenberg, <daniel@haxx.se>."
 
 /* This is the version number of the libcurl package from which this header
    file origins: */
-#define LIBCURL_VERSION "7.73.0"
+#define LIBCURL_VERSION "7.78.0"
 
 /* The numeric version number is also available "in parts" by using these
    defines: */
 #define LIBCURL_VERSION_MAJOR 7
-#define LIBCURL_VERSION_MINOR 73
+#define LIBCURL_VERSION_MINOR 78
 #define LIBCURL_VERSION_PATCH 0
 
 /* This is the numeric version of the libcurl version number, meant for easier
@@ -57,7 +57,7 @@
    CURL_VERSION_BITS() macro since curl's own configure script greps for it
    and needs it to contain the full number.
 */
-#define LIBCURL_VERSION_NUM 0x074900
+#define LIBCURL_VERSION_NUM 0x074e00
 
 /*
  * This is the date and time when the full source package was created. The
@@ -68,7 +68,7 @@
  *
  * "2007-11-23"
  */
-#define LIBCURL_TIMESTAMP "2020-10-14"
+#define LIBCURL_TIMESTAMP "2021-07-21"
 
 #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
 #define CURL_AT_LEAST_VERSION(x,y,z) \
diff --git a/include/curl/easy.h b/include/curl/easy.h
index 9aef133..2dbfb26 100644
--- a/include/curl/easy.h
+++ b/include/curl/easy.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h
index f615ed7..3549552 100644
--- a/include/curl/mprintf.h
+++ b/include/curl/mprintf.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/multi.h b/include/curl/multi.h
index b911ba9..37f9829 100644
--- a/include/curl/multi.h
+++ b/include/curl/multi.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/options.h b/include/curl/options.h
index f3bd8e1..14373b5 100644
--- a/include/curl/options.h
+++ b/include/curl/options.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/stdcheaders.h b/include/curl/stdcheaders.h
index a6bdc1a..60596c7 100644
--- a/include/curl/stdcheaders.h
+++ b/include/curl/stdcheaders.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/system.h b/include/curl/system.h
index 867af61..faf8fcf 100644
--- a/include/curl/system.h
+++ b/include/curl/system.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
index 318ab0a..34d0267 100644
--- a/include/curl/typecheck-gcc.h
+++ b/include/curl/typecheck-gcc.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -273,6 +273,7 @@
    (option) == CURLOPT_FTPPORT ||                                             \
    (option) == CURLOPT_FTP_ACCOUNT ||                                         \
    (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER ||                             \
+   (option) == CURLOPT_HSTS ||                                                \
    (option) == CURLOPT_INTERFACE ||                                           \
    (option) == CURLOPT_ISSUERCERT ||                                          \
    (option) == CURLOPT_KEYPASSWD ||                                           \
@@ -333,6 +334,7 @@
    (option) == CURLOPT_URL ||                                                 \
    (option) == CURLOPT_USERAGENT ||                                           \
    (option) == CURLOPT_USERNAME ||                                            \
+   (option) == CURLOPT_AWS_SIGV4 ||                                           \
    (option) == CURLOPT_USERPWD ||                                             \
    (option) == CURLOPT_XOAUTH2_BEARER ||                                      \
    (option) == CURLOPT_SSL_EC_CURVES ||                                       \
@@ -356,6 +358,8 @@
    (option) == CURLOPT_DEBUGDATA ||                                           \
    (option) == CURLOPT_FNMATCH_DATA ||                                        \
    (option) == CURLOPT_HEADERDATA ||                                          \
+   (option) == CURLOPT_HSTSREADDATA ||                                        \
+   (option) == CURLOPT_HSTSWRITEDATA ||                                       \
    (option) == CURLOPT_INTERLEAVEDATA ||                                      \
    (option) == CURLOPT_IOCTLDATA ||                                           \
    (option) == CURLOPT_OPENSOCKETDATA ||                                      \
@@ -663,11 +667,11 @@
 /* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX
  * this will of course break if we're included before OpenSSL headers...
  */
-typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
-typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
-typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
-typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
-                                           const void *);
+typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX *, void *);
+typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX *, const void *);
+typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX *, void *);
+typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX *,
+                                            const void *);
 #else
 typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
 typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
diff --git a/include/curl/urlapi.h b/include/curl/urlapi.h
index f2d0677..1d70880 100644
--- a/include/curl/urlapi.h
+++ b/include/curl/urlapi.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -79,6 +79,7 @@
 #define CURLU_GUESS_SCHEME (1<<9)       /* legacy curl-style guessing */
 #define CURLU_NO_AUTHORITY (1<<10)      /* Allow empty authority when the
                                            scheme is unknown. */
+#define CURLU_ALLOW_SPACE (1<<11)       /* Allow spaces in the URL */
 
 typedef struct Curl_URL CURLU;
 
diff --git a/install-sh b/install-sh
index 20d8b2e..ec298b5 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2020-11-14.01; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@
 # Desired mode of installed file.
 mode=0755
 
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
 chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
@@ -99,18 +104,28 @@
      --version  display version info and exit.
 
   -c            (ignored)
-  -C            install only if different (preserve the last data modification time)
+  -C            install only if different (preserve data modification time)
   -d            create directories instead of installing files.
   -g GROUP      $chgrpprog installed files to GROUP.
   -m MODE       $chmodprog installed files to MODE.
   -o USER       $chownprog installed files to USER.
+  -p            pass -p to $cpprog.
   -s            $stripprog installed files.
+  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
   -t DIRECTORY  install into DIRECTORY.
   -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
   CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
   RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
 "
 
 while test $# -ne 0; do
@@ -137,8 +152,13 @@
     -o) chowncmd="$chownprog $2"
         shift;;
 
+    -p) cpprog="$cpprog -p";;
+
     -s) stripcmd=$stripprog;;
 
+    -S) backupsuffix="$2"
+        shift;;
+
     -t)
         is_target_a_directory=always
         dst_arg=$2
@@ -255,6 +275,10 @@
     dstdir=$dst
     test -d "$dstdir"
     dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
   else
 
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -301,22 +325,6 @@
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-        # Create intermediate dirs using mode 755 as modified by the umask.
-        # This is like FreeBSD 'install' as of 1997-10-28.
-        umask=`umask`
-        case $stripcmd.$umask in
-          # Optimize common cases.
-          *[2367][2367]) mkdir_umask=$umask;;
-          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-          *[0-7])
-            mkdir_umask=`expr $umask + 22 \
-              - $umask % 100 % 40 + $umask % 20 \
-              - $umask % 10 % 4 + $umask % 2
-            `;;
-          *) mkdir_umask=$umask,go-w;;
-        esac
-
         # With -d, create the new directory with the user-specified mode.
         # Otherwise, rely on $mkdir_umask.
         if test -n "$dir_arg"; then
@@ -326,52 +334,49 @@
         fi
 
         posix_mkdir=false
-        case $umask in
-          *[123567][0-7][0-7])
-            # POSIX mkdir -p sets u+wx bits regardless of umask, which
-            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-            ;;
-          *)
-            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
-            # here however when possible just to lower collision chance.
-            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	# The $RANDOM variable is not portable (e.g., dash).  Use it
+	# here however when possible just to lower collision chance.
+	tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
 
-            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+	trap '
+	  ret=$?
+	  rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+	  exit $ret
+	' 0
 
-            # Because "mkdir -p" follows existing symlinks and we likely work
-            # directly in world-writeable /tmp, make sure that the '$tmpdir'
-            # directory is successfully created first before we actually test
-            # 'mkdir -p' feature.
-            if (umask $mkdir_umask &&
-                $mkdirprog $mkdir_mode "$tmpdir" &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
-            then
-              if test -z "$dir_arg" || {
-                   # Check for POSIX incompatibilities with -m.
-                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                   # other-writable bit of parent directory when it shouldn't.
-                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   test_tmpdir="$tmpdir/a"
-                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
-                   case $ls_ld_tmpdir in
-                     d????-?r-*) different_mode=700;;
-                     d????-?--*) different_mode=755;;
-                     *) false;;
-                   esac &&
-                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
-                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                   }
-                 }
-              then posix_mkdir=:
-              fi
-              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
-            else
-              # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
-            fi
-            trap '' 0;;
-        esac;;
+	# Because "mkdir -p" follows existing symlinks and we likely work
+	# directly in world-writeable /tmp, make sure that the '$tmpdir'
+	# directory is successfully created first before we actually test
+	# 'mkdir -p'.
+	if (umask $mkdir_umask &&
+	    $mkdirprog $mkdir_mode "$tmpdir" &&
+	    exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+	then
+	  if test -z "$dir_arg" || {
+	       # Check for POSIX incompatibilities with -m.
+	       # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+	       # other-writable bit of parent directory when it shouldn't.
+	       # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+	       test_tmpdir="$tmpdir/a"
+	       ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+	       case $ls_ld_tmpdir in
+		 d????-?r-*) different_mode=700;;
+		 d????-?--*) different_mode=755;;
+		 *) false;;
+	       esac &&
+	       $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+		 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+		 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+	       }
+	     }
+	  then posix_mkdir=:
+	  fi
+	  rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+	else
+	  # Remove any dirs left behind by ancient mkdir implementations.
+	  rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+	fi
+	trap '' 0;;
     esac
 
     if
@@ -382,7 +387,7 @@
     then :
     else
 
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # mkdir does not conform to POSIX,
       # or it failed possibly due to a race condition.  Create the
       # directory the slow way, step by step, checking for races as we go.
 
@@ -411,7 +416,7 @@
           prefixes=
         else
           if $posix_mkdir; then
-            (umask=$mkdir_umask &&
+            (umask $mkdir_umask &&
              $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
             # Don't fail if two instances are running concurrently.
             test -d "$prefix" || exit 1
@@ -488,6 +493,13 @@
     then
       rm -f "$dsttmp"
     else
+      # If $backupsuffix is set, and the file being installed
+      # already exists, attempt a backup.  Don't worry if it fails,
+      # e.g., if mv doesn't support -f.
+      if test -n "$backupsuffix" && test -f "$dst"; then
+        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+      fi
+
       # Rename the file to the real destination.
       $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
@@ -502,9 +514,9 @@
         # file should still install successfully.
         {
           test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
           { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
           } ||
           { echo "$0: cannot unlink or rename $dst" >&2
             (exit 1); exit 1
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 911c909..2575288 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -20,6 +20,7 @@
 #
 ###########################################################################
 set(LIB_NAME libcurl)
+set(LIBCURL_OUTPUT_NAME libcurl CACHE STRING "Basename of the curl library")
 
 if(BUILD_SHARED_LIBS)
   set(CURL_STATICLIB NO)
@@ -39,7 +40,7 @@
   ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h
   )
 
-if(MSVC)
+if(WIN32)
   list(APPEND CSOURCES libcurl.rc)
 endif()
 
@@ -88,10 +89,6 @@
   ALIAS ${LIB_NAME}
   )
 
-if(MSVC AND NOT BUILD_SHARED_LIBS)
-  set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
-endif()
-
 if(NOT BUILD_SHARED_LIBS)
     set_target_properties(${LIB_NAME} PROPERTIES INTERFACE_COMPILE_DEFINITIONS CURL_STATICLIB)
 endif()
@@ -102,7 +99,10 @@
   add_definitions(-D_USRDLL)
 endif()
 
-set_target_properties(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL)
+set_target_properties(${LIB_NAME} PROPERTIES
+  COMPILE_DEFINITIONS BUILDING_LIBCURL
+  OUTPUT_NAME ${LIBCURL_OUTPUT_NAME}
+  )
 
 if(HIDES_CURL_PRIVATE_SYMBOLS)
   set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_HIDDEN_SYMBOLS")
@@ -121,13 +121,16 @@
 
 if(WIN32)
   if(BUILD_SHARED_LIBS)
-    # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"
-    set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
+    if(MSVC)
+      # Add "_imp" as a suffix before the extension to avoid conflicting with
+      # the statically linked "libcurl.lib"
+      set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
+    endif()
   endif()
 endif()
 
 target_include_directories(${LIB_NAME} INTERFACE
-  $<INSTALL_INTERFACE:include>
+  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
   $<BUILD_INTERFACE:${CURL_SOURCE_DIR}/include>)
 
 install(TARGETS ${LIB_NAME}
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 78b068f..b51796f 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
index a2fd57a..3e9ddec 100644
--- a/lib/Makefile.inc
+++ b/lib/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -20,67 +20,319 @@
 #
 ###########################################################################
 
-LIB_VAUTH_CFILES = vauth/cleartext.c vauth/cram.c vauth/digest.c             \
-  vauth/digest_sspi.c vauth/krb5_gssapi.c vauth/krb5_sspi.c vauth/ntlm.c     \
-  vauth/ntlm_sspi.c vauth/oauth2.c vauth/spnego_gssapi.c vauth/spnego_sspi.c \
+LIB_VAUTH_CFILES =      \
+  vauth/cleartext.c     \
+  vauth/cram.c          \
+  vauth/digest.c        \
+  vauth/digest_sspi.c   \
+  vauth/gsasl.c         \
+  vauth/krb5_gssapi.c   \
+  vauth/krb5_sspi.c     \
+  vauth/ntlm.c          \
+  vauth/ntlm_sspi.c     \
+  vauth/oauth2.c        \
+  vauth/spnego_gssapi.c \
+  vauth/spnego_sspi.c   \
   vauth/vauth.c
 
-LIB_VAUTH_HFILES = vauth/digest.h vauth/ntlm.h vauth/vauth.h
+LIB_VAUTH_HFILES =      \
+  vauth/digest.h        \
+  vauth/ntlm.h          \
+  vauth/vauth.h
 
-LIB_VTLS_CFILES = vtls/bearssl.c vtls/gskit.c vtls/gtls.c vtls/keylog.c  \
-  vtls/mbedtls.c vtls/mbedtls_threadlock.c vtls/mesalink.c vtls/nss.c    \
-  vtls/openssl.c vtls/schannel.c vtls/schannel_verify.c vtls/sectransp.c \
-  vtls/vtls.c vtls/wolfssl.c
+LIB_VTLS_CFILES =           \
+  vtls/bearssl.c            \
+  vtls/gskit.c              \
+  vtls/gtls.c               \
+  vtls/keylog.c             \
+  vtls/mbedtls.c            \
+  vtls/mbedtls_threadlock.c \
+  vtls/mesalink.c           \
+  vtls/nss.c                \
+  vtls/openssl.c            \
+  vtls/rustls.c             \
+  vtls/schannel.c           \
+  vtls/schannel_verify.c    \
+  vtls/sectransp.c          \
+  vtls/vtls.c               \
+  vtls/wolfssl.c
 
-LIB_VTLS_HFILES = vtls/bearssl.h vtls/gskit.h vtls/gtls.h vtls/keylog.h      \
-  vtls/mbedtls.h vtls/mbedtls_threadlock.h vtls/mesalink.h vtls/nssg.h       \
-  vtls/openssl.h vtls/schannel.h vtls/sectransp.h vtls/vtls.h vtls/wolfssl.h
+LIB_VTLS_HFILES =           \
+  vtls/bearssl.h            \
+  vtls/gskit.h              \
+  vtls/gtls.h               \
+  vtls/keylog.h             \
+  vtls/mbedtls.h            \
+  vtls/mbedtls_threadlock.h \
+  vtls/mesalink.h           \
+  vtls/nssg.h               \
+  vtls/openssl.h            \
+  vtls/rustls.h             \
+  vtls/schannel.h           \
+  vtls/sectransp.h          \
+  vtls/vtls.h               \
+  vtls/wolfssl.h
 
-LIB_VQUIC_CFILES = vquic/ngtcp2.c vquic/quiche.c vquic/vquic.c
+LIB_VQUIC_CFILES = \
+  vquic/ngtcp2.c   \
+  vquic/quiche.c   \
+  vquic/vquic.c
 
-LIB_VQUIC_HFILES = vquic/ngtcp2.h vquic/quiche.h vquic/vquic.h
+LIB_VQUIC_HFILES = \
+  vquic/ngtcp2.h   \
+  vquic/quiche.h   \
+  vquic/vquic.h
 
-LIB_VSSH_CFILES = vssh/libssh.c vssh/libssh2.c vssh/wolfssh.c
+LIB_VSSH_CFILES =  \
+  vssh/libssh.c    \
+  vssh/libssh2.c   \
+  vssh/wolfssh.c
 
-LIB_VSSH_HFILES = vssh/ssh.h
+LIB_VSSH_HFILES =  \
+  vssh/ssh.h
 
-LIB_CFILES = altsvc.c amigaos.c asyn-ares.c asyn-thread.c base64.c            \
-  conncache.c connect.c content_encoding.c cookie.c curl_addrinfo.c           \
-  curl_ctype.c curl_des.c curl_endian.c curl_fnmatch.c curl_get_line.c        \
-  curl_gethostname.c curl_gssapi.c curl_memrchr.c curl_multibyte.c            \
-  curl_ntlm_core.c curl_ntlm_wb.c curl_path.c curl_range.c curl_rtmp.c        \
-  curl_sasl.c curl_sspi.c curl_threads.c dict.c dotdot.c easy.c escape.c      \
-  file.c fileinfo.c formdata.c ftp.c url.c ftplistparser.c getenv.c getinfo.c \
-  gopher.c hash.c hmac.c hostasyn.c hostcheck.c hostip.c hostip4.c hostip6.c  \
-  hostsyn.c http.c http2.c http_chunks.c http_digest.c http_negotiate.c       \
-  http_ntlm.c http_proxy.c idn_win32.c if2ip.c imap.c inet_ntop.c inet_pton.c \
-  krb5.c ldap.c llist.c md4.c md5.c memdebug.c mime.c mprintf.c mqtt.c        \
-  multi.c netrc.c non-ascii.c nonblock.c openldap.c parsedate.c pingpong.c    \
-  pop3.c progress.c psl.c doh.c rand.c rename.c rtsp.c select.c               \
-  sendf.c setopt.c sha256.c share.c slist.c smb.c smtp.c socketpair.c socks.c \
-  socks_gssapi.c socks_sspi.c speedcheck.c splay.c strcase.c strdup.c         \
-  strerror.c strtok.c strtoofft.c system_win32.c telnet.c tftp.c timeval.c    \
-  transfer.c urlapi.c version.c warnless.c wildcard.c x509asn1.c dynbuf.c     \
-  version_win32.c easyoptions.c easygetopt.c
+LIB_CFILES =         \
+  altsvc.c           \
+  amigaos.c          \
+  asyn-ares.c        \
+  asyn-thread.c      \
+  base64.c           \
+  bufref.c           \
+  c-hyper.c          \
+  conncache.c        \
+  connect.c          \
+  content_encoding.c \
+  cookie.c           \
+  curl_addrinfo.c    \
+  curl_ctype.c       \
+  curl_des.c         \
+  curl_endian.c      \
+  curl_fnmatch.c     \
+  curl_get_line.c    \
+  curl_gethostname.c \
+  curl_gssapi.c      \
+  curl_memrchr.c     \
+  curl_multibyte.c   \
+  curl_ntlm_core.c   \
+  curl_ntlm_wb.c     \
+  curl_path.c        \
+  curl_range.c       \
+  curl_rtmp.c        \
+  curl_sasl.c        \
+  curl_sspi.c        \
+  curl_threads.c     \
+  dict.c             \
+  doh.c              \
+  dotdot.c           \
+  dynbuf.c           \
+  easy.c             \
+  easygetopt.c       \
+  easyoptions.c      \
+  escape.c           \
+  file.c             \
+  fileinfo.c         \
+  formdata.c         \
+  ftp.c              \
+  ftplistparser.c    \
+  getenv.c           \
+  getinfo.c          \
+  gopher.c           \
+  hash.c             \
+  hmac.c             \
+  hostasyn.c         \
+  hostcheck.c        \
+  hostip.c           \
+  hostip4.c          \
+  hostip6.c          \
+  hostsyn.c          \
+  hsts.c             \
+  http.c             \
+  http2.c            \
+  http_chunks.c      \
+  http_digest.c      \
+  http_negotiate.c   \
+  http_ntlm.c        \
+  http_proxy.c       \
+  http_aws_sigv4.c   \
+  idn_win32.c        \
+  if2ip.c            \
+  imap.c             \
+  inet_ntop.c        \
+  inet_pton.c        \
+  krb5.c             \
+  ldap.c             \
+  llist.c            \
+  md4.c              \
+  md5.c              \
+  memdebug.c         \
+  mime.c             \
+  mprintf.c          \
+  mqtt.c             \
+  multi.c            \
+  netrc.c            \
+  non-ascii.c        \
+  nonblock.c         \
+  openldap.c         \
+  parsedate.c        \
+  pingpong.c         \
+  pop3.c             \
+  progress.c         \
+  psl.c              \
+  rand.c             \
+  rename.c           \
+  rtsp.c             \
+  select.c           \
+  sendf.c            \
+  setopt.c           \
+  sha256.c           \
+  share.c            \
+  slist.c            \
+  smb.c              \
+  smtp.c             \
+  socketpair.c       \
+  socks.c            \
+  socks_gssapi.c     \
+  socks_sspi.c       \
+  speedcheck.c       \
+  splay.c            \
+  strcase.c          \
+  strdup.c           \
+  strerror.c         \
+  strtok.c           \
+  strtoofft.c        \
+  system_win32.c     \
+  telnet.c           \
+  tftp.c             \
+  timeval.c          \
+  transfer.c         \
+  url.c              \
+  urlapi.c           \
+  version.c          \
+  version_win32.c    \
+  warnless.c         \
+  wildcard.c         \
+  x509asn1.c
 
-LIB_HFILES = altsvc.h amigaos.h arpa_telnet.h asyn.h conncache.h connect.h    \
-  content_encoding.h cookie.h curl_addrinfo.h curl_base64.h curl_ctype.h      \
-  curl_des.h curl_endian.h curl_fnmatch.h curl_get_line.h curl_gethostname.h  \
-  curl_gssapi.h curl_hmac.h curl_ldap.h curl_md4.h curl_md5.h curl_memory.h   \
-  curl_memrchr.h curl_multibyte.h curl_ntlm_core.h curl_ntlm_wb.h curl_path.h \
-  curl_printf.h curl_range.h curl_rtmp.h curl_sasl.h curl_krb5.h curl_setup.h \
-  curl_setup_once.h curl_sha256.h curl_sspi.h curl_threads.h curlx.h dict.h   \
-  dotdot.h easyif.h escape.h file.h fileinfo.h formdata.h ftp.h url.h         \
-  ftplistparser.h getinfo.h gopher.h hash.h hostcheck.h hostip.h http.h       \
-  http2.h http_chunks.h http_digest.h http_negotiate.h http_ntlm.h            \
-  http_proxy.h if2ip.h imap.h inet_ntop.h inet_pton.h llist.h memdebug.h      \
-  mime.h mqtt.h multihandle.h multiif.h netrc.h non-ascii.h nonblock.h        \
-  parsedate.h pingpong.h pop3.h progress.h psl.h doh.h quic.h rand.h rename.h \
-  rtsp.h select.h sendf.h setopt.h setup-vms.h share.h sigpipe.h slist.h      \
-  smb.h smtp.h sockaddr.h socketpair.h socks.h speedcheck.h splay.h strcase.h \
-  strdup.h strerror.h strtok.h strtoofft.h system_win32.h telnet.h tftp.h     \
-  timeval.h transfer.h urlapi-int.h urldata.h warnless.h wildcard.h           \
-  x509asn1.h dynbuf.h version_win32.h easyoptions.h
+LIB_HFILES =         \
+  altsvc.h           \
+  amigaos.h          \
+  arpa_telnet.h      \
+  asyn.h             \
+  bufref.h           \
+  c-hyper.h          \
+  conncache.h        \
+  connect.h          \
+  content_encoding.h \
+  cookie.h           \
+  curl_addrinfo.h    \
+  curl_base64.h      \
+  curl_ctype.h       \
+  curl_des.h         \
+  curl_endian.h      \
+  curl_fnmatch.h     \
+  curl_get_line.h    \
+  curl_gethostname.h \
+  curl_gssapi.h      \
+  curl_hmac.h        \
+  curl_krb5.h        \
+  curl_ldap.h        \
+  curl_md4.h         \
+  curl_md5.h         \
+  curl_memory.h      \
+  curl_memrchr.h     \
+  curl_multibyte.h   \
+  curl_ntlm_core.h   \
+  curl_ntlm_wb.h     \
+  curl_path.h        \
+  curl_printf.h      \
+  curl_range.h       \
+  curl_rtmp.h        \
+  curl_sasl.h        \
+  curl_setup.h       \
+  curl_setup_once.h  \
+  curl_sha256.h      \
+  curl_sspi.h        \
+  curl_threads.h     \
+  curlx.h            \
+  dict.h             \
+  doh.h              \
+  dotdot.h           \
+  dynbuf.h           \
+  easyif.h           \
+  easyoptions.h      \
+  escape.h           \
+  file.h             \
+  fileinfo.h         \
+  formdata.h         \
+  ftp.h              \
+  ftplistparser.h    \
+  getinfo.h          \
+  gopher.h           \
+  hash.h             \
+  hostcheck.h        \
+  hostip.h           \
+  hsts.h             \
+  http.h             \
+  http2.h            \
+  http_chunks.h      \
+  http_digest.h      \
+  http_negotiate.h   \
+  http_ntlm.h        \
+  http_proxy.h       \
+  http_aws_sigv4.h   \
+  if2ip.h            \
+  imap.h             \
+  inet_ntop.h        \
+  inet_pton.h        \
+  llist.h            \
+  memdebug.h         \
+  mime.h             \
+  mqtt.h             \
+  multihandle.h      \
+  multiif.h          \
+  netrc.h            \
+  non-ascii.h        \
+  nonblock.h         \
+  parsedate.h        \
+  pingpong.h         \
+  pop3.h             \
+  progress.h         \
+  psl.h              \
+  quic.h             \
+  rand.h             \
+  rename.h           \
+  rtsp.h             \
+  select.h           \
+  sendf.h            \
+  setopt.h           \
+  setup-vms.h        \
+  share.h            \
+  sigpipe.h          \
+  slist.h            \
+  smb.h              \
+  smtp.h             \
+  sockaddr.h         \
+  socketpair.h       \
+  socks.h            \
+  speedcheck.h       \
+  splay.h            \
+  strcase.h          \
+  strdup.h           \
+  strerror.h         \
+  strtok.h           \
+  strtoofft.h        \
+  system_win32.h     \
+  telnet.h           \
+  tftp.h             \
+  timeval.h          \
+  transfer.h         \
+  url.h              \
+  urlapi-int.h       \
+  urldata.h          \
+  version_win32.h    \
+  warnless.h         \
+  wildcard.h         \
+  x509asn1.h
 
 LIB_RCFILES = libcurl.rc
 
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 37887ee..9f1f596 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1999 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1999 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -59,6 +59,10 @@
 ifndef LIBRTMP_PATH
 LIBRTMP_PATH = ../../librtmp-2.4
 endif
+# Edit the path below to point to the base of your libgsasl package.
+ifndef LIBGSASL_PATH
+LIBGSASL_PATH = ../../libgsasl-1.10.0
+endif
 # Edit the path below to point to the base of your libidn2 package.
 ifndef LIBIDN2_PATH
 LIBIDN2_PATH = ../../libidn2-2.0.3
@@ -77,6 +81,14 @@
 ifndef NGHTTP2_PATH
 NGHTTP2_PATH = ../../nghttp2-1.0.0
 endif
+# Edit the path below to point to the base of your nghttp3 package.
+ifndef NGHTTP3_PATH
+NGHTTP3_PATH = ../../nghttp3-1.0.0
+endif
+# Edit the path below to point to the base of your ngtcp2 package.
+ifndef NGTCP2_PATH
+NGTCP2_PATH = ../../ngtcp2-1.0.0
+endif
 
 PROOT = ..
 
@@ -190,6 +202,9 @@
 ifeq ($(findstring -brotli,$(CFG)),-brotli)
 BROTLI = 1
 endif
+ifeq ($(findstring -gsasl,$(CFG)),-gsasl)
+GSASL = 1
+endif
 ifeq ($(findstring -idn2,$(CFG)),-idn2)
 IDN2 = 1
 endif
@@ -212,6 +227,15 @@
 ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
 NGHTTP2 = 1
 endif
+ifeq ($(findstring -nghttp3,$(CFG)),-nghttp3)
+NGHTTP3 = 1
+endif
+ifeq ($(findstring -ngtcp2,$(CFG)),-ngtcp2)
+NGTCP2 = 1
+endif
+ifeq ($(findstring -unicode,$(CFG)),-unicode)
+UNICODE = 1
+endif
 
 INCLUDES = -I. -I../include
 CFLAGS += -DBUILDING_LIBCURL
@@ -220,6 +244,9 @@
     CFLAGS += -DCURL_WITH_MULTI_SSL
   endif
 endif
+ifdef UNICODE
+  CFLAGS += -DUNICODE -D_UNICODE
+endif
 
 ifdef SYNC
   CFLAGS += -DUSE_SYNC_DNS
@@ -252,6 +279,17 @@
   endif
 endif
 ifdef SSL
+  ifdef NGHTTP3
+    INCLUDES += -I"$(NGHTTP3_PATH)/include"
+    CFLAGS += -DUSE_NGHTTP3
+    DLL_LIBS += -L"$(NGHTTP3_PATH)/lib" -lnghttp3
+    ifdef NGTCP2
+      INCLUDES += -I"$(NGTCP2_PATH)/include"
+      CFLAGS += -DUSE_NGTCP2
+      DLL_LIBS += -L"$(NGTCP2_PATH)/lib" -lngtcp2 -lngtcp2_crypto_openssl
+    endif
+  endif
+
   ifndef OPENSSL_INCLUDE
     ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
       OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
@@ -315,6 +353,11 @@
     DLL_LIBS += -lbrotlidec
   endif
 endif
+ifdef GSASL
+  INCLUDES += -I"$(LIBGSASL_PATH)/include"
+  CFLAGS += -DUSE_GSASL
+  DLL_LIBS += -L"$(LIBGSASL_PATH)/lib" -lgsasl
+endif
 ifdef IDN2
   INCLUDES += -I"$(LIBIDN2_PATH)/include"
   CFLAGS += -DUSE_LIBIDN2
diff --git a/lib/Makefile.netware b/lib/Makefile.netware
index 2c16adb..cf7904a 100644
--- a/lib/Makefile.netware
+++ b/lib/Makefile.netware
@@ -5,12 +5,12 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2004 - 2015, Guenter Knauf
-# Copyright (C) 2001 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2004 - 2015, 2021, Guenter Knauf
+# Copyright (C) 2001 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -82,7 +82,7 @@
 TARGET  = libcurl
 VERSION = $(LIBCURL_VERSION)
 COPYR   = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
-DESCR   = curl libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - https://curl.haxx.se
+DESCR   = curl libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - https://curl.se
 MTSAFE  = YES
 STACK   = 64000
 SCREEN  = none
@@ -481,7 +481,7 @@
 	@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
 	@echo $(DL)#endif$(DL) >> $@
 	@echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
-	@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/"$(DL) >> $@
+	@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.se/mail/"$(DL) >> $@
 ifeq ($(LIBARCH),CLIB)
 	@echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
 	@echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
@@ -560,9 +560,7 @@
 	@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
-	@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
-	@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
 	@echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
 	@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
 	@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
@@ -599,7 +597,6 @@
 	@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
 	@echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
-	@echo $(DL)#define RETSIGTYPE void$(DL) >> $@
 	@echo $(DL)#define SIZEOF_INT 4$(DL) >> $@
 	@echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@
 	@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
diff --git a/lib/Makefile.vxworks b/lib/Makefile.vxworks
index ada87fb..91f9d614 100644
--- a/lib/Makefile.vxworks
+++ b/lib/Makefile.vxworks
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/lib/altsvc.c b/lib/altsvc.c
index d3deba3..36acc3a 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -25,7 +25,7 @@
  */
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_HTTP) && defined(USE_ALTSVC)
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_ALTSVC)
 #include <curl/curl.h>
 #include "urldata.h"
 #include "altsvc.h"
@@ -355,7 +355,7 @@
   if(!out)
     result = CURLE_WRITE_ERROR;
   else {
-    fputs("# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html\n"
+    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
           "# This file was generated by libcurl! Edit at your own risk.\n",
           out);
     for(e = altsvc->list.head; e; e = n) {
@@ -451,14 +451,16 @@
 {
   const char *p = value;
   size_t len;
-  enum alpnid dstalpnid = srcalpnid; /* the same by default */
   char namebuf[MAX_ALTSVC_HOSTLEN] = "";
   char alpnbuf[MAX_ALTSVC_ALPNLEN] = "";
   struct altsvc *as;
   unsigned short dstport = srcport; /* the same by default */
   CURLcode result = getalnum(&p, alpnbuf, sizeof(alpnbuf));
+#ifdef CURL_DISABLE_VERBOSE_STRINGS
+  (void)data;
+#endif
   if(result) {
-    infof(data, "Excessive alt-svc header, ignoring...\n");
+    infof(data, "Excessive alt-svc header, ignoring.");
     return CURLE_OK;
   }
 
@@ -475,7 +477,7 @@
   do {
     if(*p == '=') {
       /* [protocol]="[host][:port]" */
-      dstalpnid = alpn2alpnid(alpnbuf);
+      enum alpnid dstalpnid = alpn2alpnid(alpnbuf); /* the same by default */
       p++;
       if(*p == '\"') {
         const char *dsthost = "";
@@ -494,7 +496,7 @@
             p++;
           len = p - hostp;
           if(!len || (len >= MAX_ALTSVC_HOSTLEN)) {
-            infof(data, "Excessive alt-svc host name, ignoring...\n");
+            infof(data, "Excessive alt-svc host name, ignoring.");
             dstalpnid = ALPN_none;
           }
           else {
@@ -511,7 +513,7 @@
           /* a port number */
           unsigned long port = strtoul(++p, &end_ptr, 10);
           if(port > USHRT_MAX || end_ptr == p || *end_ptr != '\"') {
-            infof(data, "Unknown alt-svc port number, ignoring...\n");
+            infof(data, "Unknown alt-svc port number, ignoring.");
             dstalpnid = ALPN_none;
           }
           p = end_ptr;
@@ -577,12 +579,12 @@
             as->expires = maxage + time(NULL);
             as->persist = persist;
             Curl_llist_insert_next(&asi->list, asi->list.tail, as, &as->node);
-            infof(data, "Added alt-svc: %s:%d over %s\n", dsthost, dstport,
+            infof(data, "Added alt-svc: %s:%d over %s", dsthost, dstport,
                   Curl_alpnid2str(dstalpnid));
           }
         }
         else {
-          infof(data, "Unknown alt-svc protocol \"%s\", skipping...\n",
+          infof(data, "Unknown alt-svc protocol \"%s\", skipping.",
                 alpnbuf);
         }
       }
@@ -642,4 +644,4 @@
   return FALSE;
 }
 
-#endif /* CURL_DISABLE_HTTP || USE_ALTSVC */
+#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_ALTSVC */
diff --git a/lib/altsvc.h b/lib/altsvc.h
index 1aeb625..2ab89e7 100644
--- a/lib/altsvc.h
+++ b/lib/altsvc.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,7 +23,7 @@
  ***************************************************************************/
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_HTTP) && defined(USE_ALTSVC)
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_ALTSVC)
 #include <curl/curl.h>
 #include "llist.h"
 
@@ -75,5 +75,5 @@
 /* disabled */
 #define Curl_altsvc_save(a,b,c)
 #define Curl_altsvc_cleanup(x)
-#endif /* CURL_DISABLE_HTTP || USE_ALTSVC */
+#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_ALTSVC */
 #endif /* HEADER_CURL_ALTSVC_H */
diff --git a/lib/amigaos.c b/lib/amigaos.c
index cf44bdc..78bb22c 100644
--- a/lib/amigaos.c
+++ b/lib/amigaos.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -90,6 +90,33 @@
 {
   X509_free(a);
 }
+
+/* AmiSSL replaces many functions with macros. Curl requires pointer
+ * to some of these functions. Thus, we have to encapsulate these macros.
+ */
+
+#include "warnless.h"
+
+int (SHA256_Init)(SHA256_CTX *c)
+{
+  return SHA256_Init(c);
+};
+
+int (SHA256_Update)(SHA256_CTX *c, const void *data, size_t len)
+{
+  return SHA256_Update(c, data, curlx_uztoui(len));
+};
+
+int (SHA256_Final)(unsigned char *md, SHA256_CTX *c)
+{
+  return SHA256_Final(md, c);
+};
+
+void (X509_INFO_free)(X509_INFO *a)
+{
+  X509_INFO_free(a);
+};
+
 #endif /* USE_AMISSL */
 #endif /* __AMIGA__ */
 
diff --git a/lib/amigaos.h b/lib/amigaos.h
index c776c9c..02e5bb5 100644
--- a/lib/amigaos.h
+++ b/lib/amigaos.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/arpa_telnet.h b/lib/arpa_telnet.h
index 232680e..cbe31de 100644
--- a/lib/arpa_telnet.h
+++ b/lib/arpa_telnet.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index 725d6cd..839fabb 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -85,7 +85,7 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
-struct ResolverResults {
+struct thread_data {
   int num_pending; /* number of ares_gethostbyname() requests */
   struct Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares
                                     parts */
@@ -133,8 +133,8 @@
 }
 
 
-static void Curl_ares_sock_state_cb(void *data, ares_socket_t socket_fd,
-                                    int readable, int writable)
+static void sock_state_cb(void *data, ares_socket_t socket_fd,
+                          int readable, int writable)
 {
   struct Curl_easy *easy = data;
   if(!readable && !writable) {
@@ -155,7 +155,7 @@
   int status;
   struct ares_options options;
   int optmask = ARES_OPT_SOCK_STATE_CB;
-  options.sock_state_cb = Curl_ares_sock_state_cb;
+  options.sock_state_cb = sock_state_cb;
   options.sock_state_cb_data = easy;
   status = ares_init_options((ares_channel*)resolver, &options, optmask);
   if(status != ARES_SUCCESS) {
@@ -204,22 +204,23 @@
 /*
  * Cancel all possibly still on-going resolves for this connection.
  */
-void Curl_resolver_cancel(struct connectdata *conn)
+void Curl_resolver_cancel(struct Curl_easy *data)
 {
-  if(conn->data && conn->data->state.resolver)
-    ares_cancel((ares_channel)conn->data->state.resolver);
-  destroy_async_data(&conn->async);
+  DEBUGASSERT(data);
+  if(data->state.async.resolver)
+    ares_cancel((ares_channel)data->state.async.resolver);
+  destroy_async_data(&data->state.async);
 }
 
 /*
  * We're equivalent to Curl_resolver_cancel() for the c-ares resolver.  We
  * never block.
  */
-void Curl_resolver_kill(struct connectdata *conn)
+void Curl_resolver_kill(struct Curl_easy *data)
 {
   /* We don't need to check the resolver state because we can be called safely
      at any time and we always do the same thing. */
-  Curl_resolver_cancel(conn);
+  Curl_resolver_cancel(data);
 }
 
 /*
@@ -229,8 +230,8 @@
 {
   free(async->hostname);
 
-  if(async->os_specific) {
-    struct ResolverResults *res = (struct ResolverResults *)async->os_specific;
+  if(async->tdata) {
+    struct thread_data *res = async->tdata;
     if(res) {
       if(res->temp_ai) {
         Curl_freeaddrinfo(res->temp_ai);
@@ -238,7 +239,7 @@
       }
       free(res);
     }
-    async->os_specific = NULL;
+    async->tdata = NULL;
   }
 
   async->hostname = NULL;
@@ -253,25 +254,25 @@
  * Returns: sockets-in-use-bitmap
  */
 
-int Curl_resolver_getsock(struct connectdata *conn,
+int Curl_resolver_getsock(struct Curl_easy *data,
                           curl_socket_t *socks)
 {
   struct timeval maxtime;
   struct timeval timebuf;
   struct timeval *timeout;
   long milli;
-  int max = ares_getsock((ares_channel)conn->data->state.resolver,
+  int max = ares_getsock((ares_channel)data->state.async.resolver,
                          (ares_socket_t *)socks, MAX_SOCKSPEREASYHANDLE);
 
   maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
   maxtime.tv_usec = 0;
 
-  timeout = ares_timeout((ares_channel)conn->data->state.resolver, &maxtime,
+  timeout = ares_timeout((ares_channel)data->state.async.resolver, &maxtime,
                          &timebuf);
   milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000);
   if(milli == 0)
     milli += 10;
-  Curl_expire(conn->data, milli, EXPIRE_ASYNC_NAME);
+  Curl_expire(data, milli, EXPIRE_ASYNC_NAME);
 
   return max;
 }
@@ -286,9 +287,8 @@
  * return number of sockets it worked on
  */
 
-static int waitperform(struct connectdata *conn, timediff_t timeout_ms)
+static int waitperform(struct Curl_easy *data, timediff_t timeout_ms)
 {
-  struct Curl_easy *data = conn->data;
   int nfds;
   int bitmask;
   ares_socket_t socks[ARES_GETSOCK_MAXNUM];
@@ -296,7 +296,7 @@
   int i;
   int num = 0;
 
-  bitmask = ares_getsock((ares_channel)data->state.resolver, socks,
+  bitmask = ares_getsock((ares_channel)data->state.async.resolver, socks,
                          ARES_GETSOCK_MAXNUM);
 
   for(i = 0; i < ARES_GETSOCK_MAXNUM; i++) {
@@ -310,7 +310,7 @@
       pfd[i].fd = socks[i];
       pfd[i].events |= POLLWRNORM|POLLOUT;
     }
-    if(pfd[i].events != 0)
+    if(pfd[i].events)
       num++;
     else
       break;
@@ -324,12 +324,12 @@
   if(!nfds)
     /* Call ares_process() unconditonally here, even if we simply timed out
        above, as otherwise the ares name resolve won't timeout! */
-    ares_process_fd((ares_channel)data->state.resolver, ARES_SOCKET_BAD,
+    ares_process_fd((ares_channel)data->state.async.resolver, ARES_SOCKET_BAD,
                     ARES_SOCKET_BAD);
   else {
     /* move through the descriptors and ask for processing on them */
     for(i = 0; i < num; i++)
-      ares_process_fd((ares_channel)data->state.resolver,
+      ares_process_fd((ares_channel)data->state.async.resolver,
                       (pfd[i].revents & (POLLRDNORM|POLLIN))?
                       pfd[i].fd:ARES_SOCKET_BAD,
                       (pfd[i].revents & (POLLWRNORM|POLLOUT))?
@@ -345,18 +345,16 @@
  *
  * Returns normal CURLcode errors.
  */
-CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+CURLcode Curl_resolver_is_resolved(struct Curl_easy *data,
                                    struct Curl_dns_entry **dns)
 {
-  struct Curl_easy *data = conn->data;
-  struct ResolverResults *res = (struct ResolverResults *)
-    conn->async.os_specific;
+  struct thread_data *res = data->state.async.tdata;
   CURLcode result = CURLE_OK;
 
   DEBUGASSERT(dns);
   *dns = NULL;
 
-  waitperform(conn, 0);
+  waitperform(data, 0);
 
   /* Now that we've checked for any last minute results above, see if there are
      any responses still pending when the EXPIRE_HAPPY_EYEBALLS_DNS timer
@@ -377,26 +375,22 @@
        ARES_ECANCELLED synchronously for all pending responses.  This will
        leave us with res->num_pending == 0, which is perfect for the next
        block. */
-    ares_cancel((ares_channel)data->state.resolver);
+    ares_cancel((ares_channel)data->state.async.resolver);
     DEBUGASSERT(res->num_pending == 0);
   }
 
   if(res && !res->num_pending) {
-    (void)Curl_addrinfo_callback(conn, res->last_status, res->temp_ai);
+    (void)Curl_addrinfo_callback(data, res->last_status, res->temp_ai);
     /* temp_ai ownership is moved to the connection, so we need not free-up
        them */
     res->temp_ai = NULL;
 
-    if(!conn->async.dns) {
-      failf(data, "Could not resolve: %s (%s)",
-            conn->async.hostname, ares_strerror(conn->async.status));
-      result = conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY:
-        CURLE_COULDNT_RESOLVE_HOST;
-    }
+    if(!data->state.async.dns)
+      result = Curl_resolver_error(data);
     else
-      *dns = conn->async.dns;
+      *dns = data->state.async.dns;
 
-    destroy_async_data(&conn->async);
+    destroy_async_data(&data->state.async);
   }
 
   return result;
@@ -413,11 +407,10 @@
  * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved,
  * CURLE_OPERATION_TIMEDOUT if a time-out occurred, or other errors.
  */
-CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+CURLcode Curl_resolver_wait_resolv(struct Curl_easy *data,
                                    struct Curl_dns_entry **entry)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   timediff_t timeout;
   struct curltime now = Curl_now();
 
@@ -427,7 +420,7 @@
   timeout = Curl_timeleft(data, &now, TRUE);
   if(timeout < 0) {
     /* already expired! */
-    connclose(conn, "Timed out before name resolve started");
+    connclose(data->conn, "Timed out before name resolve started");
     return CURLE_OPERATION_TIMEDOUT;
   }
   if(!timeout)
@@ -448,7 +441,7 @@
     store.tv_sec = itimeout/1000;
     store.tv_usec = (itimeout%1000)*1000;
 
-    tvp = ares_timeout((ares_channel)data->state.resolver, &store, &tv);
+    tvp = ares_timeout((ares_channel)data->state.async.resolver, &store, &tv);
 
     /* use the timeout period ares returned to us above if less than one
        second is left, otherwise just use 1000ms to make sure the progress
@@ -458,13 +451,13 @@
     else
       timeout_ms = 1000;
 
-    waitperform(conn, timeout_ms);
-    result = Curl_resolver_is_resolved(conn, entry);
+    waitperform(data, timeout_ms);
+    result = Curl_resolver_is_resolved(data, entry);
 
-    if(result || conn->async.done)
+    if(result || data->state.async.done)
       break;
 
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
     else {
       struct curltime now2 = Curl_now();
@@ -482,36 +475,50 @@
   }
   if(result)
     /* failure, so we cancel the ares operation */
-    ares_cancel((ares_channel)data->state.resolver);
+    ares_cancel((ares_channel)data->state.async.resolver);
 
   /* Operation complete, if the lookup was successful we now have the entry
      in the cache. */
   if(entry)
-    *entry = conn->async.dns;
+    *entry = data->state.async.dns;
 
   if(result)
     /* close the connection, since we can't return failure here without
        cleaning up this connection properly. */
-    connclose(conn, "c-ares resolve failed");
+    connclose(data->conn, "c-ares resolve failed");
 
   return result;
 }
 
 /* Connects results to the list */
-static void compound_results(struct ResolverResults *res,
+static void compound_results(struct thread_data *res,
                              struct Curl_addrinfo *ai)
 {
-  struct Curl_addrinfo *ai_tail;
   if(!ai)
     return;
-  ai_tail = ai;
 
-  while(ai_tail->ai_next)
-    ai_tail = ai_tail->ai_next;
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+  if(res->temp_ai && res->temp_ai->ai_family == PF_INET6) {
+    /* We have results already, put the new IPv6 entries at the head of the
+       list. */
+    struct Curl_addrinfo *temp_ai_tail = res->temp_ai;
 
-  /* Add the new results to the list of old results. */
-  ai_tail->ai_next = res->temp_ai;
-  res->temp_ai = ai;
+    while(temp_ai_tail->ai_next)
+      temp_ai_tail = temp_ai_tail->ai_next;
+
+    temp_ai_tail->ai_next = ai;
+  }
+  else
+#endif /* CURLRES_IPV6 */
+  {
+    /* Add the new results to the list of old results. */
+    struct Curl_addrinfo *ai_tail = ai;
+    while(ai_tail->ai_next)
+      ai_tail = ai_tail->ai_next;
+
+    ai_tail->ai_next = res->temp_ai;
+    res->temp_ai = ai;
+  }
 }
 
 /*
@@ -526,8 +533,8 @@
 #endif
                                struct hostent *hostent)
 {
-  struct connectdata *conn = (struct connectdata *)arg;
-  struct ResolverResults *res;
+  struct Curl_easy *data = (struct Curl_easy *)arg;
+  struct thread_data *res;
 
 #ifdef HAVE_CARES_CALLBACK_TIMEOUTS
   (void)timeouts; /* ignored */
@@ -538,12 +545,12 @@
        be valid so only defer it when we know the 'status' says its fine! */
     return;
 
-  res = (struct ResolverResults *)conn->async.os_specific;
+  res = data->state.async.tdata;
   if(res) {
     res->num_pending--;
 
     if(CURL_ASYNC_SUCCESS == status) {
-      struct Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port);
+      struct Curl_addrinfo *ai = Curl_he2ai(hostent, data->state.async.port);
       if(ai) {
         compound_results(res, ai);
       }
@@ -608,8 +615,8 @@
          c-ares retry cycle each request is.
       */
       res->happy_eyeballs_dns_time = Curl_now();
-      Curl_expire(
-        conn->data, HAPPY_EYEBALLS_DNS_TIMEOUT, EXPIRE_HAPPY_EYEBALLS_DNS);
+      Curl_expire(data, HAPPY_EYEBALLS_DNS_TIMEOUT,
+                  EXPIRE_HAPPY_EYEBALLS_DNS);
     }
   }
 }
@@ -622,81 +629,56 @@
  * memory we need to free after use. That memory *MUST* be freed with
  * Curl_freeaddrinfo(), nothing else.
  */
-struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
                                                 const char *hostname,
                                                 int port,
                                                 int *waitp)
 {
   char *bufp;
-  struct Curl_easy *data = conn->data;
-  int family = PF_INET;
 
   *waitp = 0; /* default to synchronous response */
 
-#ifdef ENABLE_IPV6
-  switch(conn->ip_version) {
-  default:
-#if ARES_VERSION >= 0x010601
-    family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older
-                           c-ares versions this just falls through and defaults
-                           to PF_INET */
-    break;
-#endif
-  case CURL_IPRESOLVE_V4:
-    family = PF_INET;
-    break;
-  case CURL_IPRESOLVE_V6:
-    family = PF_INET6;
-    break;
-  }
-#endif /* ENABLE_IPV6 */
-
   bufp = strdup(hostname);
   if(bufp) {
-    struct ResolverResults *res = NULL;
-    free(conn->async.hostname);
-    conn->async.hostname = bufp;
-    conn->async.port = port;
-    conn->async.done = FALSE;   /* not done */
-    conn->async.status = 0;     /* clear */
-    conn->async.dns = NULL;     /* clear */
-    res = calloc(sizeof(struct ResolverResults), 1);
+    struct thread_data *res = NULL;
+    free(data->state.async.hostname);
+    data->state.async.hostname = bufp;
+    data->state.async.port = port;
+    data->state.async.done = FALSE;   /* not done */
+    data->state.async.status = 0;     /* clear */
+    data->state.async.dns = NULL;     /* clear */
+    res = calloc(sizeof(struct thread_data), 1);
     if(!res) {
-      free(conn->async.hostname);
-      conn->async.hostname = NULL;
+      free(data->state.async.hostname);
+      data->state.async.hostname = NULL;
       return NULL;
     }
-    conn->async.os_specific = res;
+    data->state.async.tdata = res;
 
     /* initial status - failed */
     res->last_status = ARES_ENOTFOUND;
-#ifdef ENABLE_IPV6
-    if(family == PF_UNSPEC) {
-      if(Curl_ipv6works(conn)) {
-        res->num_pending = 2;
 
-        /* areschannel is already setup in the Curl_open() function */
-        ares_gethostbyname((ares_channel)data->state.resolver, hostname,
-                            PF_INET, query_completed_cb, conn);
-        ares_gethostbyname((ares_channel)data->state.resolver, hostname,
-                            PF_INET6, query_completed_cb, conn);
-      }
-      else {
-        res->num_pending = 1;
+#if ARES_VERSION >= 0x010601
+    /* IPv6 supported by c-ares since 1.6.1 */
+    if(Curl_ipv6works(data)) {
+      /* The stack seems to be IPv6-enabled */
+      res->num_pending = 2;
 
-        /* areschannel is already setup in the Curl_open() function */
-        ares_gethostbyname((ares_channel)data->state.resolver, hostname,
-                            PF_INET, query_completed_cb, conn);
-      }
+      /* areschannel is already setup in the Curl_open() function */
+      ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
+                          PF_INET, query_completed_cb, data);
+      ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
+                          PF_INET6, query_completed_cb, data);
     }
     else
-#endif /* ENABLE_IPV6 */
+#endif /* ARES_VERSION >= 0x010601 */
     {
       res->num_pending = 1;
 
       /* areschannel is already setup in the Curl_open() function */
-      ares_gethostbyname((ares_channel)data->state.resolver, hostname, family,
-                         query_completed_cb, conn);
+      ares_gethostbyname((ares_channel)data->state.async.resolver,
+                         hostname, PF_INET,
+                         query_completed_cb, data);
     }
 
     *waitp = 1; /* expect asynchronous response */
@@ -721,9 +703,10 @@
 
 #if (ARES_VERSION >= 0x010704)
 #if (ARES_VERSION >= 0x010b00)
-  ares_result = ares_set_servers_ports_csv(data->state.resolver, servers);
+  ares_result = ares_set_servers_ports_csv(data->state.async.resolver,
+                                           servers);
 #else
-  ares_result = ares_set_servers_csv(data->state.resolver, servers);
+  ares_result = ares_set_servers_csv(data->state.async.resolver, servers);
 #endif
   switch(ares_result) {
   case ARES_SUCCESS:
@@ -753,7 +736,7 @@
   if(!interf)
     interf = "";
 
-  ares_set_local_dev((ares_channel)data->state.resolver, interf);
+  ares_set_local_dev((ares_channel)data->state.async.resolver, interf);
 
   return CURLE_OK;
 #else /* c-ares version too old! */
@@ -778,7 +761,8 @@
     }
   }
 
-  ares_set_local_ip4((ares_channel)data->state.resolver, ntohl(a4.s_addr));
+  ares_set_local_ip4((ares_channel)data->state.async.resolver,
+                     ntohl(a4.s_addr));
 
   return CURLE_OK;
 #else /* c-ares version too old! */
@@ -804,7 +788,7 @@
     }
   }
 
-  ares_set_local_ip6((ares_channel)data->state.resolver, a6);
+  ares_set_local_ip6((ares_channel)data->state.async.resolver, a6);
 
   return CURLE_OK;
 #else /* c-ares version too old! */
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index a60f4f0..36f68cb 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -145,13 +145,13 @@
 /*
  * Cancel all possibly still on-going resolves for this connection.
  */
-void Curl_resolver_cancel(struct connectdata *conn)
+void Curl_resolver_cancel(struct Curl_easy *data)
 {
-  destroy_async_data(&conn->async);
+  destroy_async_data(&data->state.async);
 }
 
 /* This function is used to init a threaded resolve */
-static bool init_resolve_thread(struct connectdata *conn,
+static bool init_resolve_thread(struct Curl_easy *data,
                                 const char *hostname, int port,
                                 const struct addrinfo *hints);
 
@@ -160,12 +160,11 @@
 struct thread_sync_data {
   curl_mutex_t *mtx;
   int done;
-
+  int port;
   char *hostname;        /* hostname to resolve, Curl_async.hostname
                             duplicate */
-  int port;
-#ifdef USE_SOCKETPAIR
-  struct connectdata *conn;
+#ifndef CURL_DISABLE_SOCKETPAIR
+  struct Curl_easy *data;
   curl_socket_t sock_pair[2]; /* socket pair */
 #endif
   int sock_error;
@@ -183,9 +182,9 @@
   struct thread_sync_data tsd;
 };
 
-static struct thread_sync_data *conn_thread_sync_data(struct connectdata *conn)
+static struct thread_sync_data *conn_thread_sync_data(struct Curl_easy *data)
 {
-  return &(((struct thread_data *)conn->async.os_specific)->tsd);
+  return &(data->state.async.tdata->tsd);
 }
 
 /* Destroy resolver thread synchronization data */
@@ -202,7 +201,7 @@
   if(tsd->res)
     Curl_freeaddrinfo(tsd->res);
 
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
   /*
    * close one end of the socket pair (may be done in resolver thread);
    * the other end (for reading) is always closed in the parent thread.
@@ -239,12 +238,12 @@
 #endif
 
   tsd->mtx = malloc(sizeof(curl_mutex_t));
-  if(tsd->mtx == NULL)
+  if(!tsd->mtx)
     goto err_exit;
 
   Curl_mutex_init(tsd->mtx);
 
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
   /* create socket pair, avoid AF_LOCAL since it doesn't build on Solaris */
   if(Curl_socketpair(AF_UNIX, SOCK_STREAM, 0, &tsd->sock_pair[0]) < 0) {
     tsd->sock_pair[0] = CURL_SOCKET_BAD;
@@ -269,12 +268,12 @@
   return 0;
 }
 
-static int getaddrinfo_complete(struct connectdata *conn)
+static int getaddrinfo_complete(struct Curl_easy *data)
 {
-  struct thread_sync_data *tsd = conn_thread_sync_data(conn);
+  struct thread_sync_data *tsd = conn_thread_sync_data(data);
   int rc;
 
-  rc = Curl_addrinfo_callback(conn, tsd->sock_error, tsd->res);
+  rc = Curl_addrinfo_callback(data, tsd->sock_error, tsd->res);
   /* The tsd->res structure has been copied to async.dns and perhaps the DNS
      cache.  Set our copy to NULL so destroy_thread_sync_data doesn't free it.
   */
@@ -294,11 +293,11 @@
  */
 static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg)
 {
-  struct thread_sync_data *tsd = (struct thread_sync_data*)arg;
+  struct thread_sync_data *tsd = (struct thread_sync_data *)arg;
   struct thread_data *td = tsd->td;
   char service[12];
   int rc;
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
   char buf[1];
 #endif
 
@@ -306,7 +305,7 @@
 
   rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res);
 
-  if(rc != 0) {
+  if(rc) {
     tsd->sock_error = SOCKERRNO?SOCKERRNO:rc;
     if(tsd->sock_error == 0)
       tsd->sock_error = RESOLVER_ENOMEM;
@@ -323,7 +322,7 @@
     free(td);
   }
   else {
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
     if(tsd->sock_pair[1] != CURL_SOCKET_BAD) {
       /* DNS has been resolved, signal client task */
       buf[0] = 1;
@@ -380,12 +379,12 @@
  */
 static void destroy_async_data(struct Curl_async *async)
 {
-  if(async->os_specific) {
-    struct thread_data *td = (struct thread_data*) async->os_specific;
+  if(async->tdata) {
+    struct thread_data *td = async->tdata;
     int done;
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
     curl_socket_t sock_rd = td->tsd.sock_pair[0];
-    struct connectdata *conn = td->tsd.conn;
+    struct Curl_easy *data = td->tsd.data;
 #endif
 
     /*
@@ -406,19 +405,18 @@
 
       destroy_thread_sync_data(&td->tsd);
 
-      free(async->os_specific);
+      free(async->tdata);
     }
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
     /*
      * ensure CURLMOPT_SOCKETFUNCTION fires CURL_POLL_REMOVE
      * before the FD is invalidated to avoid EBADF on EPOLL_CTL_DEL
      */
-    if(conn)
-      Curl_multi_closed(conn->data, sock_rd);
+    Curl_multi_closed(data, sock_rd);
     sclose(sock_rd);
 #endif
   }
-  async->os_specific = NULL;
+  async->tdata = NULL;
 
   free(async->hostname);
   async->hostname = NULL;
@@ -430,32 +428,33 @@
  *
  * Returns FALSE in case of failure, otherwise TRUE.
  */
-static bool init_resolve_thread(struct connectdata *conn,
+static bool init_resolve_thread(struct Curl_easy *data,
                                 const char *hostname, int port,
                                 const struct addrinfo *hints)
 {
   struct thread_data *td = calloc(1, sizeof(struct thread_data));
   int err = ENOMEM;
+  struct Curl_async *asp = &data->state.async;
 
-  conn->async.os_specific = (void *)td;
+  data->state.async.tdata = td;
   if(!td)
     goto errno_exit;
 
-  conn->async.port = port;
-  conn->async.done = FALSE;
-  conn->async.status = 0;
-  conn->async.dns = NULL;
+  asp->port = port;
+  asp->done = FALSE;
+  asp->status = 0;
+  asp->dns = NULL;
   td->thread_hnd = curl_thread_t_null;
 
   if(!init_thread_sync_data(td, hostname, port, hints)) {
-    conn->async.os_specific = NULL;
+    asp->tdata = NULL;
     free(td);
     goto errno_exit;
   }
 
-  free(conn->async.hostname);
-  conn->async.hostname = strdup(hostname);
-  if(!conn->async.hostname)
+  free(asp->hostname);
+  asp->hostname = strdup(hostname);
+  if(!asp->hostname)
     goto err_exit;
 
   /* The thread will set this to 1 when complete. */
@@ -477,7 +476,7 @@
   return TRUE;
 
  err_exit:
-  destroy_async_data(&conn->async);
+  destroy_async_data(asp);
 
  errno_exit:
   errno = err;
@@ -485,67 +484,41 @@
 }
 
 /*
- * resolver_error() calls failf() with the appropriate message after a resolve
- * error
- */
-
-static CURLcode resolver_error(struct connectdata *conn)
-{
-  const char *host_or_proxy;
-  CURLcode result;
-
-#ifndef CURL_DISABLE_PROXY
-  if(conn->bits.httpproxy) {
-    host_or_proxy = "proxy";
-    result = CURLE_COULDNT_RESOLVE_PROXY;
-  }
-  else
-#endif
-  {
-    host_or_proxy = "host";
-    result = CURLE_COULDNT_RESOLVE_HOST;
-  }
-
-  failf(conn->data, "Could not resolve %s: %s", host_or_proxy,
-        conn->async.hostname);
-
-  return result;
-}
-
-/*
  * 'entry' may be NULL and then no data is returned
  */
-static CURLcode thread_wait_resolv(struct connectdata *conn,
+static CURLcode thread_wait_resolv(struct Curl_easy *data,
                                    struct Curl_dns_entry **entry,
                                    bool report)
 {
-  struct thread_data   *td = (struct thread_data*) conn->async.os_specific;
+  struct thread_data *td;
   CURLcode result = CURLE_OK;
 
-  DEBUGASSERT(conn && td);
+  DEBUGASSERT(data);
+  td = data->state.async.tdata;
+  DEBUGASSERT(td);
   DEBUGASSERT(td->thread_hnd != curl_thread_t_null);
 
   /* wait for the thread to resolve the name */
   if(Curl_thread_join(&td->thread_hnd)) {
     if(entry)
-      result = getaddrinfo_complete(conn);
+      result = getaddrinfo_complete(data);
   }
   else
     DEBUGASSERT(0);
 
-  conn->async.done = TRUE;
+  data->state.async.done = TRUE;
 
   if(entry)
-    *entry = conn->async.dns;
+    *entry = data->state.async.dns;
 
-  if(!conn->async.dns && report)
+  if(!data->state.async.dns && report)
     /* a name was not resolved, report error */
-    result = resolver_error(conn);
+    result = Curl_resolver_error(data);
 
-  destroy_async_data(&conn->async);
+  destroy_async_data(&data->state.async);
 
-  if(!conn->async.dns && report)
-    connclose(conn, "asynch resolve failed");
+  if(!data->state.async.dns && report)
+    connclose(data->conn, "asynch resolve failed");
 
   return result;
 }
@@ -555,17 +528,17 @@
  * Until we gain a way to signal the resolver threads to stop early, we must
  * simply wait for them and ignore their results.
  */
-void Curl_resolver_kill(struct connectdata *conn)
+void Curl_resolver_kill(struct Curl_easy *data)
 {
-  struct thread_data *td = (struct thread_data*) conn->async.os_specific;
+  struct thread_data *td = data->state.async.tdata;
 
   /* If we're still resolving, we must wait for the threads to fully clean up,
      unfortunately.  Otherwise, we can simply cancel to clean up any resolver
      data. */
   if(td && td->thread_hnd != curl_thread_t_null)
-    (void)thread_wait_resolv(conn, NULL, FALSE);
+    (void)thread_wait_resolv(data, NULL, FALSE);
   else
-    Curl_resolver_cancel(conn);
+    Curl_resolver_cancel(data);
 }
 
 /*
@@ -581,10 +554,10 @@
  *
  * This is the version for resolves-in-a-thread.
  */
-CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+CURLcode Curl_resolver_wait_resolv(struct Curl_easy *data,
                                    struct Curl_dns_entry **entry)
 {
-  return thread_wait_resolv(conn, entry, TRUE);
+  return thread_wait_resolv(data, entry, TRUE);
 }
 
 /*
@@ -592,11 +565,10 @@
  * name resolve request has completed. It should also make sure to time-out if
  * the operation seems to take too long.
  */
-CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+CURLcode Curl_resolver_is_resolved(struct Curl_easy *data,
                                    struct Curl_dns_entry **entry)
 {
-  struct Curl_easy *data = conn->data;
-  struct thread_data   *td = (struct thread_data*) conn->async.os_specific;
+  struct thread_data *td = data->state.async.tdata;
   int done = 0;
 
   DEBUGASSERT(entry);
@@ -612,15 +584,15 @@
   Curl_mutex_release(td->tsd.mtx);
 
   if(done) {
-    getaddrinfo_complete(conn);
+    getaddrinfo_complete(data);
 
-    if(!conn->async.dns) {
-      CURLcode result = resolver_error(conn);
-      destroy_async_data(&conn->async);
+    if(!data->state.async.dns) {
+      CURLcode result = Curl_resolver_error(data);
+      destroy_async_data(&data->state.async);
       return result;
     }
-    destroy_async_data(&conn->async);
-    *entry = conn->async.dns;
+    destroy_async_data(&data->state.async);
+    *entry = data->state.async.dns;
   }
   else {
     /* poll for name lookup done with exponential backoff up to 250ms */
@@ -641,32 +613,29 @@
       td->poll_interval = 250;
 
     td->interval_end = elapsed + td->poll_interval;
-    Curl_expire(conn->data, td->poll_interval, EXPIRE_ASYNC_NAME);
+    Curl_expire(data, td->poll_interval, EXPIRE_ASYNC_NAME);
   }
 
   return CURLE_OK;
 }
 
-int Curl_resolver_getsock(struct connectdata *conn,
-                          curl_socket_t *socks)
+int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *socks)
 {
   int ret_val = 0;
   timediff_t milli;
   timediff_t ms;
-  struct Curl_easy *data = conn->data;
-  struct resdata *reslv = (struct resdata *)data->state.resolver;
-#ifdef USE_SOCKETPAIR
-  struct thread_data *td = (struct thread_data*)conn->async.os_specific;
+  struct resdata *reslv = (struct resdata *)data->state.async.resolver;
+#ifndef CURL_DISABLE_SOCKETPAIR
+  struct thread_data *td = data->state.async.tdata;
 #else
   (void)socks;
 #endif
 
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
   if(td) {
     /* return read fd to client for polling the DNS resolution status */
     socks[0] = td->tsd.sock_pair[0];
-    DEBUGASSERT(td->tsd.conn == conn || !td->tsd.conn);
-    td->tsd.conn = conn;
+    td->tsd.data = data;
     ret_val = GETSOCK_READSOCK(0);
   }
   else {
@@ -681,7 +650,7 @@
     else
       milli = 200;
     Curl_expire(data, milli, EXPIRE_ASYNC_NAME);
-#ifdef USE_SOCKETPAIR
+#ifndef CURL_DISABLE_SOCKETPAIR
   }
 #endif
 
@@ -693,25 +662,24 @@
 /*
  * Curl_getaddrinfo() - for platforms without getaddrinfo
  */
-struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
                                                 const char *hostname,
                                                 int port,
                                                 int *waitp)
 {
-  struct Curl_easy *data = conn->data;
-  struct resdata *reslv = (struct resdata *)data->state.resolver;
+  struct resdata *reslv = (struct resdata *)data->state.async.resolver;
 
   *waitp = 0; /* default to synchronous response */
 
   reslv->start = Curl_now();
 
   /* fire up a new resolver thread! */
-  if(init_resolve_thread(conn, hostname, port, NULL)) {
+  if(init_resolve_thread(data, hostname, port, NULL)) {
     *waitp = 1; /* expect asynchronous response */
     return NULL;
   }
 
-  failf(conn->data, "getaddrinfo() thread failed\n");
+  failf(data, "getaddrinfo() thread failed");
 
   return NULL;
 }
@@ -721,52 +689,36 @@
 /*
  * Curl_resolver_getaddrinfo() - for getaddrinfo
  */
-struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
                                                 const char *hostname,
                                                 int port,
                                                 int *waitp)
 {
   struct addrinfo hints;
   int pf = PF_INET;
-  struct Curl_easy *data = conn->data;
-  struct resdata *reslv = (struct resdata *)data->state.resolver;
+  struct resdata *reslv = (struct resdata *)data->state.async.resolver;
 
   *waitp = 0; /* default to synchronous response */
 
 #ifdef CURLRES_IPV6
-  /*
-   * Check if a limited name resolve has been requested.
-   */
-  switch(conn->ip_version) {
-  case CURL_IPRESOLVE_V4:
-    pf = PF_INET;
-    break;
-  case CURL_IPRESOLVE_V6:
-    pf = PF_INET6;
-    break;
-  default:
+  if(Curl_ipv6works(data))
+    /* The stack seems to be IPv6-enabled */
     pf = PF_UNSPEC;
-    break;
-  }
-
-  if((pf != PF_INET) && !Curl_ipv6works(conn))
-    /* The stack seems to be a non-IPv6 one */
-    pf = PF_INET;
 #endif /* CURLRES_IPV6 */
 
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = pf;
-  hints.ai_socktype = (conn->transport == TRNSPRT_TCP)?
+  hints.ai_socktype = (data->conn->transport == TRNSPRT_TCP)?
     SOCK_STREAM : SOCK_DGRAM;
 
   reslv->start = Curl_now();
   /* fire up a new resolver thread! */
-  if(init_resolve_thread(conn, hostname, port, &hints)) {
+  if(init_resolve_thread(data, hostname, port, &hints)) {
     *waitp = 1; /* expect asynchronous response */
     return NULL;
   }
 
-  failf(data, "getaddrinfo() thread failed to start\n");
+  failf(data, "getaddrinfo() thread failed to start");
   return NULL;
 
 }
diff --git a/lib/asyn.h b/lib/asyn.h
index bd3c3c1..3130395 100644
--- a/lib/asyn.h
+++ b/lib/asyn.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -91,7 +91,7 @@
  *
  * It is safe to call this when conn is in any state.
  */
-void Curl_resolver_cancel(struct connectdata *conn);
+void Curl_resolver_cancel(struct Curl_easy *data);
 
 /*
  * Curl_resolver_kill().
@@ -104,7 +104,7 @@
  *
  * It is safe to call this when conn is in any state.
  */
-void Curl_resolver_kill(struct connectdata *conn);
+void Curl_resolver_kill(struct Curl_easy *data);
 
 /* Curl_resolver_getsock()
  *
@@ -114,7 +114,7 @@
  * return bitmask indicating what file descriptors (referring to array indexes
  * in the 'sock' array) to wait for, read/write.
  */
-int Curl_resolver_getsock(struct connectdata *conn, curl_socket_t *sock);
+int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *sock);
 
 /*
  * Curl_resolver_is_resolved()
@@ -125,7 +125,7 @@
  *
  * Returns normal CURLcode errors.
  */
-CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+CURLcode Curl_resolver_is_resolved(struct Curl_easy *data,
                                    struct Curl_dns_entry **dns);
 
 /*
@@ -139,7 +139,7 @@
  * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved,
  * CURLE_OPERATION_TIMEDOUT if a time-out occurred, or other errors.
  */
-CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+CURLcode Curl_resolver_wait_resolv(struct Curl_easy *data,
                                    struct Curl_dns_entry **dnsentry);
 
 /*
@@ -153,7 +153,7 @@
  * Each resolver backend must of course make sure to return data in the
  * correct format to comply with this.
  */
-struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
                                                 const char *hostname,
                                                 int port,
                                                 int *waitp);
diff --git a/lib/base64.c b/lib/base64.c
index ec632e6..be6f163 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/bufref.c b/lib/bufref.c
new file mode 100644
index 0000000..b84511e
--- /dev/null
+++ b/lib/bufref.c
@@ -0,0 +1,127 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#include "curl_setup.h"
+#include "urldata.h"
+#include "bufref.h"
+
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#define SIGNATURE 0x5c48e9b2    /* Random pattern. */
+
+/*
+ * Init a bufref struct.
+ */
+void Curl_bufref_init(struct bufref *br)
+{
+  DEBUGASSERT(br);
+  br->dtor = NULL;
+  br->ptr = NULL;
+  br->len = 0;
+
+#ifdef DEBUGBUILD
+  br->signature = SIGNATURE;
+#endif
+}
+
+/*
+ * Free the buffer and re-init the necessary fields. It doesn't touch the
+ * 'signature' field and thus this buffer reference can be reused.
+ */
+
+void Curl_bufref_free(struct bufref *br)
+{
+  DEBUGASSERT(br);
+  DEBUGASSERT(br->signature == SIGNATURE);
+  DEBUGASSERT(br->ptr || !br->len);
+
+  if(br->ptr && br->dtor)
+    br->dtor((void *) br->ptr);
+
+  br->dtor = NULL;
+  br->ptr = NULL;
+  br->len = 0;
+}
+
+/*
+ * Set the buffer reference to new values. The previously referenced buffer
+ * is released before assignment.
+ */
+void Curl_bufref_set(struct bufref *br, const void *ptr, size_t len,
+                     void (*dtor)(void *))
+{
+  DEBUGASSERT(ptr || !len);
+  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
+
+  Curl_bufref_free(br);
+  br->ptr = (const unsigned char *) ptr;
+  br->len = len;
+  br->dtor = dtor;
+}
+
+/*
+ * Get a pointer to the referenced buffer.
+ */
+const unsigned char *Curl_bufref_ptr(const struct bufref *br)
+{
+  DEBUGASSERT(br);
+  DEBUGASSERT(br->signature == SIGNATURE);
+  DEBUGASSERT(br->ptr || !br->len);
+
+  return br->ptr;
+}
+
+/*
+ * Get the length of the referenced buffer data.
+ */
+size_t Curl_bufref_len(const struct bufref *br)
+{
+  DEBUGASSERT(br);
+  DEBUGASSERT(br->signature == SIGNATURE);
+  DEBUGASSERT(br->ptr || !br->len);
+
+  return br->len;
+}
+
+CURLcode Curl_bufref_memdup(struct bufref *br, const void *ptr, size_t len)
+{
+  unsigned char *cpy = NULL;
+
+  DEBUGASSERT(br);
+  DEBUGASSERT(br->signature == SIGNATURE);
+  DEBUGASSERT(br->ptr || !br->len);
+  DEBUGASSERT(ptr || !len);
+  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
+
+  if(ptr) {
+    cpy = malloc(len + 1);
+    if(!cpy)
+      return CURLE_OUT_OF_MEMORY;
+    if(len)
+      memcpy(cpy, ptr, len);
+    cpy[len] = '\0';
+  }
+
+  Curl_bufref_set(br, cpy, len, curl_free);
+  return CURLE_OK;
+}
diff --git a/lib/bufref.h b/lib/bufref.h
new file mode 100644
index 0000000..25f65d8
--- /dev/null
+++ b/lib/bufref.h
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_BUFREF_H
+#define HEADER_CURL_BUFREF_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/*
+ * Generic buffer reference.
+ */
+struct bufref {
+  void (*dtor)(void *);         /* Associated destructor. */
+  const unsigned char *ptr;     /* Referenced data buffer. */
+  size_t len;                   /* The data size in bytes. */
+#ifdef DEBUGBUILD
+  int signature;                /* Detect API use mistakes. */
+#endif
+};
+
+
+void Curl_bufref_init(struct bufref *br);
+void Curl_bufref_set(struct bufref *br, const void *ptr, size_t len,
+                     void (*dtor)(void *));
+const unsigned char *Curl_bufref_ptr(const struct bufref *br);
+size_t Curl_bufref_len(const struct bufref *br);
+CURLcode Curl_bufref_memdup(struct bufref *br, const void *ptr, size_t len);
+void Curl_bufref_free(struct bufref *br);
+
+#endif
diff --git a/lib/c-hyper.c b/lib/c-hyper.c
new file mode 100644
index 0000000..2cc5d49
--- /dev/null
+++ b/lib/c-hyper.c
@@ -0,0 +1,999 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#include "curl_setup.h"
+
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_HYPER)
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#include <hyper.h>
+#include "urldata.h"
+#include "sendf.h"
+#include "transfer.h"
+#include "multiif.h"
+#include "progress.h"
+#include "content_encoding.h"
+
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
+#include "curl_memory.h"
+#include "memdebug.h"
+
+size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
+                       uint8_t *buf, size_t buflen)
+{
+  struct Curl_easy *data = userp;
+  struct connectdata *conn = data->conn;
+  CURLcode result;
+  ssize_t nread;
+  DEBUGASSERT(conn);
+  (void)ctx;
+
+  result = Curl_read(data, conn->sockfd, (char *)buf, buflen, &nread);
+  if(result == CURLE_AGAIN) {
+    /* would block, register interest */
+    if(data->hyp.read_waker)
+      hyper_waker_free(data->hyp.read_waker);
+    data->hyp.read_waker = hyper_context_waker(ctx);
+    if(!data->hyp.read_waker) {
+      failf(data, "Couldn't make the read hyper_context_waker");
+      return HYPER_IO_ERROR;
+    }
+    return HYPER_IO_PENDING;
+  }
+  else if(result) {
+    failf(data, "Curl_read failed");
+    return HYPER_IO_ERROR;
+  }
+  return (size_t)nread;
+}
+
+size_t Curl_hyper_send(void *userp, hyper_context *ctx,
+                       const uint8_t *buf, size_t buflen)
+{
+  struct Curl_easy *data = userp;
+  struct connectdata *conn = data->conn;
+  CURLcode result;
+  ssize_t nwrote;
+
+  result = Curl_write(data, conn->sockfd, (void *)buf, buflen, &nwrote);
+  if(result == CURLE_AGAIN) {
+    /* would block, register interest */
+    if(data->hyp.write_waker)
+      hyper_waker_free(data->hyp.write_waker);
+    data->hyp.write_waker = hyper_context_waker(ctx);
+    if(!data->hyp.write_waker) {
+      failf(data, "Couldn't make the write hyper_context_waker");
+      return HYPER_IO_ERROR;
+    }
+    return HYPER_IO_PENDING;
+  }
+  else if(result) {
+    failf(data, "Curl_write failed");
+    return HYPER_IO_ERROR;
+  }
+  return (size_t)nwrote;
+}
+
+static int hyper_each_header(void *userdata,
+                             const uint8_t *name,
+                             size_t name_len,
+                             const uint8_t *value,
+                             size_t value_len)
+{
+  struct Curl_easy *data = (struct Curl_easy *)userdata;
+  size_t len;
+  char *headp;
+  CURLcode result;
+  int writetype;
+
+  if(name_len + value_len + 2 > CURL_MAX_HTTP_HEADER) {
+    failf(data, "Too long response header");
+    data->state.hresult = CURLE_OUT_OF_MEMORY;
+    return HYPER_ITER_BREAK;
+  }
+
+  if(!data->req.bytecount)
+    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
+
+  Curl_dyn_reset(&data->state.headerb);
+  if(name_len) {
+    if(Curl_dyn_addf(&data->state.headerb, "%.*s: %.*s\r\n",
+                     (int) name_len, name, (int) value_len, value))
+      return HYPER_ITER_BREAK;
+  }
+  else {
+    if(Curl_dyn_add(&data->state.headerb, "\r\n"))
+      return HYPER_ITER_BREAK;
+  }
+  len = Curl_dyn_len(&data->state.headerb);
+  headp = Curl_dyn_ptr(&data->state.headerb);
+
+  result = Curl_http_header(data, data->conn, headp);
+  if(result) {
+    data->state.hresult = result;
+    return HYPER_ITER_BREAK;
+  }
+
+  Curl_debug(data, CURLINFO_HEADER_IN, headp, len);
+
+  writetype = CLIENTWRITE_HEADER;
+  if(data->set.include_header)
+    writetype |= CLIENTWRITE_BODY;
+  result = Curl_client_write(data, writetype, headp, len);
+  if(result) {
+    data->state.hresult = CURLE_ABORTED_BY_CALLBACK;
+    return HYPER_ITER_BREAK;
+  }
+
+  data->info.header_size += (long)len;
+  data->req.headerbytecount += (long)len;
+  return HYPER_ITER_CONTINUE;
+}
+
+static int hyper_body_chunk(void *userdata, const hyper_buf *chunk)
+{
+  char *buf = (char *)hyper_buf_bytes(chunk);
+  size_t len = hyper_buf_len(chunk);
+  struct Curl_easy *data = (struct Curl_easy *)userdata;
+  struct SingleRequest *k = &data->req;
+  CURLcode result;
+
+  if(0 == k->bodywrites++) {
+    bool done = FALSE;
+#if defined(USE_NTLM)
+    struct connectdata *conn = data->conn;
+    if(conn->bits.close &&
+       (((data->req.httpcode == 401) &&
+         (conn->http_ntlm_state == NTLMSTATE_TYPE2)) ||
+        ((data->req.httpcode == 407) &&
+         (conn->proxy_ntlm_state == NTLMSTATE_TYPE2)))) {
+      infof(data, "Connection closed while negotiating NTLM");
+      data->state.authproblem = TRUE;
+      Curl_safefree(data->req.newurl);
+    }
+#endif
+    if(data->state.hconnect &&
+       (data->req.httpcode/100 != 2)) {
+      done = TRUE;
+      result = CURLE_OK;
+    }
+    else
+      result = Curl_http_firstwrite(data, data->conn, &done);
+    if(result || done) {
+      infof(data, "Return early from hyper_body_chunk");
+      data->state.hresult = result;
+      return HYPER_ITER_BREAK;
+    }
+  }
+  if(k->ignorebody)
+    return HYPER_ITER_CONTINUE;
+  if(0 == len)
+    return HYPER_ITER_CONTINUE;
+  Curl_debug(data, CURLINFO_DATA_IN, buf, len);
+  if(!data->set.http_ce_skip && k->writer_stack)
+    /* content-encoded data */
+    result = Curl_unencode_write(data, k->writer_stack, buf, len);
+  else
+    result = Curl_client_write(data, CLIENTWRITE_BODY, buf, len);
+
+  if(result) {
+    data->state.hresult = result;
+    return HYPER_ITER_BREAK;
+  }
+
+  data->req.bytecount += len;
+  Curl_pgrsSetDownloadCounter(data, data->req.bytecount);
+  return HYPER_ITER_CONTINUE;
+}
+
+/*
+ * Hyper does not consider the status line, the first line in a HTTP/1
+ * response, to be a header. The libcurl API does. This function sends the
+ * status line in the header callback. */
+static CURLcode status_line(struct Curl_easy *data,
+                            struct connectdata *conn,
+                            uint16_t http_status,
+                            int http_version,
+                            const uint8_t *reason, size_t rlen)
+{
+  CURLcode result;
+  size_t len;
+  const char *vstr;
+  int writetype;
+  vstr = http_version == HYPER_HTTP_VERSION_1_1 ? "1.1" :
+    (http_version == HYPER_HTTP_VERSION_2 ? "2" : "1.0");
+  conn->httpversion =
+    http_version == HYPER_HTTP_VERSION_1_1 ? 11 :
+    (http_version == HYPER_HTTP_VERSION_2 ? 20 : 10);
+  data->req.httpcode = http_status;
+
+  result = Curl_http_statusline(data, conn);
+  if(result)
+    return result;
+
+  Curl_dyn_reset(&data->state.headerb);
+
+  result = Curl_dyn_addf(&data->state.headerb, "HTTP/%s %03d %.*s\r\n",
+                         vstr,
+                         (int)http_status,
+                         (int)rlen, reason);
+  if(result)
+    return result;
+  len = Curl_dyn_len(&data->state.headerb);
+  Curl_debug(data, CURLINFO_HEADER_IN, Curl_dyn_ptr(&data->state.headerb),
+             len);
+  writetype = CLIENTWRITE_HEADER;
+  if(data->set.include_header)
+    writetype |= CLIENTWRITE_BODY;
+  result = Curl_client_write(data, writetype,
+                             Curl_dyn_ptr(&data->state.headerb), len);
+  if(result) {
+    data->state.hresult = CURLE_ABORTED_BY_CALLBACK;
+    return HYPER_ITER_BREAK;
+  }
+
+  data->info.header_size += (long)len;
+  data->req.headerbytecount += (long)len;
+  data->req.httpcode = http_status;
+  return CURLE_OK;
+}
+
+/*
+ * Hyper does not pass on the last empty response header. The libcurl API
+ * does. This function sends an empty header in the header callback.
+ */
+static CURLcode empty_header(struct Curl_easy *data)
+{
+  return hyper_each_header(data, NULL, 0, NULL, 0) ?
+    CURLE_WRITE_ERROR : CURLE_OK;
+}
+
+CURLcode Curl_hyper_stream(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           int *didwhat,
+                           bool *done,
+                           int select_res)
+{
+  hyper_response *resp = NULL;
+  uint16_t http_status;
+  int http_version;
+  hyper_headers *headers = NULL;
+  hyper_body *resp_body = NULL;
+  struct hyptransfer *h = &data->hyp;
+  hyper_task *task;
+  hyper_task *foreach;
+  hyper_error *hypererr = NULL;
+  const uint8_t *reasonp;
+  size_t reason_len;
+  CURLcode result = CURLE_OK;
+  (void)conn;
+
+  if(select_res & CURL_CSELECT_IN) {
+    if(h->read_waker)
+      hyper_waker_wake(h->read_waker);
+    h->read_waker = NULL;
+  }
+  if(select_res & CURL_CSELECT_OUT) {
+    if(h->write_waker)
+      hyper_waker_wake(h->write_waker);
+    h->write_waker = NULL;
+  }
+
+  *done = FALSE;
+  do {
+    hyper_task_return_type t;
+    task = hyper_executor_poll(h->exec);
+    if(!task) {
+      *didwhat = KEEP_RECV;
+      break;
+    }
+    t = hyper_task_type(task);
+    switch(t) {
+    case HYPER_TASK_ERROR:
+      hypererr = hyper_task_value(task);
+      break;
+    case HYPER_TASK_RESPONSE:
+      resp = hyper_task_value(task);
+      break;
+    default:
+      break;
+    }
+    hyper_task_free(task);
+
+    if(t == HYPER_TASK_ERROR) {
+      hyper_code errnum = hyper_error_code(hypererr);
+      if(errnum == HYPERE_ABORTED_BY_CALLBACK) {
+        /* override Hyper's view, might not even be an error */
+        result = data->state.hresult;
+        infof(data, "hyperstream is done (by early callback)");
+      }
+      else {
+        uint8_t errbuf[256];
+        size_t errlen = hyper_error_print(hypererr, errbuf, sizeof(errbuf));
+        hyper_code code = hyper_error_code(hypererr);
+        failf(data, "Hyper: [%d] %.*s", (int)code, (int)errlen, errbuf);
+        if((code == HYPERE_UNEXPECTED_EOF) && !data->req.bytecount)
+          result = CURLE_GOT_NOTHING;
+        else if(code == HYPERE_INVALID_PEER_MESSAGE)
+          result = CURLE_UNSUPPORTED_PROTOCOL; /* maybe */
+        else
+          result = CURLE_RECV_ERROR;
+      }
+      *done = TRUE;
+      hyper_error_free(hypererr);
+      break;
+    }
+    else if(h->endtask == task) {
+      /* end of transfer */
+      *done = TRUE;
+      infof(data, "hyperstream is done!");
+      break;
+    }
+    else if(t != HYPER_TASK_RESPONSE) {
+      *didwhat = KEEP_RECV;
+      break;
+    }
+    /* HYPER_TASK_RESPONSE */
+
+    *didwhat = KEEP_RECV;
+    if(!resp) {
+      failf(data, "hyperstream: couldn't get response");
+      return CURLE_RECV_ERROR;
+    }
+
+    http_status = hyper_response_status(resp);
+    http_version = hyper_response_version(resp);
+    reasonp = hyper_response_reason_phrase(resp);
+    reason_len = hyper_response_reason_phrase_len(resp);
+
+    result = status_line(data, conn,
+                         http_status, http_version, reasonp, reason_len);
+    if(result)
+      break;
+
+    headers = hyper_response_headers(resp);
+    if(!headers) {
+      failf(data, "hyperstream: couldn't get response headers");
+      result = CURLE_RECV_ERROR;
+      break;
+    }
+
+    /* the headers are already received */
+    hyper_headers_foreach(headers, hyper_each_header, data);
+    if(data->state.hresult) {
+      result = data->state.hresult;
+      break;
+    }
+
+    if(empty_header(data)) {
+      failf(data, "hyperstream: couldn't pass blank header");
+      result = CURLE_OUT_OF_MEMORY;
+      break;
+    }
+
+    /* Curl_http_auth_act() checks what authentication methods that are
+     * available and decides which one (if any) to use. It will set 'newurl'
+     * if an auth method was picked. */
+    result = Curl_http_auth_act(data);
+    if(result)
+      break;
+
+    resp_body = hyper_response_body(resp);
+    if(!resp_body) {
+      failf(data, "hyperstream: couldn't get response body");
+      result = CURLE_RECV_ERROR;
+      break;
+    }
+    foreach = hyper_body_foreach(resp_body, hyper_body_chunk, data);
+    if(!foreach) {
+      failf(data, "hyperstream: body foreach failed");
+      result = CURLE_OUT_OF_MEMORY;
+      break;
+    }
+    DEBUGASSERT(hyper_task_type(foreach) == HYPER_TASK_EMPTY);
+    if(HYPERE_OK != hyper_executor_push(h->exec, foreach)) {
+      failf(data, "Couldn't hyper_executor_push the body-foreach");
+      result = CURLE_OUT_OF_MEMORY;
+      break;
+    }
+    h->endtask = foreach;
+
+    hyper_response_free(resp);
+    resp = NULL;
+  } while(1);
+  if(resp)
+    hyper_response_free(resp);
+  return result;
+}
+
+static CURLcode debug_request(struct Curl_easy *data,
+                              const char *method,
+                              const char *path,
+                              bool h2)
+{
+  char *req = aprintf("%s %s HTTP/%s\r\n", method, path,
+                      h2?"2":"1.1");
+  if(!req)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_debug(data, CURLINFO_HEADER_OUT, req, strlen(req));
+  free(req);
+  return CURLE_OK;
+}
+
+/*
+ * Given a full header line "name: value" (optional CRLF in the input, should
+ * be in the output), add to Hyper and send to the debug callback.
+ *
+ * Supports multiple headers.
+ */
+
+CURLcode Curl_hyper_header(struct Curl_easy *data, hyper_headers *headers,
+                           const char *line)
+{
+  const char *p;
+  const char *n;
+  size_t nlen;
+  const char *v;
+  size_t vlen;
+  bool newline = TRUE;
+  int numh = 0;
+
+  if(!line)
+    return CURLE_OK;
+  n = line;
+  do {
+    size_t linelen = 0;
+
+    p = strchr(n, ':');
+    if(!p)
+      /* this is fine if we already added at least one header */
+      return numh ? CURLE_OK : CURLE_BAD_FUNCTION_ARGUMENT;
+    nlen = p - n;
+    p++; /* move past the colon */
+    while(*p == ' ')
+      p++;
+    v = p;
+    p = strchr(v, '\r');
+    if(!p) {
+      p = strchr(v, '\n');
+      if(p)
+        linelen = 1; /* LF only */
+      else {
+        p = strchr(v, '\0');
+        newline = FALSE; /* no newline */
+      }
+    }
+    else
+      linelen = 2; /* CRLF ending */
+    linelen += (p - n);
+    vlen = p - v;
+
+    if(HYPERE_OK != hyper_headers_add(headers, (uint8_t *)n, nlen,
+                                      (uint8_t *)v, vlen)) {
+      failf(data, "hyper refused to add header '%s'", line);
+      return CURLE_OUT_OF_MEMORY;
+    }
+    if(data->set.verbose) {
+      char *ptr = NULL;
+      if(!newline) {
+        ptr = aprintf("%.*s\r\n", (int)linelen, line);
+        if(!ptr)
+          return CURLE_OUT_OF_MEMORY;
+        Curl_debug(data, CURLINFO_HEADER_OUT, ptr, linelen + 2);
+        free(ptr);
+      }
+      else
+        Curl_debug(data, CURLINFO_HEADER_OUT, (char *)line, linelen);
+    }
+    numh++;
+    n += linelen;
+  } while(newline);
+  return CURLE_OK;
+}
+
+static CURLcode request_target(struct Curl_easy *data,
+                               struct connectdata *conn,
+                               const char *method,
+                               bool h2,
+                               hyper_request *req)
+{
+  CURLcode result;
+  struct dynbuf r;
+
+  Curl_dyn_init(&r, DYN_HTTP_REQUEST);
+
+  result = Curl_http_target(data, conn, &r);
+  if(result)
+    return result;
+
+  if(hyper_request_set_uri(req, (uint8_t *)Curl_dyn_uptr(&r),
+                           Curl_dyn_len(&r))) {
+    failf(data, "error setting path");
+    result = CURLE_OUT_OF_MEMORY;
+  }
+  else
+    result = debug_request(data, method, Curl_dyn_ptr(&r), h2);
+
+  Curl_dyn_free(&r);
+
+  return result;
+}
+
+static int uploadpostfields(void *userdata, hyper_context *ctx,
+                            hyper_buf **chunk)
+{
+  struct Curl_easy *data = (struct Curl_easy *)userdata;
+  (void)ctx;
+  if(data->req.upload_done)
+    *chunk = NULL; /* nothing more to deliver */
+  else {
+    /* send everything off in a single go */
+    hyper_buf *copy = hyper_buf_copy(data->set.postfields,
+                                     (size_t)data->req.p.http->postsize);
+    if(copy)
+      *chunk = copy;
+    else {
+      data->state.hresult = CURLE_OUT_OF_MEMORY;
+      return HYPER_POLL_ERROR;
+    }
+    /* increasing the writebytecount here is a little premature but we
+       don't know exactly when the body is sent*/
+    data->req.writebytecount += (size_t)data->req.p.http->postsize;
+    Curl_pgrsSetUploadCounter(data, data->req.writebytecount);
+    data->req.upload_done = TRUE;
+  }
+  return HYPER_POLL_READY;
+}
+
+static int uploadstreamed(void *userdata, hyper_context *ctx,
+                          hyper_buf **chunk)
+{
+  size_t fillcount;
+  struct Curl_easy *data = (struct Curl_easy *)userdata;
+  CURLcode result =
+    Curl_fillreadbuffer(data, data->set.upload_buffer_size, &fillcount);
+  (void)ctx;
+  if(result) {
+    data->state.hresult = result;
+    return HYPER_POLL_ERROR;
+  }
+  if(!fillcount)
+    /* done! */
+    *chunk = NULL;
+  else {
+    hyper_buf *copy = hyper_buf_copy((uint8_t *)data->state.ulbuf, fillcount);
+    if(copy)
+      *chunk = copy;
+    else {
+      data->state.hresult = CURLE_OUT_OF_MEMORY;
+      return HYPER_POLL_ERROR;
+    }
+    /* increasing the writebytecount here is a little premature but we
+       don't know exactly when the body is sent*/
+    data->req.writebytecount += fillcount;
+    Curl_pgrsSetUploadCounter(data, fillcount);
+  }
+  return HYPER_POLL_READY;
+}
+
+/*
+ * bodysend() sets up headers in the outgoing request for a HTTP transfer that
+ * sends a body
+ */
+
+static CURLcode bodysend(struct Curl_easy *data,
+                         struct connectdata *conn,
+                         hyper_headers *headers,
+                         hyper_request *hyperreq,
+                         Curl_HttpReq httpreq)
+{
+  CURLcode result = CURLE_OK;
+  struct dynbuf req;
+  if((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD))
+    Curl_pgrsSetUploadSize(data, 0); /* no request body */
+  else {
+    hyper_body *body;
+    Curl_dyn_init(&req, DYN_HTTP_REQUEST);
+    result = Curl_http_bodysend(data, conn, &req, httpreq);
+
+    if(!result)
+      result = Curl_hyper_header(data, headers, Curl_dyn_ptr(&req));
+
+    Curl_dyn_free(&req);
+
+    body = hyper_body_new();
+    hyper_body_set_userdata(body, data);
+    if(data->set.postfields)
+      hyper_body_set_data_func(body, uploadpostfields);
+    else {
+      result = Curl_get_upload_buffer(data);
+      if(result)
+        return result;
+      /* init the "upload from here" pointer */
+      data->req.upload_fromhere = data->state.ulbuf;
+      hyper_body_set_data_func(body, uploadstreamed);
+    }
+    if(HYPERE_OK != hyper_request_set_body(hyperreq, body)) {
+      /* fail */
+      hyper_body_free(body);
+      result = CURLE_OUT_OF_MEMORY;
+    }
+  }
+  return result;
+}
+
+static CURLcode cookies(struct Curl_easy *data,
+                        struct connectdata *conn,
+                        hyper_headers *headers)
+{
+  struct dynbuf req;
+  CURLcode result;
+  Curl_dyn_init(&req, DYN_HTTP_REQUEST);
+
+  result = Curl_http_cookies(data, conn, &req);
+  if(!result)
+    result = Curl_hyper_header(data, headers, Curl_dyn_ptr(&req));
+  Curl_dyn_free(&req);
+  return result;
+}
+
+/*
+ * Curl_http() gets called from the generic multi_do() function when a HTTP
+ * request is to be performed. This creates and sends a properly constructed
+ * HTTP request.
+ */
+CURLcode Curl_http(struct Curl_easy *data, bool *done)
+{
+  struct connectdata *conn = data->conn;
+  struct hyptransfer *h = &data->hyp;
+  hyper_io *io = NULL;
+  hyper_clientconn_options *options = NULL;
+  hyper_task *task = NULL; /* for the handshake */
+  hyper_task *sendtask = NULL; /* for the send */
+  hyper_clientconn *client = NULL;
+  hyper_request *req = NULL;
+  hyper_headers *headers = NULL;
+  hyper_task *handshake = NULL;
+  hyper_error *hypererr = NULL;
+  CURLcode result;
+  const char *p_accept; /* Accept: string */
+  const char *method;
+  Curl_HttpReq httpreq;
+  bool h2 = FALSE;
+  const char *te = NULL; /* transfer-encoding */
+
+  /* Always consider the DO phase done after this function call, even if there
+     may be parts of the request that is not yet sent, since we can deal with
+     the rest of the request in the PERFORM phase. */
+  *done = TRUE;
+
+  infof(data, "Time for the Hyper dance");
+  memset(h, 0, sizeof(struct hyptransfer));
+
+  result = Curl_http_host(data, conn);
+  if(result)
+    return result;
+
+  Curl_http_method(data, conn, &method, &httpreq);
+
+  /* setup the authentication headers */
+  {
+    char *pq = NULL;
+    if(data->state.up.query) {
+      pq = aprintf("%s?%s", data->state.up.path, data->state.up.query);
+      if(!pq)
+        return CURLE_OUT_OF_MEMORY;
+    }
+    result = Curl_http_output_auth(data, conn, method, httpreq,
+                                   (pq ? pq : data->state.up.path), FALSE);
+    free(pq);
+    if(result)
+      return result;
+  }
+
+  result = Curl_http_resume(data, conn, httpreq);
+  if(result)
+    return result;
+
+  result = Curl_http_range(data, httpreq);
+  if(result)
+    return result;
+
+  result = Curl_http_useragent(data);
+  if(result)
+    return result;
+
+  io = hyper_io_new();
+  if(!io) {
+    failf(data, "Couldn't create hyper IO");
+    goto error;
+  }
+  /* tell Hyper how to read/write network data */
+  hyper_io_set_userdata(io, data);
+  hyper_io_set_read(io, Curl_hyper_recv);
+  hyper_io_set_write(io, Curl_hyper_send);
+
+  /* create an executor to poll futures */
+  if(!h->exec) {
+    h->exec = hyper_executor_new();
+    if(!h->exec) {
+      failf(data, "Couldn't create hyper executor");
+      goto error;
+    }
+  }
+
+  options = hyper_clientconn_options_new();
+  if(!options) {
+    failf(data, "Couldn't create hyper client options");
+    goto error;
+  }
+  if(conn->negnpn == CURL_HTTP_VERSION_2) {
+    hyper_clientconn_options_http2(options, 1);
+    h2 = TRUE;
+  }
+
+  hyper_clientconn_options_exec(options, h->exec);
+
+  /* "Both the `io` and the `options` are consumed in this function call" */
+  handshake = hyper_clientconn_handshake(io, options);
+  if(!handshake) {
+    failf(data, "Couldn't create hyper client handshake");
+    goto error;
+  }
+  io = NULL;
+  options = NULL;
+
+  if(HYPERE_OK != hyper_executor_push(h->exec, handshake)) {
+    failf(data, "Couldn't hyper_executor_push the handshake");
+    goto error;
+  }
+  handshake = NULL; /* ownership passed on */
+
+  task = hyper_executor_poll(h->exec);
+  if(!task) {
+    failf(data, "Couldn't hyper_executor_poll the handshake");
+    goto error;
+  }
+
+  client = hyper_task_value(task);
+  hyper_task_free(task);
+
+  req = hyper_request_new();
+  if(!req) {
+    failf(data, "Couldn't hyper_request_new");
+    goto error;
+  }
+
+  if(data->state.httpwant == CURL_HTTP_VERSION_1_0) {
+    if(HYPERE_OK != hyper_request_set_version(req,
+                                              HYPER_HTTP_VERSION_1_0)) {
+      failf(data, "error setting HTTP version");
+      goto error;
+    }
+  }
+
+  if(hyper_request_set_method(req, (uint8_t *)method, strlen(method))) {
+    failf(data, "error setting method");
+    goto error;
+  }
+
+  result = request_target(data, conn, method, h2, req);
+  if(result)
+    goto error;
+
+  headers = hyper_request_headers(req);
+  if(!headers) {
+    failf(data, "hyper_request_headers");
+    goto error;
+  }
+
+  result = Curl_http_body(data, conn, httpreq, &te);
+  if(result)
+    return result;
+
+  if(data->state.aptr.host &&
+     Curl_hyper_header(data, headers, data->state.aptr.host))
+    goto error;
+
+  if(data->state.aptr.proxyuserpwd &&
+     Curl_hyper_header(data, headers, data->state.aptr.proxyuserpwd))
+    goto error;
+
+  if(data->state.aptr.userpwd &&
+     Curl_hyper_header(data, headers, data->state.aptr.userpwd))
+    goto error;
+
+  if((data->state.use_range && data->state.aptr.rangeline) &&
+     Curl_hyper_header(data, headers, data->state.aptr.rangeline))
+    goto error;
+
+  if(data->set.str[STRING_USERAGENT] &&
+     *data->set.str[STRING_USERAGENT] &&
+     data->state.aptr.uagent &&
+     Curl_hyper_header(data, headers, data->state.aptr.uagent))
+    goto error;
+
+  p_accept = Curl_checkheaders(data, "Accept")?NULL:"Accept: */*\r\n";
+  if(p_accept && Curl_hyper_header(data, headers, p_accept))
+    goto error;
+
+  if(te && Curl_hyper_header(data, headers, te))
+    goto error;
+
+#ifndef CURL_DISABLE_PROXY
+  if(conn->bits.httpproxy && !conn->bits.tunnel_proxy &&
+     !Curl_checkheaders(data, "Proxy-Connection") &&
+     !Curl_checkProxyheaders(data, conn, "Proxy-Connection")) {
+    if(Curl_hyper_header(data, headers, "Proxy-Connection: Keep-Alive"))
+      goto error;
+  }
+#endif
+
+  Curl_safefree(data->state.aptr.ref);
+  if(data->state.referer && !Curl_checkheaders(data, "Referer")) {
+    data->state.aptr.ref = aprintf("Referer: %s\r\n", data->state.referer);
+    if(!data->state.aptr.ref)
+      return CURLE_OUT_OF_MEMORY;
+    if(Curl_hyper_header(data, headers, data->state.aptr.ref))
+      goto error;
+  }
+
+  if(!Curl_checkheaders(data, "Accept-Encoding") &&
+     data->set.str[STRING_ENCODING]) {
+    Curl_safefree(data->state.aptr.accept_encoding);
+    data->state.aptr.accept_encoding =
+      aprintf("Accept-Encoding: %s\r\n", data->set.str[STRING_ENCODING]);
+    if(!data->state.aptr.accept_encoding)
+      return CURLE_OUT_OF_MEMORY;
+    if(Curl_hyper_header(data, headers, data->state.aptr.accept_encoding))
+      goto error;
+  }
+  else
+    Curl_safefree(data->state.aptr.accept_encoding);
+
+#ifdef HAVE_LIBZ
+  /* we only consider transfer-encoding magic if libz support is built-in */
+  result = Curl_transferencode(data);
+  if(result)
+    return result;
+  if(Curl_hyper_header(data, headers, data->state.aptr.te))
+    goto error;
+#endif
+
+  result = cookies(data, conn, headers);
+  if(result)
+    return result;
+
+  result = Curl_add_timecondition(data, headers);
+  if(result)
+    return result;
+
+  result = Curl_add_custom_headers(data, FALSE, headers);
+  if(result)
+    return result;
+
+  result = bodysend(data, conn, headers, req, httpreq);
+  if(result)
+    return result;
+
+  Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"\r\n", 2);
+
+  data->req.upload_chunky = FALSE;
+  sendtask = hyper_clientconn_send(client, req);
+  if(!sendtask) {
+    failf(data, "hyper_clientconn_send");
+    goto error;
+  }
+
+  if(HYPERE_OK != hyper_executor_push(h->exec, sendtask)) {
+    failf(data, "Couldn't hyper_executor_push the send");
+    goto error;
+  }
+
+  hyper_clientconn_free(client);
+
+  do {
+    task = hyper_executor_poll(h->exec);
+    if(task) {
+      bool error = hyper_task_type(task) == HYPER_TASK_ERROR;
+      if(error)
+        hypererr = hyper_task_value(task);
+      hyper_task_free(task);
+      if(error)
+        goto error;
+    }
+  } while(task);
+
+  if((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) {
+    /* HTTP GET/HEAD download */
+    Curl_pgrsSetUploadSize(data, 0); /* nothing */
+    Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE, -1);
+  }
+  conn->datastream = Curl_hyper_stream;
+
+  /* clear userpwd and proxyuserpwd to avoid re-using old credentials
+   * from re-used connections */
+  Curl_safefree(data->state.aptr.userpwd);
+  Curl_safefree(data->state.aptr.proxyuserpwd);
+  return CURLE_OK;
+  error:
+
+  if(io)
+    hyper_io_free(io);
+
+  if(options)
+    hyper_clientconn_options_free(options);
+
+  if(handshake)
+    hyper_task_free(handshake);
+
+  if(hypererr) {
+    uint8_t errbuf[256];
+    size_t errlen = hyper_error_print(hypererr, errbuf, sizeof(errbuf));
+    hyper_code code = hyper_error_code(hypererr);
+    failf(data, "Hyper: [%d] %.*s", (int)code, (int)errlen, errbuf);
+    hyper_error_free(hypererr);
+    if(data->state.hresult)
+      return data->state.hresult;
+  }
+  return CURLE_OUT_OF_MEMORY;
+}
+
+void Curl_hyper_done(struct Curl_easy *data)
+{
+  struct hyptransfer *h = &data->hyp;
+  if(h->exec) {
+    hyper_executor_free(h->exec);
+    h->exec = NULL;
+  }
+  if(h->read_waker) {
+    hyper_waker_free(h->read_waker);
+    h->read_waker = NULL;
+  }
+  if(h->write_waker) {
+    hyper_waker_free(h->write_waker);
+    h->write_waker = NULL;
+  }
+}
+
+#endif /* !defined(CURL_DISABLE_HTTP) && defined(USE_HYPER) */
diff --git a/lib/c-hyper.h b/lib/c-hyper.h
new file mode 100644
index 0000000..d60ed78
--- /dev/null
+++ b/lib/c-hyper.h
@@ -0,0 +1,56 @@
+#ifndef HEADER_CURL_HYPER_H
+#define HEADER_CURL_HYPER_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curl_setup.h"
+
+#if !defined(CURL_DISABLE_HTTP) && defined(USE_HYPER)
+
+#include <hyper.h>
+
+/* per-transfer data for the Hyper backend */
+struct hyptransfer {
+  hyper_waker *write_waker;
+  hyper_waker *read_waker;
+  const hyper_executor *exec;
+  hyper_task *endtask;
+};
+
+size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
+                       uint8_t *buf, size_t buflen);
+size_t Curl_hyper_send(void *userp, hyper_context *ctx,
+                       const uint8_t *buf, size_t buflen);
+CURLcode Curl_hyper_stream(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           int *didwhat,
+                           bool *done,
+                           int select_res);
+
+CURLcode Curl_hyper_header(struct Curl_easy *data, hyper_headers *headers,
+                           const char *line);
+void Curl_hyper_done(struct Curl_easy *);
+
+#else
+#define Curl_hyper_done(x)
+
+#endif /* !defined(CURL_DISABLE_HTTP) && defined(USE_HYPER) */
+#endif /* HEADER_CURL_HYPER_H */
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index 78b9cef..a35535c 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2011 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2011 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -85,6 +85,9 @@
     'DOBRACE'          => 'A single space between do and open brace',
     'BRACEWHILE'       => 'A single space between open brace and while',
     'EXCLAMATIONSPACE' => 'Whitespace after exclamation mark in expression',
+    'EMPTYLINEBRACE'   => 'Empty line before the open brace',
+    'EQUALSNULL'       => 'if/while comparison with == NULL',
+    'NOTEQUALSZERO'    => 'if/while comparison with != 0'
     );
 
 sub readskiplist {
@@ -470,6 +473,21 @@
                           "$2 with space");
             }
         }
+        # check for '== NULL' in if/while conditions but not if the thing on
+        # the left of it is a function call
+        if($nostr =~ /^(.*)(if|while)(\(.*[^)]) == NULL/) {
+            checkwarn("EQUALSNULL", $line,
+                      length($1) + length($2) + length($3),
+                      $file, $l, "we prefer !variable instead of \"== NULL\" comparisons");
+        }
+
+        # check for '!= 0' in if/while conditions but not if the thing on
+        # the left of it is a function call
+        if($nostr =~ /^(.*)(if|while)(\(.*[^)]) != 0[^x]/) {
+            checkwarn("NOTEQUALSZERO", $line,
+                      length($1) + length($2) + length($3),
+                      $file, $l, "we prefer if(rc) instead of \"rc != 0\" comparisons");
+        }
 
         # check spaces in 'do {'
         if($nostr =~ /^( *)do( *)\{/ && length($2) != 1) {
@@ -594,6 +612,11 @@
             checkwarn("PARENBRACE",
                       $line, length($1)+1, $file, $l, "missing space after close paren");
         }
+        # check for "^{" with an empty line before it
+        if(($l =~ /^\{/) && ($prevl =~ /^[ \t]*\z/)) {
+            checkwarn("EMPTYLINEBRACE",
+                      $line, 0, $file, $l, "empty line before open brace");
+        }
 
         # check for space before the semicolon last in a line
         if($l =~ /^(.*[^ ].*) ;$/) {
diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h
index 12a87cf..0bbf4c4 100644
--- a/lib/config-amigaos.h
+++ b/lib/config-amigaos.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,6 @@
 #define HAVE_ARPA_INET_H 1
 #define HAVE_CLOSESOCKET_CAMEL 1
 #define HAVE_ERRNO_H 1
-#define HAVE_GETHOSTBYADDR 1
 #define HAVE_INET_ADDR 1
 #define HAVE_INTTYPES_H 1
 #define HAVE_IOCTLSOCKET_CAMEL 1
@@ -49,13 +48,11 @@
 #define HAVE_OPENSSL_RSA_H 1
 #define HAVE_OPENSSL_SSL_H 1
 #define HAVE_OPENSSL_X509_H 1
-#define HAVE_PERROR 1
 #define HAVE_PWD_H 1
 #define HAVE_RAND_EGD 1
 #define HAVE_RAND_STATUS 1
 #define HAVE_SELECT 1
 #define HAVE_SETJMP_H 1
-#define HAVE_SGTTY_H 1
 #define HAVE_SIGNAL 1
 #define HAVE_SIGNAL_H 1
 #define HAVE_SIG_ATOMIC_T 1
@@ -96,14 +93,13 @@
 #define OS "AmigaOS"
 
 #define PACKAGE "curl"
-#define PACKAGE_BUGREPORT "a suitable mailing list: https://curl.haxx.se/mail/"
+#define PACKAGE_BUGREPORT "a suitable mailing list: https://curl.se/mail/"
 #define PACKAGE_NAME "curl"
 #define PACKAGE_STRING "curl -"
 #define PACKAGE_TARNAME "curl"
 #define PACKAGE_VERSION "-"
 #define CURL_CA_BUNDLE "s:curl-ca-bundle.crt"
 
-#define RETSIGTYPE void
 #define SELECT_TYPE_ARG1 int
 #define SELECT_TYPE_ARG234 (fd_set *)
 #define SELECT_TYPE_ARG5 (struct timeval *)
@@ -129,13 +125,6 @@
 #  define LONG_MIN (-0x7fffffffL-1)
 #endif
 
-#define HAVE_GETNAMEINFO 1
-#define GETNAMEINFO_QUAL_ARG1 const
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-#define GETNAMEINFO_TYPE_ARG2 int
-#define GETNAMEINFO_TYPE_ARG46 size_t
-#define GETNAMEINFO_TYPE_ARG7 int
-
 #define HAVE_RECV 1
 #define RECV_TYPE_ARG1 long
 #define RECV_TYPE_ARG2 char *
diff --git a/lib/config-dos.h b/lib/config-dos.h
index 349e756..6859208 100644
--- a/lib/config-dos.h
+++ b/lib/config-dos.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -45,7 +45,6 @@
 #define HAVE_FCNTL_H           1
 #define HAVE_FREEADDRINFO      1
 #define HAVE_GETADDRINFO       1
-#define HAVE_GETNAMEINFO       1
 #define HAVE_GETPROTOBYNAME    1
 #define HAVE_GETTIMEOFDAY      1
 #define HAVE_IO_H              1
@@ -84,7 +83,6 @@
 
 #define NEED_MALLOC_H          1
 
-#define RETSIGTYPE             void
 #define SIZEOF_INT             4
 #define SIZEOF_LONG            4
 #define SIZEOF_LONG_DOUBLE     16
@@ -94,7 +92,7 @@
 #define STDC_HEADERS           1
 #define TIME_WITH_SYS_TIME     1
 
-/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
+/* Qualifiers for send(), recv(), and recvfrom() */
 
 #define SEND_TYPE_ARG1         int
 #define SEND_QUAL_ARG2         const
@@ -118,12 +116,6 @@
 #define RECVFROM_TYPE_RETV     int
 #define RECVFROM_TYPE_ARG2_IS_VOID 1
 
-#define GETNAMEINFO_QUAL_ARG1  const
-#define GETNAMEINFO_TYPE_ARG1  struct sockaddr *
-#define GETNAMEINFO_TYPE_ARG2  int
-#define GETNAMEINFO_TYPE_ARG46 int
-#define GETNAMEINFO_TYPE_ARG7  int
-
 #define BSD
 
 /* CURLDEBUG definition enables memory tracking */
diff --git a/lib/config-mac.h b/lib/config-mac.h
index 14b98fe..c8833e3 100644
--- a/lib/config-mac.h
+++ b/lib/config-mac.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -81,19 +81,10 @@
 #define HAVE_IOCTL              1
 #define HAVE_IOCTL_FIONBIO      1
 
-#define RETSIGTYPE void
-
 #define SIZEOF_INT              4
 #define SIZEOF_SHORT            2
 #define SIZEOF_SIZE_T           4
 
-#define HAVE_GETNAMEINFO 1
-#define GETNAMEINFO_QUAL_ARG1 const
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-#define GETNAMEINFO_TYPE_ARG2 socklen_t
-#define GETNAMEINFO_TYPE_ARG46 size_t
-#define GETNAMEINFO_TYPE_ARG7 int
-
 #define HAVE_RECV 1
 #define RECV_TYPE_ARG1 int
 #define RECV_TYPE_ARG2 void *
diff --git a/lib/config-os400.h b/lib/config-os400.h
index 7beb81f..cff9c3e 100644
--- a/lib/config-os400.h
+++ b/lib/config-os400.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -39,15 +39,6 @@
 /* Define cpu-machine-OS */
 #define OS "OS/400"
 
-/* Define if you have the gethostbyaddr_r() function with 5 arguments */
-#define HAVE_GETHOSTBYADDR_R_5
-
-/* Define if you have the gethostbyaddr_r() function with 7 arguments */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* Define if you have the gethostbyaddr_r() function with 8 arguments */
-#undef HAVE_GETHOSTBYADDR_R_8
-
 /* OS400 supports a 3-argument ASCII version of gethostbyaddr_r(), but its
  *  prototype is incompatible with the "standard" one (1st argument is not
  *  const). However, getaddrinfo() is supported (ASCII version defined as
@@ -94,27 +85,15 @@
 /* Define if you have the `closesocket' function. */
 #undef HAVE_CLOSESOCKET
 
-/* Define if you have the <crypto.h> header file. */
-#undef HAVE_CRYPTO_H
-
 /* Define if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H
 
-/* Define if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
 /* Define if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H
 
 /* Define if you have the `geteuid' function. */
 #define HAVE_GETEUID
 
-/* Define if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR
-
-/* Define if you have the `gethostbyaddr_r' function. */
-#define HAVE_GETHOSTBYADDR_R
-
 /* Define if you have the `gethostname' function. */
 #define HAVE_GETHOSTNAME
 
@@ -229,9 +208,6 @@
 /* Define if you have the <pem.h> header file. */
 #undef HAVE_PEM_H
 
-/* Define if you have the `perror' function. */
-#define HAVE_PERROR
-
 /* Define if you have the <pwd.h> header file. */
 #define HAVE_PWD_H
 
@@ -244,18 +220,12 @@
 /* Define if you have the `RAND_status' function. */
 #undef HAVE_RAND_STATUS
 
-/* Define if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
 /* Define if you have the `select' function. */
 #define HAVE_SELECT
 
 /* Define if you have the `setvbuf' function. */
 #define HAVE_SETVBUF
 
-/* Define if you have the <sgtty.h> header file. */
-#undef HAVE_SGTTY_H
-
 /* Define if you have the `sigaction' function. */
 #define HAVE_SIGACTION
 
@@ -310,9 +280,6 @@
 /* Define if you have the <string.h> header file. */
 #define HAVE_STRING_H
 
-/* Define if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
 /* Define if you have the <stropts.h> header file. */
 #undef HAVE_STROPTS_H
 
@@ -352,12 +319,6 @@
 /* Define if you have the <sys/ioctl.h> header file. */
 #define HAVE_SYS_IOCTL_H
 
-/* Define if you have the `tcgetattr' function. */
-#undef HAVE_TCGETATTR
-
-/* Define if you have the `tcsetattr' function. */
-#undef HAVE_TCSETATTR
-
 /* Define if you have the <termios.h> header file. */
 #undef HAVE_TERMIOS_H
 
@@ -382,9 +343,6 @@
 /* Name of package */
 #undef PACKAGE
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* The size of `int', as computed by sizeof. */
 #define SIZEOF_INT              4
 
@@ -422,9 +380,6 @@
 /* Define if you can safely include both <sys/time.h> and <time.h>. */
 #define TIME_WITH_SYS_TIME
 
-/* Define to enable alt-svc support (experimental) */
-#undef USE_ALTSVC
-
 /* Define to enable HTTP3 support (experimental, requires NGTCP2 or QUICHE) */
 #undef ENABLE_QUIC
 
@@ -464,25 +419,6 @@
 /* Define if you have the ldap_url_parse procedure. */
 /* #define HAVE_LDAP_URL_PARSE */    /* Disabled because of an IBM bug. */
 
-/* Define if you have the getnameinfo function. */
-/* OS400 has no ASCII version of this procedure: wrapped in setup-os400.h. */
-#define HAVE_GETNAMEINFO
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 socklen_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 socklen_t
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
 /* Define if you have the recv function. */
 #define HAVE_RECV
 
diff --git a/lib/config-plan9.h b/lib/config-plan9.h
index 41440a1..9b98a6e 100644
--- a/lib/config-plan9.h
+++ b/lib/config-plan9.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,15 +33,13 @@
 #define OS "plan9"
 #define PACKAGE "curl"
 #define PACKAGE_NAME "curl"
-#define PACKAGE_BUGREPORT "a suitable mailing list: https://curl.haxx.se/mail/"
+#define PACKAGE_BUGREPORT "a suitable mailing list: https://curl.se/mail/"
 #define PACKAGE_STRING "curl -"
 #define PACKAGE_TARNAME "curl"
 #define PACKAGE_VERSION "-"
 #define RANDOM_FILE "/dev/random"
 #define VERSION "0.0.0" /* TODO */
 
-#define RETSIGTYPE void
-
 #define STDC_HEADERS 1
 
 #ifdef _BITS64
@@ -56,13 +54,6 @@
 #define SIZEOF_TIME_T 4
 #endif
 
-#define HAVE_GETNAMEINFO 1
-#define GETNAMEINFO_QUAL_ARG1 const
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-#define GETNAMEINFO_TYPE_ARG2 int
-#define GETNAMEINFO_TYPE_ARG46 long
-#define GETNAMEINFO_TYPE_ARG7 int
-
 #define HAVE_RECV 1
 #define RECV_TYPE_ARG1 int
 #define RECV_TYPE_ARG2 void *
@@ -105,13 +96,10 @@
 #define HAVE_ERRNO_H 1
 #define HAVE_FCNTL 1
 #define HAVE_FCNTL_H 1
-#define HAVE_FDOPEN 1
-#define HAVE_FORK 1
 #define HAVE_FREEADDRINFO 1
 #define HAVE_FTRUNCATE 1
 #define HAVE_GETADDRINFO 1
 #define HAVE_GETEUID 1
-#define HAVE_GETHOSTBYADDR 1
 #define HAVE_GETHOSTBYNAME 1
 #define HAVE_GETHOSTNAME 1
 #define HAVE_GETPPID 1
@@ -145,7 +133,6 @@
 #define HAVE_OPENSSL_SSL_H 1
 #define HAVE_OPENSSL_X509_H 1
 
-#define HAVE_PERROR 1
 #define HAVE_PIPE 1
 #define HAVE_POLL 1
 #define HAVE_POLL_FINE 1
@@ -173,7 +160,6 @@
 #define HAVE_STRCASECMP 1
 #define HAVE_STRDUP 1
 #define HAVE_STRING_H 1
-#define HAVE_STRNCASECMP 1
 #define HAVE_STRSTR 1
 #define HAVE_STRTOK_R 1
 #define HAVE_STRTOLL 1
@@ -202,7 +188,6 @@
 #define STRERROR_R_TYPE_ARG3 int
 
 #define TIME_WITH_SYS_TIME 1
-#define USE_BLOCKING_SOCKETS 1
 #define USE_MANUAL 1
 
 #define __attribute__(x)
diff --git a/lib/config-riscos.h b/lib/config-riscos.h
index 0ddf487..0535137 100644
--- a/lib/config-riscos.h
+++ b/lib/config-riscos.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,15 +41,6 @@
 /* Define if you want the built-in manual */
 #define USE_MANUAL
 
-/* Define if you have the gethostbyaddr_r() function with 5 arguments */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* Define if you have the gethostbyaddr_r() function with 7 arguments */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* Define if you have the gethostbyaddr_r() function with 8 arguments */
-#undef HAVE_GETHOSTBYADDR_R_8
-
 /* Define if you have the gethostbyname_r() function with 3 arguments */
 #undef HAVE_GETHOSTBYNAME_R_3
 
@@ -95,15 +86,9 @@
 /* Define if you have the `closesocket' function. */
 #undef HAVE_CLOSESOCKET
 
-/* Define if you have the <crypto.h> header file. */
-#undef HAVE_CRYPTO_H
-
 /* Define if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H
 
-/* Define if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
 /* Define if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H
 
@@ -116,12 +101,6 @@
 /* Define if you have the `geteuid' function. */
 #undef HAVE_GETEUID
 
-/* Define if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR
-
-/* Define if you have the `gethostbyaddr_r' function. */
-#undef HAVE_GETHOSTBYADDR_R
-
 /* Define if you have the `gethostbyname_r' function. */
 #undef HAVE_GETHOSTBYNAME_R
 
@@ -221,9 +200,6 @@
 /* Define if you have the <pem.h> header file. */
 #undef HAVE_PEM_H
 
-/* Define if you have the `perror' function. */
-#undef HAVE_PERROR
-
 /* Define if you have the <pwd.h> header file. */
 #undef HAVE_PWD_H
 
@@ -236,18 +212,12 @@
 /* Define if you have the `RAND_status' function. */
 #undef HAVE_RAND_STATUS
 
-/* Define if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
 /* Define if you have the `select' function. */
 #define HAVE_SELECT
 
 /* Define if you have the `setvbuf' function. */
 #undef HAVE_SETVBUF
 
-/* Define if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H
-
 /* Define if you have the `sigaction' function. */
 #undef HAVE_SIGACTION
 
@@ -296,9 +266,6 @@
 /* Define if you have the <string.h> header file. */
 #define HAVE_STRING_H
 
-/* Define if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
 /* Define if you have the `strstr' function. */
 #define HAVE_STRSTR
 
@@ -329,12 +296,6 @@
 /* Define if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H
 
-/* Define if you have the `tcgetattr' function. */
-#define HAVE_TCGETATTR
-
-/* Define if you have the `tcsetattr' function. */
-#define HAVE_TCSETATTR
-
 /* Define if you have the <termios.h> header file. */
 #define HAVE_TERMIOS_H
 
@@ -359,9 +320,6 @@
 /* Name of package */
 #undef PACKAGE
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* The size of `int', as computed by sizeof. */
 #define SIZEOF_INT 4
 
@@ -417,24 +375,6 @@
 /* to disable LDAP */
 #define CURL_DISABLE_LDAP
 
-/* Define if you have the getnameinfo function. */
-#define HAVE_GETNAMEINFO 1
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 socklen_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 size_t
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
 /* Define if you have the recv function. */
 #define HAVE_RECV 1
 
diff --git a/lib/config-tpf.h b/lib/config-tpf.h
index 199dfbc..ab29bfc 100644
--- a/lib/config-tpf.h
+++ b/lib/config-tpf.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -77,18 +77,6 @@
 /* Define if struct sockaddr_in6 has the sin6_scope_id member */
 /* #undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID */
 
-/* Define to the type of arg 1 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG1 */
-
-/* Define to the type of arg 2 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG2 */
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG46 */
-
-/* Define to the type of arg 7 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG7 */
-
 /* Define to 1 if you have the alarm function. */
 #define HAVE_ALARM 1
 
@@ -111,17 +99,9 @@
 /* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
 
-/* Define to 1 if you have the <crypto.h> header file. */
-/* #undef HAVE_CRYPTO_H */
-#define HAVE_CRYPTO_H 1
-
 /* Define to 1 if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H 1
 
-/* Define to 1 if you have the <err.h> header file. */
-/* #undef HAVE_ERR_H */
-#define HAVE_ERR_H 1
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
 
@@ -131,10 +111,6 @@
 /* Define to 1 if you have a working fcntl O_NONBLOCK function. */
 #define HAVE_FCNTL_O_NONBLOCK 1
 
-/* Define to 1 if you have the `fork' function. */
-/* #undef HAVE_FORK */
-#define HAVE_FORK 1
-
 /* Define to 1 if you have the `ftruncate' function. */
 #define HAVE_FTRUNCATE 1
 
@@ -144,9 +120,6 @@
 /* Define to 1 if you have the `geteuid' function. */
 #define HAVE_GETEUID 1
 
-/* Define to 1 if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR 1
-
 /* If you have gethostbyname */
 #define HAVE_GETHOSTBYNAME 1
 
@@ -162,9 +135,6 @@
 /* gethostbyname_r() takes 6 args */
 /* #undef HAVE_GETHOSTBYNAME_R_6 1 */
 
-/* Define to 1 if you have the getnameinfo function. */
-/* #undef HAVE_GETNAMEINFO */
-
 /* Define to 1 if you have the `getpass_r' function. */
 /* #undef HAVE_GETPASS_R */
 
@@ -340,9 +310,6 @@
 /* #undef HAVE_PEM_H */
 #define HAVE_PEM_H 1
 
-/* Define to 1 if you have the `perror' function. */
-#define HAVE_PERROR 1
-
 /* Define to 1 if you have the `pipe' function. */
 #define HAVE_PIPE 1
 
@@ -369,10 +336,6 @@
 /* #undef HAVE_RAND_STATUS */
 #define HAVE_RAND_STATUS 1
 
-/* Define to 1 if you have the <rsa.h> header file. */
-/* #undef HAVE_RSA_H */
-#define HAVE_RSA_H 1
-
 /* Define to 1 if you have the `select' function. */
 #define HAVE_SELECT 1
 
@@ -391,9 +354,6 @@
 /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
 /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */
 
-/* Define to 1 if you have the <sgtty.h> header file. */
-/* #undef HAVE_SGTTY_H 1 */
-
 /* Define to 1 if you have the `sigaction' function. */
 #define HAVE_SIGACTION 1
 
@@ -450,9 +410,6 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
-/* Define to 1 if you have the `strlcpy' function. */
-/* #undef HAVE_STRLCPY */
-
 /* Define to 1 if you have the `strstr' function. */
 #define HAVE_STRSTR 1
 
@@ -561,7 +518,7 @@
 
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT \
-  "a suitable curl mailing list => https://curl.haxx.se/mail/"
+  "a suitable curl mailing list => https://curl.se/mail/"
 
 /* Define to the full name of this package. */
 #define PACKAGE_NAME "curl"
@@ -578,9 +535,6 @@
 /* a suitable file to read random data from */
 /* #undef RANDOM_FILE */
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* Define to the type of arg 1 for `select'. */
 #define SELECT_TYPE_ARG1 int
 
@@ -617,9 +571,6 @@
 /* Define if you want to enable ares support */
 /* #undef USE_ARES */
 
-/* Define to disable non-blocking sockets */
-/* #undef USE_BLOCKING_SOCKETS */
-
 /* if GnuTLS is enabled */
 /* #undef USE_GNUTLS */
 
@@ -666,24 +617,6 @@
 /* the signed version of size_t */
 /* #undef ssize_t */
 
-/* Define to 1 if you have the getnameinfo function. */
-/* #undef HAVE_GETNAMEINFO 1 */
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-/* #undef GETNAMEINFO_QUAL_ARG1 const */
-
-/* Define to the type of arg 1 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG1 struct sockaddr * */
-
-/* Define to the type of arg 2 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG2 socklen_t */
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG46 size_t */
-
-/* Define to the type of arg 7 for getnameinfo. */
-/* #undef GETNAMEINFO_TYPE_ARG7 int */
-
 /* Define to 1 if you have the recv function. */
 #define HAVE_RECV 1
 
diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h
index 14bf0be..22d2b96 100644
--- a/lib/config-vxworks.h
+++ b/lib/config-vxworks.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -83,27 +83,6 @@
 /* Define if you want to enable IPv6 support */
 #define ENABLE_IPV6 1
 
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 socklen_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 size_t
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 unsigned int
-
-/* Specifies the number of arguments to getservbyport_r */
-#define GETSERVBYPORT_R_ARGS 6
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#define GETSERVBYPORT_R_BUFSIZE 4096
-
 /* Define to 1 if you have the alarm function. */
 #define HAVE_ALARM 1
 
@@ -134,18 +113,12 @@
 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
 
-/* Define to 1 if you have the <crypto.h> header file. */
-/* #undef HAVE_CRYPTO_H */
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #define HAVE_DLFCN_H 1
 
 /* Define to 1 if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H 1
 
-/* Define to 1 if you have the <err.h> header file. */
-/* #undef HAVE_ERR_H */
-
 /* Define to 1 if you have the fcntl function. */
 #define HAVE_FCNTL 1
 
@@ -155,15 +128,9 @@
 /* Define to 1 if you have a working fcntl O_NONBLOCK function. */
 #define HAVE_FCNTL_O_NONBLOCK 1
 
-/* Define to 1 if you have the `fork' function. */
-#define HAVE_FORK 1
-
 /* Define to 1 if you have the freeaddrinfo function. */
 #define HAVE_FREEADDRINFO 1
 
-/* Define to 1 if you have the freeifaddrs function. */
-#define HAVE_FREEIFADDRS 1
-
 /* Define to 1 if you have the ftruncate function. */
 #define HAVE_FTRUNCATE 1
 
@@ -173,21 +140,6 @@
 /* Define to 1 if you have the `geteuid' function. */
 /* #undef HAVE_GETEUID */
 
-/* Define to 1 if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#define HAVE_GETHOSTBYADDR_R 1
-
-/* gethostbyaddr_r() takes 5 args */
-/* #undef HAVE_GETHOSTBYADDR_R_5 */
-
-/* gethostbyaddr_r() takes 7 args */
-/* #undef HAVE_GETHOSTBYADDR_R_7 */
-
-/* gethostbyaddr_r() takes 8 args */
-#define HAVE_GETHOSTBYADDR_R_8 1
-
 /* Define to 1 if you have the gethostbyname function. */
 #define HAVE_GETHOSTBYNAME 1
 
@@ -209,9 +161,6 @@
 /* Define to 1 if you have a working getifaddrs function. */
 /* #undef HAVE_GETIFADDRS */
 
-/* Define to 1 if you have the getnameinfo function. */
-#define HAVE_GETNAMEINFO 1
-
 /* Define to 1 if you have the `getpass_r' function. */
 /* #undef HAVE_GETPASS_R */
 
@@ -227,9 +176,6 @@
 /* Define to 1 if you have the `getrlimit' function. */
 #define HAVE_GETRLIMIT 1
 
-/* Define to 1 if you have the getservbyport_r function. */
-/* #undef HAVE_GETSERVBYPORT_R */
-
 /* Define to 1 if you have the `gettimeofday' function. */
 /* #undef HAVE_GETTIMEOFDAY */
 
@@ -275,15 +221,6 @@
 /* Define to 1 if you have the `inet_addr' function. */
 #define HAVE_INET_ADDR 1
 
-/* Define to 1 if you have the inet_ntoa_r function. */
-/* #undef HAVE_INET_NTOA_R */
-
-/* inet_ntoa_r() takes 2 args */
-/* #undef HAVE_INET_NTOA_R_2 */
-
-/* inet_ntoa_r() takes 3 args */
-/* #undef HAVE_INET_NTOA_R_3 */
-
 /* Define to 1 if you have a IPv6 capable working inet_ntop function. */
 /* #undef HAVE_INET_NTOP */
 
@@ -436,9 +373,6 @@
 /* Define to 1 if you have the <pem.h> header file. */
 /* #undef HAVE_PEM_H */
 
-/* Define to 1 if you have the `perror' function. */
-#define HAVE_PERROR 1
-
 /* Define to 1 if you have the `pipe' function. */
 #define HAVE_PIPE 1
 
@@ -472,9 +406,6 @@
 /* Define to 1 if you have the recvfrom function. */
 #define HAVE_RECVFROM 1
 
-/* Define to 1 if you have the <rsa.h> header file. */
-/* #undef HAVE_RSA_H */
-
 /* Define to 1 if you have the select function. */
 #define HAVE_SELECT 1
 
@@ -499,9 +430,6 @@
 /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
 /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */
 
-/* Define to 1 if you have the <sgtty.h> header file. */
-/* #undef HAVE_SGTTY_H */
-
 /* Define to 1 if you have the sigaction function. */
 #define HAVE_SIGACTION 1
 
@@ -565,12 +493,6 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
-/* Define to 1 if you have the `strlcpy' function. */
-/* #undef HAVE_STRLCPY */
-
-/* Define to 1 if you have the strncasecmp function. */
-#define HAVE_STRNCASECMP 1
-
 /* Define to 1 if you have the strncmpi function. */
 /* #undef HAVE_STRNCMPI */
 
@@ -775,9 +697,6 @@
 /* Define to the function return type for recv. */
 #define RECV_TYPE_RETV int
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* Define to the type qualifier of arg 5 for select. */
 #define SELECT_QUAL_ARG5
 
@@ -841,9 +760,6 @@
 /* Define if you want to enable c-ares support */
 /* #undef USE_ARES */
 
-/* Define to disable non-blocking sockets. */
-/* #undef USE_BLOCKING_SOCKETS */
-
 /* if GnuTLS is enabled */
 /* #undef USE_GNUTLS */
 
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 316043d..244e5ae 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,15 +36,9 @@
 /* Define if you have the <assert.h> header file. */
 #define HAVE_ASSERT_H 1
 
-/* Define if you have the <crypto.h> header file. */
-/* #define HAVE_CRYPTO_H 1 */
-
 /* Define if you have the <errno.h> header file. */
 #define HAVE_ERRNO_H 1
 
-/* Define if you have the <err.h> header file. */
-/* #define HAVE_ERR_H 1 */
-
 /* Define if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
 
@@ -83,9 +77,6 @@
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
-/* Define if you have the <sgtty.h> header file. */
-/* #define HAVE_SGTTY_H 1 */
-
 /* Define if you have the <ssl.h> header file. */
 /* #define HAVE_SSL_H 1 */
 
@@ -191,9 +182,6 @@
 /* Define to 1 if you have the getsockname function. */
 #define HAVE_GETSOCKNAME 1
 
-/* Define if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
 /* Define if you have the gethostname function. */
 #define HAVE_GETHOSTNAME 1
 
@@ -218,9 +206,6 @@
 /* Define if you have a working ioctlsocket FIONBIO function. */
 #define HAVE_IOCTLSOCKET_FIONBIO 1
 
-/* Define if you have the perror function. */
-#define HAVE_PERROR 1
-
 /* Define if you have the RAND_screen function when using SSL. */
 #define HAVE_RAND_SCREEN 1
 
@@ -247,7 +232,9 @@
 #define HAVE_SOCKET 1
 
 /* Define if you have the strcasecmp function. */
-/* #define HAVE_STRCASECMP 1 */
+#ifdef __MINGW32__
+#define HAVE_STRCASECMP 1
+#endif
 
 /* Define if you have the strdup function. */
 #define HAVE_STRDUP 1
@@ -258,9 +245,6 @@
 /* Define if you have the stricmp function. */
 #define HAVE_STRICMP 1
 
-/* Define if you have the strncasecmp function. */
-/* #define HAVE_STRNCASECMP 1 */
-
 /* Define if you have the strnicmp function. */
 #define HAVE_STRNICMP 1
 
@@ -273,32 +257,11 @@
 #define HAVE_STRTOLL 1
 #endif
 
-/* Define if you have the tcgetattr function. */
-/* #define HAVE_TCGETATTR 1 */
-
-/* Define if you have the tcsetattr function. */
-/* #define HAVE_TCSETATTR 1 */
-
 /* Define if you have the utime function. */
 #ifndef __BORLANDC__
 #define HAVE_UTIME 1
 #endif
 
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 socklen_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 DWORD
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
 /* Define if you have the recv function. */
 #define HAVE_RECV 1
 
@@ -369,9 +332,6 @@
 /* Define if in_addr_t is not an available 'typedefed' type. */
 #define in_addr_t unsigned long
 
-/* Define to the return type of signal handlers (int or void). */
-#define RETSIGTYPE void
-
 /* Define if ssize_t is not an available 'typedefed' type. */
 #ifndef _SSIZE_T_DEFINED
 #  if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
@@ -429,7 +389,6 @@
 #  undef HAVE_WS2TCPIP_H
 #  undef HAVE_ERRNO_H
 #  undef HAVE_GETHOSTNAME
-#  undef HAVE_GETNAMEINFO
 #  undef LWIP_POSIX_SOCKETS_IO_NAMES
 #  undef RECV_TYPE_ARG1
 #  undef RECV_TYPE_ARG3
@@ -460,7 +419,6 @@
   #undef HAVE_WINSOCK2_H
   #undef HAVE_WS2TCPIP_H
   #define HAVE_GETADDRINFO
-  #define HAVE_GETNAMEINFO
   #define HAVE_SYS_IOCTL_H
   #define HAVE_SYS_SOCKET_H
   #define HAVE_NETINET_IN_H
@@ -502,9 +460,14 @@
 #define _CRT_NONSTDC_NO_DEPRECATE 1
 #endif
 
-/* VS2005 and later default size for time_t is 64-bit, unless
-   _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+/* mingw-w64, mingw using >= MSVCR80, and visual studio >= 2005 (MSVCR80)
+   all default to 64-bit time_t unless _USE_32BIT_TIME_T is defined */
+#ifdef __MINGW32__
+#  include <_mingw.h>
+#endif
+#if defined(__MINGW64_VERSION_MAJOR) || \
+    (defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0800)) || \
+    (defined(_MSC_VER) && (_MSC_VER >= 1400))
 #  ifndef _USE_32BIT_TIME_T
 #    define SIZEOF_TIME_T 8
 #  else
@@ -585,7 +548,7 @@
 #  endif
 #endif
 
-/* Availability of freeaddrinfo, getaddrinfo, getnameinfo and if_nametoindex
+/* Availability of freeaddrinfo, getaddrinfo, and if_nametoindex
    functions is quite convoluted, compiler dependent and even build target
    dependent. */
 #if defined(HAVE_WS2TCPIP_H)
@@ -593,17 +556,14 @@
 #    define HAVE_FREEADDRINFO           1
 #    define HAVE_GETADDRINFO            1
 #    define HAVE_GETADDRINFO_THREADSAFE 1
-#    define HAVE_GETNAMEINFO            1
 #  elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
 #    define HAVE_FREEADDRINFO           1
 #    define HAVE_GETADDRINFO            1
 #    define HAVE_GETADDRINFO_THREADSAFE 1
-#    define HAVE_GETNAMEINFO            1
 #  elif defined(_MSC_VER) && (_MSC_VER >= 1200)
 #    define HAVE_FREEADDRINFO           1
 #    define HAVE_GETADDRINFO            1
 #    define HAVE_GETADDRINFO_THREADSAFE 1
-#    define HAVE_GETNAMEINFO            1
 #  endif
 #endif
 
@@ -718,22 +678,8 @@
 #define USE_WIN32_CRYPTO
 #endif
 
-/* On MinGW the ADDRESS_FAMILY typedef was committed alongside LUP_SECURE,
-   so we use it to check for the presence of the typedef. */
-#include <ws2tcpip.h>
-#if !defined(__MINGW32__) || defined(LUP_SECURE)
 /* Define to use Unix sockets. */
 #define USE_UNIX_SOCKETS
-#if !defined(UNIX_PATH_MAX)
-  /* Replicating logic present in afunix.h of newer Windows 10 SDK versions */
-# define UNIX_PATH_MAX 108
-  /* !checksrc! disable TYPEDEFSTRUCT 1 */
-  typedef struct sockaddr_un {
-    ADDRESS_FAMILY sun_family;
-    char sun_path[UNIX_PATH_MAX];
-  } SOCKADDR_UN, *PSOCKADDR_UN;
-#endif
-#endif
 
 /* ---------------------------------------------------------------- */
 /*                       ADDITIONAL DEFINITIONS                     */
diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h
index 5eb1c18..f3f02e7 100644
--- a/lib/config-win32ce.h
+++ b/lib/config-win32ce.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,15 +36,9 @@
 /* Define if you have the <assert.h> header file.  */
 /* #define HAVE_ASSERT_H 1 */
 
-/* Define if you have the <crypto.h> header file.  */
-/* #define HAVE_CRYPTO_H 1 */
-
 /* Define if you have the <errno.h> header file.  */
 /* #define HAVE_ERRNO_H 1 */
 
-/* Define if you have the <err.h> header file.  */
-/* #define HAVE_ERR_H 1 */
-
 /* Define if you have the <fcntl.h> header file.  */
 #define HAVE_FCNTL_H 1
 
@@ -54,7 +48,7 @@
 /* Define if you have the <io.h> header file.  */
 #define HAVE_IO_H 1
 
-/* Define if you need the malloc.h header header file even with stdlib.h  */
+/* Define if you need the malloc.h header file even with stdlib.h  */
 #define NEED_MALLOC_H 1
 
 /* Define if you have the <netdb.h> header file.  */
@@ -66,9 +60,6 @@
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
-/* Define if you have the <sgtty.h> header file.  */
-/* #define HAVE_SGTTY_H 1 */
-
 /* Define if you have the <ssl.h> header file.  */
 /* #define HAVE_SSL_H 1 */
 
@@ -151,9 +142,6 @@
 /* Define if you don't have vprintf but do have _doprnt.  */
 /* #define HAVE_DOPRNT 1 */
 
-/* Define if you have the gethostbyaddr function.  */
-#define HAVE_GETHOSTBYADDR 1
-
 /* Define if you have the gethostname function.  */
 #define HAVE_GETHOSTNAME 1
 
@@ -175,9 +163,6 @@
 /* Define if you have a working ioctlsocket FIONBIO function. */
 #define HAVE_IOCTLSOCKET_FIONBIO 1
 
-/* Define if you have the perror function.  */
-#define HAVE_PERROR 1
-
 /* Define if you have the RAND_screen function when using SSL  */
 #define HAVE_RAND_SCREEN 1
 
@@ -205,9 +190,6 @@
 /* Define if you have the stricmp function. */
 /* #define HAVE_STRICMP 1 */
 
-/* Define if you have the strncasecmp function. */
-/* #define HAVE_STRNCASECMP 1 */
-
 /* Define if you have the strnicmp function. */
 /* #define HAVE_STRNICMP 1 */
 
@@ -219,33 +201,9 @@
 #define HAVE_STRTOLL 1
 #endif
 
-/* Define if you have the tcgetattr function.  */
-/* #define HAVE_TCGETATTR 1 */
-
-/* Define if you have the tcsetattr function.  */
-/* #define HAVE_TCSETATTR 1 */
-
 /* Define if you have the utime function */
 #define HAVE_UTIME 1
 
-/* Define if you have the getnameinfo function. */
-#define HAVE_GETNAMEINFO 1
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 socklen_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 DWORD
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
 /* Define if you have the recv function. */
 #define HAVE_RECV 1
 
@@ -316,9 +274,6 @@
 /* Define this if in_addr_t is not an available 'typedefed' type */
 #define in_addr_t unsigned long
 
-/* Define as the return type of signal handlers (int or void).  */
-#define RETSIGTYPE void
-
 /* Define ssize_t if it is not an available 'typedefed' type */
 #if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
 #elif defined(_WIN64)
diff --git a/lib/conncache.c b/lib/conncache.c
index c0e4d3e..f5ba8ff 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -6,11 +6,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2012 - 2016, Linus Nielsen Feltzing, <linus@haxx.se>
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -34,6 +34,7 @@
 #include "share.h"
 #include "sigpipe.h"
 #include "connect.h"
+#include "strcase.h"
 
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
@@ -161,6 +162,7 @@
 
   /* put the number first so that the hostname gets cut off if too long */
   msnprintf(buf, len, "%ld%s", port, hostname);
+  Curl_strntolower(buf, buf, len);
 }
 
 /* Returns number of connections currently held in the connection cache.
@@ -179,12 +181,14 @@
    connectdata struct is setup to use.
 
    **NOTE**: When it returns, it holds the connection cache lock! */
-struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn,
-                                                 struct conncache *connc,
-                                                 const char **hostp)
+struct connectbundle *
+Curl_conncache_find_bundle(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           struct conncache *connc,
+                           const char **hostp)
 {
   struct connectbundle *bundle = NULL;
-  CONNCACHE_LOCK(conn->data);
+  CONNCACHE_LOCK(data);
   if(connc) {
     char key[HASHKEY_SIZE];
     hashkey(conn, key, sizeof(key), hostp);
@@ -227,15 +231,17 @@
   }
 }
 
-CURLcode Curl_conncache_add_conn(struct conncache *connc,
-                                 struct connectdata *conn)
+CURLcode Curl_conncache_add_conn(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
   struct connectbundle *bundle = NULL;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
+  struct conncache *connc = data->state.conn_cache;
+  DEBUGASSERT(conn);
 
   /* *find_bundle() locks the connection cache */
-  bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache, NULL);
+  bundle = Curl_conncache_find_bundle(data, conn, data->state.conn_cache,
+                                      NULL);
   if(!bundle) {
     int rc;
     char key[HASHKEY_SIZE];
@@ -259,8 +265,8 @@
   conn->connection_id = connc->next_connection_id++;
   connc->num_conn++;
 
-  DEBUGF(infof(conn->data, "Added connection %ld. "
-               "The cache now contains %zu members\n",
+  DEBUGF(infof(data, "Added connection %ld. "
+               "The cache now contains %zu members",
                conn->connection_id, connc->num_conn));
 
   unlock:
@@ -270,8 +276,8 @@
 }
 
 /*
- * Removes the connectdata object from the connection cache, but does *not*
- * clear the conn->data association. The transfer still owns this connection.
+ * Removes the connectdata object from the connection cache, but the transfer
+ * still owns this connection.
  *
  * Pass TRUE/FALSE in the 'lock' argument depending on if the parent function
  * already holds the lock or not.
@@ -294,7 +300,7 @@
     conn->bundle = NULL; /* removed from it */
     if(connc) {
       connc->num_conn--;
-      DEBUGF(infof(data, "The cache now contains %zu members\n",
+      DEBUGF(infof(data, "The cache now contains %zu members",
                    connc->num_conn));
     }
     if(lock) {
@@ -318,7 +324,8 @@
 bool Curl_conncache_foreach(struct Curl_easy *data,
                             struct conncache *connc,
                             void *param,
-                            int (*func)(struct connectdata *conn, void *param))
+                            int (*func)(struct Curl_easy *data,
+                                        struct connectdata *conn, void *param))
 {
   struct Curl_hash_iterator iter;
   struct Curl_llist_element *curr;
@@ -344,7 +351,7 @@
       struct connectdata *conn = curr->ptr;
       curr = curr->next;
 
-      if(1 == func(conn, param)) {
+      if(1 == func(data, conn, param)) {
         CONNCACHE_UNLOCK(data);
         return TRUE;
       }
@@ -403,7 +410,7 @@
   conn->lastused = Curl_now(); /* it was used up until now */
   if(maxconnects > 0 &&
      Curl_conncache_size(data) > maxconnects) {
-    infof(data, "Connection cache is full, closing the oldest one.\n");
+    infof(data, "Connection cache is full, closing the oldest one");
 
     conn_candidate = Curl_conncache_extract_oldest(data);
     if(conn_candidate) {
@@ -444,7 +451,7 @@
   while(curr) {
     conn = curr->ptr;
 
-    if(!CONN_INUSE(conn) && !conn->data) {
+    if(!CONN_INUSE(conn)) {
       /* Set higher score for the age passed since the connection was used */
       score = Curl_timediff(now, conn->lastused);
 
@@ -459,9 +466,8 @@
     /* remove it to prevent another thread from nicking it */
     bundle_remove_conn(bundle, conn_candidate);
     data->state.conn_cache->num_conn--;
-    DEBUGF(infof(data, "The cache now contains %zu members\n",
+    DEBUGF(infof(data, "The cache now contains %zu members",
                  data->state.conn_cache->num_conn));
-    conn_candidate->data = data; /* associate! */
   }
 
   return conn_candidate;
@@ -502,7 +508,7 @@
     while(curr) {
       conn = curr->ptr;
 
-      if(!CONN_INUSE(conn) && !conn->data && !conn->bits.close &&
+      if(!CONN_INUSE(conn) && !conn->bits.close &&
          !conn->bits.connect_only) {
         /* Set higher score for the age passed since the connection was used */
         score = Curl_timediff(now, conn->lastused);
@@ -522,9 +528,8 @@
     /* remove it to prevent another thread from nicking it */
     bundle_remove_conn(bundle_candidate, conn_candidate);
     connc->num_conn--;
-    DEBUGF(infof(data, "The cache now contains %zu members\n",
+    DEBUGF(infof(data, "The cache now contains %zu members",
                  connc->num_conn));
-    conn_candidate->data = data; /* associate! */
   }
   CONNCACHE_UNLOCK(data);
 
@@ -543,12 +548,10 @@
   conn = conncache_find_first_connection(connc);
   while(conn) {
     SIGPIPE_VARIABLE(pipe_st);
-    conn->data = connc->closure_handle;
-
-    sigpipe_ignore(conn->data, &pipe_st);
+    sigpipe_ignore(connc->closure_handle, &pipe_st);
     /* This will remove the connection from the cache */
     connclose(conn, "kill all");
-    Curl_conncache_remove_conn(conn->data, conn, TRUE);
+    Curl_conncache_remove_conn(connc->closure_handle, conn, TRUE);
     (void)Curl_disconnect(connc->closure_handle, conn, FALSE);
     sigpipe_restore(&pipe_st);
 
diff --git a/lib/conncache.h b/lib/conncache.h
index c3e9ff5..e9c1e32 100644
--- a/lib/conncache.h
+++ b/lib/conncache.h
@@ -7,12 +7,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2015 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2015 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, <linus@haxx.se>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -29,6 +29,10 @@
  * be shared.
  */
 
+#include "timeval.h"
+
+struct connectdata;
+
 struct conncache {
   struct Curl_hash hash;
   size_t num_conn;
@@ -45,17 +49,24 @@
 #ifdef CURLDEBUG
 /* the debug versions of these macros make extra certain that the lock is
    never doubly locked or unlocked */
-#define CONNCACHE_LOCK(x) if((x)->share) {                              \
-    Curl_share_lock((x), CURL_LOCK_DATA_CONNECT, CURL_LOCK_ACCESS_SINGLE); \
-    DEBUGASSERT(!(x)->state.conncache_lock);                            \
-    (x)->state.conncache_lock = TRUE;                                   \
-  }
+#define CONNCACHE_LOCK(x)                                               \
+  do {                                                                  \
+    if((x)->share) {                                                    \
+      Curl_share_lock((x), CURL_LOCK_DATA_CONNECT,                      \
+                      CURL_LOCK_ACCESS_SINGLE);                         \
+      DEBUGASSERT(!(x)->state.conncache_lock);                          \
+      (x)->state.conncache_lock = TRUE;                                 \
+    }                                                                   \
+  } while(0)
 
-#define CONNCACHE_UNLOCK(x) if((x)->share) {                            \
-    DEBUGASSERT((x)->state.conncache_lock);                             \
-    (x)->state.conncache_lock = FALSE;                                  \
-    Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT);                     \
-  }
+#define CONNCACHE_UNLOCK(x)                                             \
+  do {                                                                  \
+    if((x)->share) {                                                    \
+      DEBUGASSERT((x)->state.conncache_lock);                           \
+      (x)->state.conncache_lock = FALSE;                                \
+      Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT);                   \
+    }                                                                   \
+  } while(0)
 #else
 #define CONNCACHE_LOCK(x) if((x)->share)                                \
     Curl_share_lock((x), CURL_LOCK_DATA_CONNECT, CURL_LOCK_ACCESS_SINGLE)
@@ -74,7 +85,8 @@
 void Curl_conncache_destroy(struct conncache *connc);
 
 /* return the correct bundle, to a host or a proxy */
-struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn,
+struct connectbundle *Curl_conncache_find_bundle(struct Curl_easy *data,
+                                                 struct connectdata *conn,
                                                  struct conncache *connc,
                                                  const char **hostp);
 /* returns number of connections currently held in the connection cache */
@@ -82,15 +94,15 @@
 
 bool Curl_conncache_return_conn(struct Curl_easy *data,
                                 struct connectdata *conn);
-CURLcode Curl_conncache_add_conn(struct conncache *connc,
-                                 struct connectdata *conn) WARN_UNUSED_RESULT;
+CURLcode Curl_conncache_add_conn(struct Curl_easy *data) WARN_UNUSED_RESULT;
 void Curl_conncache_remove_conn(struct Curl_easy *data,
                                 struct connectdata *conn,
                                 bool lock);
 bool Curl_conncache_foreach(struct Curl_easy *data,
                             struct conncache *connc,
                             void *param,
-                            int (*func)(struct connectdata *conn,
+                            int (*func)(struct Curl_easy *data,
+                                        struct connectdata *conn,
                                         void *param));
 
 struct connectdata *
diff --git a/lib/connect.c b/lib/connect.c
index 5f23b79..11e6b88 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -111,7 +111,7 @@
   /* only set IDLE and INTVL if setting KEEPALIVE is successful */
   if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
         (void *)&optval, sizeof(optval)) < 0) {
-    infof(data, "Failed to set SO_KEEPALIVE on fd %d\n", sockfd);
+    infof(data, "Failed to set SO_KEEPALIVE on fd %d", sockfd);
   }
   else {
 #if defined(SIO_KEEPALIVE_VALS)
@@ -126,7 +126,7 @@
     vals.keepaliveinterval = optval;
     if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID) &vals, sizeof(vals),
                 NULL, 0, &dummy, NULL, NULL) != 0) {
-      infof(data, "Failed to set SIO_KEEPALIVE_VALS on fd %d: %d\n",
+      infof(data, "Failed to set SIO_KEEPALIVE_VALS on fd %d: %d",
             (int)sockfd, WSAGetLastError());
     }
 #else
@@ -135,7 +135,7 @@
     KEEPALIVE_FACTOR(optval);
     if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
           (void *)&optval, sizeof(optval)) < 0) {
-      infof(data, "Failed to set TCP_KEEPIDLE on fd %d\n", sockfd);
+      infof(data, "Failed to set TCP_KEEPIDLE on fd %d", sockfd);
     }
 #endif
 #ifdef TCP_KEEPINTVL
@@ -143,7 +143,7 @@
     KEEPALIVE_FACTOR(optval);
     if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
           (void *)&optval, sizeof(optval)) < 0) {
-      infof(data, "Failed to set TCP_KEEPINTVL on fd %d\n", sockfd);
+      infof(data, "Failed to set TCP_KEEPINTVL on fd %d", sockfd);
     }
 #endif
 #ifdef TCP_KEEPALIVE
@@ -152,7 +152,7 @@
     KEEPALIVE_FACTOR(optval);
     if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
           (void *)&optval, sizeof(optval)) < 0) {
-      infof(data, "Failed to set TCP_KEEPALIVE on fd %d\n", sockfd);
+      infof(data, "Failed to set TCP_KEEPALIVE on fd %d", sockfd);
     }
 #endif
 #endif
@@ -160,7 +160,8 @@
 }
 
 static CURLcode
-singleipconnect(struct connectdata *conn,
+singleipconnect(struct Curl_easy *data,
+                struct connectdata *conn,
                 const struct Curl_addrinfo *ai, /* start connecting to this */
                 int tempindex);          /* 0 or 1 among the temp ones */
 
@@ -170,65 +171,63 @@
  * infinite time left). If the value is negative, the timeout time has already
  * elapsed.
  *
- * The start time is stored in progress.t_startsingle - as set with
- * Curl_pgrsTime(..., TIMER_STARTSINGLE);
- *
  * If 'nowp' is non-NULL, it points to the current time.
  * 'duringconnect' is FALSE if not during a connect, as then of course the
  * connect timeout is not taken into account!
  *
  * @unittest: 1303
  */
+
+#define TIMEOUT_CONNECT 1
+#define TIMEOUT_MAXTIME 2
+
 timediff_t Curl_timeleft(struct Curl_easy *data,
                          struct curltime *nowp,
                          bool duringconnect)
 {
-  int timeout_set = 0;
-  timediff_t timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0;
+  unsigned int timeout_set = 0;
+  timediff_t connect_timeout_ms = 0;
+  timediff_t maxtime_timeout_ms = 0;
+  timediff_t timeout_ms = 0;
   struct curltime now;
 
-  /* if a timeout is set, use the most restrictive one */
+  /* The duration of a connect and the total transfer are calculated from two
+     different time-stamps. It can end up with the total timeout being reached
+     before the connect timeout expires and we must acknowledge whichever
+     timeout that is reached first. The total timeout is set per entire
+     operation, while the connect timeout is set per connect. */
 
-  if(data->set.timeout > 0)
-    timeout_set |= 1;
-  if(duringconnect && (data->set.connecttimeout > 0))
-    timeout_set |= 2;
-
-  switch(timeout_set) {
-  case 1:
-    timeout_ms = data->set.timeout;
-    break;
-  case 2:
-    timeout_ms = data->set.connecttimeout;
-    break;
-  case 3:
-    if(data->set.timeout < data->set.connecttimeout)
-      timeout_ms = data->set.timeout;
-    else
-      timeout_ms = data->set.connecttimeout;
-    break;
-  default:
-    /* use the default */
-    if(!duringconnect)
-      /* if we're not during connect, there's no default timeout so if we're
-         at zero we better just return zero and not make it a negative number
-         by the math below */
-      return 0;
-    break;
+  if(data->set.timeout > 0) {
+    timeout_set = TIMEOUT_MAXTIME;
+    maxtime_timeout_ms = data->set.timeout;
   }
+  if(duringconnect) {
+    timeout_set |= TIMEOUT_CONNECT;
+    connect_timeout_ms = (data->set.connecttimeout > 0) ?
+      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
+  }
+  if(!timeout_set)
+    /* no timeout  */
+    return 0;
 
   if(!nowp) {
     now = Curl_now();
     nowp = &now;
   }
 
-  /* subtract elapsed time */
-  if(duringconnect)
-    /* since this most recent connect started */
-    timeout_ms -= Curl_timediff(*nowp, data->progress.t_startsingle);
-  else
-    /* since the entire operation started */
-    timeout_ms -= Curl_timediff(*nowp, data->progress.t_startop);
+  if(timeout_set & TIMEOUT_MAXTIME) {
+    maxtime_timeout_ms -= Curl_timediff(*nowp, data->progress.t_startop);
+    timeout_ms = maxtime_timeout_ms;
+  }
+
+  if(timeout_set & TIMEOUT_CONNECT) {
+    connect_timeout_ms -= Curl_timediff(*nowp, data->progress.t_startsingle);
+
+    if(!(timeout_set & TIMEOUT_MAXTIME) ||
+       (connect_timeout_ms < maxtime_timeout_ms))
+      timeout_ms = connect_timeout_ms;
+  }
+
   if(!timeout_ms)
     /* avoid returning 0 as that means no timeout! */
     return -1;
@@ -236,11 +235,10 @@
   return timeout_ms;
 }
 
-static CURLcode bindlocal(struct connectdata *conn,
+static CURLcode bindlocal(struct Curl_easy *data,
                           curl_socket_t sockfd, int af, unsigned int scope)
 {
-  struct Curl_easy *data = conn->data;
-
+  struct connectdata *conn = data->conn;
   struct Curl_sockaddr_storage sa;
   struct sockaddr *sock = (struct sockaddr *)&sa;  /* bind to this address */
   curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */
@@ -256,6 +254,9 @@
   int portnum = data->set.localportrange;
   const char *dev = data->set.str[STRING_DEVICE];
   int error;
+#ifdef IP_BIND_ADDRESS_NO_PORT
+  int on = 1;
+#endif
 
   /*************************************************************
    * Select device to bind socket to
@@ -330,7 +331,7 @@
           /*
            * We now have the numerical IP address in the 'myhost' buffer
            */
-          infof(data, "Local Interface %s is ip %s using address family %i\n",
+          infof(data, "Local Interface %s is ip %s using address family %i",
                 dev, myhost, af);
           done = 1;
           break;
@@ -345,7 +346,7 @@
        * of the connection. The resolve functions should really be changed
        * to take a type parameter instead.
        */
-      long ipver = conn->ip_version;
+      unsigned char ipver = conn->ip_version;
       int rc;
 
       if(af == AF_INET)
@@ -355,15 +356,15 @@
         conn->ip_version = CURL_IPRESOLVE_V6;
 #endif
 
-      rc = Curl_resolv(conn, dev, 0, FALSE, &h);
+      rc = Curl_resolv(data, dev, 0, FALSE, &h);
       if(rc == CURLRESOLV_PENDING)
-        (void)Curl_resolver_wait_resolv(conn, &h);
+        (void)Curl_resolver_wait_resolv(data, &h);
       conn->ip_version = ipver;
 
       if(h) {
         /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
         Curl_printable_address(h->addr, myhost, sizeof(myhost));
-        infof(data, "Name '%s' family %i resolved to '%s' family %i\n",
+        infof(data, "Name '%s' family %i resolved to '%s' family %i",
               dev, af, myhost, h->addr->ai_family);
         Curl_resolv_unlock(data, h);
         if(af != h->addr->ai_family) {
@@ -441,7 +442,9 @@
       sizeof_sa = sizeof(struct sockaddr_in);
     }
   }
-
+#ifdef IP_BIND_ADDRESS_NO_PORT
+  (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
+#endif
   for(;;) {
     if(bind(sockfd, sock, sizeof_sa) >= 0) {
       /* we succeeded to bind */
@@ -455,13 +458,13 @@
               error, Curl_strerror(error, buffer, sizeof(buffer)));
         return CURLE_INTERFACE_FAILED;
       }
-      infof(data, "Local port: %hu\n", port);
+      infof(data, "Local port: %hu", port);
       conn->bits.bound = TRUE;
       return CURLE_OK;
     }
 
     if(--portnum > 0) {
-      infof(data, "Bind to local port %hu failed, trying next\n", port);
+      infof(data, "Bind to local port %hu failed, trying next", port);
       port++; /* try next port */
       /* We re-use/clobber the port variable here below */
       if(sock->sa_family == AF_INET)
@@ -568,7 +571,8 @@
 
 /* Used within the multi interface. Try next IP address, returns error if no
    more address exists or error */
-static CURLcode trynextip(struct connectdata *conn,
+static CURLcode trynextip(struct Curl_easy *data,
+                          struct connectdata *conn,
                           int sockindex,
                           int tempindex)
 {
@@ -586,7 +590,7 @@
 
     while(ai) {
       if(ai) {
-        result = singleipconnect(conn, ai, tempindex);
+        result = singleipconnect(data, conn, ai, tempindex);
         if(result == CURLE_COULDNT_CONNECT) {
           ai = ainext(conn, tempindex, TRUE);
           continue;
@@ -597,27 +601,31 @@
   }
 
   if(fd_to_close != CURL_SOCKET_BAD)
-    Curl_closesocket(conn, fd_to_close);
+    Curl_closesocket(data, conn, fd_to_close);
 
   return result;
 }
 
-/* Copies connection info into the session handle to make it available
-   when the session handle is no longer associated with a connection. */
-void Curl_persistconninfo(struct connectdata *conn)
+/* Copies connection info into the transfer handle to make it available when
+   the transfer handle is no longer associated with the connection. */
+void Curl_persistconninfo(struct Curl_easy *data, struct connectdata *conn,
+                          char *local_ip, int local_port)
 {
-  memcpy(conn->data->info.conn_primary_ip, conn->primary_ip, MAX_IPADR_LEN);
-  memcpy(conn->data->info.conn_local_ip, conn->local_ip, MAX_IPADR_LEN);
-  conn->data->info.conn_scheme = conn->handler->scheme;
-  conn->data->info.conn_protocol = conn->handler->protocol;
-  conn->data->info.conn_primary_port = conn->primary_port;
-  conn->data->info.conn_local_port = conn->local_port;
+  memcpy(data->info.conn_primary_ip, conn->primary_ip, MAX_IPADR_LEN);
+  if(local_ip && local_ip[0])
+    memcpy(data->info.conn_local_ip, local_ip, MAX_IPADR_LEN);
+  else
+    data->info.conn_local_ip[0] = 0;
+  data->info.conn_scheme = conn->handler->scheme;
+  data->info.conn_protocol = conn->handler->protocol;
+  data->info.conn_primary_port = conn->port;
+  data->info.conn_local_port = local_port;
 }
 
 /* retrieves ip address and port from a sockaddr structure.
    note it calls Curl_inet_ntop which sets errno on fail, not SOCKERRNO. */
 bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
-                      char *addr, long *port)
+                      char *addr, int *port)
 {
   struct sockaddr_in *si = NULL;
 #ifdef ENABLE_IPV6
@@ -652,7 +660,7 @@
 #endif
 #if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
     case AF_UNIX:
-      if(salen > (curl_socklen_t)sizeof(sa_family_t)) {
+      if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
         su = (struct sockaddr_un*)sa;
         msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
       }
@@ -673,61 +681,86 @@
 
 /* retrieves the start/end point information of a socket of an established
    connection */
-void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd)
+void Curl_conninfo_remote(struct Curl_easy *data,
+                          struct connectdata *conn, curl_socket_t sockfd)
 {
+#ifdef HAVE_GETPEERNAME
+  char buffer[STRERROR_LEN];
+  struct Curl_sockaddr_storage ssrem;
+  curl_socklen_t plen;
+  int port;
+  plen = sizeof(struct Curl_sockaddr_storage);
+  memset(&ssrem, 0, sizeof(ssrem));
+  if(getpeername(sockfd, (struct sockaddr*) &ssrem, &plen)) {
+    int error = SOCKERRNO;
+    failf(data, "getpeername() failed with errno %d: %s",
+          error, Curl_strerror(error, buffer, sizeof(buffer)));
+    return;
+  }
+  if(!Curl_addr2string((struct sockaddr*)&ssrem, plen,
+                       conn->primary_ip, &port)) {
+    failf(data, "ssrem inet_ntop() failed with errno %d: %s",
+          errno, Curl_strerror(errno, buffer, sizeof(buffer)));
+    return;
+  }
+#else
+  (void)data;
+  (void)conn;
+  (void)sockfd;
+#endif
+}
+
+/* retrieves the start/end point information of a socket of an established
+   connection */
+void Curl_conninfo_local(struct Curl_easy *data, curl_socket_t sockfd,
+                         char *local_ip, int *local_port)
+{
+#ifdef HAVE_GETSOCKNAME
+  char buffer[STRERROR_LEN];
+  struct Curl_sockaddr_storage ssloc;
+  curl_socklen_t slen;
+  slen = sizeof(struct Curl_sockaddr_storage);
+  memset(&ssloc, 0, sizeof(ssloc));
+  if(getsockname(sockfd, (struct sockaddr*) &ssloc, &slen)) {
+    int error = SOCKERRNO;
+    failf(data, "getsockname() failed with errno %d: %s",
+          error, Curl_strerror(error, buffer, sizeof(buffer)));
+    return;
+  }
+  if(!Curl_addr2string((struct sockaddr*)&ssloc, slen,
+                       local_ip, local_port)) {
+    failf(data, "ssloc inet_ntop() failed with errno %d: %s",
+          errno, Curl_strerror(errno, buffer, sizeof(buffer)));
+    return;
+  }
+#else
+  (void)data;
+  (void)sockfd;
+  (void)local_ip;
+  (void)local_port;
+#endif
+}
+
+/* retrieves the start/end point information of a socket of an established
+   connection */
+void Curl_updateconninfo(struct Curl_easy *data, struct connectdata *conn,
+                         curl_socket_t sockfd)
+{
+  /* 'local_ip' and 'local_port' get filled with local's numerical
+     ip address and port number whenever an outgoing connection is
+     **established** from the primary socket to a remote address. */
+  char local_ip[MAX_IPADR_LEN] = "";
+  int local_port = -1;
+
   if(conn->transport == TRNSPRT_TCP) {
-#if defined(HAVE_GETPEERNAME) || defined(HAVE_GETSOCKNAME)
     if(!conn->bits.reuse && !conn->bits.tcp_fastopen) {
-      struct Curl_easy *data = conn->data;
-      char buffer[STRERROR_LEN];
-      struct Curl_sockaddr_storage ssrem;
-      struct Curl_sockaddr_storage ssloc;
-      curl_socklen_t plen;
-      curl_socklen_t slen;
-#ifdef HAVE_GETPEERNAME
-      plen = sizeof(struct Curl_sockaddr_storage);
-      if(getpeername(sockfd, (struct sockaddr*) &ssrem, &plen)) {
-        int error = SOCKERRNO;
-        failf(data, "getpeername() failed with errno %d: %s",
-              error, Curl_strerror(error, buffer, sizeof(buffer)));
-        return;
-      }
-#endif
-#ifdef HAVE_GETSOCKNAME
-      slen = sizeof(struct Curl_sockaddr_storage);
-      memset(&ssloc, 0, sizeof(ssloc));
-      if(getsockname(sockfd, (struct sockaddr*) &ssloc, &slen)) {
-        int error = SOCKERRNO;
-        failf(data, "getsockname() failed with errno %d: %s",
-              error, Curl_strerror(error, buffer, sizeof(buffer)));
-        return;
-      }
-#endif
-#ifdef HAVE_GETPEERNAME
-      if(!Curl_addr2string((struct sockaddr*)&ssrem, plen,
-                           conn->primary_ip, &conn->primary_port)) {
-        failf(data, "ssrem inet_ntop() failed with errno %d: %s",
-              errno, Curl_strerror(errno, buffer, sizeof(buffer)));
-        return;
-      }
-      memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
-#endif
-#ifdef HAVE_GETSOCKNAME
-      if(!Curl_addr2string((struct sockaddr*)&ssloc, slen,
-                           conn->local_ip, &conn->local_port)) {
-        failf(data, "ssloc inet_ntop() failed with errno %d: %s",
-              errno, Curl_strerror(errno, buffer, sizeof(buffer)));
-        return;
-      }
-#endif
+      Curl_conninfo_remote(data, conn, sockfd);
+      Curl_conninfo_local(data, sockfd, local_ip, &local_port);
     }
-#else /* !HAVE_GETSOCKNAME && !HAVE_GETPEERNAME */
-    (void)sockfd; /* unused */
-#endif
   } /* end of TCP-only section */
 
   /* persist connection info in session handle */
-  Curl_persistconninfo(conn);
+  Curl_persistconninfo(data, conn, local_ip, local_port);
 }
 
 /* After a TCP connection to the proxy has been verified, this function does
@@ -737,12 +770,13 @@
    Note: this function's sub-functions call failf()
 
 */
-static CURLcode connect_SOCKS(struct connectdata *conn, int sockindex,
+static CURLcode connect_SOCKS(struct Curl_easy *data, int sockindex,
                               bool *done)
 {
   CURLcode result = CURLE_OK;
 #ifndef CURL_DISABLE_PROXY
   CURLproxycode pxresult = CURLPX_OK;
+  struct connectdata *conn = data->conn;
   if(conn->bits.socksproxy) {
     /* for the secondary socket (FTP), use the "connect to host"
      * but ignore the "connect to port" (use the secondary port)
@@ -763,27 +797,27 @@
     case CURLPROXY_SOCKS5:
     case CURLPROXY_SOCKS5_HOSTNAME:
       pxresult = Curl_SOCKS5(conn->socks_proxy.user, conn->socks_proxy.passwd,
-                             host, port, sockindex, conn, done);
+                             host, port, sockindex, data, done);
       break;
 
     case CURLPROXY_SOCKS4:
     case CURLPROXY_SOCKS4A:
       pxresult = Curl_SOCKS4(conn->socks_proxy.user, host, port, sockindex,
-                             conn, done);
+                             data, done);
       break;
 
     default:
-      failf(conn->data, "unknown proxytype option given");
+      failf(data, "unknown proxytype option given");
       result = CURLE_COULDNT_CONNECT;
     } /* switch proxytype */
     if(pxresult) {
       result = CURLE_PROXY;
-      conn->data->info.pxcode = pxresult;
+      data->info.pxcode = pxresult;
     }
   }
   else
 #else
-    (void)conn;
+    (void)data;
     (void)sockindex;
 #endif /* CURL_DISABLE_PROXY */
     *done = TRUE; /* no SOCKS proxy, so consider us connected */
@@ -795,7 +829,8 @@
  * post_SOCKS() is called after a successful connect to the peer, which
  * *could* be a SOCKS proxy
  */
-static void post_SOCKS(struct connectdata *conn,
+static void post_SOCKS(struct Curl_easy *data,
+                       struct connectdata *conn,
                        int sockindex,
                        bool *connected)
 {
@@ -803,21 +838,21 @@
 
   *connected = TRUE;
   if(sockindex == FIRSTSOCKET)
-    Curl_pgrsTime(conn->data, TIMER_CONNECT); /* connect done */
-  Curl_updateconninfo(conn, conn->sock[sockindex]);
-  Curl_verboseconnect(conn);
-  conn->data->info.numconnects++; /* to track the number of connections made */
+    Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
+  Curl_updateconninfo(data, conn, conn->sock[sockindex]);
+  Curl_verboseconnect(data, conn);
+  data->info.numconnects++; /* to track the number of connections made */
 }
 
 /*
  * Curl_is_connected() checks if the socket has connected.
  */
 
-CURLcode Curl_is_connected(struct connectdata *conn,
+CURLcode Curl_is_connected(struct Curl_easy *data,
+                           struct connectdata *conn,
                            int sockindex,
                            bool *connected)
 {
-  struct Curl_easy *data = conn->data;
   CURLcode result = CURLE_OK;
   timediff_t allow;
   int error = 0;
@@ -837,20 +872,11 @@
 
   now = Curl_now();
 
-  /* figure out how long time we have left to connect */
-  allow = Curl_timeleft(data, &now, TRUE);
-
-  if(allow < 0) {
-    /* time-out, bail out, go home */
-    failf(data, "Connection time-out");
-    return CURLE_OPERATION_TIMEDOUT;
-  }
-
   if(SOCKS_STATE(conn->cnnct.state)) {
     /* still doing SOCKS */
-    result = connect_SOCKS(conn, sockindex, connected);
+    result = connect_SOCKS(data, sockindex, connected);
     if(!result && *connected)
-      post_SOCKS(conn, sockindex, connected);
+      post_SOCKS(data, conn, sockindex, connected);
     return result;
   }
 
@@ -861,18 +887,20 @@
     error = 0;
 #ifdef ENABLE_QUIC
     if(conn->transport == TRNSPRT_QUIC) {
-      result = Curl_quic_is_connected(conn, i, connected);
+      result = Curl_quic_is_connected(data, conn, i, connected);
       if(!result && *connected) {
         /* use this socket from now on */
         conn->sock[sockindex] = conn->tempsock[i];
         conn->ip_addr = conn->tempaddr[i];
         conn->tempsock[i] = CURL_SOCKET_BAD;
-        post_SOCKS(conn, sockindex, connected);
+        post_SOCKS(data, conn, sockindex, connected);
         connkeep(conn, "HTTP/3 default");
         return CURLE_OK;
       }
-      if(result)
+      if(result) {
+        conn->tempsock[i] = CURL_SOCKET_BAD;
         error = SOCKERRNO;
+      }
     }
     else
 #endif
@@ -893,7 +921,7 @@
       if(Curl_timediff(now, conn->connecttime) >=
          conn->timeoutms_per_addr[i]) {
         infof(data, "After %" CURL_FORMAT_TIMEDIFF_T
-              "ms connect time, move on!\n", conn->timeoutms_per_addr[i]);
+              "ms connect time, move on!", conn->timeoutms_per_addr[i]);
         error = ETIMEDOUT;
       }
 
@@ -902,7 +930,7 @@
          (Curl_timediff(now, conn->connecttime) >=
           data->set.happy_eyeballs_timeout)) {
         conn->bits.parallel_connect = TRUE; /* starting now */
-        trynextip(conn, sockindex, 1);
+        trynextip(data, conn, sockindex, 1);
       }
     }
     else if(rc == CURL_CSELECT_OUT || conn->bits.tcp_fastopen) {
@@ -919,17 +947,17 @@
 
         /* close the other socket, if open */
         if(conn->tempsock[other] != CURL_SOCKET_BAD) {
-          Curl_closesocket(conn, conn->tempsock[other]);
+          Curl_closesocket(data, conn, conn->tempsock[other]);
           conn->tempsock[other] = CURL_SOCKET_BAD;
         }
 
         /* see if we need to kick off any SOCKS proxy magic once we
            connected */
-        result = connect_SOCKS(conn, sockindex, connected);
+        result = connect_SOCKS(data, sockindex, connected);
         if(result || !*connected)
           return result;
 
-        post_SOCKS(conn, sockindex, connected);
+        post_SOCKS(data, conn, sockindex, connected);
 
         return CURLE_OK;
       }
@@ -952,15 +980,16 @@
         char buffer[STRERROR_LEN];
         Curl_printable_address(conn->tempaddr[i], ipaddress,
                                sizeof(ipaddress));
-        infof(data, "connect to %s port %ld failed: %s\n",
+        infof(data, "connect to %s port %u failed: %s",
               ipaddress, conn->port,
               Curl_strerror(error, buffer, sizeof(buffer)));
 #endif
 
+        allow = Curl_timeleft(data, &now, TRUE);
         conn->timeoutms_per_addr[i] = conn->tempaddr[i]->ai_next == NULL ?
           allow : allow / 2;
         ainext(conn, i, TRUE);
-        status = trynextip(conn, sockindex, i);
+        status = trynextip(data, conn, sockindex, i);
         if((status != CURLE_COULDNT_CONNECT) ||
            conn->tempsock[other] == CURL_SOCKET_BAD)
           /* the last attempt failed and no other sockets remain open */
@@ -969,6 +998,21 @@
     }
   }
 
+  /*
+   * Now that we've checked whether we are connected, check whether we've
+   * already timed out.
+   *
+   * First figure out how long time we have left to connect */
+
+  allow = Curl_timeleft(data, &now, TRUE);
+
+  if(allow < 0) {
+    /* time-out, bail out, go home */
+    failf(data, "Connection timeout after %ld ms",
+          Curl_timediff(now, data->progress.t_startsingle));
+    return CURLE_OPERATION_TIMEDOUT;
+  }
+
   if(result &&
      (conn->tempsock[0] == CURL_SOCKET_BAD) &&
      (conn->tempsock[1] == CURL_SOCKET_BAD)) {
@@ -978,7 +1022,7 @@
 
     /* if the first address family runs out of addresses to try before the
        happy eyeball timeout, go ahead and try the next family now */
-    result = trynextip(conn, sockindex, 1);
+    result = trynextip(data, conn, sockindex, 1);
     if(!result)
       return result;
 
@@ -994,12 +1038,14 @@
     else
       hostname = conn->host.name;
 
-    failf(data, "Failed to connect to %s port %ld: %s",
-          hostname, conn->port,
-          Curl_strerror(error, buffer, sizeof(buffer)));
+    failf(data, "Failed to connect to %s port %u after "
+                "%" CURL_FORMAT_TIMEDIFF_T " ms: %s",
+        hostname, conn->port,
+        Curl_timediff(now, data->progress.t_startsingle),
+        Curl_strerror(error, buffer, sizeof(buffer)));
 
-    Curl_quic_disconnect(conn, 0);
-    Curl_quic_disconnect(conn, 1);
+    Curl_quic_disconnect(data, conn, 0);
+    Curl_quic_disconnect(data, conn, 1);
 
 #ifdef WSAETIMEDOUT
     if(WSAETIMEDOUT == data->state.os_errno)
@@ -1015,24 +1061,23 @@
   return result;
 }
 
-static void tcpnodelay(struct connectdata *conn, curl_socket_t sockfd)
+static void tcpnodelay(struct Curl_easy *data, curl_socket_t sockfd)
 {
 #if defined(TCP_NODELAY)
   curl_socklen_t onoff = (curl_socklen_t) 1;
   int level = IPPROTO_TCP;
 #if !defined(CURL_DISABLE_VERBOSE_STRINGS)
-  struct Curl_easy *data = conn->data;
   char buffer[STRERROR_LEN];
 #else
-  (void) conn;
+  (void) data;
 #endif
 
   if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff,
                 sizeof(onoff)) < 0)
-    infof(data, "Could not set TCP_NODELAY: %s\n",
+    infof(data, "Could not set TCP_NODELAY: %s",
           Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
 #else
-  (void)conn;
+  (void)data;
   (void)sockfd;
 #endif
 }
@@ -1042,16 +1087,17 @@
    sending data to a dead peer (instead of relying on the 4th argument to send
    being MSG_NOSIGNAL). Possibly also existing and in use on other BSD
    systems? */
-static void nosigpipe(struct connectdata *conn,
+static void nosigpipe(struct Curl_easy *data,
                       curl_socket_t sockfd)
 {
-  struct Curl_easy *data = conn->data;
   int onoff = 1;
   if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff,
                 sizeof(onoff)) < 0) {
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
     char buffer[STRERROR_LEN];
-    infof(data, "Could not set SO_NOSIGPIPE: %s\n",
+    infof(data, "Could not set SO_NOSIGPIPE: %s",
           Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
+#endif
   }
 }
 #else
@@ -1111,7 +1157,8 @@
  * singleipconnect() connects to the given IP only, and it may return without
  * having connected.
  */
-static CURLcode singleipconnect(struct connectdata *conn,
+static CURLcode singleipconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 const struct Curl_addrinfo *ai,
                                 int tempindex)
 {
@@ -1119,11 +1166,10 @@
   int rc = -1;
   int error = 0;
   bool isconnected = FALSE;
-  struct Curl_easy *data = conn->data;
   curl_socket_t sockfd;
   CURLcode result;
   char ipaddress[MAX_IPADR_LEN];
-  long port;
+  int port;
   bool is_tcp;
 #ifdef TCP_FASTOPEN_CONNECT
   int optval = 1;
@@ -1132,7 +1178,7 @@
   curl_socket_t *sockp = &conn->tempsock[tempindex];
   *sockp = CURL_SOCKET_BAD;
 
-  result = Curl_socket(conn, ai, &addr, &sockfd);
+  result = Curl_socket(data, ai, &addr, &sockfd);
   if(result)
     return result;
 
@@ -1142,10 +1188,10 @@
     /* malformed address or bug in inet_ntop, try next address */
     failf(data, "sa_addr inet_ntop() failed with errno %d: %s",
           errno, Curl_strerror(errno, buffer, sizeof(buffer)));
-    Curl_closesocket(conn, sockfd);
+    Curl_closesocket(data, conn, sockfd);
     return CURLE_OK;
   }
-  infof(data, "  Trying %s:%ld...\n", ipaddress, port);
+  infof(data, "  Trying %s:%d...", ipaddress, port);
 
 #ifdef ENABLE_IPV6
   is_tcp = (addr.family == AF_INET || addr.family == AF_INET6) &&
@@ -1154,9 +1200,9 @@
   is_tcp = (addr.family == AF_INET) && addr.socktype == SOCK_STREAM;
 #endif
   if(is_tcp && data->set.tcp_nodelay)
-    tcpnodelay(conn, sockfd);
+    tcpnodelay(data, sockfd);
 
-  nosigpipe(conn, sockfd);
+  nosigpipe(data, sockfd);
 
   Curl_sndbufset(sockfd);
 
@@ -1174,7 +1220,7 @@
     if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
       isconnected = TRUE;
     else if(error) {
-      Curl_closesocket(conn, sockfd); /* close the socket and bail out */
+      Curl_closesocket(data, conn, sockfd); /* close the socket and bail out */
       return CURLE_ABORTED_BY_CALLBACK;
     }
   }
@@ -1185,10 +1231,10 @@
      || addr.family == AF_INET6
 #endif
     ) {
-    result = bindlocal(conn, sockfd, addr.family,
+    result = bindlocal(data, sockfd, addr.family,
                        Curl_ipv6_scope((struct sockaddr*)&addr.sa_addr));
     if(result) {
-      Curl_closesocket(conn, sockfd); /* close socket and bail out */
+      Curl_closesocket(data, conn, sockfd); /* close socket and bail out */
       if(result == CURLE_UNSUPPORTED_PROTOCOL) {
         /* The address family is not supported on this interface.
            We can continue trying addresses */
@@ -1236,7 +1282,7 @@
 #elif defined(TCP_FASTOPEN_CONNECT) /* Linux >= 4.11 */
       if(setsockopt(sockfd, IPPROTO_TCP, TCP_FASTOPEN_CONNECT,
                     (void *)&optval, sizeof(optval)) < 0)
-        infof(data, "Failed to enable TCP Fast Open on fd %d\n", sockfd);
+        infof(data, "Failed to enable TCP Fast Open on fd %d", sockfd);
 
       rc = connect(sockfd, &addr.sa_addr, addr.addrlen);
 #elif defined(MSG_FASTOPEN) /* old Linux */
@@ -1256,7 +1302,7 @@
     else if(conn->transport == TRNSPRT_QUIC) {
       /* pass in 'sockfd' separately since it hasn't been put into the
          tempsock array at this point */
-      result = Curl_quic_connect(conn, sockfd, tempindex,
+      result = Curl_quic_connect(data, conn, sockfd, tempindex,
                                  &addr.sa_addr, addr.addrlen);
       if(result)
         error = SOCKERRNO;
@@ -1286,12 +1332,12 @@
 
     default:
       /* unknown error, fallthrough and try another address! */
-      infof(data, "Immediate connect fail for %s: %s\n",
+      infof(data, "Immediate connect fail for %s: %s",
             ipaddress, Curl_strerror(error, buffer, sizeof(buffer)));
       data->state.os_errno = error;
 
       /* connect failed */
-      Curl_closesocket(conn, sockfd);
+      Curl_closesocket(data, conn, sockfd);
       result = CURLE_COULDNT_CONNECT;
     }
   }
@@ -1308,10 +1354,10 @@
  * pointer with the connected socket.
  */
 
-CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
+CURLcode Curl_connecthost(struct Curl_easy *data,
+                          struct connectdata *conn,  /* context */
                           const struct Curl_dns_entry *remotehost)
 {
-  struct Curl_easy *data = conn->data;
   CURLcode result = CURLE_COULDNT_CONNECT;
   int i;
   timediff_t timeout_ms = Curl_timeleft(data, NULL, TRUE);
@@ -1332,20 +1378,41 @@
   conn->timeoutms_per_addr[1] =
     conn->tempaddr[1]->ai_next == NULL ? timeout_ms : timeout_ms / 2;
 
-  conn->tempfamily[0] = conn->tempaddr[0]?
-    conn->tempaddr[0]->ai_family:0;
-  conn->tempfamily[1] = conn->tempfamily[0] == AF_INET6 ?
-    AF_INET : AF_INET6;
+  if(conn->ip_version == CURL_IPRESOLVE_WHATEVER) {
+    /* any IP version is allowed */
+    conn->tempfamily[0] = conn->tempaddr[0]?
+      conn->tempaddr[0]->ai_family:0;
+#ifdef ENABLE_IPV6
+    conn->tempfamily[1] = conn->tempfamily[0] == AF_INET6 ?
+      AF_INET : AF_INET6;
+#else
+    conn->tempfamily[1] = AF_UNSPEC;
+#endif
+  }
+  else {
+    /* only one IP version is allowed */
+    conn->tempfamily[0] = (conn->ip_version == CURL_IPRESOLVE_V4) ?
+      AF_INET :
+#ifdef ENABLE_IPV6
+      AF_INET6;
+#else
+      AF_UNSPEC;
+#endif
+    conn->tempfamily[1] = AF_UNSPEC;
+
+    ainext(conn, 0, FALSE); /* find first address of the right type */
+  }
+
   ainext(conn, 1, FALSE); /* assigns conn->tempaddr[1] accordingly */
 
-  DEBUGF(infof(data, "family0 == %s, family1 == %s\n",
+  DEBUGF(infof(data, "family0 == %s, family1 == %s",
                conn->tempfamily[0] == AF_INET ? "v4" : "v6",
                conn->tempfamily[1] == AF_INET ? "v4" : "v6"));
 
   /* get through the list in family order in case of quick failures */
   for(i = 0; (i < 2) && result; i++) {
     while(conn->tempaddr[i]) {
-      result = singleipconnect(conn, conn->tempaddr[i], i);
+      result = singleipconnect(data, conn, conn->tempaddr[i], i);
       if(!result)
         break;
       ainext(conn, i, TRUE);
@@ -1354,7 +1421,7 @@
   if(result)
     return result;
 
-  Curl_expire(conn->data, data->set.happy_eyeballs_timeout,
+  Curl_expire(data, data->set.happy_eyeballs_timeout,
               EXPIRE_HAPPY_EYEBALLS);
 
   return CURLE_OK;
@@ -1365,9 +1432,11 @@
   struct connectdata *found;
 };
 
-static int conn_is_conn(struct connectdata *conn, void *param)
+static int conn_is_conn(struct Curl_easy *data,
+                        struct connectdata *conn, void *param)
 {
   struct connfind *f = (struct connfind *)param;
+  (void)data;
   if(conn->connection_id == f->id_tofind) {
     f->found = conn;
     return 1;
@@ -1407,11 +1476,9 @@
     }
 
     c = find.found;
-    if(connp) {
+    if(connp)
       /* only store this if the caller cares for it */
       *connp = c;
-      c->data = data;
-    }
     return c->sock[FIRSTSOCKET];
   }
   return CURL_SOCKET_BAD;
@@ -1449,8 +1516,8 @@
  *
  * 'conn' can be NULL, beware!
  */
-int Curl_closesocket(struct connectdata *conn,
-                      curl_socket_t sock)
+int Curl_closesocket(struct Curl_easy *data, struct connectdata *conn,
+                     curl_socket_t sock)
 {
   if(conn && conn->fclosesocket) {
     if((sock == conn->sock[SECONDARYSOCKET]) && conn->bits.sock_accepted)
@@ -1460,17 +1527,17 @@
       conn->bits.sock_accepted = FALSE;
     else {
       int rc;
-      Curl_multi_closed(conn->data, sock);
-      Curl_set_in_callback(conn->data, true);
+      Curl_multi_closed(data, sock);
+      Curl_set_in_callback(data, true);
       rc = conn->fclosesocket(conn->closesocket_client, sock);
-      Curl_set_in_callback(conn->data, false);
+      Curl_set_in_callback(data, false);
       return rc;
     }
   }
 
   if(conn)
     /* tell the multi-socket code about this */
-    Curl_multi_closed(conn->data, sock);
+    Curl_multi_closed(data, sock);
 
   sclose(sock);
 
@@ -1486,12 +1553,12 @@
  * If the open socket callback is set, used that!
  *
  */
-CURLcode Curl_socket(struct connectdata *conn,
+CURLcode Curl_socket(struct Curl_easy *data,
                      const struct Curl_addrinfo *ai,
                      struct Curl_sockaddr_ex *addr,
                      curl_socket_t *sockfd)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct Curl_sockaddr_ex dummy;
 
   if(!addr)
@@ -1552,8 +1619,21 @@
   }
 #endif
 
-  return CURLE_OK;
+#if defined(__linux__) && defined(IP_RECVERR)
+  if(addr->socktype == SOCK_DGRAM) {
+    int one = 1;
+    switch(addr->family) {
+    case AF_INET:
+      (void)setsockopt(*sockfd, SOL_IP, IP_RECVERR, &one, sizeof(one));
+      break;
+    case AF_INET6:
+      (void)setsockopt(*sockfd, SOL_IPV6, IPV6_RECVERR, &one, sizeof(one));
+      break;
+    }
+  }
+#endif
 
+  return CURLE_OK;
 }
 
 /*
@@ -1566,16 +1646,20 @@
 #endif
   )
 {
-  /* close if a connection, or a stream that isn't multiplexed */
-  bool closeit = (ctrl == CONNCTRL_CONNECTION) ||
-    ((ctrl == CONNCTRL_STREAM) && !(conn->handler->flags & PROTOPT_STREAM));
+  /* close if a connection, or a stream that isn't multiplexed. */
+  /* This function will be called both before and after this connection is
+     associated with a transfer. */
+  bool closeit;
   DEBUGASSERT(conn);
+#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+  (void)reason; /* useful for debugging */
+#endif
+  closeit = (ctrl == CONNCTRL_CONNECTION) ||
+    ((ctrl == CONNCTRL_STREAM) && !(conn->handler->flags & PROTOPT_STREAM));
   if((ctrl == CONNCTRL_STREAM) &&
      (conn->handler->flags & PROTOPT_STREAM))
-    DEBUGF(infof(conn->data, "Kill stream: %s\n", reason));
+    ;
   else if((bit)closeit != conn->bits.close) {
-    DEBUGF(infof(conn->data, "Marked for [%s]: %s\n",
-                 closeit?"closure":"keep alive", reason));
     conn->bits.close = closeit; /* the only place in the source code that
                                    should assign this bit */
   }
diff --git a/lib/connect.h b/lib/connect.h
index 6fd9ea8..1a055f5 100644
--- a/lib/connect.h
+++ b/lib/connect.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,11 +27,13 @@
 #include "sockaddr.h"
 #include "timeval.h"
 
-CURLcode Curl_is_connected(struct connectdata *conn,
+CURLcode Curl_is_connected(struct Curl_easy *data,
+                           struct connectdata *conn,
                            int sockindex,
                            bool *connected);
 
-CURLcode Curl_connecthost(struct connectdata *conn,
+CURLcode Curl_connecthost(struct Curl_easy *data,
+                          struct connectdata *conn,
                           const struct Curl_dns_entry *host);
 
 /* generic function that returns how much time there's left to run, according
@@ -52,7 +54,7 @@
                                   struct connectdata **connp);
 
 bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
-                      char *addr, long *port);
+                      char *addr, int *port);
 
 /*
  * Check if a connection seems to be alive.
@@ -74,9 +76,16 @@
 #define Curl_sndbufset(y) Curl_nop_stmt
 #endif
 
-void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd);
-void Curl_persistconninfo(struct connectdata *conn);
-int Curl_closesocket(struct connectdata *conn, curl_socket_t sock);
+void Curl_updateconninfo(struct Curl_easy *data, struct connectdata *conn,
+                         curl_socket_t sockfd);
+void Curl_conninfo_remote(struct Curl_easy *data, struct connectdata *conn,
+                          curl_socket_t sockfd);
+void Curl_conninfo_local(struct Curl_easy *data, curl_socket_t sockfd,
+                         char *local_ip, int *local_port);
+void Curl_persistconninfo(struct Curl_easy *data, struct connectdata *conn,
+                          char *local_ip, int local_port);
+int Curl_closesocket(struct Curl_easy *data, struct connectdata *conn,
+                     curl_socket_t sock);
 
 /*
  * The Curl_sockaddr_ex structure is basically libcurl's external API
@@ -104,7 +113,7 @@
  * socket callback is set, used that!
  *
  */
-CURLcode Curl_socket(struct connectdata *conn,
+CURLcode Curl_socket(struct Curl_easy *data,
                      const struct Curl_addrinfo *ai,
                      struct Curl_sockaddr_ex *addr,
                      curl_socket_t *sockfd);
diff --git a/lib/content_encoding.c b/lib/content_encoding.c
index a6dce48..a84ff54 100644
--- a/lib/content_encoding.c
+++ b/lib/content_encoding.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -104,9 +104,8 @@
 }
 
 static CURLcode
-process_zlib_error(struct connectdata *conn, z_stream *z)
+process_zlib_error(struct Curl_easy *data, z_stream *z)
 {
-  struct Curl_easy *data = conn->data;
   if(z->msg)
     failf(data, "Error while processing content unencoding: %s",
           z->msg);
@@ -118,7 +117,7 @@
 }
 
 static CURLcode
-exit_zlib(struct connectdata *conn,
+exit_zlib(struct Curl_easy *data,
           z_stream *z, zlibInitState *zlib_init, CURLcode result)
 {
   if(*zlib_init == ZLIB_GZIP_HEADER)
@@ -126,14 +125,14 @@
 
   if(*zlib_init != ZLIB_UNINIT) {
     if(inflateEnd(z) != Z_OK && result == CURLE_OK)
-      result = process_zlib_error(conn, z);
+      result = process_zlib_error(data, z);
     *zlib_init = ZLIB_UNINIT;
   }
 
   return result;
 }
 
-static CURLcode process_trailer(struct connectdata *conn,
+static CURLcode process_trailer(struct Curl_easy *data,
                                 struct zlib_params *zp)
 {
   z_stream *z = &zp->z;
@@ -149,7 +148,7 @@
   if(z->avail_in)
     result = CURLE_WRITE_ERROR;
   if(result || !zp->trailerlen)
-    result = exit_zlib(conn, z, &zp->zlib_init, result);
+    result = exit_zlib(data, z, &zp->zlib_init, result);
   else {
     /* Only occurs for gzip with zlib < 1.2.0.4 or raw deflate. */
     zp->zlib_init = ZLIB_EXTERNAL_TRAILER;
@@ -157,7 +156,7 @@
   return result;
 }
 
-static CURLcode inflate_stream(struct connectdata *conn,
+static CURLcode inflate_stream(struct Curl_easy *data,
                                struct contenc_writer *writer,
                                zlibInitState started)
 {
@@ -174,13 +173,13 @@
      zp->zlib_init != ZLIB_INFLATING &&
      zp->zlib_init != ZLIB_INIT_GZIP &&
      zp->zlib_init != ZLIB_GZIP_INFLATING)
-    return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR);
+    return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR);
 
   /* Dynamically allocate a buffer for decompression because it's uncommonly
      large to hold on the stack */
   decomp = malloc(DSIZ);
-  if(decomp == NULL)
-    return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
+  if(!decomp)
+    return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
 
   /* because the buffer size is fixed, iteratively decompress and transfer to
      the client via downstream_write function. */
@@ -204,10 +203,10 @@
     if(z->avail_out != DSIZ) {
       if(status == Z_OK || status == Z_STREAM_END) {
         zp->zlib_init = started;      /* Data started. */
-        result = Curl_unencode_write(conn, writer->downstream, decomp,
+        result = Curl_unencode_write(data, writer->downstream, decomp,
                                      DSIZ - z->avail_out);
         if(result) {
-          exit_zlib(conn, z, &zp->zlib_init, result);
+          exit_zlib(data, z, &zp->zlib_init, result);
           break;
         }
       }
@@ -223,7 +222,7 @@
       /* No more data to flush: just exit loop. */
       break;
     case Z_STREAM_END:
-      result = process_trailer(conn, zp);
+      result = process_trailer(data, zp);
       break;
     case Z_DATA_ERROR:
       /* some servers seem to not generate zlib headers, so this is an attempt
@@ -243,7 +242,7 @@
       }
       /* FALLTHROUGH */
     default:
-      result = exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z));
+      result = exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z));
       break;
     }
   }
@@ -260,7 +259,7 @@
 
 
 /* Deflate handler. */
-static CURLcode deflate_init_writer(struct connectdata *conn,
+static CURLcode deflate_init_writer(struct Curl_easy *data,
                                     struct contenc_writer *writer)
 {
   struct zlib_params *zp = (struct zlib_params *) &writer->params;
@@ -274,12 +273,12 @@
   z->zfree = (free_func) zfree_cb;
 
   if(inflateInit(z) != Z_OK)
-    return process_zlib_error(conn, z);
+    return process_zlib_error(data, z);
   zp->zlib_init = ZLIB_INIT;
   return CURLE_OK;
 }
 
-static CURLcode deflate_unencode_write(struct connectdata *conn,
+static CURLcode deflate_unencode_write(struct Curl_easy *data,
                                        struct contenc_writer *writer,
                                        const char *buf, size_t nbytes)
 {
@@ -291,19 +290,19 @@
   z->avail_in = (uInt) nbytes;
 
   if(zp->zlib_init == ZLIB_EXTERNAL_TRAILER)
-    return process_trailer(conn, zp);
+    return process_trailer(data, zp);
 
   /* Now uncompress the data */
-  return inflate_stream(conn, writer, ZLIB_INFLATING);
+  return inflate_stream(data, writer, ZLIB_INFLATING);
 }
 
-static void deflate_close_writer(struct connectdata *conn,
+static void deflate_close_writer(struct Curl_easy *data,
                                  struct contenc_writer *writer)
 {
   struct zlib_params *zp = (struct zlib_params *) &writer->params;
   z_stream *z = &zp->z;     /* zlib state structure */
 
-  exit_zlib(conn, z, &zp->zlib_init, CURLE_OK);
+  exit_zlib(data, z, &zp->zlib_init, CURLE_OK);
 }
 
 static const struct content_encoding deflate_encoding = {
@@ -317,7 +316,7 @@
 
 
 /* Gzip handler. */
-static CURLcode gzip_init_writer(struct connectdata *conn,
+static CURLcode gzip_init_writer(struct Curl_easy *data,
                                  struct contenc_writer *writer)
 {
   struct zlib_params *zp = (struct zlib_params *) &writer->params;
@@ -333,14 +332,14 @@
   if(strcmp(zlibVersion(), "1.2.0.4") >= 0) {
     /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */
     if(inflateInit2(z, MAX_WBITS + 32) != Z_OK) {
-      return process_zlib_error(conn, z);
+      return process_zlib_error(data, z);
     }
     zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */
   }
   else {
     /* we must parse the gzip header and trailer ourselves */
     if(inflateInit2(z, -MAX_WBITS) != Z_OK) {
-      return process_zlib_error(conn, z);
+      return process_zlib_error(data, z);
     }
     zp->trailerlen = 8; /* A CRC-32 and a 32-bit input size (RFC 1952, 2.2) */
     zp->zlib_init = ZLIB_INIT; /* Initial call state */
@@ -433,7 +432,7 @@
 }
 #endif
 
-static CURLcode gzip_unencode_write(struct connectdata *conn,
+static CURLcode gzip_unencode_write(struct Curl_easy *data,
                                     struct contenc_writer *writer,
                                     const char *buf, size_t nbytes)
 {
@@ -445,13 +444,13 @@
     z->next_in = (Bytef *) buf;
     z->avail_in = (uInt) nbytes;
     /* Now uncompress the data */
-    return inflate_stream(conn, writer, ZLIB_INIT_GZIP);
+    return inflate_stream(data, writer, ZLIB_INIT_GZIP);
   }
 
 #ifndef OLD_ZLIB_SUPPORT
   /* Support for old zlib versions is compiled away and we are running with
      an old version, so return an error. */
-  return exit_zlib(conn, z, &zp->zlib_init, CURLE_WRITE_ERROR);
+  return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR);
 
 #else
   /* This next mess is to get around the potential case where there isn't
@@ -488,8 +487,8 @@
        */
       z->avail_in = (uInt) nbytes;
       z->next_in = malloc(z->avail_in);
-      if(z->next_in == NULL) {
-        return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
+      if(!z->next_in) {
+        return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
       }
       memcpy(z->next_in, buf, z->avail_in);
       zp->zlib_init = ZLIB_GZIP_HEADER;  /* Need more gzip header data state */
@@ -498,7 +497,7 @@
 
     case GZIP_BAD:
     default:
-      return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z));
+      return exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z));
     }
 
   }
@@ -510,8 +509,8 @@
     ssize_t hlen;
     z->avail_in += (uInt) nbytes;
     z->next_in = Curl_saferealloc(z->next_in, z->avail_in);
-    if(z->next_in == NULL) {
-      return exit_zlib(conn, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
+    if(!z->next_in) {
+      return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY);
     }
     /* Append the new block of data to the previous one */
     memcpy(z->next_in + z->avail_in - nbytes, buf, nbytes);
@@ -532,7 +531,7 @@
 
     case GZIP_BAD:
     default:
-      return exit_zlib(conn, z, &zp->zlib_init, process_zlib_error(conn, z));
+      return exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z));
     }
 
   }
@@ -541,7 +540,7 @@
   case ZLIB_EXTERNAL_TRAILER:
     z->next_in = (Bytef *) buf;
     z->avail_in = (uInt) nbytes;
-    return process_trailer(conn, zp);
+    return process_trailer(data, zp);
 
   case ZLIB_GZIP_INFLATING:
   default:
@@ -557,17 +556,17 @@
   }
 
   /* We've parsed the header, now uncompress the data */
-  return inflate_stream(conn, writer, ZLIB_GZIP_INFLATING);
+  return inflate_stream(data, writer, ZLIB_GZIP_INFLATING);
 #endif
 }
 
-static void gzip_close_writer(struct connectdata *conn,
+static void gzip_close_writer(struct Curl_easy *data,
                               struct contenc_writer *writer)
 {
   struct zlib_params *zp = (struct zlib_params *) &writer->params;
   z_stream *z = &zp->z;     /* zlib state structure */
 
-  exit_zlib(conn, z, &zp->zlib_init, CURLE_OK);
+  exit_zlib(data, z, &zp->zlib_init, CURLE_OK);
 }
 
 static const struct content_encoding gzip_encoding = {
@@ -626,11 +625,11 @@
   return CURLE_WRITE_ERROR;
 }
 
-static CURLcode brotli_init_writer(struct connectdata *conn,
+static CURLcode brotli_init_writer(struct Curl_easy *data,
                                    struct contenc_writer *writer)
 {
   struct brotli_params *bp = (struct brotli_params *) &writer->params;
-  (void) conn;
+  (void) data;
 
   if(!writer->downstream)
     return CURLE_WRITE_ERROR;
@@ -639,7 +638,7 @@
   return bp->br? CURLE_OK: CURLE_OUT_OF_MEMORY;
 }
 
-static CURLcode brotli_unencode_write(struct connectdata *conn,
+static CURLcode brotli_unencode_write(struct Curl_easy *data,
                                       struct contenc_writer *writer,
                                       const char *buf, size_t nbytes)
 {
@@ -664,7 +663,7 @@
     dstleft = DSIZ;
     r = BrotliDecoderDecompressStream(bp->br,
                                       &nbytes, &src, &dstleft, &dst, NULL);
-    result = Curl_unencode_write(conn, writer->downstream,
+    result = Curl_unencode_write(data, writer->downstream,
                                  decomp, DSIZ - dstleft);
     if(result)
       break;
@@ -687,11 +686,11 @@
   return result;
 }
 
-static void brotli_close_writer(struct connectdata *conn,
+static void brotli_close_writer(struct Curl_easy *data,
                                 struct contenc_writer *writer)
 {
   struct brotli_params *bp = (struct brotli_params *) &writer->params;
-  (void) conn;
+  (void) data;
 
   if(bp->br) {
     BrotliDecoderDestroyInstance(bp->br);
@@ -717,11 +716,11 @@
   void *decomp;
 };
 
-static CURLcode zstd_init_writer(struct connectdata *conn,
+static CURLcode zstd_init_writer(struct Curl_easy *data,
                                  struct contenc_writer *writer)
 {
   struct zstd_params *zp = (struct zstd_params *)&writer->params;
-  (void)conn;
+  (void)data;
 
   if(!writer->downstream)
     return CURLE_WRITE_ERROR;
@@ -731,9 +730,9 @@
   return zp->zds ? CURLE_OK : CURLE_OUT_OF_MEMORY;
 }
 
-static CURLcode zstd_unencode_write(struct connectdata *conn,
-    struct contenc_writer *writer,
-    const char *buf, size_t nbytes)
+static CURLcode zstd_unencode_write(struct Curl_easy *data,
+                                    struct contenc_writer *writer,
+                                    const char *buf, size_t nbytes)
 {
   CURLcode result = CURLE_OK;
   struct zstd_params *zp = (struct zstd_params *)&writer->params;
@@ -760,7 +759,7 @@
       return CURLE_BAD_CONTENT_ENCODING;
     }
     if(out.pos > 0) {
-      result = Curl_unencode_write(conn, writer->downstream,
+      result = Curl_unencode_write(data, writer->downstream,
                                    zp->decomp, out.pos);
       if(result)
         break;
@@ -772,11 +771,11 @@
   return result;
 }
 
-static void zstd_close_writer(struct connectdata *conn,
-    struct contenc_writer *writer)
+static void zstd_close_writer(struct Curl_easy *data,
+                              struct contenc_writer *writer)
 {
   struct zstd_params *zp = (struct zstd_params *)&writer->params;
-  (void)conn;
+  (void)data;
 
   if(zp->decomp) {
     free(zp->decomp);
@@ -800,24 +799,24 @@
 
 
 /* Identity handler. */
-static CURLcode identity_init_writer(struct connectdata *conn,
+static CURLcode identity_init_writer(struct Curl_easy *data,
                                      struct contenc_writer *writer)
 {
-  (void) conn;
+  (void) data;
   return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR;
 }
 
-static CURLcode identity_unencode_write(struct connectdata *conn,
+static CURLcode identity_unencode_write(struct Curl_easy *data,
                                         struct contenc_writer *writer,
                                         const char *buf, size_t nbytes)
 {
-  return Curl_unencode_write(conn, writer->downstream, buf, nbytes);
+  return Curl_unencode_write(data, writer->downstream, buf, nbytes);
 }
 
-static void identity_close_writer(struct connectdata *conn,
+static void identity_close_writer(struct Curl_easy *data,
                                   struct contenc_writer *writer)
 {
-  (void) conn;
+  (void) data;
   (void) writer;
 }
 
@@ -885,18 +884,17 @@
 
 
 /* Real client writer: no downstream. */
-static CURLcode client_init_writer(struct connectdata *conn,
+static CURLcode client_init_writer(struct Curl_easy *data,
                                    struct contenc_writer *writer)
 {
-  (void) conn;
+  (void) data;
   return writer->downstream? CURLE_WRITE_ERROR: CURLE_OK;
 }
 
-static CURLcode client_unencode_write(struct connectdata *conn,
+static CURLcode client_unencode_write(struct Curl_easy *data,
                                       struct contenc_writer *writer,
                                       const char *buf, size_t nbytes)
 {
-  struct Curl_easy *data = conn->data;
   struct SingleRequest *k = &data->req;
 
   (void) writer;
@@ -904,13 +902,13 @@
   if(!nbytes || k->ignorebody)
     return CURLE_OK;
 
-  return Curl_client_write(conn, CLIENTWRITE_BODY, (char *) buf, nbytes);
+  return Curl_client_write(data, CLIENTWRITE_BODY, (char *) buf, nbytes);
 }
 
-static void client_close_writer(struct connectdata *conn,
+static void client_close_writer(struct Curl_easy *data,
                                 struct contenc_writer *writer)
 {
-  (void) conn;
+  (void) data;
   (void) writer;
 }
 
@@ -925,14 +923,14 @@
 
 
 /* Deferred error dummy writer. */
-static CURLcode error_init_writer(struct connectdata *conn,
+static CURLcode error_init_writer(struct Curl_easy *data,
                                   struct contenc_writer *writer)
 {
-  (void) conn;
+  (void) data;
   return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR;
 }
 
-static CURLcode error_unencode_write(struct connectdata *conn,
+static CURLcode error_unencode_write(struct Curl_easy *data,
                                      struct contenc_writer *writer,
                                      const char *buf, size_t nbytes)
 {
@@ -944,16 +942,16 @@
 
   if(!all)
     return CURLE_OUT_OF_MEMORY;
-  failf(conn->data, "Unrecognized content encoding type. "
-                    "libcurl understands %s content encodings.", all);
+  failf(data, "Unrecognized content encoding type. "
+        "libcurl understands %s content encodings.", all);
   free(all);
   return CURLE_BAD_CONTENT_ENCODING;
 }
 
-static void error_close_writer(struct connectdata *conn,
+static void error_close_writer(struct Curl_easy *data,
                                struct contenc_writer *writer)
 {
-  (void) conn;
+  (void) data;
   (void) writer;
 }
 
@@ -968,7 +966,7 @@
 
 /* Create an unencoding writer stage using the given handler. */
 static struct contenc_writer *
-new_unencoding_writer(struct connectdata *conn,
+new_unencoding_writer(struct Curl_easy *data,
                       const struct content_encoding *handler,
                       struct contenc_writer *downstream)
 {
@@ -978,7 +976,7 @@
   if(writer) {
     writer->handler = handler;
     writer->downstream = downstream;
-    if(handler->init_writer(conn, writer)) {
+    if(handler->init_writer(data, writer)) {
       free(writer);
       writer = NULL;
     }
@@ -987,26 +985,26 @@
   return writer;
 }
 
-/* Write data using an unencoding writer stack. */
-CURLcode Curl_unencode_write(struct connectdata *conn,
+/* Write data using an unencoding writer stack. "nbytes" is not
+   allowed to be 0. */
+CURLcode Curl_unencode_write(struct Curl_easy *data,
                              struct contenc_writer *writer,
                              const char *buf, size_t nbytes)
 {
   if(!nbytes)
     return CURLE_OK;
-  return writer->handler->unencode_write(conn, writer, buf, nbytes);
+  return writer->handler->unencode_write(data, writer, buf, nbytes);
 }
 
 /* Close and clean-up the connection's writer stack. */
-void Curl_unencode_cleanup(struct connectdata *conn)
+void Curl_unencode_cleanup(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
   struct SingleRequest *k = &data->req;
   struct contenc_writer *writer = k->writer_stack;
 
   while(writer) {
     k->writer_stack = writer->downstream;
-    writer->handler->close_writer(conn, writer);
+    writer->handler->close_writer(data, writer);
     free(writer);
     writer = k->writer_stack;
   }
@@ -1029,10 +1027,9 @@
 
 /* Set-up the unencoding stack from the Content-Encoding header value.
  * See RFC 7231 section 3.1.2.2. */
-CURLcode Curl_build_unencoding_stack(struct connectdata *conn,
+CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
                                      const char *enclist, int maybechunked)
 {
-  struct Curl_easy *data = conn->data;
   struct SingleRequest *k = &data->req;
 
   do {
@@ -1052,14 +1049,14 @@
     /* Special case: chunked encoding is handled at the reader level. */
     if(maybechunked && namelen == 7 && strncasecompare(name, "chunked", 7)) {
       k->chunk = TRUE;             /* chunks coming our way. */
-      Curl_httpchunk_init(conn);   /* init our chunky engine. */
+      Curl_httpchunk_init(data);   /* init our chunky engine. */
     }
     else if(namelen) {
       const struct content_encoding *encoding = find_encoding(name, namelen);
       struct contenc_writer *writer;
 
       if(!k->writer_stack) {
-        k->writer_stack = new_unencoding_writer(conn, &client_encoding, NULL);
+        k->writer_stack = new_unencoding_writer(data, &client_encoding, NULL);
 
         if(!k->writer_stack)
           return CURLE_OUT_OF_MEMORY;
@@ -1069,7 +1066,7 @@
         encoding = &error_encoding;  /* Defer error at stack use. */
 
       /* Stack the unencoding stage. */
-      writer = new_unencoding_writer(conn, encoding, k->writer_stack);
+      writer = new_unencoding_writer(data, encoding, k->writer_stack);
       if(!writer)
         return CURLE_OUT_OF_MEMORY;
       k->writer_stack = writer;
@@ -1081,29 +1078,29 @@
 
 #else
 /* Stubs for builds without HTTP. */
-CURLcode Curl_build_unencoding_stack(struct connectdata *conn,
+CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
                                      const char *enclist, int maybechunked)
 {
-  (void) conn;
+  (void) data;
   (void) enclist;
   (void) maybechunked;
   return CURLE_NOT_BUILT_IN;
 }
 
-CURLcode Curl_unencode_write(struct connectdata *conn,
+CURLcode Curl_unencode_write(struct Curl_easy *data,
                              struct contenc_writer *writer,
                              const char *buf, size_t nbytes)
 {
-  (void) conn;
+  (void) data;
   (void) writer;
   (void) buf;
   (void) nbytes;
   return CURLE_NOT_BUILT_IN;
 }
 
-void Curl_unencode_cleanup(struct connectdata *conn)
+void Curl_unencode_cleanup(struct Curl_easy *data)
 {
-  (void) conn;
+  (void) data;
 }
 
 char *Curl_all_content_encodings(void)
diff --git a/lib/content_encoding.h b/lib/content_encoding.h
index bdd3f1c..acfd0c2 100644
--- a/lib/content_encoding.h
+++ b/lib/content_encoding.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,23 +33,23 @@
 struct content_encoding {
   const char *name;        /* Encoding name. */
   const char *alias;       /* Encoding name alias. */
-  CURLcode (*init_writer)(struct connectdata *conn,
+  CURLcode (*init_writer)(struct Curl_easy *data,
                           struct contenc_writer *writer);
-  CURLcode (*unencode_write)(struct connectdata *conn,
+  CURLcode (*unencode_write)(struct Curl_easy *data,
                              struct contenc_writer *writer,
                              const char *buf, size_t nbytes);
-  void (*close_writer)(struct connectdata *conn,
+  void (*close_writer)(struct Curl_easy *data,
                        struct contenc_writer *writer);
   size_t paramsize;
 };
 
 
-CURLcode Curl_build_unencoding_stack(struct connectdata *conn,
+CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
                                      const char *enclist, int maybechunked);
-CURLcode Curl_unencode_write(struct connectdata *conn,
+CURLcode Curl_unencode_write(struct Curl_easy *data,
                              struct contenc_writer *writer,
                              const char *buf, size_t nbytes);
-void Curl_unencode_cleanup(struct connectdata *conn);
+void Curl_unencode_cleanup(struct Curl_easy *data);
 char *Curl_all_content_encodings(void);
 
 #endif /* HEADER_CURL_CONTENT_ENCODING_H */
diff --git a/lib/cookie.c b/lib/cookie.c
index cb7d94b..b7531f7 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -95,7 +95,6 @@
 #include "strcase.h"
 #include "curl_get_line.h"
 #include "curl_memrchr.h"
-#include "inet_pton.h"
 #include "parsedate.h"
 #include "rand.h"
 #include "rename.h"
@@ -105,6 +104,8 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
+static void strstore(char **str, const char *newstr);
+
 static void freecookie(struct Cookie *co)
 {
   free(co->expirestr);
@@ -129,12 +130,13 @@
   if(!strcasecompare(cooke_domain, hostname + hostname_len-cookie_domain_len))
     return FALSE;
 
-  /* A lead char of cookie_domain is not '.'.
-     RFC6265 4.1.2.3. The Domain Attribute says:
-       For example, if the value of the Domain attribute is
-       "example.com", the user agent will include the cookie in the Cookie
-       header when making HTTP requests to example.com, www.example.com, and
-       www.corp.example.com.
+  /*
+   * A lead char of cookie_domain is not '.'.
+   * RFC6265 4.1.2.3. The Domain Attribute says:
+   * For example, if the value of the Domain attribute is
+   * "example.com", the user agent will include the cookie in the Cookie
+   * header when making HTTP requests to example.com, www.example.com, and
+   * www.corp.example.com.
    */
   if(hostname_len == cookie_domain_len)
     return TRUE;
@@ -144,28 +146,6 @@
 }
 
 /*
- * Return true if the given string is an IP(v4|v6) address.
- */
-static bool isip(const char *domain)
-{
-  struct in_addr addr;
-#ifdef ENABLE_IPV6
-  struct in6_addr addr6;
-#endif
-
-  if(Curl_inet_pton(AF_INET, domain, &addr)
-#ifdef ENABLE_IPV6
-     || Curl_inet_pton(AF_INET6, domain, &addr6)
-#endif
-    ) {
-    /* domain name given as IP address */
-    return TRUE;
-  }
-
-  return FALSE;
-}
-
-/*
  * matching cookie path and url path
  * RFC6265 5.1.4 Paths and Path-Match
  */
@@ -193,19 +173,19 @@
 
   /* #-fragments are already cut off! */
   if(0 == strlen(uri_path) || uri_path[0] != '/') {
-    free(uri_path);
-    uri_path = strdup("/");
+    strstore(&uri_path, "/");
     if(!uri_path)
       return FALSE;
   }
 
-  /* here, RFC6265 5.1.4 says
-     4. Output the characters of the uri-path from the first character up
-        to, but not including, the right-most %x2F ("/").
-     but URL path /hoge?fuga=xxx means /hoge/index.cgi?fuga=xxx in some site
-     without redirect.
-     Ignore this algorithm because /hoge is uri path for this case
-     (uri path is not /).
+  /*
+   * here, RFC6265 5.1.4 says
+   *  4. Output the characters of the uri-path from the first character up
+   *     to, but not including, the right-most %x2F ("/").
+   *  but URL path /hoge?fuga=xxx means /hoge/index.cgi?fuga=xxx in some site
+   *  without redirect.
+   *  Ignore this algorithm because /hoge is uri path for this case
+   *  (uri path is not /).
    */
 
   uri_path_len = strlen(uri_path);
@@ -264,6 +244,11 @@
   return first? first: domain;
 }
 
+/* Avoid C1001, an "internal error" with MSVC14 */
+#if defined(_MSC_VER) && (_MSC_VER == 1900)
+#pragma optimize("", off)
+#endif
+
 /*
  * A case-insensitive hash for the cookie domains.
  */
@@ -280,6 +265,10 @@
   return (h % COOKIE_HASH_SIZE);
 }
 
+#if defined(_MSC_VER) && (_MSC_VER == 1900)
+#pragma optimize("", on)
+#endif
+
 /*
  * Hash this domain.
  */
@@ -288,7 +277,7 @@
   const char *top;
   size_t len;
 
-  if(!domain || isip(domain))
+  if(!domain || Curl_host_is_ipnum(domain))
     return 0;
 
   top = get_top_domain(domain, &len);
@@ -319,8 +308,7 @@
   /* RFC6265 5.2.4 The Path Attribute */
   if(new_path[0] != '/') {
     /* Let cookie-path be the default-path. */
-    free(new_path);
-    new_path = strdup("/");
+    strstore(&new_path, "/");
     return new_path;
   }
 
@@ -339,7 +327,7 @@
  */
 void Curl_cookie_loadfiles(struct Curl_easy *data)
 {
-  struct curl_slist *list = data->change.cookielist;
+  struct curl_slist *list = data->state.cookielist;
   if(list) {
     Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
     while(list) {
@@ -348,25 +336,29 @@
                                         data->cookies,
                                         data->set.cookiesession);
       if(!newcookies)
-        /* Failure may be due to OOM or a bad cookie; both are ignored
+        /*
+         * Failure may be due to OOM or a bad cookie; both are ignored
          * but only the first should be
          */
-        infof(data, "ignoring failed cookie_init for %s\n", list->data);
+        infof(data, "ignoring failed cookie_init for %s", list->data);
       else
         data->cookies = newcookies;
       list = list->next;
     }
-    curl_slist_free_all(data->change.cookielist); /* clean up list */
-    data->change.cookielist = NULL; /* don't do this again! */
+    curl_slist_free_all(data->state.cookielist); /* clean up list */
+    data->state.cookielist = NULL; /* don't do this again! */
     Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
   }
 }
 
 /*
- * strstore() makes a strdup() on the 'newstr' and if '*str' is non-NULL
- * that will be freed before the allocated string is stored there.
+ * strstore
  *
- * It is meant to easily replace strdup()
+ * A thin wrapper around strdup which ensures that any memory allocated at
+ * *str will be freed before the string allocated by strdup is stored there.
+ * The intended usecase is repeated assignments to the same variable during
+ * parsing in a last-wins scenario. The caller is responsible for checking
+ * for OOM errors.
  */
 static void strstore(char **str, const char *newstr)
 {
@@ -375,7 +367,13 @@
 }
 
 /*
- * remove_expired() removes expired cookies.
+ * remove_expired
+ *
+ * Remove expired cookies from the hash by inspecting the expires timestamp on
+ * each cookie in the hash, freeing and deleting any where the timestamp is in
+ * the past.  If the cookiejar has recorded the next timestamp at which one or
+ * more cookies expire, then processing will exit early in case this timestamp
+ * is in the future.
  */
 static void remove_expired(struct CookieInfo *cookies)
 {
@@ -383,6 +381,20 @@
   curl_off_t now = (curl_off_t)time(NULL);
   unsigned int i;
 
+  /*
+   * If the earliest expiration timestamp in the jar is in the future we can
+   * skip scanning the whole jar and instead exit early as there won't be any
+   * cookies to evict.  If we need to evict however, reset the next_expiration
+   * counter in order to track the next one. In case the recorded first
+   * expiration is the max offset, then perform the safe fallback of checking
+   * all cookies.
+   */
+  if(now < cookies->next_expiration &&
+      cookies->next_expiration != CURL_OFF_T_MAX)
+    return;
+  else
+    cookies->next_expiration = CURL_OFF_T_MAX;
+
   for(i = 0; i < COOKIE_HASH_SIZE; i++) {
     struct Cookie *pv = NULL;
     co = cookies->cookies[i];
@@ -399,6 +411,12 @@
         freecookie(co);
       }
       else {
+        /*
+         * If this cookie has an expiration timestamp earlier than what we've
+         * seen so far then record it for the next round of expirations.
+         */
+        if(co->expires && co->expires < cookies->next_expiration)
+          cookies->next_expiration = co->expires;
         pv = co;
       }
       co = nx;
@@ -412,25 +430,23 @@
   return !strchr(domain, '.') && !strcasecompare(domain, "localhost");
 }
 
-/****************************************************************************
+/*
+ * Curl_cookie_add
  *
- * Curl_cookie_add()
- *
- * Add a single cookie line to the cookie keeping object.
- *
- * Be aware that sometimes we get an IP-only host name, and that might also be
- * a numerical IPv6 address.
+ * Add a single cookie line to the cookie keeping object. Be aware that
+ * sometimes we get an IP-only host name, and that might also be a numerical
+ * IPv6 address.
  *
  * Returns NULL on out of memory or invalid cookie. This is suboptimal,
  * as they should be treated separately.
- ***************************************************************************/
-
+ */
 struct Cookie *
 Curl_cookie_add(struct Curl_easy *data,
-                /* The 'data' pointer here may be NULL at times, and thus
-                   must only be used very carefully for things that can deal
-                   with data being NULL. Such as infof() and similar */
-
+                /*
+                 * The 'data' pointer here may be NULL at times, and thus
+                 * must only be used very carefully for things that can deal
+                 * with data being NULL. Such as infof() and similar
+                 */
                 struct CookieInfo *c,
                 bool httpheader, /* TRUE if HTTP header-style line */
                 bool noexpire, /* if TRUE, skip remove_expired() */
@@ -484,9 +500,11 @@
       if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n=] =%"
                      MAX_NAME_TXT "[^;\r\n]",
                      name, what)) {
-        /* Use strstore() below to properly deal with received cookie
-           headers that have the same string property set more than once,
-           and then we use the last one. */
+        /*
+         * Use strstore() below to properly deal with received cookie
+         * headers that have the same string property set more than once,
+         * and then we use the last one.
+         */
         const char *whatptr;
         bool done = FALSE;
         bool sep;
@@ -494,13 +512,15 @@
         size_t nlen = strlen(name);
         const char *endofn = &ptr[ nlen ];
 
+        /*
+         * Check for too long individual name or contents, or too long
+         * combination of name + contents. Chrome and Firefox support 4095 or
+         * 4096 bytes combo
+         */
         if(nlen >= (MAX_NAME-1) || len >= (MAX_NAME-1) ||
            ((nlen + len) > MAX_NAME)) {
-          /* too long individual name or contents, or too long combination of
-             name + contents. Chrome and Firefox support 4095 or 4096 bytes
-             combo. */
           freecookie(co);
-          infof(data, "oversized cookie dropped, name/val %zu + %zu bytes\n",
+          infof(data, "oversized cookie dropped, name/val %zu + %zu bytes",
                 nlen, len);
           return NULL;
         }
@@ -560,8 +580,10 @@
           }
         }
         else if(!len) {
-          /* this was a "<name>=" with no content, and we must allow
-             'secure' and 'httponly' specified this weirdly */
+          /*
+           * this was a "<name>=" with no content, and we must allow
+           * 'secure' and 'httponly' specified this weirdly
+           */
           done = TRUE;
           /*
            * secure cookies are only allowed to be set when the connection is
@@ -601,8 +623,10 @@
         else if(strcasecompare("domain", name)) {
           bool is_ip;
 
-          /* Now, we make sure that our host is within the given domain,
-             or the given domain is not valid and thus cannot be set. */
+          /*
+           * Now, we make sure that our host is within the given domain, or
+           * the given domain is not valid and thus cannot be set.
+           */
 
           if('.' == whatptr[0])
             whatptr++; /* ignore preceding dot */
@@ -617,7 +641,7 @@
             domain = ":";
 #endif
 
-          is_ip = isip(domain ? domain : whatptr);
+          is_ip = Curl_host_is_ipnum(domain ? domain : whatptr);
 
           if(!domain
              || (is_ip && !strcmp(whatptr, domain))
@@ -632,11 +656,12 @@
                                        given */
           }
           else {
-            /* we did not get a tailmatch and then the attempted set domain
-               is not a domain to which the current host belongs. Mark as
-               bad. */
+            /*
+             * We did not get a tailmatch and then the attempted set domain is
+             * not a domain to which the current host belongs. Mark as bad.
+             */
             badcookie = TRUE;
-            infof(data, "skipped cookie with bad tailmatch domain: %s\n",
+            infof(data, "skipped cookie with bad tailmatch domain: %s",
                   whatptr);
           }
         }
@@ -648,15 +673,15 @@
           }
         }
         else if(strcasecompare("max-age", name)) {
-          /* Defined in RFC2109:
-
-             Optional.  The Max-Age attribute defines the lifetime of the
-             cookie, in seconds.  The delta-seconds value is a decimal non-
-             negative integer.  After delta-seconds seconds elapse, the
-             client should discard the cookie.  A value of zero means the
-             cookie should be discarded immediately.
-
-          */
+          /*
+           * Defined in RFC2109:
+           *
+           * Optional.  The Max-Age attribute defines the lifetime of the
+           * cookie, in seconds.  The delta-seconds value is a decimal non-
+           * negative integer.  After delta-seconds seconds elapse, the
+           * client should discard the cookie.  A value of zero means the
+           * cookie should be discarded immediately.
+           */
           strstore(&co->maxage, whatptr);
           if(!co->maxage) {
             badcookie = TRUE;
@@ -670,9 +695,10 @@
             break;
           }
         }
+
         /*
-          else this is the second (or more) name we don't know
-          about! */
+         * Else, this is the second (or more) name we don't know about!
+         */
       }
       else {
         /* this is an "illegal" <what>=<this> pair */
@@ -690,8 +716,10 @@
       semiptr = strchr(ptr, ';'); /* now, find the next semicolon */
 
       if(!semiptr && *ptr)
-        /* There are no more semicolons, but there's a final name=value pair
-           coming up */
+        /*
+         * There are no more semicolons, but there's a final name=value pair
+         * coming up
+         */
         semiptr = strchr(ptr, '\0');
     } while(semiptr);
 
@@ -715,13 +743,16 @@
       }
     }
     else if(co->expirestr) {
-      /* Note that if the date couldn't get parsed for whatever reason,
-         the cookie will be treated as a session cookie */
+      /*
+       * Note that if the date couldn't get parsed for whatever reason, the
+       * cookie will be treated as a session cookie
+       */
       co->expires = Curl_getdate_capped(co->expirestr);
 
-      /* Session cookies have expires set to 0 so if we get that back
-         from the date parser let's add a second to make it a
-         non-session cookie */
+      /*
+       * Session cookies have expires set to 0 so if we get that back from the
+       * date parser let's add a second to make it a non-session cookie
+       */
       if(co->expires == 0)
         co->expires = 1;
       else if(co->expires < 0)
@@ -738,13 +769,17 @@
     }
 
     if(!badcookie && !co->path && path) {
-      /* No path was given in the header line, set the default.
-         Note that the passed-in path to this function MAY have a '?' and
-         following part that MUST not be stored as part of the path. */
+      /*
+       * No path was given in the header line, set the default.  Note that the
+       * passed-in path to this function MAY have a '?' and following part that
+       * MUST NOT be stored as part of the path.
+       */
       char *queryp = strchr(path, '?');
 
-      /* queryp is where the interesting part of the path ends, so now we
-         want to the find the last */
+      /*
+       * queryp is where the interesting part of the path ends, so now we
+       * want to the find the last
+       */
       char *endslash;
       if(!queryp)
         endslash = strrchr(path, '/');
@@ -765,29 +800,34 @@
       }
     }
 
+    /*
+     * If we didn't get a cookie name, or a bad one, the this is an illegal
+     * line so bail out.
+     */
     if(badcookie || !co->name) {
-      /* we didn't get a cookie name or a bad one,
-         this is an illegal line, bail out */
       freecookie(co);
       return NULL;
     }
 
   }
   else {
-    /* This line is NOT a HTTP header style line, we do offer support for
-       reading the odd netscape cookies-file format here */
+    /*
+     * This line is NOT a HTTP header style line, we do offer support for
+     * reading the odd netscape cookies-file format here
+     */
     char *ptr;
     char *firstptr;
     char *tok_buf = NULL;
     int fields;
 
-    /* IE introduced HTTP-only cookies to prevent XSS attacks. Cookies
-       marked with httpOnly after the domain name are not accessible
-       from javascripts, but since curl does not operate at javascript
-       level, we include them anyway. In Firefox's cookie files, these
-       lines are preceded with #HttpOnly_ and then everything is
-       as usual, so we skip 10 characters of the line..
-    */
+    /*
+     * IE introduced HTTP-only cookies to prevent XSS attacks. Cookies marked
+     * with httpOnly after the domain name are not accessible from javascripts,
+     * but since curl does not operate at javascript level, we include them
+     * anyway. In Firefox's cookie files, these lines are preceded with
+     * #HttpOnly_ and then everything is as usual, so we skip 10 characters of
+     * the line..
+     */
     if(strncmp(lineptr, "#HttpOnly_", 10) == 0) {
       lineptr += 10;
       co->httponly = TRUE;
@@ -808,8 +848,10 @@
 
     firstptr = strtok_r(lineptr, "\t", &tok_buf); /* tokenize it on the TAB */
 
-    /* Now loop through the fields and init the struct we already have
-       allocated */
+    /*
+     * Now loop through the fields and init the struct we already have
+     * allocated
+     */
     for(ptr = firstptr, fields = 0; ptr && !badcookie;
         ptr = strtok_r(NULL, "\t", &tok_buf), fields++) {
       switch(fields) {
@@ -821,10 +863,11 @@
           badcookie = TRUE;
         break;
       case 1:
-        /* flag: A TRUE/FALSE value indicating if all machines within a given
-           domain can access the variable. Set TRUE when the cookie says
-           .domain.com and to false when the domain is complete www.domain.com
-        */
+        /*
+         * flag: A TRUE/FALSE value indicating if all machines within a given
+         * domain can access the variable. Set TRUE when the cookie says
+         * .domain.com and to false when the domain is complete www.domain.com
+         */
         co->tailmatch = strcasecompare(ptr, "TRUE")?TRUE:FALSE;
         break;
       case 2:
@@ -933,17 +976,23 @@
   co->livecookie = c->running;
   co->creationtime = ++c->lastct;
 
-  /* now, we have parsed the incoming line, we must now check if this
-     supersedes an already existing cookie, which it may if the previous have
-     the same domain and path as this */
+  /*
+   * Now we have parsed the incoming line, we must now check if this supersedes
+   * an already existing cookie, which it may if the previous have the same
+   * domain and path as this.
+   */
 
   /* at first, remove expired cookies */
   if(!noexpire)
     remove_expired(c);
 
 #ifdef USE_LIBPSL
-  /* Check if the domain is a Public Suffix and if yes, ignore the cookie. */
-  if(domain && co->domain && !isip(co->domain)) {
+  /*
+   * Check if the domain is a Public Suffix and if yes, ignore the cookie. We
+   * must also check that the data handle isn't NULL since the psl code will
+   * dereference it.
+   */
+  if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
     const psl_ctx_t *psl = Curl_psl_use(data);
     int acceptable;
 
@@ -956,7 +1005,7 @@
 
     if(!acceptable) {
       infof(data, "cookie '%s' dropped, domain '%s' must not "
-                  "set cookies for '%s'\n", co->name, domain, co->domain);
+                  "set cookies for '%s'", co->name, domain, co->domain);
       freecookie(co);
       return NULL;
     }
@@ -1019,12 +1068,12 @@
       }
 
       if(replace_old && !co->livecookie && clist->livecookie) {
-        /* Both cookies matched fine, except that the already present
-           cookie is "live", which means it was set from a header, while
-           the new one isn't "live" and thus only read from a file. We let
-           live cookies stay alive */
-
-        /* Free the newcomer and get out of here! */
+        /*
+         * Both cookies matched fine, except that the already present cookie is
+         * "live", which means it was set from a header, while the new one was
+         * read from a file and thus isn't "live". "live" cookies are preferred
+         * so the new cookie is freed.
+         */
         freecookie(co);
         return NULL;
       }
@@ -1050,8 +1099,10 @@
         free(co);   /* free the newly allocated memory */
         co = clist; /* point to the previous struct instead */
 
-        /* We have replaced a cookie, now skip the rest of the list but
-           make sure the 'lastc' pointer is properly set */
+        /*
+         * We have replaced a cookie, now skip the rest of the list but make
+         * sure the 'lastc' pointer is properly set
+         */
         do {
           lastc = clist;
           clist = clist->next;
@@ -1066,7 +1117,7 @@
   if(c->running)
     /* Only show this when NOT reading the cookies from a file */
     infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
-          "expire %" CURL_FORMAT_CURL_OFF_T "\n",
+          "expire %" CURL_FORMAT_CURL_OFF_T,
           replace_old?"Replaced":"Added", co->name, co->value,
           co->domain, co->path, co->expires);
 
@@ -1079,23 +1130,30 @@
     c->numcookies++; /* one more cookie in the jar */
   }
 
+  /*
+   * Now that we've added a new cookie to the jar, update the expiration
+   * tracker in case it is the next one to expire.
+   */
+  if(co->expires && (co->expires < c->next_expiration))
+    c->next_expiration = co->expires;
+
   return co;
 }
 
 
-/*****************************************************************************
- *
+/*
  * Curl_cookie_init()
  *
  * Inits a cookie struct to read data from a local file. This is always
- * called before any cookies are set. File may be NULL.
+ * called before any cookies are set. File may be NULL in which case only the
+ * struct is initialized. Is file is "-" then STDIN is read.
  *
  * If 'newsession' is TRUE, discard all "session cookies" on read from file.
  *
  * Note that 'data' might be called as NULL pointer.
  *
  * Returns NULL on out of memory. Invalid cookies are ignored.
- ****************************************************************************/
+ */
 struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
                                     const char *file,
                                     struct CookieInfo *inc,
@@ -1114,6 +1172,11 @@
     c->filename = strdup(file?file:"none"); /* copy the name just in case */
     if(!c->filename)
       goto fail; /* failed to get memory */
+    /*
+     * Initialize the next_expiration time to signal that we don't have enough
+     * information yet.
+     */
+    c->next_expiration = CURL_OFF_T_MAX;
   }
   else {
     /* we got an already existing one, use that */
@@ -1157,7 +1220,12 @@
       Curl_cookie_add(data, c, headerline, TRUE, lineptr, NULL, NULL, TRUE);
     }
     free(line); /* free the line buffer */
-    remove_expired(c); /* run this once, not on every cookie */
+
+    /*
+     * Remove expired cookies from the hash. We must make sure to run this
+     * after reading the file, and not on every cookie.
+     */
+    remove_expired(c);
 
     if(fromfile)
       fclose(fp);
@@ -1171,16 +1239,25 @@
 
 fail:
   free(line);
+  /*
+   * Only clean up if we allocated it here, as the original could still be in
+   * use by a share handle.
+   */
   if(!inc)
-    /* Only clean up if we allocated it here, as the original could still be in
-     * use by a share handle */
     Curl_cookie_cleanup(c);
   if(fromfile && fp)
     fclose(fp);
   return NULL; /* out of memory */
 }
 
-/* sort this so that the longest path gets before the shorter path */
+/*
+ * cookie_sort
+ *
+ * Helper function to sort cookies such that the longest path gets before the
+ * shorter path. Path, domain and name lengths are considered in that order,
+ * with the creationtime as the tiebreaker. The creationtime is guaranteed to
+ * be unique per cookie, so we know we will get an ordering at that point.
+ */
 static int cookie_sort(const void *p1, const void *p2)
 {
   struct Cookie *c1 = *(struct Cookie **)p1;
@@ -1212,7 +1289,11 @@
   return (c2->creationtime > c1->creationtime) ? 1 : -1;
 }
 
-/* sort cookies only according to creation time */
+/*
+ * cookie_sort_ct
+ *
+ * Helper function to sort cookies according to creation time.
+ */
 static int cookie_sort_ct(const void *p1, const void *p2)
 {
   struct Cookie *c1 = *(struct Cookie **)p1;
@@ -1256,18 +1337,15 @@
   return NULL;
 }
 
-/*****************************************************************************
+/*
+ * Curl_cookie_getlist
  *
- * Curl_cookie_getlist()
- *
- * For a given host and path, return a linked list of cookies that the
- * client should send to the server if used now. The secure boolean informs
- * the cookie if a secure connection is achieved or not.
+ * For a given host and path, return a linked list of cookies that the client
+ * should send to the server if used now. The secure boolean informs the cookie
+ * if a secure connection is achieved or not.
  *
  * It shall only return cookies that haven't expired.
- *
- ****************************************************************************/
-
+ */
 struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
                                    const char *host, const char *path,
                                    bool secure)
@@ -1286,7 +1364,7 @@
   remove_expired(c);
 
   /* check if host is an IP(v4|v6) address */
-  is_ip = isip(host);
+  is_ip = Curl_host_is_ipnum(host);
 
   co = c->cookies[myhash];
 
@@ -1298,15 +1376,21 @@
       if(!co->domain ||
          (co->tailmatch && !is_ip && tailmatch(co->domain, host)) ||
          ((!co->tailmatch || is_ip) && strcasecompare(host, co->domain)) ) {
-        /* the right part of the host matches the domain stuff in the
-           cookie data */
+        /*
+         * the right part of the host matches the domain stuff in the
+         * cookie data
+         */
 
-        /* now check the left part of the path with the cookies path
-           requirement */
+        /*
+         * now check the left part of the path with the cookies path
+         * requirement
+         */
         if(!co->spath || pathmatch(co->spath, path) ) {
 
-          /* and now, we know this is a match and we should create an
-             entry for the return-linked-list */
+          /*
+           * and now, we know this is a match and we should create an
+           * entry for the return-linked-list
+           */
 
           newco = dup_cookie(co);
           if(newco) {
@@ -1327,9 +1411,11 @@
   }
 
   if(matches) {
-    /* Now we need to make sure that if there is a name appearing more than
-       once, the longest specified path version comes first. To make this
-       the swiftest way, we just sort them all based on path length. */
+    /*
+     * Now we need to make sure that if there is a name appearing more than
+     * once, the longest specified path version comes first. To make this
+     * the swiftest way, we just sort them all based on path length.
+     */
     struct Cookie **array;
     size_t i;
 
@@ -1364,13 +1450,11 @@
   return NULL;
 }
 
-/*****************************************************************************
- *
- * Curl_cookie_clearall()
+/*
+ * Curl_cookie_clearall
  *
  * Clear all existing cookies and reset the counter.
- *
- ****************************************************************************/
+ */
 void Curl_cookie_clearall(struct CookieInfo *cookies)
 {
   if(cookies) {
@@ -1383,14 +1467,11 @@
   }
 }
 
-/*****************************************************************************
- *
- * Curl_cookie_freelist()
+/*
+ * Curl_cookie_freelist
  *
  * Free a list of cookies previously returned by Curl_cookie_getlist();
- *
- ****************************************************************************/
-
+ */
 void Curl_cookie_freelist(struct Cookie *co)
 {
   struct Cookie *next;
@@ -1401,14 +1482,11 @@
   }
 }
 
-
-/*****************************************************************************
- *
- * Curl_cookie_clearsess()
+/*
+ * Curl_cookie_clearsess
  *
  * Free all session cookies in the cookies list.
- *
- ****************************************************************************/
+ */
 void Curl_cookie_clearsess(struct CookieInfo *cookies)
 {
   struct Cookie *first, *curr, *next, *prev = NULL;
@@ -1445,14 +1523,11 @@
   }
 }
 
-
-/*****************************************************************************
- *
+/*
  * Curl_cookie_cleanup()
  *
  * Free a "cookie object" previous created with Curl_cookie_init().
- *
- ****************************************************************************/
+ */
 void Curl_cookie_cleanup(struct CookieInfo *c)
 {
   if(c) {
@@ -1464,12 +1539,13 @@
   }
 }
 
-/* get_netscape_format()
+/*
+ * get_netscape_format()
  *
  * Formats a string for Netscape output file, w/o a newline at the end.
- *
- * Function returns a char * to a formatted line. Has to be free()d
-*/
+ * Function returns a char * to a formatted line. The caller is responsible
+ * for freeing the returned pointer.
+ */
 static char *get_netscape_format(const struct Cookie *co)
 {
   return aprintf(
@@ -1482,8 +1558,10 @@
     "%s\t"   /* name */
     "%s",    /* value */
     co->httponly?"#HttpOnly_":"",
-    /* Make sure all domains are prefixed with a dot if they allow
-       tailmatching. This is Mozilla-style. */
+    /*
+     * Make sure all domains are prefixed with a dot if they allow
+     * tailmatching. This is Mozilla-style.
+     */
     (co->tailmatch && co->domain && co->domain[0] != '.')? ".":"",
     co->domain?co->domain:"unknown",
     co->tailmatch?"TRUE":"FALSE",
@@ -1502,18 +1580,18 @@
  *
  * The function returns non-zero on write failure.
  */
-static int cookie_output(struct Curl_easy *data,
-                         struct CookieInfo *c, const char *filename)
+static CURLcode cookie_output(struct Curl_easy *data,
+                              struct CookieInfo *c, const char *filename)
 {
   struct Cookie *co;
   FILE *out = NULL;
   bool use_stdout = FALSE;
   char *tempstore = NULL;
-  bool error = false;
+  CURLcode error = CURLE_OK;
 
   if(!c)
     /* no cookie engine alive */
-    return 0;
+    return CURLE_OK;
 
   /* at first, remove expired cookies */
   remove_expired(c);
@@ -1531,15 +1609,17 @@
 
     tempstore = aprintf("%s.%s.tmp", filename, randsuffix);
     if(!tempstore)
-      return 1;
+      return CURLE_OUT_OF_MEMORY;
 
     out = fopen(tempstore, FOPEN_WRITETEXT);
-    if(!out)
+    if(!out) {
+      error = CURLE_WRITE_ERROR;
       goto error;
+    }
   }
 
   fputs("# Netscape HTTP Cookie File\n"
-        "# https://curl.haxx.se/docs/http-cookies.html\n"
+        "# https://curl.se/docs/http-cookies.html\n"
         "# This file was generated by libcurl! Edit at your own risk.\n\n",
         out);
 
@@ -1550,6 +1630,7 @@
 
     array = calloc(1, sizeof(struct Cookie *) * c->numcookies);
     if(!array) {
+      error = CURLE_OUT_OF_MEMORY;
       goto error;
     }
 
@@ -1566,9 +1647,9 @@
 
     for(i = 0; i < nvalid; i++) {
       char *format_ptr = get_netscape_format(array[i]);
-      if(format_ptr == NULL) {
-        fprintf(out, "#\n# Fatal libcurl error\n");
+      if(!format_ptr) {
         free(array);
+        error = CURLE_OUT_OF_MEMORY;
         goto error;
       }
       fprintf(out, "%s\n", format_ptr);
@@ -1583,18 +1664,24 @@
     out = NULL;
     if(Curl_rename(tempstore, filename)) {
       unlink(tempstore);
+      error = CURLE_WRITE_ERROR;
       goto error;
     }
   }
 
-  goto cleanup;
+  /*
+   * If we reach here we have successfully written a cookie file so theree is
+   * no need to inspect the error, any error case should have jumped into the
+   * error block below.
+   */
+  free(tempstore);
+  return CURLE_OK;
+
 error:
-  error = true;
-cleanup:
   if(out && !use_stdout)
     fclose(out);
   free(tempstore);
-  return error ? 1 : 0;
+  return error;
 }
 
 static struct curl_slist *cookie_list(struct Curl_easy *data)
@@ -1605,8 +1692,7 @@
   char *line;
   unsigned int i;
 
-  if((data->cookies == NULL) ||
-      (data->cookies->numcookies == 0))
+  if(!data->cookies || (data->cookies->numcookies == 0))
     return NULL;
 
   for(i = 0; i < COOKIE_HASH_SIZE; i++) {
@@ -1642,8 +1728,10 @@
 
 void Curl_flush_cookies(struct Curl_easy *data, bool cleanup)
 {
+  CURLcode res;
+
   if(data->set.str[STRING_COOKIEJAR]) {
-    if(data->change.cookielist) {
+    if(data->state.cookielist) {
       /* If there is a list of cookie files to read, do it first so that
          we have all the told files read before we write the new jar.
          Curl_cookie_loadfiles() LOCKS and UNLOCKS the share itself! */
@@ -1653,16 +1741,17 @@
     Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 
     /* if we have a destination file for all the cookies to get dumped to */
-    if(cookie_output(data, data->cookies, data->set.str[STRING_COOKIEJAR]))
-      infof(data, "WARNING: failed to save cookies in %s\n",
-            data->set.str[STRING_COOKIEJAR]);
+    res = cookie_output(data, data->cookies, data->set.str[STRING_COOKIEJAR]);
+    if(res)
+      infof(data, "WARNING: failed to save cookies in %s: %s",
+            data->set.str[STRING_COOKIEJAR], curl_easy_strerror(res));
   }
   else {
-    if(cleanup && data->change.cookielist) {
+    if(cleanup && data->state.cookielist) {
       /* since nothing is written, we can just free the list of cookie file
          names */
-      curl_slist_free_all(data->change.cookielist); /* clean up list */
-      data->change.cookielist = NULL;
+      curl_slist_free_all(data->state.cookielist); /* clean up list */
+      data->state.cookielist = NULL;
     }
     Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
   }
diff --git a/lib/cookie.h b/lib/cookie.h
index b3865e6..0ffe08e 100644
--- a/lib/cookie.h
+++ b/lib/cookie.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -34,12 +34,12 @@
   char *domain;      /* domain = <this> */
   curl_off_t expires;  /* expires = <this> */
   char *expirestr;   /* the plain text version */
-  bool tailmatch;    /* whether we do tail-matching of the domain name */
 
   /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */
   char *version;     /* Version = <value> */
   char *maxage;      /* Max-Age = <value> */
 
+  bool tailmatch;    /* whether we do tail-matching of the domain name */
   bool secure;       /* whether the 'secure' keyword was used */
   bool livecookie;   /* updated from a server, not a stored file */
   bool httponly;     /* true if the httponly directive is present */
@@ -61,10 +61,11 @@
   struct Cookie *cookies[COOKIE_HASH_SIZE];
 
   char *filename;  /* file we read from/write to */
-  bool running;    /* state info, for cookie adding information */
   long numcookies; /* number of cookies in the "jar" */
+  bool running;    /* state info, for cookie adding information */
   bool newsession; /* new session, discard session cookies on load */
   int lastct;      /* last creation-time used in the jar */
+  curl_off_t next_expiration; /* the next time at which expiration happens */
 };
 
 /* This is the maximum line length we accept for a cookie line. RFC 2109
@@ -91,13 +92,13 @@
  */
 
 struct Cookie *Curl_cookie_add(struct Curl_easy *data,
-                               struct CookieInfo *, bool header, bool noexpiry,
-                               char *lineptr,
+                               struct CookieInfo *c, bool header,
+                               bool noexpiry, char *lineptr,
                                const char *domain, const char *path,
                                bool secure);
 
-struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
-                                   const char *, bool);
+struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, const char *host,
+                                   const char *path, bool secure);
 void Curl_cookie_freelist(struct Cookie *cookies);
 void Curl_cookie_clearall(struct CookieInfo *cookies);
 void Curl_cookie_clearsess(struct CookieInfo *cookies);
@@ -110,9 +111,10 @@
 #define Curl_flush_cookies(x,y) Curl_nop_stmt
 #else
 void Curl_flush_cookies(struct Curl_easy *data, bool cleanup);
-void Curl_cookie_cleanup(struct CookieInfo *);
+void Curl_cookie_cleanup(struct CookieInfo *c);
 struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
-                                    const char *, struct CookieInfo *, bool);
+                                    const char *file, struct CookieInfo *inc,
+                                    bool newsession);
 struct curl_slist *Curl_cookie_list(struct Curl_easy *data);
 void Curl_cookie_loadfiles(struct Curl_easy *data);
 #endif
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index 947d0d3..842fd7f 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -141,7 +141,7 @@
       continue;
 
     /* ignore elements without required address info */
-    if((ai->ai_addr == NULL) || !(ai->ai_addrlen > 0))
+    if(!ai->ai_addr || !(ai->ai_addrlen > 0))
       continue;
 
     /* ignore elements with bogus address size */
@@ -285,7 +285,7 @@
 #endif
       ss_size = sizeof(struct sockaddr_in);
 
-    /* allocate memory to told the struct, the address and the name */
+    /* allocate memory to hold the struct, the address and the name */
     ai = calloc(1, sizeof(struct Curl_addrinfo) + ss_size + namelen);
     if(!ai) {
       result = CURLE_OUT_OF_MEMORY;
diff --git a/lib/curl_addrinfo.h b/lib/curl_addrinfo.h
index a0cade6..73a8c1b 100644
--- a/lib/curl_addrinfo.h
+++ b/lib/curl_addrinfo.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_base64.h b/lib/curl_base64.h
index cfb6ee7..d48edc4 100644
--- a/lib/curl_base64.h
+++ b/lib/curl_base64.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_config.h b/lib/curl_config.h
index 2476fc2..0961ee9 100644
--- a/lib/curl_config.h
+++ b/lib/curl_config.h
@@ -16,6 +16,9 @@
 /* Default SSL backend */
 /* #undef CURL_DEFAULT_SSL_BACKEND */
 
+/* disable alt-svc */
+/* #undef CURL_DISABLE_ALTSVC */
+
 /* to disable cookies support */
 /* #undef CURL_DISABLE_COOKIES */
 
@@ -40,6 +43,9 @@
 /* to disable Gopher */
 #define CURL_DISABLE_GOPHER 1
 
+/* disable alt-svc */
+/* #undef CURL_DISABLE_HSTS */
+
 /* to disable HTTP */
 /* #undef CURL_DISABLE_HTTP */
 
@@ -67,6 +73,9 @@
 /* disable netrc parsing */
 /* #undef CURL_DISABLE_NETRC */
 
+/* to disable NTLM support */
+/* #undef CURL_DISABLE_NTLM */
+
 /* if the OpenSSL configuration won't be loaded automatically */
 /* #undef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG */
 
@@ -127,12 +136,6 @@
 /* Define to the type of arg 2 for gethostname. */
 #define GETHOSTNAME_TYPE_ARG2 size_t
 
-/* Specifies the number of arguments to getservbyport_r */
-/* #undef GETSERVBYPORT_R_ARGS */
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-/* #undef GETSERVBYPORT_R_BUFSIZE */
-
 /* Define to 1 if you have the alarm function. */
 #define HAVE_ALARM 1
 
@@ -212,9 +215,6 @@
 /* Define to 1 if you have the freeaddrinfo function. */
 #define HAVE_FREEADDRINFO 1
 
-/* Define to 1 if you have the freeifaddrs function. */
-#define HAVE_FREEIFADDRS 1
-
 /* Define to 1 if you have the fsetxattr function. */
 #define HAVE_FSETXATTR 1
 
@@ -227,9 +227,6 @@
 /* Define to 1 if you have the ftruncate function. */
 #define HAVE_FTRUNCATE 1
 
-/* Define to 1 if you have the gai_strerror function. */
-#define HAVE_GAI_STRERROR 1
-
 /* Define to 1 if you have a working getaddrinfo function. */
 #define HAVE_GETADDRINFO 1
 
@@ -239,21 +236,6 @@
 /* Define to 1 if you have the `geteuid' function. */
 #define HAVE_GETEUID 1
 
-/* Define to 1 if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#define HAVE_GETHOSTBYADDR_R 1
-
-/* gethostbyaddr_r() takes 5 args */
-/* #undef HAVE_GETHOSTBYADDR_R_5 */
-
-/* gethostbyaddr_r() takes 7 args */
-/* #undef HAVE_GETHOSTBYADDR_R_7 */
-
-/* gethostbyaddr_r() takes 8 args */
-#define HAVE_GETHOSTBYADDR_R_8 1
-
 /* Define to 1 if you have the gethostbyname function. */
 #define HAVE_GETHOSTBYNAME 1
 
@@ -293,9 +275,6 @@
 /* Define to 1 if you have the `getrlimit' function. */
 #define HAVE_GETRLIMIT 1
 
-/* Define to 1 if you have the getservbyport_r function. */
-/* #undef HAVE_GETSERVBYPORT_R */
-
 /* Define to 1 if you have the getsockname function. */
 #define HAVE_GETSOCKNAME 1
 
@@ -332,6 +311,9 @@
 /* if you have MIT Kerberos */
 /* #undef HAVE_GSSMIT */
 
+/* Define to 1 if you have the <hyper.h> header file. */
+/* #undef HAVE_HYPER_H */
+
 /* Define to 1 if you have the <idn2.h> header file. */
 /* #undef HAVE_IDN2_H */
 
@@ -341,15 +323,6 @@
 /* Define to 1 if you have the `if_nametoindex' function. */
 #define HAVE_IF_NAMETOINDEX 1
 
-/* Define to 1 if you have the inet_ntoa_r function. */
-/* #undef HAVE_INET_NTOA_R */
-
-/* inet_ntoa_r() takes 2 args */
-/* #undef HAVE_INET_NTOA_R_2 */
-
-/* inet_ntoa_r() takes 3 args */
-/* #undef HAVE_INET_NTOA_R_3 */
-
 /* Define to 1 if you have a IPv6 capable working inet_ntop function. */
 #define HAVE_INET_NTOP 1
 
@@ -601,9 +574,6 @@
 /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
 /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */
 
-/* Define to 1 if you have the <sgtty.h> header file. */
-/* #undef HAVE_SGTTY_H */
-
 /* Define to 1 if you have the sigaction function. */
 #define HAVE_SIGACTION 1
 
@@ -676,9 +646,6 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
-/* Define to 1 if you have the strncasecmp function. */
-#define HAVE_STRNCASECMP 1
-
 /* Define to 1 if you have the strncmpi function. */
 /* #undef HAVE_STRNCMPI */
 
@@ -760,9 +727,6 @@
 /* Define to 1 if you have the <termio.h> header file. */
 #define HAVE_TERMIO_H 1
 
-/* Define to 1 if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
 /* Define this if time_t is unsigned */
 /* #undef HAVE_TIME_T_UNSIGNED */
 
@@ -790,6 +754,9 @@
 /* Define to 1 if you have the winber.h header file. */
 /* #undef HAVE_WINBER_H */
 
+/* Define to 1 if you have the wincrypt.h header file. */
+/* #undef HAVE_WINCRYPT_H */
+
 /* Define to 1 if you have the windows.h header file. */
 /* #undef HAVE_WINDOWS_H */
 
@@ -805,9 +772,6 @@
 /* Define to 1 if you have the <wolfssh/ssh.h> header file. */
 /* #undef HAVE_WOLFSSH_SSH_H */
 
-/* Define to 1 if you have the `wolfSSLv3_client_method' function. */
-/* #undef HAVE_WOLFSSLV3_CLIENT_METHOD */
-
 /* if you have wolfSSL_DES_ecb_encrypt */
 /* #undef HAVE_WOLFSSL_DES_ECB_ENCRYPT */
 
@@ -866,7 +830,7 @@
 #define PACKAGE "curl"
 
 /* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "a suitable curl mailing list: https://curl.haxx.se/mail/"
+#define PACKAGE_BUGREPORT "a suitable curl mailing list: https://curl.se/mail/"
 
 /* Define to the full name of this package. */
 #define PACKAGE_NAME "curl"
@@ -901,9 +865,6 @@
 /* Define to the function return type for recv. */
 #define RECV_TYPE_RETV ssize_t
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* Define to the type qualifier of arg 5 for select. */
 #define SELECT_QUAL_ARG5 
 
@@ -952,12 +913,6 @@
 /* Define to the type of arg 3 for strerror_r. */
 #define STRERROR_R_TYPE_ARG3 size_t
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* to enable alt-svc */
-/* #undef USE_ALTSVC */
-
 /* if AmiSSL is in use */
 /* #undef USE_AMISSL */
 
@@ -973,8 +928,11 @@
 /* if GnuTLS is enabled */
 /* #undef USE_GNUTLS */
 
-/* if GnuTLS uses nettle as crypto backend */
-/* #undef USE_GNUTLS_NETTLE */
+/* GSASL support enabled */
+/* #undef USE_GSASL */
+
+/* if hyper is in use */
+/* #undef USE_HYPER */
 
 /* PSL support enabled */
 /* #undef USE_LIBPSL */
@@ -997,9 +955,6 @@
 /* if MesaLink is enabled */
 /* #undef USE_MESALINK */
 
-/* Define to enable metalink support */
-/* #undef USE_METALINK */
-
 /* if nghttp2 is in use */
 /* #undef USE_NGHTTP2 */
 
@@ -1027,6 +982,9 @@
 /* if quiche is in use */
 /* #undef USE_QUICHE */
 
+/* if rustls is enabled */
+/* #undef USE_RUSTLS */
+
 /* to enable Windows native SSL/TLS support */
 /* #undef USE_SCHANNEL */
 
@@ -1045,6 +1003,10 @@
 /* Use Unix domain sockets */
 #define USE_UNIX_SOCKETS 1
 
+/* Define to 1 if you are building a Windows target with crypto API support.
+   */
+/* #undef USE_WIN32_CRYPTO */
+
 /* Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz). */
 /* #undef USE_WIN32_IDN */
 
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index eca3734..fa4f19c 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -98,7 +98,7 @@
 #endif
 
 /* Allow SMB to work on Windows */
-#cmakedefine USE_WIN32_CRYPTO
+#cmakedefine USE_WIN32_CRYPTO 1
 
 /* Use Windows LDAP implementation */
 #cmakedefine USE_WIN32_LDAP 1
@@ -112,27 +112,6 @@
 /* Define if you want to enable IPv6 support */
 #cmakedefine ENABLE_IPV6 1
 
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#cmakedefine GETNAMEINFO_QUAL_ARG1 ${GETNAMEINFO_QUAL_ARG1}
-
-/* Define to the type of arg 1 for getnameinfo. */
-#cmakedefine GETNAMEINFO_TYPE_ARG1 ${GETNAMEINFO_TYPE_ARG1}
-
-/* Define to the type of arg 2 for getnameinfo. */
-#cmakedefine GETNAMEINFO_TYPE_ARG2 ${GETNAMEINFO_TYPE_ARG2}
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#cmakedefine GETNAMEINFO_TYPE_ARG46 ${GETNAMEINFO_TYPE_ARG46}
-
-/* Define to the type of arg 7 for getnameinfo. */
-#cmakedefine GETNAMEINFO_TYPE_ARG7 ${GETNAMEINFO_TYPE_ARG7}
-
-/* Specifies the number of arguments to getservbyport_r */
-#cmakedefine GETSERVBYPORT_R_ARGS ${GETSERVBYPORT_R_ARGS}
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#cmakedefine GETSERVBYPORT_R_BUFSIZE ${GETSERVBYPORT_R_BUFSIZE}
-
 /* Define to 1 if you have the alarm function. */
 #cmakedefine HAVE_ALARM 1
 
@@ -166,18 +145,12 @@
 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
 #cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
 
-/* Define to 1 if you have the <crypto.h> header file. */
-#cmakedefine HAVE_CRYPTO_H 1
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #cmakedefine HAVE_DLFCN_H 1
 
 /* Define to 1 if you have the <errno.h> header file. */
 #cmakedefine HAVE_ERRNO_H 1
 
-/* Define to 1 if you have the <err.h> header file. */
-#cmakedefine HAVE_ERR_H 1
-
 /* Define to 1 if you have the fcntl function. */
 #cmakedefine HAVE_FCNTL 1
 
@@ -187,18 +160,9 @@
 /* Define to 1 if you have a working fcntl O_NONBLOCK function. */
 #cmakedefine HAVE_FCNTL_O_NONBLOCK 1
 
-/* Define to 1 if you have the fdopen function. */
-#cmakedefine HAVE_FDOPEN 1
-
-/* Define to 1 if you have the `fork' function. */
-#cmakedefine HAVE_FORK 1
-
 /* Define to 1 if you have the freeaddrinfo function. */
 #cmakedefine HAVE_FREEADDRINFO 1
 
-/* Define to 1 if you have the freeifaddrs function. */
-#cmakedefine HAVE_FREEIFADDRS 1
-
 /* Define to 1 if you have the ftruncate function. */
 #cmakedefine HAVE_FTRUNCATE 1
 
@@ -208,20 +172,8 @@
 /* Define to 1 if you have the `geteuid' function. */
 #cmakedefine HAVE_GETEUID 1
 
-/* Define to 1 if you have the gethostbyaddr function. */
-#cmakedefine HAVE_GETHOSTBYADDR 1
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#cmakedefine HAVE_GETHOSTBYADDR_R 1
-
-/* gethostbyaddr_r() takes 5 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_5 1
-
-/* gethostbyaddr_r() takes 7 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_7 1
-
-/* gethostbyaddr_r() takes 8 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_8 1
+/* Define to 1 if you have the `getppid' function. */
+#cmakedefine HAVE_GETPPID 1
 
 /* Define to 1 if you have the gethostbyname function. */
 #cmakedefine HAVE_GETHOSTBYNAME 1
@@ -244,9 +196,6 @@
 /* Define to 1 if you have a working getifaddrs function. */
 #cmakedefine HAVE_GETIFADDRS 1
 
-/* Define to 1 if you have the getnameinfo function. */
-#cmakedefine HAVE_GETNAMEINFO 1
-
 /* Define to 1 if you have the `getpass_r' function. */
 #cmakedefine HAVE_GETPASS_R 1
 
@@ -274,9 +223,6 @@
 /* Define to 1 if you have the `getrlimit' function. */
 #cmakedefine HAVE_GETRLIMIT 1
 
-/* Define to 1 if you have the getservbyport_r function. */
-#cmakedefine HAVE_GETSERVBYPORT_R 1
-
 /* Define to 1 if you have the `gettimeofday' function. */
 #cmakedefine HAVE_GETTIMEOFDAY 1
 
@@ -322,21 +268,18 @@
 /* Define to 1 if you have the `inet_addr' function. */
 #cmakedefine HAVE_INET_ADDR 1
 
-/* Define to 1 if you have the inet_ntoa_r function. */
-#cmakedefine HAVE_INET_NTOA_R 1
-
-/* inet_ntoa_r() takes 2 args */
-#cmakedefine HAVE_INET_NTOA_R_2 1
-
-/* inet_ntoa_r() takes 3 args */
-#cmakedefine HAVE_INET_NTOA_R_3 1
-
 /* Define to 1 if you have a IPv6 capable working inet_ntop function. */
 #cmakedefine HAVE_INET_NTOP 1
 
 /* Define to 1 if you have a IPv6 capable working inet_pton function. */
 #cmakedefine HAVE_INET_PTON 1
 
+/* Define to 1 if symbol `sa_family_t' exists */
+#cmakedefine HAVE_SA_FAMILY_T 1
+
+/* Define to 1 if symbol `ADDRESS_FAMILY' exists */
+#cmakedefine HAVE_ADDRESS_FAMILY 1
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #cmakedefine HAVE_INTTYPES_H 1
 
@@ -395,8 +338,11 @@
 /* Define to 1 if you have the <libgen.h> header file. */
 #cmakedefine HAVE_LIBGEN_H 1
 
-/* Define to 1 if you have the `idn' library (-lidn). */
-#cmakedefine HAVE_LIBIDN 1
+/* Define to 1 if you have the `idn2' library (-lidn2). */
+#cmakedefine HAVE_LIBIDN2 1
+
+/* Define to 1 if you have the idn2.h header file. */
+#cmakedefine HAVE_IDN2_H 1
 
 /* Define to 1 if you have the `resolv' library (-lresolv). */
 #cmakedefine HAVE_LIBRESOLV 1
@@ -410,21 +356,6 @@
 /* Define to 1 if you have the `ssh2' library (-lssh2). */
 #cmakedefine HAVE_LIBSSH2 1
 
-/* Define to 1 if libssh2 provides `libssh2_version'. */
-#cmakedefine HAVE_LIBSSH2_VERSION 1
-
-/* Define to 1 if libssh2 provides `libssh2_init'. */
-#cmakedefine HAVE_LIBSSH2_INIT 1
-
-/* Define to 1 if libssh2 provides `libssh2_exit'. */
-#cmakedefine HAVE_LIBSSH2_EXIT 1
-
-/* Define to 1 if libssh2 provides `libssh2_scp_send64'. */
-#cmakedefine HAVE_LIBSSH2_SCP_SEND64 1
-
-/* Define to 1 if libssh2 provides `libssh2_session_handshake'. */
-#cmakedefine HAVE_LIBSSH2_SESSION_HANDSHAKE 1
-
 /* Define to 1 if you have the <libssh2.h> header file. */
 #cmakedefine HAVE_LIBSSH2_H 1
 
@@ -470,6 +401,9 @@
 /* Define to 1 if you have the <netinet/tcp.h> header file. */
 #cmakedefine HAVE_NETINET_TCP_H 1
 
+/* Define to 1 if you have the <linux/tcp.h> header file. */
+#cmakedefine HAVE_LINUX_TCP_H 1
+
 /* Define to 1 if you have the <net/if.h> header file. */
 #cmakedefine HAVE_NET_IF_H 1
 
@@ -503,9 +437,6 @@
 /* Define to 1 if you have the <pem.h> header file. */
 #cmakedefine HAVE_PEM_H 1
 
-/* Define to 1 if you have the `perror' function. */
-#cmakedefine HAVE_PERROR 1
-
 /* Define to 1 if you have the `pipe' function. */
 #cmakedefine HAVE_PIPE 1
 
@@ -542,9 +473,6 @@
 /* Define to 1 if you have the recvfrom function. */
 #cmakedefine HAVE_RECVFROM 1
 
-/* Define to 1 if you have the <rsa.h> header file. */
-#cmakedefine HAVE_RSA_H 1
-
 /* Define to 1 if you have the select function. */
 #cmakedefine HAVE_SELECT 1
 
@@ -578,9 +506,6 @@
 /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
 #cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK 1
 
-/* Define to 1 if you have the <sgtty.h> header file. */
-#cmakedefine HAVE_SGTTY_H 1
-
 /* Define to 1 if you have the sigaction function. */
 #cmakedefine HAVE_SIGACTION 1
 
@@ -647,15 +572,6 @@
 /* Define to 1 if you have the <string.h> header file. */
 #cmakedefine HAVE_STRING_H 1
 
-/* Define to 1 if you have the strlcat function. */
-#cmakedefine HAVE_STRLCAT 1
-
-/* Define to 1 if you have the `strlcpy' function. */
-#cmakedefine HAVE_STRLCPY 1
-
-/* Define to 1 if you have the strncasecmp function. */
-#cmakedefine HAVE_STRNCASECMP 1
-
 /* Define to 1 if you have the strncmpi function. */
 #cmakedefine HAVE_STRNCMPI 1
 
@@ -746,6 +662,9 @@
 /* Define to 1 if you have the `utime' function. */
 #cmakedefine HAVE_UTIME 1
 
+/* Define to 1 if you have the `utimes' function. */
+#cmakedefine HAVE_UTIMES 1
+
 /* Define to 1 if you have the <utime.h> header file. */
 #cmakedefine HAVE_UTIME_H 1
 
@@ -873,9 +792,6 @@
 /* Define to the function return type for recv. */
 #cmakedefine RECV_TYPE_RETV ${RECV_TYPE_RETV}
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#cmakedefine RETSIGTYPE ${RETSIGTYPE}
-
 /* Define to the type qualifier of arg 5 for select. */
 #cmakedefine SELECT_QUAL_ARG5 ${SELECT_QUAL_ARG5}
 
@@ -957,9 +873,6 @@
 /* Define if you want to enable WIN32 threaded DNS lookup */
 #cmakedefine USE_THREADS_WIN32 1
 
-/* Define to disable non-blocking sockets. */
-#cmakedefine USE_BLOCKING_SOCKETS 1
-
 /* if GnuTLS is enabled */
 #cmakedefine USE_GNUTLS 1
 
@@ -996,6 +909,10 @@
 /* if OpenSSL is in use */
 #cmakedefine USE_OPENSSL 1
 
+/* Define to 1 if you don't want the OpenSSL configuration to be loaded
+   automatically */
+#cmakedefine CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG 1
+
 /* to enable NGHTTP2  */
 #cmakedefine USE_NGHTTP2 1
 
@@ -1014,8 +931,8 @@
 /* if Unix domain sockets are enabled  */
 #cmakedefine USE_UNIX_SOCKETS
 
-/* to enable alt-svc */
-#cmakedefine USE_ALTSVC 1
+/* to disable alt-svc */
+#cmakedefine CURL_DISABLE_ALTSVC 1
 
 /* Define to 1 if you are building a Windows target with large file support. */
 #cmakedefine USE_WIN32_LARGE_FILES 1
@@ -1069,3 +986,9 @@
 
 /* Define to 1 if you have the mach_absolute_time function. */
 #cmakedefine HAVE_MACH_ABSOLUTE_TIME 1
+
+/* to enable Windows IDN */
+#cmakedefine USE_WIN32_IDN 1
+
+/* to make the compiler know the prototypes of Windows IDN APIs */
+#cmakedefine WANT_IDN_PROTOTYPES 1
diff --git a/lib/curl_config.h.in b/lib/curl_config.h.in
index ab8651a..5a8190f 100644
--- a/lib/curl_config.h.in
+++ b/lib/curl_config.h.in
@@ -15,6 +15,9 @@
 /* Default SSL backend */
 #undef CURL_DEFAULT_SSL_BACKEND
 
+/* disable alt-svc */
+#undef CURL_DISABLE_ALTSVC
+
 /* to disable cookies support */
 #undef CURL_DISABLE_COOKIES
 
@@ -39,6 +42,9 @@
 /* to disable Gopher */
 #undef CURL_DISABLE_GOPHER
 
+/* disable alt-svc */
+#undef CURL_DISABLE_HSTS
+
 /* to disable HTTP */
 #undef CURL_DISABLE_HTTP
 
@@ -66,6 +72,9 @@
 /* disable netrc parsing */
 #undef CURL_DISABLE_NETRC
 
+/* to disable NTLM support */
+#undef CURL_DISABLE_NTLM
+
 /* if the OpenSSL configuration won't be loaded automatically */
 #undef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 
@@ -126,12 +135,6 @@
 /* Define to the type of arg 2 for gethostname. */
 #undef GETHOSTNAME_TYPE_ARG2
 
-/* Specifies the number of arguments to getservbyport_r */
-#undef GETSERVBYPORT_R_ARGS
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#undef GETSERVBYPORT_R_BUFSIZE
-
 /* Define to 1 if you have the alarm function. */
 #undef HAVE_ALARM
 
@@ -211,9 +214,6 @@
 /* Define to 1 if you have the freeaddrinfo function. */
 #undef HAVE_FREEADDRINFO
 
-/* Define to 1 if you have the freeifaddrs function. */
-#undef HAVE_FREEIFADDRS
-
 /* Define to 1 if you have the fsetxattr function. */
 #undef HAVE_FSETXATTR
 
@@ -226,9 +226,6 @@
 /* Define to 1 if you have the ftruncate function. */
 #undef HAVE_FTRUNCATE
 
-/* Define to 1 if you have the gai_strerror function. */
-#undef HAVE_GAI_STRERROR
-
 /* Define to 1 if you have a working getaddrinfo function. */
 #undef HAVE_GETADDRINFO
 
@@ -238,21 +235,6 @@
 /* Define to 1 if you have the `geteuid' function. */
 #undef HAVE_GETEUID
 
-/* Define to 1 if you have the gethostbyaddr function. */
-#undef HAVE_GETHOSTBYADDR
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#undef HAVE_GETHOSTBYADDR_R
-
-/* gethostbyaddr_r() takes 5 args */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* gethostbyaddr_r() takes 7 args */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* gethostbyaddr_r() takes 8 args */
-#undef HAVE_GETHOSTBYADDR_R_8
-
 /* Define to 1 if you have the gethostbyname function. */
 #undef HAVE_GETHOSTBYNAME
 
@@ -292,9 +274,6 @@
 /* Define to 1 if you have the `getrlimit' function. */
 #undef HAVE_GETRLIMIT
 
-/* Define to 1 if you have the getservbyport_r function. */
-#undef HAVE_GETSERVBYPORT_R
-
 /* Define to 1 if you have the getsockname function. */
 #undef HAVE_GETSOCKNAME
 
@@ -331,6 +310,9 @@
 /* if you have MIT Kerberos */
 #undef HAVE_GSSMIT
 
+/* Define to 1 if you have the <hyper.h> header file. */
+#undef HAVE_HYPER_H
+
 /* Define to 1 if you have the <idn2.h> header file. */
 #undef HAVE_IDN2_H
 
@@ -340,15 +322,6 @@
 /* Define to 1 if you have the `if_nametoindex' function. */
 #undef HAVE_IF_NAMETOINDEX
 
-/* Define to 1 if you have the inet_ntoa_r function. */
-#undef HAVE_INET_NTOA_R
-
-/* inet_ntoa_r() takes 2 args */
-#undef HAVE_INET_NTOA_R_2
-
-/* inet_ntoa_r() takes 3 args */
-#undef HAVE_INET_NTOA_R_3
-
 /* Define to 1 if you have a IPv6 capable working inet_ntop function. */
 #undef HAVE_INET_NTOP
 
@@ -600,9 +573,6 @@
 /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
 #undef HAVE_SETSOCKOPT_SO_NONBLOCK
 
-/* Define to 1 if you have the <sgtty.h> header file. */
-#undef HAVE_SGTTY_H
-
 /* Define to 1 if you have the sigaction function. */
 #undef HAVE_SIGACTION
 
@@ -675,9 +645,6 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define to 1 if you have the strncasecmp function. */
-#undef HAVE_STRNCASECMP
-
 /* Define to 1 if you have the strncmpi function. */
 #undef HAVE_STRNCMPI
 
@@ -759,9 +726,6 @@
 /* Define to 1 if you have the <termio.h> header file. */
 #undef HAVE_TERMIO_H
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define this if time_t is unsigned */
 #undef HAVE_TIME_T_UNSIGNED
 
@@ -789,6 +753,9 @@
 /* Define to 1 if you have the winber.h header file. */
 #undef HAVE_WINBER_H
 
+/* Define to 1 if you have the wincrypt.h header file. */
+#undef HAVE_WINCRYPT_H
+
 /* Define to 1 if you have the windows.h header file. */
 #undef HAVE_WINDOWS_H
 
@@ -804,9 +771,6 @@
 /* Define to 1 if you have the <wolfssh/ssh.h> header file. */
 #undef HAVE_WOLFSSH_SSH_H
 
-/* Define to 1 if you have the `wolfSSLv3_client_method' function. */
-#undef HAVE_WOLFSSLV3_CLIENT_METHOD
-
 /* if you have wolfSSL_DES_ecb_encrypt */
 #undef HAVE_WOLFSSL_DES_ECB_ENCRYPT
 
@@ -903,9 +867,6 @@
 /* Define to the function return type for recv. */
 #undef RECV_TYPE_RETV
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
 /* Define to the type qualifier of arg 5 for select. */
 #undef SELECT_QUAL_ARG5
 
@@ -969,12 +930,6 @@
 /* Define to the type of arg 3 for strerror_r. */
 #undef STRERROR_R_TYPE_ARG3
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* to enable alt-svc */
-#undef USE_ALTSVC
-
 /* if AmiSSL is in use */
 #undef USE_AMISSL
 
@@ -990,8 +945,11 @@
 /* if GnuTLS is enabled */
 #undef USE_GNUTLS
 
-/* if GnuTLS uses nettle as crypto backend */
-#undef USE_GNUTLS_NETTLE
+/* GSASL support enabled */
+#undef USE_GSASL
+
+/* if hyper is in use */
+#undef USE_HYPER
 
 /* PSL support enabled */
 #undef USE_LIBPSL
@@ -1014,9 +972,6 @@
 /* if MesaLink is enabled */
 #undef USE_MESALINK
 
-/* Define to enable metalink support */
-#undef USE_METALINK
-
 /* if nghttp2 is in use */
 #undef USE_NGHTTP2
 
@@ -1044,6 +999,9 @@
 /* if quiche is in use */
 #undef USE_QUICHE
 
+/* if rustls is enabled */
+#undef USE_RUSTLS
+
 /* to enable Windows native SSL/TLS support */
 #undef USE_SCHANNEL
 
@@ -1062,6 +1020,10 @@
 /* Use Unix domain sockets */
 #undef USE_UNIX_SOCKETS
 
+/* Define to 1 if you are building a Windows target with crypto API support.
+   */
+#undef USE_WIN32_CRYPTO
+
 /* Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz). */
 #undef USE_WIN32_IDN
 
diff --git a/lib/curl_ctype.c b/lib/curl_ctype.c
index 1a47fb5..d6cd08a 100644
--- a/lib/curl_ctype.c
+++ b/lib/curl_ctype.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_ctype.h b/lib/curl_ctype.h
index 6e94bb1..17dfaa0 100644
--- a/lib/curl_ctype.h
+++ b/lib/curl_ctype.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_des.c b/lib/curl_des.c
index 39c0f35..8c5af19 100644
--- a/lib/curl_des.c
+++ b/lib/curl_des.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2015 - 2019, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2015 - 2020, Steve Holme, <steve_holme@hotmail.com>.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_des.h b/lib/curl_des.h
index a42eeb5..438706a 100644
--- a/lib/curl_des.h
+++ b/lib/curl_des.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2015 - 2019, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2015 - 2020, Steve Holme, <steve_holme@hotmail.com>.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_endian.c b/lib/curl_endian.c
index a774d13..ecde74b 100644
--- a/lib/curl_endian.c
+++ b/lib/curl_endian.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -80,45 +80,3 @@
   return (unsigned short)(((unsigned short)buf[0] << 8) |
                           ((unsigned short)buf[1]));
 }
-
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
-/*
- * write32_le()
- *
- * This function converts a 32-bit integer from the native endian format,
- * to little endian format ready for sending down the wire.
- *
- * Parameters:
- *
- * value    [in]     - The 32-bit integer value.
- * buffer   [in]     - A pointer to the output buffer.
- */
-static void write32_le(const int value, unsigned char *buffer)
-{
-  buffer[0] = (char)(value & 0x000000FF);
-  buffer[1] = (char)((value & 0x0000FF00) >> 8);
-  buffer[2] = (char)((value & 0x00FF0000) >> 16);
-  buffer[3] = (char)((value & 0xFF000000) >> 24);
-}
-
-/*
- * Curl_write64_le()
- *
- * This function converts a 64-bit integer from the native endian format,
- * to little endian format ready for sending down the wire.
- *
- * Parameters:
- *
- * value    [in]     - The 64-bit integer value.
- * buffer   [in]     - A pointer to the output buffer.
- */
-#if defined(HAVE_LONGLONG)
-void Curl_write64_le(const long long value, unsigned char *buffer)
-#else
-void Curl_write64_le(const __int64 value, unsigned char *buffer)
-#endif
-{
-  write32_le((int)value, buffer);
-  write32_le((int)(value >> 32), buffer + 4);
-}
-#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */
diff --git a/lib/curl_endian.h b/lib/curl_endian.h
index 9830e58..4e12d7d 100644
--- a/lib/curl_endian.h
+++ b/lib/curl_endian.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,7 @@
 /* Converts a 16-bit integer from big endian */
 unsigned short Curl_read16_be(const unsigned char *buf);
 
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
+#if (SIZEOF_CURL_OFF_T > 4)
 /* Converts a 64-bit integer to little endian */
 #if defined(HAVE_LONGLONG)
 void Curl_write64_le(const long long value, unsigned char *buffer);
diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c
index ab3e742..4bfa585 100644
--- a/lib/curl_fnmatch.c
+++ b/lib/curl_fnmatch.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_fnmatch.h b/lib/curl_fnmatch.h
index 34fccae..1c80ea7 100644
--- a/lib/curl_fnmatch.h
+++ b/lib/curl_fnmatch.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_get_line.c b/lib/curl_get_line.c
index 3c77be9..8f3b0bd 100644
--- a/lib/curl_get_line.c
+++ b/lib/curl_get_line.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -22,7 +22,8 @@
 
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_COOKIES) && !defined(CURL_DISABLE_ALTSVC)
+#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) ||  \
+  !defined(CURL_DISABLE_HSTS)
 
 #include "curl_get_line.h"
 #include "curl_memory.h"
diff --git a/lib/curl_get_line.h b/lib/curl_get_line.h
index 532ab08..597aa09 100644
--- a/lib/curl_get_line.h
+++ b/lib/curl_get_line.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c
index 5f1c999..2d5ff61 100644
--- a/lib/curl_gethostname.c
+++ b/lib/curl_gethostname.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_gethostname.h b/lib/curl_gethostname.h
index 2d78bc5..2161c40 100644
--- a/lib/curl_gethostname.h
+++ b/lib/curl_gethostname.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c
index d854ab0..5810dad 100644
--- a/lib/curl_gssapi.c
+++ b/lib/curl_gssapi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2011 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2011 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -59,7 +59,7 @@
     req_flags |= GSS_C_DELEG_POLICY_FLAG;
 #else
     infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not "
-        "compiled in\n");
+        "compiled in");
 #endif
   }
 
@@ -102,7 +102,7 @@
                        (char *)status_string.value);
     }
     gss_release_buffer(&min_stat, &status_string);
-  } while(!GSS_ERROR(maj_stat) && msg_ctx != 0);
+  } while(!GSS_ERROR(maj_stat) && msg_ctx);
 
   return len;
 }
@@ -130,7 +130,11 @@
 
   display_gss_error(minor, GSS_C_MECH_CODE, buf, len);
 
-  infof(data, "%s%s\n", prefix, buf);
+  infof(data, "%s%s", prefix, buf);
+#ifdef CURL_DISABLE_VERBOSE_STRINGS
+  (void)data;
+  (void)prefix;
+#endif
 }
 
 #endif /* HAVE_GSSAPI */
diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h
index 88f68db..466d09e 100644
--- a/lib/curl_gssapi.h
+++ b/lib/curl_gssapi.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2011 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2011 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_hmac.h b/lib/curl_hmac.h
index 9b70c84..84c7312 100644
--- a/lib/curl_hmac.h
+++ b/lib/curl_hmac.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_krb5.h b/lib/curl_krb5.h
index ae9b7e0..ca06840 100644
--- a/lib/curl_krb5.h
+++ b/lib/curl_krb5.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -26,10 +26,9 @@
   const char *name;
   size_t size;
   int (*init)(void *);
-  int (*auth)(void *, struct connectdata *);
+  int (*auth)(void *, struct Curl_easy *data, struct connectdata *);
   void (*end)(void *);
   int (*check_prot)(void *, int);
-  int (*overhead)(void *, int, int);
   int (*encode)(void *, const void *, int, int, void **);
   int (*decode)(void *, void *, int, int, struct connectdata *);
 };
@@ -39,10 +38,10 @@
 #define AUTH_ERROR      2
 
 #ifdef HAVE_GSSAPI
-int Curl_sec_read_msg(struct connectdata *conn, char *,
+int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn, char *,
                       enum protection_level);
 void Curl_sec_end(struct connectdata *);
-CURLcode Curl_sec_login(struct connectdata *);
+CURLcode Curl_sec_login(struct Curl_easy *, struct connectdata *);
 int Curl_sec_request_prot(struct connectdata *conn, const char *level);
 #else
 #define Curl_sec_end(x)
diff --git a/lib/curl_ldap.h b/lib/curl_ldap.h
index 912e131..124e18b 100644
--- a/lib/curl_ldap.h
+++ b/lib/curl_ldap.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_md4.h b/lib/curl_md4.h
index c7bb209..f9dafcb 100644
--- a/lib/curl_md4.h
+++ b/lib/curl_md4.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_md5.h b/lib/curl_md5.h
index e06c68e..5739c89 100644
--- a/lib/curl_md5.h
+++ b/lib/curl_md5.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_memory.h b/lib/curl_memory.h
index ce38a08..5806290 100644
--- a/lib/curl_memory.h
+++ b/lib/curl_memory.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_memrchr.c b/lib/curl_memrchr.c
index eeb3044..0bd845f 100644
--- a/lib/curl_memrchr.c
+++ b/lib/curl_memrchr.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_memrchr.h b/lib/curl_memrchr.h
index 90a8a07..c8394bb 100644
--- a/lib/curl_memrchr.h
+++ b/lib/curl_memrchr.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c
index 2c8925b..e9d2a8c 100644
--- a/lib/curl_multibyte.c
+++ b/lib/curl_multibyte.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -21,7 +21,11 @@
  ***************************************************************************/
 
 /*
- * This file is 'mem-include-scan' clean. See test 1132.
+ * This file is 'mem-include-scan' clean, which means memdebug.h and
+ * curl_memory.h are purposely not included in this file. See test 1132.
+ *
+ * The functions in this file are curlx functions which are not tracked by the
+ * curl memory tracker memdebug.
  */
 
 #include "curl_setup.h"
@@ -82,6 +86,34 @@
 
 #if defined(USE_WIN32_LARGE_FILES) || defined(USE_WIN32_SMALL_FILES)
 
+int curlx_win32_open(const char *filename, int oflag, ...)
+{
+  int pmode = 0;
+
+#ifdef _UNICODE
+  int result = -1;
+  wchar_t *filename_w = curlx_convert_UTF8_to_wchar(filename);
+#endif
+
+  va_list param;
+  va_start(param, oflag);
+  if(oflag & O_CREAT)
+    pmode = va_arg(param, int);
+  va_end(param);
+
+#ifdef _UNICODE
+  if(filename_w) {
+    result = _wopen(filename_w, oflag, pmode);
+    free(filename_w);
+  }
+  else
+    errno = EINVAL;
+  return result;
+#else
+  return (_open)(filename, oflag, pmode);
+#endif
+}
+
 FILE *curlx_win32_fopen(const char *filename, const char *mode)
 {
 #ifdef _UNICODE
@@ -90,64 +122,56 @@
   wchar_t *mode_w = curlx_convert_UTF8_to_wchar(mode);
   if(filename_w && mode_w)
     result = _wfopen(filename_w, mode_w);
+  else
+    errno = EINVAL;
   free(filename_w);
   free(mode_w);
-  if(result)
-    return result;
-#endif
-
+  return result;
+#else
   return (fopen)(filename, mode);
+#endif
 }
 
 int curlx_win32_stat(const char *path, struct_stat *buffer)
 {
+#ifdef _UNICODE
   int result = -1;
-#ifdef _UNICODE
   wchar_t *path_w = curlx_convert_UTF8_to_wchar(path);
-#endif /* _UNICODE */
-
+  if(path_w) {
 #if defined(USE_WIN32_SMALL_FILES)
-#if defined(_UNICODE)
-  if(path_w)
     result = _wstat(path_w, buffer);
-  else
-#endif /* _UNICODE */
-    result = _stat(path, buffer);
-#else /* USE_WIN32_SMALL_FILES */
-#if defined(_UNICODE)
-  if(path_w)
+#else
     result = _wstati64(path_w, buffer);
-  else
-#endif /* _UNICODE */
-    result = _stati64(path, buffer);
-#endif /* USE_WIN32_SMALL_FILES */
-
-#ifdef _UNICODE
-  free(path_w);
 #endif
-
+    free(path_w);
+  }
+  else
+    errno = EINVAL;
   return result;
+#else
+#if defined(USE_WIN32_SMALL_FILES)
+  return _stat(path, buffer);
+#else
+  return _stati64(path, buffer);
+#endif
+#endif
 }
 
 int curlx_win32_access(const char *path, int mode)
 {
-    int result = -1;
-#ifdef _UNICODE
-    wchar_t *path_w = curlx_convert_UTF8_to_wchar(path);
-#endif /* _UNICODE */
-
 #if defined(_UNICODE)
-    if(path_w)
-        result = _waccess(path_w, mode);
-    else
-#endif /* _UNICODE */
-        result = _access(path, mode);
-
-#ifdef _UNICODE
+  int result = -1;
+  wchar_t *path_w = curlx_convert_UTF8_to_wchar(path);
+  if(path_w) {
+    result = _waccess(path_w, mode);
     free(path_w);
+  }
+  else
+    errno = EINVAL;
+  return result;
+#else
+  return _access(path, mode);
 #endif
-
-    return result;
 }
 
 #endif /* USE_WIN32_LARGE_FILES || USE_WIN32_SMALL_FILES */
diff --git a/lib/curl_multibyte.h b/lib/curl_multibyte.h
index 5f8c05a..491155e 100644
--- a/lib/curl_multibyte.h
+++ b/lib/curl_multibyte.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,6 @@
 
 wchar_t *curlx_convert_UTF8_to_wchar(const char *str_utf8);
 char *curlx_convert_wchar_to_UTF8(const wchar_t *str_w);
-
 #endif /* WIN32 */
 
 /*
@@ -40,29 +39,23 @@
  * preprocessor conditional directives needed by code using these
  * to differentiate UNICODE from non-UNICODE builds.
  *
- * When building with UNICODE defined, these two macros
- * curlx_convert_UTF8_to_tchar() and curlx_convert_tchar_to_UTF8()
- * return a pointer to a newly allocated memory area holding result.
- * When the result is no longer needed, allocated memory is intended
- * to be free'ed with curlx_unicodefree().
+ * In the case of a non-UNICODE build the tchar strings are char strings that
+ * are duplicated via strdup and remain in whatever the passed in encoding is,
+ * which is assumed to be UTF-8 but may be other encoding. Therefore the
+ * significance of the conversion functions is primarily for UNICODE builds.
  *
- * When building without UNICODE defined, this macros
- * curlx_convert_UTF8_to_tchar() and curlx_convert_tchar_to_UTF8()
- * return the pointer received as argument. curlx_unicodefree() does
- * no actual free'ing of this pointer it is simply set to NULL.
+ * Allocated memory should be free'd with curlx_unicodefree().
+ *
+ * Note: Because these are curlx functions their memory usage is not tracked
+ * by the curl memory tracker memdebug. You'll notice that curlx function-like
+ * macros call free and strdup in parentheses, eg (strdup)(ptr), and that's to
+ * ensure that the curl memdebug override macros do not replace them.
  */
 
 #if defined(UNICODE) && defined(WIN32)
 
 #define curlx_convert_UTF8_to_tchar(ptr) curlx_convert_UTF8_to_wchar((ptr))
 #define curlx_convert_tchar_to_UTF8(ptr) curlx_convert_wchar_to_UTF8((ptr))
-#define curlx_unicodefree(ptr)                          \
-  do {                                                  \
-    if(ptr) {                                           \
-      (free)(ptr);                                        \
-      (ptr) = NULL;                                     \
-    }                                                   \
-  } while(0)
 
 typedef union {
   unsigned short       *tchar_ptr;
@@ -73,10 +66,8 @@
 
 #else
 
-#define curlx_convert_UTF8_to_tchar(ptr) (ptr)
-#define curlx_convert_tchar_to_UTF8(ptr) (ptr)
-#define curlx_unicodefree(ptr) \
-  do {(ptr) = NULL;} while(0)
+#define curlx_convert_UTF8_to_tchar(ptr) (strdup)(ptr)
+#define curlx_convert_tchar_to_UTF8(ptr) (strdup)(ptr)
 
 typedef union {
   char                *tchar_ptr;
@@ -87,4 +78,12 @@
 
 #endif /* UNICODE && WIN32 */
 
+#define curlx_unicodefree(ptr)                          \
+  do {                                                  \
+    if(ptr) {                                           \
+      (free)(ptr);                                      \
+      (ptr) = NULL;                                     \
+    }                                                   \
+  } while(0)
+
 #endif /* HEADER_CURL_MULTIBYTE_H */
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index defae77..749b44e 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -34,13 +34,12 @@
 /* Please keep the SSL backend-specific #if branches in this order:
 
    1. USE_OPENSSL
-   2. USE_GNUTLS_NETTLE
-   3. USE_GNUTLS
-   4. USE_NSS
-   5. USE_MBEDTLS
-   6. USE_SECTRANSP
-   7. USE_OS400CRYPTO
-   8. USE_WIN32_CRYPTO
+   2. USE_GNUTLS
+   3. USE_NSS
+   4. USE_MBEDTLS
+   5. USE_SECTRANSP
+   6. USE_OS400CRYPTO
+   7. USE_WIN32_CRYPTO
 
    This ensures that:
    - the same SSL branch gets activated throughout this source
@@ -74,13 +73,9 @@
 #    define DESKEY(x) &x
 #  endif
 
-#elif defined(USE_GNUTLS_NETTLE)
-
-#  include <nettle/des.h>
-
 #elif defined(USE_GNUTLS)
 
-#  include <gcrypt.h>
+#  include <nettle/des.h>
 
 #elif defined(USE_NSS)
 
@@ -91,7 +86,6 @@
 #elif defined(USE_MBEDTLS)
 
 #  include <mbedtls/des.h>
-#  include "curl_md4.h"
 
 #elif defined(USE_SECTRANSP)
 
@@ -159,7 +153,7 @@
   DES_set_key(&key, ks);
 }
 
-#elif defined(USE_GNUTLS_NETTLE)
+#elif defined(USE_GNUTLS)
 
 static void setup_des_key(const unsigned char *key_56,
                           struct des_ctx *des)
@@ -176,26 +170,6 @@
   des_set_key(des, (const uint8_t *) key);
 }
 
-#elif defined(USE_GNUTLS)
-
-/*
- * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
- */
-static void setup_des_key(const unsigned char *key_56,
-                          gcry_cipher_hd_t *des)
-{
-  char key[8];
-
-  /* Expand the 56-bit key to 64-bits */
-  extend_key_56_to_64(key_56, key);
-
-  /* Set the key parity to odd */
-  Curl_des_set_odd_parity((unsigned char *) key, sizeof(key));
-
-  /* Set the key */
-  gcry_cipher_setkey(*des, key, sizeof(key));
-}
-
 #elif defined(USE_NSS)
 
 /*
@@ -402,7 +376,7 @@
   setup_des_key(keys + 14, DESKEY(ks));
   DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 16),
                   DESKEY(ks), DES_ENCRYPT);
-#elif defined(USE_GNUTLS_NETTLE)
+#elif defined(USE_GNUTLS)
   struct des_ctx des;
   setup_des_key(keys, &des);
   des_encrypt(&des, 8, results, plaintext);
@@ -410,23 +384,6 @@
   des_encrypt(&des, 8, results + 8, plaintext);
   setup_des_key(keys + 14, &des);
   des_encrypt(&des, 8, results + 16, plaintext);
-#elif defined(USE_GNUTLS)
-  gcry_cipher_hd_t des;
-
-  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-  setup_des_key(keys, &des);
-  gcry_cipher_encrypt(des, results, 8, plaintext, 8);
-  gcry_cipher_close(des);
-
-  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-  setup_des_key(keys + 7, &des);
-  gcry_cipher_encrypt(des, results + 8, 8, plaintext, 8);
-  gcry_cipher_close(des);
-
-  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-  setup_des_key(keys + 14, &des);
-  gcry_cipher_encrypt(des, results + 16, 8, plaintext, 8);
-  gcry_cipher_close(des);
 #elif defined(USE_NSS) || defined(USE_MBEDTLS) || defined(USE_SECTRANSP) \
   || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO)
   encrypt_des(plaintext, results, keys);
@@ -473,24 +430,12 @@
     setup_des_key(pw + 7, DESKEY(ks));
     DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer + 8),
                     DESKEY(ks), DES_ENCRYPT);
-#elif defined(USE_GNUTLS_NETTLE)
+#elif defined(USE_GNUTLS)
     struct des_ctx des;
     setup_des_key(pw, &des);
     des_encrypt(&des, 8, lmbuffer, magic);
     setup_des_key(pw + 7, &des);
     des_encrypt(&des, 8, lmbuffer + 8, magic);
-#elif defined(USE_GNUTLS)
-    gcry_cipher_hd_t des;
-
-    gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-    setup_des_key(pw, &des);
-    gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8);
-    gcry_cipher_close(des);
-
-    gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-    setup_des_key(pw + 7, &des);
-    gcry_cipher_encrypt(des, lmbuffer + 8, 8, magic, 8);
-    gcry_cipher_close(des);
 #elif defined(USE_NSS) || defined(USE_MBEDTLS) || defined(USE_SECTRANSP) \
   || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO)
     encrypt_des(magic, lmbuffer, pw);
@@ -552,21 +497,68 @@
    * network encoding not the host encoding.
    */
   result = Curl_convert_to_network(data, (char *)pw, len * 2);
-  if(result)
-    return result;
-
-  /* Create NT hashed password. */
-  Curl_md4it(ntbuffer, pw, 2 * len);
-
-  memset(ntbuffer + 16, 0, 21 - 16);
-
+  if(!result) {
+    /* Create NT hashed password. */
+    Curl_md4it(ntbuffer, pw, 2 * len);
+    memset(ntbuffer + 16, 0, 21 - 16);
+  }
   free(pw);
 
-  return CURLE_OK;
+  return result;
 }
 
 #if defined(USE_NTLM_V2) && !defined(USE_WINDOWS_SSPI)
 
+/* Timestamp in tenths of a microsecond since January 1, 1601 00:00:00 UTC. */
+struct ms_filetime {
+  unsigned int dwLowDateTime;
+  unsigned int dwHighDateTime;
+};
+
+/* Convert a time_t to an MS FILETIME (MS-DTYP section 2.3.3). */
+static void time2filetime(struct ms_filetime *ft, time_t t)
+{
+#if SIZEOF_TIME_T > 4
+  t = (t + CURL_OFF_T_C(11644473600)) * 10000000;
+  ft->dwLowDateTime = (unsigned int) (t & 0xFFFFFFFF);
+  ft->dwHighDateTime = (unsigned int) (t >> 32);
+#else
+  unsigned int r, s;
+  unsigned int i;
+
+  ft->dwLowDateTime = t & 0xFFFFFFFF;
+  ft->dwHighDateTime = 0;
+
+# ifndef HAVE_TIME_T_UNSIGNED
+  /* Extend sign if needed. */
+  if(ft->dwLowDateTime & 0x80000000)
+    ft->dwHighDateTime = ~0;
+# endif
+
+  /* Bias seconds to Jan 1, 1601.
+     134774 days = 11644473600 seconds = 0x2B6109100 */
+  r = ft->dwLowDateTime;
+  ft->dwLowDateTime = (ft->dwLowDateTime + 0xB6109100U) & 0xFFFFFFFF;
+  ft->dwHighDateTime += ft->dwLowDateTime < r? 0x03: 0x02;
+
+  /* Convert to tenths of microseconds. */
+  ft->dwHighDateTime *= 10000000;
+  i = 32;
+  do {
+    i -= 8;
+    s = ((ft->dwLowDateTime >> i) & 0xFF) * (10000000 - 1);
+    r = (s << i) & 0xFFFFFFFF;
+    s >>= 1;   /* Split shift to avoid width overflow. */
+    s >>= 31 - i;
+    ft->dwLowDateTime = (ft->dwLowDateTime + r) & 0xFFFFFFFF;
+    if(ft->dwLowDateTime < r)
+      s++;
+    ft->dwHighDateTime += s;
+  } while(i);
+  ft->dwHighDateTime &= 0xFFFFFFFF;
+#endif
+}
+
 /* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode
  * (uppercase UserName + Domain) as the data
  */
@@ -580,15 +572,11 @@
   unsigned char *identity;
   CURLcode result = CURLE_OK;
 
-  /* we do the length checks below separately to avoid integer overflow risk
-     on extreme data lengths */
-  if((userlen > SIZE_T_MAX/2) ||
-     (domlen > SIZE_T_MAX/2) ||
-     ((userlen + domlen) > SIZE_T_MAX/2))
+  if((userlen > CURL_MAX_INPUT_LENGTH) || (domlen > CURL_MAX_INPUT_LENGTH))
     return CURLE_OUT_OF_MEMORY;
 
   identity_len = (userlen + domlen) * 2;
-  identity = malloc(identity_len);
+  identity = malloc(identity_len + 1);
 
   if(!identity)
     return CURLE_OUT_OF_MEMORY;
@@ -644,22 +632,18 @@
   unsigned int len = 0;
   unsigned char *ptr = NULL;
   unsigned char hmac_output[HMAC_MD5_LENGTH];
-  curl_off_t tw;
+  struct ms_filetime tw;
 
   CURLcode result = CURLE_OK;
 
-#if CURL_SIZEOF_CURL_OFF_T < 8
-#error "this section needs 64bit support to work"
-#endif
-
   /* Calculate the timestamp */
 #ifdef DEBUGBUILD
   char *force_timestamp = getenv("CURL_FORCETIME");
   if(force_timestamp)
-    tw = CURL_OFF_T_C(11644473600) * 10000000;
+    time2filetime(&tw, (time_t) 0);
   else
 #endif
-    tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000;
+    time2filetime(&tw, time(NULL));
 
   /* Calculate the response len */
   len = HMAC_MD5_LENGTH + NTLMv2_BLOB_LEN;
@@ -671,13 +655,14 @@
 
   /* Create the BLOB structure */
   msnprintf((char *)ptr + HMAC_MD5_LENGTH, NTLMv2_BLOB_LEN,
-            "%c%c%c%c"   /* NTLMv2_BLOB_SIGNATURE */
-            "%c%c%c%c",  /* Reserved = 0 */
+            "%c%c%c%c"           /* NTLMv2_BLOB_SIGNATURE */
+            "%c%c%c%c"           /* Reserved = 0 */
+            "%c%c%c%c%c%c%c%c",  /* Timestamp */
             NTLMv2_BLOB_SIGNATURE[0], NTLMv2_BLOB_SIGNATURE[1],
             NTLMv2_BLOB_SIGNATURE[2], NTLMv2_BLOB_SIGNATURE[3],
-            0, 0, 0, 0);
+            0, 0, 0, 0,
+            LONGQUARTET(tw.dwLowDateTime), LONGQUARTET(tw.dwHighDateTime));
 
-  Curl_write64_le(tw, ptr + 24);
   memcpy(ptr + 32, challenge_client, 8);
   memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len);
 
diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
index 6d391c4..02b39d4 100644
--- a/lib/curl_ntlm_core.h
+++ b/lib/curl_ntlm_core.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,6 @@
    then it must be initialized to be used by NTLM. */
 #if !defined(USE_OPENSSL) && \
     !defined(USE_WOLFSSL) && \
-    !defined(USE_GNUTLS_NETTLE) && \
     !defined(USE_GNUTLS) && \
     defined(USE_NSS)
 #define NTLM_NEEDS_NSS_INIT
@@ -48,19 +47,22 @@
 #define USE_NTRESPONSES
 
 /* Define USE_NTLM2SESSION in order to make the type-3 message include the
-   NTLM2Session response message, requires USE_NTRESPONSES defined to 1 and
-   MD5 support */
-#if defined(USE_NTRESPONSES) && !defined(CURL_DISABLE_CRYPTO_AUTH)
+   NTLM2Session response message, requires USE_NTRESPONSES defined to 1 */
+#if defined(USE_NTRESPONSES)
 #define USE_NTLM2SESSION
 #endif
 
 /* Define USE_NTLM_V2 in order to allow the type-3 message to include the
-   LMv2 and NTLMv2 response messages, requires USE_NTRESPONSES defined to 1
-   and support for 64-bit integers. */
-#if defined(USE_NTRESPONSES) && (CURL_SIZEOF_CURL_OFF_T > 4)
+   LMv2 and NTLMv2 response messages, requires USE_NTRESPONSES defined to 1 */
+#if defined(USE_NTRESPONSES)
 #define USE_NTLM_V2
 #endif
 
+/* Helpers to generate function byte arguments in little endian order */
+#define SHORTPAIR(x) ((int)((x) & 0xff)), ((int)(((x) >> 8) & 0xff))
+#define LONGQUARTET(x) ((int)((x) & 0xff)), ((int)(((x) >> 8) & 0xff)), \
+  ((int)(((x) >> 16) & 0xff)), ((int)(((x) >> 24) & 0xff))
+
 void Curl_ntlm_core_lm_resp(const unsigned char *keys,
                             const unsigned char *plaintext,
                             unsigned char *results);
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index 17a92f8..ca9e287 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -329,13 +329,16 @@
   return CURLE_REMOTE_ACCESS_DENIED;
 }
 
-CURLcode Curl_input_ntlm_wb(struct connectdata *conn,
+CURLcode Curl_input_ntlm_wb(struct Curl_easy *data,
+                            struct connectdata *conn,
                             bool proxy,
                             const char *header)
 {
   struct ntlmdata *ntlm = proxy ? &conn->proxyntlm : &conn->ntlm;
   curlntlm *state = proxy ? &conn->proxy_ntlm_state : &conn->http_ntlm_state;
 
+  (void) data;  /* In case it gets unused by nop log macros. */
+
   if(!checkprefix("NTLM", header))
     return CURLE_BAD_CONTENT_ENCODING;
 
@@ -352,17 +355,17 @@
   }
   else {
     if(*state == NTLMSTATE_LAST) {
-      infof(conn->data, "NTLM auth restarted\n");
+      infof(data, "NTLM auth restarted");
       Curl_http_auth_cleanup_ntlm_wb(conn);
     }
     else if(*state == NTLMSTATE_TYPE3) {
-      infof(conn->data, "NTLM handshake rejected\n");
+      infof(data, "NTLM handshake rejected");
       Curl_http_auth_cleanup_ntlm_wb(conn);
       *state = NTLMSTATE_NONE;
       return CURLE_REMOTE_ACCESS_DENIED;
     }
     else if(*state >= NTLMSTATE_TYPE1) {
-      infof(conn->data, "NTLM handshake failure (internal error)\n");
+      infof(data, "NTLM handshake failure (internal error)");
       return CURLE_REMOTE_ACCESS_DENIED;
     }
 
@@ -376,7 +379,8 @@
  * This is for creating ntlm header output by delegating challenge/response
  * to Samba's winbind daemon helper ntlm_auth.
  */
-CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy)
+CURLcode Curl_output_ntlm_wb(struct Curl_easy *data, struct connectdata *conn,
+                             bool proxy)
 {
   /* point to the address of the pointer that holds the string to send to the
      server, which is for a plain host or for a HTTP proxy */
@@ -386,12 +390,11 @@
   struct ntlmdata *ntlm;
   curlntlm *state;
   struct auth *authp;
-  struct Curl_easy *data = conn->data;
 
   CURLcode res = CURLE_OK;
 
   DEBUGASSERT(conn);
-  DEBUGASSERT(conn->data);
+  DEBUGASSERT(data);
 
   if(proxy) {
 #ifndef CURL_DISABLE_PROXY
@@ -399,7 +402,7 @@
     userp = conn->http_proxy.user;
     ntlm = &conn->proxyntlm;
     state = &conn->proxy_ntlm_state;
-    authp = &conn->data->state.authproxy;
+    authp = &data->state.authproxy;
 #else
     return CURLE_NOT_BUILT_IN;
 #endif
@@ -409,7 +412,7 @@
     userp = conn->user;
     ntlm = &conn->ntlm;
     state = &conn->http_ntlm_state;
-    authp = &conn->data->state.authhost;
+    authp = &data->state.authhost;
   }
   authp->done = FALSE;
 
@@ -433,10 +436,10 @@
      * request handling process.
      */
     /* Create communication with ntlm_auth */
-    res = ntlm_wb_init(conn->data, ntlm, userp);
+    res = ntlm_wb_init(data, ntlm, userp);
     if(res)
       return res;
-    res = ntlm_wb_response(conn->data, ntlm, "YR\n", *state);
+    res = ntlm_wb_response(data, ntlm, "YR\n", *state);
     if(res)
       return res;
 
@@ -454,7 +457,7 @@
     char *input = aprintf("TT %s\n", ntlm->challenge);
     if(!input)
       return CURLE_OUT_OF_MEMORY;
-    res = ntlm_wb_response(conn->data, ntlm, input, *state);
+    res = ntlm_wb_response(data, ntlm, input, *state);
     free(input);
     if(res)
       return res;
diff --git a/lib/curl_ntlm_wb.h b/lib/curl_ntlm_wb.h
index 3cf841c..961b568 100644
--- a/lib/curl_ntlm_wb.h
+++ b/lib/curl_ntlm_wb.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -28,11 +28,13 @@
     defined(NTLM_WB_ENABLED)
 
 /* this is for ntlm header input */
-CURLcode Curl_input_ntlm_wb(struct connectdata *conn, bool proxy,
+CURLcode Curl_input_ntlm_wb(struct Curl_easy *data,
+                            struct connectdata *conn, bool proxy,
                             const char *header);
 
 /* this is for creating ntlm header output */
-CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy);
+CURLcode Curl_output_ntlm_wb(struct Curl_easy *data, struct connectdata *conn,
+                             bool proxy);
 
 void Curl_http_auth_cleanup_ntlm_wb(struct connectdata *conn);
 
diff --git a/lib/curl_path.c b/lib/curl_path.c
index 7b3fb27..6510618 100644
--- a/lib/curl_path.c
+++ b/lib/curl_path.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,12 +31,11 @@
 #include "memdebug.h"
 
 /* figure out the path to work with in this particular request */
-CURLcode Curl_getworkingpath(struct connectdata *conn,
+CURLcode Curl_getworkingpath(struct Curl_easy *data,
                              char *homedir,  /* when SFTP is used */
                              char **path) /* returns the  allocated
                                              real path to work with */
 {
-  struct Curl_easy *data = conn->data;
   char *real_path = NULL;
   char *working_path;
   size_t working_path_len;
@@ -47,9 +46,9 @@
     return result;
 
   /* Check for /~/, indicating relative to the user's home directory */
-  if(conn->handler->protocol & CURLPROTO_SCP) {
+  if(data->conn->handler->protocol & CURLPROTO_SCP) {
     real_path = malloc(working_path_len + 1);
-    if(real_path == NULL) {
+    if(!real_path) {
       free(working_path);
       return CURLE_OUT_OF_MEMORY;
     }
@@ -59,11 +58,11 @@
     else
       memcpy(real_path, working_path, 1 + working_path_len);
   }
-  else if(conn->handler->protocol & CURLPROTO_SFTP) {
+  else if(data->conn->handler->protocol & CURLPROTO_SFTP) {
     if((working_path_len > 1) && (working_path[1] == '~')) {
       size_t homelen = strlen(homedir);
       real_path = malloc(homelen + working_path_len + 1);
-      if(real_path == NULL) {
+      if(!real_path) {
         free(working_path);
         return CURLE_OUT_OF_MEMORY;
       }
@@ -79,7 +78,7 @@
     }
     else {
       real_path = malloc(working_path_len + 1);
-      if(real_path == NULL) {
+      if(!real_path) {
         free(working_path);
         return CURLE_OUT_OF_MEMORY;
       }
@@ -131,7 +130,7 @@
   /* Allocate enough space for home directory and filename + separator */
   fullPathLength = strlen(cp) + strlen(homedir) + 2;
   *path = malloc(fullPathLength);
-  if(*path == NULL)
+  if(!*path)
     return CURLE_OUT_OF_MEMORY;
 
   /* Check for quoted filenames */
@@ -170,7 +169,7 @@
   else {
     /* Read to end of filename - either to whitespace or terminator */
     end = strpbrk(cp, WHITESPACE);
-    if(end == NULL)
+    if(!end)
       end = strchr(cp, '\0');
     /* return pointer to second parameter if it exists */
     *cpp = end + strspn(end, WHITESPACE);
diff --git a/lib/curl_path.h b/lib/curl_path.h
index 636c37f..a376bd1 100644
--- a/lib/curl_path.h
+++ b/lib/curl_path.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -39,7 +39,7 @@
                          have their definition hidden well */
 #endif
 
-CURLcode Curl_getworkingpath(struct connectdata *conn,
+CURLcode Curl_getworkingpath(struct Curl_easy *data,
                              char *homedir,
                              char **path);
 
diff --git a/lib/curl_printf.h b/lib/curl_printf.h
index 9d2de7b..9fa625f 100644
--- a/lib/curl_printf.h
+++ b/lib/curl_printf.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_range.c b/lib/curl_range.c
index aa3c493..24bdb30 100644
--- a/lib/curl_range.c
+++ b/lib/curl_range.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,12 +33,11 @@
   Check if this is a range download, and if so, set the internal variables
   properly.
  */
-CURLcode Curl_range(struct connectdata *conn)
+CURLcode Curl_range(struct Curl_easy *data)
 {
   curl_off_t from, to;
   char *ptr;
   char *ptr2;
-  struct Curl_easy *data = conn->data;
 
   if(data->state.use_range && data->state.range) {
     CURLofft from_t;
@@ -54,14 +53,14 @@
     if((to_t == CURL_OFFT_INVAL) && !from_t) {
       /* X - */
       data->state.resume_from = from;
-      DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n",
+      DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file",
                    from));
     }
     else if((from_t == CURL_OFFT_INVAL) && !to_t) {
       /* -Y */
       data->req.maxdownload = to;
       data->state.resume_from = -to;
-      DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n",
+      DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes",
                    to));
     }
     else {
@@ -79,12 +78,12 @@
       data->req.maxdownload = totalsize + 1; /* include last byte */
       data->state.resume_from = from;
       DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T
-                   " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n",
+                   " getting %" CURL_FORMAT_CURL_OFF_T " bytes",
                    from, data->req.maxdownload));
     }
     DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T
                  " to %" CURL_FORMAT_CURL_OFF_T ", totally %"
-                 CURL_FORMAT_CURL_OFF_T " bytes\n",
+                 CURL_FORMAT_CURL_OFF_T " bytes",
                  from, to, data->req.maxdownload));
   }
   else
diff --git a/lib/curl_range.h b/lib/curl_range.h
index 2350df9..0a07baf 100644
--- a/lib/curl_range.h
+++ b/lib/curl_range.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -25,6 +25,5 @@
 #include "curl_setup.h"
 #include "urldata.h"
 
-CURLcode Curl_range(struct connectdata *conn);
-
+CURLcode Curl_range(struct Curl_easy *data);
 #endif /* HEADER_CURL_RANGE_H */
diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c
index 32f1113..2fa0267 100644
--- a/lib/curl_rtmp.c
+++ b/lib/curl_rtmp.c
@@ -5,12 +5,12 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2010, Howard Chu, <hyc@highlandsun.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,11 +48,13 @@
 
 #define DEF_BUFTIME    (2*60*60*1000)    /* 2 hours */
 
-static CURLcode rtmp_setup_connection(struct connectdata *conn);
-static CURLcode rtmp_do(struct connectdata *conn, bool *done);
-static CURLcode rtmp_done(struct connectdata *conn, CURLcode, bool premature);
-static CURLcode rtmp_connect(struct connectdata *conn, bool *done);
-static CURLcode rtmp_disconnect(struct connectdata *conn, bool dead);
+static CURLcode rtmp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
+static CURLcode rtmp_do(struct Curl_easy *data, bool *done);
+static CURLcode rtmp_done(struct Curl_easy *data, CURLcode, bool premature);
+static CURLcode rtmp_connect(struct Curl_easy *data, bool *done);
+static CURLcode rtmp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead);
 
 static Curl_recv rtmp_recv;
 static Curl_send rtmp_send;
@@ -77,6 +79,7 @@
   rtmp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTMP,                            /* defport */
   CURLPROTO_RTMP,                       /* protocol */
   CURLPROTO_RTMP,                       /* family */
@@ -99,6 +102,7 @@
   rtmp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTMPT,                           /* defport */
   CURLPROTO_RTMPT,                      /* protocol */
   CURLPROTO_RTMPT,                      /* family */
@@ -121,6 +125,7 @@
   rtmp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTMP,                            /* defport */
   CURLPROTO_RTMPE,                      /* protocol */
   CURLPROTO_RTMPE,                      /* family */
@@ -143,6 +148,7 @@
   rtmp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTMPT,                           /* defport */
   CURLPROTO_RTMPTE,                     /* protocol */
   CURLPROTO_RTMPTE,                     /* family */
@@ -165,6 +171,7 @@
   rtmp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTMPS,                           /* defport */
   CURLPROTO_RTMPS,                      /* protocol */
   CURLPROTO_RTMP,                       /* family */
@@ -187,13 +194,15 @@
   rtmp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTMPS,                           /* defport */
   CURLPROTO_RTMPTS,                     /* protocol */
   CURLPROTO_RTMPT,                      /* family */
   PROTOPT_NONE                          /* flags*/
 };
 
-static CURLcode rtmp_setup_connection(struct connectdata *conn)
+static CURLcode rtmp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   RTMP *r = RTMP_Alloc();
   if(!r)
@@ -201,7 +210,7 @@
 
   RTMP_Init(r);
   RTMP_SetBufferMS(r, DEF_BUFTIME);
-  if(!RTMP_SetupURL(r, conn->data->change.url)) {
+  if(!RTMP_SetupURL(r, data->state.url)) {
     RTMP_Free(r);
     return CURLE_URL_MALFORMAT;
   }
@@ -209,8 +218,9 @@
   return CURLE_OK;
 }
 
-static CURLcode rtmp_connect(struct connectdata *conn, bool *done)
+static CURLcode rtmp_connect(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   RTMP *r = conn->proto.rtmp;
   SET_RCVTIMEO(tv, 10);
 
@@ -219,7 +229,7 @@
   /* We have to know if it's a write before we send the
    * connect request packet
    */
-  if(conn->data->set.upload)
+  if(data->set.upload)
     r->Link.protocol |= RTMP_FEATURE_WRITE;
 
   /* For plain streams, use the buffer toggle trick to keep data flowing */
@@ -243,15 +253,15 @@
   return CURLE_OK;
 }
 
-static CURLcode rtmp_do(struct connectdata *conn, bool *done)
+static CURLcode rtmp_do(struct Curl_easy *data, bool *done)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   RTMP *r = conn->proto.rtmp;
 
   if(!RTMP_ConnectStream(r, 0))
     return CURLE_FAILED_INIT;
 
-  if(conn->data->set.upload) {
+  if(data->set.upload) {
     Curl_pgrsSetUploadSize(data, data->state.infilesize);
     Curl_setup_transfer(data, -1, -1, FALSE, FIRSTSOCKET);
   }
@@ -261,20 +271,22 @@
   return CURLE_OK;
 }
 
-static CURLcode rtmp_done(struct connectdata *conn, CURLcode status,
+static CURLcode rtmp_done(struct Curl_easy *data, CURLcode status,
                           bool premature)
 {
-  (void)conn; /* unused */
+  (void)data; /* unused */
   (void)status; /* unused */
   (void)premature; /* unused */
 
   return CURLE_OK;
 }
 
-static CURLcode rtmp_disconnect(struct connectdata *conn,
+static CURLcode rtmp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 bool dead_connection)
 {
   RTMP *r = conn->proto.rtmp;
+  (void)data;
   (void)dead_connection;
   if(r) {
     conn->proto.rtmp = NULL;
@@ -284,9 +296,10 @@
   return CURLE_OK;
 }
 
-static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf,
+static ssize_t rtmp_recv(struct Curl_easy *data, int sockindex, char *buf,
                          size_t len, CURLcode *err)
 {
+  struct connectdata *conn = data->conn;
   RTMP *r = conn->proto.rtmp;
   ssize_t nread;
 
@@ -295,8 +308,8 @@
   nread = RTMP_Read(r, buf, curlx_uztosi(len));
   if(nread < 0) {
     if(r->m_read.status == RTMP_READ_COMPLETE ||
-        r->m_read.status == RTMP_READ_EOF) {
-      conn->data->req.size = conn->data->req.bytecount;
+       r->m_read.status == RTMP_READ_EOF) {
+      data->req.size = data->req.bytecount;
       nread = 0;
     }
     else
@@ -305,9 +318,10 @@
   return nread;
 }
 
-static ssize_t rtmp_send(struct connectdata *conn, int sockindex,
+static ssize_t rtmp_send(struct Curl_easy *data, int sockindex,
                          const void *buf, size_t len, CURLcode *err)
 {
+  struct connectdata *conn = data->conn;
   RTMP *r = conn->proto.rtmp;
   ssize_t num;
 
diff --git a/lib/curl_rtmp.h b/lib/curl_rtmp.h
index 86a0138..f45fa71 100644
--- a/lib/curl_rtmp.h
+++ b/lib/curl_rtmp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010 - 2019, Howard Chu, <hyc@highlandsun.com>
+ * Copyright (C) 2010 - 2020, Howard Chu, <hyc@highlandsun.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 83fe896..f5ac99a 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,6 +23,8 @@
  * RFC2831 DIGEST-MD5 authentication
  * RFC4422 Simple Authentication and Security Layer (SASL)
  * RFC4616 PLAIN authentication
+ * RFC5802 SCRAM-SHA-1 authentication
+ * RFC7677 SCRAM-SHA-256 authentication
  * RFC6749 OAuth 2.0 Authorization Framework
  * RFC7628 A Set of SASL Mechanisms for OAuth
  * Draft   LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
@@ -56,7 +58,7 @@
 static const struct {
   const char   *name;  /* Name */
   size_t        len;   /* Name length */
-  unsigned int  bit;   /* Flag bit */
+  unsigned short bit;   /* Flag bit */
 } mechtable[] = {
   { "LOGIN",        5,  SASL_MECH_LOGIN },
   { "PLAIN",        5,  SASL_MECH_PLAIN },
@@ -67,6 +69,8 @@
   { "NTLM",         4,  SASL_MECH_NTLM },
   { "XOAUTH2",      7,  SASL_MECH_XOAUTH2 },
   { "OAUTHBEARER",  11, SASL_MECH_OAUTHBEARER },
+  { "SCRAM-SHA-1",  11, SASL_MECH_SCRAM_SHA_1 },
+  { "SCRAM-SHA-256",13, SASL_MECH_SCRAM_SHA_256 },
   { ZERO_NULL,      0,  0 }
 };
 
@@ -90,6 +94,13 @@
   }
 #endif
 
+#if defined(USE_GSASL)
+  /* Cleanup the GSASL structure */
+  if(authused & (SASL_MECH_SCRAM_SHA_1 | SASL_MECH_SCRAM_SHA_256)) {
+    Curl_auth_gsasl_cleanup(&conn->gsasl);
+  }
+#endif
+
 #if defined(USE_NTLM)
   /* Cleanup the NTLM structure */
   if(authused == SASL_MECH_NTLM) {
@@ -117,7 +128,8 @@
  *
  * Returns the SASL mechanism token or 0 if no match.
  */
-unsigned int Curl_sasl_decode_mech(const char *ptr, size_t maxlen, size_t *len)
+unsigned short Curl_sasl_decode_mech(const char *ptr, size_t maxlen,
+                                     size_t *len)
 {
   unsigned int i;
   char c;
@@ -162,7 +174,7 @@
   if(!strncmp(value, "*", len))
     sasl->prefmech = SASL_AUTH_DEFAULT;
   else {
-    unsigned int mechbit = Curl_sasl_decode_mech(value, len, &mechlen);
+    unsigned short mechbit = Curl_sasl_decode_mech(value, len, &mechlen);
     if(mechbit && mechlen == len)
       sasl->prefmech |= mechbit;
     else
@@ -194,7 +206,7 @@
  *
  * This is the ONLY way to change SASL state!
  */
-static void state(struct SASL *sasl, struct connectdata *conn,
+static void state(struct SASL *sasl, struct Curl_easy *data,
                   saslstate newstate)
 {
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
@@ -215,21 +227,65 @@
     "GSSAPI_NO_DATA",
     "OAUTH2",
     "OAUTH2_RESP",
+    "GSASL",
     "CANCEL",
     "FINAL",
     /* LAST */
   };
 
   if(sasl->state != newstate)
-    infof(conn->data, "SASL %p state change from %s to %s\n",
+    infof(data, "SASL %p state change from %s to %s",
           (void *)sasl, names[sasl->state], names[newstate]);
 #else
-  (void) conn;
+  (void) data;
 #endif
 
   sasl->state = newstate;
 }
 
+/* Get the SASL server message and convert it to binary. */
+static CURLcode get_server_message(struct SASL *sasl, struct Curl_easy *data,
+                                   struct bufref *out)
+{
+  unsigned char *msg;
+  size_t msglen;
+  char *serverdata = NULL;
+  CURLcode result = CURLE_OK;
+
+  sasl->params->getmessage(data->state.buffer, &serverdata);
+  if(!serverdata)
+    result = CURLE_BAD_CONTENT_ENCODING;
+  else if(!*serverdata || *serverdata == '=')
+    Curl_bufref_set(out, NULL, 0, NULL);
+  else {
+    result = Curl_base64_decode(serverdata, &msg, &msglen);
+    if(!result)
+      Curl_bufref_set(out, msg, msglen, curl_free);
+  }
+  return result;
+}
+
+/* Encode the outgoing SASL message. */
+static CURLcode build_message(struct Curl_easy *data, struct bufref *msg)
+{
+  CURLcode result = CURLE_OK;
+  char *base64;
+  size_t base64len;
+
+  if(!Curl_bufref_ptr(msg))             /* Empty mesage. */
+    Curl_bufref_set(msg, "", 0, NULL);
+  else if(!Curl_bufref_len(msg))        /* Explicit empty response. */
+    Curl_bufref_set(msg, "=", 1, NULL);
+  else {
+    result = Curl_base64_encode(data, (const char *) Curl_bufref_ptr(msg),
+                                Curl_bufref_len(msg), &base64, &base64len);
+    if(!result)
+      Curl_bufref_set(msg, base64, base64len, curl_free);
+  }
+
+  return result;
+}
+
 /*
  * Curl_sasl_can_authenticate()
  *
@@ -253,32 +309,28 @@
  *
  * Calculate the required login details for SASL authentication.
  */
-CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
+CURLcode Curl_sasl_start(struct SASL *sasl, struct Curl_easy *data,
+                         struct connectdata *conn,
                          bool force_ir, saslprogress *progress)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   unsigned int enabledmechs;
   const char *mech = NULL;
-  char *resp = NULL;
-  size_t len = 0;
+  struct bufref resp;
   saslstate state1 = SASL_STOP;
   saslstate state2 = SASL_FINAL;
-#ifndef CURL_DISABLE_PROXY
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
-#else
-  const char * const hostname = conn->host.name;
-  const long int port = conn->remote_port;
-#endif
+  const char * const hostname = SSL_HOST_NAME();
+  const long int port = SSL_HOST_PORT();
 #if defined(USE_KERBEROS5) || defined(USE_NTLM)
   const char *service = data->set.str[STRING_SERVICE_NAME] ?
     data->set.str[STRING_SERVICE_NAME] :
     sasl->params->service;
 #endif
   const char *oauth_bearer = data->set.str[STRING_BEARER];
+  struct bufref nullmsg;
 
+  Curl_bufref_init(&nullmsg);
+  Curl_bufref_init(&resp);
   sasl->force_ir = force_ir;    /* Latch for future use */
   sasl->authused = 0;           /* No mechanism used yet */
   enabledmechs = sasl->authmechs & sasl->prefmech;
@@ -292,8 +344,7 @@
     sasl->authused = SASL_MECH_EXTERNAL;
 
     if(force_ir || data->set.sasl_ir)
-      result = Curl_auth_create_external_message(data, conn->user, &resp,
-                                                 &len);
+      result = Curl_auth_create_external_message(conn->user, &resp);
   }
   else if(conn->bits.user_passwd) {
 #if defined(USE_KERBEROS5)
@@ -309,10 +360,39 @@
         result = Curl_auth_create_gssapi_user_message(data, conn->user,
                                                       conn->passwd,
                                                       service,
-                                                      data->conn->host.name,
+                                                      conn->host.name,
                                                       sasl->mutual_auth,
                                                       NULL, &conn->krb5,
-                                                      &resp, &len);
+                                                      &resp);
+    }
+    else
+#endif
+#ifdef USE_GSASL
+    if((enabledmechs & SASL_MECH_SCRAM_SHA_256) &&
+       Curl_auth_gsasl_is_supported(data, SASL_MECH_STRING_SCRAM_SHA_256,
+                                    &conn->gsasl)) {
+      mech = SASL_MECH_STRING_SCRAM_SHA_256;
+      sasl->authused = SASL_MECH_SCRAM_SHA_256;
+      state1 = SASL_GSASL;
+      state2 = SASL_GSASL;
+
+      result = Curl_auth_gsasl_start(data, conn->user,
+                                     conn->passwd, &conn->gsasl);
+      if(result == CURLE_OK && (force_ir || data->set.sasl_ir))
+        result = Curl_auth_gsasl_token(data, &nullmsg, &conn->gsasl, &resp);
+    }
+    else if((enabledmechs & SASL_MECH_SCRAM_SHA_1) &&
+            Curl_auth_gsasl_is_supported(data, SASL_MECH_STRING_SCRAM_SHA_1,
+                                         &conn->gsasl)) {
+      mech = SASL_MECH_STRING_SCRAM_SHA_1;
+      sasl->authused = SASL_MECH_SCRAM_SHA_1;
+      state1 = SASL_GSASL;
+      state2 = SASL_GSASL;
+
+      result = Curl_auth_gsasl_start(data, conn->user,
+                                     conn->passwd, &conn->gsasl);
+      if(result == CURLE_OK && (force_ir || data->set.sasl_ir))
+        result = Curl_auth_gsasl_token(data, &nullmsg, &conn->gsasl, &resp);
     }
     else
 #endif
@@ -342,8 +422,7 @@
                                                      conn->user, conn->passwd,
                                                      service,
                                                      hostname,
-                                                     &conn->ntlm, &resp,
-                                                     &len);
+                                                     &conn->ntlm, &resp);
       }
     else
 #endif
@@ -354,11 +433,11 @@
       sasl->authused = SASL_MECH_OAUTHBEARER;
 
       if(force_ir || data->set.sasl_ir)
-        result = Curl_auth_create_oauth_bearer_message(data, conn->user,
+        result = Curl_auth_create_oauth_bearer_message(conn->user,
                                                        hostname,
                                                        port,
                                                        oauth_bearer,
-                                                       &resp, &len);
+                                                       &resp);
     }
     else if((enabledmechs & SASL_MECH_XOAUTH2) && oauth_bearer) {
       mech = SASL_MECH_STRING_XOAUTH2;
@@ -366,9 +445,9 @@
       sasl->authused = SASL_MECH_XOAUTH2;
 
       if(force_ir || data->set.sasl_ir)
-        result = Curl_auth_create_xoauth_bearer_message(data, conn->user,
+        result = Curl_auth_create_xoauth_bearer_message(conn->user,
                                                         oauth_bearer,
-                                                        &resp, &len);
+                                                        &resp);
     }
     else if(enabledmechs & SASL_MECH_PLAIN) {
       mech = SASL_MECH_STRING_PLAIN;
@@ -376,9 +455,9 @@
       sasl->authused = SASL_MECH_PLAIN;
 
       if(force_ir || data->set.sasl_ir)
-        result = Curl_auth_create_plain_message(data, conn->sasl_authzid,
+        result = Curl_auth_create_plain_message(conn->sasl_authzid,
                                                 conn->user, conn->passwd,
-                                                &resp, &len);
+                                                &resp);
     }
     else if(enabledmechs & SASL_MECH_LOGIN) {
       mech = SASL_MECH_STRING_LOGIN;
@@ -387,26 +466,29 @@
       sasl->authused = SASL_MECH_LOGIN;
 
       if(force_ir || data->set.sasl_ir)
-        result = Curl_auth_create_login_message(data, conn->user, &resp, &len);
+        result = Curl_auth_create_login_message(conn->user, &resp);
     }
   }
 
   if(!result && mech) {
-    if(resp && sasl->params->maxirlen &&
-       strlen(mech) + len > sasl->params->maxirlen) {
-      free(resp);
-      resp = NULL;
-    }
+    if(Curl_bufref_ptr(&resp))
+      result = build_message(data, &resp);
 
-    result = sasl->params->sendauth(conn, mech, resp);
+    if(sasl->params->maxirlen &&
+       strlen(mech) + Curl_bufref_len(&resp) > sasl->params->maxirlen)
+      Curl_bufref_free(&resp);
+
+    if(!result)
+      result = sasl->params->sendauth(data, conn, mech,
+                                      (const char *) Curl_bufref_ptr(&resp));
+
     if(!result) {
       *progress = SASL_INPROGRESS;
-      state(sasl, conn, resp ? state2 : state1);
+      state(sasl, data, Curl_bufref_ptr(&resp) ? state2 : state1);
     }
   }
 
-  free(resp);
-
+  Curl_bufref_free(&resp);
   return result;
 }
 
@@ -415,49 +497,40 @@
  *
  * Continue the authentication.
  */
-CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
+CURLcode Curl_sasl_continue(struct SASL *sasl, struct Curl_easy *data,
+                            struct connectdata *conn,
                             int code, saslprogress *progress)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   saslstate newstate = SASL_FINAL;
-  char *resp = NULL;
-#ifndef CURL_DISABLE_PROXY
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
-#else
-  const char * const hostname = conn->host.name;
-  const long int port = conn->remote_port;
-#endif
-#if !defined(CURL_DISABLE_CRYPTO_AUTH)
-  char *chlg = NULL;
-  size_t chlglen = 0;
-#endif
+  struct bufref resp;
+  const char * const hostname = SSL_HOST_NAME();
+  const long int port = SSL_HOST_PORT();
 #if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) ||     \
   defined(USE_NTLM)
   const char *service = data->set.str[STRING_SERVICE_NAME] ?
     data->set.str[STRING_SERVICE_NAME] :
     sasl->params->service;
-  char *serverdata;
 #endif
-  size_t len = 0;
   const char *oauth_bearer = data->set.str[STRING_BEARER];
+  struct bufref serverdata;
 
+  Curl_bufref_init(&serverdata);
+  Curl_bufref_init(&resp);
   *progress = SASL_INPROGRESS;
 
   if(sasl->state == SASL_FINAL) {
     if(code != sasl->params->finalcode)
       result = CURLE_LOGIN_DENIED;
     *progress = SASL_DONE;
-    state(sasl, conn, SASL_STOP);
+    state(sasl, data, SASL_STOP);
     return result;
   }
 
   if(sasl->state != SASL_CANCEL && sasl->state != SASL_OAUTH2_RESP &&
      code != sasl->params->contcode) {
     *progress = SASL_DONE;
-    state(sasl, conn, SASL_STOP);
+    state(sasl, data, SASL_STOP);
     return CURLE_LOGIN_DENIED;
   }
 
@@ -466,42 +539,45 @@
     *progress = SASL_DONE;
     return result;
   case SASL_PLAIN:
-    result = Curl_auth_create_plain_message(data, conn->sasl_authzid,
-                                            conn->user, conn->passwd,
-                                            &resp, &len);
+    result = Curl_auth_create_plain_message(conn->sasl_authzid,
+                                            conn->user, conn->passwd, &resp);
     break;
   case SASL_LOGIN:
-    result = Curl_auth_create_login_message(data, conn->user, &resp, &len);
+    result = Curl_auth_create_login_message(conn->user, &resp);
     newstate = SASL_LOGIN_PASSWD;
     break;
   case SASL_LOGIN_PASSWD:
-    result = Curl_auth_create_login_message(data, conn->passwd, &resp, &len);
+    result = Curl_auth_create_login_message(conn->passwd, &resp);
     break;
   case SASL_EXTERNAL:
-    result = Curl_auth_create_external_message(data, conn->user, &resp, &len);
+    result = Curl_auth_create_external_message(conn->user, &resp);
     break;
-
 #ifndef CURL_DISABLE_CRYPTO_AUTH
-  case SASL_CRAMMD5:
-    sasl->params->getmessage(data->state.buffer, &serverdata);
-    result = Curl_auth_decode_cram_md5_message(serverdata, &chlg, &chlglen);
+#ifdef USE_GSASL
+  case SASL_GSASL:
+    result = get_server_message(sasl, data, &serverdata);
     if(!result)
-      result = Curl_auth_create_cram_md5_message(data, chlg, conn->user,
-                                                 conn->passwd, &resp, &len);
-    free(chlg);
+      result = Curl_auth_gsasl_token(data, &serverdata, &conn->gsasl, &resp);
+    if(!result && Curl_bufref_len(&resp) > 0)
+      newstate = SASL_GSASL;
+    break;
+#endif
+  case SASL_CRAMMD5:
+    result = get_server_message(sasl, data, &serverdata);
+    if(!result)
+      result = Curl_auth_create_cram_md5_message(&serverdata, conn->user,
+                                                 conn->passwd, &resp);
     break;
   case SASL_DIGESTMD5:
-    sasl->params->getmessage(data->state.buffer, &serverdata);
-    result = Curl_auth_create_digest_md5_message(data, serverdata,
-                                                 conn->user, conn->passwd,
-                                                 service,
-                                                 &resp, &len);
+    result = get_server_message(sasl, data, &serverdata);
+    if(!result)
+      result = Curl_auth_create_digest_md5_message(data, &serverdata,
+                                                   conn->user, conn->passwd,
+                                                   service, &resp);
     newstate = SASL_DIGESTMD5_RESP;
     break;
   case SASL_DIGESTMD5_RESP:
-    resp = strdup("");
-    if(!resp)
-      result = CURLE_OUT_OF_MEMORY;
+    /* Keep response NULL to output an empty line. */
     break;
 #endif
 
@@ -511,18 +587,19 @@
     result = Curl_auth_create_ntlm_type1_message(data,
                                                  conn->user, conn->passwd,
                                                  service, hostname,
-                                                 &conn->ntlm, &resp, &len);
+                                                 &conn->ntlm, &resp);
     newstate = SASL_NTLM_TYPE2MSG;
     break;
   case SASL_NTLM_TYPE2MSG:
     /* Decode the type-2 message */
-    sasl->params->getmessage(data->state.buffer, &serverdata);
-    result = Curl_auth_decode_ntlm_type2_message(data, serverdata,
-                                                 &conn->ntlm);
+    result = get_server_message(sasl, data, &serverdata);
+    if(!result)
+      result = Curl_auth_decode_ntlm_type2_message(data, &serverdata,
+                                                   &conn->ntlm);
     if(!result)
       result = Curl_auth_create_ntlm_type3_message(data, conn->user,
                                                    conn->passwd, &conn->ntlm,
-                                                   &resp, &len);
+                                                   &resp);
     break;
 #endif
 
@@ -531,55 +608,59 @@
     result = Curl_auth_create_gssapi_user_message(data, conn->user,
                                                   conn->passwd,
                                                   service,
-                                                  data->conn->host.name,
+                                                  conn->host.name,
                                                   sasl->mutual_auth, NULL,
                                                   &conn->krb5,
-                                                  &resp, &len);
+                                                  &resp);
     newstate = SASL_GSSAPI_TOKEN;
     break;
   case SASL_GSSAPI_TOKEN:
-    sasl->params->getmessage(data->state.buffer, &serverdata);
-    if(sasl->mutual_auth) {
-      /* Decode the user token challenge and create the optional response
-         message */
-      result = Curl_auth_create_gssapi_user_message(data, NULL, NULL,
-                                                    NULL, NULL,
-                                                    sasl->mutual_auth,
-                                                    serverdata, &conn->krb5,
-                                                    &resp, &len);
-      newstate = SASL_GSSAPI_NO_DATA;
+    result = get_server_message(sasl, data, &serverdata);
+    if(!result) {
+      if(sasl->mutual_auth) {
+        /* Decode the user token challenge and create the optional response
+           message */
+        result = Curl_auth_create_gssapi_user_message(data, NULL, NULL,
+                                                      NULL, NULL,
+                                                      sasl->mutual_auth,
+                                                      &serverdata,
+                                                      &conn->krb5,
+                                                      &resp);
+        newstate = SASL_GSSAPI_NO_DATA;
+      }
+      else
+        /* Decode the security challenge and create the response message */
+        result = Curl_auth_create_gssapi_security_message(data, &serverdata,
+                                                          &conn->krb5,
+                                                          &resp);
     }
-    else
-      /* Decode the security challenge and create the response message */
-      result = Curl_auth_create_gssapi_security_message(data, serverdata,
-                                                        &conn->krb5,
-                                                        &resp, &len);
     break;
   case SASL_GSSAPI_NO_DATA:
-    sasl->params->getmessage(data->state.buffer, &serverdata);
     /* Decode the security challenge and create the response message */
-    result = Curl_auth_create_gssapi_security_message(data, serverdata,
-                                                      &conn->krb5,
-                                                      &resp, &len);
+    result = get_server_message(sasl, data, &serverdata);
+    if(!result)
+      result = Curl_auth_create_gssapi_security_message(data, &serverdata,
+                                                        &conn->krb5,
+                                                        &resp);
     break;
 #endif
 
   case SASL_OAUTH2:
     /* Create the authorisation message */
     if(sasl->authused == SASL_MECH_OAUTHBEARER) {
-      result = Curl_auth_create_oauth_bearer_message(data, conn->user,
+      result = Curl_auth_create_oauth_bearer_message(conn->user,
                                                      hostname,
                                                      port,
                                                      oauth_bearer,
-                                                     &resp, &len);
+                                                     &resp);
 
       /* Failures maybe sent by the server as continuations for OAUTHBEARER */
       newstate = SASL_OAUTH2_RESP;
     }
     else
-      result = Curl_auth_create_xoauth_bearer_message(data, conn->user,
+      result = Curl_auth_create_xoauth_bearer_message(conn->user,
                                                       oauth_bearer,
-                                                      &resp, &len);
+                                                      &resp);
     break;
 
   case SASL_OAUTH2_RESP:
@@ -587,20 +668,17 @@
     if(code == sasl->params->finalcode) {
       /* Final response was received so we are done */
       *progress = SASL_DONE;
-      state(sasl, conn, SASL_STOP);
+      state(sasl, data, SASL_STOP);
       return result;
     }
     else if(code == sasl->params->contcode) {
-      /* Acknowledge the continuation by sending a 0x01 response base64
-         encoded */
-      resp = strdup("AQ==");
-      if(!resp)
-        result = CURLE_OUT_OF_MEMORY;
+      /* Acknowledge the continuation by sending a 0x01 response. */
+      Curl_bufref_set(&resp, "\x01", 1, NULL);
       break;
     }
     else {
       *progress = SASL_DONE;
-      state(sasl, conn, SASL_STOP);
+      state(sasl, data, SASL_STOP);
       return CURLE_LOGIN_DENIED;
     }
 
@@ -609,24 +687,26 @@
     sasl->authmechs ^= sasl->authused;
 
     /* Start an alternative SASL authentication */
-    result = Curl_sasl_start(sasl, conn, sasl->force_ir, progress);
-    newstate = sasl->state;   /* Use state from Curl_sasl_start() */
-    break;
+    return Curl_sasl_start(sasl, data, conn, sasl->force_ir, progress);
   default:
     failf(data, "Unsupported SASL authentication mechanism");
     result = CURLE_UNSUPPORTED_PROTOCOL;  /* Should not happen */
     break;
   }
 
+  Curl_bufref_free(&serverdata);
+
   switch(result) {
   case CURLE_BAD_CONTENT_ENCODING:
     /* Cancel dialog */
-    result = sasl->params->sendcont(conn, "*");
+    result = sasl->params->sendcont(data, conn, "*");
     newstate = SASL_CANCEL;
     break;
   case CURLE_OK:
-    if(resp)
-      result = sasl->params->sendcont(conn, resp);
+    result = build_message(data, &resp);
+    if(!result)
+      result = sasl->params->sendcont(data, conn,
+                                      (const char *) Curl_bufref_ptr(&resp));
     break;
   default:
     newstate = SASL_STOP;    /* Stop on error */
@@ -634,9 +714,9 @@
     break;
   }
 
-  free(resp);
+  Curl_bufref_free(&resp);
 
-  state(sasl, conn, newstate);
+  state(sasl, data, newstate);
 
   return result;
 }
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
index 7647a48..e17d323 100644
--- a/lib/curl_sasl.h
+++ b/lib/curl_sasl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -37,10 +37,12 @@
 #define SASL_MECH_NTLM              (1 << 6)
 #define SASL_MECH_XOAUTH2           (1 << 7)
 #define SASL_MECH_OAUTHBEARER       (1 << 8)
+#define SASL_MECH_SCRAM_SHA_1       (1 << 9)
+#define SASL_MECH_SCRAM_SHA_256     (1 << 10)
 
 /* Authentication mechanism values */
 #define SASL_AUTH_NONE          0
-#define SASL_AUTH_ANY           ~0U
+#define SASL_AUTH_ANY           0xffff
 #define SASL_AUTH_DEFAULT       (SASL_AUTH_ANY & ~SASL_MECH_EXTERNAL)
 
 /* Authentication mechanism strings */
@@ -53,6 +55,8 @@
 #define SASL_MECH_STRING_NTLM         "NTLM"
 #define SASL_MECH_STRING_XOAUTH2      "XOAUTH2"
 #define SASL_MECH_STRING_OAUTHBEARER  "OAUTHBEARER"
+#define SASL_MECH_STRING_SCRAM_SHA_1  "SCRAM-SHA-1"
+#define SASL_MECH_STRING_SCRAM_SHA_256 "SCRAM-SHA-256"
 
 /* SASL machine states */
 typedef enum {
@@ -71,6 +75,7 @@
   SASL_GSSAPI_NO_DATA,
   SASL_OAUTH2,
   SASL_OAUTH2_RESP,
+  SASL_GSASL,
   SASL_CANCEL,
   SASL_FINAL
 } saslstate;
@@ -88,10 +93,12 @@
   int contcode;            /* Code to receive when continuation is expected */
   int finalcode;           /* Code to receive upon authentication success */
   size_t maxirlen;         /* Maximum initial response length */
-  CURLcode (*sendauth)(struct connectdata *conn,
+  CURLcode (*sendauth)(struct Curl_easy *data,
+                       struct connectdata *conn,
                        const char *mech, const char *ir);
                            /* Send authentication command */
-  CURLcode (*sendcont)(struct connectdata *conn, const char *contauth);
+  CURLcode (*sendcont)(struct Curl_easy *data,
+                       struct connectdata *conn, const char *contauth);
                            /* Send authentication continuation */
   void (*getmessage)(char *buffer, char **outptr);
                            /* Get SASL response message */
@@ -101,9 +108,9 @@
 struct SASL {
   const struct SASLproto *params; /* Protocol dependent parameters */
   saslstate state;         /* Current machine state */
-  unsigned int authmechs;  /* Accepted authentication mechanisms */
-  unsigned int prefmech;   /* Preferred authentication mechanism */
-  unsigned int authused;   /* Auth mechanism used for the connection */
+  unsigned short authmechs;  /* Accepted authentication mechanisms */
+  unsigned short prefmech;   /* Preferred authentication mechanism */
+  unsigned short authused;   /* Auth mechanism used for the connection */
   bool resetprefs;         /* For URL auth option parsing. */
   bool mutual_auth;        /* Mutual authentication enabled (GSSAPI only) */
   bool force_ir;           /* Protocol always supports initial response */
@@ -119,8 +126,8 @@
 void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused);
 
 /* Convert a mechanism name to a token */
-unsigned int Curl_sasl_decode_mech(const char *ptr,
-                                   size_t maxlen, size_t *len);
+unsigned short Curl_sasl_decode_mech(const char *ptr,
+                                     size_t maxlen, size_t *len);
 
 /* Parse the URL login options */
 CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl,
@@ -133,11 +140,13 @@
 bool Curl_sasl_can_authenticate(struct SASL *sasl, struct connectdata *conn);
 
 /* Calculate the required login details for SASL authentication  */
-CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
+CURLcode Curl_sasl_start(struct SASL *sasl, struct Curl_easy *data,
+                         struct connectdata *conn,
                          bool force_ir, saslprogress *progress);
 
 /* Continue an SASL authentication  */
-CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
+CURLcode Curl_sasl_continue(struct SASL *sasl, struct Curl_easy *data,
+                            struct connectdata *conn,
                             int code, saslprogress *progress);
 
 #endif /* HEADER_CURL_SASL_H */
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index 3872dbb..c0861d7 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -54,6 +54,16 @@
 #  ifndef NOGDI
 #    define NOGDI
 #  endif
+/* Detect Windows App environment which has a restricted access
+ * to the Win32 APIs. */
+# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || \
+  defined(WINAPI_FAMILY)
+#  include <winapifamily.h>
+#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) &&  \
+     !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#    define CURL_WINDOWS_APP
+#  endif
+# endif
 #endif
 
 /*
@@ -151,8 +161,6 @@
 
 #include <curl/curl.h>
 
-#define CURL_SIZEOF_CURL_OFF_T SIZEOF_CURL_OFF_T
-
 /*
  * Disable other protocols when http is the only one desired.
  */
@@ -238,8 +246,12 @@
  * interface doesn't support IPv4, but supports IPv6, NAT64, and DNS64,
  * performing this task will result in a synthesized IPv6 address.
  */
-#ifdef  __APPLE__
+#if defined(__APPLE__) && !defined(USE_ARES)
+#include <TargetConditionals.h>
 #define USE_RESOLVE_ON_IPS 1
+#  if defined(TARGET_OS_OSX) && TARGET_OS_OSX
+#    define CURL_OSX_CALL_COPYPROXIES 1
+#  endif
 #endif
 
 #ifdef USE_LWIPSOCK
@@ -277,10 +289,16 @@
 #  include <exec/execbase.h>
 #  include <proto/exec.h>
 #  include <proto/dos.h>
+#  include <unistd.h>
 #  ifdef HAVE_PROTO_BSDSOCKET_H
 #    include <proto/bsdsocket.h> /* ensure bsdsocket.library use */
 #    define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
 #  endif
+/*
+ * In clib2 arpa/inet.h warns that some prototypes may clash
+ * with bsdsocket.library. This avoids the definition of those.
+ */
+#  define __NO_NET_API
 #endif
 
 #include <stdio.h>
@@ -329,8 +347,10 @@
 #  define stat(fname,stp)            curlx_win32_stat(fname, stp)
 #  define struct_stat                struct _stati64
 #  define LSEEK_ERROR                (__int64)-1
+#  define open                       curlx_win32_open
 #  define fopen(fname,mode)          curlx_win32_fopen(fname, mode)
 #  define access(fname,mode)         curlx_win32_access(fname, mode)
+   int curlx_win32_open(const char *filename, int oflag, ...);
    int curlx_win32_stat(const char *path, struct_stat *buffer);
    FILE *curlx_win32_fopen(const char *filename, const char *mode);
    int curlx_win32_access(const char *path, int mode);
@@ -350,9 +370,11 @@
 #    define fstat(fdes,stp)            _fstat(fdes, stp)
 #    define stat(fname,stp)            curlx_win32_stat(fname, stp)
 #    define struct_stat                struct _stat
+#    define open                       curlx_win32_open
 #    define fopen(fname,mode)          curlx_win32_fopen(fname, mode)
 #    define access(fname,mode)         curlx_win32_access(fname, mode)
      int curlx_win32_stat(const char *path, struct_stat *buffer);
+     int curlx_win32_open(const char *filename, int oflag, ...);
      FILE *curlx_win32_fopen(const char *filename, const char *mode);
      int curlx_win32_access(const char *path, int mode);
 #  endif
@@ -402,7 +424,7 @@
 #if (SIZEOF_CURL_OFF_T == 4)
 #  define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF)
 #else
-   /* assume CURL_SIZEOF_CURL_OFF_T == 8 */
+   /* assume SIZEOF_CURL_OFF_T == 8 */
 #  define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
 #endif
 #define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1))
@@ -434,6 +456,15 @@
 #endif
 #endif
 
+#ifndef SSIZE_T_MAX
+/* some limits.h headers have this defined, some don't */
+#if defined(SIZEOF_SIZE_T) && (SIZEOF_SIZE_T > 4)
+#define SSIZE_T_MAX 9223372036854775807
+#else
+#define SSIZE_T_MAX 2147483647
+#endif
+#endif
+
 /*
  * Arg 2 type for gethostname in case it hasn't been defined in config file.
  */
@@ -499,7 +530,6 @@
 #    undef HAVE_GETADDRINFO_THREADSAFE
 #    undef HAVE_FREEADDRINFO
 #    undef HAVE_GETADDRINFO
-#    undef HAVE_GETNAMEINFO
 #    undef ENABLE_IPV6
 #  endif
 #endif
@@ -606,7 +636,7 @@
     defined(USE_MBEDTLS) || \
     defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \
     defined(USE_SECTRANSP) || defined(USE_GSKIT) || defined(USE_MESALINK) || \
-    defined(USE_BEARSSL)
+    defined(USE_BEARSSL) || defined(USE_RUSTLS)
 #define USE_SSL    /* SSL support has been enabled */
 #endif
 
@@ -623,24 +653,16 @@
 #endif
 
 /* Single point where USE_NTLM definition might be defined */
-#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH)
-#if defined(USE_OPENSSL) || defined(USE_MBEDTLS) ||                     \
-  defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_SECTRANSP) ||  \
-  defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) ||              \
-  (defined(USE_WOLFSSL) && defined(HAVE_WOLFSSL_DES_ECB_ENCRYPT))
-
-#define USE_CURL_NTLM_CORE
-
-#  if defined(USE_MBEDTLS)
-/* Get definition of MBEDTLS_MD4_C */
-#  include <mbedtls/md4.h>
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) && !defined(CURL_DISABLE_NTLM)
+#  if defined(USE_OPENSSL) || defined(USE_MBEDTLS) ||                       \
+      defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_SECTRANSP) ||  \
+      defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) ||              \
+      (defined(USE_WOLFSSL) && defined(HAVE_WOLFSSL_DES_ECB_ENCRYPT))
+#    define USE_CURL_NTLM_CORE
 #  endif
-
-#endif
-
-#if defined(USE_CURL_NTLM_CORE) || defined(USE_WINDOWS_SSPI)
-#define USE_NTLM
-#endif
+#  if defined(USE_CURL_NTLM_CORE) || defined(USE_WINDOWS_SSPI)
+#    define USE_NTLM
+#  endif
 #endif
 
 #ifdef CURL_WANTS_CA_BUNDLE_ENV
@@ -697,13 +719,19 @@
 #endif
 
 /*
- * Portable symbolic names for Winsock shutdown() mode flags.
+ * shutdown() flags for systems that don't define them
  */
 
-#ifdef USE_WINSOCK
-#  define SHUT_RD   0x00
-#  define SHUT_WR   0x01
-#  define SHUT_RDWR 0x02
+#ifndef SHUT_RD
+#define SHUT_RD 0x00
+#endif
+
+#ifndef SHUT_WR
+#define SHUT_WR 0x01
+#endif
+
+#ifndef SHUT_RDWR
+#define SHUT_RDWR 0x02
 #endif
 
 /* Define S_ISREG if not defined by system headers, f.e. MSVC */
@@ -754,20 +782,16 @@
 #  endif
 #endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUND */
 
-/* Detect Windows App environment which has a restricted access
- * to the Win32 APIs. */
-# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || \
-  defined(WINAPI_FAMILY)
-#  include <winapifamily.h>
-#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) &&  \
-     !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-#    define CURL_WINDOWS_APP
-#  endif
-# endif
-
-/* for systems that don't detect this in configure, use a sensible default */
+/* for systems that don't detect this in configure */
 #ifndef CURL_SA_FAMILY_T
-#define CURL_SA_FAMILY_T unsigned short
+#  if defined(HAVE_SA_FAMILY_T)
+#    define CURL_SA_FAMILY_T sa_family_t
+#  elif defined(HAVE_ADDRESS_FAMILY)
+#    define CURL_SA_FAMILY_T ADDRESS_FAMILY
+#  else
+/* use a sensible default */
+#    define CURL_SA_FAMILY_T unsigned short
+#  endif
 #endif
 
 /* Some convenience macros to get the larger/smaller value out of two given.
@@ -788,8 +812,28 @@
 #define UNITTEST static
 #endif
 
+#if defined(USE_NGHTTP2) || defined(USE_HYPER)
+#define USE_HTTP2
+#endif
+
 #if defined(USE_NGTCP2) || defined(USE_QUICHE)
 #define ENABLE_QUIC
 #endif
 
+#if defined(USE_UNIX_SOCKETS) && defined(WIN32)
+#  if defined(__MINGW32__) && !defined(LUP_SECURE)
+     typedef u_short ADDRESS_FAMILY; /* Classic mingw, 11y+ old mingw-w64 */
+#  endif
+#  if !defined(UNIX_PATH_MAX)
+     /* Replicating logic present in afunix.h
+        (distributed with newer Windows 10 SDK versions only) */
+#    define UNIX_PATH_MAX 108
+     /* !checksrc! disable TYPEDEFSTRUCT 1 */
+     typedef struct sockaddr_un {
+       ADDRESS_FAMILY sun_family;
+       char sun_path[UNIX_PATH_MAX];
+     } SOCKADDR_UN, *PSOCKADDR_UN;
+#  endif
+#endif
+
 #endif /* HEADER_CURL_SETUP_H */
diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h
index e7c00de..22d0a06 100644
--- a/lib/curl_setup_once.h
+++ b/lib/curl_setup_once.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,6 +32,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <ctype.h>
+#include <time.h>
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -55,13 +56,6 @@
 
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
 #endif
 
 #ifdef WIN32
@@ -351,15 +345,6 @@
 
 
 /*
- * Default return type for signal handlers.
- */
-
-#ifndef RETSIGTYPE
-#define RETSIGTYPE void
-#endif
-
-
-/*
  * Macro used to include code only in debug builds.
  */
 
diff --git a/lib/curl_sha256.h b/lib/curl_sha256.h
index 35d286c..b4579d7 100644
--- a/lib/curl_sha256.h
+++ b/lib/curl_sha256.h
@@ -12,7 +12,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,6 +24,9 @@
  ***************************************************************************/
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
+#include "curl_hmac.h"
+
+extern const struct HMAC_params Curl_HMAC_SHA256[1];
 
 #define SHA256_DIGEST_LENGTH 32
 
diff --git a/lib/curl_sspi.c b/lib/curl_sspi.c
index 512ce24..06841dd 100644
--- a/lib/curl_sspi.c
+++ b/lib/curl_sspi.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_sspi.h b/lib/curl_sspi.h
index c09026e..881384d 100644
--- a/lib/curl_sspi.h
+++ b/lib/curl_sspi.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_threads.c b/lib/curl_threads.c
index 6f3815e..4146144 100644
--- a/lib/curl_threads.c
+++ b/lib/curl_threads.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curl_threads.h b/lib/curl_threads.h
index 65d1a79..e10b7a1 100644
--- a/lib/curl_threads.h
+++ b/lib/curl_threads.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/curlx.h b/lib/curlx.h
index 98e51bf..9f21f60 100644
--- a/lib/curlx.h
+++ b/lib/curlx.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/dict.c b/lib/dict.c
index 8dd4a90..5d53b8f 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -67,7 +67,7 @@
  * Forward declarations.
  */
 
-static CURLcode dict_do(struct connectdata *conn, bool *done);
+static CURLcode dict_do(struct Curl_easy *data, bool *done);
 
 /*
  * DICT protocol handler.
@@ -89,6 +89,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_DICT,                            /* defport */
   CURLPROTO_DICT,                       /* protocol */
   CURLPROTO_DICT,                       /* family */
@@ -129,10 +130,9 @@
 }
 
 /* sendf() sends formatted data to the server */
-static CURLcode sendf(curl_socket_t sockfd, struct connectdata *conn,
+static CURLcode sendf(curl_socket_t sockfd, struct Curl_easy *data,
                       const char *fmt, ...)
 {
-  struct Curl_easy *data = conn->data;
   ssize_t bytes_written;
   size_t write_len;
   CURLcode result = CURLE_OK;
@@ -151,13 +151,12 @@
 
   for(;;) {
     /* Write the buffer to the socket */
-    result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written);
+    result = Curl_write(data, sockfd, sptr, write_len, &bytes_written);
 
     if(result)
       break;
 
-    if(data->set.verbose)
-      Curl_debug(data, CURLINFO_DATA_OUT, sptr, (size_t)bytes_written);
+    Curl_debug(data, CURLINFO_DATA_OUT, sptr, (size_t)bytes_written);
 
     if((size_t)bytes_written != write_len) {
       /* if not all was written at once, we must advance the pointer, decrease
@@ -174,7 +173,7 @@
   return result;
 }
 
-static CURLcode dict_do(struct connectdata *conn, bool *done)
+static CURLcode dict_do(struct Curl_easy *data, bool *done)
 {
   char *word;
   char *eword;
@@ -184,7 +183,7 @@
   char *nthdef = NULL; /* This is not part of the protocol, but required
                           by RFC 2229 */
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
 
   char *path = data->state.up.path;
@@ -216,14 +215,14 @@
       }
     }
 
-    if((word == NULL) || (*word == (char)0)) {
-      infof(data, "lookup word is missing\n");
+    if(!word || (*word == (char)0)) {
+      infof(data, "lookup word is missing");
       word = (char *)"default";
     }
-    if((database == NULL) || (*database == (char)0)) {
+    if(!database || (*database == (char)0)) {
       database = (char *)"!";
     }
-    if((strategy == NULL) || (*strategy == (char)0)) {
+    if(!strategy || (*strategy == (char)0)) {
       strategy = (char *)".";
     }
 
@@ -231,7 +230,7 @@
     if(!eword)
       return CURLE_OUT_OF_MEMORY;
 
-    result = sendf(sockfd, conn,
+    result = sendf(sockfd, data,
                    "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n"
                    "MATCH "
                    "%s "    /* database */
@@ -267,11 +266,11 @@
       }
     }
 
-    if((word == NULL) || (*word == (char)0)) {
-      infof(data, "lookup word is missing\n");
+    if(!word || (*word == (char)0)) {
+      infof(data, "lookup word is missing");
       word = (char *)"default";
     }
-    if((database == NULL) || (*database == (char)0)) {
+    if(!database || (*database == (char)0)) {
       database = (char *)"!";
     }
 
@@ -279,7 +278,7 @@
     if(!eword)
       return CURLE_OUT_OF_MEMORY;
 
-    result = sendf(sockfd, conn,
+    result = sendf(sockfd, data,
                    "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n"
                    "DEFINE "
                    "%s "     /* database */
@@ -307,7 +306,7 @@
         if(ppath[i] == ':')
           ppath[i] = ' ';
       }
-      result = sendf(sockfd, conn,
+      result = sendf(sockfd, data,
                      "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n"
                      "%s\r\n"
                      "QUIT\r\n", ppath);
diff --git a/lib/dict.h b/lib/dict.h
index 38a55ac..6a6c772 100644
--- a/lib/dict.h
+++ b/lib/dict.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/doh.c b/lib/doh.c
index e8b0801..de0c902 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -186,30 +186,33 @@
   return realsize;
 }
 
-/* called from multi.c when this DOH transfer is complete */
-static int Curl_doh_done(struct Curl_easy *doh, CURLcode result)
+/* called from multi.c when this DoH transfer is complete */
+static int doh_done(struct Curl_easy *doh, CURLcode result)
 {
   struct Curl_easy *data = doh->set.dohfor;
-  /* so one of the DOH request done for the 'data' transfer is now complete! */
-  data->req.doh.pending--;
-  infof(data, "a DOH request is completed, %u to go\n", data->req.doh.pending);
+  struct dohdata *dohp = data->req.doh;
+  /* so one of the DoH request done for the 'data' transfer is now complete! */
+  dohp->pending--;
+  infof(data, "a DoH request is completed, %u to go", dohp->pending);
   if(result)
-    infof(data, "DOH request %s\n", curl_easy_strerror(result));
+    infof(data, "DoH request %s", curl_easy_strerror(result));
 
-  if(!data->req.doh.pending) {
-    /* DOH completed */
-    curl_slist_free_all(data->req.doh.headers);
-    data->req.doh.headers = NULL;
+  if(!dohp->pending) {
+    /* DoH completed */
+    curl_slist_free_all(dohp->headers);
+    dohp->headers = NULL;
     Curl_expire(data, 0, EXPIRE_RUN_NOW);
   }
   return 0;
 }
 
 #define ERROR_CHECK_SETOPT(x,y) \
-do {                                      \
-  result = curl_easy_setopt(doh, x, y);   \
-  if(result)                              \
-    goto error;                           \
+do {                                          \
+  result = curl_easy_setopt(doh, x, y);       \
+  if(result &&                                \
+     result != CURLE_NOT_BUILT_IN &&          \
+     result != CURLE_UNKNOWN_OPTION)          \
+    goto error;                               \
 } while(0)
 
 static CURLcode dohprobe(struct Curl_easy *data,
@@ -225,7 +228,7 @@
   DOHcode d = doh_encode(host, dnstype, p->dohbuffer, sizeof(p->dohbuffer),
                          &p->dohlen);
   if(d) {
-    failf(data, "Failed to encode DOH packet [%d]\n", d);
+    failf(data, "Failed to encode DoH packet [%d]", d);
     return CURLE_OUT_OF_MEMORY;
   }
 
@@ -281,84 +284,93 @@
     ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
 #endif
     ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
+    ERROR_CHECK_SETOPT(CURLOPT_SHARE, data->share);
+    if(data->set.err && data->set.err != stderr)
+      ERROR_CHECK_SETOPT(CURLOPT_STDERR, data->set.err);
     if(data->set.verbose)
       ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
     if(data->set.no_signal)
       ERROR_CHECK_SETOPT(CURLOPT_NOSIGNAL, 1L);
 
+    ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST,
+      data->set.doh_verifyhost ? 2L : 0L);
+    ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER,
+      data->set.doh_verifypeer ? 1L : 0L);
+    ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS,
+      data->set.doh_verifystatus ? 1L : 0L);
+
     /* Inherit *some* SSL options from the user's transfer. This is a
-       best-guess as to which options are needed for compatibility. #3661 */
+       best-guess as to which options are needed for compatibility. #3661
+
+       Note DoH does not inherit the user's proxy server so proxy SSL settings
+       have no effect and are not inherited. If that changes then two new
+       options should be added to check doh proxy insecure separately,
+       CURLOPT_DOH_PROXY_SSL_VERIFYHOST and CURLOPT_DOH_PROXY_SSL_VERIFYPEER.
+       */
     if(data->set.ssl.falsestart)
       ERROR_CHECK_SETOPT(CURLOPT_SSL_FALSESTART, 1L);
-    if(data->set.ssl.primary.verifyhost)
-      ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST, 2L);
-#ifndef CURL_DISABLE_PROXY
-    if(data->set.proxy_ssl.primary.verifyhost)
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_SSL_VERIFYHOST, 2L);
-    if(data->set.proxy_ssl.primary.verifypeer)
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_SSL_VERIFYPEER, 1L);
-    if(data->set.str[STRING_SSL_CAFILE_PROXY]) {
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_CAINFO,
-        data->set.str[STRING_SSL_CAFILE_PROXY]);
-    }
-    if(data->set.str[STRING_SSL_CRLFILE_PROXY]) {
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_CRLFILE,
-        data->set.str[STRING_SSL_CRLFILE_PROXY]);
-    }
-    if(data->set.proxy_ssl.no_revoke)
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_SSL_OPTIONS, CURLSSLOPT_NO_REVOKE);
-    else if(data->set.proxy_ssl.revoke_best_effort)
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_SSL_OPTIONS,
-                         CURLSSLOPT_REVOKE_BEST_EFFORT);
-    if(data->set.str[STRING_SSL_CAPATH_PROXY]) {
-      ERROR_CHECK_SETOPT(CURLOPT_PROXY_CAPATH,
-        data->set.str[STRING_SSL_CAPATH_PROXY]);
-    }
-#endif
-    if(data->set.ssl.primary.verifypeer)
-      ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER, 1L);
-    if(data->set.ssl.primary.verifystatus)
-      ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS, 1L);
-    if(data->set.str[STRING_SSL_CAFILE_ORIG]) {
+    if(data->set.str[STRING_SSL_CAFILE]) {
       ERROR_CHECK_SETOPT(CURLOPT_CAINFO,
-        data->set.str[STRING_SSL_CAFILE_ORIG]);
+                         data->set.str[STRING_SSL_CAFILE]);
     }
-    if(data->set.str[STRING_SSL_CAPATH_ORIG]) {
+    if(data->set.blobs[BLOB_CAINFO]) {
+      ERROR_CHECK_SETOPT(CURLOPT_CAINFO_BLOB,
+                         data->set.blobs[BLOB_CAINFO]);
+    }
+    if(data->set.str[STRING_SSL_CAPATH]) {
       ERROR_CHECK_SETOPT(CURLOPT_CAPATH,
-        data->set.str[STRING_SSL_CAPATH_ORIG]);
+                         data->set.str[STRING_SSL_CAPATH]);
     }
-    if(data->set.str[STRING_SSL_CRLFILE_ORIG]) {
+    if(data->set.str[STRING_SSL_CRLFILE]) {
       ERROR_CHECK_SETOPT(CURLOPT_CRLFILE,
-        data->set.str[STRING_SSL_CRLFILE_ORIG]);
+                         data->set.str[STRING_SSL_CRLFILE]);
     }
     if(data->set.ssl.certinfo)
       ERROR_CHECK_SETOPT(CURLOPT_CERTINFO, 1L);
     if(data->set.str[STRING_SSL_RANDOM_FILE]) {
       ERROR_CHECK_SETOPT(CURLOPT_RANDOM_FILE,
-        data->set.str[STRING_SSL_RANDOM_FILE]);
+                         data->set.str[STRING_SSL_RANDOM_FILE]);
     }
     if(data->set.str[STRING_SSL_EGDSOCKET]) {
       ERROR_CHECK_SETOPT(CURLOPT_EGDSOCKET,
-        data->set.str[STRING_SSL_EGDSOCKET]);
+                         data->set.str[STRING_SSL_EGDSOCKET]);
     }
-    if(data->set.ssl.no_revoke)
-      ERROR_CHECK_SETOPT(CURLOPT_SSL_OPTIONS, CURLSSLOPT_NO_REVOKE);
-    else if(data->set.ssl.revoke_best_effort)
-      ERROR_CHECK_SETOPT(CURLOPT_SSL_OPTIONS, CURLSSLOPT_REVOKE_BEST_EFFORT);
     if(data->set.ssl.fsslctx)
       ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_FUNCTION, data->set.ssl.fsslctx);
     if(data->set.ssl.fsslctxp)
       ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_DATA, data->set.ssl.fsslctxp);
     if(data->set.str[STRING_SSL_EC_CURVES]) {
       ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
-        data->set.str[STRING_SSL_EC_CURVES]);
+                         data->set.str[STRING_SSL_EC_CURVES]);
     }
 
-    doh->set.fmultidone = Curl_doh_done;
+    {
+      long mask =
+        (data->set.ssl.enable_beast ?
+         CURLSSLOPT_ALLOW_BEAST : 0) |
+        (data->set.ssl.no_revoke ?
+         CURLSSLOPT_NO_REVOKE : 0) |
+        (data->set.ssl.no_partialchain ?
+         CURLSSLOPT_NO_PARTIALCHAIN : 0) |
+        (data->set.ssl.revoke_best_effort ?
+         CURLSSLOPT_REVOKE_BEST_EFFORT : 0) |
+        (data->set.ssl.native_ca_store ?
+         CURLSSLOPT_NATIVE_CA : 0) |
+        (data->set.ssl.auto_client_cert ?
+         CURLSSLOPT_AUTO_CLIENT_CERT : 0);
+
+      (void)curl_easy_setopt(doh, CURLOPT_SSL_OPTIONS, mask);
+    }
+
+    doh->set.fmultidone = doh_done;
     doh->set.dohfor = data; /* identify for which transfer this is done */
     p->easy = doh;
 
-    /* add this transfer to the multi handle */
+    /* DoH private_data must be null because the user must have a way to
+       distinguish their transfer's handle from DoH handles in user
+       callbacks (ie SSL CTX callback). */
+    DEBUGASSERT(!doh->set.private_data);
+
     if(curl_multi_add_handle(multi, doh))
       goto error;
   }
@@ -374,62 +386,66 @@
 }
 
 /*
- * Curl_doh() resolves a name using DOH. It resolves a name and returns a
+ * Curl_doh() resolves a name using DoH. It resolves a name and returns a
  * 'Curl_addrinfo *' with the address information.
  */
 
-struct Curl_addrinfo *Curl_doh(struct connectdata *conn,
+struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
                                const char *hostname,
                                int port,
                                int *waitp)
 {
-  struct Curl_easy *data = conn->data;
   CURLcode result = CURLE_OK;
   int slot;
+  struct dohdata *dohp;
+  struct connectdata *conn = data->conn;
   *waitp = TRUE; /* this never returns synchronously */
-  (void)conn;
   (void)hostname;
   (void)port;
 
+  DEBUGASSERT(!data->req.doh);
+  DEBUGASSERT(conn);
+
   /* start clean, consider allocating this struct on demand */
-  memset(&data->req.doh, 0, sizeof(struct dohdata));
+  dohp = data->req.doh = calloc(sizeof(struct dohdata), 1);
+  if(!dohp)
+    return NULL;
 
   conn->bits.doh = TRUE;
-  data->req.doh.host = hostname;
-  data->req.doh.port = port;
-  data->req.doh.headers =
+  dohp->host = hostname;
+  dohp->port = port;
+  dohp->headers =
     curl_slist_append(NULL,
                       "Content-Type: application/dns-message");
-  if(!data->req.doh.headers)
+  if(!dohp->headers)
     goto error;
 
-  if(conn->ip_version != CURL_IPRESOLVE_V6) {
-    /* create IPv4 DOH request */
-    result = dohprobe(data, &data->req.doh.probe[DOH_PROBE_SLOT_IPADDR_V4],
-                      DNS_TYPE_A, hostname, data->set.str[STRING_DOH],
-                      data->multi, data->req.doh.headers);
-    if(result)
-      goto error;
-    data->req.doh.pending++;
-  }
+  /* create IPv4 DoH request */
+  result = dohprobe(data, &dohp->probe[DOH_PROBE_SLOT_IPADDR_V4],
+                    DNS_TYPE_A, hostname, data->set.str[STRING_DOH],
+                    data->multi, dohp->headers);
+  if(result)
+    goto error;
+  dohp->pending++;
 
-  if(conn->ip_version != CURL_IPRESOLVE_V4) {
-    /* create IPv6 DOH request */
-    result = dohprobe(data, &data->req.doh.probe[DOH_PROBE_SLOT_IPADDR_V6],
+  if(Curl_ipv6works(data)) {
+    /* create IPv6 DoH request */
+    result = dohprobe(data, &dohp->probe[DOH_PROBE_SLOT_IPADDR_V6],
                       DNS_TYPE_AAAA, hostname, data->set.str[STRING_DOH],
-                      data->multi, data->req.doh.headers);
+                      data->multi, dohp->headers);
     if(result)
       goto error;
-    data->req.doh.pending++;
+    dohp->pending++;
   }
   return NULL;
 
   error:
-  curl_slist_free_all(data->req.doh.headers);
-  data->req.doh.headers = NULL;
+  curl_slist_free_all(dohp->headers);
+  data->req.doh->headers = NULL;
   for(slot = 0; slot < DOH_PROBE_SLOTS; slot++) {
-    Curl_close(&data->req.doh.probe[slot].easy);
+    Curl_close(&dohp->probe[slot].easy);
   }
+  Curl_safefree(data->req.doh);
   return NULL;
 }
 
@@ -468,7 +484,7 @@
       the pointer first. */
    doh += index;
 
-   /* avoid undefined behaviour by casting to unsigned before shifting
+   /* avoid undefined behavior by casting to unsigned before shifting
       24 bits, possibly into the sign bit. codegen is same, but
       ub sanitizer won't be upset */
   return ( (unsigned)doh[0] << 24) | (doh[1] << 16) |(doh[2] << 8) | doh[3];
@@ -748,11 +764,11 @@
                     const struct dohentry *d)
 {
   int i;
-  infof(data, "TTL: %u seconds\n", d->ttl);
+  infof(data, "TTL: %u seconds", d->ttl);
   for(i = 0; i < d->numaddr; i++) {
     const struct dohaddr *a = &d->addr[i];
     if(a->type == DNS_TYPE_A) {
-      infof(data, "DOH A: %u.%u.%u.%u\n",
+      infof(data, "DoH A: %u.%u.%u.%u",
             a->ip.v4[0], a->ip.v4[1],
             a->ip.v4[2], a->ip.v4[3]);
     }
@@ -761,7 +777,7 @@
       char buffer[128];
       char *ptr;
       size_t len;
-      msnprintf(buffer, 128, "DOH AAAA: ");
+      msnprintf(buffer, 128, "DoH AAAA: ");
       ptr = &buffer[10];
       len = 118;
       for(j = 0; j < 16; j += 2) {
@@ -772,11 +788,11 @@
         len -= l;
         ptr += l;
       }
-      infof(data, "%s\n", buffer);
+      infof(data, "%s", buffer);
     }
   }
   for(i = 0; i < d->numcname; i++) {
-    infof(data, "CNAME: %s\n", Curl_dyn_ptr(&d->cname[i]));
+    infof(data, "CNAME: %s", Curl_dyn_ptr(&d->cname[i]));
   }
 }
 #else
@@ -787,7 +803,7 @@
  * doh2ai()
  *
  * This function returns a pointer to the first element of a newly allocated
- * Curl_addrinfo struct linked list filled with the data from a set of DOH
+ * Curl_addrinfo struct linked list filled with the data from a set of DoH
  * lookups.  Curl_addrinfo is meant to work like the addrinfo struct does for
  * a IPv6 stack, but usable also for IPv4, all hosts and environments.
  *
@@ -904,34 +920,36 @@
   }
 }
 
-CURLcode Curl_doh_is_resolved(struct connectdata *conn,
+CURLcode Curl_doh_is_resolved(struct Curl_easy *data,
                               struct Curl_dns_entry **dnsp)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
+  struct dohdata *dohp = data->req.doh;
   *dnsp = NULL; /* defaults to no response */
+  if(!dohp)
+    return CURLE_OUT_OF_MEMORY;
 
-  if(!data->req.doh.probe[DOH_PROBE_SLOT_IPADDR_V4].easy &&
-     !data->req.doh.probe[DOH_PROBE_SLOT_IPADDR_V6].easy) {
-    failf(data, "Could not DOH-resolve: %s", conn->async.hostname);
-    return conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY:
+  if(!dohp->probe[DOH_PROBE_SLOT_IPADDR_V4].easy &&
+     !dohp->probe[DOH_PROBE_SLOT_IPADDR_V6].easy) {
+    failf(data, "Could not DoH-resolve: %s", data->state.async.hostname);
+    return data->conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY:
       CURLE_COULDNT_RESOLVE_HOST;
   }
-  else if(!data->req.doh.pending) {
+  else if(!dohp->pending) {
     DOHcode rc[DOH_PROBE_SLOTS] = {
       DOH_OK, DOH_OK
     };
     struct dohentry de;
     int slot;
-    /* remove DOH handles from multi handle and close them */
+    /* remove DoH handles from multi handle and close them */
     for(slot = 0; slot < DOH_PROBE_SLOTS; slot++) {
-      curl_multi_remove_handle(data->multi, data->req.doh.probe[slot].easy);
-      Curl_close(&data->req.doh.probe[slot].easy);
+      curl_multi_remove_handle(data->multi, dohp->probe[slot].easy);
+      Curl_close(&dohp->probe[slot].easy);
     }
     /* parse the responses, create the struct and return it! */
     de_init(&de);
     for(slot = 0; slot < DOH_PROBE_SLOTS; slot++) {
-      struct dnsprobe *p = &data->req.doh.probe[slot];
+      struct dnsprobe *p = &dohp->probe[slot];
       if(!p->dnstype)
         continue;
       rc[slot] = doh_decode(Curl_dyn_uptr(&p->serverdoh),
@@ -940,8 +958,8 @@
                             &de);
       Curl_dyn_free(&p->serverdoh);
       if(rc[slot]) {
-        infof(data, "DOH: %s type %s for %s\n", doh_strerror(rc[slot]),
-              type2name(p->dnstype), data->req.doh.host);
+        infof(data, "DoH: %s type %s for %s", doh_strerror(rc[slot]),
+              type2name(p->dnstype), dohp->host);
       }
     } /* next slot */
 
@@ -951,10 +969,10 @@
       struct Curl_dns_entry *dns;
       struct Curl_addrinfo *ai;
 
-      infof(data, "DOH Host name: %s\n", data->req.doh.host);
+      infof(data, "DoH Host name: %s", dohp->host);
       showdoh(data, &de);
 
-      ai = doh2ai(&de, data->req.doh.host, data->req.doh.port);
+      ai = doh2ai(&de, dohp->host, dohp->port);
       if(!ai) {
         de_cleanup(&de);
         return CURLE_OUT_OF_MEMORY;
@@ -964,7 +982,7 @@
         Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
 
       /* we got a response, store it in the cache */
-      dns = Curl_cache_addr(data, ai, data->req.doh.host, data->req.doh.port);
+      dns = Curl_cache_addr(data, ai, dohp->host, dohp->port);
 
       if(data->share)
         Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
@@ -974,7 +992,7 @@
         Curl_freeaddrinfo(ai);
       }
       else {
-        conn->async.dns = dns;
+        data->state.async.dns = dns;
         *dnsp = dns;
         result = CURLE_OK;      /* address resolution OK */
       }
@@ -984,11 +1002,12 @@
 
     /* All done */
     de_cleanup(&de);
+    Curl_safefree(data->req.doh);
     return result;
 
-  } /* !data->req.doh.pending */
+  } /* !dohp->pending */
 
-  /* else wait for pending DOH transactions to complete */
+  /* else wait for pending DoH transactions to complete */
   return CURLE_OK;
 }
 
diff --git a/lib/doh.h b/lib/doh.h
index bbd4c1a..70e96e0 100644
--- a/lib/doh.h
+++ b/lib/doh.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,12 +32,12 @@
  * and returns a 'Curl_addrinfo *' with the address information.
  */
 
-struct Curl_addrinfo *Curl_doh(struct connectdata *conn,
+struct Curl_addrinfo *Curl_doh(struct Curl_easy *data,
                                const char *hostname,
                                int port,
                                int *waitp);
 
-CURLcode Curl_doh_is_resolved(struct connectdata *conn,
+CURLcode Curl_doh_is_resolved(struct Curl_easy *data,
                               struct Curl_dns_entry **dns);
 
 int Curl_doh_getsock(struct connectdata *conn, curl_socket_t *socks);
@@ -101,7 +101,7 @@
 void de_cleanup(struct dohentry *d);
 #endif
 
-#else /* if DOH is disabled */
+#else /* if DoH is disabled */
 #define Curl_doh(a,b,c,d) NULL
 #define Curl_doh_is_resolved(x,y) CURLE_COULDNT_RESOLVE_HOST
 #endif
diff --git a/lib/dotdot.c b/lib/dotdot.c
index ce9a052..3a1435f 100644
--- a/lib/dotdot.c
+++ b/lib/dotdot.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/dotdot.h b/lib/dotdot.h
index f70b1db..ac1ea36 100644
--- a/lib/dotdot.h
+++ b/lib/dotdot.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/dynbuf.c b/lib/dynbuf.c
index b2465b8..ada7e0c 100644
--- a/lib/dynbuf.c
+++ b/lib/dynbuf.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/dynbuf.h b/lib/dynbuf.h
index 39b8595..252411f 100644
--- a/lib/dynbuf.h
+++ b/lib/dynbuf.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2020, 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -74,7 +74,7 @@
 #define DYN_DOH_CNAME       256
 #define DYN_PAUSE_BUFFER    (64 * 1024 * 1024)
 #define DYN_HAXPROXY        2048
-#define DYN_HTTP_REQUEST    (128*1024)
+#define DYN_HTTP_REQUEST    (1024*1024)
 #define DYN_H2_HEADERS      (128*1024)
 #define DYN_H2_TRAILERS     (128*1024)
 #define DYN_APRINTF         8000000
diff --git a/lib/easy.c b/lib/easy.c
index 60e2bef..588b1fb 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -79,6 +79,7 @@
 #include "http2.h"
 #include "dynbuf.h"
 #include "altsvc.h"
+#include "hsts.h"
 
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
@@ -123,6 +124,10 @@
 #  pragma warning(default:4232) /* MSVC extension, dllimport identity */
 #endif
 
+#ifdef DEBUGBUILD
+static char *leakpointer;
+#endif
+
 /**
  * curl_global_init() globally initializes curl given a bitwise set of the
  * different features of what to initialize.
@@ -189,6 +194,12 @@
 
   init_flags = flags;
 
+#ifdef DEBUGBUILD
+  if(getenv("CURL_GLOBAL_INIT"))
+    /* alloc data that will leak if *cleanup() is not called! */
+    leakpointer = malloc(1);
+#endif
+
   return CURLE_OK;
 
   fail:
@@ -264,6 +275,9 @@
 #ifdef USE_WOLFSSH
   (void)wolfSSH_Cleanup();
 #endif
+#ifdef DEBUGBUILD
+  free(leakpointer);
+#endif
 
   init_flags  = 0;
 }
@@ -403,13 +417,13 @@
           ev->list = nxt;
         free(m);
         m = nxt;
-        infof(easy, "socket cb: socket %d REMOVED\n", s);
+        infof(easy, "socket cb: socket %d REMOVED", s);
       }
       else {
         /* The socket 's' is already being monitored, update the activity
            mask. Convert from libcurl bitmask to the poll one. */
         m->socket.events = socketcb2poll(what);
-        infof(easy, "socket cb: socket %d UPDATED as %s%s\n", s,
+        infof(easy, "socket cb: socket %d UPDATED as %s%s", s,
               (what&CURL_POLL_IN)?"IN":"",
               (what&CURL_POLL_OUT)?"OUT":"");
       }
@@ -433,7 +447,7 @@
         m->socket.events = socketcb2poll(what);
         m->socket.revents = 0;
         ev->list = m;
-        infof(easy, "socket cb: socket %d ADDED as %s%s\n", s,
+        infof(easy, "socket cb: socket %d ADDED as %s%s", s,
               (what&CURL_POLL_IN)?"IN":"",
               (what&CURL_POLL_OUT)?"OUT":"");
       }
@@ -518,7 +532,7 @@
         if(fds[i].revents) {
           /* socket activity, tell libcurl */
           int act = poll2cselect(fds[i].revents); /* convert */
-          infof(multi->easyp, "call curl_multi_socket_action(socket %d)\n",
+          infof(multi->easyp, "call curl_multi_socket_action(socket %d)",
                 fds[i].fd);
           mcode = curl_multi_socket_action(multi, fds[i].fd, act,
                                            &ev->running_handles);
@@ -775,7 +789,6 @@
   /* duplicate all blobs */
   for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
     result = Curl_setblobopt(&dst->set.blobs[j], src->set.blobs[j]);
-    /* Curl_setstropt return CURLE_BAD_FUNCTION_ARGUMENT with blob */
     if(result)
       return result;
   }
@@ -796,7 +809,7 @@
   result = Curl_mime_duppart(&dst->set.mimepost, &src->set.mimepost);
 
   if(src->set.resolve)
-    dst->change.resolve = dst->set.resolve;
+    dst->state.resolve = dst->set.resolve;
 
   return result;
 }
@@ -844,25 +857,25 @@
   }
 
   /* duplicate all values in 'change' */
-  if(data->change.cookielist) {
-    outcurl->change.cookielist =
-      Curl_slist_duplicate(data->change.cookielist);
-    if(!outcurl->change.cookielist)
+  if(data->state.cookielist) {
+    outcurl->state.cookielist =
+      Curl_slist_duplicate(data->state.cookielist);
+    if(!outcurl->state.cookielist)
       goto fail;
   }
 
-  if(data->change.url) {
-    outcurl->change.url = strdup(data->change.url);
-    if(!outcurl->change.url)
+  if(data->state.url) {
+    outcurl->state.url = strdup(data->state.url);
+    if(!outcurl->state.url)
       goto fail;
-    outcurl->change.url_alloc = TRUE;
+    outcurl->state.url_alloc = TRUE;
   }
 
-  if(data->change.referer) {
-    outcurl->change.referer = strdup(data->change.referer);
-    if(!outcurl->change.referer)
+  if(data->state.referer) {
+    outcurl->state.referer = strdup(data->state.referer);
+    if(!outcurl->state.referer)
       goto fail;
-    outcurl->change.referer_alloc = TRUE;
+    outcurl->state.referer_alloc = TRUE;
   }
 
   /* Reinitialize an SSL engine for the new handle
@@ -881,10 +894,21 @@
       (void)Curl_altsvc_load(outcurl->asi, outcurl->set.str[STRING_ALTSVC]);
   }
 #endif
+#ifndef CURL_DISABLE_HSTS
+  if(data->hsts) {
+    outcurl->hsts = Curl_hsts_init();
+    if(!outcurl->hsts)
+      goto fail;
+    if(outcurl->set.str[STRING_HSTS])
+      (void)Curl_hsts_loadfile(outcurl,
+                               outcurl->hsts, outcurl->set.str[STRING_HSTS]);
+    (void)Curl_hsts_loadcb(outcurl, outcurl->hsts);
+  }
+#endif
   /* Clone the resolver handle, if present, for the new handle */
   if(Curl_resolver_duphandle(outcurl,
-                             &outcurl->state.resolver,
-                             data->state.resolver))
+                             &outcurl->state.async.resolver,
+                             data->state.async.resolver))
     goto fail;
 
 #ifdef USE_ARES
@@ -922,13 +946,14 @@
   fail:
 
   if(outcurl) {
-    curl_slist_free_all(outcurl->change.cookielist);
-    outcurl->change.cookielist = NULL;
+    curl_slist_free_all(outcurl->state.cookielist);
+    outcurl->state.cookielist = NULL;
     Curl_safefree(outcurl->state.buffer);
     Curl_dyn_free(&outcurl->state.headerb);
-    Curl_safefree(outcurl->change.url);
-    Curl_safefree(outcurl->change.referer);
+    Curl_safefree(outcurl->state.url);
+    Curl_safefree(outcurl->state.referer);
     Curl_altsvc_cleanup(&outcurl->asi);
+    Curl_hsts_cleanup(&outcurl->hsts);
     Curl_freeset(outcurl);
     free(outcurl);
   }
@@ -1002,14 +1027,14 @@
 
   if((newstate & (KEEP_RECV_PAUSE| KEEP_SEND_PAUSE)) == oldstate) {
     /* Not changing any pause state, return */
-    DEBUGF(infof(data, "pause: no change, early return\n"));
+    DEBUGF(infof(data, "pause: no change, early return"));
     return CURLE_OK;
   }
 
   /* Unpause parts in active mime tree. */
   if((k->keepon & ~newstate & KEEP_SEND_PAUSE) &&
-     (data->mstate == CURLM_STATE_PERFORM ||
-      data->mstate == CURLM_STATE_TOOFAST) &&
+     (data->mstate == MSTATE_PERFORMING ||
+      data->mstate == MSTATE_RATELIMITING) &&
      data->state.fread_func == (curl_read_callback) Curl_mime_read) {
     Curl_mime_unpause(data->state.in);
   }
@@ -1026,8 +1051,6 @@
       unsigned int i;
       unsigned int count = data->state.tempcount;
       struct tempbuf writebuf[3]; /* there can only be three */
-      struct connectdata *conn = data->conn;
-      struct Curl_easy *saved_data = NULL;
 
       /* copy the structs to allow for immediate re-pausing */
       for(i = 0; i < data->state.tempcount; i++) {
@@ -1036,26 +1059,16 @@
       }
       data->state.tempcount = 0;
 
-      /* set the connection's current owner */
-      if(conn->data != data) {
-        saved_data = conn->data;
-        conn->data = data;
-      }
-
       for(i = 0; i < count; i++) {
         /* even if one function returns error, this loops through and frees
            all buffers */
         if(!result)
-          result = Curl_client_write(conn, writebuf[i].type,
+          result = Curl_client_write(data, writebuf[i].type,
                                      Curl_dyn_ptr(&writebuf[i].b),
                                      Curl_dyn_len(&writebuf[i].b));
         Curl_dyn_free(&writebuf[i].b);
       }
 
-      /* recover previous owner of the connection */
-      if(saved_data)
-        conn->data = saved_data;
-
       if(result)
         return result;
     }
@@ -1067,6 +1080,9 @@
      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) {
     Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */
 
+    /* reset the too-slow time keeper */
+    data->state.keeps_speed.tv_sec = 0;
+
     if(!data->state.tempcount)
       /* if not pausing again, force a recv/send check of this connection as
          the data might've been read off the socket already */
@@ -1088,7 +1104,7 @@
                                 curl_socket_t *sfd,
                                 struct connectdata **connp)
 {
-  if(data == NULL)
+  if(!data)
     return CURLE_BAD_FUNCTION_ARGUMENT;
 
   /* only allow these to be called on handles with CURLOPT_CONNECT_ONLY */
@@ -1127,8 +1143,13 @@
   if(result)
     return result;
 
+  if(!data->conn)
+    /* on first invoke, the transfer has been detached from the connection and
+       needs to be reattached */
+    Curl_attach_connnection(data, c);
+
   *n = 0;
-  result = Curl_read(c, sfd, buffer, buflen, &n1);
+  result = Curl_read(data, sfd, buffer, buflen, &n1);
 
   if(result)
     return result;
@@ -1149,6 +1170,7 @@
   CURLcode result;
   ssize_t n1;
   struct connectdata *c = NULL;
+  SIGPIPE_VARIABLE(pipe_st);
 
   if(Curl_is_in_callback(data))
     return CURLE_RECURSIVE_API_CALL;
@@ -1157,8 +1179,15 @@
   if(result)
     return result;
 
+  if(!data->conn)
+    /* on first invoke, the transfer has been detached from the connection and
+       needs to be reattached */
+    Curl_attach_connnection(data, c);
+
   *n = 0;
-  result = Curl_write(c, sfd, buffer, buflen, &n1);
+  sigpipe_ignore(data, &pipe_st);
+  result = Curl_write(data, sfd, buffer, buflen, &n1);
+  sigpipe_restore(&pipe_st);
 
   if(n1 == -1)
     return CURLE_SEND_ERROR;
@@ -1177,15 +1206,22 @@
  *
  * Returns always 0.
  */
-static int conn_upkeep(struct connectdata *conn,
+static int conn_upkeep(struct Curl_easy *data,
+                       struct connectdata *conn,
                        void *param)
 {
   /* Param is unused. */
   (void)param;
 
   if(conn->handler->connection_check) {
+    /* briefly attach the connection to this transfer for the purpose of
+       checking it */
+    Curl_attach_connnection(data, conn);
+
     /* Do a protocol-specific keepalive check on the connection. */
-    conn->handler->connection_check(conn, CONNCHECK_KEEPALIVE);
+    conn->handler->connection_check(data, conn, CONNCHECK_KEEPALIVE);
+    /* detach the connection again */
+    Curl_detach_connnection(data);
   }
 
   return 0; /* continue iteration */
diff --git a/lib/easygetopt.c b/lib/easygetopt.c
index cac8378..7b2213f 100644
--- a/lib/easygetopt.c
+++ b/lib/easygetopt.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/easyif.h b/lib/easyif.h
index eda0d62..3364418 100644
--- a/lib/easyif.h
+++ b/lib/easyif.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/easyoptions.c b/lib/easyoptions.c
index 0ab6a3f..4e65e35 100644
--- a/lib/easyoptions.c
+++ b/lib/easyoptions.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             ___|___/|_| ______|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,8 +35,10 @@
   {"ALTSVC_CTRL", CURLOPT_ALTSVC_CTRL, CURLOT_LONG, 0},
   {"APPEND", CURLOPT_APPEND, CURLOT_LONG, 0},
   {"AUTOREFERER", CURLOPT_AUTOREFERER, CURLOT_LONG, 0},
+  {"AWS_SIGV4", CURLOPT_AWS_SIGV4, CURLOT_STRING, 0},
   {"BUFFERSIZE", CURLOPT_BUFFERSIZE, CURLOT_LONG, 0},
   {"CAINFO", CURLOPT_CAINFO, CURLOT_STRING, 0},
+  {"CAINFO_BLOB", CURLOPT_CAINFO_BLOB, CURLOT_BLOB, 0},
   {"CAPATH", CURLOPT_CAPATH, CURLOT_STRING, 0},
   {"CERTINFO", CURLOPT_CERTINFO, CURLOT_LONG, 0},
   {"CHUNK_BGN_FUNCTION", CURLOPT_CHUNK_BGN_FUNCTION, CURLOT_FUNCTION, 0},
@@ -77,6 +79,9 @@
   {"DNS_SERVERS", CURLOPT_DNS_SERVERS, CURLOT_STRING, 0},
   {"DNS_SHUFFLE_ADDRESSES", CURLOPT_DNS_SHUFFLE_ADDRESSES, CURLOT_LONG, 0},
   {"DNS_USE_GLOBAL_CACHE", CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOT_LONG, 0},
+  {"DOH_SSL_VERIFYHOST", CURLOPT_DOH_SSL_VERIFYHOST, CURLOT_LONG, 0},
+  {"DOH_SSL_VERIFYPEER", CURLOPT_DOH_SSL_VERIFYPEER, CURLOT_LONG, 0},
+  {"DOH_SSL_VERIFYSTATUS", CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOT_LONG, 0},
   {"DOH_URL", CURLOPT_DOH_URL, CURLOT_STRING, 0},
   {"EGDSOCKET", CURLOPT_EGDSOCKET, CURLOT_STRING, 0},
   {"ENCODING", CURLOPT_ACCEPT_ENCODING, CURLOT_STRING, CURLOT_FLAG_ALIAS},
@@ -115,6 +120,12 @@
   {"HEADERDATA", CURLOPT_HEADERDATA, CURLOT_CBPTR, 0},
   {"HEADERFUNCTION", CURLOPT_HEADERFUNCTION, CURLOT_FUNCTION, 0},
   {"HEADEROPT", CURLOPT_HEADEROPT, CURLOT_VALUES, 0},
+  {"HSTS", CURLOPT_HSTS, CURLOT_STRING, 0},
+  {"HSTSREADDATA", CURLOPT_HSTSREADDATA, CURLOT_CBPTR, 0},
+  {"HSTSREADFUNCTION", CURLOPT_HSTSREADFUNCTION, CURLOT_FUNCTION, 0},
+  {"HSTSWRITEDATA", CURLOPT_HSTSWRITEDATA, CURLOT_CBPTR, 0},
+  {"HSTSWRITEFUNCTION", CURLOPT_HSTSWRITEFUNCTION, CURLOT_FUNCTION, 0},
+  {"HSTS_CTRL", CURLOPT_HSTS_CTRL, CURLOT_LONG, 0},
   {"HTTP09_ALLOWED", CURLOPT_HTTP09_ALLOWED, CURLOT_LONG, 0},
   {"HTTP200ALIASES", CURLOPT_HTTP200ALIASES, CURLOT_SLIST, 0},
   {"HTTPAUTH", CURLOPT_HTTPAUTH, CURLOT_VALUES, 0},
@@ -195,6 +206,7 @@
   {"PROXYUSERNAME", CURLOPT_PROXYUSERNAME, CURLOT_STRING, 0},
   {"PROXYUSERPWD", CURLOPT_PROXYUSERPWD, CURLOT_STRING, 0},
   {"PROXY_CAINFO", CURLOPT_PROXY_CAINFO, CURLOT_STRING, 0},
+  {"PROXY_CAINFO_BLOB", CURLOPT_PROXY_CAINFO_BLOB, CURLOT_BLOB, 0},
   {"PROXY_CAPATH", CURLOPT_PROXY_CAPATH, CURLOT_STRING, 0},
   {"PROXY_CRLFILE", CURLOPT_PROXY_CRLFILE, CURLOT_STRING, 0},
   {"PROXY_ISSUERCERT", CURLOPT_PROXY_ISSUERCERT, CURLOT_STRING, 0},
@@ -342,6 +354,6 @@
  */
 int Curl_easyopts_check(void)
 {
-  return (CURLOPT_LASTENTRY != (298 + 1));
+  return ((CURLOPT_LASTENTRY%10000) != (310 + 1));
 }
 #endif
diff --git a/lib/easyoptions.h b/lib/easyoptions.h
index cd8b410..91e1190 100644
--- a/lib/easyoptions.h
+++ b/lib/easyoptions.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/escape.c b/lib/escape.c
index 2bea145..683b6fc 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -86,7 +86,7 @@
   if(inlength < 0)
     return NULL;
 
-  Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH);
+  Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH * 3);
 
   length = (inlength?(size_t)inlength:strlen(string));
   if(!length)
diff --git a/lib/escape.h b/lib/escape.h
index 586db7e..46cb590 100644
--- a/lib/escape.h
+++ b/lib/escape.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/file.c b/lib/file.c
index 1872dfe..0420db3 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -81,13 +81,15 @@
  * Forward declarations.
  */
 
-static CURLcode file_do(struct connectdata *, bool *done);
-static CURLcode file_done(struct connectdata *conn,
+static CURLcode file_do(struct Curl_easy *data, bool *done);
+static CURLcode file_done(struct Curl_easy *data,
                           CURLcode status, bool premature);
-static CURLcode file_connect(struct connectdata *conn, bool *done);
-static CURLcode file_disconnect(struct connectdata *conn,
+static CURLcode file_connect(struct Curl_easy *data, bool *done);
+static CURLcode file_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 bool dead_connection);
-static CURLcode file_setup_connection(struct connectdata *conn);
+static CURLcode file_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
 
 /*
  * FILE scheme handler.
@@ -109,6 +111,7 @@
   file_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   0,                                    /* defport */
   CURLPROTO_FILE,                       /* protocol */
   CURLPROTO_FILE,                       /* family */
@@ -116,11 +119,13 @@
 };
 
 
-static CURLcode file_setup_connection(struct connectdata *conn)
+static CURLcode file_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
+  (void)conn;
   /* allocate the FILE specific struct */
-  conn->data->req.protop = calloc(1, sizeof(struct FILEPROTO));
-  if(!conn->data->req.protop)
+  data->req.p.file = calloc(1, sizeof(struct FILEPROTO));
+  if(!data->req.p.file)
     return CURLE_OUT_OF_MEMORY;
 
   return CURLE_OK;
@@ -131,11 +136,10 @@
  * do protocol-specific actions at connect-time.  We emulate a
  * connect-then-transfer protocol and "connect" to the file here
  */
-static CURLcode file_connect(struct connectdata *conn, bool *done)
+static CURLcode file_connect(struct Curl_easy *data, bool *done)
 {
-  struct Curl_easy *data = conn->data;
   char *real_path;
-  struct FILEPROTO *file = data->req.protop;
+  struct FILEPROTO *file = data->req.p.file;
   int fd;
 #ifdef DOS_FILESYSTEM
   size_t i;
@@ -198,7 +202,7 @@
   file->fd = fd;
   if(!data->set.upload && (fd == -1)) {
     failf(data, "Couldn't open file %s", data->state.up.path);
-    file_done(conn, CURLE_FILE_COULDNT_READ_FILE, FALSE);
+    file_done(data, CURLE_FILE_COULDNT_READ_FILE, FALSE);
     return CURLE_FILE_COULDNT_READ_FILE;
   }
   *done = TRUE;
@@ -206,10 +210,10 @@
   return CURLE_OK;
 }
 
-static CURLcode file_done(struct connectdata *conn,
-                               CURLcode status, bool premature)
+static CURLcode file_done(struct Curl_easy *data,
+                          CURLcode status, bool premature)
 {
-  struct FILEPROTO *file = conn->data->req.protop;
+  struct FILEPROTO *file = data->req.p.file;
   (void)status; /* not used */
   (void)premature; /* not used */
 
@@ -224,21 +228,13 @@
   return CURLE_OK;
 }
 
-static CURLcode file_disconnect(struct connectdata *conn,
+static CURLcode file_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 bool dead_connection)
 {
-  struct FILEPROTO *file = conn->data->req.protop;
   (void)dead_connection; /* not used */
-
-  if(file) {
-    Curl_safefree(file->freepath);
-    file->path = NULL;
-    if(file->fd != -1)
-      close(file->fd);
-    file->fd = -1;
-  }
-
-  return CURLE_OK;
+  (void)conn;
+  return file_done(data, 0, 0);
 }
 
 #ifdef DOS_FILESYSTEM
@@ -247,14 +243,13 @@
 #define DIRSEP '/'
 #endif
 
-static CURLcode file_upload(struct connectdata *conn)
+static CURLcode file_upload(struct Curl_easy *data)
 {
-  struct FILEPROTO *file = conn->data->req.protop;
+  struct FILEPROTO *file = data->req.p.file;
   const char *dir = strchr(file->path, DIRSEP);
   int fd;
   int mode;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   char *buf = data->state.buffer;
   curl_off_t bytecount = 0;
   struct_stat file_stat;
@@ -264,7 +259,7 @@
    * Since FILE: doesn't do the full init, we need to provide some extra
    * assignments here.
    */
-  conn->data->req.upload_fromhere = buf;
+  data->req.upload_fromhere = buf;
 
   if(!dir)
     return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
@@ -283,7 +278,7 @@
   else
     mode = MODE_DEFAULT|O_TRUNC;
 
-  fd = open(file->path, mode, conn->data->set.new_file_perms);
+  fd = open(file->path, mode, data->set.new_file_perms);
   if(fd < 0) {
     failf(data, "Can't open %s for writing", file->path);
     return CURLE_WRITE_ERROR;
@@ -307,7 +302,7 @@
     size_t nread;
     size_t nwrite;
     size_t readcount;
-    result = Curl_fillreadbuffer(conn, data->set.buffer_size, &readcount);
+    result = Curl_fillreadbuffer(data, data->set.buffer_size, &readcount);
     if(result)
       break;
 
@@ -343,12 +338,12 @@
 
     Curl_pgrsSetUploadCounter(data, bytecount);
 
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
     else
       result = Curl_speedcheck(data, Curl_now());
   }
-  if(!result && Curl_pgrsUpdate(conn))
+  if(!result && Curl_pgrsUpdate(data))
     result = CURLE_ABORTED_BY_CALLBACK;
 
   close(fd);
@@ -364,7 +359,7 @@
  * opposed to sockets) we instead perform the whole do-operation in this
  * function.
  */
-static CURLcode file_do(struct connectdata *conn, bool *done)
+static CURLcode file_do(struct Curl_easy *data, bool *done)
 {
   /* This implementation ignores the host name in conformance with
      RFC 1738. Only local files (reachable via the standard file system)
@@ -375,10 +370,9 @@
   struct_stat statbuf; /* struct_stat instead of struct stat just to allow the
                           Windows version to have a different struct without
                           having to redefine the simple word 'stat' */
-  curl_off_t expected_size = 0;
+  curl_off_t expected_size = -1;
   bool size_known;
   bool fstated = FALSE;
-  struct Curl_easy *data = conn->data;
   char *buf = data->state.buffer;
   curl_off_t bytecount = 0;
   int fd;
@@ -389,17 +383,17 @@
   Curl_pgrsStartNow(data);
 
   if(data->set.upload)
-    return file_upload(conn);
+    return file_upload(data);
 
-  file = conn->data->req.protop;
+  file = data->req.p.file;
 
   /* get the fd from the connection phase */
   fd = file->fd;
 
   /* VMS: This only works reliable for STREAMLF files */
   if(-1 != fstat(fd, &statbuf)) {
-    /* we could stat it, then read out the size */
-    expected_size = statbuf.st_size;
+    if(!S_ISDIR(statbuf.st_mode))
+      expected_size = statbuf.st_size;
     /* and store the modification time */
     data->info.filetime = statbuf.st_mtime;
     fstated = TRUE;
@@ -417,17 +411,21 @@
     struct tm buffer;
     const struct tm *tm = &buffer;
     char header[80];
-    msnprintf(header, sizeof(header),
-              "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n",
-              expected_size);
-    result = Curl_client_write(conn, CLIENTWRITE_HEADER, header, 0);
-    if(result)
-      return result;
+    int headerlen;
+    char accept_ranges[24]= { "Accept-ranges: bytes\r\n" };
+    if(expected_size >= 0) {
+      headerlen = msnprintf(header, sizeof(header),
+                "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n",
+                expected_size);
+      result = Curl_client_write(data, CLIENTWRITE_HEADER, header, headerlen);
+      if(result)
+        return result;
 
-    result = Curl_client_write(conn, CLIENTWRITE_HEADER,
-                               (char *)"Accept-ranges: bytes\r\n", 0);
-    if(result)
-      return result;
+      result = Curl_client_write(data, CLIENTWRITE_HEADER,
+                                 accept_ranges, strlen(accept_ranges));
+      if(result != CURLE_OK)
+        return result;
+    }
 
     filetime = (time_t)statbuf.st_mtime;
     result = Curl_gmtime(filetime, &buffer);
@@ -435,7 +433,7 @@
       return result;
 
     /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
-    msnprintf(header, sizeof(header),
+    headerlen = msnprintf(header, sizeof(header),
               "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n%s",
               Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
               tm->tm_mday,
@@ -445,7 +443,7 @@
               tm->tm_min,
               tm->tm_sec,
               data->set.opt_no_body ? "": "\r\n");
-    result = Curl_client_write(conn, CLIENTWRITE_HEADER, header, 0);
+    result = Curl_client_write(data, CLIENTWRITE_HEADER, header, headerlen);
     if(result)
       return result;
     /* set the file size to make it available post transfer */
@@ -455,7 +453,7 @@
   }
 
   /* Check whether file range has been specified */
-  result = Curl_range(conn);
+  result = Curl_range(data);
   if(result)
     return result;
 
@@ -469,18 +467,23 @@
     data->state.resume_from += (curl_off_t)statbuf.st_size;
   }
 
-  if(data->state.resume_from <= expected_size)
-    expected_size -= data->state.resume_from;
-  else {
-    failf(data, "failed to resume file:// transfer");
-    return CURLE_BAD_DOWNLOAD_RESUME;
+  if(data->state.resume_from > 0) {
+    /* We check explicitly if we have a start offset, because
+     * expected_size may be -1 if we don't know how large the file is,
+     * in which case we should not adjust it. */
+    if(data->state.resume_from <= expected_size)
+      expected_size -= data->state.resume_from;
+    else {
+      failf(data, "failed to resume file:// transfer");
+      return CURLE_BAD_DOWNLOAD_RESUME;
+    }
   }
 
   /* A high water mark has been specified so we obey... */
   if(data->req.maxdownload > 0)
     expected_size = data->req.maxdownload;
 
-  if(!fstated || (expected_size == 0))
+  if(!fstated || (expected_size <= 0))
     size_known = FALSE;
   else
     size_known = TRUE;
@@ -489,7 +492,7 @@
      this is both more efficient than the former call to download() and
      it avoids problems with select() and recv() on file descriptors
      in Winsock */
-  if(fstated)
+  if(size_known)
     Curl_pgrsSetDownloadSize(data, expected_size);
 
   if(data->state.resume_from) {
@@ -524,18 +527,18 @@
     if(size_known)
       expected_size -= nread;
 
-    result = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread);
+    result = Curl_client_write(data, CLIENTWRITE_BODY, buf, nread);
     if(result)
       return result;
 
     Curl_pgrsSetDownloadCounter(data, bytecount);
 
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
     else
       result = Curl_speedcheck(data, Curl_now());
   }
-  if(Curl_pgrsUpdate(conn))
+  if(Curl_pgrsUpdate(data))
     result = CURLE_ABORTED_BY_CALLBACK;
 
   return result;
diff --git a/lib/file.h b/lib/file.h
index f6b74a7..338f92e 100644
--- a/lib/file.h
+++ b/lib/file.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/fileinfo.c b/lib/fileinfo.c
index 2630c9e..b7e9f0f 100644
--- a/lib/fileinfo.c
+++ b/lib/fileinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/fileinfo.h b/lib/fileinfo.h
index fdbad8b..5ae23ad 100644
--- a/lib/fileinfo.h
+++ b/lib/fileinfo.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/firefox-db2pem.sh b/lib/firefox-db2pem.sh
index ee82026..629a2e8 100644
--- a/lib/firefox-db2pem.sh
+++ b/lib/firefox-db2pem.sh
@@ -10,7 +10,7 @@
 # *
 # * This software is licensed as described in the file COPYING, which
 # * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
+# * are also available at https://curl.se/docs/copyright.html.
 # *
 # * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/formdata.c b/lib/formdata.c
index 1cab2c5..ac7a000 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -865,8 +865,6 @@
 
         if(post->flags & CURL_HTTPPOST_LARGE)
           clen = post->contentlen;
-        if(!clen)
-          clen = -1;
 
         if(post->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE)) {
           if(!strcmp(file->contents, "-")) {
@@ -888,13 +886,21 @@
         else if(post->flags & HTTPPOST_BUFFER)
           result = curl_mime_data(part, post->buffer,
                                   post->bufferlength? post->bufferlength: -1);
-        else if(post->flags & HTTPPOST_CALLBACK)
+        else if(post->flags & HTTPPOST_CALLBACK) {
           /* the contents should be read with the callback and the size is set
              with the contentslength */
+          if(!clen)
+            clen = -1;
           result = curl_mime_data_cb(part, clen,
                                      fread_func, NULL, NULL, post->userp);
+        }
         else {
-          result = curl_mime_data(part, post->contents, (ssize_t) clen);
+          size_t uclen;
+          if(!clen)
+            uclen = CURL_ZERO_TERMINATED;
+          else
+            uclen = (size_t)clen;
+          result = curl_mime_data(part, post->contents, uclen);
 #ifdef CURL_DOES_CONVERSIONS
           /* Convert textual contents now. */
           if(!result && data && part->datasize)
diff --git a/lib/formdata.h b/lib/formdata.h
index 3766d38..09c6e9c 100644
--- a/lib/formdata.h
+++ b/lib/formdata.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -29,22 +29,22 @@
 /* used by FormAdd for temporary storage */
 struct FormInfo {
   char *name;
-  bool name_alloc;
   size_t namelength;
   char *value;
-  bool value_alloc;
   curl_off_t contentslength;
   char *contenttype;
-  bool contenttype_alloc;
   long flags;
   char *buffer;      /* pointer to existing buffer used for file upload */
   size_t bufferlength;
   char *showfilename; /* The file name to show. If not set, the actual
                          file name will be used */
-  bool showfilename_alloc;
   char *userp;        /* pointer for the read callback */
   struct curl_slist *contentheader;
   struct FormInfo *more;
+  bool name_alloc;
+  bool value_alloc;
+  bool contenttype_alloc;
+  bool showfilename_alloc;
 };
 
 CURLcode Curl_getformdata(struct Curl_easy *data,
diff --git a/lib/ftp.c b/lib/ftp.c
index 11031da..1a699de 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -96,56 +96,63 @@
 
 /* Local API functions */
 #ifndef DEBUGBUILD
-static void _state(struct connectdata *conn,
+static void _state(struct Curl_easy *data,
                    ftpstate newstate);
 #define state(x,y) _state(x,y)
 #else
-static void _state(struct connectdata *conn,
+static void _state(struct Curl_easy *data,
                    ftpstate newstate,
                    int lineno);
 #define state(x,y) _state(x,y,__LINE__)
 #endif
 
-static CURLcode ftp_sendquote(struct connectdata *conn,
+static CURLcode ftp_sendquote(struct Curl_easy *data,
+                              struct connectdata *conn,
                               struct curl_slist *quote);
-static CURLcode ftp_quit(struct connectdata *conn);
-static CURLcode ftp_parse_url_path(struct connectdata *conn);
-static CURLcode ftp_regular_transfer(struct connectdata *conn, bool *done);
+static CURLcode ftp_quit(struct Curl_easy *data, struct connectdata *conn);
+static CURLcode ftp_parse_url_path(struct Curl_easy *data);
+static CURLcode ftp_regular_transfer(struct Curl_easy *data, bool *done);
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
-static void ftp_pasv_verbose(struct connectdata *conn,
+static void ftp_pasv_verbose(struct Curl_easy *data,
                              struct Curl_addrinfo *ai,
                              char *newhost, /* ascii version */
                              int port);
 #endif
-static CURLcode ftp_state_prepare_transfer(struct connectdata *conn);
-static CURLcode ftp_state_mdtm(struct connectdata *conn);
-static CURLcode ftp_state_quote(struct connectdata *conn,
+static CURLcode ftp_state_prepare_transfer(struct Curl_easy *data);
+static CURLcode ftp_state_mdtm(struct Curl_easy *data);
+static CURLcode ftp_state_quote(struct Curl_easy *data,
                                 bool init, ftpstate instate);
-static CURLcode ftp_nb_type(struct connectdata *conn,
+static CURLcode ftp_nb_type(struct Curl_easy *data,
+                            struct connectdata *conn,
                             bool ascii, ftpstate newstate);
 static int ftp_need_type(struct connectdata *conn,
                          bool ascii);
-static CURLcode ftp_do(struct connectdata *conn, bool *done);
-static CURLcode ftp_done(struct connectdata *conn,
+static CURLcode ftp_do(struct Curl_easy *data, bool *done);
+static CURLcode ftp_done(struct Curl_easy *data,
                          CURLcode, bool premature);
-static CURLcode ftp_connect(struct connectdata *conn, bool *done);
-static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection);
-static CURLcode ftp_do_more(struct connectdata *conn, int *completed);
-static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done);
-static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks);
-static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks);
-static CURLcode ftp_doing(struct connectdata *conn,
+static CURLcode ftp_connect(struct Curl_easy *data, bool *done);
+static CURLcode ftp_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn, bool dead_connection);
+static CURLcode ftp_do_more(struct Curl_easy *data, int *completed);
+static CURLcode ftp_multi_statemach(struct Curl_easy *data, bool *done);
+static int ftp_getsock(struct Curl_easy *data, struct connectdata *conn,
+                       curl_socket_t *socks);
+static int ftp_domore_getsock(struct Curl_easy *data,
+                              struct connectdata *conn, curl_socket_t *socks);
+static CURLcode ftp_doing(struct Curl_easy *data,
                           bool *dophase_done);
-static CURLcode ftp_setup_connection(struct connectdata *conn);
-static CURLcode init_wc_data(struct connectdata *conn);
-static CURLcode wc_statemach(struct connectdata *conn);
+static CURLcode ftp_setup_connection(struct Curl_easy *data,
+                                     struct connectdata *conn);
+static CURLcode init_wc_data(struct Curl_easy *data);
+static CURLcode wc_statemach(struct Curl_easy *data);
 static void wc_data_dtor(void *ptr);
-static CURLcode ftp_state_retr(struct connectdata *conn, curl_off_t filesize);
-static CURLcode ftp_readresp(curl_socket_t sockfd,
+static CURLcode ftp_state_retr(struct Curl_easy *data, curl_off_t filesize);
+static CURLcode ftp_readresp(struct Curl_easy *data,
+                             curl_socket_t sockfd,
                              struct pingpong *pp,
                              int *ftpcode,
                              size_t *size);
-static CURLcode ftp_dophase_done(struct connectdata *conn,
+static CURLcode ftp_dophase_done(struct Curl_easy *data,
                                  bool connected);
 
 /*
@@ -168,6 +175,7 @@
   ftp_disconnect,                  /* disconnect */
   ZERO_NULL,                       /* readwrite */
   ZERO_NULL,                       /* connection_check */
+  ZERO_NULL,                       /* attach connection */
   PORT_FTP,                        /* defport */
   CURLPROTO_FTP,                   /* protocol */
   CURLPROTO_FTP,                   /* family */
@@ -198,6 +206,7 @@
   ftp_disconnect,                  /* disconnect */
   ZERO_NULL,                       /* readwrite */
   ZERO_NULL,                       /* connection_check */
+  ZERO_NULL,                       /* attach connection */
   PORT_FTPS,                       /* defport */
   CURLPROTO_FTPS,                  /* protocol */
   CURLPROTO_FTP,                   /* family */
@@ -206,10 +215,11 @@
 };
 #endif
 
-static void close_secondarysocket(struct connectdata *conn)
+static void close_secondarysocket(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
-    Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
+    Curl_closesocket(data, conn, conn->sock[SECONDARYSOCKET]);
     conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
   }
   conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE;
@@ -256,9 +266,9 @@
  * called to accept the connection and close the listening socket
  *
  */
-static CURLcode AcceptServerConnect(struct connectdata *conn)
+static CURLcode AcceptServerConnect(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t sock = conn->sock[SECONDARYSOCKET];
   curl_socket_t s = CURL_SOCKET_BAD;
 #ifdef ENABLE_IPV6
@@ -273,13 +283,13 @@
 
     s = accept(sock, (struct sockaddr *) &add, &size);
   }
-  Curl_closesocket(conn, sock); /* close the first socket */
+  Curl_closesocket(data, conn, sock); /* close the first socket */
 
   if(CURL_SOCKET_BAD == s) {
     failf(data, "Error accept()ing server connect");
     return CURLE_FTP_PORT_FAILED;
   }
-  infof(data, "Connection accepted from server\n");
+  infof(data, "Connection accepted from server");
   /* when this happens within the DO state it is important that we mark us as
      not needing DO_MORE anymore */
   conn->bits.do_more = FALSE;
@@ -299,7 +309,7 @@
     Curl_set_in_callback(data, false);
 
     if(error) {
-      close_secondarysocket(conn);
+      close_secondarysocket(data, conn);
       return CURLE_ABORTED_BY_CALLBACK;
     }
   }
@@ -355,9 +365,9 @@
  * connection for a negative response regarding a failure in connecting
  *
  */
-static CURLcode ReceivedServerConnect(struct connectdata *conn, bool *received)
+static CURLcode ReceivedServerConnect(struct Curl_easy *data, bool *received)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t ctrl_sock = conn->sock[FIRSTSOCKET];
   curl_socket_t data_sock = conn->sock[SECONDARYSOCKET];
   struct ftp_conn *ftpc = &conn->proto.ftpc;
@@ -370,7 +380,7 @@
   *received = FALSE;
 
   timeout_ms = ftp_timeleft_accept(data);
-  infof(data, "Checking for server connect\n");
+  infof(data, "Checking for server connect");
   if(timeout_ms < 0) {
     /* if a timeout was already reached, bail out */
     failf(data, "Accept timeout occurred while waiting server connect");
@@ -380,8 +390,8 @@
   /* First check whether there is a cached response from server */
   if(pp->cache_size && pp->cache && pp->cache[0] > '3') {
     /* Data connection could not be established, let's return */
-    infof(data, "There is negative response in cache while serv connect\n");
-    (void)Curl_GetFTPResponse(&nread, conn, &ftpcode);
+    infof(data, "There is negative response in cache while serv connect");
+    (void)Curl_GetFTPResponse(data, &nread, &ftpcode);
     return CURLE_FTP_ACCEPT_FAILED;
   }
 
@@ -398,12 +408,12 @@
   default:
 
     if(result & CURL_CSELECT_IN2) {
-      infof(data, "Ready to accept data connection from server\n");
+      infof(data, "Ready to accept data connection from server");
       *received = TRUE;
     }
     else if(result & CURL_CSELECT_IN) {
-      infof(data, "Ctrl conn has data while waiting for data conn\n");
-      (void)Curl_GetFTPResponse(&nread, conn, &ftpcode);
+      infof(data, "Ctrl conn has data while waiting for data conn");
+      (void)Curl_GetFTPResponse(data, &nread, &ftpcode);
 
       if(ftpcode/100 > 3)
         return CURLE_FTP_ACCEPT_FAILED;
@@ -426,16 +436,16 @@
  * setup transfer parameters and initiate the data transfer.
  *
  */
-static CURLcode InitiateTransfer(struct connectdata *conn)
+static CURLcode InitiateTransfer(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
   if(conn->bits.ftp_use_data_ssl) {
     /* since we only have a plaintext TCP connection here, we must now
      * do the TLS stuff */
-    infof(data, "Doing the SSL/TLS handshake on the data stream\n");
-    result = Curl_ssl_connect(conn, SECONDARYSOCKET);
+    infof(data, "Doing the SSL/TLS handshake on the data stream");
+    result = Curl_ssl_connect(data, conn, SECONDARYSOCKET);
     if(result)
       return result;
   }
@@ -457,7 +467,7 @@
   }
 
   conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */
-  state(conn, FTP_STOP);
+  state(data, FTP_STOP);
 
   return CURLE_OK;
 }
@@ -471,14 +481,13 @@
  * accepted.
  *
  */
-static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected)
+static CURLcode AllowServerConnect(struct Curl_easy *data, bool *connected)
 {
-  struct Curl_easy *data = conn->data;
   timediff_t timeout_ms;
   CURLcode result = CURLE_OK;
 
   *connected = FALSE;
-  infof(data, "Preparing for accepting server on data port\n");
+  infof(data, "Preparing for accepting server on data port");
 
   /* Save the time we start accepting server connect */
   Curl_pgrsTime(data, TIMER_STARTACCEPT);
@@ -491,16 +500,16 @@
   }
 
   /* see if the connection request is already here */
-  result = ReceivedServerConnect(conn, connected);
+  result = ReceivedServerConnect(data, connected);
   if(result)
     return result;
 
   if(*connected) {
-    result = AcceptServerConnect(conn);
+    result = AcceptServerConnect(data);
     if(result)
       return result;
 
-    result = InitiateTransfer(conn);
+    result = InitiateTransfer(data);
     if(result)
       return result;
   }
@@ -523,9 +532,10 @@
 /* macro to check for the last line in an FTP server response */
 #define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3]))
 
-static bool ftp_endofresp(struct connectdata *conn, char *line, size_t len,
-                          int *code)
+static bool ftp_endofresp(struct Curl_easy *data, struct connectdata *conn,
+                          char *line, size_t len, int *code)
 {
+  (void)data;
   (void)conn;
 
   if((len > 3) && LASTLINE(line)) {
@@ -536,34 +546,35 @@
   return FALSE;
 }
 
-static CURLcode ftp_readresp(curl_socket_t sockfd,
+static CURLcode ftp_readresp(struct Curl_easy *data,
+                             curl_socket_t sockfd,
                              struct pingpong *pp,
                              int *ftpcode, /* return the ftp-code if done */
                              size_t *size) /* size of the response */
 {
-  struct connectdata *conn = pp->conn;
-  struct Curl_easy *data = conn->data;
-#ifdef HAVE_GSSAPI
-  char * const buf = data->state.buffer;
-#endif
   int code;
-  CURLcode result = Curl_pp_readresp(sockfd, pp, &code, size);
+  CURLcode result = Curl_pp_readresp(data, sockfd, pp, &code, size);
 
-#if defined(HAVE_GSSAPI)
-  /* handle the security-oriented responses 6xx ***/
-  switch(code) {
-  case 631:
-    code = Curl_sec_read_msg(conn, buf, PROT_SAFE);
-    break;
-  case 632:
-    code = Curl_sec_read_msg(conn, buf, PROT_PRIVATE);
-    break;
-  case 633:
-    code = Curl_sec_read_msg(conn, buf, PROT_CONFIDENTIAL);
-    break;
-  default:
-    /* normal ftp stuff we pass through! */
-    break;
+#ifdef HAVE_GSSAPI
+  {
+    struct connectdata *conn = data->conn;
+    char * const buf = data->state.buffer;
+
+    /* handle the security-oriented responses 6xx ***/
+    switch(code) {
+    case 631:
+      code = Curl_sec_read_msg(data, conn, buf, PROT_SAFE);
+      break;
+    case 632:
+      code = Curl_sec_read_msg(data, conn, buf, PROT_PRIVATE);
+      break;
+    case 633:
+      code = Curl_sec_read_msg(data, conn, buf, PROT_CONFIDENTIAL);
+      break;
+    default:
+      /* normal ftp stuff we pass through! */
+      break;
+    }
   }
 #endif
 
@@ -581,8 +592,8 @@
      * This response code can come at any point so having it treated
      * generically is a good idea.
      */
-    infof(data, "We got a 421 - timeout!\n");
-    state(conn, FTP_STOP);
+    infof(data, "We got a 421 - timeout!");
+    state(data, FTP_STOP);
     return CURLE_OPERATION_TIMEDOUT;
   }
 
@@ -597,8 +608,8 @@
  *
  */
 
-CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
-                             struct connectdata *conn,
+CURLcode Curl_GetFTPResponse(struct Curl_easy *data,
+                             ssize_t *nreadp, /* return number of bytes read */
                              int *ftpcode) /* return the ftp-code */
 {
   /*
@@ -608,8 +619,8 @@
    * Alas, read as much as possible, split up into lines, use the ending
    * line in a response or continue reading.  */
 
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
-  struct Curl_easy *data = conn->data;
   CURLcode result = CURLE_OK;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
@@ -627,7 +638,7 @@
 
   while(!*ftpcode && !result) {
     /* check and reset timeout value every lap */
-    timediff_t timeout = Curl_pp_state_timeout(pp, FALSE);
+    timediff_t timeout = Curl_pp_state_timeout(data, pp, FALSE);
     timediff_t interval_ms;
 
     if(timeout <= 0) {
@@ -669,7 +680,7 @@
         return CURLE_RECV_ERROR;
 
       case 0: /* timeout */
-        if(Curl_pgrsUpdate(conn))
+        if(Curl_pgrsUpdate(data))
           return CURLE_ABORTED_BY_CALLBACK;
         continue; /* just continue in our loop for the timeout duration */
 
@@ -677,7 +688,7 @@
         break;
       }
     }
-    result = ftp_readresp(sockfd, pp, ftpcode, &nread);
+    result = ftp_readresp(data, sockfd, pp, ftpcode, &nread);
     if(result)
       break;
 
@@ -741,13 +752,14 @@
 #endif
 
 /* This is the ONLY way to change FTP state! */
-static void _state(struct connectdata *conn,
+static void _state(struct Curl_easy *data,
                    ftpstate newstate
 #ifdef DEBUGBUILD
                    , int lineno
 #endif
   )
 {
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
 #if defined(DEBUGBUILD)
@@ -756,7 +768,7 @@
   (void) lineno;
 #else
   if(ftpc->state != newstate)
-    infof(conn->data, "FTP %p (line %d) state change from %s to %s\n",
+    infof(data, "FTP %p (line %d) state change from %s to %s",
           (void *)ftpc, lineno, ftp_state_names[ftpc->state],
           ftp_state_names[newstate]);
 #endif
@@ -765,37 +777,43 @@
   ftpc->state = newstate;
 }
 
-static CURLcode ftp_state_user(struct connectdata *conn)
+static CURLcode ftp_state_user(struct Curl_easy *data,
+                               struct connectdata *conn)
 {
-  CURLcode result = Curl_pp_sendf(&conn->proto.ftpc.pp, "USER %s",
+  CURLcode result = Curl_pp_sendf(data,
+                                  &conn->proto.ftpc.pp, "USER %s",
                                   conn->user?conn->user:"");
   if(!result) {
-    state(conn, FTP_USER);
-    conn->data->state.ftp_trying_alternative = FALSE;
+    state(data, FTP_USER);
+    data->state.ftp_trying_alternative = FALSE;
   }
   return result;
 }
 
-static CURLcode ftp_state_pwd(struct connectdata *conn)
+static CURLcode ftp_state_pwd(struct Curl_easy *data,
+                              struct connectdata *conn)
 {
-  CURLcode result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "PWD");
+  CURLcode result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "PWD");
   if(!result)
-    state(conn, FTP_PWD);
+    state(data, FTP_PWD);
 
   return result;
 }
 
 /* For the FTP "protocol connect" and "doing" phases only */
-static int ftp_getsock(struct connectdata *conn,
+static int ftp_getsock(struct Curl_easy *data,
+                       struct connectdata *conn,
                        curl_socket_t *socks)
 {
-  return Curl_pp_getsock(&conn->proto.ftpc.pp, socks);
+  return Curl_pp_getsock(data, &conn->proto.ftpc.pp, socks);
 }
 
 /* For the FTP "DO_MORE" phase only */
-static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int ftp_domore_getsock(struct Curl_easy *data,
+                              struct connectdata *conn, curl_socket_t *socks)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
+  (void)data;
 
   /* When in DO_MORE state, we could be either waiting for us to connect to a
    * remote site, or we could wait for that site to connect to us. Or just
@@ -813,7 +831,7 @@
        connect on the secondary connection */
     socks[0] = conn->sock[FIRSTSOCKET];
 
-    if(!conn->data->set.ftp_use_port) {
+    if(!data->set.ftp_use_port) {
       int s;
       int i;
       /* PORT is used to tell the server to connect to us, and during that we
@@ -833,7 +851,7 @@
 
     return bits;
   }
-  return Curl_pp_getsock(&conn->proto.ftpc.pp, socks);
+  return Curl_pp_getsock(data, &conn->proto.ftpc.pp, socks);
 }
 
 /* This is called after the FTP_QUOTE state is passed.
@@ -842,17 +860,18 @@
    the correct directory. It may also need to send MKD commands to create
    missing ones, if that option is enabled.
 */
-static CURLcode ftp_state_cwd(struct connectdata *conn)
+static CURLcode ftp_state_cwd(struct Curl_easy *data,
+                              struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   if(ftpc->cwddone)
     /* already done and fine */
-    result = ftp_state_mdtm(conn);
+    result = ftp_state_mdtm(data);
   else {
     /* FTPFILE_NOCWD with full path: expect ftpc->cwddone! */
-    DEBUGASSERT((conn->data->set.ftp_filemethod != FTPFILE_NOCWD) ||
+    DEBUGASSERT((data->set.ftp_filemethod != FTPFILE_NOCWD) ||
                 !(ftpc->dirdepth && ftpc->dirs[0][0] == '/'));
 
     ftpc->count2 = 0; /* count2 counts failed CWDs */
@@ -860,7 +879,7 @@
     /* count3 is set to allow a MKD to fail once. In the case when first CWD
        fails and then MKD fails (due to another session raced it to create the
        dir) this then allows for a second try to CWD to it */
-    ftpc->count3 = (conn->data->set.ftp_create_missing_dirs == 2)?1:0;
+    ftpc->count3 = (data->set.ftp_create_missing_dirs == 2)?1:0;
 
     if(conn->bits.reuse && ftpc->entrypath &&
        /* no need to go to entrypath when we have an absolute path */
@@ -870,23 +889,23 @@
          where we ended up after login: */
       ftpc->cwdcount = 0; /* we count this as the first path, then we add one
                              for all upcoming ones in the ftp->dirs[] array */
-      result = Curl_pp_sendf(&ftpc->pp, "CWD %s", ftpc->entrypath);
+      result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s", ftpc->entrypath);
       if(!result)
-        state(conn, FTP_CWD);
+        state(data, FTP_CWD);
     }
     else {
       if(ftpc->dirdepth) {
         ftpc->cwdcount = 1;
         /* issue the first CWD, the rest is sent when the CWD responses are
            received... */
-        result = Curl_pp_sendf(&ftpc->pp, "CWD %s",
+        result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s",
                                ftpc->dirs[ftpc->cwdcount -1]);
         if(!result)
-          state(conn, FTP_CWD);
+          state(data, FTP_CWD);
       }
       else {
         /* No CWD necessary */
-        result = ftp_state_mdtm(conn);
+        result = ftp_state_mdtm(data);
       }
     }
   }
@@ -899,13 +918,12 @@
   DONE
 } ftpport;
 
-static CURLcode ftp_state_use_port(struct connectdata *conn,
+static CURLcode ftp_state_use_port(struct Curl_easy *data,
                                    ftpport fcmd) /* start with this */
-
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
-  struct Curl_easy *data = conn->data;
   curl_socket_t portsock = CURL_SOCKET_BAD;
   char myhost[MAX_IPADR_LEN + 1] = "";
 
@@ -1062,9 +1080,9 @@
   }
 
   /* resolv ip/host to ip */
-  rc = Curl_resolv(conn, host, 0, FALSE, &h);
+  rc = Curl_resolv(data, host, 0, FALSE, &h);
   if(rc == CURLRESOLV_PENDING)
-    (void)Curl_resolver_wait_resolv(conn, &h);
+    (void)Curl_resolver_wait_resolv(data, &h);
   if(h) {
     res = h->addr;
     /* when we return from this function, we can forget about this entry
@@ -1074,7 +1092,7 @@
   else
     res = NULL; /* failure! */
 
-  if(res == NULL) {
+  if(!res) {
     failf(data, "failed to resolve the address provided to PORT: %s", host);
     free(addr);
     return CURLE_FTP_PORT_FAILED;
@@ -1088,7 +1106,7 @@
   portsock = CURL_SOCKET_BAD;
   error = 0;
   for(ai = res; ai; ai = ai->ai_next) {
-    result = Curl_socket(conn, ai, NULL, &portsock);
+    result = Curl_socket(data, ai, NULL, &portsock);
     if(result) {
       error = SOCKERRNO;
       continue;
@@ -1121,14 +1139,14 @@
         /* The requested bind address is not local.  Use the address used for
          * the control connection instead and restart the port loop
          */
-        infof(data, "bind(port=%hu) on non-local address failed: %s\n", port,
+        infof(data, "bind(port=%hu) on non-local address failed: %s", port,
               Curl_strerror(error, buffer, sizeof(buffer)));
 
         sslen = sizeof(ss);
         if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) {
           failf(data, "getsockname() failed: %s",
                 Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
-          Curl_closesocket(conn, portsock);
+          Curl_closesocket(data, conn, portsock);
           return CURLE_FTP_PORT_FAILED;
         }
         port = port_min;
@@ -1138,7 +1156,7 @@
       if(error != EADDRINUSE && error != EACCES) {
         failf(data, "bind(port=%hu) failed: %s", port,
               Curl_strerror(error, buffer, sizeof(buffer)));
-        Curl_closesocket(conn, portsock);
+        Curl_closesocket(data, conn, portsock);
         return CURLE_FTP_PORT_FAILED;
       }
     }
@@ -1151,7 +1169,7 @@
   /* maybe all ports were in use already*/
   if(port > port_max) {
     failf(data, "bind() failed, we ran out of ports!");
-    Curl_closesocket(conn, portsock);
+    Curl_closesocket(data, conn, portsock);
     return CURLE_FTP_PORT_FAILED;
   }
 
@@ -1161,7 +1179,7 @@
   if(getsockname(portsock, (struct sockaddr *)sa, &sslen)) {
     failf(data, "getsockname() failed: %s",
           Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
-    Curl_closesocket(conn, portsock);
+    Curl_closesocket(data, conn, portsock);
     return CURLE_FTP_PORT_FAILED;
   }
 
@@ -1170,7 +1188,7 @@
   if(listen(portsock, 1)) {
     failf(data, "socket failure: %s",
           Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
-    Curl_closesocket(conn, portsock);
+    Curl_closesocket(data, conn, portsock);
     return CURLE_FTP_PORT_FAILED;
   }
 
@@ -1219,17 +1237,17 @@
        * EPRT |2|1080::8:800:200C:417A|5282|
        */
 
-      result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd],
+      result = Curl_pp_sendf(data, &ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd],
                              sa->sa_family == AF_INET?1:2,
                              myhost, port);
       if(result) {
         failf(data, "Failure sending EPRT command: %s",
               curl_easy_strerror(result));
-        Curl_closesocket(conn, portsock);
+        Curl_closesocket(data, conn, portsock);
         /* don't retry using PORT */
         ftpc->count1 = PORT;
         /* bail out */
-        state(conn, FTP_STOP);
+        state(data, FTP_STOP);
         return result;
       }
       break;
@@ -1252,13 +1270,13 @@
       *dest = 0;
       msnprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff));
 
-      result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], target);
+      result = Curl_pp_sendf(data, &ftpc->pp, "%s %s", mode[fcmd], target);
       if(result) {
         failf(data, "Failure sending PORT command: %s",
               curl_easy_strerror(result));
-        Curl_closesocket(conn, portsock);
+        Curl_closesocket(data, conn, portsock);
         /* bail out */
-        state(conn, FTP_STOP);
+        state(data, FTP_STOP);
         return result;
       }
       break;
@@ -1268,7 +1286,7 @@
   /* store which command was sent */
   ftpc->count1 = fcmd;
 
-  close_secondarysocket(conn);
+  close_secondarysocket(data, conn);
 
   /* we set the secondary socket variable to this for now, it is only so that
      the cleanup function will close it in case we fail before the true
@@ -1284,11 +1302,12 @@
   */
   conn->bits.tcpconnect[SECONDARYSOCKET] = TRUE;
 
-  state(conn, FTP_PORT);
+  state(data, FTP_PORT);
   return result;
 }
 
-static CURLcode ftp_state_use_pasv(struct connectdata *conn)
+static CURLcode ftp_state_use_pasv(struct Curl_easy *data,
+                                   struct connectdata *conn)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   CURLcode result = CURLE_OK;
@@ -1318,11 +1337,11 @@
 
   modeoff = conn->bits.ftp_use_epsv?0:1;
 
-  result = Curl_pp_sendf(&ftpc->pp, "%s", mode[modeoff]);
+  result = Curl_pp_sendf(data, &ftpc->pp, "%s", mode[modeoff]);
   if(!result) {
     ftpc->count1 = modeoff;
-    state(conn, FTP_PASV);
-    infof(conn->data, "Connect data stream passively\n");
+    state(data, FTP_PASV);
+    infof(data, "Connect data stream passively");
   }
   return result;
 }
@@ -1334,22 +1353,22 @@
  * request is made. Thus, if an actual transfer is to be made this is where we
  * take off for real.
  */
-static CURLcode ftp_state_prepare_transfer(struct connectdata *conn)
+static CURLcode ftp_state_prepare_transfer(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct FTP *ftp = conn->data->req.protop;
-  struct Curl_easy *data = conn->data;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
 
-  if(ftp->transfer != FTPTRANSFER_BODY) {
+  if(ftp->transfer != PPTRANSFER_BODY) {
     /* doesn't transfer any data */
 
     /* still possibly do PRE QUOTE jobs */
-    state(conn, FTP_RETR_PREQUOTE);
-    result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE);
+    state(data, FTP_RETR_PREQUOTE);
+    result = ftp_state_quote(data, TRUE, FTP_RETR_PREQUOTE);
   }
   else if(data->set.ftp_use_port) {
     /* We have chosen to use the PORT (or similar) command */
-    result = ftp_state_use_port(conn, EPRT);
+    result = ftp_state_use_port(data, EPRT);
   }
   else {
     /* We have chosen (this is default) to use the PASV (or similar) command */
@@ -1358,71 +1377,73 @@
          to prepare the server for the upcoming PASV */
       struct ftp_conn *ftpc = &conn->proto.ftpc;
       if(!conn->proto.ftpc.file)
-        result = Curl_pp_sendf(&ftpc->pp, "PRET %s",
+        result = Curl_pp_sendf(data, &ftpc->pp, "PRET %s",
                                data->set.str[STRING_CUSTOMREQUEST]?
                                data->set.str[STRING_CUSTOMREQUEST]:
-                               (data->set.ftp_list_only?"NLST":"LIST"));
+                               (data->state.list_only?"NLST":"LIST"));
       else if(data->set.upload)
-        result = Curl_pp_sendf(&ftpc->pp, "PRET STOR %s",
+        result = Curl_pp_sendf(data, &ftpc->pp, "PRET STOR %s",
                                conn->proto.ftpc.file);
       else
-        result = Curl_pp_sendf(&ftpc->pp, "PRET RETR %s",
+        result = Curl_pp_sendf(data, &ftpc->pp, "PRET RETR %s",
                                conn->proto.ftpc.file);
       if(!result)
-        state(conn, FTP_PRET);
+        state(data, FTP_PRET);
     }
     else
-      result = ftp_state_use_pasv(conn);
+      result = ftp_state_use_pasv(data, conn);
   }
   return result;
 }
 
-static CURLcode ftp_state_rest(struct connectdata *conn)
+static CURLcode ftp_state_rest(struct Curl_easy *data,
+                               struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct FTP *ftp = conn->data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
-  if((ftp->transfer != FTPTRANSFER_BODY) && ftpc->file) {
+  if((ftp->transfer != PPTRANSFER_BODY) && ftpc->file) {
     /* if a "head"-like request is being made (on a file) */
 
     /* Determine if server can respond to REST command and therefore
        whether it supports range */
-    result = Curl_pp_sendf(&ftpc->pp, "REST %d", 0);
+    result = Curl_pp_sendf(data, &ftpc->pp, "REST %d", 0);
     if(!result)
-      state(conn, FTP_REST);
+      state(data, FTP_REST);
   }
   else
-    result = ftp_state_prepare_transfer(conn);
+    result = ftp_state_prepare_transfer(data);
 
   return result;
 }
 
-static CURLcode ftp_state_size(struct connectdata *conn)
+static CURLcode ftp_state_size(struct Curl_easy *data,
+                               struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct FTP *ftp = conn->data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
-  if((ftp->transfer == FTPTRANSFER_INFO) && ftpc->file) {
+  if((ftp->transfer == PPTRANSFER_INFO) && ftpc->file) {
     /* if a "head"-like request is being made (on a file) */
 
     /* we know ftpc->file is a valid pointer to a file name */
-    result = Curl_pp_sendf(&ftpc->pp, "SIZE %s", ftpc->file);
+    result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file);
     if(!result)
-      state(conn, FTP_SIZE);
+      state(data, FTP_SIZE);
   }
   else
-    result = ftp_state_rest(conn);
+    result = ftp_state_rest(data, conn);
 
   return result;
 }
 
-static CURLcode ftp_state_list(struct connectdata *conn)
+static CURLcode ftp_state_list(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
 
   /* If this output is to be machine-parsed, the NLST command might be better
      to use, since the LIST command output is not specified or standard in any
@@ -1466,7 +1487,7 @@
   cmd = aprintf("%s%s%s",
                 data->set.str[STRING_CUSTOMREQUEST]?
                 data->set.str[STRING_CUSTOMREQUEST]:
-                (data->set.ftp_list_only?"NLST":"LIST"),
+                (data->state.list_only?"NLST":"LIST"),
                 lstArg? " ": "",
                 lstArg? lstArg: "");
   free(lstArg);
@@ -1474,64 +1495,64 @@
   if(!cmd)
     return CURLE_OUT_OF_MEMORY;
 
-  result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", cmd);
+  result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", cmd);
   free(cmd);
 
   if(!result)
-    state(conn, FTP_LIST);
+    state(data, FTP_LIST);
 
   return result;
 }
 
-static CURLcode ftp_state_retr_prequote(struct connectdata *conn)
+static CURLcode ftp_state_retr_prequote(struct Curl_easy *data)
 {
   /* We've sent the TYPE, now we must send the list of prequote strings */
-  return ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE);
+  return ftp_state_quote(data, TRUE, FTP_RETR_PREQUOTE);
 }
 
-static CURLcode ftp_state_stor_prequote(struct connectdata *conn)
+static CURLcode ftp_state_stor_prequote(struct Curl_easy *data)
 {
   /* We've sent the TYPE, now we must send the list of prequote strings */
-  return ftp_state_quote(conn, TRUE, FTP_STOR_PREQUOTE);
+  return ftp_state_quote(data, TRUE, FTP_STOR_PREQUOTE);
 }
 
-static CURLcode ftp_state_type(struct connectdata *conn)
+static CURLcode ftp_state_type(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct FTP *ftp = conn->data->req.protop;
-  struct Curl_easy *data = conn->data;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   /* If we have selected NOBODY and HEADER, it means that we only want file
      information. Which in FTP can't be much more than the file size and
      date. */
   if(data->set.opt_no_body && ftpc->file &&
-     ftp_need_type(conn, data->set.prefer_ascii)) {
+     ftp_need_type(conn, data->state.prefer_ascii)) {
     /* The SIZE command is _not_ RFC 959 specified, and therefore many servers
        may not support it! It is however the only way we have to get a file's
        size! */
 
-    ftp->transfer = FTPTRANSFER_INFO;
+    ftp->transfer = PPTRANSFER_INFO;
     /* this means no actual transfer will be made */
 
     /* Some servers return different sizes for different modes, and thus we
        must set the proper type before we check the size */
-    result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_TYPE);
+    result = ftp_nb_type(data, conn, data->state.prefer_ascii, FTP_TYPE);
     if(result)
       return result;
   }
   else
-    result = ftp_state_size(conn);
+    result = ftp_state_size(data, conn);
 
   return result;
 }
 
 /* This is called after the CWD commands have been done in the beginning of
    the DO phase */
-static CURLcode ftp_state_mdtm(struct connectdata *conn)
+static CURLcode ftp_state_mdtm(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   /* Requested time of file or time-depended transfer? */
@@ -1539,26 +1560,27 @@
 
     /* we have requested to get the modified-time of the file, this is a white
        spot as the MDTM is not mentioned in RFC959 */
-    result = Curl_pp_sendf(&ftpc->pp, "MDTM %s", ftpc->file);
+    result = Curl_pp_sendf(data, &ftpc->pp, "MDTM %s", ftpc->file);
 
     if(!result)
-      state(conn, FTP_MDTM);
+      state(data, FTP_MDTM);
   }
   else
-    result = ftp_state_type(conn);
+    result = ftp_state_type(data);
 
   return result;
 }
 
 
 /* This is called after the TYPE and possible quote commands have been sent */
-static CURLcode ftp_state_ul_setup(struct connectdata *conn,
+static CURLcode ftp_state_ul_setup(struct Curl_easy *data,
                                    bool sizechecked)
 {
   CURLcode result = CURLE_OK;
-  struct FTP *ftp = conn->data->req.protop;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
+  struct FTP *ftp = data->req.p.ftp;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
+  bool append = data->set.remote_append;
 
   if((data->state.resume_from && !sizechecked) ||
      ((data->state.resume_from > 0) && sizechecked)) {
@@ -1578,14 +1600,14 @@
 
     if(data->state.resume_from < 0) {
       /* Got no given size to start from, figure it out */
-      result = Curl_pp_sendf(&ftpc->pp, "SIZE %s", ftpc->file);
+      result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file);
       if(!result)
-        state(conn, FTP_STOR_SIZE);
+        state(data, FTP_STOR_SIZE);
       return result;
     }
 
     /* enable append */
-    data->set.ftp_append = TRUE;
+    append = TRUE;
 
     /* Let's read off the proper amount of bytes from the input. */
     if(conn->seek_func) {
@@ -1626,37 +1648,37 @@
       data->state.infilesize -= data->state.resume_from;
 
       if(data->state.infilesize <= 0) {
-        infof(data, "File already completely uploaded\n");
+        infof(data, "File already completely uploaded");
 
         /* no data to transfer */
         Curl_setup_transfer(data, -1, -1, FALSE, -1);
 
         /* Set ->transfer so that we won't get any error in
          * ftp_done() because we didn't transfer anything! */
-        ftp->transfer = FTPTRANSFER_NONE;
+        ftp->transfer = PPTRANSFER_NONE;
 
-        state(conn, FTP_STOP);
+        state(data, FTP_STOP);
         return CURLE_OK;
       }
     }
     /* we've passed, proceed as normal */
   } /* resume_from */
 
-  result = Curl_pp_sendf(&ftpc->pp, data->set.ftp_append?"APPE %s":"STOR %s",
+  result = Curl_pp_sendf(data, &ftpc->pp, append?"APPE %s":"STOR %s",
                          ftpc->file);
   if(!result)
-    state(conn, FTP_STOR);
+    state(data, FTP_STOR);
 
   return result;
 }
 
-static CURLcode ftp_state_quote(struct connectdata *conn,
+static CURLcode ftp_state_quote(struct Curl_easy *data,
                                 bool init,
                                 ftpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   bool quote = FALSE;
   struct curl_slist *item;
@@ -1703,10 +1725,10 @@
       else
         ftpc->count2 = 0; /* failure means cancel operation */
 
-      result = Curl_pp_sendf(&ftpc->pp, "%s", cmd);
+      result = Curl_pp_sendf(data, &ftpc->pp, "%s", cmd);
       if(result)
         return result;
-      state(conn, instate);
+      state(data, instate);
       quote = TRUE;
     }
   }
@@ -1716,38 +1738,44 @@
     switch(instate) {
     case FTP_QUOTE:
     default:
-      result = ftp_state_cwd(conn);
+      result = ftp_state_cwd(data, conn);
       break;
     case FTP_RETR_PREQUOTE:
-      if(ftp->transfer != FTPTRANSFER_BODY)
-        state(conn, FTP_STOP);
+      if(ftp->transfer != PPTRANSFER_BODY)
+        state(data, FTP_STOP);
       else {
         if(ftpc->known_filesize != -1) {
           Curl_pgrsSetDownloadSize(data, ftpc->known_filesize);
-          result = ftp_state_retr(conn, ftpc->known_filesize);
+          result = ftp_state_retr(data, ftpc->known_filesize);
         }
         else {
-          if(data->set.ignorecl) {
-            /* This code is to support download of growing files.  It prevents
-               the state machine from requesting the file size from the
-               server.  With an unknown file size the download continues until
-               the server terminates it, otherwise the client stops if the
-               received byte count exceeds the reported file size.  Set option
-               CURLOPT_IGNORE_CONTENT_LENGTH to 1 to enable this behavior.*/
-            result = Curl_pp_sendf(&ftpc->pp, "RETR %s", ftpc->file);
+          if(data->set.ignorecl || data->state.prefer_ascii) {
+            /* 'ignorecl' is used to support download of growing files.  It
+               prevents the state machine from requesting the file size from
+               the server.  With an unknown file size the download continues
+               until the server terminates it, otherwise the client stops if
+               the received byte count exceeds the reported file size.  Set
+               option CURLOPT_IGNORE_CONTENT_LENGTH to 1 to enable this
+               behavior.
+
+               In addition: asking for the size for 'TYPE A' transfers is not
+               constructive since servers don't report the converted size. So
+               skip it.
+            */
+            result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file);
             if(!result)
-              state(conn, FTP_RETR);
+              state(data, FTP_RETR);
           }
           else {
-            result = Curl_pp_sendf(&ftpc->pp, "SIZE %s", ftpc->file);
+            result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file);
             if(!result)
-              state(conn, FTP_RETR_SIZE);
+              state(data, FTP_RETR_SIZE);
           }
         }
       }
       break;
     case FTP_STOR_PREQUOTE:
-      result = ftp_state_ul_setup(conn, FALSE);
+      result = ftp_state_ul_setup(data, FALSE);
       break;
     case FTP_POSTQUOTE:
       break;
@@ -1759,7 +1787,8 @@
 
 /* called from ftp_state_pasv_resp to switch to PASV in case of EPSV
    problems */
-static CURLcode ftp_epsv_disable(struct connectdata *conn)
+static CURLcode ftp_epsv_disable(struct Curl_easy *data,
+                                 struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
 
@@ -1769,20 +1798,20 @@
 #endif
     ) {
     /* We can't disable EPSV when doing IPv6, so this is instead a fail */
-    failf(conn->data, "Failed EPSV attempt, exiting\n");
+    failf(data, "Failed EPSV attempt, exiting");
     return CURLE_WEIRD_SERVER_REPLY;
   }
 
-  infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
+  infof(data, "Failed EPSV attempt. Disabling EPSV");
   /* disable it for next transfer */
   conn->bits.ftp_use_epsv = FALSE;
-  conn->data->state.errorbuf = FALSE; /* allow error message to get
+  data->state.errorbuf = FALSE; /* allow error message to get
                                          rewritten */
-  result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "PASV");
+  result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "PASV");
   if(!result) {
     conn->proto.ftpc.count1++;
     /* remain in/go to the FTP_PASV state */
-    state(conn, FTP_PASV);
+    state(data, FTP_PASV);
   }
   return result;
 }
@@ -1798,15 +1827,15 @@
   if(conn->bits.tunnel_proxy || conn->bits.socksproxy)
     return conn->host.name;
 #endif
-  return conn->ip_addr_str;
+  return conn->primary_ip;
 }
 
-static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
+static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
                                     int ftpcode)
 {
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   struct Curl_dns_entry *addr = NULL;
   enum resolve_t rc;
   unsigned short connectport; /* the local port connect() should use! */
@@ -1892,7 +1921,7 @@
     if(data->set.ftp_skip_ip) {
       /* told to ignore the remotely given IP but instead use the host we used
          for the control connection */
-      infof(data, "Skip %u.%u.%u.%u for data connection, re-use %s instead\n",
+      infof(data, "Skip %u.%u.%u.%u for data connection, re-use %s instead",
             ip[0], ip[1], ip[2], ip[3],
             conn->host.name);
       ftpc->newhost = strdup(control_address(conn));
@@ -1907,7 +1936,7 @@
   }
   else if(ftpc->count1 == 0) {
     /* EPSV failed, move on to PASV */
-    return ftp_epsv_disable(conn);
+    return ftp_epsv_disable(data, conn);
   }
   else {
     failf(data, "Bad PASV/EPSV response: %03d", ftpcode);
@@ -1923,11 +1952,11 @@
      */
     const char * const host_name = conn->bits.socksproxy ?
       conn->socks_proxy.host.name : conn->http_proxy.host.name;
-    rc = Curl_resolv(conn, host_name, (int)conn->port, FALSE, &addr);
+    rc = Curl_resolv(data, host_name, (int)conn->port, FALSE, &addr);
     if(rc == CURLRESOLV_PENDING)
       /* BLOCKING, ignores the return code but 'addr' will be NULL in
          case of failure */
-      (void)Curl_resolver_wait_resolv(conn, &addr);
+      (void)Curl_resolver_wait_resolv(data, &addr);
 
     connectport =
       (unsigned short)conn->port; /* we connect to the proxy's port */
@@ -1941,10 +1970,21 @@
 #endif
   {
     /* normal, direct, ftp connection */
-    rc = Curl_resolv(conn, ftpc->newhost, ftpc->newport, FALSE, &addr);
+    DEBUGASSERT(ftpc->newhost);
+
+    /* postponed address resolution in case of tcp fastopen */
+    if(conn->bits.tcp_fastopen && !conn->bits.reuse && !ftpc->newhost[0]) {
+      Curl_conninfo_remote(data, conn, conn->sock[FIRSTSOCKET]);
+      Curl_safefree(ftpc->newhost);
+      ftpc->newhost = strdup(control_address(conn));
+      if(!ftpc->newhost)
+        return CURLE_OUT_OF_MEMORY;
+    }
+
+    rc = Curl_resolv(data, ftpc->newhost, ftpc->newport, FALSE, &addr);
     if(rc == CURLRESOLV_PENDING)
       /* BLOCKING */
-      (void)Curl_resolver_wait_resolv(conn, &addr);
+      (void)Curl_resolver_wait_resolv(data, &addr);
 
     connectport = ftpc->newport; /* we connect to the remote port */
 
@@ -1955,12 +1995,12 @@
   }
 
   conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE;
-  result = Curl_connecthost(conn, addr);
+  result = Curl_connecthost(data, conn, addr);
 
   if(result) {
     Curl_resolv_unlock(data, addr); /* we're done using this address */
     if(ftpc->count1 == 0 && ftpcode == 229)
-      return ftp_epsv_disable(conn);
+      return ftp_epsv_disable(data, conn);
 
     return result;
   }
@@ -1974,7 +2014,7 @@
 
   if(data->set.verbose)
     /* this just dumps information about this second connection */
-    ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport);
+    ftp_pasv_verbose(data, addr->addr, ftpc->newhost, connectport);
 
   Curl_resolv_unlock(data, addr); /* we're done using this address */
 
@@ -1985,15 +2025,15 @@
     return CURLE_OUT_OF_MEMORY;
 
   conn->bits.do_more = TRUE;
-  state(conn, FTP_STOP); /* this phase is completed */
+  state(data, FTP_STOP); /* this phase is completed */
 
   return result;
 }
 
-static CURLcode ftp_state_port_resp(struct connectdata *conn,
+static CURLcode ftp_state_port_resp(struct Curl_easy *data,
                                     int ftpcode)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   ftpport fcmd = (ftpport)ftpc->count1;
   CURLcode result = CURLE_OK;
@@ -2004,7 +2044,7 @@
     /* the command failed */
 
     if(EPRT == fcmd) {
-      infof(data, "disabling EPRT usage\n");
+      infof(data, "disabling EPRT usage");
       conn->bits.ftp_use_eprt = FALSE;
     }
     fcmd++;
@@ -2015,23 +2055,23 @@
     }
     else
       /* try next */
-      result = ftp_state_use_port(conn, fcmd);
+      result = ftp_state_use_port(data, fcmd);
   }
   else {
-    infof(data, "Connect data stream actively\n");
-    state(conn, FTP_STOP); /* end of DO phase */
-    result = ftp_dophase_done(conn, FALSE);
+    infof(data, "Connect data stream actively");
+    state(data, FTP_STOP); /* end of DO phase */
+    result = ftp_dophase_done(data, FALSE);
   }
 
   return result;
 }
 
-static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
+static CURLcode ftp_state_mdtm_resp(struct Curl_easy *data,
                                     int ftpcode)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   switch(ftpcode) {
@@ -2060,6 +2100,7 @@
          data->set.get_filetime &&
          (data->info.filetime >= 0) ) {
         char headerbuf[128];
+        int headerbuflen;
         time_t filetime = data->info.filetime;
         struct tm buffer;
         const struct tm *tm = &buffer;
@@ -2069,7 +2110,7 @@
           return result;
 
         /* format: "Tue, 15 Nov 1994 12:45:26" */
-        msnprintf(headerbuf, sizeof(headerbuf),
+        headerbuflen = msnprintf(headerbuf, sizeof(headerbuf),
                   "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
                   Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
                   tm->tm_mday,
@@ -2078,7 +2119,8 @@
                   tm->tm_hour,
                   tm->tm_min,
                   tm->tm_sec);
-        result = Curl_client_write(conn, CLIENTWRITE_BOTH, headerbuf, 0);
+        result = Curl_client_write(data, CLIENTWRITE_BOTH, headerbuf,
+                                   headerbuflen);
         if(result)
           return result;
       } /* end of a ridiculous amount of conditionals */
@@ -2086,7 +2128,7 @@
     }
     break;
   default:
-    infof(data, "unsupported MDTM reply format\n");
+    infof(data, "unsupported MDTM reply format");
     break;
   case 550: /* "No such file or directory" */
     failf(data, "Given file does not exist");
@@ -2100,41 +2142,41 @@
       case CURL_TIMECOND_IFMODSINCE:
       default:
         if(data->info.filetime <= data->set.timevalue) {
-          infof(data, "The requested document is not new enough\n");
-          ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */
+          infof(data, "The requested document is not new enough");
+          ftp->transfer = PPTRANSFER_NONE; /* mark to not transfer data */
           data->info.timecond = TRUE;
-          state(conn, FTP_STOP);
+          state(data, FTP_STOP);
           return CURLE_OK;
         }
         break;
       case CURL_TIMECOND_IFUNMODSINCE:
         if(data->info.filetime > data->set.timevalue) {
-          infof(data, "The requested document is not old enough\n");
-          ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */
+          infof(data, "The requested document is not old enough");
+          ftp->transfer = PPTRANSFER_NONE; /* mark to not transfer data */
           data->info.timecond = TRUE;
-          state(conn, FTP_STOP);
+          state(data, FTP_STOP);
           return CURLE_OK;
         }
         break;
       } /* switch */
     }
     else {
-      infof(data, "Skipping time comparison\n");
+      infof(data, "Skipping time comparison");
     }
   }
 
   if(!result)
-    result = ftp_state_type(conn);
+    result = ftp_state_type(data);
 
   return result;
 }
 
-static CURLcode ftp_state_type_resp(struct connectdata *conn,
+static CURLcode ftp_state_type_resp(struct Curl_easy *data,
                                     int ftpcode,
                                     ftpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   if(ftpcode/100 != 2) {
     /* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a
@@ -2144,27 +2186,27 @@
     return CURLE_FTP_COULDNT_SET_TYPE;
   }
   if(ftpcode != 200)
-    infof(data, "Got a %03d response code instead of the assumed 200\n",
+    infof(data, "Got a %03d response code instead of the assumed 200",
           ftpcode);
 
   if(instate == FTP_TYPE)
-    result = ftp_state_size(conn);
+    result = ftp_state_size(data, conn);
   else if(instate == FTP_LIST_TYPE)
-    result = ftp_state_list(conn);
+    result = ftp_state_list(data);
   else if(instate == FTP_RETR_TYPE)
-    result = ftp_state_retr_prequote(conn);
+    result = ftp_state_retr_prequote(data);
   else if(instate == FTP_STOR_TYPE)
-    result = ftp_state_stor_prequote(conn);
+    result = ftp_state_stor_prequote(data);
 
   return result;
 }
 
-static CURLcode ftp_state_retr(struct connectdata *conn,
-                                         curl_off_t filesize)
+static CURLcode ftp_state_retr(struct Curl_easy *data,
+                               curl_off_t filesize)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   if(data->set.max_filesize && (filesize > data->set.max_filesize)) {
@@ -2177,7 +2219,7 @@
     /* We always (attempt to) get the size of downloads, so it is done before
        this even when not doing resumes. */
     if(filesize == -1) {
-      infof(data, "ftp server doesn't support SIZE\n");
+      infof(data, "ftp server doesn't support SIZE");
       /* We couldn't get the size and therefore we can't know if there really
          is a part of the file left to get, although the server will just
          close the connection when we start the connection so it won't cause
@@ -2214,40 +2256,39 @@
     if(ftp->downloadsize == 0) {
       /* no data to transfer */
       Curl_setup_transfer(data, -1, -1, FALSE, -1);
-      infof(data, "File already completely downloaded\n");
+      infof(data, "File already completely downloaded");
 
       /* Set ->transfer so that we won't get any error in ftp_done()
        * because we didn't transfer the any file */
-      ftp->transfer = FTPTRANSFER_NONE;
-      state(conn, FTP_STOP);
+      ftp->transfer = PPTRANSFER_NONE;
+      state(data, FTP_STOP);
       return CURLE_OK;
     }
 
     /* Set resume file transfer offset */
     infof(data, "Instructs server to resume from offset %"
-          CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
+          CURL_FORMAT_CURL_OFF_T, data->state.resume_from);
 
-    result = Curl_pp_sendf(&ftpc->pp, "REST %" CURL_FORMAT_CURL_OFF_T,
+    result = Curl_pp_sendf(data, &ftpc->pp, "REST %" CURL_FORMAT_CURL_OFF_T,
                            data->state.resume_from);
     if(!result)
-      state(conn, FTP_RETR_REST);
+      state(data, FTP_RETR_REST);
   }
   else {
     /* no resume */
-    result = Curl_pp_sendf(&ftpc->pp, "RETR %s", ftpc->file);
+    result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file);
     if(!result)
-      state(conn, FTP_RETR);
+      state(data, FTP_RETR);
   }
 
   return result;
 }
 
-static CURLcode ftp_state_size_resp(struct connectdata *conn,
+static CURLcode ftp_state_size_resp(struct Curl_easy *data,
                                     int ftpcode,
                                     ftpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   curl_off_t filesize = -1;
   char *buf = data->state.buffer;
 
@@ -2272,37 +2313,42 @@
 
   }
   else if(ftpcode == 550) { /* "No such file or directory" */
-    failf(data, "The file does not exist");
-    return CURLE_REMOTE_FILE_NOT_FOUND;
+    /* allow a SIZE failure for (resumed) uploads, when probing what command
+       to use */
+    if(instate != FTP_STOR_SIZE) {
+      failf(data, "The file does not exist");
+      return CURLE_REMOTE_FILE_NOT_FOUND;
+    }
   }
 
   if(instate == FTP_SIZE) {
 #ifdef CURL_FTP_HTTPSTYLE_HEAD
     if(-1 != filesize) {
       char clbuf[128];
-      msnprintf(clbuf, sizeof(clbuf),
+      int clbuflen = msnprintf(clbuf, sizeof(clbuf),
                 "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize);
-      result = Curl_client_write(conn, CLIENTWRITE_BOTH, clbuf, 0);
+      result = Curl_client_write(data, CLIENTWRITE_BOTH, clbuf, clbuflen);
       if(result)
         return result;
     }
 #endif
     Curl_pgrsSetDownloadSize(data, filesize);
-    result = ftp_state_rest(conn);
+    result = ftp_state_rest(data, data->conn);
   }
   else if(instate == FTP_RETR_SIZE) {
     Curl_pgrsSetDownloadSize(data, filesize);
-    result = ftp_state_retr(conn, filesize);
+    result = ftp_state_retr(data, filesize);
   }
   else if(instate == FTP_STOR_SIZE) {
     data->state.resume_from = filesize;
-    result = ftp_state_ul_setup(conn, TRUE);
+    result = ftp_state_ul_setup(data, TRUE);
   }
 
   return result;
 }
 
-static CURLcode ftp_state_rest_resp(struct connectdata *conn,
+static CURLcode ftp_state_rest_resp(struct Curl_easy *data,
+                                    struct connectdata *conn,
                                     int ftpcode,
                                     ftpstate instate)
 {
@@ -2315,23 +2361,24 @@
 #ifdef CURL_FTP_HTTPSTYLE_HEAD
     if(ftpcode == 350) {
       char buffer[24]= { "Accept-ranges: bytes\r\n" };
-      result = Curl_client_write(conn, CLIENTWRITE_BOTH, buffer, 0);
+      result = Curl_client_write(data, CLIENTWRITE_BOTH, buffer,
+                                 strlen(buffer));
       if(result)
         return result;
     }
 #endif
-    result = ftp_state_prepare_transfer(conn);
+    result = ftp_state_prepare_transfer(data);
     break;
 
   case FTP_RETR_REST:
     if(ftpcode != 350) {
-      failf(conn->data, "Couldn't use REST");
+      failf(data, "Couldn't use REST");
       result = CURLE_FTP_COULDNT_USE_REST;
     }
     else {
-      result = Curl_pp_sendf(&ftpc->pp, "RETR %s", ftpc->file);
+      result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file);
       if(!result)
-        state(conn, FTP_RETR);
+        state(data, FTP_RETR);
     }
     break;
   }
@@ -2339,15 +2386,15 @@
   return result;
 }
 
-static CURLcode ftp_state_stor_resp(struct connectdata *conn,
+static CURLcode ftp_state_stor_resp(struct Curl_easy *data,
                                     int ftpcode, ftpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   if(ftpcode >= 400) {
     failf(data, "Failed FTP upload: %0d", ftpcode);
-    state(conn, FTP_STOP);
+    state(data, FTP_STOP);
     /* oops, we never close the sockets! */
     return CURLE_UPLOAD_FAILED;
   }
@@ -2358,31 +2405,31 @@
   if(data->set.ftp_use_port) {
     bool connected;
 
-    state(conn, FTP_STOP); /* no longer in STOR state */
+    state(data, FTP_STOP); /* no longer in STOR state */
 
-    result = AllowServerConnect(conn, &connected);
+    result = AllowServerConnect(data, &connected);
     if(result)
       return result;
 
     if(!connected) {
       struct ftp_conn *ftpc = &conn->proto.ftpc;
-      infof(data, "Data conn was not available immediately\n");
+      infof(data, "Data conn was not available immediately");
       ftpc->wait_data_conn = TRUE;
     }
 
     return CURLE_OK;
   }
-  return InitiateTransfer(conn);
+  return InitiateTransfer(data);
 }
 
 /* for LIST and RETR responses */
-static CURLcode ftp_state_get_resp(struct connectdata *conn,
-                                    int ftpcode,
-                                    ftpstate instate)
+static CURLcode ftp_state_get_resp(struct Curl_easy *data,
+                                   int ftpcode,
+                                   ftpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
 
   if((ftpcode == 150) || (ftpcode == 125)) {
 
@@ -2416,7 +2463,7 @@
      */
 
     if((instate != FTP_LIST) &&
-       !data->set.prefer_ascii &&
+       !data->state.prefer_ascii &&
        (ftp->downloadsize < 1)) {
       /*
        * It seems directory listings either don't show the size or very
@@ -2444,7 +2491,8 @@
           bytes--;
         }
         /* if we have nothing but digits: */
-        if(bytes++) {
+        if(bytes) {
+          ++bytes;
           /* get the number! */
           (void)curlx_strtoofft(bytes, NULL, 0, &size);
         }
@@ -2455,14 +2503,14 @@
 
     if(size > data->req.maxdownload && data->req.maxdownload > 0)
       size = data->req.size = data->req.maxdownload;
-    else if((instate != FTP_LIST) && (data->set.prefer_ascii))
+    else if((instate != FTP_LIST) && (data->state.prefer_ascii))
       size = -1; /* kludge for servers that understate ASCII mode file size */
 
-    infof(data, "Maxdownload = %" CURL_FORMAT_CURL_OFF_T "\n",
+    infof(data, "Maxdownload = %" CURL_FORMAT_CURL_OFF_T,
           data->req.maxdownload);
 
     if(instate != FTP_LIST)
-      infof(data, "Getting file with size: %" CURL_FORMAT_CURL_OFF_T "\n",
+      infof(data, "Getting file with size: %" CURL_FORMAT_CURL_OFF_T,
             size);
 
     /* FTP download: */
@@ -2472,25 +2520,25 @@
     if(data->set.ftp_use_port) {
       bool connected;
 
-      result = AllowServerConnect(conn, &connected);
+      result = AllowServerConnect(data, &connected);
       if(result)
         return result;
 
       if(!connected) {
         struct ftp_conn *ftpc = &conn->proto.ftpc;
-        infof(data, "Data conn was not available immediately\n");
-        state(conn, FTP_STOP);
+        infof(data, "Data conn was not available immediately");
+        state(data, FTP_STOP);
         ftpc->wait_data_conn = TRUE;
       }
     }
     else
-      return InitiateTransfer(conn);
+      return InitiateTransfer(data);
   }
   else {
     if((instate == FTP_LIST) && (ftpcode == 450)) {
       /* simply no matching files in the dir listing */
-      ftp->transfer = FTPTRANSFER_NONE; /* don't download anything */
-      state(conn, FTP_STOP); /* this phase is over */
+      ftp->transfer = PPTRANSFER_NONE; /* don't download anything */
+      state(data, FTP_STOP); /* this phase is over */
     }
     else {
       failf(data, "RETR response: %03d", ftpcode);
@@ -2504,9 +2552,10 @@
 }
 
 /* after USER, PASS and ACCT */
-static CURLcode ftp_state_loggedin(struct connectdata *conn)
+static CURLcode ftp_state_loggedin(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
   if(conn->bits.ftp_use_control_ssl) {
     /* PBSZ = PROTECTION BUFFER SIZE.
@@ -2523,23 +2572,23 @@
     parameter of '0' to indicate that no buffering is taking place
     and the data connection should not be encapsulated.
     */
-    result = Curl_pp_sendf(&conn->proto.ftpc.pp, "PBSZ %d", 0);
+    result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "PBSZ %d", 0);
     if(!result)
-      state(conn, FTP_PBSZ);
+      state(data, FTP_PBSZ);
   }
   else {
-    result = ftp_state_pwd(conn);
+    result = ftp_state_pwd(data, conn);
   }
   return result;
 }
 
 /* for USER and PASS responses */
-static CURLcode ftp_state_user_resp(struct connectdata *conn,
+static CURLcode ftp_state_user_resp(struct Curl_easy *data,
                                     int ftpcode,
                                     ftpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   (void)instate; /* no use for this yet */
 
@@ -2547,21 +2596,22 @@
   if((ftpcode == 331) && (ftpc->state == FTP_USER)) {
     /* 331 Password required for ...
        (the server requires to send the user's password too) */
-    result = Curl_pp_sendf(&ftpc->pp, "PASS %s", conn->passwd?conn->passwd:"");
+    result = Curl_pp_sendf(data, &ftpc->pp, "PASS %s",
+                           conn->passwd?conn->passwd:"");
     if(!result)
-      state(conn, FTP_PASS);
+      state(data, FTP_PASS);
   }
   else if(ftpcode/100 == 2) {
     /* 230 User ... logged in.
        (the user logged in with or without password) */
-    result = ftp_state_loggedin(conn);
+    result = ftp_state_loggedin(data);
   }
   else if(ftpcode == 332) {
     if(data->set.str[STRING_FTP_ACCOUNT]) {
-      result = Curl_pp_sendf(&ftpc->pp, "ACCT %s",
+      result = Curl_pp_sendf(data, &ftpc->pp, "ACCT %s",
                              data->set.str[STRING_FTP_ACCOUNT]);
       if(!result)
-        state(conn, FTP_ACCT);
+        state(data, FTP_ACCT);
     }
     else {
       failf(data, "ACCT requested but none available");
@@ -2574,15 +2624,15 @@
     530 User ... access denied
     (the server denies to log the specified user) */
 
-    if(conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER] &&
-        !conn->data->state.ftp_trying_alternative) {
+    if(data->set.str[STRING_FTP_ALTERNATIVE_TO_USER] &&
+        !data->state.ftp_trying_alternative) {
       /* Ok, USER failed.  Let's try the supplied command. */
       result =
-        Curl_pp_sendf(&ftpc->pp, "%s",
-                      conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER]);
+        Curl_pp_sendf(data, &ftpc->pp, "%s",
+                      data->set.str[STRING_FTP_ALTERNATIVE_TO_USER]);
       if(!result) {
-        conn->data->state.ftp_trying_alternative = TRUE;
-        state(conn, FTP_USER);
+        data->state.ftp_trying_alternative = TRUE;
+        state(data, FTP_USER);
       }
     }
     else {
@@ -2594,27 +2644,26 @@
 }
 
 /* for ACCT response */
-static CURLcode ftp_state_acct_resp(struct connectdata *conn,
+static CURLcode ftp_state_acct_resp(struct Curl_easy *data,
                                     int ftpcode)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   if(ftpcode != 230) {
     failf(data, "ACCT rejected by server: %03d", ftpcode);
     result = CURLE_FTP_WEIRD_PASS_REPLY; /* FIX */
   }
   else
-    result = ftp_state_loggedin(conn);
+    result = ftp_state_loggedin(data);
 
   return result;
 }
 
 
-static CURLcode ftp_statemach_act(struct connectdata *conn)
+static CURLcode ftp_statemachine(struct Curl_easy *data,
+                                 struct connectdata *conn)
 {
   CURLcode result;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  struct Curl_easy *data = conn->data;
   int ftpcode;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
@@ -2622,9 +2671,9 @@
   size_t nread = 0;
 
   if(pp->sendleft)
-    return Curl_pp_flushsend(pp);
+    return Curl_pp_flushsend(data, pp);
 
-  result = ftp_readresp(sock, pp, &ftpcode, &nread);
+  result = ftp_readresp(data, sock, pp, &ftpcode, &nread);
   if(result)
     return result;
 
@@ -2634,7 +2683,7 @@
     case FTP_WAIT220:
       if(ftpcode == 230)
         /* 230 User logged in - already! */
-        return ftp_state_user_resp(conn, ftpcode, ftpc->state);
+        return ftp_state_user_resp(data, ftpcode, ftpc->state);
       else if(ftpcode != 220) {
         failf(data, "Got a %03d ftp-server response when 220 was expected",
               ftpcode);
@@ -2652,10 +2701,10 @@
            set a valid level */
         Curl_sec_request_prot(conn, data->set.str[STRING_KRB_LEVEL]);
 
-        if(Curl_sec_login(conn))
-          infof(data, "Logging in with password in cleartext!\n");
+        if(Curl_sec_login(data, conn))
+          infof(data, "Logging in with password in cleartext!");
         else
-          infof(data, "Authentication successful\n");
+          infof(data, "Authentication successful");
       }
 #endif
 
@@ -2679,12 +2728,13 @@
                 (int)data->set.ftpsslauth);
           return CURLE_UNKNOWN_OPTION; /* we don't know what to do */
         }
-        result = Curl_pp_sendf(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]);
+        result = Curl_pp_sendf(data, &ftpc->pp, "AUTH %s",
+                               ftpauth[ftpc->count1]);
         if(!result)
-          state(conn, FTP_AUTH);
+          state(data, FTP_AUTH);
       }
       else
-        result = ftp_state_user(conn);
+        result = ftp_state_user(data, conn);
       break;
 
     case FTP_AUTH:
@@ -2699,17 +2749,18 @@
 
       if((ftpcode == 234) || (ftpcode == 334)) {
         /* Curl_ssl_connect is BLOCKING */
-        result = Curl_ssl_connect(conn, FIRSTSOCKET);
+        result = Curl_ssl_connect(data, conn, FIRSTSOCKET);
         if(!result) {
           conn->bits.ftp_use_data_ssl = FALSE; /* clear-text data */
           conn->bits.ftp_use_control_ssl = TRUE; /* SSL on control */
-          result = ftp_state_user(conn);
+          result = ftp_state_user(data, conn);
         }
       }
       else if(ftpc->count3 < 1) {
         ftpc->count3++;
         ftpc->count1 += ftpc->count2; /* get next attempt */
-        result = Curl_pp_sendf(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]);
+        result = Curl_pp_sendf(data, &ftpc->pp, "AUTH %s",
+                               ftpauth[ftpc->count1]);
         /* remain in this same state */
       }
       else {
@@ -2718,25 +2769,25 @@
           result = CURLE_USE_SSL_FAILED;
         else
           /* ignore the failure and continue */
-          result = ftp_state_user(conn);
+          result = ftp_state_user(data, conn);
       }
       break;
 
     case FTP_USER:
     case FTP_PASS:
-      result = ftp_state_user_resp(conn, ftpcode, ftpc->state);
+      result = ftp_state_user_resp(data, ftpcode, ftpc->state);
       break;
 
     case FTP_ACCT:
-      result = ftp_state_acct_resp(conn, ftpcode);
+      result = ftp_state_acct_resp(data, ftpcode);
       break;
 
     case FTP_PBSZ:
       result =
-        Curl_pp_sendf(&ftpc->pp, "PROT %c",
+        Curl_pp_sendf(data, &ftpc->pp, "PROT %c",
                       data->set.use_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
       if(!result)
-        state(conn, FTP_PROT);
+        state(data, FTP_PROT);
       break;
 
     case FTP_PROT:
@@ -2753,25 +2804,25 @@
       if(data->set.ftp_ccc) {
         /* CCC - Clear Command Channel
          */
-        result = Curl_pp_sendf(&ftpc->pp, "%s", "CCC");
+        result = Curl_pp_sendf(data, &ftpc->pp, "%s", "CCC");
         if(!result)
-          state(conn, FTP_CCC);
+          state(data, FTP_CCC);
       }
       else
-        result = ftp_state_pwd(conn);
+        result = ftp_state_pwd(data, conn);
       break;
 
     case FTP_CCC:
       if(ftpcode < 500) {
         /* First shut down the SSL layer (note: this call will block) */
-        result = Curl_ssl_shutdown(conn, FIRSTSOCKET);
+        result = Curl_ssl_shutdown(data, conn, FIRSTSOCKET);
 
         if(result)
-          failf(conn->data, "Failed to clear the command channel (CCC)");
+          failf(data, "Failed to clear the command channel (CCC)");
       }
       if(!result)
         /* Then continue as normal */
-        result = ftp_state_pwd(conn);
+        result = ftp_state_pwd(data, conn);
       break;
 
     case FTP_PWD:
@@ -2837,34 +2888,34 @@
              systems. */
 
           if(!ftpc->server_os && dir[0] != '/') {
-            result = Curl_pp_sendf(&ftpc->pp, "%s", "SYST");
+            result = Curl_pp_sendf(data, &ftpc->pp, "%s", "SYST");
             if(result) {
               free(dir);
               return result;
             }
             Curl_safefree(ftpc->entrypath);
             ftpc->entrypath = dir; /* remember this */
-            infof(data, "Entry path is '%s'\n", ftpc->entrypath);
+            infof(data, "Entry path is '%s'", ftpc->entrypath);
             /* also save it where getinfo can access it: */
             data->state.most_recent_ftp_entrypath = ftpc->entrypath;
-            state(conn, FTP_SYST);
+            state(data, FTP_SYST);
             break;
           }
 
           Curl_safefree(ftpc->entrypath);
           ftpc->entrypath = dir; /* remember this */
-          infof(data, "Entry path is '%s'\n", ftpc->entrypath);
+          infof(data, "Entry path is '%s'", ftpc->entrypath);
           /* also save it where getinfo can access it: */
           data->state.most_recent_ftp_entrypath = ftpc->entrypath;
         }
         else {
           /* couldn't get the path */
           free(dir);
-          infof(data, "Failed to figure out path\n");
+          infof(data, "Failed to figure out path");
         }
       }
-      state(conn, FTP_STOP); /* we are done with the CONNECT phase! */
-      DEBUGF(infof(data, "protocol connect phase DONE\n"));
+      state(data, FTP_STOP); /* we are done with the CONNECT phase! */
+      DEBUGF(infof(data, "protocol connect phase DONE"));
       break;
 
     case FTP_SYST:
@@ -2890,7 +2941,7 @@
 
         if(strcasecompare(os, "OS/400")) {
           /* Force OS400 name format 1. */
-          result = Curl_pp_sendf(&ftpc->pp, "%s", "SITE NAMEFMT 1");
+          result = Curl_pp_sendf(data, &ftpc->pp, "%s", "SITE NAMEFMT 1");
           if(result) {
             free(os);
             return result;
@@ -2898,7 +2949,7 @@
           /* remember target server OS */
           Curl_safefree(ftpc->server_os);
           ftpc->server_os = os;
-          state(conn, FTP_NAMEFMT);
+          state(data, FTP_NAMEFMT);
           break;
         }
         /* Nothing special for the target server. */
@@ -2910,19 +2961,19 @@
         /* Cannot identify server OS. Continue anyway and cross fingers. */
       }
 
-      state(conn, FTP_STOP); /* we are done with the CONNECT phase! */
-      DEBUGF(infof(data, "protocol connect phase DONE\n"));
+      state(data, FTP_STOP); /* we are done with the CONNECT phase! */
+      DEBUGF(infof(data, "protocol connect phase DONE"));
       break;
 
     case FTP_NAMEFMT:
       if(ftpcode == 250) {
         /* Name format change successful: reload initial path. */
-        ftp_state_pwd(conn);
+        ftp_state_pwd(data, conn);
         break;
       }
 
-      state(conn, FTP_STOP); /* we are done with the CONNECT phase! */
-      DEBUGF(infof(data, "protocol connect phase DONE\n"));
+      state(data, FTP_STOP); /* we are done with the CONNECT phase! */
+      DEBUGF(infof(data, "protocol connect phase DONE"));
       break;
 
     case FTP_QUOTE:
@@ -2931,24 +2982,24 @@
     case FTP_STOR_PREQUOTE:
       if((ftpcode >= 400) && !ftpc->count2) {
         /* failure response code, and not allowed to fail */
-        failf(conn->data, "QUOT command failed with %03d", ftpcode);
+        failf(data, "QUOT command failed with %03d", ftpcode);
         result = CURLE_QUOTE_ERROR;
       }
       else
-        result = ftp_state_quote(conn, FALSE, ftpc->state);
+        result = ftp_state_quote(data, FALSE, ftpc->state);
       break;
 
     case FTP_CWD:
       if(ftpcode/100 != 2) {
         /* failure to CWD there */
-        if(conn->data->set.ftp_create_missing_dirs &&
+        if(data->set.ftp_create_missing_dirs &&
            ftpc->cwdcount && !ftpc->count2) {
           /* try making it */
           ftpc->count2++; /* counter to prevent CWD-MKD loops */
-          result = Curl_pp_sendf(&ftpc->pp, "MKD %s",
+          result = Curl_pp_sendf(data, &ftpc->pp, "MKD %s",
                                  ftpc->dirs[ftpc->cwdcount - 1]);
           if(!result)
-            state(conn, FTP_MKD);
+            state(data, FTP_MKD);
         }
         else {
           /* return failure */
@@ -2963,10 +3014,10 @@
         ftpc->count2 = 0;
         if(++ftpc->cwdcount <= ftpc->dirdepth)
           /* send next CWD */
-          result = Curl_pp_sendf(&ftpc->pp, "CWD %s",
+          result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s",
                                  ftpc->dirs[ftpc->cwdcount - 1]);
         else
-          result = ftp_state_mdtm(conn);
+          result = ftp_state_mdtm(data);
       }
       break;
 
@@ -2977,33 +3028,33 @@
         result = CURLE_REMOTE_ACCESS_DENIED;
       }
       else {
-        state(conn, FTP_CWD);
+        state(data, FTP_CWD);
         /* send CWD */
-        result = Curl_pp_sendf(&ftpc->pp, "CWD %s",
+        result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s",
                                ftpc->dirs[ftpc->cwdcount - 1]);
       }
       break;
 
     case FTP_MDTM:
-      result = ftp_state_mdtm_resp(conn, ftpcode);
+      result = ftp_state_mdtm_resp(data, ftpcode);
       break;
 
     case FTP_TYPE:
     case FTP_LIST_TYPE:
     case FTP_RETR_TYPE:
     case FTP_STOR_TYPE:
-      result = ftp_state_type_resp(conn, ftpcode, ftpc->state);
+      result = ftp_state_type_resp(data, ftpcode, ftpc->state);
       break;
 
     case FTP_SIZE:
     case FTP_RETR_SIZE:
     case FTP_STOR_SIZE:
-      result = ftp_state_size_resp(conn, ftpcode, ftpc->state);
+      result = ftp_state_size_resp(data, ftpcode, ftpc->state);
       break;
 
     case FTP_REST:
     case FTP_RETR_REST:
-      result = ftp_state_rest_resp(conn, ftpcode, ftpc->state);
+      result = ftp_state_rest_resp(data, conn, ftpcode, ftpc->state);
       break;
 
     case FTP_PRET:
@@ -3012,31 +3063,31 @@
         failf(data, "PRET command not accepted: %03d", ftpcode);
         return CURLE_FTP_PRET_FAILED;
       }
-      result = ftp_state_use_pasv(conn);
+      result = ftp_state_use_pasv(data, conn);
       break;
 
     case FTP_PASV:
-      result = ftp_state_pasv_resp(conn, ftpcode);
+      result = ftp_state_pasv_resp(data, ftpcode);
       break;
 
     case FTP_PORT:
-      result = ftp_state_port_resp(conn, ftpcode);
+      result = ftp_state_port_resp(data, ftpcode);
       break;
 
     case FTP_LIST:
     case FTP_RETR:
-      result = ftp_state_get_resp(conn, ftpcode, ftpc->state);
+      result = ftp_state_get_resp(data, ftpcode, ftpc->state);
       break;
 
     case FTP_STOR:
-      result = ftp_state_stor_resp(conn, ftpcode, ftpc->state);
+      result = ftp_state_stor_resp(data, ftpcode, ftpc->state);
       break;
 
     case FTP_QUIT:
       /* fallthrough, just stop! */
     default:
       /* internal error */
-      state(conn, FTP_STOP);
+      state(data, FTP_STOP);
       break;
     }
   } /* if(ftpcode) */
@@ -3046,11 +3097,12 @@
 
 
 /* called repeatedly until done from multi.c */
-static CURLcode ftp_multi_statemach(struct connectdata *conn,
+static CURLcode ftp_multi_statemach(struct Curl_easy *data,
                                     bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
-  CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE, FALSE);
+  CURLcode result = Curl_pp_statemach(data, &ftpc->pp, FALSE, FALSE);
 
   /* Check for the state outside of the Curl_socket_check() return code checks
      since at times we are in fact already in this state when this function
@@ -3060,14 +3112,15 @@
   return result;
 }
 
-static CURLcode ftp_block_statemach(struct connectdata *conn)
+static CURLcode ftp_block_statemach(struct Curl_easy *data,
+                                    struct connectdata *conn)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
   CURLcode result = CURLE_OK;
 
   while(ftpc->state != FTP_STOP) {
-    result = Curl_pp_statemach(pp, TRUE, TRUE /* disconnecting */);
+    result = Curl_pp_statemach(data, pp, TRUE, TRUE /* disconnecting */);
     if(result)
       break;
   }
@@ -3083,10 +3136,11 @@
  * phase is done when this function returns, or FALSE if not.
  *
  */
-static CURLcode ftp_connect(struct connectdata *conn,
+static CURLcode ftp_connect(struct Curl_easy *data,
                             bool *done) /* see description above */
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
 
@@ -3095,27 +3149,24 @@
   /* We always support persistent connections on ftp */
   connkeep(conn, "FTP default");
 
-  pp->response_time = RESP_TIMEOUT; /* set default response time-out */
-  pp->statemach_act = ftp_statemach_act;
-  pp->endofresp = ftp_endofresp;
-  pp->conn = conn;
+  PINGPONG_SETUP(pp, ftp_statemachine, ftp_endofresp);
 
   if(conn->handler->flags & PROTOPT_SSL) {
     /* BLOCKING */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
+    result = Curl_ssl_connect(data, conn, FIRSTSOCKET);
     if(result)
       return result;
     conn->bits.ftp_use_control_ssl = TRUE;
   }
 
   Curl_pp_setup(pp); /* once per transfer */
-  Curl_pp_init(pp); /* init the generic pingpong data */
+  Curl_pp_init(data, pp); /* init the generic pingpong data */
 
   /* When we connect, we start in the state where we await the 220
      response */
-  state(conn, FTP_WAIT220);
+  state(data, FTP_WAIT220);
 
-  result = ftp_multi_statemach(conn, done);
+  result = ftp_multi_statemach(data, done);
 
   return result;
 }
@@ -3129,11 +3180,11 @@
  *
  * Input argument is already checked for validity.
  */
-static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
+static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
                          bool premature)
 {
-  struct Curl_easy *data = conn->data;
-  struct FTP *ftp = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct FTP *ftp = data->req.p.ftp;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
   ssize_t nread;
@@ -3221,7 +3272,7 @@
     }
 
     if(ftpc->prevpath)
-      infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath);
+      infof(data, "Remembering we are in dir \"%s\"", ftpc->prevpath);
   }
 
   /* free the dir tree and file parts */
@@ -3236,7 +3287,7 @@
   if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
     if(!result && ftpc->dont_check && data->req.maxdownload > 0) {
       /* partial download completed */
-      result = Curl_pp_sendf(pp, "%s", "ABOR");
+      result = Curl_pp_sendf(data, pp, "%s", "ABOR");
       if(result) {
         failf(data, "Failure sending ABOR command: %s",
               curl_easy_strerror(result));
@@ -3248,15 +3299,15 @@
     if(conn->ssl[SECONDARYSOCKET].use) {
       /* The secondary socket is using SSL so we must close down that part
          first before we close the socket for real */
-      Curl_ssl_close(conn, SECONDARYSOCKET);
+      Curl_ssl_close(data, conn, SECONDARYSOCKET);
 
       /* Note that we keep "use" set to TRUE since that (next) connection is
          still requested to use SSL */
     }
-    close_secondarysocket(conn);
+    close_secondarysocket(data, conn);
   }
 
-  if(!result && (ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid &&
+  if(!result && (ftp->transfer == PPTRANSFER_BODY) && ftpc->ctl_valid &&
      pp->pending_resp && !premature) {
     /*
      * Let's see what the server says about the transfer we just performed,
@@ -3269,7 +3320,7 @@
     pp->response_time = 60*1000; /* give it only a minute for now */
     pp->response = Curl_now(); /* timeout relative now */
 
-    result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
+    result = Curl_GetFTPResponse(data, &nread, &ftpcode);
 
     pp->response_time = old_time; /* set this back to previous value */
 
@@ -3279,13 +3330,15 @@
       connclose(conn, "Timeout or similar in FTP DONE operation"); /* close */
     }
 
-    if(result)
+    if(result) {
+      Curl_safefree(ftp->pathalloc);
       return result;
+    }
 
     if(ftpc->dont_check && data->req.maxdownload > 0) {
       /* we have just sent ABOR and there is no reliable way to check if it was
        * successful or not; we have to close the connection now */
-      infof(data, "partial download completed, closing connection\n");
+      infof(data, "partial download completed, closing connection");
       connclose(conn, "Partial download with no ability to check");
       return result;
     }
@@ -3316,7 +3369,7 @@
     if((-1 != data->state.infilesize) &&
        (data->state.infilesize != data->req.writebytecount) &&
        !data->set.crlf &&
-       (ftp->transfer == FTPTRANSFER_BODY)) {
+       (ftp->transfer == PPTRANSFER_BODY)) {
       failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T
             " out of %" CURL_FORMAT_CURL_OFF_T " bytes)",
             data->req.bytecount, data->state.infilesize);
@@ -3348,12 +3401,12 @@
   }
 
   /* clear these for next connection */
-  ftp->transfer = FTPTRANSFER_BODY;
+  ftp->transfer = PPTRANSFER_BODY;
   ftpc->dont_check = FALSE;
 
   /* Send any post-transfer QUOTE strings? */
   if(!status && !result && !premature && data->set.postquote)
-    result = ftp_sendquote(conn, data->set.postquote);
+    result = ftp_sendquote(data, conn, data->set.postquote);
   Curl_safefree(ftp->pathalloc);
   return result;
 }
@@ -3369,7 +3422,8 @@
  */
 
 static
-CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
+CURLcode ftp_sendquote(struct Curl_easy *data,
+                       struct connectdata *conn, struct curl_slist *quote)
 {
   struct curl_slist *item;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
@@ -3394,16 +3448,16 @@
         acceptfail = TRUE;
       }
 
-      result = Curl_pp_sendf(&ftpc->pp, "%s", cmd);
+      result = Curl_pp_sendf(data, &ftpc->pp, "%s", cmd);
       if(!result) {
         pp->response = Curl_now(); /* timeout relative now */
-        result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
+        result = Curl_GetFTPResponse(data, &nread, &ftpcode);
       }
       if(result)
         return result;
 
       if(!acceptfail && (ftpcode >= 400)) {
-        failf(conn->data, "QUOT string not accepted: %s", cmd);
+        failf(data, "QUOT string not accepted: %s", cmd);
         return CURLE_QUOTE_ERROR;
       }
     }
@@ -3434,7 +3488,8 @@
  * sets one of them.
  * If the transfer type is not sent, simulate on OK response in newstate
  */
-static CURLcode ftp_nb_type(struct connectdata *conn,
+static CURLcode ftp_nb_type(struct Curl_easy *data,
+                            struct connectdata *conn,
                             bool ascii, ftpstate newstate)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
@@ -3442,13 +3497,13 @@
   char want = (char)(ascii?'A':'I');
 
   if(ftpc->transfertype == want) {
-    state(conn, newstate);
-    return ftp_state_type_resp(conn, 200, newstate);
+    state(data, newstate);
+    return ftp_state_type_resp(data, 200, newstate);
   }
 
-  result = Curl_pp_sendf(&ftpc->pp, "TYPE %c", want);
+  result = Curl_pp_sendf(data, &ftpc->pp, "TYPE %c", want);
   if(!result) {
-    state(conn, newstate);
+    state(data, newstate);
 
     /* keep track of our current transfer type */
     ftpc->transfertype = want;
@@ -3467,14 +3522,14 @@
  */
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
 static void
-ftp_pasv_verbose(struct connectdata *conn,
+ftp_pasv_verbose(struct Curl_easy *data,
                  struct Curl_addrinfo *ai,
                  char *newhost, /* ascii version */
                  int port)
 {
   char buf[256];
   Curl_printable_address(ai, buf, sizeof(buf));
-  infof(conn->data, "Connecting to %s (%s) port %d\n", newhost, buf, port);
+  infof(data, "Connecting to %s (%s) port %d", newhost, buf, port);
 }
 #endif
 
@@ -3489,45 +3544,45 @@
  * EPSV).
  */
 
-static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
+static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   CURLcode result = CURLE_OK;
   bool connected = FALSE;
   bool complete = FALSE;
 
   /* the ftp struct is inited in ftp_connect() */
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
 
   /* if the second connection isn't done yet, wait for it */
   if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
     if(Curl_connect_ongoing(conn)) {
       /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port
          aren't used so we blank their arguments. */
-      result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0);
+      result = Curl_proxyCONNECT(data, SECONDARYSOCKET, NULL, 0);
 
       return result;
     }
 
-    result = Curl_is_connected(conn, SECONDARYSOCKET, &connected);
+    result = Curl_is_connected(data, conn, SECONDARYSOCKET, &connected);
 
     /* Ready to do more? */
     if(connected) {
-      DEBUGF(infof(data, "DO-MORE connected phase starts\n"));
+      DEBUGF(infof(data, "DO-MORE connected phase starts"));
     }
     else {
       if(result && (ftpc->count1 == 0)) {
         *completep = -1; /* go back to DOING please */
         /* this is a EPSV connect failing, try PASV instead */
-        return ftp_epsv_disable(conn);
+        return ftp_epsv_disable(data, conn);
       }
       return result;
     }
   }
 
 #ifndef CURL_DISABLE_PROXY
-  result = Curl_proxy_connect(conn, SECONDARYSOCKET);
+  result = Curl_proxy_connect(data, SECONDARYSOCKET);
   if(result)
     return result;
 
@@ -3542,7 +3597,7 @@
   if(ftpc->state) {
     /* already in a state so skip the initial commands.
        They are only done to kickstart the do_more state */
-    result = ftp_multi_statemach(conn, &complete);
+    result = ftp_multi_statemach(data, &complete);
 
     *completep = (int)complete;
 
@@ -3557,23 +3612,23 @@
     *completep = 0;
   }
 
-  if(ftp->transfer <= FTPTRANSFER_INFO) {
+  if(ftp->transfer <= PPTRANSFER_INFO) {
     /* a transfer is about to take place, or if not a file name was given
        so we'll do a SIZE on it later and then we need the right TYPE first */
 
     if(ftpc->wait_data_conn == TRUE) {
       bool serv_conned;
 
-      result = ReceivedServerConnect(conn, &serv_conned);
+      result = ReceivedServerConnect(data, &serv_conned);
       if(result)
         return result; /* Failed to accept data connection */
 
       if(serv_conned) {
         /* It looks data connection is established */
-        result = AcceptServerConnect(conn);
+        result = AcceptServerConnect(data);
         ftpc->wait_data_conn = FALSE;
         if(!result)
-          result = InitiateTransfer(conn);
+          result = InitiateTransfer(data);
 
         if(result)
           return result;
@@ -3583,19 +3638,25 @@
       }
     }
     else if(data->set.upload) {
-      result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE);
+      result = ftp_nb_type(data, conn, data->state.prefer_ascii,
+                           FTP_STOR_TYPE);
       if(result)
         return result;
 
-      result = ftp_multi_statemach(conn, &complete);
-      /* ftpc->wait_data_conn is always false here */
-      *completep = (int)complete;
+      result = ftp_multi_statemach(data, &complete);
+      if(ftpc->wait_data_conn)
+        /* if we reach the end of the FTP state machine here, *complete will be
+           TRUE but so is ftpc->wait_data_conn, which says we need to wait for
+           the data connection and therefore we're not actually complete */
+        *completep = 0;
+      else
+        *completep = (int)complete;
     }
     else {
       /* download */
       ftp->downloadsize = -1; /* unknown as of yet */
 
-      result = Curl_range(conn);
+      result = Curl_range(data);
 
       if(result == CURLE_OK && data->req.maxdownload >= 0) {
         /* Don't check for successful transfer */
@@ -3604,26 +3665,27 @@
 
       if(result)
         ;
-      else if(data->set.ftp_list_only || !ftpc->file) {
+      else if(data->state.list_only || !ftpc->file) {
         /* The specified path ends with a slash, and therefore we think this
            is a directory that is requested, use LIST. But before that we
            need to set ASCII transfer mode. */
 
         /* But only if a body transfer was requested. */
-        if(ftp->transfer == FTPTRANSFER_BODY) {
-          result = ftp_nb_type(conn, TRUE, FTP_LIST_TYPE);
+        if(ftp->transfer == PPTRANSFER_BODY) {
+          result = ftp_nb_type(data, conn, TRUE, FTP_LIST_TYPE);
           if(result)
             return result;
         }
         /* otherwise just fall through */
       }
       else {
-        result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_RETR_TYPE);
+        result = ftp_nb_type(data, conn, data->state.prefer_ascii,
+                             FTP_RETR_TYPE);
         if(result)
           return result;
       }
 
-      result = ftp_multi_statemach(conn, &complete);
+      result = ftp_multi_statemach(data, &complete);
       *completep = (int)complete;
     }
     return result;
@@ -3635,7 +3697,7 @@
   if(!ftpc->wait_data_conn) {
     /* no waiting for the data connection so this is now complete */
     *completep = 1;
-    DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
+    DEBUGF(infof(data, "DO-MORE phase ends with %d", (int)result));
   }
 
   return result;
@@ -3652,37 +3714,38 @@
  */
 
 static
-CURLcode ftp_perform(struct connectdata *conn,
+CURLcode ftp_perform(struct Curl_easy *data,
                      bool *connected,  /* connect status after PASV / PORT */
                      bool *dophase_done)
 {
   /* this is FTP and no proxy */
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
-  if(conn->data->set.opt_no_body) {
+  if(data->set.opt_no_body) {
     /* requested no body means no transfer... */
-    struct FTP *ftp = conn->data->req.protop;
-    ftp->transfer = FTPTRANSFER_INFO;
+    struct FTP *ftp = data->req.p.ftp;
+    ftp->transfer = PPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
 
   /* start the first command in the DO phase */
-  result = ftp_state_quote(conn, TRUE, FTP_QUOTE);
+  result = ftp_state_quote(data, TRUE, FTP_QUOTE);
   if(result)
     return result;
 
   /* run the state-machine */
-  result = ftp_multi_statemach(conn, dophase_done);
+  result = ftp_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[SECONDARYSOCKET];
 
-  infof(conn->data, "ftp_perform ends with SECONDARY: %d\n", *connected);
+  infof(data, "ftp_perform ends with SECONDARY: %d", *connected);
 
   if(*dophase_done)
-    DEBUGF(infof(conn->data, "DO phase is complete1\n"));
+    DEBUGF(infof(data, "DO phase is complete1"));
 
   return result;
 }
@@ -3695,12 +3758,12 @@
   free(ftpwc);
 }
 
-static CURLcode init_wc_data(struct connectdata *conn)
+static CURLcode init_wc_data(struct Curl_easy *data)
 {
   char *last_slash;
-  struct FTP *ftp = conn->data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
   char *path = ftp->path;
-  struct WildcardData *wildcard = &(conn->data->wildcard);
+  struct WildcardData *wildcard = &(data->wildcard);
   CURLcode result = CURLE_OK;
   struct ftp_wc *ftpwc = NULL;
 
@@ -3709,7 +3772,7 @@
     last_slash++;
     if(last_slash[0] == '\0') {
       wildcard->state = CURLWC_CLEAN;
-      result = ftp_parse_url_path(conn);
+      result = ftp_parse_url_path(data);
       return result;
     }
     wildcard->pattern = strdup(last_slash);
@@ -3726,7 +3789,7 @@
     }
     else { /* only list */
       wildcard->state = CURLWC_CLEAN;
-      result = ftp_parse_url_path(conn);
+      result = ftp_parse_url_path(data);
       return result;
     }
   }
@@ -3752,11 +3815,11 @@
   wildcard->dtor = wc_data_dtor;
 
   /* wildcard does not support NOCWD option (assert it?) */
-  if(conn->data->set.ftp_filemethod == FTPFILE_NOCWD)
-    conn->data->set.ftp_filemethod = FTPFILE_MULTICWD;
+  if(data->set.ftp_filemethod == FTPFILE_NOCWD)
+    data->set.ftp_filemethod = FTPFILE_MULTICWD;
 
   /* try to parse ftp url */
-  result = ftp_parse_url_path(conn);
+  result = ftp_parse_url_path(data);
   if(result) {
     goto fail;
   }
@@ -3768,15 +3831,15 @@
   }
 
   /* backup old write_function */
-  ftpwc->backup.write_function = conn->data->set.fwrite_func;
+  ftpwc->backup.write_function = data->set.fwrite_func;
   /* parsing write function */
-  conn->data->set.fwrite_func = Curl_ftp_parselist;
+  data->set.fwrite_func = Curl_ftp_parselist;
   /* backup old file descriptor */
-  ftpwc->backup.file_descriptor = conn->data->set.out;
-  /* let the writefunc callback know what curl pointer is working with */
-  conn->data->set.out = conn;
+  ftpwc->backup.file_descriptor = data->set.out;
+  /* let the writefunc callback know the transfer */
+  data->set.out = data;
 
-  infof(conn->data, "Wildcard - Parsing started\n");
+  infof(data, "Wildcard - Parsing started");
   return CURLE_OK;
 
   fail:
@@ -3790,129 +3853,132 @@
   return result;
 }
 
-/* This is called recursively */
-static CURLcode wc_statemach(struct connectdata *conn)
+static CURLcode wc_statemach(struct Curl_easy *data)
 {
-  struct WildcardData * const wildcard = &(conn->data->wildcard);
+  struct WildcardData * const wildcard = &(data->wildcard);
+  struct connectdata *conn = data->conn;
   CURLcode result = CURLE_OK;
 
-  switch(wildcard->state) {
-  case CURLWC_INIT:
-    result = init_wc_data(conn);
-    if(wildcard->state == CURLWC_CLEAN)
-      /* only listing! */
-      break;
-    wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING;
-    break;
-
-  case CURLWC_MATCHING: {
-    /* In this state is LIST response successfully parsed, so lets restore
-       previous WRITEFUNCTION callback and WRITEDATA pointer */
-    struct ftp_wc *ftpwc = wildcard->protdata;
-    conn->data->set.fwrite_func = ftpwc->backup.write_function;
-    conn->data->set.out = ftpwc->backup.file_descriptor;
-    ftpwc->backup.write_function = ZERO_NULL;
-    ftpwc->backup.file_descriptor = NULL;
-    wildcard->state = CURLWC_DOWNLOADING;
-
-    if(Curl_ftp_parselist_geterror(ftpwc->parser)) {
-      /* error found in LIST parsing */
-      wildcard->state = CURLWC_CLEAN;
-      return wc_statemach(conn);
-    }
-    if(wildcard->filelist.size == 0) {
-      /* no corresponding file */
-      wildcard->state = CURLWC_CLEAN;
-      return CURLE_REMOTE_FILE_NOT_FOUND;
-    }
-    return wc_statemach(conn);
-  }
-
-  case CURLWC_DOWNLOADING: {
-    /* filelist has at least one file, lets get first one */
-    struct ftp_conn *ftpc = &conn->proto.ftpc;
-    struct curl_fileinfo *finfo = wildcard->filelist.head->ptr;
-    struct FTP *ftp = conn->data->req.protop;
-
-    char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename);
-    if(!tmp_path)
-      return CURLE_OUT_OF_MEMORY;
-
-    /* switch default ftp->path and tmp_path */
-    free(ftp->pathalloc);
-    ftp->pathalloc = ftp->path = tmp_path;
-
-    infof(conn->data, "Wildcard - START of \"%s\"\n", finfo->filename);
-    if(conn->data->set.chunk_bgn) {
-      long userresponse;
-      Curl_set_in_callback(conn->data, true);
-      userresponse = conn->data->set.chunk_bgn(
-        finfo, wildcard->customptr, (int)wildcard->filelist.size);
-      Curl_set_in_callback(conn->data, false);
-      switch(userresponse) {
-      case CURL_CHUNK_BGN_FUNC_SKIP:
-        infof(conn->data, "Wildcard - \"%s\" skipped by user\n",
-              finfo->filename);
-        wildcard->state = CURLWC_SKIP;
-        return wc_statemach(conn);
-      case CURL_CHUNK_BGN_FUNC_FAIL:
-        return CURLE_CHUNK_FAILED;
-      }
-    }
-
-    if(finfo->filetype != CURLFILETYPE_FILE) {
-      wildcard->state = CURLWC_SKIP;
-      return wc_statemach(conn);
-    }
-
-    if(finfo->flags & CURLFINFOFLAG_KNOWN_SIZE)
-      ftpc->known_filesize = finfo->size;
-
-    result = ftp_parse_url_path(conn);
-    if(result)
+  for(;;) {
+    switch(wildcard->state) {
+    case CURLWC_INIT:
+      result = init_wc_data(data);
+      if(wildcard->state == CURLWC_CLEAN)
+        /* only listing! */
+        return result;
+      wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING;
       return result;
 
-    /* we don't need the Curl_fileinfo of first file anymore */
-    Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL);
+    case CURLWC_MATCHING: {
+      /* In this state is LIST response successfully parsed, so lets restore
+         previous WRITEFUNCTION callback and WRITEDATA pointer */
+      struct ftp_wc *ftpwc = wildcard->protdata;
+      data->set.fwrite_func = ftpwc->backup.write_function;
+      data->set.out = ftpwc->backup.file_descriptor;
+      ftpwc->backup.write_function = ZERO_NULL;
+      ftpwc->backup.file_descriptor = NULL;
+      wildcard->state = CURLWC_DOWNLOADING;
 
-    if(wildcard->filelist.size == 0) { /* remains only one file to down. */
-      wildcard->state = CURLWC_CLEAN;
-      /* after that will be ftp_do called once again and no transfer
-         will be done because of CURLWC_CLEAN state */
-      return CURLE_OK;
+      if(Curl_ftp_parselist_geterror(ftpwc->parser)) {
+        /* error found in LIST parsing */
+        wildcard->state = CURLWC_CLEAN;
+        continue;
+      }
+      if(wildcard->filelist.size == 0) {
+        /* no corresponding file */
+        wildcard->state = CURLWC_CLEAN;
+        return CURLE_REMOTE_FILE_NOT_FOUND;
+      }
+      continue;
     }
-  } break;
 
-  case CURLWC_SKIP: {
-    if(conn->data->set.chunk_end) {
-      Curl_set_in_callback(conn->data, true);
-      conn->data->set.chunk_end(conn->data->wildcard.customptr);
-      Curl_set_in_callback(conn->data, false);
+    case CURLWC_DOWNLOADING: {
+      /* filelist has at least one file, lets get first one */
+      struct ftp_conn *ftpc = &conn->proto.ftpc;
+      struct curl_fileinfo *finfo = wildcard->filelist.head->ptr;
+      struct FTP *ftp = data->req.p.ftp;
+
+      char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename);
+      if(!tmp_path)
+        return CURLE_OUT_OF_MEMORY;
+
+      /* switch default ftp->path and tmp_path */
+      free(ftp->pathalloc);
+      ftp->pathalloc = ftp->path = tmp_path;
+
+      infof(data, "Wildcard - START of \"%s\"", finfo->filename);
+      if(data->set.chunk_bgn) {
+        long userresponse;
+        Curl_set_in_callback(data, true);
+        userresponse = data->set.chunk_bgn(
+          finfo, wildcard->customptr, (int)wildcard->filelist.size);
+        Curl_set_in_callback(data, false);
+        switch(userresponse) {
+        case CURL_CHUNK_BGN_FUNC_SKIP:
+          infof(data, "Wildcard - \"%s\" skipped by user",
+                finfo->filename);
+          wildcard->state = CURLWC_SKIP;
+          continue;
+        case CURL_CHUNK_BGN_FUNC_FAIL:
+          return CURLE_CHUNK_FAILED;
+        }
+      }
+
+      if(finfo->filetype != CURLFILETYPE_FILE) {
+        wildcard->state = CURLWC_SKIP;
+        continue;
+      }
+
+      if(finfo->flags & CURLFINFOFLAG_KNOWN_SIZE)
+        ftpc->known_filesize = finfo->size;
+
+      result = ftp_parse_url_path(data);
+      if(result)
+        return result;
+
+      /* we don't need the Curl_fileinfo of first file anymore */
+      Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL);
+
+      if(wildcard->filelist.size == 0) { /* remains only one file to down. */
+        wildcard->state = CURLWC_CLEAN;
+        /* after that will be ftp_do called once again and no transfer
+           will be done because of CURLWC_CLEAN state */
+        return CURLE_OK;
+      }
+      return result;
     }
-    Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL);
-    wildcard->state = (wildcard->filelist.size == 0) ?
-                      CURLWC_CLEAN : CURLWC_DOWNLOADING;
-    return wc_statemach(conn);
+
+    case CURLWC_SKIP: {
+      if(data->set.chunk_end) {
+        Curl_set_in_callback(data, true);
+        data->set.chunk_end(data->wildcard.customptr);
+        Curl_set_in_callback(data, false);
+      }
+      Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL);
+      wildcard->state = (wildcard->filelist.size == 0) ?
+        CURLWC_CLEAN : CURLWC_DOWNLOADING;
+      continue;
+    }
+
+    case CURLWC_CLEAN: {
+      struct ftp_wc *ftpwc = wildcard->protdata;
+      result = CURLE_OK;
+      if(ftpwc)
+        result = Curl_ftp_parselist_geterror(ftpwc->parser);
+
+      wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE;
+      return result;
+    }
+
+    case CURLWC_DONE:
+    case CURLWC_ERROR:
+    case CURLWC_CLEAR:
+      if(wildcard->dtor)
+        wildcard->dtor(wildcard->protdata);
+      return result;
+    }
   }
-
-  case CURLWC_CLEAN: {
-    struct ftp_wc *ftpwc = wildcard->protdata;
-    result = CURLE_OK;
-    if(ftpwc)
-      result = Curl_ftp_parselist_geterror(ftpwc->parser);
-
-    wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE;
-  } break;
-
-  case CURLWC_DONE:
-  case CURLWC_ERROR:
-  case CURLWC_CLEAR:
-    if(wildcard->dtor)
-      wildcard->dtor(wildcard->protdata);
-    break;
-  }
-
-  return result;
+  /* UNREACHABLE */
 }
 
 /***********************************************************************
@@ -3924,18 +3990,19 @@
  *
  * The input argument is already checked for validity.
  */
-static CURLcode ftp_do(struct connectdata *conn, bool *done)
+static CURLcode ftp_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   *done = FALSE; /* default to false */
   ftpc->wait_data_conn = FALSE; /* default to no such wait */
 
-  if(conn->data->state.wildcardmatch) {
-    result = wc_statemach(conn);
-    if(conn->data->wildcard.state == CURLWC_SKIP ||
-      conn->data->wildcard.state == CURLWC_DONE) {
+  if(data->state.wildcardmatch) {
+    result = wc_statemach(data);
+    if(data->wildcard.state == CURLWC_SKIP ||
+      data->wildcard.state == CURLWC_DONE) {
       /* do not call ftp_regular_transfer */
       return CURLE_OK;
     }
@@ -3943,12 +4010,12 @@
       return result;
   }
   else { /* no wildcard FSM needed */
-    result = ftp_parse_url_path(conn);
+    result = ftp_parse_url_path(data);
     if(result)
       return result;
   }
 
-  result = ftp_regular_transfer(conn, done);
+  result = ftp_regular_transfer(data, done);
 
   return result;
 }
@@ -3963,24 +4030,24 @@
  * connection.
  *
  */
-static CURLcode ftp_quit(struct connectdata *conn)
+static CURLcode ftp_quit(struct Curl_easy *data, struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
 
   if(conn->proto.ftpc.ctl_valid) {
-    result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "QUIT");
+    result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "QUIT");
     if(result) {
-      failf(conn->data, "Failure sending QUIT command: %s",
+      failf(data, "Failure sending QUIT command: %s",
             curl_easy_strerror(result));
       conn->proto.ftpc.ctl_valid = FALSE; /* mark control connection as bad */
       connclose(conn, "QUIT command failed"); /* mark for connection closure */
-      state(conn, FTP_STOP);
+      state(data, FTP_STOP);
       return result;
     }
 
-    state(conn, FTP_QUIT);
+    state(data, FTP_QUIT);
 
-    result = ftp_block_statemach(conn);
+    result = ftp_block_statemach(data, conn);
   }
 
   return result;
@@ -3993,7 +4060,9 @@
  * Disconnect from an FTP server. Cleanup protocol-specific per-connection
  * resources. BLOCKING.
  */
-static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode ftp_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn,
+                               bool dead_connection)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
@@ -4009,10 +4078,9 @@
     ftpc->ctl_valid = FALSE;
 
   /* The FTP session may or may not have been allocated/setup at this point! */
-  (void)ftp_quit(conn); /* ignore errors on the QUIT */
+  (void)ftp_quit(data, conn); /* ignore errors on the QUIT */
 
   if(ftpc->entrypath) {
-    struct Curl_easy *data = conn->data;
     if(data->state.most_recent_ftp_entrypath == ftpc->entrypath) {
       data->state.most_recent_ftp_entrypath = NULL;
     }
@@ -4035,11 +4103,11 @@
  *
  */
 static
-CURLcode ftp_parse_url_path(struct connectdata *conn)
+CURLcode ftp_parse_url_path(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
   /* the ftp struct is already inited in ftp_connect() */
-  struct FTP *ftp = data->req.protop;
+  struct FTP *ftp = data->req.p.ftp;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   const char *slashPos = NULL;
   const char *fileName = NULL;
@@ -4149,7 +4217,7 @@
     ftpc->file = NULL; /* instead of point to a zero byte,
                             we make it a NULL pointer */
 
-  if(data->set.upload && !ftpc->file && (ftp->transfer == FTPTRANSFER_BODY)) {
+  if(data->set.upload && !ftpc->file && (ftp->transfer == PPTRANSFER_BODY)) {
     /* We need a file name when uploading. Return error! */
     failf(data, "Uploading to a URL without a file name!");
     free(rawPath);
@@ -4170,7 +4238,7 @@
         n -= ftpc->file?strlen(ftpc->file):0;
 
       if((strlen(oldPath) == n) && !strncmp(rawPath, oldPath, n)) {
-        infof(data, "Request has same path as previous transfer\n");
+        infof(data, "Request has same path as previous transfer");
         ftpc->cwddone = TRUE;
       }
     }
@@ -4181,25 +4249,25 @@
 }
 
 /* call this when the DO phase has completed */
-static CURLcode ftp_dophase_done(struct connectdata *conn,
-                                 bool connected)
+static CURLcode ftp_dophase_done(struct Curl_easy *data, bool connected)
 {
-  struct FTP *ftp = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct FTP *ftp = data->req.p.ftp;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   if(connected) {
     int completed;
-    CURLcode result = ftp_do_more(conn, &completed);
+    CURLcode result = ftp_do_more(data, &completed);
 
     if(result) {
-      close_secondarysocket(conn);
+      close_secondarysocket(data, conn);
       return result;
     }
   }
 
-  if(ftp->transfer != FTPTRANSFER_BODY)
+  if(ftp->transfer != PPTRANSFER_BODY)
     /* no data to transfer */
-    Curl_setup_transfer(conn->data, -1, -1, FALSE, -1);
+    Curl_setup_transfer(data, -1, -1, FALSE, -1);
   else if(!connected)
     /* since we didn't connect now, we want do_more to get called */
     conn->bits.do_more = TRUE;
@@ -4210,17 +4278,17 @@
 }
 
 /* called from multi.c while DOing */
-static CURLcode ftp_doing(struct connectdata *conn,
+static CURLcode ftp_doing(struct Curl_easy *data,
                           bool *dophase_done)
 {
-  CURLcode result = ftp_multi_statemach(conn, dophase_done);
+  CURLcode result = ftp_multi_statemach(data, dophase_done);
 
   if(result)
-    DEBUGF(infof(conn->data, "DO phase failed\n"));
+    DEBUGF(infof(data, "DO phase failed"));
   else if(*dophase_done) {
-    result = ftp_dophase_done(conn, FALSE /* not connected */);
+    result = ftp_dophase_done(data, FALSE /* not connected */);
 
-    DEBUGF(infof(conn->data, "DO phase is complete2\n"));
+    DEBUGF(infof(data, "DO phase is complete2"));
   }
   return result;
 }
@@ -4238,12 +4306,12 @@
  * ftp_done() function without finding any major problem.
  */
 static
-CURLcode ftp_regular_transfer(struct connectdata *conn,
+CURLcode ftp_regular_transfer(struct Curl_easy *data,
                               bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
   bool connected = FALSE;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   data->req.size = -1; /* make sure this is unknown at this point */
 
@@ -4254,7 +4322,7 @@
 
   ftpc->ctl_valid = TRUE; /* starts good */
 
-  result = ftp_perform(conn,
+  result = ftp_perform(data,
                        &connected, /* have we connected after PASV/PORT */
                        dophase_done); /* all commands in the DO-phase done? */
 
@@ -4264,7 +4332,7 @@
       /* the DO phase has not completed yet */
       return CURLE_OK;
 
-    result = ftp_dophase_done(conn, connected);
+    result = ftp_dophase_done(data, connected);
 
     if(result)
       return result;
@@ -4275,13 +4343,13 @@
   return result;
 }
 
-static CURLcode ftp_setup_connection(struct connectdata *conn)
+static CURLcode ftp_setup_connection(struct Curl_easy *data,
+                                     struct connectdata *conn)
 {
-  struct Curl_easy *data = conn->data;
   char *type;
   struct FTP *ftp;
 
-  conn->data->req.protop = ftp = calloc(sizeof(struct FTP), 1);
+  data->req.p.ftp = ftp = calloc(sizeof(struct FTP), 1);
   if(NULL == ftp)
     return CURLE_OUT_OF_MEMORY;
 
@@ -4301,23 +4369,23 @@
 
     switch(command) {
     case 'A': /* ASCII mode */
-      data->set.prefer_ascii = TRUE;
+      data->state.prefer_ascii = TRUE;
       break;
 
     case 'D': /* directory mode */
-      data->set.ftp_list_only = TRUE;
+      data->state.list_only = TRUE;
       break;
 
     case 'I': /* binary mode */
     default:
       /* switch off ASCII */
-      data->set.prefer_ascii = FALSE;
+      data->state.prefer_ascii = FALSE;
       break;
     }
   }
 
   /* get some initial data into the ftp struct */
-  ftp->transfer = FTPTRANSFER_BODY;
+  ftp->transfer = PPTRANSFER_BODY;
   ftp->downloadsize = 0;
   conn->proto.ftpc.known_filesize = -1; /* unknown size for now */
 
diff --git a/lib/ftp.h b/lib/ftp.h
index dbbdeb7..1cfdac0 100644
--- a/lib/ftp.h
+++ b/lib/ftp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,7 @@
 extern const struct Curl_handler Curl_handler_ftps;
 #endif
 
-CURLcode Curl_GetFTPResponse(ssize_t *nread, struct connectdata *conn,
+CURLcode Curl_GetFTPResponse(struct Curl_easy *data, ssize_t *nread,
                              int *ftpcode);
 #endif /* CURL_DISABLE_FTP */
 
@@ -116,9 +116,9 @@
 struct ftp_conn {
   struct pingpong pp;
   char *entrypath; /* the PWD reply when we logged on */
+  char *file;    /* url-decoded file name (or path) */
   char **dirs;   /* realloc()ed array for path components */
   int dirdepth;  /* number of entries used in the 'dirs' array */
-  char *file;    /* url-decoded file name (or path) */
   bool dont_check;  /* Set to TRUE to prevent the final (post-transfer)
                        file size and 226/250 status check. It should still
                        read the line, just ignore the result. */
@@ -131,6 +131,10 @@
   bool cwdfail;     /* set TRUE if a CWD command fails, as then we must prevent
                        caching the current directory */
   bool wait_data_conn; /* this is set TRUE if data connection is waited */
+  /* newhost is the (allocated) IP addr or host name to connect the data
+     connection to */
+  unsigned short newport;
+  char *newhost;
   char *prevpath;   /* url-decoded conn->path from the previous transfer */
   char transfertype; /* set by ftp_transfertype for use by Curl_client_write()a
                         and others (A/I or zero) */
@@ -145,10 +149,6 @@
   curl_off_t known_filesize; /* file size is different from -1, if wildcard
                                 LIST parsing was done and wc_statemach set
                                 it */
-  /* newhost is the (allocated) IP addr or host name to connect the data
-     connection to */
-  char *newhost;          /* this is the pair to connect the DATA... */
-  unsigned short newport; /* connection to */
 };
 
 #define DEFAULT_ACCEPT_TIMEOUT   60000 /* milliseconds == one minute */
diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c
index c7b84a9..716ff38 100644
--- a/lib/ftplistparser.c
+++ b/lib/ftplistparser.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -268,11 +268,11 @@
   return permissions;
 }
 
-static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
+static CURLcode ftp_pl_insert_finfo(struct Curl_easy *data,
                                     struct fileinfo *infop)
 {
   curl_fnmatch_callback compare;
-  struct WildcardData *wc = &conn->data->wildcard;
+  struct WildcardData *wc = &data->wildcard;
   struct ftp_wc *ftpwc = wc->protdata;
   struct Curl_llist *llist = &wc->filelist;
   struct ftp_parselist_data *parser = ftpwc->parser;
@@ -293,13 +293,13 @@
                           str + parser->offsets.user : NULL;
 
   /* get correct fnmatch callback */
-  compare = conn->data->set.fnmatch;
+  compare = data->set.fnmatch;
   if(!compare)
     compare = Curl_fnmatch;
 
   /* filter pattern-corresponding filenames */
-  Curl_set_in_callback(conn->data, true);
-  if(compare(conn->data->set.fnmatch_data, wc->pattern,
+  Curl_set_in_callback(data, true);
+  if(compare(data->set.fnmatch_data, wc->pattern,
              finfo->filename) == 0) {
     /* discard symlink which is containing multiple " -> " */
     if((finfo->filetype == CURLFILETYPE_SYMLINK) && finfo->strings.target &&
@@ -310,7 +310,7 @@
   else {
     add = FALSE;
   }
-  Curl_set_in_callback(conn->data, false);
+  Curl_set_in_callback(data, false);
 
   if(add) {
     Curl_llist_insert_next(llist, llist->tail, finfo, &infop->list);
@@ -327,8 +327,8 @@
                           void *connptr)
 {
   size_t bufflen = size*nmemb;
-  struct connectdata *conn = (struct connectdata *)connptr;
-  struct ftp_wc *ftpwc = conn->data->wildcard.protdata;
+  struct Curl_easy *data = (struct Curl_easy *)connptr;
+  struct ftp_wc *ftpwc = data->wildcard.protdata;
   struct ftp_parselist_data *parser = ftpwc->parser;
   struct fileinfo *infop;
   struct curl_fileinfo *finfo;
@@ -424,7 +424,7 @@
                 endptr++;
               while(ISDIGIT(*endptr))
                 endptr++;
-              if(*endptr != 0) {
+              if(*endptr) {
                 parser->error = CURLE_FTP_BAD_FILE_LIST;
                 goto fail;
               }
@@ -728,7 +728,7 @@
             finfo->b_data[parser->item_offset + parser->item_length - 1] = 0;
             parser->offsets.filename = parser->item_offset;
             parser->state.UNIX.main = PL_UNIX_FILETYPE;
-            result = ftp_pl_insert_finfo(conn, infop);
+            result = ftp_pl_insert_finfo(data, infop);
             if(result) {
               parser->error = result;
               goto fail;
@@ -740,7 +740,7 @@
             finfo->b_data[parser->item_offset + parser->item_length - 1] = 0;
             parser->offsets.filename = parser->item_offset;
             parser->state.UNIX.main = PL_UNIX_FILETYPE;
-            result = ftp_pl_insert_finfo(conn, infop);
+            result = ftp_pl_insert_finfo(data, infop);
             if(result) {
               parser->error = result;
               goto fail;
@@ -835,7 +835,7 @@
           else if(c == '\n') {
             finfo->b_data[parser->item_offset + parser->item_length - 1] = 0;
             parser->offsets.symlink_target = parser->item_offset;
-            result = ftp_pl_insert_finfo(conn, infop);
+            result = ftp_pl_insert_finfo(data, infop);
             if(result) {
               parser->error = result;
               goto fail;
@@ -847,7 +847,7 @@
           if(c == '\n') {
             finfo->b_data[parser->item_offset + parser->item_length - 1] = 0;
             parser->offsets.symlink_target = parser->item_offset;
-            result = ftp_pl_insert_finfo(conn, infop);
+            result = ftp_pl_insert_finfo(data, infop);
             if(result) {
               parser->error = result;
               goto fail;
@@ -966,8 +966,7 @@
           else if(c == '\n') {
             parser->offsets.filename = parser->item_offset;
             finfo->b_data[finfo->b_used - 1] = 0;
-            parser->offsets.filename = parser->item_offset;
-            result = ftp_pl_insert_finfo(conn, infop);
+            result = ftp_pl_insert_finfo(data, infop);
             if(result) {
               parser->error = result;
               goto fail;
@@ -979,7 +978,7 @@
         case PL_WINNT_FILENAME_WINEOL:
           if(c == '\n') {
             parser->offsets.filename = parser->item_offset;
-            result = ftp_pl_insert_finfo(conn, infop);
+            result = ftp_pl_insert_finfo(data, infop);
             if(result) {
               parser->error = result;
               goto fail;
diff --git a/lib/ftplistparser.h b/lib/ftplistparser.h
index b34ae9b..e4cd820 100644
--- a/lib/ftplistparser.h
+++ b/lib/ftplistparser.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/getenv.c b/lib/getenv.c
index 9385b8f..92c5350 100644
--- a/lib/getenv.c
+++ b/lib/getenv.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/getinfo.c b/lib/getinfo.c
index 49e79e4..9091e61 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -94,13 +94,14 @@
 {
   switch(info) {
   case CURLINFO_EFFECTIVE_URL:
-    *param_charp = data->change.url?data->change.url:(char *)"";
+    *param_charp = data->state.url?data->state.url:(char *)"";
     break;
   case CURLINFO_EFFECTIVE_METHOD: {
     const char *m = data->set.str[STRING_CUSTOMREQUEST];
     if(!m) {
       if(data->set.opt_no_body)
         m = "HEAD";
+#ifndef CURL_DISABLE_HTTP
       else {
         switch(data->state.httpreq) {
         case HTTPREQ_POST:
@@ -120,6 +121,7 @@
           break;
         }
       }
+#endif
     }
     *param_charp = m;
   }
@@ -143,6 +145,10 @@
        option had been enabled! */
     *param_charp = data->info.wouldredirect;
     break;
+  case CURLINFO_REFERER:
+    /* Return the referrer header for this request, or NULL if unset */
+    *param_charp = data->state.referer;
+    break;
   case CURLINFO_PRIMARY_IP:
     /* Return the ip address of the most recent (primary) connection */
     *param_charp = data->info.conn_primary_ip;
@@ -233,7 +239,7 @@
     break;
 #endif
   case CURLINFO_REDIRECT_COUNT:
-    *param_longp = data->set.followlocation;
+    *param_longp = data->state.followlocation;
     break;
   case CURLINFO_HTTPAUTH_AVAIL:
     lptr.to_long = param_longp;
diff --git a/lib/getinfo.h b/lib/getinfo.h
index 8d2af42..f35d1b4 100644
--- a/lib/getinfo.h
+++ b/lib/getinfo.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/gopher.c b/lib/gopher.c
index ce74131..f61232f 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,6 +33,7 @@
 #include "gopher.h"
 #include "select.h"
 #include "strdup.h"
+#include "vtls/vtls.h"
 #include "url.h"
 #include "escape.h"
 #include "warnless.h"
@@ -45,7 +46,11 @@
  * Forward declarations.
  */
 
-static CURLcode gopher_do(struct connectdata *conn, bool *done);
+static CURLcode gopher_do(struct Curl_easy *data, bool *done);
+#ifdef USE_SSL
+static CURLcode gopher_connect(struct Curl_easy *data, bool *done);
+static CURLcode gopher_connecting(struct Curl_easy *data, bool *done);
+#endif
 
 /*
  * Gopher protocol handler.
@@ -69,16 +74,59 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_GOPHER,                          /* defport */
   CURLPROTO_GOPHER,                     /* protocol */
   CURLPROTO_GOPHER,                     /* family */
   PROTOPT_NONE                          /* flags */
 };
 
-static CURLcode gopher_do(struct connectdata *conn, bool *done)
+#ifdef USE_SSL
+const struct Curl_handler Curl_handler_gophers = {
+  "GOPHERS",                            /* scheme */
+  ZERO_NULL,                            /* setup_connection */
+  gopher_do,                            /* do_it */
+  ZERO_NULL,                            /* done */
+  ZERO_NULL,                            /* do_more */
+  gopher_connect,                       /* connect_it */
+  gopher_connecting,                    /* connecting */
+  ZERO_NULL,                            /* doing */
+  ZERO_NULL,                            /* proto_getsock */
+  ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
+  ZERO_NULL,                            /* perform_getsock */
+  ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
+  ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
+  PORT_GOPHER,                          /* defport */
+  CURLPROTO_GOPHERS,                    /* protocol */
+  CURLPROTO_GOPHER,                     /* family */
+  PROTOPT_SSL                           /* flags */
+};
+
+static CURLcode gopher_connect(struct Curl_easy *data, bool *done)
+{
+  (void)data;
+  (void)done;
+  return CURLE_OK;
+}
+
+static CURLcode gopher_connecting(struct Curl_easy *data, bool *done)
+{
+  struct connectdata *conn = data->conn;
+  CURLcode result = Curl_ssl_connect(data, conn, FIRSTSOCKET);
+  if(result)
+    connclose(conn, "Failed TLS connection");
+  *done = TRUE;
+  return result;
+}
+#endif
+
+static CURLcode gopher_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
   char *gopherpath;
   char *path = data->state.up.path;
@@ -124,14 +172,17 @@
     sel_org = sel;
   }
 
-  /* We use Curl_write instead of Curl_sendf to make sure the entire buffer is
-     sent, which could be sizeable with long selectors. */
   k = curlx_uztosz(len);
 
   for(;;) {
-    result = Curl_write(conn, sockfd, sel, k, &amount);
+    /* Break out of the loop if the selector is empty because OpenSSL and/or
+       LibreSSL fail with errno 0 if this is the case. */
+    if(strlen(sel) < 1)
+      break;
+
+    result = Curl_write(data, sockfd, sel, k, &amount);
     if(!result) { /* Which may not have written it all! */
-      result = Curl_client_write(conn, CLIENTWRITE_HEADER, sel, amount);
+      result = Curl_client_write(data, CLIENTWRITE_HEADER, sel, amount);
       if(result)
         break;
 
@@ -143,7 +194,7 @@
     else
       break;
 
-    timeout_ms = Curl_timeleft(conn->data, NULL, FALSE);
+    timeout_ms = Curl_timeleft(data, NULL, FALSE);
     if(timeout_ms < 0) {
       result = CURLE_OPERATION_TIMEDOUT;
       break;
@@ -171,12 +222,12 @@
   free(sel_org);
 
   if(!result)
-    result = Curl_write(conn, sockfd, "\r\n", 2, &amount);
+    result = Curl_write(data, sockfd, "\r\n", 2, &amount);
   if(result) {
     failf(data, "Failed sending Gopher request");
     return result;
   }
-  result = Curl_client_write(conn, CLIENTWRITE_HEADER, (char *)"\r\n", 2);
+  result = Curl_client_write(data, CLIENTWRITE_HEADER, (char *)"\r\n", 2);
   if(result)
     return result;
 
diff --git a/lib/gopher.h b/lib/gopher.h
index dec2557..6b8bd55 100644
--- a/lib/gopher.h
+++ b/lib/gopher.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,6 +24,9 @@
 
 #ifndef CURL_DISABLE_GOPHER
 extern const struct Curl_handler Curl_handler_gopher;
+#ifdef USE_SSL
+extern const struct Curl_handler Curl_handler_gophers;
+#endif
 #endif
 
 #endif /* HEADER_CURL_GOPHER_H */
diff --git a/lib/hash.c b/lib/hash.c
index 8c1f6cd..12e7aa5 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -175,7 +175,7 @@
   return NULL;
 }
 
-#if defined(DEBUGBUILD) && defined(AGGRESIVE_TEST)
+#if defined(DEBUGBUILD) && defined(AGGRESSIVE_TEST)
 void
 Curl_hash_apply(Curl_hash *h, void *user,
                 void (*cb)(void *user, void *ptr))
@@ -245,7 +245,7 @@
       struct Curl_hash_element *he = le->ptr;
       lnext = le->next;
       /* ask the callback function if we shall remove this entry or not */
-      if(comp == NULL || comp(user, he->ptr)) {
+      if(!comp || comp(user, he->ptr)) {
         Curl_llist_remove(list, le, (void *) h);
         --h->size; /* one less entry in the hash now */
       }
diff --git a/lib/hash.h b/lib/hash.h
index eb5104b..b7f828e 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/hmac.c b/lib/hmac.c
index e4fea8a..590abe6 100644
--- a/lib/hmac.c
+++ b/lib/hmac.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/hostasyn.c b/lib/hostasyn.c
index ed9190f..b25de1d 100644
--- a/lib/hostasyn.c
+++ b/lib/hostasyn.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -66,25 +66,23 @@
  *
  * The storage operation locks and unlocks the DNS cache.
  */
-CURLcode Curl_addrinfo_callback(struct connectdata *conn,
+CURLcode Curl_addrinfo_callback(struct Curl_easy *data,
                                 int status,
                                 struct Curl_addrinfo *ai)
 {
   struct Curl_dns_entry *dns = NULL;
   CURLcode result = CURLE_OK;
 
-  conn->async.status = status;
+  data->state.async.status = status;
 
   if(CURL_ASYNC_SUCCESS == status) {
     if(ai) {
-      struct Curl_easy *data = conn->data;
-
       if(data->share)
         Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
 
       dns = Curl_cache_addr(data, ai,
-                            conn->async.hostname,
-                            conn->async.port);
+                            data->state.async.hostname,
+                            data->state.async.port);
       if(data->share)
         Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
 
@@ -99,12 +97,12 @@
     }
   }
 
-  conn->async.dns = dns;
+  data->state.async.dns = dns;
 
  /* Set async.done TRUE last in this function since it may be used multi-
     threaded and once this is TRUE the other thread may read fields from the
     async struct */
-  conn->async.done = TRUE;
+  data->state.async.done = TRUE;
 
   /* IPv4: The input hostent struct will be freed by ares when we return from
      this function */
@@ -117,12 +115,12 @@
  * name resolve layers (selected at build-time). They all take this same set
  * of arguments
  */
-struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data,
                                        const char *hostname,
                                        int port,
                                        int *waitp)
 {
-  return Curl_resolver_getaddrinfo(conn, hostname, port, waitp);
+  return Curl_resolver_getaddrinfo(data, hostname, port, waitp);
 }
 
 #endif /* CURLRES_ASYNCH */
diff --git a/lib/hostcheck.c b/lib/hostcheck.c
index 9e0db05..cf267a7 100644
--- a/lib/hostcheck.c
+++ b/lib/hostcheck.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,7 +36,7 @@
 
 #include "hostcheck.h"
 #include "strcase.h"
-#include "inet_pton.h"
+#include "hostip.h"
 
 #include "curl_memory.h"
 /* The last #include file should be: */
@@ -67,10 +67,6 @@
   const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
   int wildcard_enabled;
   size_t prefixlen, suffixlen;
-  struct in_addr ignored;
-#ifdef ENABLE_IPV6
-  struct sockaddr_in6 si6;
-#endif
 
   /* normalize pattern and hostname by stripping off trailing dots */
   size_t len = strlen(hostname);
@@ -81,23 +77,19 @@
     pattern[len-1] = 0;
 
   pattern_wildcard = strchr(pattern, '*');
-  if(pattern_wildcard == NULL)
+  if(!pattern_wildcard)
     return strcasecompare(pattern, hostname) ?
       CURL_HOST_MATCH : CURL_HOST_NOMATCH;
 
   /* detect IP address as hostname and fail the match if so */
-  if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0)
+  if(Curl_host_is_ipnum(hostname))
     return CURL_HOST_NOMATCH;
-#ifdef ENABLE_IPV6
-  if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0)
-    return CURL_HOST_NOMATCH;
-#endif
 
   /* We require at least 2 dots in pattern to avoid too wide wildcard
      match. */
   wildcard_enabled = 1;
   pattern_label_end = strchr(pattern, '.');
-  if(pattern_label_end == NULL || strchr(pattern_label_end + 1, '.') == NULL ||
+  if(!pattern_label_end || strchr(pattern_label_end + 1, '.') == NULL ||
      pattern_wildcard > pattern_label_end ||
      strncasecompare(pattern, "xn--", 4)) {
     wildcard_enabled = 0;
@@ -107,7 +99,7 @@
       CURL_HOST_MATCH : CURL_HOST_NOMATCH;
 
   hostname_label_end = strchr(hostname, '.');
-  if(hostname_label_end == NULL ||
+  if(!hostname_label_end ||
      !strcasecompare(pattern_label_end, hostname_label_end))
     return CURL_HOST_NOMATCH;
 
diff --git a/lib/hostcheck.h b/lib/hostcheck.h
index 9c18085..52155f4 100644
--- a/lib/hostcheck.h
+++ b/lib/hostcheck.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/hostip.c b/lib/hostip.c
index 57c8bd3..30ce509 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -63,11 +63,16 @@
 #include "multiif.h"
 #include "doh.h"
 #include "warnless.h"
+#include "strcase.h"
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
+#if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES)
+#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
+#endif
+
 #if defined(CURLRES_SYNCH) && \
     defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP)
 /* alarm-based timeouts can only be used with all the dependencies satisfied */
@@ -253,14 +258,12 @@
 #endif
 
 /* lookup address, returns entry if found and not stale */
-static struct Curl_dns_entry *
-fetch_addr(struct connectdata *conn,
-                const char *hostname,
-                int port)
+static struct Curl_dns_entry *fetch_addr(struct Curl_easy *data,
+                                         const char *hostname,
+                                         int port)
 {
   struct Curl_dns_entry *dns = NULL;
   size_t entry_len;
-  struct Curl_easy *data = conn->data;
   char entry_id[MAX_HOSTCACHE_LEN];
 
   /* Create an entry id, based upon the hostname and port */
@@ -271,7 +274,7 @@
   dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1);
 
   /* No entry found in cache, check if we might have a wildcard entry */
-  if(!dns && data->change.wildcard_resolve) {
+  if(!dns && data->state.wildcard_resolve) {
     create_hostcache_id("*", port, entry_id, sizeof(entry_id));
     entry_len = strlen(entry_id);
 
@@ -287,7 +290,7 @@
     user.cache_timeout = data->set.dns_cache_timeout;
 
     if(hostcache_timestamp_remove(&user, dns)) {
-      infof(data, "Hostname in DNS cache was stale, zapped\n");
+      infof(data, "Hostname in DNS cache was stale, zapped");
       dns = NULL; /* the memory deallocation is being handled by the hash */
       Curl_hash_delete(data->dns.hostcache, entry_id, entry_len + 1);
     }
@@ -311,17 +314,16 @@
  * use, or we'll leak memory!
  */
 struct Curl_dns_entry *
-Curl_fetch_addr(struct connectdata *conn,
+Curl_fetch_addr(struct Curl_easy *data,
                 const char *hostname,
                 int port)
 {
-  struct Curl_easy *data = conn->data;
   struct Curl_dns_entry *dns = NULL;
 
   if(data->share)
     Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
 
-  dns = fetch_addr(conn, hostname, port);
+  dns = fetch_addr(data, hostname, port);
 
   if(dns)
     dns->inuse++; /* we use it! */
@@ -444,7 +446,7 @@
   dns->addr = addr; /* this is the address(es) */
   time(&dns->timestamp);
   if(dns->timestamp == 0)
-    dns->timestamp = 1;   /* zero indicates CURLOPT_RESOLVE entry */
+    dns->timestamp = 1;   /* zero indicates permanent CURLOPT_RESOLVE entry */
 
   /* Store the resolved data in our DNS cache. */
   dns2 = Curl_hash_add(data->dns.hostcache, entry_id, entry_len + 1,
@@ -459,6 +461,97 @@
   return dns;
 }
 
+#ifdef ENABLE_IPV6
+/* return a static IPv6 resolve for 'localhost' */
+static struct Curl_addrinfo *get_localhost6(int port)
+{
+  struct Curl_addrinfo *ca;
+  const size_t ss_size = sizeof(struct sockaddr_in6);
+  const size_t hostlen = strlen("localhost");
+  struct sockaddr_in6 sa6;
+  unsigned char ipv6[16];
+  unsigned short port16 = (unsigned short)(port & 0xffff);
+  ca = calloc(sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1, 1);
+  if(!ca)
+    return NULL;
+
+  sa6.sin6_family = AF_INET6;
+  sa6.sin6_port = htons(port16);
+  sa6.sin6_flowinfo = 0;
+  sa6.sin6_scope_id = 0;
+  if(Curl_inet_pton(AF_INET6, "::1", ipv6) < 1)
+    return NULL;
+  memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));
+
+  ca->ai_flags     = 0;
+  ca->ai_family    = AF_INET6;
+  ca->ai_socktype  = SOCK_STREAM;
+  ca->ai_protocol  = IPPROTO_TCP;
+  ca->ai_addrlen   = (curl_socklen_t)ss_size;
+  ca->ai_next      = NULL;
+  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
+  memcpy(ca->ai_addr, &sa6, ss_size);
+  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
+  strcpy(ca->ai_canonname, "localhost");
+  return ca;
+}
+#else
+#define get_localhost6(x) NULL
+#endif
+
+/* return a static IPv4 resolve for 'localhost' */
+static struct Curl_addrinfo *get_localhost(int port)
+{
+  struct Curl_addrinfo *ca;
+  const size_t ss_size = sizeof(struct sockaddr_in);
+  const size_t hostlen = strlen("localhost");
+  struct sockaddr_in sa;
+  unsigned int ipv4;
+  unsigned short port16 = (unsigned short)(port & 0xffff);
+  ca = calloc(sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1, 1);
+  if(!ca)
+    return NULL;
+
+  /* memset to clear the sa.sin_zero field */
+  memset(&sa, 0, sizeof(sa));
+  sa.sin_family = AF_INET;
+  sa.sin_port = htons(port16);
+  if(Curl_inet_pton(AF_INET, "127.0.0.1", (char *)&ipv4) < 1)
+    return NULL;
+  memcpy(&sa.sin_addr, &ipv4, sizeof(ipv4));
+
+  ca->ai_flags     = 0;
+  ca->ai_family    = AF_INET;
+  ca->ai_socktype  = SOCK_STREAM;
+  ca->ai_protocol  = IPPROTO_TCP;
+  ca->ai_addrlen   = (curl_socklen_t)ss_size;
+  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
+  memcpy(ca->ai_addr, &sa, ss_size);
+  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
+  strcpy(ca->ai_canonname, "localhost");
+  ca->ai_next = get_localhost6(port);
+  return ca;
+}
+
+/*
+ * Curl_host_is_ipnum() returns TRUE if the given string is a numerical IPv4
+ * (or IPv6 if supported) address.
+ */
+bool Curl_host_is_ipnum(const char *hostname)
+{
+  struct in_addr in;
+#ifdef ENABLE_IPV6
+  struct in6_addr in6;
+#endif
+  if(Curl_inet_pton(AF_INET, hostname, &in) > 0
+#ifdef ENABLE_IPV6
+     || Curl_inet_pton(AF_INET6, hostname, &in6) > 0
+#endif
+    )
+    return TRUE;
+  return FALSE;
+}
+
 /*
  * Curl_resolv() is the main name resolve function within libcurl. It resolves
  * a name and returns a pointer to the entry in the 'entry' argument (if one
@@ -469,10 +562,6 @@
  * function is used. You MUST call Curl_resolv_unlock() later (when you're
  * done using this struct) to decrease the counter again.
  *
- * In debug mode, we specifically test for an interface name "LocalHost"
- * and resolve "localhost" instead as a means to permit test cases
- * to connect to a local test server with any host name.
- *
  * Return codes:
  *
  * CURLRESOLV_ERROR   (-1) = error, no pointer
@@ -480,27 +569,26 @@
  * CURLRESOLV_PENDING  (1) = waiting for response, no pointer
  */
 
-enum resolve_t Curl_resolv(struct connectdata *conn,
+enum resolve_t Curl_resolv(struct Curl_easy *data,
                            const char *hostname,
                            int port,
                            bool allowDOH,
                            struct Curl_dns_entry **entry)
 {
   struct Curl_dns_entry *dns = NULL;
-  struct Curl_easy *data = conn->data;
   CURLcode result;
   enum resolve_t rc = CURLRESOLV_ERROR; /* default to failure */
-
+  struct connectdata *conn = data->conn;
   *entry = NULL;
   conn->bits.doh = FALSE; /* default is not */
 
   if(data->share)
     Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
 
-  dns = fetch_addr(conn, hostname, port);
+  dns = fetch_addr(data, hostname, port);
 
   if(dns) {
-    infof(data, "Hostname %s was found in DNS cache\n", hostname);
+    infof(data, "Hostname %s was found in DNS cache", hostname);
     dns->inuse++; /* we use it! */
     rc = CURLRESOLV_RESOLVED;
   }
@@ -523,13 +611,36 @@
     if(data->set.resolver_start) {
       int st;
       Curl_set_in_callback(data, true);
-      st = data->set.resolver_start(data->state.resolver, NULL,
-                                    data->set.resolver_start_client);
+      st = data->set.resolver_start(
+#ifdef USE_CURL_ASYNC
+        data->state.async.resolver,
+#else
+        NULL,
+#endif
+        NULL,
+        data->set.resolver_start_client);
       Curl_set_in_callback(data, false);
       if(st)
         return CURLRESOLV_ERROR;
     }
 
+#if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES)
+    {
+      /*
+       * The automagic conversion from IPv4 literals to IPv6 literals only
+       * works if the SCDynamicStoreCopyProxies system function gets called
+       * first. As Curl currently doesn't support system-wide HTTP proxies, we
+       * therefore don't use any value this function might return.
+       *
+       * This function is only available on a macOS and is not needed for
+       * IPv4-only builds, hence the conditions above.
+       */
+      CFDictionaryRef dict = SCDynamicStoreCopyProxies(NULL);
+      if(dict)
+        CFRelease(dict);
+    }
+#endif
+
 #ifndef USE_RESOLVE_ON_IPS
     /* First check if this is an IPv4 address string */
     if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
@@ -565,23 +676,18 @@
     if(!addr) {
       /* Check what IP specifics the app has requested and if we can provide
        * it. If not, bail out. */
-      if(!Curl_ipvalid(conn))
+      if(!Curl_ipvalid(data, conn))
         return CURLRESOLV_ERROR;
 
-      if(allowDOH && data->set.doh && !ipnum) {
-        addr = Curl_doh(conn, hostname, port, &respwait);
-      }
+      if(strcasecompare(hostname, "localhost"))
+        addr = get_localhost(port);
+      else if(allowDOH && data->set.doh && !ipnum)
+        addr = Curl_doh(data, hostname, port, &respwait);
       else {
         /* If Curl_getaddrinfo() returns NULL, 'respwait' might be set to a
            non-zero value indicating that we need to wait for the response to
            the resolve call */
-        addr = Curl_getaddrinfo(conn,
-#ifdef DEBUGBUILD
-                                (data->set.str[STRING_DEVICE]
-                                 && !strcmp(data->set.str[STRING_DEVICE],
-                                            "LocalHost"))?"localhost":
-#endif
-                                hostname, port, &respwait);
+        addr = Curl_getaddrinfo(data, hostname, port, &respwait);
       }
     }
     if(!addr) {
@@ -589,7 +695,7 @@
         /* the response to our resolve call will come asynchronously at
            a later time, good or bad */
         /* First, check that we haven't received the info by now */
-        result = Curl_resolv_check(conn, &dns);
+        result = Curl_resolv_check(data, &dns);
         if(result) /* error detected */
           return CURLRESOLV_ERROR;
         if(dns)
@@ -628,7 +734,7 @@
  * within a signal handler which is nonportable and could lead to problems.
  */
 static
-RETSIGTYPE alarmfunc(int sig)
+void alarmfunc(int sig)
 {
   /* this is for "-ansi -Wall -pedantic" to stop complaining!   (rabe) */
   (void)sig;
@@ -658,7 +764,7 @@
  * CURLRESOLV_PENDING  (1) = waiting for response, no pointer
  */
 
-enum resolve_t Curl_resolv_timeout(struct connectdata *conn,
+enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
                                    const char *hostname,
                                    int port,
                                    struct Curl_dns_entry **entry,
@@ -676,7 +782,6 @@
 #endif /* HAVE_SIGACTION */
   volatile long timeout;
   volatile unsigned int prev_alarm = 0;
-  struct Curl_easy *data = conn->data;
 #endif /* USE_ALARM_TIMEOUT */
   enum resolve_t rc;
 
@@ -695,7 +800,7 @@
 
   if(!timeout)
     /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */
-    return Curl_resolv(conn, hostname, port, TRUE, entry);
+    return Curl_resolv(data, hostname, port, TRUE, entry);
 
   if(timeout < 1000) {
     /* The alarm() function only provides integer second resolution, so if
@@ -728,7 +833,7 @@
     keep_copysig = TRUE; /* yes, we have a copy */
     sigact.sa_handler = alarmfunc;
 #ifdef SA_RESTART
-    /* HPUX doesn't have SA_RESTART but defaults to that behaviour! */
+    /* HPUX doesn't have SA_RESTART but defaults to that behavior! */
     sigact.sa_flags &= ~SA_RESTART;
 #endif
     /* now set the new struct */
@@ -748,7 +853,7 @@
 #else
 #ifndef CURLRES_ASYNCH
   if(timeoutms)
-    infof(conn->data, "timeout on name lookup is not supported\n");
+    infof(data, "timeout on name lookup is not supported");
 #else
   (void)timeoutms; /* timeoutms not used with an async resolver */
 #endif
@@ -757,7 +862,7 @@
   /* Perform the actual name resolution. This might be interrupted by an
    * alarm if it takes too long.
    */
-  rc = Curl_resolv(conn, hostname, port, TRUE, entry);
+  rc = Curl_resolv(data, hostname, port, TRUE, entry);
 
 #ifdef USE_ALARM_TIMEOUT
 clean_up:
@@ -784,7 +889,7 @@
   if(prev_alarm) {
     /* there was an alarm() set before us, now put it back */
     timediff_t elapsed_secs = Curl_timediff(Curl_now(),
-                                            conn->created) / 1000;
+                                            data->conn->created) / 1000;
 
     /* the alarm period is counted in even number of seconds */
     unsigned long alarm_set = (unsigned long)(prev_alarm - elapsed_secs);
@@ -876,9 +981,9 @@
   int port = 0;
 
   /* Default is no wildcard found */
-  data->change.wildcard_resolve = false;
+  data->state.wildcard_resolve = false;
 
-  for(hostp = data->change.resolve; hostp; hostp = hostp->next) {
+  for(hostp = data->state.resolve; hostp; hostp = hostp->next) {
     char entry_id[MAX_HOSTCACHE_LEN];
     if(!hostp->data)
       continue;
@@ -886,7 +991,7 @@
       size_t entry_len;
 
       if(2 != sscanf(hostp->data + 1, "%255[^:]:%d", hostname, &port)) {
-        infof(data, "Couldn't parse CURLOPT_RESOLVE removal entry '%s'!\n",
+        infof(data, "Couldn't parse CURLOPT_RESOLVE removal entry '%s'",
               hostp->data);
         continue;
       }
@@ -916,17 +1021,24 @@
       char *addr_end;
       char *port_ptr;
       char *end_ptr;
+      bool permanent = TRUE;
+      char *host_begin;
       char *host_end;
       unsigned long tmp_port;
       bool error = true;
 
-      host_end = strchr(hostp->data, ':');
+      host_begin = hostp->data;
+      if(host_begin[0] == '+') {
+        host_begin++;
+        permanent = FALSE;
+      }
+      host_end = strchr(host_begin, ':');
       if(!host_end ||
-         ((host_end - hostp->data) >= (ptrdiff_t)sizeof(hostname)))
+         ((host_end - host_begin) >= (ptrdiff_t)sizeof(hostname)))
         goto err;
 
-      memcpy(hostname, hostp->data, host_end - hostp->data);
-      hostname[host_end - hostp->data] = '\0';
+      memcpy(hostname, host_begin, host_end - host_begin);
+      hostname[host_end - host_begin] = '\0';
 
       port_ptr = host_end + 1;
       tmp_port = strtoul(port_ptr, &end_ptr, 10);
@@ -968,7 +1080,7 @@
 
 #ifndef ENABLE_IPV6
         if(strchr(address, ':')) {
-          infof(data, "Ignoring resolve address '%s', missing IPv6 support.\n",
+          infof(data, "Ignoring resolve address '%s', missing IPv6 support.",
                 address);
           continue;
         }
@@ -976,7 +1088,7 @@
 
         ai = Curl_str2addr(address, port);
         if(!ai) {
-          infof(data, "Resolve address '%s' found illegal!\n", address);
+          infof(data, "Resolve address '%s' found illegal!", address);
           goto err;
         }
 
@@ -995,10 +1107,10 @@
       error = false;
    err:
       if(error) {
-        infof(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'!\n",
+        failf(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'!",
               hostp->data);
         Curl_freeaddrinfo(head);
-        continue;
+        return CURLE_SETOPT_OPTION_SYNTAX;
       }
 
       /* Create an entry id, based upon the hostname and port */
@@ -1008,18 +1120,22 @@
       if(data->share)
         Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
 
-      /* See if its already in our dns cache */
+      /* See if it's already in our dns cache */
       dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1);
 
       if(dns) {
-        infof(data, "RESOLVE %s:%d is - old addresses discarded!\n",
+        infof(data, "RESOLVE %s:%d is - old addresses discarded!",
                 hostname, port);
-        /* delete old entry entry, there are two reasons for this
+        /* delete old entry, there are two reasons for this
          1. old entry may have different addresses.
          2. even if entry with correct addresses is already in the cache,
             but if it is close to expire, then by the time next http
             request is made, it can get expired and pruned because old
-            entry is not necessarily marked as added by CURLOPT_RESOLVE. */
+            entry is not necessarily marked as permanent.
+         3. when adding a non-permanent entry, we want it to remove and
+            replace an existing permanent entry.
+         4. when adding a non-permanent entry, we want it to get a "fresh"
+            timeout that starts _now_. */
 
         Curl_hash_delete(data->dns.hostcache, entry_id, entry_len + 1);
       }
@@ -1027,10 +1143,11 @@
       /* put this new host in the cache */
       dns = Curl_cache_addr(data, head, hostname, port);
       if(dns) {
-        dns->timestamp = 0; /* mark as added by CURLOPT_RESOLVE */
+        if(permanent)
+          dns->timestamp = 0; /* mark as permanent */
         /* release the returned reference; the cache itself will keep the
          * entry alive: */
-            dns->inuse--;
+        dns->inuse--;
       }
 
       if(data->share)
@@ -1040,45 +1157,45 @@
         Curl_freeaddrinfo(head);
         return CURLE_OUT_OF_MEMORY;
       }
-      infof(data, "Added %s:%d:%s to DNS cache\n",
-            hostname, port, addresses);
+      infof(data, "Added %s:%d:%s to DNS cache%s",
+            hostname, port, addresses, permanent ? "" : " (non-permanent)");
 
       /* Wildcard hostname */
       if(hostname[0] == '*' && hostname[1] == '\0') {
-        infof(data, "RESOLVE %s:%d is wildcard, enabling wildcard checks\n",
+        infof(data, "RESOLVE %s:%d is wildcard, enabling wildcard checks",
               hostname, port);
-        data->change.wildcard_resolve = true;
+        data->state.wildcard_resolve = true;
       }
     }
   }
-  data->change.resolve = NULL; /* dealt with now */
+  data->state.resolve = NULL; /* dealt with now */
 
   return CURLE_OK;
 }
 
-CURLcode Curl_resolv_check(struct connectdata *conn,
+CURLcode Curl_resolv_check(struct Curl_easy *data,
                            struct Curl_dns_entry **dns)
 {
 #if defined(CURL_DISABLE_DOH) && !defined(CURLRES_ASYNCH)
   (void)dns;
 #endif
 
-  if(conn->bits.doh)
-    return Curl_doh_is_resolved(conn, dns);
-  return Curl_resolver_is_resolved(conn, dns);
+  if(data->conn->bits.doh)
+    return Curl_doh_is_resolved(data, dns);
+  return Curl_resolver_is_resolved(data, dns);
 }
 
-int Curl_resolv_getsock(struct connectdata *conn,
+int Curl_resolv_getsock(struct Curl_easy *data,
                         curl_socket_t *socks)
 {
 #ifdef CURLRES_ASYNCH
-  if(conn->bits.doh)
-    /* nothing to wait for during DOH resolve, those handles have their own
+  if(data->conn->bits.doh)
+    /* nothing to wait for during DoH resolve, those handles have their own
        sockets */
     return GETSOCK_BLANK;
-  return Curl_resolver_getsock(conn, socks);
+  return Curl_resolver_getsock(data, socks);
 #else
-  (void)conn;
+  (void)data;
   (void)socks;
   return GETSOCK_BLANK;
 #endif
@@ -1089,24 +1206,55 @@
 
    Note: this function disconnects and frees the conn data in case of
    resolve failure */
-CURLcode Curl_once_resolved(struct connectdata *conn,
-                            bool *protocol_done)
+CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done)
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
 
-  if(conn->async.dns) {
-    conn->dns_entry = conn->async.dns;
-    conn->async.dns = NULL;
+#ifdef USE_CURL_ASYNC
+  if(data->state.async.dns) {
+    conn->dns_entry = data->state.async.dns;
+    data->state.async.dns = NULL;
   }
+#endif
 
-  result = Curl_setup_conn(conn, protocol_done);
+  result = Curl_setup_conn(data, protocol_done);
 
   if(result) {
-    struct Curl_easy *data = conn->data;
-    DEBUGASSERT(data);
     Curl_detach_connnection(data);
     Curl_conncache_remove_conn(data, conn, TRUE);
     Curl_disconnect(data, conn, TRUE);
   }
   return result;
 }
+
+/*
+ * Curl_resolver_error() calls failf() with the appropriate message after a
+ * resolve error
+ */
+
+#ifdef USE_CURL_ASYNC
+CURLcode Curl_resolver_error(struct Curl_easy *data)
+{
+  const char *host_or_proxy;
+  CURLcode result;
+
+#ifndef CURL_DISABLE_PROXY
+  struct connectdata *conn = data->conn;
+  if(conn->bits.httpproxy) {
+    host_or_proxy = "proxy";
+    result = CURLE_COULDNT_RESOLVE_PROXY;
+  }
+  else
+#endif
+  {
+    host_or_proxy = "host";
+    result = CURLE_COULDNT_RESOLVE_HOST;
+  }
+
+  failf(data, "Could not resolve %s: %s", host_or_proxy,
+        data->state.async.hostname);
+
+  return result;
+}
+#endif /* USE_CURL_ASYNC */
diff --git a/lib/hostip.h b/lib/hostip.h
index fb782d5..28f3b84 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -65,12 +65,14 @@
 
 struct Curl_dns_entry {
   struct Curl_addrinfo *addr;
-  /* timestamp == 0 -- CURLOPT_RESOLVE entry, doesn't timeout */
+  /* timestamp == 0 -- permanent CURLOPT_RESOLVE entry (doesn't time out) */
   time_t timestamp;
   /* use-counter, use Curl_resolv_unlock to release reference */
   long inuse;
 };
 
+bool Curl_host_is_ipnum(const char *hostname);
+
 /*
  * Curl_resolv() returns an entry with the info for the specified host
  * and port.
@@ -85,12 +87,12 @@
   CURLRESOLV_RESOLVED =  0,
   CURLRESOLV_PENDING  =  1
 };
-enum resolve_t Curl_resolv(struct connectdata *conn,
+enum resolve_t Curl_resolv(struct Curl_easy *data,
                            const char *hostname,
                            int port,
                            bool allowDOH,
                            struct Curl_dns_entry **dnsentry);
-enum resolve_t Curl_resolv_timeout(struct connectdata *conn,
+enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
                                    const char *hostname, int port,
                                    struct Curl_dns_entry **dnsentry,
                                    timediff_t timeoutms);
@@ -99,7 +101,7 @@
 /*
  * Curl_ipv6works() returns TRUE if IPv6 seems to work.
  */
-bool Curl_ipv6works(struct connectdata *conn);
+bool Curl_ipv6works(struct Curl_easy *data);
 #else
 #define Curl_ipv6works(x) FALSE
 #endif
@@ -108,7 +110,7 @@
  * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
  * been set and returns TRUE if they are OK.
  */
-bool Curl_ipvalid(struct connectdata *conn);
+bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn);
 
 
 /*
@@ -117,7 +119,7 @@
  * name resolve layers (selected at build-time). They all take this same set
  * of arguments
  */
-struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data,
                                        const char *hostname,
                                        int port,
                                        int *waitp);
@@ -136,19 +138,10 @@
 /* Return # of addresses in a Curl_addrinfo struct */
 int Curl_num_addresses(const struct Curl_addrinfo *addr);
 
-#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO)
-int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa,
-                       GETNAMEINFO_TYPE_ARG2 salen,
-                       char *host, GETNAMEINFO_TYPE_ARG46 hostlen,
-                       char *serv, GETNAMEINFO_TYPE_ARG46 servlen,
-                       GETNAMEINFO_TYPE_ARG7 flags,
-                       int line, const char *source);
-#endif
-
 /* IPv4 threadsafe resolve function used for synch and asynch builds */
 struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, int port);
 
-CURLcode Curl_once_resolved(struct connectdata *conn, bool *protocol_connect);
+CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_connect);
 
 /*
  * Curl_addrinfo_callback() is used when we build with any asynch specialty.
@@ -156,7 +149,7 @@
  * status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async
  * request completed whether successful or failed.
  */
-CURLcode Curl_addrinfo_callback(struct connectdata *conn,
+CURLcode Curl_addrinfo_callback(struct Curl_easy *data,
                                 int status,
                                 struct Curl_addrinfo *ai);
 
@@ -177,7 +170,7 @@
  * use, or we'll leak memory!
  */
 struct Curl_dns_entry *
-Curl_fetch_addr(struct connectdata *conn,
+Curl_fetch_addr(struct Curl_easy *data,
                 const char *hostname,
                 int port);
 
@@ -240,10 +233,10 @@
  * Populate the cache with specified entries from CURLOPT_RESOLVE.
  */
 CURLcode Curl_loadhostpairs(struct Curl_easy *data);
-
-CURLcode Curl_resolv_check(struct connectdata *conn,
+CURLcode Curl_resolv_check(struct Curl_easy *data,
                            struct Curl_dns_entry **dns);
-int Curl_resolv_getsock(struct connectdata *conn,
+int Curl_resolv_getsock(struct Curl_easy *data,
                         curl_socket_t *socks);
 
+CURLcode Curl_resolver_error(struct Curl_easy *data);
 #endif /* HEADER_CURL_HOSTIP_H */
diff --git a/lib/hostip4.c b/lib/hostip4.c
index eae9416..ac92126 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -61,8 +61,9 @@
  * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
  * been set and returns TRUE if they are OK.
  */
-bool Curl_ipvalid(struct connectdata *conn)
+bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn)
 {
+  (void)data;
   if(conn->ip_version == CURL_IPRESOLVE_V6)
     /* An IPv6 address was requested and we can't get/use one */
     return FALSE;
@@ -88,7 +89,7 @@
  * flavours have thread-safe versions of the plain gethostbyname() etc.
  *
  */
-struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data,
                                        const char *hostname,
                                        int port,
                                        int *waitp)
@@ -96,14 +97,14 @@
   struct Curl_addrinfo *ai = NULL;
 
 #ifdef CURL_DISABLE_VERBOSE_STRINGS
-  (void)conn;
+  (void)data;
 #endif
 
   *waitp = 0; /* synchronous response only */
 
   ai = Curl_ipv4_resolve_r(hostname, port);
   if(!ai)
-    infof(conn->data, "Curl_ipv4_resolve_r failed for %s\n", hostname);
+    infof(data, "Curl_ipv4_resolve_r failed for %s", hostname);
 
   return ai;
 }
diff --git a/lib/hostip6.c b/lib/hostip6.c
index 1121575..943cdd2 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -62,16 +62,15 @@
 /*
  * Curl_ipv6works() returns TRUE if IPv6 seems to work.
  */
-bool Curl_ipv6works(struct connectdata *conn)
+bool Curl_ipv6works(struct Curl_easy *data)
 {
-  if(conn) {
+  if(data) {
     /* the nature of most system is that IPv6 status doesn't come and go
        during a program's lifetime so we only probe the first time and then we
        have the info kept for fast re-use */
-    DEBUGASSERT(conn);
-    DEBUGASSERT(conn->data);
-    DEBUGASSERT(conn->data->multi);
-    return conn->data->multi->ipv6_works;
+    DEBUGASSERT(data);
+    DEBUGASSERT(data->multi);
+    return data->multi->ipv6_works;
   }
   else {
     int ipv6_works = -1;
@@ -82,7 +81,7 @@
       ipv6_works = 0;
     else {
       ipv6_works = 1;
-      Curl_closesocket(NULL, s);
+      sclose(s);
     }
     return (ipv6_works>0)?TRUE:FALSE;
   }
@@ -92,10 +91,10 @@
  * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
  * been set and returns TRUE if they are OK.
  */
-bool Curl_ipvalid(struct connectdata *conn)
+bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn)
 {
   if(conn->ip_version == CURL_IPRESOLVE_V6)
-    return Curl_ipv6works(conn);
+    return Curl_ipv6works(data);
 
   return TRUE;
 }
@@ -128,7 +127,7 @@
  * memory we need to free after use. That memory *MUST* be freed with
  * Curl_freeaddrinfo(), nothing else.
  */
-struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
+struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data,
                                        const char *hostname,
                                        int port,
                                        int *waitp)
@@ -141,33 +140,17 @@
 #ifndef USE_RESOLVE_ON_IPS
   char addrbuf[128];
 #endif
-  int pf;
-#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
-  struct Curl_easy *data = conn->data;
-#endif
+  int pf = PF_INET;
 
   *waitp = 0; /* synchronous response only */
 
-  /* Check if a limited name resolve has been requested */
-  switch(conn->ip_version) {
-  case CURL_IPRESOLVE_V4:
-    pf = PF_INET;
-    break;
-  case CURL_IPRESOLVE_V6:
-    pf = PF_INET6;
-    break;
-  default:
+  if(Curl_ipv6works(data))
+    /* The stack seems to be IPv6-enabled */
     pf = PF_UNSPEC;
-    break;
-  }
-
-  if((pf != PF_INET) && !Curl_ipv6works(conn))
-    /* The stack seems to be a non-IPv6 one */
-    pf = PF_INET;
 
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = pf;
-  hints.ai_socktype = (conn->transport == TRNSPRT_TCP) ?
+  hints.ai_socktype = (data->conn->transport == TRNSPRT_TCP) ?
     SOCK_STREAM : SOCK_DGRAM;
 
 #ifndef USE_RESOLVE_ON_IPS
@@ -189,7 +172,7 @@
 
   error = Curl_getaddrinfo_ex(hostname, sbufptr, &hints, &res);
   if(error) {
-    infof(data, "getaddrinfo(3) failed for %s:%d\n", hostname, port);
+    infof(data, "getaddrinfo(3) failed for %s:%d", hostname, port);
     return NULL;
   }
 
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index 9e31008..550b43a 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/hsts.c b/lib/hsts.c
new file mode 100644
index 0000000..0d5a584
--- /dev/null
+++ b/lib/hsts.c
@@ -0,0 +1,532 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+/*
+ * The Strict-Transport-Security header is defined in RFC 6797:
+ * https://tools.ietf.org/html/rfc6797
+ */
+#include "curl_setup.h"
+
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HSTS)
+#include <curl/curl.h>
+#include "urldata.h"
+#include "llist.h"
+#include "hsts.h"
+#include "curl_get_line.h"
+#include "strcase.h"
+#include "sendf.h"
+#include "strtoofft.h"
+#include "parsedate.h"
+#include "rand.h"
+#include "rename.h"
+#include "strtoofft.h"
+
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#define MAX_HSTS_LINE 4095
+#define MAX_HSTS_HOSTLEN 256
+#define MAX_HSTS_HOSTLENSTR "256"
+#define MAX_HSTS_DATELEN 64
+#define MAX_HSTS_DATELENSTR "64"
+
+#ifdef DEBUGBUILD
+/* to play well with debug builds, we can *set* a fixed time this will
+   return */
+time_t deltatime; /* allow for "adjustments" for unit test purposes */
+static time_t debugtime(void *unused)
+{
+  char *timestr = getenv("CURL_TIME");
+  (void)unused;
+  if(timestr) {
+    curl_off_t val;
+    (void)curlx_strtoofft(timestr, NULL, 10, &val);
+
+    val += (curl_off_t)deltatime;
+    return (time_t)val;
+  }
+  return time(NULL);
+}
+#define time(x) debugtime(x)
+#endif
+
+struct hsts *Curl_hsts_init(void)
+{
+  struct hsts *h = calloc(sizeof(struct hsts), 1);
+  if(h) {
+    Curl_llist_init(&h->list, NULL);
+  }
+  return h;
+}
+
+static void hsts_free(struct stsentry *e)
+{
+  free((char *)e->host);
+  free(e);
+}
+
+void Curl_hsts_cleanup(struct hsts **hp)
+{
+  struct hsts *h = *hp;
+  if(h) {
+    struct Curl_llist_element *e;
+    struct Curl_llist_element *n;
+    for(e = h->list.head; e; e = n) {
+      struct stsentry *sts = e->ptr;
+      n = e->next;
+      hsts_free(sts);
+    }
+    free(h->filename);
+    free(h);
+    *hp = NULL;
+  }
+}
+
+static struct stsentry *hsts_entry(void)
+{
+  return calloc(sizeof(struct stsentry), 1);
+}
+
+static CURLcode hsts_create(struct hsts *h,
+                            const char *hostname,
+                            bool subdomains,
+                            curl_off_t expires)
+{
+  struct stsentry *sts = hsts_entry();
+  if(!sts)
+    return CURLE_OUT_OF_MEMORY;
+
+  sts->expires = expires;
+  sts->includeSubDomains = subdomains;
+  sts->host = strdup(hostname);
+  if(!sts->host) {
+    free(sts);
+    return CURLE_OUT_OF_MEMORY;
+  }
+  Curl_llist_insert_next(&h->list, h->list.tail, sts, &sts->node);
+  return CURLE_OK;
+}
+
+CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname,
+                         const char *header)
+{
+  const char *p = header;
+  curl_off_t expires = 0;
+  bool gotma = FALSE;
+  bool gotinc = FALSE;
+  bool subdomains = FALSE;
+  struct stsentry *sts;
+  time_t now = time(NULL);
+
+  if(Curl_host_is_ipnum(hostname))
+    /* "explicit IP address identification of all forms is excluded."
+       / RFC 6797 */
+    return CURLE_OK;
+
+  do {
+    while(*p && ISSPACE(*p))
+      p++;
+    if(Curl_strncasecompare("max-age=", p, 8)) {
+      bool quoted = FALSE;
+      CURLofft offt;
+      char *endp;
+
+      if(gotma)
+        return CURLE_BAD_FUNCTION_ARGUMENT;
+
+      p += 8;
+      while(*p && ISSPACE(*p))
+        p++;
+      if(*p == '\"') {
+        p++;
+        quoted = TRUE;
+      }
+      offt = curlx_strtoofft(p, &endp, 10, &expires);
+      if(offt == CURL_OFFT_FLOW)
+        expires = CURL_OFF_T_MAX;
+      else if(offt)
+        /* invalid max-age */
+        return CURLE_BAD_FUNCTION_ARGUMENT;
+      p = endp;
+      if(quoted) {
+        if(*p != '\"')
+          return CURLE_BAD_FUNCTION_ARGUMENT;
+        p++;
+      }
+      gotma = TRUE;
+    }
+    else if(Curl_strncasecompare("includesubdomains", p, 17)) {
+      if(gotinc)
+        return CURLE_BAD_FUNCTION_ARGUMENT;
+      subdomains = TRUE;
+      p += 17;
+      gotinc = TRUE;
+    }
+    else {
+      /* unknown directive, do a lame attempt to skip */
+      while(*p && (*p != ';'))
+        p++;
+    }
+
+    while(*p && ISSPACE(*p))
+      p++;
+    if(*p == ';')
+      p++;
+  } while (*p);
+
+  if(!gotma)
+    /* max-age is mandatory */
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+
+  if(!expires) {
+    /* remove the entry if present verbatim (without subdomain match) */
+    sts = Curl_hsts(h, hostname, FALSE);
+    if(sts) {
+      Curl_llist_remove(&h->list, &sts->node, NULL);
+      hsts_free(sts);
+    }
+    return CURLE_OK;
+  }
+
+  if(CURL_OFF_T_MAX - now < expires)
+    /* would overflow, use maximum value */
+    expires = CURL_OFF_T_MAX;
+  else
+    expires += now;
+
+  /* check if it already exists */
+  sts = Curl_hsts(h, hostname, FALSE);
+  if(sts) {
+    /* just update these fields */
+    sts->expires = expires;
+    sts->includeSubDomains = subdomains;
+  }
+  else
+    return hsts_create(h, hostname, subdomains, expires);
+
+  return CURLE_OK;
+}
+
+/*
+ * Return TRUE if the given host name is currently an HSTS one.
+ *
+ * The 'subdomain' argument tells the function if subdomain matching should be
+ * attempted.
+ */
+struct stsentry *Curl_hsts(struct hsts *h, const char *hostname,
+                           bool subdomain)
+{
+  if(h) {
+    time_t now = time(NULL);
+    size_t hlen = strlen(hostname);
+    struct Curl_llist_element *e;
+    struct Curl_llist_element *n;
+    for(e = h->list.head; e; e = n) {
+      struct stsentry *sts = e->ptr;
+      n = e->next;
+      if(sts->expires <= now) {
+        /* remove expired entries */
+        Curl_llist_remove(&h->list, &sts->node, NULL);
+        hsts_free(sts);
+        continue;
+      }
+      if(subdomain && sts->includeSubDomains) {
+        size_t ntail = strlen(sts->host);
+        if(ntail < hlen) {
+          size_t offs = hlen - ntail;
+          if((hostname[offs-1] == '.') &&
+             Curl_strncasecompare(&hostname[offs], sts->host, ntail))
+            return sts;
+        }
+      }
+      if(Curl_strcasecompare(hostname, sts->host))
+        return sts;
+    }
+  }
+  return NULL; /* no match */
+}
+
+/*
+ * Send this HSTS entry to the write callback.
+ */
+static CURLcode hsts_push(struct Curl_easy *data,
+                          struct curl_index *i,
+                          struct stsentry *sts,
+                          bool *stop)
+{
+  struct curl_hstsentry e;
+  CURLSTScode sc;
+  struct tm stamp;
+  CURLcode result;
+
+  e.name = (char *)sts->host;
+  e.namelen = strlen(sts->host);
+  e.includeSubDomains = sts->includeSubDomains;
+
+  result = Curl_gmtime((time_t)sts->expires, &stamp);
+  if(result)
+    return result;
+
+  msnprintf(e.expire, sizeof(e.expire), "%d%02d%02d %02d:%02d:%02d",
+            stamp.tm_year + 1900, stamp.tm_mon + 1, stamp.tm_mday,
+            stamp.tm_hour, stamp.tm_min, stamp.tm_sec);
+
+  sc = data->set.hsts_write(data, &e, i,
+                            data->set.hsts_write_userp);
+  *stop = (sc != CURLSTS_OK);
+  return sc == CURLSTS_FAIL ? CURLE_BAD_FUNCTION_ARGUMENT : CURLE_OK;
+}
+
+/*
+ * Write this single hsts entry to a single output line
+ */
+static CURLcode hsts_out(struct stsentry *sts, FILE *fp)
+{
+  struct tm stamp;
+  CURLcode result = Curl_gmtime((time_t)sts->expires, &stamp);
+  if(result)
+    return result;
+
+  fprintf(fp, "%s%s \"%d%02d%02d %02d:%02d:%02d\"\n",
+          sts->includeSubDomains ? ".": "", sts->host,
+          stamp.tm_year + 1900, stamp.tm_mon + 1, stamp.tm_mday,
+          stamp.tm_hour, stamp.tm_min, stamp.tm_sec);
+  return CURLE_OK;
+}
+
+
+/*
+ * Curl_https_save() writes the HSTS cache to file and callback.
+ */
+CURLcode Curl_hsts_save(struct Curl_easy *data, struct hsts *h,
+                        const char *file)
+{
+  struct Curl_llist_element *e;
+  struct Curl_llist_element *n;
+  CURLcode result = CURLE_OK;
+  FILE *out;
+  char *tempstore;
+  unsigned char randsuffix[9];
+
+  if(!h)
+    /* no cache activated */
+    return CURLE_OK;
+
+  /* if no new name is given, use the one we stored from the load */
+  if(!file && h->filename)
+    file = h->filename;
+
+  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
+    /* marked as read-only, no file or zero length file name */
+    goto skipsave;
+
+  if(Curl_rand_hex(data, randsuffix, sizeof(randsuffix)))
+    return CURLE_FAILED_INIT;
+
+  tempstore = aprintf("%s.%s.tmp", file, randsuffix);
+  if(!tempstore)
+    return CURLE_OUT_OF_MEMORY;
+
+  out = fopen(tempstore, FOPEN_WRITETEXT);
+  if(!out)
+    result = CURLE_WRITE_ERROR;
+  else {
+    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
+          "# This file was generated by libcurl! Edit at your own risk.\n",
+          out);
+    for(e = h->list.head; e; e = n) {
+      struct stsentry *sts = e->ptr;
+      n = e->next;
+      result = hsts_out(sts, out);
+      if(result)
+        break;
+    }
+    fclose(out);
+    if(!result && Curl_rename(tempstore, file))
+      result = CURLE_WRITE_ERROR;
+
+    if(result)
+      unlink(tempstore);
+  }
+  free(tempstore);
+  skipsave:
+  if(data->set.hsts_write) {
+    /* if there's a write callback */
+    struct curl_index i; /* count */
+    i.total = h->list.size;
+    i.index = 0;
+    for(e = h->list.head; e; e = n) {
+      struct stsentry *sts = e->ptr;
+      bool stop;
+      n = e->next;
+      result = hsts_push(data, &i, sts, &stop);
+      if(result || stop)
+        break;
+      i.index++;
+    }
+  }
+  return result;
+}
+
+/* only returns SERIOUS errors */
+static CURLcode hsts_add(struct hsts *h, char *line)
+{
+  /* Example lines:
+     example.com "20191231 10:00:00"
+     .example.net "20191231 10:00:00"
+   */
+  char host[MAX_HSTS_HOSTLEN + 1];
+  char date[MAX_HSTS_DATELEN + 1];
+  int rc;
+
+  rc = sscanf(line,
+              "%" MAX_HSTS_HOSTLENSTR "s \"%" MAX_HSTS_DATELENSTR "[^\"]\"",
+              host, date);
+  if(2 == rc) {
+    time_t expires = Curl_getdate_capped(date);
+    CURLcode result;
+    char *p = host;
+    bool subdomain = FALSE;
+    if(p[0] == '.') {
+      p++;
+      subdomain = TRUE;
+    }
+    result = hsts_create(h, p, subdomain, expires);
+    if(result)
+      return result;
+  }
+
+  return CURLE_OK;
+}
+
+/*
+ * Load HSTS data from callback.
+ *
+ */
+static CURLcode hsts_pull(struct Curl_easy *data, struct hsts *h)
+{
+  /* if the HSTS read callback is set, use it */
+  if(data->set.hsts_read) {
+    CURLSTScode sc;
+    DEBUGASSERT(h);
+    do {
+      char buffer[257];
+      struct curl_hstsentry e;
+      e.name = buffer;
+      e.namelen = sizeof(buffer)-1;
+      e.includeSubDomains = FALSE; /* default */
+      e.expire[0] = 0;
+      e.name[0] = 0; /* just to make it clean */
+      sc = data->set.hsts_read(data, &e, data->set.hsts_read_userp);
+      if(sc == CURLSTS_OK) {
+        time_t expires;
+        CURLcode result;
+        if(!e.name[0])
+          /* bail out if no name was stored */
+          return CURLE_BAD_FUNCTION_ARGUMENT;
+        if(e.expire[0])
+          expires = Curl_getdate_capped(e.expire);
+        else
+          expires = TIME_T_MAX; /* the end of time */
+        result = hsts_create(h, e.name,
+                             /* bitfield to bool conversion: */
+                             e.includeSubDomains ? TRUE : FALSE,
+                             expires);
+        if(result)
+          return result;
+      }
+      else if(sc == CURLSTS_FAIL)
+        return CURLE_BAD_FUNCTION_ARGUMENT;
+    } while(sc == CURLSTS_OK);
+  }
+  return CURLE_OK;
+}
+
+/*
+ * Load the HSTS cache from the given file. The text based line-oriented file
+ * format is documented here:
+ * https://github.com/curl/curl/wiki/HSTS
+ *
+ * This function only returns error on major problems that prevent hsts
+ * handling to work completely. It will ignore individual syntactical errors
+ * etc.
+ */
+static CURLcode hsts_load(struct hsts *h, const char *file)
+{
+  CURLcode result = CURLE_OK;
+  char *line = NULL;
+  FILE *fp;
+
+  /* we need a private copy of the file name so that the hsts cache file
+     name survives an easy handle reset */
+  free(h->filename);
+  h->filename = strdup(file);
+  if(!h->filename)
+    return CURLE_OUT_OF_MEMORY;
+
+  fp = fopen(file, FOPEN_READTEXT);
+  if(fp) {
+    line = malloc(MAX_HSTS_LINE);
+    if(!line)
+      goto fail;
+    while(Curl_get_line(line, MAX_HSTS_LINE, fp)) {
+      char *lineptr = line;
+      while(*lineptr && ISBLANK(*lineptr))
+        lineptr++;
+      if(*lineptr == '#')
+        /* skip commented lines */
+        continue;
+
+      hsts_add(h, lineptr);
+    }
+    free(line); /* free the line buffer */
+    fclose(fp);
+  }
+  return result;
+
+  fail:
+  Curl_safefree(h->filename);
+  fclose(fp);
+  return CURLE_OUT_OF_MEMORY;
+}
+
+/*
+ * Curl_hsts_loadfile() loads HSTS from file
+ */
+CURLcode Curl_hsts_loadfile(struct Curl_easy *data,
+                            struct hsts *h, const char *file)
+{
+  DEBUGASSERT(h);
+  (void)data;
+  return hsts_load(h, file);
+}
+
+/*
+ * Curl_hsts_loadcb() loads HSTS from callback
+ */
+CURLcode Curl_hsts_loadcb(struct Curl_easy *data, struct hsts *h)
+{
+  return hsts_pull(data, h);
+}
+
+#endif /* CURL_DISABLE_HTTP || CURL_DISABLE_HSTS */
diff --git a/lib/hsts.h b/lib/hsts.h
new file mode 100644
index 0000000..baa5828
--- /dev/null
+++ b/lib/hsts.h
@@ -0,0 +1,65 @@
+#ifndef HEADER_CURL_HSTS_H
+#define HEADER_CURL_HSTS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curl_setup.h"
+
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HSTS)
+#include <curl/curl.h>
+#include "llist.h"
+
+#ifdef DEBUGBUILD
+extern time_t deltatime;
+#endif
+
+struct stsentry {
+  struct Curl_llist_element node;
+  const char *host;
+  bool includeSubDomains;
+  curl_off_t expires; /* the timestamp of this entry's expiry */
+};
+
+/* The HSTS cache. Needs to be able to tailmatch host names. */
+struct hsts {
+  struct Curl_llist list;
+  char *filename;
+  unsigned int flags;
+};
+
+struct hsts *Curl_hsts_init(void);
+void Curl_hsts_cleanup(struct hsts **hp);
+CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname,
+                         const char *sts);
+struct stsentry *Curl_hsts(struct hsts *h, const char *hostname,
+                           bool subdomain);
+CURLcode Curl_hsts_save(struct Curl_easy *data, struct hsts *h,
+                        const char *file);
+CURLcode Curl_hsts_loadfile(struct Curl_easy *data,
+                            struct hsts *h, const char *file);
+CURLcode Curl_hsts_loadcb(struct Curl_easy *data,
+                          struct hsts *h);
+#else
+#define Curl_hsts_cleanup(x)
+#define Curl_hsts_loadcb(x,y)
+#define Curl_hsts_save(x,y,z)
+#endif /* CURL_DISABLE_HTTP || CURL_DISABLE_HSTS */
+#endif /* HEADER_CURL_HSTS_H */
diff --git a/lib/http.c b/lib/http.c
index e0be17d..05b971b 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -45,6 +45,10 @@
 #include <sys/param.h>
 #endif
 
+#ifdef USE_HYPER
+#include <hyper.h>
+#endif
+
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
@@ -60,6 +64,7 @@
 #include "http_ntlm.h"
 #include "curl_ntlm_wb.h"
 #include "http_negotiate.h"
+#include "http_aws_sigv4.h"
 #include "url.h"
 #include "share.h"
 #include "hostip.h"
@@ -77,6 +82,8 @@
 #include "connect.h"
 #include "strdup.h"
 #include "altsvc.h"
+#include "hsts.h"
+#include "c-hyper.h"
 
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
@@ -87,22 +94,25 @@
  * Forward declarations.
  */
 
-static int http_getsock_do(struct connectdata *conn,
+static int http_getsock_do(struct Curl_easy *data,
+                           struct connectdata *conn,
                            curl_socket_t *socks);
-static int http_should_fail(struct connectdata *conn);
+static bool http_should_fail(struct Curl_easy *data);
 
 #ifndef CURL_DISABLE_PROXY
-static CURLcode add_haproxy_protocol_header(struct connectdata *conn);
+static CURLcode add_haproxy_protocol_header(struct Curl_easy *data);
 #endif
 
 #ifdef USE_SSL
-static CURLcode https_connecting(struct connectdata *conn, bool *done);
-static int https_getsock(struct connectdata *conn,
+static CURLcode https_connecting(struct Curl_easy *data, bool *done);
+static int https_getsock(struct Curl_easy *data,
+                         struct connectdata *conn,
                          curl_socket_t *socks);
 #else
 #define https_connecting(x,y) CURLE_COULDNT_CONNECT
 #endif
-static CURLcode http_setup_conn(struct connectdata *conn);
+static CURLcode http_setup_conn(struct Curl_easy *data,
+                                struct connectdata *conn);
 
 /*
  * HTTP handler interface.
@@ -123,6 +133,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_HTTP,                            /* defport */
   CURLPROTO_HTTP,                       /* protocol */
   CURLPROTO_HTTP,                       /* family */
@@ -150,6 +161,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_HTTPS,                           /* defport */
   CURLPROTO_HTTPS,                      /* protocol */
   CURLPROTO_HTTP,                       /* family */
@@ -158,22 +170,22 @@
 };
 #endif
 
-static CURLcode http_setup_conn(struct connectdata *conn)
+static CURLcode http_setup_conn(struct Curl_easy *data,
+                                struct connectdata *conn)
 {
   /* allocate the HTTP-specific struct for the Curl_easy, only to survive
      during this request */
   struct HTTP *http;
-  struct Curl_easy *data = conn->data;
-  DEBUGASSERT(data->req.protop == NULL);
+  DEBUGASSERT(data->req.p.http == NULL);
 
   http = calloc(1, sizeof(struct HTTP));
   if(!http)
     return CURLE_OUT_OF_MEMORY;
 
-  Curl_mime_initpart(&http->form, conn->data);
-  data->req.protop = http;
+  Curl_mime_initpart(&http->form, data);
+  data->req.p.http = http;
 
-  if(data->set.httpversion == CURL_HTTP_VERSION_3) {
+  if(data->state.httpwant == CURL_HTTP_VERSION_3) {
     if(conn->handler->flags & PROTOPT_SSL)
       /* Only go HTTP/3 directly on HTTPS URLs. It needs a UDP socket and does
          the QUIC dance. */
@@ -198,16 +210,16 @@
  * if proxy headers are not available, then it will lookup into http header
  * link list
  *
- * It takes a connectdata struct as input instead of the Curl_easy simply to
- * know if this is a proxy request or not, as it then might check a different
- * header list. Provide the header prefix without colon!.
+ * It takes a connectdata struct as input to see if this is a proxy request or
+ * not, as it then might check a different header list. Provide the header
+ * prefix without colon!
  */
-char *Curl_checkProxyheaders(const struct connectdata *conn,
+char *Curl_checkProxyheaders(struct Curl_easy *data,
+                             const struct connectdata *conn,
                              const char *thisheader)
 {
   struct curl_slist *head;
   size_t thislen = strlen(thisheader);
-  struct Curl_easy *data = conn->data;
 
   for(head = (conn->bits.proxy && data->set.sep_headers) ?
         data->set.proxyheaders : data->set.headers;
@@ -221,7 +233,7 @@
 }
 #else
 /* disabled */
-#define Curl_checkProxyheaders(x,y) NULL
+#define Curl_checkProxyheaders(x,y,z) NULL
 #endif
 
 /*
@@ -284,30 +296,31 @@
  *
  * Returns CURLcode.
  */
-static CURLcode http_output_basic(struct connectdata *conn, bool proxy)
+static CURLcode http_output_basic(struct Curl_easy *data, bool proxy)
 {
   size_t size = 0;
   char *authorization = NULL;
-  struct Curl_easy *data = conn->data;
   char **userp;
   const char *user;
   const char *pwd;
   CURLcode result;
   char *out;
 
+  /* credentials are unique per transfer for HTTP, do not use the ones for the
+     connection */
   if(proxy) {
 #ifndef CURL_DISABLE_PROXY
     userp = &data->state.aptr.proxyuserpwd;
-    user = conn->http_proxy.user;
-    pwd = conn->http_proxy.passwd;
+    user = data->state.aptr.proxyuser;
+    pwd = data->state.aptr.proxypasswd;
 #else
     return CURLE_NOT_BUILT_IN;
 #endif
   }
   else {
     userp = &data->state.aptr.userpwd;
-    user = conn->user;
-    pwd = conn->passwd;
+    user = data->state.aptr.user;
+    pwd = data->state.aptr.passwd;
   }
 
   out = aprintf("%s:%s", user, pwd ? pwd : "");
@@ -344,16 +357,15 @@
  *
  * Returns CURLcode.
  */
-static CURLcode http_output_bearer(struct connectdata *conn)
+static CURLcode http_output_bearer(struct Curl_easy *data)
 {
   char **userp;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
 
   userp = &data->state.aptr.userpwd;
   free(*userp);
   *userp = aprintf("Authorization: Bearer %s\r\n",
-                   conn->data->set.str[STRING_BEARER]);
+                   data->set.str[STRING_BEARER]);
 
   if(!*userp) {
     result = CURLE_OUT_OF_MEMORY;
@@ -392,6 +404,8 @@
     pick->picked = CURLAUTH_NTLM_WB;
   else if(avail & CURLAUTH_BASIC)
     pick->picked = CURLAUTH_BASIC;
+  else if(avail & CURLAUTH_AWS_SIGV4)
+    pick->picked = CURLAUTH_AWS_SIGV4;
   else {
     pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */
     picked = FALSE;
@@ -424,10 +438,10 @@
  *   }
  * }
  */
-static CURLcode http_perhapsrewind(struct connectdata *conn)
+static CURLcode http_perhapsrewind(struct Curl_easy *data,
+                                   struct connectdata *conn)
 {
-  struct Curl_easy *data = conn->data;
-  struct HTTP *http = data->req.protop;
+  struct HTTP *http = data->req.p.http;
   curl_off_t bytessent;
   curl_off_t expectsend = -1; /* default is unknown */
 
@@ -490,7 +504,7 @@
         /* rewind data when completely done sending! */
         if(!conn->bits.authneg && (conn->writesockfd != CURL_SOCKET_BAD)) {
           conn->bits.rewindaftersend = TRUE;
-          infof(data, "Rewind stream after send\n");
+          infof(data, "Rewind stream after send");
         }
 
         return CURLE_OK;
@@ -501,7 +515,7 @@
         return CURLE_OK;
 
       infof(data, "NTLM send, close instead of sending %"
-            CURL_FORMAT_CURL_OFF_T " bytes\n",
+            CURL_FORMAT_CURL_OFF_T " bytes",
             (curl_off_t)(expectsend - bytessent));
     }
 #endif
@@ -518,7 +532,7 @@
         /* rewind data when completely done sending! */
         if(!conn->bits.authneg && (conn->writesockfd != CURL_SOCKET_BAD)) {
           conn->bits.rewindaftersend = TRUE;
-          infof(data, "Rewind stream after send\n");
+          infof(data, "Rewind stream after send");
         }
 
         return CURLE_OK;
@@ -529,7 +543,7 @@
         return CURLE_OK;
 
       infof(data, "NEGOTIATE send, close instead of sending %"
-        CURL_FORMAT_CURL_OFF_T " bytes\n",
+        CURL_FORMAT_CURL_OFF_T " bytes",
         (curl_off_t)(expectsend - bytessent));
     }
 #endif
@@ -544,7 +558,7 @@
 
   if(bytessent)
     /* we rewind now at once since if we already sent something */
-    return Curl_readrewind(conn);
+    return Curl_readrewind(data);
 
   return CURLE_OK;
 }
@@ -556,9 +570,9 @@
  * picked.
  */
 
-CURLcode Curl_http_auth_act(struct connectdata *conn)
+CURLcode Curl_http_auth_act(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   bool pickhost = FALSE;
   bool pickproxy = FALSE;
   CURLcode result = CURLE_OK;
@@ -584,7 +598,7 @@
        conn->httpversion > 11) {
       infof(data, "Forcing HTTP/1.1 for NTLM");
       connclose(conn, "Force HTTP/1.1 connection");
-      conn->data->set.httpversion = CURL_HTTP_VERSION_1_1;
+      data->state.httpwant = CURL_HTTP_VERSION_1_1;
     }
   }
 #ifndef CURL_DISABLE_PROXY
@@ -602,7 +616,7 @@
     if((data->state.httpreq != HTTPREQ_GET) &&
        (data->state.httpreq != HTTPREQ_HEAD) &&
        !conn->bits.rewindaftersend) {
-      result = http_perhapsrewind(conn);
+      result = http_perhapsrewind(data, conn);
       if(result)
         return result;
     }
@@ -610,7 +624,7 @@
        we must make sure to free it before allocating a new one. As figured
        out in bug #2284386 */
     Curl_safefree(data->req.newurl);
-    data->req.newurl = strdup(data->change.url); /* clone URL */
+    data->req.newurl = strdup(data->state.url); /* clone URL */
     if(!data->req.newurl)
       return CURLE_OUT_OF_MEMORY;
   }
@@ -623,13 +637,13 @@
        we didn't try HEAD or GET */
     if((data->state.httpreq != HTTPREQ_GET) &&
        (data->state.httpreq != HTTPREQ_HEAD)) {
-      data->req.newurl = strdup(data->change.url); /* clone URL */
+      data->req.newurl = strdup(data->state.url); /* clone URL */
       if(!data->req.newurl)
         return CURLE_OUT_OF_MEMORY;
       data->state.authhost.done = TRUE;
     }
   }
-  if(http_should_fail(conn)) {
+  if(http_should_fail(data)) {
     failf(data, "The requested URL returned error: %d",
           data->req.httpcode);
     result = CURLE_HTTP_RETURNED_ERROR;
@@ -644,7 +658,8 @@
  * and whether or not it is to a proxy.
  */
 static CURLcode
-output_auth_headers(struct connectdata *conn,
+output_auth_headers(struct Curl_easy *data,
+                    struct connectdata *conn,
                     struct auth *authstatus,
                     const char *request,
                     const char *path,
@@ -652,17 +667,24 @@
 {
   const char *auth = NULL;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
 
 #ifdef CURL_DISABLE_CRYPTO_AUTH
   (void)request;
   (void)path;
 #endif
-
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+  if(authstatus->picked == CURLAUTH_AWS_SIGV4) {
+    auth = "AWS_SIGV4";
+    result = Curl_output_aws_sigv4(data, proxy);
+    if(result)
+      return result;
+  }
+  else
+#endif
 #ifdef USE_SPNEGO
   if(authstatus->picked == CURLAUTH_NEGOTIATE) {
     auth = "Negotiate";
-    result = Curl_output_negotiate(conn, proxy);
+    result = Curl_output_negotiate(data, conn, proxy);
     if(result)
       return result;
   }
@@ -671,7 +693,7 @@
 #ifdef USE_NTLM
   if(authstatus->picked == CURLAUTH_NTLM) {
     auth = "NTLM";
-    result = Curl_output_ntlm(conn, proxy);
+    result = Curl_output_ntlm(data, proxy);
     if(result)
       return result;
   }
@@ -680,7 +702,7 @@
 #if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
   if(authstatus->picked == CURLAUTH_NTLM_WB) {
     auth = "NTLM_WB";
-    result = Curl_output_ntlm_wb(conn, proxy);
+    result = Curl_output_ntlm_wb(data, conn, proxy);
     if(result)
       return result;
   }
@@ -689,7 +711,7 @@
 #ifndef CURL_DISABLE_CRYPTO_AUTH
   if(authstatus->picked == CURLAUTH_DIGEST) {
     auth = "Digest";
-    result = Curl_output_digest(conn,
+    result = Curl_output_digest(data,
                                 proxy,
                                 (const unsigned char *)request,
                                 (const unsigned char *)path);
@@ -703,12 +725,12 @@
     if(
 #ifndef CURL_DISABLE_PROXY
       (proxy && conn->bits.proxy_user_passwd &&
-       !Curl_checkProxyheaders(conn, "Proxy-authorization")) ||
+       !Curl_checkProxyheaders(data, conn, "Proxy-authorization")) ||
 #endif
       (!proxy && conn->bits.user_passwd &&
-       !Curl_checkheaders(conn, "Authorization"))) {
+       !Curl_checkheaders(data, "Authorization"))) {
       auth = "Basic";
-      result = http_output_basic(conn, proxy);
+      result = http_output_basic(data, proxy);
       if(result)
         return result;
     }
@@ -720,9 +742,9 @@
   if(authstatus->picked == CURLAUTH_BEARER) {
     /* Bearer */
     if((!proxy && data->set.str[STRING_BEARER] &&
-        !Curl_checkheaders(conn, "Authorization:"))) {
+        !Curl_checkheaders(data, "Authorization"))) {
       auth = "Bearer";
-      result = http_output_bearer(conn);
+      result = http_output_bearer(data);
       if(result)
         return result;
     }
@@ -734,13 +756,16 @@
 
   if(auth) {
 #ifndef CURL_DISABLE_PROXY
-    infof(data, "%s auth using %s with user '%s'\n",
+    infof(data, "%s auth using %s with user '%s'",
           proxy ? "Proxy" : "Server", auth,
-          proxy ? (conn->http_proxy.user ? conn->http_proxy.user : "") :
-          (conn->user ? conn->user : ""));
+          proxy ? (data->state.aptr.proxyuser ?
+                   data->state.aptr.proxyuser : "") :
+          (data->state.aptr.user ?
+           data->state.aptr.user : ""));
 #else
-    infof(data, "Server auth using %s with user '%s'\n",
-          auth, conn->user ? conn->user : "");
+    infof(data, "Server auth using %s with user '%s'",
+          auth, data->state.aptr.user ?
+          data->state.aptr.user : "");
 #endif
     authstatus->multipass = (!authstatus->done) ? TRUE : FALSE;
   }
@@ -753,7 +778,7 @@
 /**
  * Curl_http_output_auth() setups the authentication headers for the
  * host/proxy and the correct authentication
- * method. conn->data->state.authdone is set to TRUE when authentication is
+ * method. data->state.authdone is set to TRUE when authentication is
  * done.
  *
  * @param conn all information about the current connection
@@ -765,14 +790,15 @@
  * @returns CURLcode
  */
 CURLcode
-Curl_http_output_auth(struct connectdata *conn,
+Curl_http_output_auth(struct Curl_easy *data,
+                      struct connectdata *conn,
                       const char *request,
+                      Curl_HttpReq httpreq,
                       const char *path,
                       bool proxytunnel) /* TRUE if this is the request setting
                                            up the proxy tunnel */
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct auth *authhost;
   struct auth *authproxy;
 
@@ -809,7 +835,7 @@
   /* Send proxy authentication header if needed */
   if(conn->bits.httpproxy &&
      (conn->bits.tunnel_proxy == (bit)proxytunnel)) {
-    result = output_auth_headers(conn, authproxy, request, path, TRUE);
+    result = output_auth_headers(data, conn, authproxy, request, path, TRUE);
     if(result)
       return result;
   }
@@ -824,28 +850,45 @@
   /* To prevent the user+password to get sent to other than the original
      host due to a location-follow, we do some weirdo checks here */
   if(!data->state.this_is_a_follow ||
+#ifndef CURL_DISABLE_NETRC
      conn->bits.netrc ||
+#endif
      !data->state.first_host ||
      data->set.allow_auth_to_other_hosts ||
      strcasecompare(data->state.first_host, conn->host.name)) {
-    result = output_auth_headers(conn, authhost, request, path, FALSE);
+    result = output_auth_headers(data, conn, authhost, request, path, FALSE);
   }
   else
     authhost->done = TRUE;
 
+  if(((authhost->multipass && !authhost->done) ||
+      (authproxy->multipass && !authproxy->done)) &&
+     (httpreq != HTTPREQ_GET) &&
+     (httpreq != HTTPREQ_HEAD)) {
+    /* Auth is required and we are not authenticated yet. Make a PUT or POST
+       with content-length zero as a "probe". */
+    conn->bits.authneg = TRUE;
+  }
+  else
+    conn->bits.authneg = FALSE;
+
   return result;
 }
 
 #else
 /* when disabled */
 CURLcode
-Curl_http_output_auth(struct connectdata *conn,
+Curl_http_output_auth(struct Curl_easy *data,
+                      struct connectdata *conn,
                       const char *request,
+                      Curl_HttpReq httpreq,
                       const char *path,
                       bool proxytunnel)
 {
+  (void)data;
   (void)conn;
   (void)request;
+  (void)httpreq;
   (void)path;
   (void)proxytunnel;
   return CURLE_OK;
@@ -858,14 +901,18 @@
  * proxy CONNECT loop.
  */
 
-CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
+static int is_valid_auth_separator(char ch)
+{
+  return ch == '\0' || ch == ',' || ISSPACE(ch);
+}
+
+CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
                               const char *auth) /* the first non-space */
 {
   /*
    * This resource requires authentication
    */
-  struct Curl_easy *data = conn->data;
-
+  struct connectdata *conn = data->conn;
 #ifdef USE_SPNEGO
   curlnegotiate *negstate = proxy ? &conn->proxy_negotiate_state :
                                     &conn->http_negotiate_state;
@@ -873,6 +920,8 @@
   unsigned long *availp;
   struct auth *authp;
 
+  (void) conn; /* In case conditionals make it unused. */
+
   if(proxy) {
     availp = &data->info.proxyauthavail;
     authp = &data->state.authproxy;
@@ -900,17 +949,17 @@
 
   while(*auth) {
 #ifdef USE_SPNEGO
-    if(checkprefix("Negotiate", auth)) {
+    if(checkprefix("Negotiate", auth) && is_valid_auth_separator(auth[9])) {
       if((authp->avail & CURLAUTH_NEGOTIATE) ||
          Curl_auth_is_spnego_supported()) {
         *availp |= CURLAUTH_NEGOTIATE;
         authp->avail |= CURLAUTH_NEGOTIATE;
 
         if(authp->picked == CURLAUTH_NEGOTIATE) {
-          CURLcode result = Curl_input_negotiate(conn, proxy, auth);
+          CURLcode result = Curl_input_negotiate(data, conn, proxy, auth);
           if(!result) {
             DEBUGASSERT(!data->req.newurl);
-            data->req.newurl = strdup(data->change.url);
+            data->req.newurl = strdup(data->state.url);
             if(!data->req.newurl)
               return CURLE_OUT_OF_MEMORY;
             data->state.authproblem = FALSE;
@@ -926,7 +975,7 @@
 #endif
 #ifdef USE_NTLM
       /* NTLM support requires the SSL crypto libs */
-      if(checkprefix("NTLM", auth)) {
+      if(checkprefix("NTLM", auth) && is_valid_auth_separator(auth[4])) {
         if((authp->avail & CURLAUTH_NTLM) ||
            (authp->avail & CURLAUTH_NTLM_WB) ||
            Curl_auth_is_ntlm_supported()) {
@@ -936,7 +985,7 @@
           if(authp->picked == CURLAUTH_NTLM ||
              authp->picked == CURLAUTH_NTLM_WB) {
             /* NTLM authentication is picked and activated */
-            CURLcode result = Curl_input_ntlm(conn, proxy, auth);
+            CURLcode result = Curl_input_ntlm(data, proxy, auth);
             if(!result) {
               data->state.authproblem = FALSE;
 #ifdef NTLM_WB_ENABLED
@@ -946,16 +995,16 @@
                 *availp |= CURLAUTH_NTLM_WB;
                 authp->avail |= CURLAUTH_NTLM_WB;
 
-                result = Curl_input_ntlm_wb(conn, proxy, auth);
+                result = Curl_input_ntlm_wb(data, conn, proxy, auth);
                 if(result) {
-                  infof(data, "Authentication problem. Ignoring this.\n");
+                  infof(data, "Authentication problem. Ignoring this.");
                   data->state.authproblem = TRUE;
                 }
               }
 #endif
             }
             else {
-              infof(data, "Authentication problem. Ignoring this.\n");
+              infof(data, "Authentication problem. Ignoring this.");
               data->state.authproblem = TRUE;
             }
           }
@@ -964,9 +1013,9 @@
       else
 #endif
 #ifndef CURL_DISABLE_CRYPTO_AUTH
-        if(checkprefix("Digest", auth)) {
+        if(checkprefix("Digest", auth) && is_valid_auth_separator(auth[6])) {
           if((authp->avail & CURLAUTH_DIGEST) != 0)
-            infof(data, "Ignoring duplicate digest auth header.\n");
+            infof(data, "Ignoring duplicate digest auth header.");
           else if(Curl_auth_is_digest_supported()) {
             CURLcode result;
 
@@ -977,16 +1026,17 @@
              * authentication isn't activated yet, as we need to store the
              * incoming data from this header in case we are going to use
              * Digest */
-            result = Curl_input_digest(conn, proxy, auth);
+            result = Curl_input_digest(data, proxy, auth);
             if(result) {
-              infof(data, "Authentication problem. Ignoring this.\n");
+              infof(data, "Authentication problem. Ignoring this.");
               data->state.authproblem = TRUE;
             }
           }
         }
         else
 #endif
-          if(checkprefix("Basic", auth)) {
+          if(checkprefix("Basic", auth) &&
+             is_valid_auth_separator(auth[5])) {
             *availp |= CURLAUTH_BASIC;
             authp->avail |= CURLAUTH_BASIC;
             if(authp->picked == CURLAUTH_BASIC) {
@@ -994,19 +1044,20 @@
                  anyway, which basically means our name+password isn't
                  valid. */
               authp->avail = CURLAUTH_NONE;
-              infof(data, "Authentication problem. Ignoring this.\n");
+              infof(data, "Authentication problem. Ignoring this.");
               data->state.authproblem = TRUE;
             }
           }
           else
-            if(checkprefix("Bearer", auth)) {
+            if(checkprefix("Bearer", auth) &&
+               is_valid_auth_separator(auth[6])) {
               *availp |= CURLAUTH_BEARER;
               authp->avail |= CURLAUTH_BEARER;
               if(authp->picked == CURLAUTH_BEARER) {
                 /* We asked for Bearer authentication but got a 40X back
                   anyway, which basically means our token isn't valid. */
                 authp->avail = CURLAUTH_NONE;
-                infof(data, "Authentication problem. Ignoring this.\n");
+                infof(data, "Authentication problem. Ignoring this.");
                 data->state.authproblem = TRUE;
               }
             }
@@ -1029,18 +1080,15 @@
  *
  * @param conn all information about the current connection
  *
- * @retval 0 communications should continue
+ * @retval FALSE communications should continue
  *
- * @retval 1 communications should not continue
+ * @retval TRUE communications should not continue
  */
-static int http_should_fail(struct connectdata *conn)
+static bool http_should_fail(struct Curl_easy *data)
 {
-  struct Curl_easy *data;
   int httpcode;
-
-  DEBUGASSERT(conn);
-  data = conn->data;
   DEBUGASSERT(data);
+  DEBUGASSERT(data->conn);
 
   httpcode = data->req.httpcode;
 
@@ -1049,20 +1097,28 @@
   ** don't fail.
   */
   if(!data->set.http_fail_on_error)
-    return 0;
+    return FALSE;
 
   /*
   ** Any code < 400 is never terminal.
   */
   if(httpcode < 400)
-    return 0;
+    return FALSE;
+
+  /*
+  ** A 416 response to a resume request is presumably because the file is
+  ** already completely downloaded and thus not actually a fail.
+  */
+  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
+     httpcode == 416)
+    return FALSE;
 
   /*
   ** Any code >= 400 that's not 401 or 407 is always
   ** a terminal error
   */
   if((httpcode != 401) && (httpcode != 407))
-    return 1;
+    return TRUE;
 
   /*
   ** All we have left to deal with is 401 and 407
@@ -1087,16 +1143,17 @@
   ** Either we're not authenticating, or we're supposed to
   ** be authenticating something else.  This is an error.
   */
-  if((httpcode == 401) && !conn->bits.user_passwd)
+  if((httpcode == 401) && !data->conn->bits.user_passwd)
     return TRUE;
 #ifndef CURL_DISABLE_PROXY
-  if((httpcode == 407) && !conn->bits.proxy_user_passwd)
+  if((httpcode == 407) && !data->conn->bits.proxy_user_passwd)
     return TRUE;
 #endif
 
   return data->state.authproblem;
 }
 
+#ifndef USE_HYPER
 /*
  * readmoredata() is a "fread() emulation" to provide POST and/or request
  * data. It is used when a huge POST is to be made and the entire chunk wasn't
@@ -1110,8 +1167,8 @@
                            size_t nitems,
                            void *userp)
 {
-  struct connectdata *conn = (struct connectdata *)userp;
-  struct HTTP *http = conn->data->req.protop;
+  struct Curl_easy *data = (struct Curl_easy *)userp;
+  struct HTTP *http = data->req.p.http;
   size_t fullsize = size * nitems;
 
   if(!http->postsize)
@@ -1119,9 +1176,15 @@
     return 0;
 
   /* make sure that a HTTP request is never sent away chunked! */
-  conn->data->req.forbidchunk = (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE;
+  data->req.forbidchunk = (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE;
 
-  if(http->postsize <= (curl_off_t)fullsize) {
+  if(data->set.max_send_speed &&
+     (data->set.max_send_speed < (curl_off_t)fullsize) &&
+     (data->set.max_send_speed < http->postsize))
+    /* speed limit */
+    fullsize = (size_t)data->set.max_send_speed;
+
+  else if(http->postsize <= (curl_off_t)fullsize) {
     memcpy(buffer, http->postdata, (size_t)http->postsize);
     fullsize = (size_t)http->postsize;
 
@@ -1129,8 +1192,8 @@
       /* move backup data into focus and continue on that */
       http->postdata = http->backup.postdata;
       http->postsize = http->backup.postsize;
-      conn->data->state.fread_func = http->backup.fread_func;
-      conn->data->state.in = http->backup.fread_in;
+      data->state.fread_func = http->backup.fread_func;
+      data->state.in = http->backup.fread_in;
 
       http->sending++; /* move one step up */
 
@@ -1156,20 +1219,20 @@
  * Returns CURLcode
  */
 CURLcode Curl_buffer_send(struct dynbuf *in,
-                          struct connectdata *conn,
+                          struct Curl_easy *data,
                           /* add the number of sent bytes to this
                              counter */
                           curl_off_t *bytes_written,
                           /* how much of the buffer contains body data */
-                          size_t included_body_bytes,
+                          curl_off_t included_body_bytes,
                           int socketindex)
 {
   ssize_t amount;
   CURLcode result;
   char *ptr;
   size_t size;
-  struct Curl_easy *data = conn->data;
-  struct HTTP *http = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct HTTP *http = data->req.p.http;
   size_t sendsize;
   curl_socket_t sockfd;
   size_t headersize;
@@ -1184,10 +1247,10 @@
   ptr = Curl_dyn_ptr(in);
   size = Curl_dyn_len(in);
 
-  headersize = size - included_body_bytes; /* the initial part that isn't body
-                                              is header */
+  headersize = size - (size_t)included_body_bytes; /* the initial part that
+                                                      isn't body is header */
 
-  DEBUGASSERT(size > included_body_bytes);
+  DEBUGASSERT(size > (size_t)included_body_bytes);
 
   result = Curl_convert_to_network(data, ptr, headersize);
   /* Curl_convert_to_network calls failf if unsuccessful */
@@ -1203,13 +1266,17 @@
 #endif
        )
      && conn->httpversion != 20) {
-    /* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk
-       when we speak HTTPS, as if only a fraction of it is sent now, this data
-       needs to fit into the normal read-callback buffer later on and that
-       buffer is using this size.
+    /* Make sure this doesn't send more body bytes than what the max send
+       speed says. The request bytes do not count to the max speed.
     */
-
-    sendsize = CURLMIN(size, CURL_MAX_WRITE_SIZE);
+    if(data->set.max_send_speed &&
+       (included_body_bytes > data->set.max_send_speed)) {
+      curl_off_t overflow = included_body_bytes - data->set.max_send_speed;
+      DEBUGASSERT((size_t)overflow < size);
+      sendsize = size - (size_t)overflow;
+    }
+    else
+      sendsize = size;
 
     /* OpenSSL is very picky and we must send the SAME buffer pointer to the
        library when we attempt to re-send this buffer. Sending the same data
@@ -1223,12 +1290,22 @@
       Curl_dyn_free(in);
       return result;
     }
+    /* We never send more than upload_buffer_size bytes in one single chunk
+       when we speak HTTPS, as if only a fraction of it is sent now, this data
+       needs to fit into the normal read-callback buffer later on and that
+       buffer is using this size.
+    */
+    if(sendsize > (size_t)data->set.upload_buffer_size)
+      sendsize = (size_t)data->set.upload_buffer_size;
+
     memcpy(data->state.ulbuf, ptr, sendsize);
     ptr = data->state.ulbuf;
   }
   else {
 #ifdef CURLDEBUG
-    /* Allow debug builds override this logic to force short initial sends */
+    /* Allow debug builds to override this logic to force short initial
+       sends
+     */
     char *p = getenv("CURL_SMALLREQSEND");
     if(p) {
       size_t altsize = (size_t)strtoul(p, NULL, 10);
@@ -1239,10 +1316,22 @@
     }
     else
 #endif
-    sendsize = size;
+    {
+      /* Make sure this doesn't send more body bytes than what the max send
+         speed says. The request bytes do not count to the max speed.
+      */
+      if(data->set.max_send_speed &&
+         (included_body_bytes > data->set.max_send_speed)) {
+        curl_off_t overflow = included_body_bytes - data->set.max_send_speed;
+        DEBUGASSERT((size_t)overflow < size);
+        sendsize = size - (size_t)overflow;
+      }
+      else
+        sendsize = size;
+    }
   }
 
-  result = Curl_write(conn, sockfd, ptr, sendsize, &amount);
+  result = Curl_write(data, sockfd, ptr, sendsize, &amount);
 
   if(!result) {
     /*
@@ -1254,16 +1343,12 @@
     size_t headlen = (size_t)amount>headersize ? headersize : (size_t)amount;
     size_t bodylen = amount - headlen;
 
-    if(data->set.verbose) {
-      /* this data _may_ contain binary stuff */
-      Curl_debug(data, CURLINFO_HEADER_OUT, ptr, headlen);
-      if(bodylen) {
-        /* there was body data sent beyond the initial header part, pass that
-           on to the debug callback too */
-        Curl_debug(data, CURLINFO_DATA_OUT,
-                   ptr + headlen, bodylen);
-      }
-    }
+    /* this data _may_ contain binary stuff */
+    Curl_debug(data, CURLINFO_HEADER_OUT, ptr, headlen);
+    if(bodylen)
+      /* there was body data sent beyond the initial header part, pass that on
+         to the debug callback too */
+      Curl_debug(data, CURLINFO_DATA_OUT, ptr + headlen, bodylen);
 
     /* 'amount' can never be a very large value here so typecasting it so a
        signed 31 bit value should not cause problems even if ssize_t is
@@ -1293,10 +1378,13 @@
 
         /* set the new pointers for the request-sending */
         data->state.fread_func = (curl_read_callback)readmoredata;
-        data->state.in = (void *)conn;
+        data->state.in = (void *)data;
         http->postdata = ptr;
         http->postsize = (curl_off_t)size;
 
+        /* this much data is remaining header: */
+        data->req.pendingheader = headersize - headlen;
+
         http->send_buffer = *in; /* copy the whole struct */
         http->sending = HTTPSEND_REQUEST;
 
@@ -1319,9 +1407,13 @@
   }
   Curl_dyn_free(in);
 
+  /* no remaining header data */
+  data->req.pendingheader = 0;
   return result;
 }
 
+#endif
+
 /* end of the add_buffer functions */
 /* ------------------------------------------------------------------------- */
 
@@ -1386,9 +1478,10 @@
  * Curl_http_connect() performs HTTP stuff to do at connect-time, called from
  * the generic Curl_connect().
  */
-CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
+CURLcode Curl_http_connect(struct Curl_easy *data, bool *done)
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
 
   /* We default to persistent connections. We set this already in this connect
      function to make the re-use checks properly be able to check this bit. */
@@ -1396,7 +1489,7 @@
 
 #ifndef CURL_DISABLE_PROXY
   /* the CONNECT procedure might not have been completed */
-  result = Curl_proxy_connect(conn, FIRSTSOCKET);
+  result = Curl_proxy_connect(data, FIRSTSOCKET);
   if(result)
     return result;
 
@@ -1411,9 +1504,9 @@
     /* nothing else to do except wait right now - we're not done here. */
     return CURLE_OK;
 
-  if(conn->data->set.haproxyprotocol) {
+  if(data->set.haproxyprotocol) {
     /* add HAProxy PROXY protocol header */
-    result = add_haproxy_protocol_header(conn);
+    result = add_haproxy_protocol_header(data);
     if(result)
       return result;
   }
@@ -1421,7 +1514,7 @@
 
   if(conn->given->protocol & CURLPROTO_HTTPS) {
     /* perform SSL initialization */
-    result = https_connecting(conn, done);
+    result = https_connecting(data, done);
     if(result)
       return result;
   }
@@ -1434,57 +1527,58 @@
 /* this returns the socket to wait for in the DO and DOING state for the multi
    interface and then we're always _sending_ a request and thus we wait for
    the single socket to become writable only */
-static int http_getsock_do(struct connectdata *conn,
+static int http_getsock_do(struct Curl_easy *data,
+                           struct connectdata *conn,
                            curl_socket_t *socks)
 {
   /* write mode */
+  (void)data;
   socks[0] = conn->sock[FIRSTSOCKET];
   return GETSOCK_WRITESOCK(0);
 }
 
 #ifndef CURL_DISABLE_PROXY
-static CURLcode add_haproxy_protocol_header(struct connectdata *conn)
+static CURLcode add_haproxy_protocol_header(struct Curl_easy *data)
 {
-  char proxy_header[128];
   struct dynbuf req;
   CURLcode result;
-  char tcp_version[5];
-
-  /* Emit the correct prefix for IPv6 */
-  if(conn->bits.ipv6) {
-    strcpy(tcp_version, "TCP6");
-  }
-  else {
-    strcpy(tcp_version, "TCP4");
-  }
-
-  msnprintf(proxy_header,
-            sizeof(proxy_header),
-            "PROXY %s %s %s %li %li\r\n",
-            tcp_version,
-            conn->data->info.conn_local_ip,
-            conn->data->info.conn_primary_ip,
-            conn->data->info.conn_local_port,
-            conn->data->info.conn_primary_port);
-
+  const char *tcp_version;
+  DEBUGASSERT(data->conn);
   Curl_dyn_init(&req, DYN_HAXPROXY);
 
-  result = Curl_dyn_add(&req, proxy_header);
-  if(result)
-    return result;
+#ifdef USE_UNIX_SOCKETS
+  if(data->conn->unix_domain_socket)
+    /* the buffer is large enough to hold this! */
+    result = Curl_dyn_add(&req, "PROXY UNKNOWN\r\n");
+  else {
+#endif
+  /* Emit the correct prefix for IPv6 */
+  tcp_version = data->conn->bits.ipv6 ? "TCP6" : "TCP4";
 
-  result = Curl_buffer_send(&req, conn, &conn->data->info.request_size,
-                            0, FIRSTSOCKET);
+  result = Curl_dyn_addf(&req, "PROXY %s %s %s %i %i\r\n",
+                         tcp_version,
+                         data->info.conn_local_ip,
+                         data->info.conn_primary_ip,
+                         data->info.conn_local_port,
+                         data->info.conn_primary_port);
 
+#ifdef USE_UNIX_SOCKETS
+  }
+#endif
+
+  if(!result)
+    result = Curl_buffer_send(&req, data, &data->info.request_size,
+                              0, FIRSTSOCKET);
   return result;
 }
 #endif
 
 #ifdef USE_SSL
-static CURLcode https_connecting(struct connectdata *conn, bool *done)
+static CURLcode https_connecting(struct Curl_easy *data, bool *done)
 {
   CURLcode result;
-  DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL));
+  struct connectdata *conn = data->conn;
+  DEBUGASSERT((data) && (data->conn->handler->flags & PROTOPT_SSL));
 
 #ifdef ENABLE_QUIC
   if(conn->transport == TRNSPRT_QUIC) {
@@ -1494,18 +1588,20 @@
 #endif
 
   /* perform SSL initialization for this socket */
-  result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
+  result = Curl_ssl_connect_nonblocking(data, conn, FALSE, FIRSTSOCKET, done);
   if(result)
     connclose(conn, "Failed HTTPS connection");
 
   return result;
 }
 
-static int https_getsock(struct connectdata *conn,
+static int https_getsock(struct Curl_easy *data,
+                         struct connectdata *conn,
                          curl_socket_t *socks)
 {
+  (void)data;
   if(conn->handler->flags & PROTOPT_SSL)
-    return Curl_ssl_getsock(conn, socks);
+    return Curl_ssl->getsock(conn, socks);
   return GETSOCK_BLANK;
 }
 #endif /* USE_SSL */
@@ -1515,18 +1611,18 @@
  * performed.
  */
 
-CURLcode Curl_http_done(struct connectdata *conn,
+CURLcode Curl_http_done(struct Curl_easy *data,
                         CURLcode status, bool premature)
 {
-  struct Curl_easy *data = conn->data;
-  struct HTTP *http = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct HTTP *http = data->req.p.http;
 
   /* Clear multipass flag. If authentication isn't done yet, then it will get
    * a chance to be set back to true when we output the next auth header */
   data->state.authhost.multipass = FALSE;
   data->state.authproxy.multipass = FALSE;
 
-  Curl_unencode_cleanup(conn);
+  Curl_unencode_cleanup(data);
 
   /* set the proper values (possibly modified on POST) */
   conn->seek_func = data->set.seek_func; /* restore */
@@ -1540,6 +1636,7 @@
   Curl_quic_done(data, premature);
   Curl_mime_cleanpart(&http->form);
   Curl_dyn_reset(&data->state.headerb);
+  Curl_hyper_done(data);
 
   if(status)
     return status;
@@ -1555,6 +1652,8 @@
        read from the HTTP server (that counts), this can't be right so we
        return an error here */
     failf(data, "Empty reply from server");
+    /* Mark it as closed to avoid the "left intact" message */
+    streamclose(conn, "Empty reply from server");
     return CURLE_GOT_NOTHING;
   }
 
@@ -1575,18 +1674,19 @@
 {
   if((data->state.httpversion == 10) || (conn->httpversion == 10))
     return FALSE;
-  if((data->set.httpversion == CURL_HTTP_VERSION_1_0) &&
+  if((data->state.httpwant == CURL_HTTP_VERSION_1_0) &&
      (conn->httpversion <= 10))
     return FALSE;
-  return ((data->set.httpversion == CURL_HTTP_VERSION_NONE) ||
-          (data->set.httpversion >= CURL_HTTP_VERSION_1_1));
+  return ((data->state.httpwant == CURL_HTTP_VERSION_NONE) ||
+          (data->state.httpwant >= CURL_HTTP_VERSION_1_1));
 }
 
+#ifndef USE_HYPER
 static const char *get_http_string(const struct Curl_easy *data,
                                    const struct connectdata *conn)
 {
 #ifdef ENABLE_QUIC
-  if((data->set.httpversion == CURL_HTTP_VERSION_3) ||
+  if((data->state.httpwant == CURL_HTTP_VERSION_3) ||
      (conn->httpversion == 30))
     return "3";
 #endif
@@ -1601,6 +1701,7 @@
 
   return "1.0";
 }
+#endif
 
 /* check and possibly add an Expect: header */
 static CURLcode expect100(struct Curl_easy *data,
@@ -1615,7 +1716,7 @@
     /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an
        Expect: 100-continue to the headers which actually speeds up post
        operations (as there is one packet coming back from the web server) */
-    const char *ptr = Curl_checkheaders(conn, "Expect");
+    const char *ptr = Curl_checkheaders(data, "Expect");
     if(ptr) {
       data->state.expect100header =
         Curl_compareheader(ptr, "Expect:", "100-continue");
@@ -1650,7 +1751,7 @@
 
   if(
 #ifdef CURL_DO_LINEEND_CONV
-     (handle->set.prefer_ascii) ||
+     (handle->state.prefer_ascii) ||
 #endif
      (handle->set.crlf)) {
     /* \n will become \r\n later on */
@@ -1681,15 +1782,20 @@
   return result;
 }
 
-CURLcode Curl_add_custom_headers(struct connectdata *conn,
+CURLcode Curl_add_custom_headers(struct Curl_easy *data,
                                  bool is_connect,
-                                 struct dynbuf *req)
+#ifndef USE_HYPER
+                                 struct dynbuf *req
+#else
+                                 void *req
+#endif
+  )
 {
+  struct connectdata *conn = data->conn;
   char *ptr;
   struct curl_slist *h[2];
   struct curl_slist *headers;
   int numlists = 1; /* by default */
-  struct Curl_easy *data = conn->data;
   int i;
 
 #ifndef CURL_DISABLE_PROXY
@@ -1750,7 +1856,9 @@
               /* copy the source */
               semicolonp = strdup(headers->data);
               if(!semicolonp) {
+#ifndef USE_HYPER
                 Curl_dyn_free(req);
+#endif
                 return CURLE_OUT_OF_MEMORY;
               }
               /* put a colon where the semicolon is */
@@ -1811,7 +1919,11 @@
                    !strcasecompare(data->state.first_host, conn->host.name)))
             ;
           else {
+#ifdef USE_HYPER
+            result = Curl_hyper_header(data, req, compare);
+#else
             result = Curl_dyn_addf(req, "%s\r\n", compare);
+#endif
           }
           if(semicolonp)
             free(semicolonp);
@@ -1827,10 +1939,14 @@
 }
 
 #ifndef CURL_DISABLE_PARSEDATE
-CURLcode Curl_add_timecondition(const struct connectdata *conn,
-                                struct dynbuf *req)
+CURLcode Curl_add_timecondition(struct Curl_easy *data,
+#ifndef USE_HYPER
+                                struct dynbuf *req
+#else
+                                void *req
+#endif
+  )
 {
-  struct Curl_easy *data = conn->data;
   const struct tm *tm;
   struct tm keeptime;
   CURLcode result;
@@ -1863,7 +1979,7 @@
     break;
   }
 
-  if(Curl_checkheaders(conn, condp)) {
+  if(Curl_checkheaders(data, condp)) {
     /* A custom header was specified; it will be sent instead. */
     return CURLE_OK;
   }
@@ -1887,117 +2003,33 @@
             tm->tm_min,
             tm->tm_sec);
 
+#ifndef USE_HYPER
   result = Curl_dyn_add(req, datestr);
+#else
+  result = Curl_hyper_header(data, req, datestr);
+#endif
 
   return result;
 }
 #else
 /* disabled */
-CURLcode Curl_add_timecondition(const struct connectdata *conn,
+CURLcode Curl_add_timecondition(struct Curl_easy *data,
                                 struct dynbuf *req)
 {
-  (void)conn;
+  (void)data;
   (void)req;
   return CURLE_OK;
 }
 #endif
 
-/*
- * Curl_http() gets called from the generic multi_do() function when a HTTP
- * request is to be performed. This creates and sends a properly constructed
- * HTTP request.
- */
-CURLcode Curl_http(struct connectdata *conn, bool *done)
+void Curl_http_method(struct Curl_easy *data, struct connectdata *conn,
+                      const char **method, Curl_HttpReq *reqp)
 {
-  struct Curl_easy *data = conn->data;
-  CURLcode result = CURLE_OK;
-  struct HTTP *http;
-  const char *path = data->state.up.path;
-  const char *query = data->state.up.query;
-  bool paste_ftp_userpwd = FALSE;
-  char ftp_typecode[sizeof("/;type=?")] = "";
-  const char *host = conn->host.name;
-  const char *te = ""; /* transfer-encoding */
-  const char *ptr;
-  const char *request;
   Curl_HttpReq httpreq = data->state.httpreq;
-#if !defined(CURL_DISABLE_COOKIES)
-  char *addcookies = NULL;
-#endif
-  curl_off_t included_body = 0;
-  const char *httpstring;
-  struct dynbuf req;
-  curl_off_t postsize = 0; /* curl_off_t to handle large file sizes */
-  char *altused = NULL;
-
-  /* Always consider the DO phase done after this function call, even if there
-     may be parts of the request that is not yet sent, since we can deal with
-     the rest of the request in the PERFORM phase. */
-  *done = TRUE;
-
-  if(conn->transport != TRNSPRT_QUIC) {
-    if(conn->httpversion < 20) { /* unless the connection is re-used and
-                                    already http2 */
-      switch(conn->negnpn) {
-      case CURL_HTTP_VERSION_2:
-        conn->httpversion = 20; /* we know we're on HTTP/2 now */
-
-        result = Curl_http2_switched(conn, NULL, 0);
-        if(result)
-          return result;
-        break;
-      case CURL_HTTP_VERSION_1_1:
-        /* continue with HTTP/1.1 when explicitly requested */
-        break;
-      default:
-        /* Check if user wants to use HTTP/2 with clear TCP*/
-#ifdef USE_NGHTTP2
-        if(conn->data->set.httpversion ==
-           CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) {
-#ifndef CURL_DISABLE_PROXY
-          if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
-            /* We don't support HTTP/2 proxies yet. Also it's debatable
-               whether or not this setting should apply to HTTP/2 proxies. */
-            infof(data, "Ignoring HTTP/2 prior knowledge due to proxy\n");
-            break;
-          }
-#endif
-          DEBUGF(infof(data, "HTTP/2 over clean TCP\n"));
-          conn->httpversion = 20;
-
-          result = Curl_http2_switched(conn, NULL, 0);
-          if(result)
-            return result;
-        }
-#endif
-        break;
-      }
-    }
-    else {
-      /* prepare for a http2 request */
-      result = Curl_http2_setup(conn);
-      if(result)
-        return result;
-    }
-  }
-  http = data->req.protop;
-  DEBUGASSERT(http);
-
-  if(!data->state.this_is_a_follow) {
-    /* Free to avoid leaking memory on multiple requests*/
-    free(data->state.first_host);
-
-    data->state.first_host = strdup(conn->host.name);
-    if(!data->state.first_host)
-      return CURLE_OUT_OF_MEMORY;
-
-    data->state.first_remote_port = conn->remote_port;
-  }
-
+  const char *request;
   if((conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) &&
-     data->set.upload) {
+     data->set.upload)
     httpreq = HTTPREQ_PUT;
-  }
 
   /* Now set the 'request' pointer to the proper request string */
   if(data->set.str[STRING_CUSTOMREQUEST])
@@ -2006,7 +2038,7 @@
     if(data->set.opt_no_body)
       request = "HEAD";
     else {
-      DEBUGASSERT((httpreq > HTTPREQ_NONE) && (httpreq < HTTPREQ_LAST));
+      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
       switch(httpreq) {
       case HTTPREQ_POST:
       case HTTPREQ_POST_FORM:
@@ -2026,180 +2058,40 @@
       }
     }
   }
+  *method = request;
+  *reqp = httpreq;
+}
 
+CURLcode Curl_http_useragent(struct Curl_easy *data)
+{
   /* The User-Agent string might have been allocated in url.c already, because
      it might have been used in the proxy connect, but if we have got a header
      with the user-agent string specified, we erase the previously made string
      here. */
-  if(Curl_checkheaders(conn, "User-Agent")) {
+  if(Curl_checkheaders(data, "User-Agent")) {
     free(data->state.aptr.uagent);
     data->state.aptr.uagent = NULL;
   }
+  return CURLE_OK;
+}
 
-  /* setup the authentication headers */
-  {
-    char *pq = NULL;
-    if(query && *query) {
-      pq = aprintf("%s?%s", path, query);
-      if(!pq)
-        return CURLE_OUT_OF_MEMORY;
-    }
-    result = Curl_http_output_auth(conn, request, (pq ? pq : path), FALSE);
-    free(pq);
-    if(result)
-      return result;
-  }
 
-  if(((data->state.authhost.multipass && !data->state.authhost.done)
-      || (data->state.authproxy.multipass && !data->state.authproxy.done)) &&
-     (httpreq != HTTPREQ_GET) &&
-     (httpreq != HTTPREQ_HEAD)) {
-    /* Auth is required and we are not authenticated yet. Make a PUT or POST
-       with content-length zero as a "probe". */
-    conn->bits.authneg = TRUE;
-  }
-  else
-    conn->bits.authneg = FALSE;
+CURLcode Curl_http_host(struct Curl_easy *data, struct connectdata *conn)
+{
+  const char *ptr;
+  if(!data->state.this_is_a_follow) {
+    /* Free to avoid leaking memory on multiple requests*/
+    free(data->state.first_host);
 
-  Curl_safefree(data->state.aptr.ref);
-  if(data->change.referer && !Curl_checkheaders(conn, "Referer")) {
-    data->state.aptr.ref = aprintf("Referer: %s\r\n", data->change.referer);
-    if(!data->state.aptr.ref)
+    data->state.first_host = strdup(conn->host.name);
+    if(!data->state.first_host)
       return CURLE_OUT_OF_MEMORY;
+
+    data->state.first_remote_port = conn->remote_port;
   }
-  else
-    data->state.aptr.ref = NULL;
-
-#if !defined(CURL_DISABLE_COOKIES)
-  if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie"))
-    addcookies = data->set.str[STRING_COOKIE];
-#endif
-
-  if(!Curl_checkheaders(conn, "Accept-Encoding") &&
-     data->set.str[STRING_ENCODING]) {
-    Curl_safefree(data->state.aptr.accept_encoding);
-    data->state.aptr.accept_encoding =
-      aprintf("Accept-Encoding: %s\r\n", data->set.str[STRING_ENCODING]);
-    if(!data->state.aptr.accept_encoding)
-      return CURLE_OUT_OF_MEMORY;
-  }
-  else {
-    Curl_safefree(data->state.aptr.accept_encoding);
-    data->state.aptr.accept_encoding = NULL;
-  }
-
-#ifdef HAVE_LIBZ
-  /* we only consider transfer-encoding magic if libz support is built-in */
-
-  if(!Curl_checkheaders(conn, "TE") &&
-     data->set.http_transfer_encoding) {
-    /* When we are to insert a TE: header in the request, we must also insert
-       TE in a Connection: header, so we need to merge the custom provided
-       Connection: header and prevent the original to get sent. Note that if
-       the user has inserted his/hers own TE: header we don't do this magic
-       but then assume that the user will handle it all! */
-    char *cptr = Curl_checkheaders(conn, "Connection");
-#define TE_HEADER "TE: gzip\r\n"
-
-    Curl_safefree(data->state.aptr.te);
-
-    if(cptr) {
-      cptr = Curl_copy_header_value(cptr);
-      if(!cptr)
-        return CURLE_OUT_OF_MEMORY;
-    }
-
-    /* Create the (updated) Connection: header */
-    data->state.aptr.te = aprintf("Connection: %s%sTE\r\n" TE_HEADER,
-                                cptr ? cptr : "", (cptr && *cptr) ? ", ":"");
-
-    free(cptr);
-    if(!data->state.aptr.te)
-      return CURLE_OUT_OF_MEMORY;
-  }
-#endif
-
-  switch(httpreq) {
-  case HTTPREQ_POST_MIME:
-    http->sendit = &data->set.mimepost;
-    break;
-  case HTTPREQ_POST_FORM:
-    /* Convert the form structure into a mime structure. */
-    Curl_mime_cleanpart(&http->form);
-    result = Curl_getformdata(data, &http->form, data->set.httppost,
-                              data->state.fread_func);
-    if(result)
-      return result;
-    http->sendit = &http->form;
-    break;
-  default:
-    http->sendit = NULL;
-  }
-
-#ifndef CURL_DISABLE_MIME
-  if(http->sendit) {
-    const char *cthdr = Curl_checkheaders(conn, "Content-Type");
-
-    /* Read and seek body only. */
-    http->sendit->flags |= MIME_BODY_ONLY;
-
-    /* Prepare the mime structure headers & set content type. */
-
-    if(cthdr)
-      for(cthdr += 13; *cthdr == ' '; cthdr++)
-        ;
-    else if(http->sendit->kind == MIMEKIND_MULTIPART)
-      cthdr = "multipart/form-data";
-
-    curl_mime_headers(http->sendit, data->set.headers, 0);
-    result = Curl_mime_prepare_headers(http->sendit, cthdr,
-                                       NULL, MIMESTRATEGY_FORM);
-    curl_mime_headers(http->sendit, NULL, 0);
-    if(!result)
-      result = Curl_mime_rewind(http->sendit);
-    if(result)
-      return result;
-    http->postsize = Curl_mime_size(http->sendit);
-  }
-#endif
-
-  ptr = Curl_checkheaders(conn, "Transfer-Encoding");
-  if(ptr) {
-    /* Some kind of TE is requested, check if 'chunked' is chosen */
-    data->req.upload_chunky =
-      Curl_compareheader(ptr, "Transfer-Encoding:", "chunked");
-  }
-  else {
-    if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
-       (((httpreq == HTTPREQ_POST_MIME || httpreq == HTTPREQ_POST_FORM) &&
-         http->postsize < 0) ||
-        ((data->set.upload || httpreq == HTTPREQ_POST) &&
-         data->state.infilesize == -1))) {
-      if(conn->bits.authneg)
-        /* don't enable chunked during auth neg */
-        ;
-      else if(use_http_1_1plus(data, conn)) {
-        if(conn->httpversion < 20)
-          /* HTTP, upload, unknown file size and not HTTP 1.0 */
-          data->req.upload_chunky = TRUE;
-      }
-      else {
-        failf(data, "Chunky upload is not supported by HTTP 1.0");
-        return CURLE_UPLOAD_FAILED;
-      }
-    }
-    else {
-      /* else, no chunky upload */
-      data->req.upload_chunky = FALSE;
-    }
-
-    if(data->req.upload_chunky)
-      te = "Transfer-Encoding: chunked\r\n";
-  }
-
   Curl_safefree(data->state.aptr.host);
 
-  ptr = Curl_checkheaders(conn, "Host");
+  ptr = Curl_checkheaders(data, "Host");
   if(ptr && (!data->state.this_is_a_follow ||
              strcasecompare(data->state.first_host, conn->host.name))) {
 #if !defined(CURL_DISABLE_COOKIES)
@@ -2249,6 +2141,7 @@
   else {
     /* When building Host: headers, we must put the host name within
        [brackets] if the host name is a plain IPv6-address. RFC2732-style. */
+    const char *host = conn->host.name;
 
     if(((conn->given->protocol&CURLPROTO_HTTPS) &&
         (conn->remote_port == PORT_HTTPS)) ||
@@ -2271,6 +2164,24 @@
       /* without Host: we can't make a nice request */
       return CURLE_OUT_OF_MEMORY;
   }
+  return CURLE_OK;
+}
+
+/*
+ * Append the request-target to the HTTP request
+ */
+CURLcode Curl_http_target(struct Curl_easy *data,
+                          struct connectdata *conn,
+                          struct dynbuf *r)
+{
+  CURLcode result = CURLE_OK;
+  const char *path = data->state.up.path;
+  const char *query = data->state.up.query;
+
+  if(data->set.str[STRING_TARGET]) {
+    path = data->set.str[STRING_TARGET];
+    query = NULL;
+  }
 
 #ifndef CURL_DISABLE_PROXY
   if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
@@ -2282,6 +2193,7 @@
 
     /* and no fragment part */
     CURLUcode uc;
+    char *url;
     CURLU *h = curl_url_dup(data->state.uh);
     if(!h)
       return CURLE_OUT_OF_MEMORY;
@@ -2315,7 +2227,7 @@
     /* Extract the URL to use in the request. Store in STRING_TEMP_URL for
        clean-up reasons if the function returns before the free() further
        down. */
-    uc = curl_url_get(h, CURLUPART_URL, &data->set.str[STRING_TEMP_URL], 0);
+    uc = curl_url_get(h, CURLUPART_URL, &url, CURLU_NO_DEFAULT_PORT);
     if(uc) {
       curl_url_cleanup(h);
       return CURLE_OUT_OF_MEMORY;
@@ -2323,6 +2235,13 @@
 
     curl_url_cleanup(h);
 
+    /* target or url */
+    result = Curl_dyn_add(r, data->set.str[STRING_TARGET]?
+      data->set.str[STRING_TARGET]:url);
+    free(url);
+    if(result)
+      return (result);
+
     if(strcasecompare("ftp", data->state.up.scheme)) {
       if(data->set.proxy_transfer_mode) {
         /* when doing ftp, append ;type=<a|i> if not present */
@@ -2338,24 +2257,568 @@
           }
         }
         if(!type) {
-          char *p = ftp_typecode;
-          /* avoid sending invalid URLs like ftp://example.com;type=i if the
-           * user specified ftp://example.com without the slash */
-          if(!*data->state.up.path && path[strlen(path) - 1] != '/') {
-            *p++ = '/';
-          }
-          msnprintf(p, sizeof(ftp_typecode) - 1, ";type=%c",
-                    data->set.prefer_ascii ? 'a' : 'i');
+          result = Curl_dyn_addf(r, ";type=%c",
+                                 data->state.prefer_ascii ? 'a' : 'i');
+          if(result)
+            return result;
         }
       }
-      if(conn->bits.user_passwd)
-        paste_ftp_userpwd = TRUE;
     }
   }
-#endif /* CURL_DISABLE_PROXY */
 
-  http->p_accept = Curl_checkheaders(conn, "Accept")?NULL:"Accept: */*\r\n";
+  else
+#else
+    (void)conn; /* not used in disabled-proxy builds */
+#endif
+  {
+    result = Curl_dyn_add(r, path);
+    if(result)
+      return result;
+    if(query)
+      result = Curl_dyn_addf(r, "?%s", query);
+  }
 
+  return result;
+}
+
+CURLcode Curl_http_body(struct Curl_easy *data, struct connectdata *conn,
+                        Curl_HttpReq httpreq, const char **tep)
+{
+  CURLcode result = CURLE_OK;
+  const char *ptr;
+  struct HTTP *http = data->req.p.http;
+  http->postsize = 0;
+
+  switch(httpreq) {
+  case HTTPREQ_POST_MIME:
+    http->sendit = &data->set.mimepost;
+    break;
+  case HTTPREQ_POST_FORM:
+    /* Convert the form structure into a mime structure. */
+    Curl_mime_cleanpart(&http->form);
+    result = Curl_getformdata(data, &http->form, data->set.httppost,
+                              data->state.fread_func);
+    if(result)
+      return result;
+    http->sendit = &http->form;
+    break;
+  default:
+    http->sendit = NULL;
+  }
+
+#ifndef CURL_DISABLE_MIME
+  if(http->sendit) {
+    const char *cthdr = Curl_checkheaders(data, "Content-Type");
+
+    /* Read and seek body only. */
+    http->sendit->flags |= MIME_BODY_ONLY;
+
+    /* Prepare the mime structure headers & set content type. */
+
+    if(cthdr)
+      for(cthdr += 13; *cthdr == ' '; cthdr++)
+        ;
+    else if(http->sendit->kind == MIMEKIND_MULTIPART)
+      cthdr = "multipart/form-data";
+
+    curl_mime_headers(http->sendit, data->set.headers, 0);
+    result = Curl_mime_prepare_headers(http->sendit, cthdr,
+                                       NULL, MIMESTRATEGY_FORM);
+    curl_mime_headers(http->sendit, NULL, 0);
+    if(!result)
+      result = Curl_mime_rewind(http->sendit);
+    if(result)
+      return result;
+    http->postsize = Curl_mime_size(http->sendit);
+  }
+#endif
+
+  ptr = Curl_checkheaders(data, "Transfer-Encoding");
+  if(ptr) {
+    /* Some kind of TE is requested, check if 'chunked' is chosen */
+    data->req.upload_chunky =
+      Curl_compareheader(ptr, "Transfer-Encoding:", "chunked");
+  }
+  else {
+    if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
+       (((httpreq == HTTPREQ_POST_MIME || httpreq == HTTPREQ_POST_FORM) &&
+         http->postsize < 0) ||
+        ((data->set.upload || httpreq == HTTPREQ_POST) &&
+         data->state.infilesize == -1))) {
+      if(conn->bits.authneg)
+        /* don't enable chunked during auth neg */
+        ;
+      else if(use_http_1_1plus(data, conn)) {
+        if(conn->httpversion < 20)
+          /* HTTP, upload, unknown file size and not HTTP 1.0 */
+          data->req.upload_chunky = TRUE;
+      }
+      else {
+        failf(data, "Chunky upload is not supported by HTTP 1.0");
+        return CURLE_UPLOAD_FAILED;
+      }
+    }
+    else {
+      /* else, no chunky upload */
+      data->req.upload_chunky = FALSE;
+    }
+
+    if(data->req.upload_chunky)
+      *tep = "Transfer-Encoding: chunked\r\n";
+  }
+  return result;
+}
+
+CURLcode Curl_http_bodysend(struct Curl_easy *data, struct connectdata *conn,
+                            struct dynbuf *r, Curl_HttpReq httpreq)
+{
+#ifndef USE_HYPER
+  /* Hyper always handles the body separately */
+  curl_off_t included_body = 0;
+#endif
+  CURLcode result = CURLE_OK;
+  struct HTTP *http = data->req.p.http;
+  const char *ptr;
+
+  /* If 'authdone' is FALSE, we must not set the write socket index to the
+     Curl_transfer() call below, as we're not ready to actually upload any
+     data yet. */
+
+  switch(httpreq) {
+
+  case HTTPREQ_PUT: /* Let's PUT the data to the server! */
+
+    if(conn->bits.authneg)
+      http->postsize = 0;
+    else
+      http->postsize = data->state.infilesize;
+
+    if((http->postsize != -1) && !data->req.upload_chunky &&
+       (conn->bits.authneg || !Curl_checkheaders(data, "Content-Length"))) {
+      /* only add Content-Length if not uploading chunked */
+      result = Curl_dyn_addf(r, "Content-Length: %" CURL_FORMAT_CURL_OFF_T
+                             "\r\n", http->postsize);
+      if(result)
+        return result;
+    }
+
+    if(http->postsize) {
+      result = expect100(data, conn, r);
+      if(result)
+        return result;
+    }
+
+    /* end of headers */
+    result = Curl_dyn_add(r, "\r\n");
+    if(result)
+      return result;
+
+    /* set the upload size to the progress meter */
+    Curl_pgrsSetUploadSize(data, http->postsize);
+
+    /* this sends the buffer and frees all the buffer resources */
+    result = Curl_buffer_send(r, data, &data->info.request_size, 0,
+                              FIRSTSOCKET);
+    if(result)
+      failf(data, "Failed sending PUT request");
+    else
+      /* prepare for transfer */
+      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE,
+                          http->postsize?FIRSTSOCKET:-1);
+    if(result)
+      return result;
+    break;
+
+  case HTTPREQ_POST_FORM:
+  case HTTPREQ_POST_MIME:
+    /* This is form posting using mime data. */
+    if(conn->bits.authneg) {
+      /* nothing to post! */
+      result = Curl_dyn_add(r, "Content-Length: 0\r\n\r\n");
+      if(result)
+        return result;
+
+      result = Curl_buffer_send(r, data, &data->info.request_size, 0,
+                                FIRSTSOCKET);
+      if(result)
+        failf(data, "Failed sending POST request");
+      else
+        /* setup variables for the upcoming transfer */
+        Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE, -1);
+      break;
+    }
+
+    data->state.infilesize = http->postsize;
+
+    /* We only set Content-Length and allow a custom Content-Length if
+       we don't upload data chunked, as RFC2616 forbids us to set both
+       kinds of headers (Transfer-Encoding: chunked and Content-Length) */
+    if(http->postsize != -1 && !data->req.upload_chunky &&
+       (conn->bits.authneg || !Curl_checkheaders(data, "Content-Length"))) {
+      /* we allow replacing this header if not during auth negotiation,
+         although it isn't very wise to actually set your own */
+      result = Curl_dyn_addf(r,
+                             "Content-Length: %" CURL_FORMAT_CURL_OFF_T
+                             "\r\n", http->postsize);
+      if(result)
+        return result;
+    }
+
+#ifndef CURL_DISABLE_MIME
+    /* Output mime-generated headers. */
+    {
+      struct curl_slist *hdr;
+
+      for(hdr = http->sendit->curlheaders; hdr; hdr = hdr->next) {
+        result = Curl_dyn_addf(r, "%s\r\n", hdr->data);
+        if(result)
+          return result;
+      }
+    }
+#endif
+
+    /* For really small posts we don't use Expect: headers at all, and for
+       the somewhat bigger ones we allow the app to disable it. Just make
+       sure that the expect100header is always set to the preferred value
+       here. */
+    ptr = Curl_checkheaders(data, "Expect");
+    if(ptr) {
+      data->state.expect100header =
+        Curl_compareheader(ptr, "Expect:", "100-continue");
+    }
+    else if(http->postsize > EXPECT_100_THRESHOLD || http->postsize < 0) {
+      result = expect100(data, conn, r);
+      if(result)
+        return result;
+    }
+    else
+      data->state.expect100header = FALSE;
+
+    /* make the request end in a true CRLF */
+    result = Curl_dyn_add(r, "\r\n");
+    if(result)
+      return result;
+
+    /* set the upload size to the progress meter */
+    Curl_pgrsSetUploadSize(data, http->postsize);
+
+    /* Read from mime structure. */
+    data->state.fread_func = (curl_read_callback) Curl_mime_read;
+    data->state.in = (void *) http->sendit;
+    http->sending = HTTPSEND_BODY;
+
+    /* this sends the buffer and frees all the buffer resources */
+    result = Curl_buffer_send(r, data, &data->info.request_size, 0,
+                              FIRSTSOCKET);
+    if(result)
+      failf(data, "Failed sending POST request");
+    else
+      /* prepare for transfer */
+      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE,
+                          http->postsize?FIRSTSOCKET:-1);
+    if(result)
+      return result;
+
+    break;
+
+  case HTTPREQ_POST:
+    /* this is the simple POST, using x-www-form-urlencoded style */
+
+    if(conn->bits.authneg)
+      http->postsize = 0;
+    else
+      /* the size of the post body */
+      http->postsize = data->state.infilesize;
+
+    /* We only set Content-Length and allow a custom Content-Length if
+       we don't upload data chunked, as RFC2616 forbids us to set both
+       kinds of headers (Transfer-Encoding: chunked and Content-Length) */
+    if((http->postsize != -1) && !data->req.upload_chunky &&
+       (conn->bits.authneg || !Curl_checkheaders(data, "Content-Length"))) {
+      /* we allow replacing this header if not during auth negotiation,
+         although it isn't very wise to actually set your own */
+      result = Curl_dyn_addf(r, "Content-Length: %" CURL_FORMAT_CURL_OFF_T
+                             "\r\n", http->postsize);
+      if(result)
+        return result;
+    }
+
+    if(!Curl_checkheaders(data, "Content-Type")) {
+      result = Curl_dyn_add(r, "Content-Type: application/"
+                            "x-www-form-urlencoded\r\n");
+      if(result)
+        return result;
+    }
+
+    /* For really small posts we don't use Expect: headers at all, and for
+       the somewhat bigger ones we allow the app to disable it. Just make
+       sure that the expect100header is always set to the preferred value
+       here. */
+    ptr = Curl_checkheaders(data, "Expect");
+    if(ptr) {
+      data->state.expect100header =
+        Curl_compareheader(ptr, "Expect:", "100-continue");
+    }
+    else if(http->postsize > EXPECT_100_THRESHOLD || http->postsize < 0) {
+      result = expect100(data, conn, r);
+      if(result)
+        return result;
+    }
+    else
+      data->state.expect100header = FALSE;
+
+#ifndef USE_HYPER
+    /* With Hyper the body is always passed on separately */
+    if(data->set.postfields) {
+
+      /* In HTTP2, we send request body in DATA frame regardless of
+         its size. */
+      if(conn->httpversion != 20 &&
+         !data->state.expect100header &&
+         (http->postsize < MAX_INITIAL_POST_SIZE)) {
+        /* if we don't use expect: 100  AND
+           postsize is less than MAX_INITIAL_POST_SIZE
+
+           then append the post data to the HTTP request header. This limit
+           is no magic limit but only set to prevent really huge POSTs to
+           get the data duplicated with malloc() and family. */
+
+        /* end of headers! */
+        result = Curl_dyn_add(r, "\r\n");
+        if(result)
+          return result;
+
+        if(!data->req.upload_chunky) {
+          /* We're not sending it 'chunked', append it to the request
+             already now to reduce the number if send() calls */
+          result = Curl_dyn_addn(r, data->set.postfields,
+                                 (size_t)http->postsize);
+          included_body = http->postsize;
+        }
+        else {
+          if(http->postsize) {
+            char chunk[16];
+            /* Append the POST data chunky-style */
+            msnprintf(chunk, sizeof(chunk), "%x\r\n", (int)http->postsize);
+            result = Curl_dyn_add(r, chunk);
+            if(!result) {
+              included_body = http->postsize + strlen(chunk);
+              result = Curl_dyn_addn(r, data->set.postfields,
+                                     (size_t)http->postsize);
+              if(!result)
+                result = Curl_dyn_add(r, "\r\n");
+              included_body += 2;
+            }
+          }
+          if(!result) {
+            result = Curl_dyn_add(r, "\x30\x0d\x0a\x0d\x0a");
+            /* 0  CR  LF  CR  LF */
+            included_body += 5;
+          }
+        }
+        if(result)
+          return result;
+        /* Make sure the progress information is accurate */
+        Curl_pgrsSetUploadSize(data, http->postsize);
+      }
+      else {
+        /* A huge POST coming up, do data separate from the request */
+        http->postdata = data->set.postfields;
+
+        http->sending = HTTPSEND_BODY;
+
+        data->state.fread_func = (curl_read_callback)readmoredata;
+        data->state.in = (void *)data;
+
+        /* set the upload size to the progress meter */
+        Curl_pgrsSetUploadSize(data, http->postsize);
+
+        /* end of headers! */
+        result = Curl_dyn_add(r, "\r\n");
+        if(result)
+          return result;
+      }
+    }
+    else
+#endif
+    {
+       /* end of headers! */
+      result = Curl_dyn_add(r, "\r\n");
+      if(result)
+        return result;
+
+      if(data->req.upload_chunky && conn->bits.authneg) {
+        /* Chunky upload is selected and we're negotiating auth still, send
+           end-of-data only */
+        result = Curl_dyn_add(r, (char *)"\x30\x0d\x0a\x0d\x0a");
+        /* 0  CR  LF  CR  LF */
+        if(result)
+          return result;
+      }
+
+      else if(data->state.infilesize) {
+        /* set the upload size to the progress meter */
+        Curl_pgrsSetUploadSize(data, http->postsize?http->postsize:-1);
+
+        /* set the pointer to mark that we will send the post body using the
+           read callback, but only if we're not in authenticate negotiation */
+        if(!conn->bits.authneg)
+          http->postdata = (char *)&http->postdata;
+      }
+    }
+    /* issue the request */
+    result = Curl_buffer_send(r, data, &data->info.request_size, included_body,
+                              FIRSTSOCKET);
+
+    if(result)
+      failf(data, "Failed sending HTTP POST request");
+    else
+      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE,
+                          http->postdata?FIRSTSOCKET:-1);
+    break;
+
+  default:
+    result = Curl_dyn_add(r, "\r\n");
+    if(result)
+      return result;
+
+    /* issue the request */
+    result = Curl_buffer_send(r, data, &data->info.request_size, 0,
+                              FIRSTSOCKET);
+
+    if(result)
+      failf(data, "Failed sending HTTP request");
+    else
+      /* HTTP GET/HEAD download: */
+      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE, -1);
+  }
+
+  return result;
+}
+
+#if !defined(CURL_DISABLE_COOKIES)
+CURLcode Curl_http_cookies(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           struct dynbuf *r)
+{
+  CURLcode result = CURLE_OK;
+  char *addcookies = NULL;
+  if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(data, "Cookie"))
+    addcookies = data->set.str[STRING_COOKIE];
+
+  if(data->cookies || addcookies) {
+    struct Cookie *co = NULL; /* no cookies from start */
+    int count = 0;
+
+    if(data->cookies && data->state.cookie_engine) {
+      Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+      co = Curl_cookie_getlist(data->cookies,
+                               data->state.aptr.cookiehost?
+                               data->state.aptr.cookiehost:
+                               conn->host.name,
+                               data->state.up.path,
+                               (conn->handler->protocol&CURLPROTO_HTTPS)?
+                               TRUE:FALSE);
+      Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
+    }
+    if(co) {
+      struct Cookie *store = co;
+      /* now loop through all cookies that matched */
+      while(co) {
+        if(co->value) {
+          if(0 == count) {
+            result = Curl_dyn_add(r, "Cookie: ");
+            if(result)
+              break;
+          }
+          result = Curl_dyn_addf(r, "%s%s=%s", count?"; ":"",
+                                 co->name, co->value);
+          if(result)
+            break;
+          count++;
+        }
+        co = co->next; /* next cookie please */
+      }
+      Curl_cookie_freelist(store);
+    }
+    if(addcookies && !result) {
+      if(!count)
+        result = Curl_dyn_add(r, "Cookie: ");
+      if(!result) {
+        result = Curl_dyn_addf(r, "%s%s", count?"; ":"", addcookies);
+        count++;
+      }
+    }
+    if(count && !result)
+      result = Curl_dyn_add(r, "\r\n");
+
+    if(result)
+      return result;
+  }
+  return result;
+}
+#endif
+
+CURLcode Curl_http_range(struct Curl_easy *data,
+                         Curl_HttpReq httpreq)
+{
+  if(data->state.use_range) {
+    /*
+     * A range is selected. We use different headers whether we're downloading
+     * or uploading and we always let customized headers override our internal
+     * ones if any such are specified.
+     */
+    if(((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) &&
+       !Curl_checkheaders(data, "Range")) {
+      /* if a line like this was already allocated, free the previous one */
+      free(data->state.aptr.rangeline);
+      data->state.aptr.rangeline = aprintf("Range: bytes=%s\r\n",
+                                           data->state.range);
+    }
+    else if((httpreq == HTTPREQ_POST || httpreq == HTTPREQ_PUT) &&
+            !Curl_checkheaders(data, "Content-Range")) {
+
+      /* if a line like this was already allocated, free the previous one */
+      free(data->state.aptr.rangeline);
+
+      if(data->set.set_resume_from < 0) {
+        /* Upload resume was asked for, but we don't know the size of the
+           remote part so we tell the server (and act accordingly) that we
+           upload the whole file (again) */
+        data->state.aptr.rangeline =
+          aprintf("Content-Range: bytes 0-%" CURL_FORMAT_CURL_OFF_T
+                  "/%" CURL_FORMAT_CURL_OFF_T "\r\n",
+                  data->state.infilesize - 1, data->state.infilesize);
+
+      }
+      else if(data->state.resume_from) {
+        /* This is because "resume" was selected */
+        curl_off_t total_expected_size =
+          data->state.resume_from + data->state.infilesize;
+        data->state.aptr.rangeline =
+          aprintf("Content-Range: bytes %s%" CURL_FORMAT_CURL_OFF_T
+                  "/%" CURL_FORMAT_CURL_OFF_T "\r\n",
+                  data->state.range, total_expected_size-1,
+                  total_expected_size);
+      }
+      else {
+        /* Range was selected and then we just pass the incoming range and
+           append total size */
+        data->state.aptr.rangeline =
+          aprintf("Content-Range: bytes %s/%" CURL_FORMAT_CURL_OFF_T "\r\n",
+                  data->state.range, data->state.infilesize);
+      }
+      if(!data->state.aptr.rangeline)
+        return CURLE_OUT_OF_MEMORY;
+    }
+  }
+  return CURLE_OK;
+}
+
+CURLcode Curl_http_resume(struct Curl_easy *data,
+                          struct connectdata *conn,
+                          Curl_HttpReq httpreq)
+{
   if((HTTPREQ_POST == httpreq || HTTPREQ_PUT == httpreq) &&
      data->state.resume_from) {
     /**********************************************************************
@@ -2429,97 +2892,261 @@
       /* we've passed, proceed as normal */
     }
   }
-  if(data->state.use_range) {
-    /*
-     * A range is selected. We use different headers whether we're downloading
-     * or uploading and we always let customized headers override our internal
-     * ones if any such are specified.
-     */
-    if(((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) &&
-       !Curl_checkheaders(conn, "Range")) {
-      /* if a line like this was already allocated, free the previous one */
-      free(data->state.aptr.rangeline);
-      data->state.aptr.rangeline = aprintf("Range: bytes=%s\r\n",
-                                         data->state.range);
+  return CURLE_OK;
+}
+
+CURLcode Curl_http_firstwrite(struct Curl_easy *data,
+                              struct connectdata *conn,
+                              bool *done)
+{
+  struct SingleRequest *k = &data->req;
+  DEBUGASSERT(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP));
+  if(data->req.newurl) {
+    if(conn->bits.close) {
+      /* Abort after the headers if "follow Location" is set
+         and we're set to close anyway. */
+      k->keepon &= ~KEEP_RECV;
+      *done = TRUE;
+      return CURLE_OK;
     }
-    else if((httpreq == HTTPREQ_POST || httpreq == HTTPREQ_PUT) &&
-            !Curl_checkheaders(conn, "Content-Range")) {
+    /* We have a new url to load, but since we want to be able to re-use this
+       connection properly, we read the full response in "ignore more" */
+    k->ignorebody = TRUE;
+    infof(data, "Ignoring the response-body");
+  }
+  if(data->state.resume_from && !k->content_range &&
+     (data->state.httpreq == HTTPREQ_GET) &&
+     !k->ignorebody) {
 
-      /* if a line like this was already allocated, free the previous one */
-      free(data->state.aptr.rangeline);
+    if(k->size == data->state.resume_from) {
+      /* The resume point is at the end of file, consider this fine even if it
+         doesn't allow resume from here. */
+      infof(data, "The entire document is already downloaded");
+      connclose(conn, "already downloaded");
+      /* Abort download */
+      k->keepon &= ~KEEP_RECV;
+      *done = TRUE;
+      return CURLE_OK;
+    }
 
-      if(data->set.set_resume_from < 0) {
-        /* Upload resume was asked for, but we don't know the size of the
-           remote part so we tell the server (and act accordingly) that we
-           upload the whole file (again) */
-        data->state.aptr.rangeline =
-          aprintf("Content-Range: bytes 0-%" CURL_FORMAT_CURL_OFF_T
-                  "/%" CURL_FORMAT_CURL_OFF_T "\r\n",
-                  data->state.infilesize - 1, data->state.infilesize);
+    /* we wanted to resume a download, although the server doesn't seem to
+     * support this and we did this with a GET (if it wasn't a GET we did a
+     * POST or PUT resume) */
+    failf(data, "HTTP server doesn't seem to support "
+          "byte ranges. Cannot resume.");
+    return CURLE_RANGE_ERROR;
+  }
 
-      }
-      else if(data->state.resume_from) {
-        /* This is because "resume" was selected */
-        curl_off_t total_expected_size =
-          data->state.resume_from + data->state.infilesize;
-        data->state.aptr.rangeline =
-          aprintf("Content-Range: bytes %s%" CURL_FORMAT_CURL_OFF_T
-                  "/%" CURL_FORMAT_CURL_OFF_T "\r\n",
-                  data->state.range, total_expected_size-1,
-                  total_expected_size);
-      }
-      else {
-        /* Range was selected and then we just pass the incoming range and
-           append total size */
-        data->state.aptr.rangeline =
-          aprintf("Content-Range: bytes %s/%" CURL_FORMAT_CURL_OFF_T "\r\n",
-                  data->state.range, data->state.infilesize);
-      }
-      if(!data->state.aptr.rangeline)
+  if(data->set.timecondition && !data->state.range) {
+    /* A time condition has been set AND no ranges have been requested. This
+       seems to be what chapter 13.3.4 of RFC 2616 defines to be the correct
+       action for a HTTP/1.1 client */
+
+    if(!Curl_meets_timecondition(data, k->timeofdoc)) {
+      *done = TRUE;
+      /* We're simulating a http 304 from server so we return
+         what should have been returned from the server */
+      data->info.httpcode = 304;
+      infof(data, "Simulate a HTTP 304 response!");
+      /* we abort the transfer before it is completed == we ruin the
+         re-use ability. Close the connection */
+      connclose(conn, "Simulated 304 handling");
+      return CURLE_OK;
+    }
+  } /* we have a time condition */
+
+  return CURLE_OK;
+}
+
+#ifdef HAVE_LIBZ
+CURLcode Curl_transferencode(struct Curl_easy *data)
+{
+  if(!Curl_checkheaders(data, "TE") &&
+     data->set.http_transfer_encoding) {
+    /* When we are to insert a TE: header in the request, we must also insert
+       TE in a Connection: header, so we need to merge the custom provided
+       Connection: header and prevent the original to get sent. Note that if
+       the user has inserted his/her own TE: header we don't do this magic
+       but then assume that the user will handle it all! */
+    char *cptr = Curl_checkheaders(data, "Connection");
+#define TE_HEADER "TE: gzip\r\n"
+
+    Curl_safefree(data->state.aptr.te);
+
+    if(cptr) {
+      cptr = Curl_copy_header_value(cptr);
+      if(!cptr)
         return CURLE_OUT_OF_MEMORY;
     }
+
+    /* Create the (updated) Connection: header */
+    data->state.aptr.te = aprintf("Connection: %s%sTE\r\n" TE_HEADER,
+                                cptr ? cptr : "", (cptr && *cptr) ? ", ":"");
+
+    free(cptr);
+    if(!data->state.aptr.te)
+      return CURLE_OUT_OF_MEMORY;
   }
+  return CURLE_OK;
+}
+#endif
+
+#ifndef USE_HYPER
+/*
+ * Curl_http() gets called from the generic multi_do() function when a HTTP
+ * request is to be performed. This creates and sends a properly constructed
+ * HTTP request.
+ */
+CURLcode Curl_http(struct Curl_easy *data, bool *done)
+{
+  struct connectdata *conn = data->conn;
+  CURLcode result = CURLE_OK;
+  struct HTTP *http;
+  Curl_HttpReq httpreq;
+  const char *te = ""; /* transfer-encoding */
+  const char *request;
+  const char *httpstring;
+  struct dynbuf req;
+  char *altused = NULL;
+  const char *p_accept;      /* Accept: string */
+
+  /* Always consider the DO phase done after this function call, even if there
+     may be parts of the request that are not yet sent, since we can deal with
+     the rest of the request in the PERFORM phase. */
+  *done = TRUE;
+
+  if(conn->transport != TRNSPRT_QUIC) {
+    if(conn->httpversion < 20) { /* unless the connection is re-used and
+                                    already http2 */
+      switch(conn->negnpn) {
+      case CURL_HTTP_VERSION_2:
+        conn->httpversion = 20; /* we know we're on HTTP/2 now */
+
+        result = Curl_http2_switched(data, NULL, 0);
+        if(result)
+          return result;
+        break;
+      case CURL_HTTP_VERSION_1_1:
+        /* continue with HTTP/1.1 when explicitly requested */
+        break;
+      default:
+        /* Check if user wants to use HTTP/2 with clear TCP*/
+#ifdef USE_NGHTTP2
+        if(data->state.httpwant == CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) {
+#ifndef CURL_DISABLE_PROXY
+          if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
+            /* We don't support HTTP/2 proxies yet. Also it's debatable
+               whether or not this setting should apply to HTTP/2 proxies. */
+            infof(data, "Ignoring HTTP/2 prior knowledge due to proxy");
+            break;
+          }
+#endif
+          DEBUGF(infof(data, "HTTP/2 over clean TCP"));
+          conn->httpversion = 20;
+
+          result = Curl_http2_switched(data, NULL, 0);
+          if(result)
+            return result;
+        }
+#endif
+        break;
+      }
+    }
+    else {
+      /* prepare for a http2 request */
+      result = Curl_http2_setup(data, conn);
+      if(result)
+        return result;
+    }
+  }
+  http = data->req.p.http;
+  DEBUGASSERT(http);
+
+  result = Curl_http_host(data, conn);
+  if(result)
+    return result;
+
+  result = Curl_http_useragent(data);
+  if(result)
+    return result;
+
+  Curl_http_method(data, conn, &request, &httpreq);
+
+  /* setup the authentication headers */
+  {
+    char *pq = NULL;
+    if(data->state.up.query) {
+      pq = aprintf("%s?%s", data->state.up.path, data->state.up.query);
+      if(!pq)
+        return CURLE_OUT_OF_MEMORY;
+    }
+    result = Curl_http_output_auth(data, conn, request, httpreq,
+                                   (pq ? pq : data->state.up.path), FALSE);
+    free(pq);
+    if(result)
+      return result;
+  }
+
+  Curl_safefree(data->state.aptr.ref);
+  if(data->state.referer && !Curl_checkheaders(data, "Referer")) {
+    data->state.aptr.ref = aprintf("Referer: %s\r\n", data->state.referer);
+    if(!data->state.aptr.ref)
+      return CURLE_OUT_OF_MEMORY;
+  }
+
+  if(!Curl_checkheaders(data, "Accept-Encoding") &&
+     data->set.str[STRING_ENCODING]) {
+    Curl_safefree(data->state.aptr.accept_encoding);
+    data->state.aptr.accept_encoding =
+      aprintf("Accept-Encoding: %s\r\n", data->set.str[STRING_ENCODING]);
+    if(!data->state.aptr.accept_encoding)
+      return CURLE_OUT_OF_MEMORY;
+  }
+  else
+    Curl_safefree(data->state.aptr.accept_encoding);
+
+#ifdef HAVE_LIBZ
+  /* we only consider transfer-encoding magic if libz support is built-in */
+  result = Curl_transferencode(data);
+  if(result)
+    return result;
+#endif
+
+  result = Curl_http_body(data, conn, httpreq, &te);
+  if(result)
+    return result;
+
+  p_accept = Curl_checkheaders(data, "Accept")?NULL:"Accept: */*\r\n";
+
+  result = Curl_http_resume(data, conn, httpreq);
+  if(result)
+    return result;
+
+  result = Curl_http_range(data, httpreq);
+  if(result)
+    return result;
 
   httpstring = get_http_string(data, conn);
 
   /* initialize a dynamic send-buffer */
   Curl_dyn_init(&req, DYN_HTTP_REQUEST);
 
+  /* make sure the header buffer is reset - if there are leftovers from a
+     previous transfer */
+  Curl_dyn_reset(&data->state.headerb);
+
   /* add the main request stuff */
   /* GET/HEAD/POST/PUT */
   result = Curl_dyn_addf(&req, "%s ", request);
-  if(result)
+  if(!result)
+    result = Curl_http_target(data, conn, &req);
+  if(result) {
+    Curl_dyn_free(&req);
     return result;
-
-  if(data->set.str[STRING_TARGET]) {
-    path = data->set.str[STRING_TARGET];
-    query = NULL;
   }
 
-#ifndef CURL_DISABLE_PROXY
-  /* url */
-  if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) {
-    char *url = data->set.str[STRING_TEMP_URL];
-    result = Curl_dyn_add(&req, url);
-    Curl_safefree(data->set.str[STRING_TEMP_URL]);
-  }
-  else
-#endif
-  if(paste_ftp_userpwd)
-    result = Curl_dyn_addf(&req, "ftp://%s:%s@%s", conn->user, conn->passwd,
-                           path + sizeof("ftp://") - 1);
-  else {
-    result = Curl_dyn_add(&req, path);
-    if(result)
-      return result;
-    if(query)
-      result = Curl_dyn_addf(&req, "?%s", query);
-  }
-  if(result)
-    return result;
-
-#ifdef USE_ALTSVC
-  if(conn->bits.altused && !Curl_checkheaders(conn, "Alt-Used")) {
+#ifndef CURL_DISABLE_ALTSVC
+  if(conn->bits.altused && !Curl_checkheaders(data, "Alt-Used")) {
     altused = aprintf("Alt-Used: %s:%d\r\n",
                       conn->conn_to_host.name, conn->conn_to_port);
     if(!altused) {
@@ -2530,7 +3157,6 @@
 #endif
   result =
     Curl_dyn_addf(&req,
-                  "%s" /* ftp typecode (;type=x) */
                   " HTTP/%s\r\n" /* HTTP version */
                   "%s" /* host */
                   "%s" /* proxyuserpwd */
@@ -2545,7 +3171,6 @@
                   "%s" /* transfer-encoding */
                   "%s",/* Alt-Used */
 
-                  ftp_typecode,
                   httpstring,
                   (data->state.aptr.host?data->state.aptr.host:""),
                   data->state.aptr.proxyuserpwd?
@@ -2557,18 +3182,19 @@
                    *data->set.str[STRING_USERAGENT] &&
                    data->state.aptr.uagent)?
                   data->state.aptr.uagent:"",
-                  http->p_accept?http->p_accept:"",
+                  p_accept?p_accept:"",
                   data->state.aptr.te?data->state.aptr.te:"",
                   (data->set.str[STRING_ENCODING] &&
                    *data->set.str[STRING_ENCODING] &&
                    data->state.aptr.accept_encoding)?
                   data->state.aptr.accept_encoding:"",
-                  (data->change.referer && data->state.aptr.ref)?
+                  (data->state.referer && data->state.aptr.ref)?
                   data->state.aptr.ref:"" /* Referer: <data> */,
 #ifndef CURL_DISABLE_PROXY
                   (conn->bits.httpproxy &&
                    !conn->bits.tunnel_proxy &&
-                   !Curl_checkProxyheaders(conn, "Proxy-Connection"))?
+                   !Curl_checkheaders(data, "Proxy-Connection") &&
+                   !Curl_checkProxyheaders(data, conn, "Proxy-Connection"))?
                   "Proxy-Connection: Keep-Alive\r\n":"",
 #else
                   "",
@@ -2583,407 +3209,61 @@
   Curl_safefree(data->state.aptr.proxyuserpwd);
   free(altused);
 
-  if(result)
+  if(result) {
+    Curl_dyn_free(&req);
     return result;
+  }
 
   if(!(conn->handler->flags&PROTOPT_SSL) &&
      conn->httpversion != 20 &&
-     (data->set.httpversion == CURL_HTTP_VERSION_2)) {
+     (data->state.httpwant == CURL_HTTP_VERSION_2)) {
     /* append HTTP2 upgrade magic stuff to the HTTP request if it isn't done
        over SSL */
-    result = Curl_http2_request_upgrade(&req, conn);
-    if(result)
+    result = Curl_http2_request_upgrade(&req, data);
+    if(result) {
+      Curl_dyn_free(&req);
       return result;
+    }
   }
 
-#if !defined(CURL_DISABLE_COOKIES)
-  if(data->cookies || addcookies) {
-    struct Cookie *co = NULL; /* no cookies from start */
-    int count = 0;
+  result = Curl_http_cookies(data, conn, &req);
+  if(!result)
+    result = Curl_add_timecondition(data, &req);
+  if(!result)
+    result = Curl_add_custom_headers(data, FALSE, &req);
 
-    if(data->cookies && data->state.cookie_engine) {
-      Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
-      co = Curl_cookie_getlist(data->cookies,
-                               data->state.aptr.cookiehost?
-                               data->state.aptr.cookiehost:host,
-                               data->state.up.path,
-                               (conn->handler->protocol&CURLPROTO_HTTPS)?
-                               TRUE:FALSE);
-      Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
-    }
-    if(co) {
-      struct Cookie *store = co;
-      /* now loop through all cookies that matched */
-      while(co) {
-        if(co->value) {
-          if(0 == count) {
-            result = Curl_dyn_add(&req, "Cookie: ");
-            if(result)
-              break;
-          }
-          result = Curl_dyn_addf(&req, "%s%s=%s", count?"; ":"",
-                                 co->name, co->value);
-          if(result)
-            break;
-          count++;
-        }
-        co = co->next; /* next cookie please */
-      }
-      Curl_cookie_freelist(store);
-    }
-    if(addcookies && !result) {
-      if(!count)
-        result = Curl_dyn_add(&req, "Cookie: ");
-      if(!result) {
-        result = Curl_dyn_addf(&req, "%s%s", count?"; ":"", addcookies);
-        count++;
-      }
-    }
-    if(count && !result)
-      result = Curl_dyn_add(&req, "\r\n");
+  if(!result) {
+    http->postdata = NULL;  /* nothing to post at this point */
+    if((httpreq == HTTPREQ_GET) ||
+       (httpreq == HTTPREQ_HEAD))
+      Curl_pgrsSetUploadSize(data, 0); /* nothing */
 
-    if(result)
-      return result;
+    /* bodysend takes ownership of the 'req' memory on success */
+    result = Curl_http_bodysend(data, conn, &req, httpreq);
   }
-#endif
-
-  result = Curl_add_timecondition(conn, &req);
-  if(result)
+  if(result) {
+    Curl_dyn_free(&req);
     return result;
-
-  result = Curl_add_custom_headers(conn, FALSE, &req);
-  if(result)
-    return result;
-
-  http->postdata = NULL;  /* nothing to post at this point */
-  Curl_pgrsSetUploadSize(data, -1); /* upload size is unknown atm */
-
-  /* If 'authdone' is FALSE, we must not set the write socket index to the
-     Curl_transfer() call below, as we're not ready to actually upload any
-     data yet. */
-
-  switch(httpreq) {
-
-  case HTTPREQ_PUT: /* Let's PUT the data to the server! */
-
-    if(conn->bits.authneg)
-      postsize = 0;
-    else
-      postsize = data->state.infilesize;
-
-    if((postsize != -1) && !data->req.upload_chunky &&
-       (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length"))) {
-      /* only add Content-Length if not uploading chunked */
-      result = Curl_dyn_addf(&req, "Content-Length: %" CURL_FORMAT_CURL_OFF_T
-                             "\r\n", postsize);
-      if(result)
-        return result;
-    }
-
-    if(postsize != 0) {
-      result = expect100(data, conn, &req);
-      if(result)
-        return result;
-    }
-
-    /* end of headers */
-    result = Curl_dyn_add(&req, "\r\n");
-    if(result)
-      return result;
-
-    /* set the upload size to the progress meter */
-    Curl_pgrsSetUploadSize(data, postsize);
-
-    /* this sends the buffer and frees all the buffer resources */
-    result = Curl_buffer_send(&req, conn, &data->info.request_size, 0,
-                              FIRSTSOCKET);
-    if(result)
-      failf(data, "Failed sending PUT request");
-    else
-      /* prepare for transfer */
-      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE,
-                          postsize?FIRSTSOCKET:-1);
-    if(result)
-      return result;
-    break;
-
-  case HTTPREQ_POST_FORM:
-  case HTTPREQ_POST_MIME:
-    /* This is form posting using mime data. */
-    if(conn->bits.authneg) {
-      /* nothing to post! */
-      result = Curl_dyn_add(&req, "Content-Length: 0\r\n\r\n");
-      if(result)
-        return result;
-
-      result = Curl_buffer_send(&req, conn, &data->info.request_size, 0,
-                                FIRSTSOCKET);
-      if(result)
-        failf(data, "Failed sending POST request");
-      else
-        /* setup variables for the upcoming transfer */
-        Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE, -1);
-      break;
-    }
-
-    data->state.infilesize = postsize = http->postsize;
-
-    /* We only set Content-Length and allow a custom Content-Length if
-       we don't upload data chunked, as RFC2616 forbids us to set both
-       kinds of headers (Transfer-Encoding: chunked and Content-Length) */
-    if(postsize != -1 && !data->req.upload_chunky &&
-       (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length"))) {
-      /* we allow replacing this header if not during auth negotiation,
-         although it isn't very wise to actually set your own */
-      result = Curl_dyn_addf(&req,
-                             "Content-Length: %" CURL_FORMAT_CURL_OFF_T
-                             "\r\n", postsize);
-      if(result)
-        return result;
-    }
-
-#ifndef CURL_DISABLE_MIME
-    /* Output mime-generated headers. */
-    {
-      struct curl_slist *hdr;
-
-      for(hdr = http->sendit->curlheaders; hdr; hdr = hdr->next) {
-        result = Curl_dyn_addf(&req, "%s\r\n", hdr->data);
-        if(result)
-          return result;
-      }
-    }
-#endif
-
-    /* For really small posts we don't use Expect: headers at all, and for
-       the somewhat bigger ones we allow the app to disable it. Just make
-       sure that the expect100header is always set to the preferred value
-       here. */
-    ptr = Curl_checkheaders(conn, "Expect");
-    if(ptr) {
-      data->state.expect100header =
-        Curl_compareheader(ptr, "Expect:", "100-continue");
-    }
-    else if(postsize > EXPECT_100_THRESHOLD || postsize < 0) {
-      result = expect100(data, conn, &req);
-      if(result)
-        return result;
-    }
-    else
-      data->state.expect100header = FALSE;
-
-    /* make the request end in a true CRLF */
-    result = Curl_dyn_add(&req, "\r\n");
-    if(result)
-      return result;
-
-    /* set the upload size to the progress meter */
-    Curl_pgrsSetUploadSize(data, postsize);
-
-    /* Read from mime structure. */
-    data->state.fread_func = (curl_read_callback) Curl_mime_read;
-    data->state.in = (void *) http->sendit;
-    http->sending = HTTPSEND_BODY;
-
-    /* this sends the buffer and frees all the buffer resources */
-    result = Curl_buffer_send(&req, conn, &data->info.request_size, 0,
-                              FIRSTSOCKET);
-    if(result)
-      failf(data, "Failed sending POST request");
-    else
-      /* prepare for transfer */
-      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE,
-                          postsize?FIRSTSOCKET:-1);
-    if(result)
-      return result;
-
-    break;
-
-  case HTTPREQ_POST:
-    /* this is the simple POST, using x-www-form-urlencoded style */
-
-    if(conn->bits.authneg)
-      postsize = 0;
-    else
-      /* the size of the post body */
-      postsize = data->state.infilesize;
-
-    /* We only set Content-Length and allow a custom Content-Length if
-       we don't upload data chunked, as RFC2616 forbids us to set both
-       kinds of headers (Transfer-Encoding: chunked and Content-Length) */
-    if((postsize != -1) && !data->req.upload_chunky &&
-       (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length"))) {
-      /* we allow replacing this header if not during auth negotiation,
-         although it isn't very wise to actually set your own */
-      result = Curl_dyn_addf(&req, "Content-Length: %" CURL_FORMAT_CURL_OFF_T
-                             "\r\n", postsize);
-      if(result)
-        return result;
-    }
-
-    if(!Curl_checkheaders(conn, "Content-Type")) {
-      result = Curl_dyn_add(&req, "Content-Type: application/"
-                            "x-www-form-urlencoded\r\n");
-      if(result)
-        return result;
-    }
-
-    /* For really small posts we don't use Expect: headers at all, and for
-       the somewhat bigger ones we allow the app to disable it. Just make
-       sure that the expect100header is always set to the preferred value
-       here. */
-    ptr = Curl_checkheaders(conn, "Expect");
-    if(ptr) {
-      data->state.expect100header =
-        Curl_compareheader(ptr, "Expect:", "100-continue");
-    }
-    else if(postsize > EXPECT_100_THRESHOLD || postsize < 0) {
-      result = expect100(data, conn, &req);
-      if(result)
-        return result;
-    }
-    else
-      data->state.expect100header = FALSE;
-
-    if(data->set.postfields) {
-
-      /* In HTTP2, we send request body in DATA frame regardless of
-         its size. */
-      if(conn->httpversion != 20 &&
-         !data->state.expect100header &&
-         (postsize < MAX_INITIAL_POST_SIZE)) {
-        /* if we don't use expect: 100  AND
-           postsize is less than MAX_INITIAL_POST_SIZE
-
-           then append the post data to the HTTP request header. This limit
-           is no magic limit but only set to prevent really huge POSTs to
-           get the data duplicated with malloc() and family. */
-
-        /* end of headers! */
-        result = Curl_dyn_add(&req, "\r\n");
-        if(result)
-          return result;
-
-        if(!data->req.upload_chunky) {
-          /* We're not sending it 'chunked', append it to the request
-             already now to reduce the number if send() calls */
-          result = Curl_dyn_addn(&req, data->set.postfields,
-                                 (size_t)postsize);
-          included_body = postsize;
-        }
-        else {
-          if(postsize) {
-            /* Append the POST data chunky-style */
-            result = Curl_dyn_addf(&req, "%x\r\n", (int)postsize);
-            if(!result) {
-              result = Curl_dyn_addn(&req, data->set.postfields,
-                                     (size_t)postsize);
-              if(!result)
-                result = Curl_dyn_add(&req, "\r\n");
-              included_body = postsize + 2;
-            }
-          }
-          if(!result)
-            result = Curl_dyn_add(&req, "\x30\x0d\x0a\x0d\x0a");
-          /* 0  CR  LF  CR  LF */
-          included_body += 5;
-        }
-        if(result)
-          return result;
-        /* Make sure the progress information is accurate */
-        Curl_pgrsSetUploadSize(data, postsize);
-      }
-      else {
-        /* A huge POST coming up, do data separate from the request */
-        http->postsize = postsize;
-        http->postdata = data->set.postfields;
-
-        http->sending = HTTPSEND_BODY;
-
-        data->state.fread_func = (curl_read_callback)readmoredata;
-        data->state.in = (void *)conn;
-
-        /* set the upload size to the progress meter */
-        Curl_pgrsSetUploadSize(data, http->postsize);
-
-        /* end of headers! */
-        result = Curl_dyn_add(&req, "\r\n");
-        if(result)
-          return result;
-      }
-    }
-    else {
-       /* end of headers! */
-      result = Curl_dyn_add(&req, "\r\n");
-      if(result)
-        return result;
-
-      if(data->req.upload_chunky && conn->bits.authneg) {
-        /* Chunky upload is selected and we're negotiating auth still, send
-           end-of-data only */
-        result = Curl_dyn_add(&req, (char *)"\x30\x0d\x0a\x0d\x0a");
-        /* 0  CR  LF  CR  LF */
-        if(result)
-          return result;
-      }
-
-      else if(data->state.infilesize) {
-        /* set the upload size to the progress meter */
-        Curl_pgrsSetUploadSize(data, postsize?postsize:-1);
-
-        /* set the pointer to mark that we will send the post body using the
-           read callback, but only if we're not in authenticate
-           negotiation  */
-        if(!conn->bits.authneg) {
-          http->postdata = (char *)&http->postdata;
-          http->postsize = postsize;
-        }
-      }
-    }
-    /* issue the request */
-    result = Curl_buffer_send(&req, conn, &data->info.request_size,
-                              (size_t)included_body, FIRSTSOCKET);
-
-    if(result)
-      failf(data, "Failed sending HTTP POST request");
-    else
-      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE,
-                          http->postdata?FIRSTSOCKET:-1);
-    break;
-
-  default:
-    result = Curl_dyn_add(&req, "\r\n");
-    if(result)
-      return result;
-
-    /* issue the request */
-    result = Curl_buffer_send(&req, conn, &data->info.request_size, 0,
-                              FIRSTSOCKET);
-
-    if(result)
-      failf(data, "Failed sending HTTP request");
-    else
-      /* HTTP GET/HEAD download: */
-      Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE, -1);
   }
-  if(result)
-    return result;
-  if(!postsize && (http->sending != HTTPSEND_REQUEST))
+
+  if((http->postsize > -1) &&
+     (http->postsize <= data->req.writebytecount) &&
+     (http->sending != HTTPSEND_REQUEST))
     data->req.upload_done = TRUE;
 
   if(data->req.writebytecount) {
     /* if a request-body has been sent off, we make sure this progress is noted
        properly */
     Curl_pgrsSetUploadCounter(data, data->req.writebytecount);
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
 
-    if(data->req.writebytecount >= postsize) {
+    if(!http->postsize) {
       /* already sent the entire request body, mark the "upload" as
          complete */
       infof(data, "upload completely sent off: %" CURL_FORMAT_CURL_OFF_T
-            " out of %" CURL_FORMAT_CURL_OFF_T " bytes\n",
-            data->req.writebytecount, postsize);
+            " out of %" CURL_FORMAT_CURL_OFF_T " bytes",
+            data->req.writebytecount, http->postsize);
       data->req.upload_done = TRUE;
       data->req.keepon &= ~KEEP_SEND; /* we're done writing */
       data->req.exp100 = EXP100_SEND_DATA; /* already sent */
@@ -2999,6 +3279,8 @@
   return result;
 }
 
+#endif /* USE_HYPER */
+
 typedef enum {
   STATUS_UNKNOWN, /* not enough data to tell yet */
   STATUS_DONE, /* a status line was read */
@@ -3103,41 +3385,390 @@
   return checkhttpprefix(data, s, len);
 }
 
-static void print_http_error(struct Curl_easy *data)
+/*
+ * Curl_http_header() parses a single response header.
+ */
+CURLcode Curl_http_header(struct Curl_easy *data, struct connectdata *conn,
+                          char *headp)
 {
+  CURLcode result;
   struct SingleRequest *k = &data->req;
-  char *beg = Curl_dyn_ptr(&data->state.headerb);
+  /* Check for Content-Length: header lines to get size */
+  if(!k->http_bodyless &&
+     !data->set.ignorecl && checkprefix("Content-Length:", headp)) {
+    curl_off_t contentlength;
+    CURLofft offt = curlx_strtoofft(headp + strlen("Content-Length:"),
+                                    NULL, 10, &contentlength);
 
-  /* make sure that data->req.p points to the HTTP status line */
-  if(!strncmp(beg, "HTTP", 4)) {
-
-    /* skip to HTTP status code */
-    beg = strchr(beg, ' ');
-    if(beg && *++beg) {
-
-      /* find trailing CR */
-      char end_char = '\r';
-      char *end = strchr(beg, end_char);
-      if(!end) {
-        /* try to find LF (workaround for non-compliant HTTP servers) */
-        end_char = '\n';
-        end = strchr(beg, end_char);
+    if(offt == CURL_OFFT_OK) {
+      if(data->set.max_filesize &&
+         contentlength > data->set.max_filesize) {
+        failf(data, "Maximum file size exceeded");
+        return CURLE_FILESIZE_EXCEEDED;
       }
+      k->size = contentlength;
+      k->maxdownload = k->size;
+      /* we set the progress download size already at this point
+         just to make it easier for apps/callbacks to extract this
+         info as soon as possible */
+      Curl_pgrsSetDownloadSize(data, k->size);
+    }
+    else if(offt == CURL_OFFT_FLOW) {
+      /* out of range */
+      if(data->set.max_filesize) {
+        failf(data, "Maximum file size exceeded");
+        return CURLE_FILESIZE_EXCEEDED;
+      }
+      streamclose(conn, "overflow content-length");
+      infof(data, "Overflow Content-Length: value!");
+    }
+    else {
+      /* negative or just rubbish - bad HTTP */
+      failf(data, "Invalid Content-Length: value");
+      return CURLE_WEIRD_SERVER_REPLY;
+    }
+  }
+  /* check for Content-Type: header lines to get the MIME-type */
+  else if(checkprefix("Content-Type:", headp)) {
+    char *contenttype = Curl_copy_header_value(headp);
+    if(!contenttype)
+      return CURLE_OUT_OF_MEMORY;
+    if(!*contenttype)
+      /* ignore empty data */
+      free(contenttype);
+    else {
+      Curl_safefree(data->info.contenttype);
+      data->info.contenttype = contenttype;
+    }
+  }
+#ifndef CURL_DISABLE_PROXY
+  else if((conn->httpversion == 10) &&
+          conn->bits.httpproxy &&
+          Curl_compareheader(headp, "Proxy-Connection:", "keep-alive")) {
+    /*
+     * When a HTTP/1.0 reply comes when using a proxy, the
+     * 'Proxy-Connection: keep-alive' line tells us the
+     * connection will be kept alive for our pleasure.
+     * Default action for 1.0 is to close.
+     */
+    connkeep(conn, "Proxy-Connection keep-alive"); /* don't close */
+    infof(data, "HTTP/1.0 proxy connection set to keep alive!");
+  }
+  else if((conn->httpversion == 11) &&
+          conn->bits.httpproxy &&
+          Curl_compareheader(headp, "Proxy-Connection:", "close")) {
+    /*
+     * We get a HTTP/1.1 response from a proxy and it says it'll
+     * close down after this transfer.
+     */
+    connclose(conn, "Proxy-Connection: asked to close after done");
+    infof(data, "HTTP/1.1 proxy connection set close!");
+  }
+#endif
+  else if((conn->httpversion == 10) &&
+          Curl_compareheader(headp, "Connection:", "keep-alive")) {
+    /*
+     * A HTTP/1.0 reply with the 'Connection: keep-alive' line
+     * tells us the connection will be kept alive for our
+     * pleasure.  Default action for 1.0 is to close.
+     *
+     * [RFC2068, section 19.7.1] */
+    connkeep(conn, "Connection keep-alive");
+    infof(data, "HTTP/1.0 connection set to keep alive!");
+  }
+  else if(Curl_compareheader(headp, "Connection:", "close")) {
+    /*
+     * [RFC 2616, section 8.1.2.1]
+     * "Connection: close" is HTTP/1.1 language and means that
+     * the connection will close when this request has been
+     * served.
+     */
+    streamclose(conn, "Connection: close used");
+  }
+  else if(!k->http_bodyless && checkprefix("Transfer-Encoding:", headp)) {
+    /* One or more encodings. We check for chunked and/or a compression
+       algorithm. */
+    /*
+     * [RFC 2616, section 3.6.1] A 'chunked' transfer encoding
+     * means that the server will send a series of "chunks". Each
+     * chunk starts with line with info (including size of the
+     * coming block) (terminated with CRLF), then a block of data
+     * with the previously mentioned size. There can be any amount
+     * of chunks, and a chunk-data set to zero signals the
+     * end-of-chunks. */
 
-      if(end) {
-        /* temporarily replace CR or LF by NUL and print the error message */
-        *end = '\0';
-        failf(data, "The requested URL returned error: %s", beg);
+    result = Curl_build_unencoding_stack(data,
+                                         headp + strlen("Transfer-Encoding:"),
+                                         TRUE);
+    if(result)
+      return result;
+  }
+  else if(!k->http_bodyless && checkprefix("Content-Encoding:", headp) &&
+          data->set.str[STRING_ENCODING]) {
+    /*
+     * Process Content-Encoding. Look for the values: identity,
+     * gzip, deflate, compress, x-gzip and x-compress. x-gzip and
+     * x-compress are the same as gzip and compress. (Sec 3.5 RFC
+     * 2616). zlib cannot handle compress.  However, errors are
+     * handled further down when the response body is processed
+     */
+    result = Curl_build_unencoding_stack(data,
+                                         headp + strlen("Content-Encoding:"),
+                                         FALSE);
+    if(result)
+      return result;
+  }
+  else if(checkprefix("Retry-After:", headp)) {
+    /* Retry-After = HTTP-date / delay-seconds */
+    curl_off_t retry_after = 0; /* zero for unknown or "now" */
+    time_t date = Curl_getdate_capped(headp + strlen("Retry-After:"));
+    if(-1 == date) {
+      /* not a date, try it as a decimal number */
+      (void)curlx_strtoofft(headp + strlen("Retry-After:"),
+                            NULL, 10, &retry_after);
+    }
+    else
+      /* convert date to number of seconds into the future */
+      retry_after = date - time(NULL);
+    data->info.retry_after = retry_after; /* store it */
+  }
+  else if(!k->http_bodyless && checkprefix("Content-Range:", headp)) {
+    /* Content-Range: bytes [num]-
+       Content-Range: bytes: [num]-
+       Content-Range: [num]-
+       Content-Range: [asterisk]/[total]
 
-        /* restore the previously replaced CR or LF */
-        *end = end_char;
-        return;
+       The second format was added since Sun's webserver
+       JavaWebServer/1.1.1 obviously sends the header this way!
+       The third added since some servers use that!
+       The forth means the requested range was unsatisfied.
+    */
+
+    char *ptr = headp + strlen("Content-Range:");
+
+    /* Move forward until first digit or asterisk */
+    while(*ptr && !ISDIGIT(*ptr) && *ptr != '*')
+      ptr++;
+
+    /* if it truly stopped on a digit */
+    if(ISDIGIT(*ptr)) {
+      if(!curlx_strtoofft(ptr, NULL, 10, &k->offset)) {
+        if(data->state.resume_from == k->offset)
+          /* we asked for a resume and we got it */
+          k->content_range = TRUE;
+      }
+    }
+    else
+      data->state.resume_from = 0; /* get everything */
+  }
+#if !defined(CURL_DISABLE_COOKIES)
+  else if(data->cookies && data->state.cookie_engine &&
+          checkprefix("Set-Cookie:", headp)) {
+    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE,
+                    CURL_LOCK_ACCESS_SINGLE);
+    Curl_cookie_add(data,
+                    data->cookies, TRUE, FALSE,
+                    headp + strlen("Set-Cookie:"),
+                    /* If there is a custom-set Host: name, use it
+                       here, or else use real peer host name. */
+                    data->state.aptr.cookiehost?
+                    data->state.aptr.cookiehost:conn->host.name,
+                    data->state.up.path,
+                    (conn->handler->protocol&CURLPROTO_HTTPS)?
+                    TRUE:FALSE);
+    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
+  }
+#endif
+  else if(!k->http_bodyless && checkprefix("Last-Modified:", headp) &&
+          (data->set.timecondition || data->set.get_filetime) ) {
+    k->timeofdoc = Curl_getdate_capped(headp + strlen("Last-Modified:"));
+    if(data->set.get_filetime)
+      data->info.filetime = k->timeofdoc;
+  }
+  else if((checkprefix("WWW-Authenticate:", headp) &&
+           (401 == k->httpcode)) ||
+          (checkprefix("Proxy-authenticate:", headp) &&
+           (407 == k->httpcode))) {
+
+    bool proxy = (k->httpcode == 407) ? TRUE : FALSE;
+    char *auth = Curl_copy_header_value(headp);
+    if(!auth)
+      return CURLE_OUT_OF_MEMORY;
+
+    result = Curl_http_input_auth(data, proxy, auth);
+
+    free(auth);
+
+    if(result)
+      return result;
+  }
+#ifdef USE_SPNEGO
+  else if(checkprefix("Persistent-Auth:", headp)) {
+    struct negotiatedata *negdata = &conn->negotiate;
+    struct auth *authp = &data->state.authhost;
+    if(authp->picked == CURLAUTH_NEGOTIATE) {
+      char *persistentauth = Curl_copy_header_value(headp);
+      if(!persistentauth)
+        return CURLE_OUT_OF_MEMORY;
+      negdata->noauthpersist = checkprefix("false", persistentauth)?
+        TRUE:FALSE;
+      negdata->havenoauthpersist = TRUE;
+      infof(data, "Negotiate: noauthpersist -> %d, header part: %s",
+            negdata->noauthpersist, persistentauth);
+      free(persistentauth);
+    }
+  }
+#endif
+  else if((k->httpcode >= 300 && k->httpcode < 400) &&
+          checkprefix("Location:", headp) &&
+          !data->req.location) {
+    /* this is the URL that the server advises us to use instead */
+    char *location = Curl_copy_header_value(headp);
+    if(!location)
+      return CURLE_OUT_OF_MEMORY;
+    if(!*location)
+      /* ignore empty data */
+      free(location);
+    else {
+      data->req.location = location;
+
+      if(data->set.http_follow_location) {
+        DEBUGASSERT(!data->req.newurl);
+        data->req.newurl = strdup(data->req.location); /* clone */
+        if(!data->req.newurl)
+          return CURLE_OUT_OF_MEMORY;
+
+        /* some cases of POST and PUT etc needs to rewind the data
+           stream at this point */
+        result = http_perhapsrewind(data, conn);
+        if(result)
+          return result;
       }
     }
   }
 
-  /* fall-back to printing the HTTP status code only */
-  failf(data, "The requested URL returned error: %d", k->httpcode);
+#ifndef CURL_DISABLE_HSTS
+  /* If enabled, the header is incoming and this is over HTTPS */
+  else if(data->hsts && checkprefix("Strict-Transport-Security:", headp) &&
+          (conn->handler->flags & PROTOPT_SSL)) {
+    CURLcode check =
+      Curl_hsts_parse(data->hsts, data->state.up.hostname,
+                      headp + strlen("Strict-Transport-Security:"));
+    if(check)
+      infof(data, "Illegal STS header skipped");
+#ifdef DEBUGBUILD
+    else
+      infof(data, "Parsed STS header fine (%zu entries)",
+            data->hsts->list.size);
+#endif
+  }
+#endif
+#ifndef CURL_DISABLE_ALTSVC
+  /* If enabled, the header is incoming and this is over HTTPS */
+  else if(data->asi && checkprefix("Alt-Svc:", headp) &&
+          ((conn->handler->flags & PROTOPT_SSL) ||
+#ifdef CURLDEBUG
+           /* allow debug builds to circumvent the HTTPS restriction */
+           getenv("CURL_ALTSVC_HTTP")
+#else
+           0
+#endif
+            )) {
+    /* the ALPN of the current request */
+    enum alpnid id = (conn->httpversion == 20) ? ALPN_h2 : ALPN_h1;
+    result = Curl_altsvc_parse(data, data->asi,
+                               headp + strlen("Alt-Svc:"),
+                               id, conn->host.name,
+                               curlx_uitous(conn->remote_port));
+    if(result)
+      return result;
+  }
+#endif
+  else if(conn->handler->protocol & CURLPROTO_RTSP) {
+    result = Curl_rtsp_parseheader(data, headp);
+    if(result)
+      return result;
+  }
+  return CURLE_OK;
+}
+
+/*
+ * Called after the first HTTP response line (the status line) has been
+ * received and parsed.
+ */
+
+CURLcode Curl_http_statusline(struct Curl_easy *data,
+                              struct connectdata *conn)
+{
+  struct SingleRequest *k = &data->req;
+  data->info.httpcode = k->httpcode;
+
+  data->info.httpversion = conn->httpversion;
+  if(!data->state.httpversion ||
+     data->state.httpversion > conn->httpversion)
+    /* store the lowest server version we encounter */
+    data->state.httpversion = conn->httpversion;
+
+  /*
+   * This code executes as part of processing the header.  As a
+   * result, it's not totally clear how to interpret the
+   * response code yet as that depends on what other headers may
+   * be present.  401 and 407 may be errors, but may be OK
+   * depending on how authentication is working.  Other codes
+   * are definitely errors, so give up here.
+   */
+  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
+     k->httpcode == 416) {
+    /* "Requested Range Not Satisfiable", just proceed and
+       pretend this is no error */
+    k->ignorebody = TRUE; /* Avoid appending error msg to good data. */
+  }
+
+  if(conn->httpversion == 10) {
+    /* Default action for HTTP/1.0 must be to close, unless
+       we get one of those fancy headers that tell us the
+       server keeps it open for us! */
+    infof(data, "HTTP 1.0, assume close after body");
+    connclose(conn, "HTTP/1.0 close after body");
+  }
+  else if(conn->httpversion == 20 ||
+          (k->upgr101 == UPGR101_REQUESTED && k->httpcode == 101)) {
+    DEBUGF(infof(data, "HTTP/2 found, allow multiplexing"));
+    /* HTTP/2 cannot avoid multiplexing since it is a core functionality
+       of the protocol */
+    conn->bundle->multiuse = BUNDLE_MULTIPLEX;
+  }
+  else if(conn->httpversion >= 11 &&
+          !conn->bits.close) {
+    /* If HTTP version is >= 1.1 and connection is persistent */
+    DEBUGF(infof(data,
+                 "HTTP 1.1 or later with persistent connection"));
+  }
+
+  k->http_bodyless = k->httpcode >= 100 && k->httpcode < 200;
+  switch(k->httpcode) {
+  case 304:
+    /* (quote from RFC2616, section 10.3.5): The 304 response
+     * MUST NOT contain a message-body, and thus is always
+     * terminated by the first empty line after the header
+     * fields.  */
+    if(data->set.timecondition)
+      data->info.timecond = TRUE;
+    /* FALLTHROUGH */
+  case 204:
+    /* (quote from RFC2616, section 10.2.5): The server has
+     * fulfilled the request but does not need to return an
+     * entity-body ... The 204 response MUST NOT include a
+     * message-body, and thus is always terminated by the first
+     * empty line after the header fields. */
+    k->size = 0;
+    k->maxdownload = 0;
+    k->http_bodyless = TRUE;
+    break;
+  default:
+    break;
+  }
+  return CURLE_OK;
 }
 
 /*
@@ -3188,7 +3819,7 @@
           k->badheader = HEADER_ALLBAD;
           streamclose(conn, "bad HTTP: No end-of-message indicator");
           if(!data->set.http09_allowed) {
-            failf(data, "Received HTTP/0.9 when not allowed\n");
+            failf(data, "Received HTTP/0.9 when not allowed");
             return CURLE_UNSUPPORTED_PROTOCOL;
           }
           break;
@@ -3223,7 +3854,7 @@
         streamclose(conn, "bad HTTP: No end-of-message indicator");
         /* this is not the beginning of a protocol first header line */
         if(!data->set.http09_allowed) {
-          failf(data, "Received HTTP/0.9 when not allowed\n");
+          failf(data, "Received HTTP/0.9 when not allowed");
           return CURLE_UNSUPPORTED_PROTOCOL;
         }
         k->header = FALSE;
@@ -3289,7 +3920,7 @@
           /* Switching Protocols */
           if(k->upgr101 == UPGR101_REQUESTED) {
             /* Switching to HTTP/2 */
-            infof(data, "Received 101\n");
+            infof(data, "Received 101");
             k->upgr101 = UPGR101_RECEIVED;
 
             /* we'll get more headers (HTTP/2 response) */
@@ -3298,7 +3929,7 @@
 
             /* switch to http2 now. The bytes after response headers
                are also processed here, otherwise they are lost. */
-            result = Curl_http2_switched(conn, k->str, *nread);
+            result = Curl_http2_switched(data, k->str, *nread);
             if(result)
               return result;
             *nread = 0;
@@ -3329,7 +3960,7 @@
              assume that the server will close the connection to
              signal the end of the document. */
           infof(data, "no chunk, no close, no size. Assume close to "
-                "signal end\n");
+                "signal end");
           streamclose(conn, "HTTP: No end-of-message indicator");
         }
       }
@@ -3342,7 +3973,7 @@
            (conn->http_ntlm_state == NTLMSTATE_TYPE2)) ||
           ((data->req.httpcode == 407) &&
            (conn->proxy_ntlm_state == NTLMSTATE_TYPE2)))) {
-        infof(data, "Connection closure while negotiating auth (HTTP 1.0?)\n");
+        infof(data, "Connection closure while negotiating auth (HTTP 1.0?)");
         data->state.authproblem = TRUE;
       }
 #endif
@@ -3352,7 +3983,7 @@
           (conn->http_negotiate_state == GSS_AUTHRECV)) ||
          ((data->req.httpcode == 407) &&
           (conn->proxy_negotiate_state == GSS_AUTHRECV)))) {
-        infof(data, "Connection closure while negotiating auth (HTTP 1.0?)\n");
+        infof(data, "Connection closure while negotiating auth (HTTP 1.0?)");
         data->state.authproblem = TRUE;
       }
       if((conn->http_negotiate_state == GSS_AUTHDONE) &&
@@ -3364,15 +3995,6 @@
         conn->proxy_negotiate_state = GSS_AUTHSUCC;
       }
 #endif
-      /*
-       * When all the headers have been parsed, see if we should give
-       * up and return an error.
-       */
-      if(http_should_fail(conn)) {
-        failf(data, "The requested URL returned error: %d",
-              k->httpcode);
-        return CURLE_HTTP_RETURNED_ERROR;
-      }
 
       /* now, only output this if the header AND body are requested:
        */
@@ -3381,7 +4003,7 @@
         writetype |= CLIENTWRITE_BODY;
 
       headerlen = Curl_dyn_len(&data->state.headerb);
-      result = Curl_client_write(conn, writetype,
+      result = Curl_client_write(data, writetype,
                                  Curl_dyn_ptr(&data->state.headerb),
                                  headerlen);
       if(result)
@@ -3390,13 +4012,23 @@
       data->info.header_size += (long)headerlen;
       data->req.headerbytecount += (long)headerlen;
 
+      /*
+       * When all the headers have been parsed, see if we should give
+       * up and return an error.
+       */
+      if(http_should_fail(data)) {
+        failf(data, "The requested URL returned error: %d",
+              k->httpcode);
+        return CURLE_HTTP_RETURNED_ERROR;
+      }
+
       data->req.deductheadercount =
         (100 <= k->httpcode && 199 >= k->httpcode)?data->req.headerbytecount:0;
 
       /* Curl_http_auth_act() checks what authentication methods
        * that are available and decides which one (if any) to
        * use. It will set 'newurl' if an auth method was picked. */
-      result = Curl_http_auth_act(conn);
+      result = Curl_http_auth_act(data);
 
       if(result)
         return result;
@@ -3431,23 +4063,23 @@
               if((k->httpcode == 417) && data->state.expect100header) {
                 /* 417 Expectation Failed - try again without the Expect
                    header */
-                infof(data, "Got 417 while waiting for a 100\n");
+                infof(data, "Got 417 while waiting for a 100");
                 data->state.disableexpect = TRUE;
                 DEBUGASSERT(!data->req.newurl);
-                data->req.newurl = strdup(conn->data->change.url);
-                Curl_done_sending(conn, k);
+                data->req.newurl = strdup(data->state.url);
+                Curl_done_sending(data, k);
               }
               else if(data->set.http_keep_sending_on_error) {
-                infof(data, "HTTP error before end of send, keep sending\n");
+                infof(data, "HTTP error before end of send, keep sending");
                 if(k->exp100 > EXP100_SEND_DATA) {
                   k->exp100 = EXP100_SEND_DATA;
                   k->keepon |= KEEP_SEND;
                 }
               }
               else {
-                infof(data, "HTTP error before end of send, stop sending\n");
+                infof(data, "HTTP error before end of send, stop sending");
                 streamclose(conn, "Stop sending data before everything sent");
-                result = Curl_done_sending(conn, k);
+                result = Curl_done_sending(data, k);
                 if(result)
                   return result;
                 k->upload_done = TRUE;
@@ -3465,7 +4097,7 @@
         if(conn->bits.rewindaftersend) {
           /* We rewind after a complete send, so thus we continue
              sending now */
-          infof(data, "Keep sending data to get tossed away!\n");
+          infof(data, "Keep sending data to get tossed away!");
           k->keepon |= KEEP_SEND;
         }
       }
@@ -3533,10 +4165,8 @@
           k->keepon &= ~KEEP_RECV;
         }
 
-        if(data->set.verbose)
-          Curl_debug(data, CURLINFO_HEADER_IN,
-                     str_start, headerlen);
-        break;          /* exit header line loop */
+        Curl_debug(data, CURLINFO_HEADER_IN, str_start, headerlen);
+        break; /* exit header line loop */
       }
 
       /* We continue reading headers, reset the line-based header */
@@ -3585,10 +4215,11 @@
          */
         char separator;
         char twoorthree[2];
+        int httpversion = 0;
         nc = sscanf(HEADER1,
                     " HTTP/%1d.%1d%c%3d",
                     &httpversion_major,
-                    &conn->httpversion,
+                    &httpversion,
                     &separator,
                     &k->httpcode);
 
@@ -3600,16 +4231,32 @@
         }
 
         if((nc == 4) && (' ' == separator)) {
-          conn->httpversion += 10 * httpversion_major;
+          httpversion += 10 * httpversion_major;
+          switch(httpversion) {
+          case 10:
+          case 11:
+#if defined(USE_NGHTTP2) || defined(USE_HYPER)
+          case 20:
+#endif
+#if defined(ENABLE_QUIC)
+          case 30:
+#endif
+            conn->httpversion = (unsigned char)httpversion;
+            break;
+          default:
+            failf(data, "Unsupported HTTP version (%u.%d) in response",
+                  httpversion/10, httpversion%10);
+            return CURLE_UNSUPPORTED_PROTOCOL;
+          }
 
           if(k->upgr101 == UPGR101_RECEIVED) {
             /* supposedly upgraded to http2 now */
             if(conn->httpversion != 20)
-              infof(data, "Lying server, not serving HTTP/2\n");
+              infof(data, "Lying server, not serving HTTP/2");
           }
           if(conn->httpversion < 20) {
             conn->bundle->multiuse = BUNDLE_NO_MULTIUSE;
-            infof(data, "Mark bundle as not supporting multiuse\n");
+            infof(data, "Mark bundle as not supporting multiuse");
           }
         }
         else if(!nc) {
@@ -3641,14 +4288,14 @@
       }
       else if(conn->handler->protocol & CURLPROTO_RTSP) {
         char separator;
+        int rtspversion;
         nc = sscanf(HEADER1,
                     " RTSP/%1d.%1d%c%3d",
                     &rtspversion_major,
-                    &conn->rtspversion,
+                    &rtspversion,
                     &separator,
                     &k->httpcode);
         if((nc == 4) && (' ' == separator)) {
-          conn->rtspversion += 10 * rtspversion_major;
           conn->httpversion = 11; /* For us, RTSP acts like HTTP 1.1 */
         }
         else {
@@ -3657,83 +4304,9 @@
       }
 
       if(nc) {
-        data->info.httpcode = k->httpcode;
-
-        data->info.httpversion = conn->httpversion;
-        if(!data->state.httpversion ||
-           data->state.httpversion > conn->httpversion)
-          /* store the lowest server version we encounter */
-          data->state.httpversion = conn->httpversion;
-
-        /*
-         * This code executes as part of processing the header.  As a
-         * result, it's not totally clear how to interpret the
-         * response code yet as that depends on what other headers may
-         * be present.  401 and 407 may be errors, but may be OK
-         * depending on how authentication is working.  Other codes
-         * are definitely errors, so give up here.
-         */
-        if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
-             k->httpcode == 416) {
-          /* "Requested Range Not Satisfiable", just proceed and
-             pretend this is no error */
-          k->ignorebody = TRUE; /* Avoid appending error msg to good data. */
-        }
-        else if(data->set.http_fail_on_error && (k->httpcode >= 400) &&
-                ((k->httpcode != 401) || !conn->bits.user_passwd)
-#ifndef CURL_DISABLE_PROXY
-                && ((k->httpcode != 407) || !conn->bits.proxy_user_passwd)
-#endif
-          ) {
-          /* serious error, go home! */
-          print_http_error(data);
-          return CURLE_HTTP_RETURNED_ERROR;
-        }
-
-        if(conn->httpversion == 10) {
-          /* Default action for HTTP/1.0 must be to close, unless
-             we get one of those fancy headers that tell us the
-             server keeps it open for us! */
-          infof(data, "HTTP 1.0, assume close after body\n");
-          connclose(conn, "HTTP/1.0 close after body");
-        }
-        else if(conn->httpversion == 20 ||
-                (k->upgr101 == UPGR101_REQUESTED && k->httpcode == 101)) {
-          DEBUGF(infof(data, "HTTP/2 found, allow multiplexing\n"));
-          /* HTTP/2 cannot avoid multiplexing since it is a core functionality
-             of the protocol */
-          conn->bundle->multiuse = BUNDLE_MULTIPLEX;
-        }
-        else if(conn->httpversion >= 11 &&
-                !conn->bits.close) {
-          /* If HTTP version is >= 1.1 and connection is persistent */
-          DEBUGF(infof(data,
-                       "HTTP 1.1 or later with persistent connection\n"));
-        }
-
-        k->http_bodyless = k->httpcode >= 100 && k->httpcode < 200;
-        switch(k->httpcode) {
-        case 304:
-          /* (quote from RFC2616, section 10.3.5): The 304 response
-           * MUST NOT contain a message-body, and thus is always
-           * terminated by the first empty line after the header
-           * fields.  */
-          if(data->set.timecondition)
-            data->info.timecond = TRUE;
-          /* FALLTHROUGH */
-        case 204:
-          /* (quote from RFC2616, section 10.2.5): The server has
-           * fulfilled the request but does not need to return an
-           * entity-body ... The 204 response MUST NOT include a
-           * message-body, and thus is always terminated by the first
-           * empty line after the header fields. */
-          k->size = 0;
-          k->maxdownload = 0;
-          k->http_bodyless = TRUE;
-          break;
-        default:
-          break;
-        }
+        result = Curl_http_statusline(data, conn);
+        if(result)
+          return result;
       }
       else {
         k->header = FALSE;   /* this is not a header line */
@@ -3746,278 +4319,9 @@
     if(result)
       return result;
 
-    /* Check for Content-Length: header lines to get size */
-    if(!k->http_bodyless &&
-       !data->set.ignorecl && checkprefix("Content-Length:", headp)) {
-      curl_off_t contentlength;
-      CURLofft offt = curlx_strtoofft(headp + 15, NULL, 10, &contentlength);
-
-      if(offt == CURL_OFFT_OK) {
-        if(data->set.max_filesize &&
-           contentlength > data->set.max_filesize) {
-          failf(data, "Maximum file size exceeded");
-          return CURLE_FILESIZE_EXCEEDED;
-        }
-        k->size = contentlength;
-        k->maxdownload = k->size;
-        /* we set the progress download size already at this point
-           just to make it easier for apps/callbacks to extract this
-           info as soon as possible */
-        Curl_pgrsSetDownloadSize(data, k->size);
-      }
-      else if(offt == CURL_OFFT_FLOW) {
-        /* out of range */
-        if(data->set.max_filesize) {
-          failf(data, "Maximum file size exceeded");
-          return CURLE_FILESIZE_EXCEEDED;
-        }
-        streamclose(conn, "overflow content-length");
-        infof(data, "Overflow Content-Length: value!\n");
-      }
-      else {
-        /* negative or just rubbish - bad HTTP */
-        failf(data, "Invalid Content-Length: value");
-        return CURLE_WEIRD_SERVER_REPLY;
-      }
-    }
-    /* check for Content-Type: header lines to get the MIME-type */
-    else if(checkprefix("Content-Type:", headp)) {
-      char *contenttype = Curl_copy_header_value(headp);
-      if(!contenttype)
-        return CURLE_OUT_OF_MEMORY;
-      if(!*contenttype)
-        /* ignore empty data */
-        free(contenttype);
-      else {
-        Curl_safefree(data->info.contenttype);
-        data->info.contenttype = contenttype;
-      }
-    }
-#ifndef CURL_DISABLE_PROXY
-    else if((conn->httpversion == 10) &&
-            conn->bits.httpproxy &&
-            Curl_compareheader(headp, "Proxy-Connection:", "keep-alive")) {
-      /*
-       * When a HTTP/1.0 reply comes when using a proxy, the
-       * 'Proxy-Connection: keep-alive' line tells us the
-       * connection will be kept alive for our pleasure.
-       * Default action for 1.0 is to close.
-       */
-      connkeep(conn, "Proxy-Connection keep-alive"); /* don't close */
-      infof(data, "HTTP/1.0 proxy connection set to keep alive!\n");
-    }
-    else if((conn->httpversion == 11) &&
-            conn->bits.httpproxy &&
-            Curl_compareheader(headp, "Proxy-Connection:", "close")) {
-      /*
-       * We get a HTTP/1.1 response from a proxy and it says it'll
-       * close down after this transfer.
-       */
-      connclose(conn, "Proxy-Connection: asked to close after done");
-      infof(data, "HTTP/1.1 proxy connection set close!\n");
-    }
-#endif
-    else if((conn->httpversion == 10) &&
-            Curl_compareheader(headp, "Connection:", "keep-alive")) {
-      /*
-       * A HTTP/1.0 reply with the 'Connection: keep-alive' line
-       * tells us the connection will be kept alive for our
-       * pleasure.  Default action for 1.0 is to close.
-       *
-       * [RFC2068, section 19.7.1] */
-      connkeep(conn, "Connection keep-alive");
-      infof(data, "HTTP/1.0 connection set to keep alive!\n");
-    }
-    else if(Curl_compareheader(headp, "Connection:", "close")) {
-      /*
-       * [RFC 2616, section 8.1.2.1]
-       * "Connection: close" is HTTP/1.1 language and means that
-       * the connection will close when this request has been
-       * served.
-       */
-      streamclose(conn, "Connection: close used");
-    }
-    else if(!k->http_bodyless && checkprefix("Transfer-Encoding:", headp)) {
-      /* One or more encodings. We check for chunked and/or a compression
-         algorithm. */
-      /*
-       * [RFC 2616, section 3.6.1] A 'chunked' transfer encoding
-       * means that the server will send a series of "chunks". Each
-       * chunk starts with line with info (including size of the
-       * coming block) (terminated with CRLF), then a block of data
-       * with the previously mentioned size. There can be any amount
-       * of chunks, and a chunk-data set to zero signals the
-       * end-of-chunks. */
-
-      result = Curl_build_unencoding_stack(conn, headp + 18, TRUE);
-      if(result)
-        return result;
-    }
-    else if(!k->http_bodyless && checkprefix("Content-Encoding:", headp) &&
-            data->set.str[STRING_ENCODING]) {
-      /*
-       * Process Content-Encoding. Look for the values: identity,
-       * gzip, deflate, compress, x-gzip and x-compress. x-gzip and
-       * x-compress are the same as gzip and compress. (Sec 3.5 RFC
-       * 2616). zlib cannot handle compress.  However, errors are
-       * handled further down when the response body is processed
-       */
-      result = Curl_build_unencoding_stack(conn, headp + 17, FALSE);
-      if(result)
-        return result;
-    }
-    else if(checkprefix("Retry-After:", headp)) {
-      /* Retry-After = HTTP-date / delay-seconds */
-      curl_off_t retry_after = 0; /* zero for unknown or "now" */
-      time_t date = Curl_getdate_capped(&headp[12]);
-      if(-1 == date) {
-        /* not a date, try it as a decimal number */
-        (void)curlx_strtoofft(&headp[12], NULL, 10, &retry_after);
-      }
-      else
-        /* convert date to number of seconds into the future */
-        retry_after = date - time(NULL);
-      data->info.retry_after = retry_after; /* store it */
-    }
-    else if(!k->http_bodyless && checkprefix("Content-Range:", headp)) {
-      /* Content-Range: bytes [num]-
-         Content-Range: bytes: [num]-
-         Content-Range: [num]-
-         Content-Range: [asterisk]/[total]
-
-         The second format was added since Sun's webserver
-         JavaWebServer/1.1.1 obviously sends the header this way!
-         The third added since some servers use that!
-         The forth means the requested range was unsatisfied.
-      */
-
-      char *ptr = headp + 14;
-
-      /* Move forward until first digit or asterisk */
-      while(*ptr && !ISDIGIT(*ptr) && *ptr != '*')
-        ptr++;
-
-      /* if it truly stopped on a digit */
-      if(ISDIGIT(*ptr)) {
-        if(!curlx_strtoofft(ptr, NULL, 10, &k->offset)) {
-          if(data->state.resume_from == k->offset)
-            /* we asked for a resume and we got it */
-            k->content_range = TRUE;
-        }
-      }
-      else
-        data->state.resume_from = 0; /* get everything */
-    }
-#if !defined(CURL_DISABLE_COOKIES)
-    else if(data->cookies && data->state.cookie_engine &&
-            checkprefix("Set-Cookie:", headp)) {
-      Curl_share_lock(data, CURL_LOCK_DATA_COOKIE,
-                      CURL_LOCK_ACCESS_SINGLE);
-      Curl_cookie_add(data,
-                      data->cookies, TRUE, FALSE, headp + 11,
-                      /* If there is a custom-set Host: name, use it
-                         here, or else use real peer host name. */
-                      data->state.aptr.cookiehost?
-                      data->state.aptr.cookiehost:conn->host.name,
-                      data->state.up.path,
-                      (conn->handler->protocol&CURLPROTO_HTTPS)?
-                      TRUE:FALSE);
-      Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
-    }
-#endif
-    else if(!k->http_bodyless && checkprefix("Last-Modified:", headp) &&
-            (data->set.timecondition || data->set.get_filetime) ) {
-      k->timeofdoc = Curl_getdate_capped(headp + strlen("Last-Modified:"));
-      if(data->set.get_filetime)
-        data->info.filetime = k->timeofdoc;
-    }
-    else if((checkprefix("WWW-Authenticate:", headp) &&
-             (401 == k->httpcode)) ||
-            (checkprefix("Proxy-authenticate:", headp) &&
-             (407 == k->httpcode))) {
-
-      bool proxy = (k->httpcode == 407) ? TRUE : FALSE;
-      char *auth = Curl_copy_header_value(headp);
-      if(!auth)
-        return CURLE_OUT_OF_MEMORY;
-
-      result = Curl_http_input_auth(conn, proxy, auth);
-
-      free(auth);
-
-      if(result)
-        return result;
-    }
-#ifdef USE_SPNEGO
-    else if(checkprefix("Persistent-Auth", headp)) {
-      struct negotiatedata *negdata = &conn->negotiate;
-      struct auth *authp = &data->state.authhost;
-      if(authp->picked == CURLAUTH_NEGOTIATE) {
-        char *persistentauth = Curl_copy_header_value(headp);
-        if(!persistentauth)
-          return CURLE_OUT_OF_MEMORY;
-        negdata->noauthpersist = checkprefix("false", persistentauth)?
-          TRUE:FALSE;
-        negdata->havenoauthpersist = TRUE;
-        infof(data, "Negotiate: noauthpersist -> %d, header part: %s",
-          negdata->noauthpersist, persistentauth);
-        free(persistentauth);
-      }
-    }
-#endif
-    else if((k->httpcode >= 300 && k->httpcode < 400) &&
-            checkprefix("Location:", headp) &&
-            !data->req.location) {
-      /* this is the URL that the server advises us to use instead */
-      char *location = Curl_copy_header_value(headp);
-      if(!location)
-        return CURLE_OUT_OF_MEMORY;
-      if(!*location)
-        /* ignore empty data */
-        free(location);
-      else {
-        data->req.location = location;
-
-        if(data->set.http_follow_location) {
-          DEBUGASSERT(!data->req.newurl);
-          data->req.newurl = strdup(data->req.location); /* clone */
-          if(!data->req.newurl)
-            return CURLE_OUT_OF_MEMORY;
-
-          /* some cases of POST and PUT etc needs to rewind the data
-             stream at this point */
-          result = http_perhapsrewind(conn);
-          if(result)
-            return result;
-        }
-      }
-    }
-#ifdef USE_ALTSVC
-    /* If enabled, the header is incoming and this is over HTTPS */
-    else if(data->asi && checkprefix("Alt-Svc:", headp) &&
-            ((conn->handler->flags & PROTOPT_SSL) ||
-#ifdef CURLDEBUG
-             /* allow debug builds to circumvent the HTTPS restriction */
-             getenv("CURL_ALTSVC_HTTP")
-#else
-             0
-#endif
-              )) {
-      /* the ALPN of the current request */
-      enum alpnid id = (conn->httpversion == 20) ? ALPN_h2 : ALPN_h1;
-      result = Curl_altsvc_parse(data, data->asi,
-                                 &headp[ strlen("Alt-Svc:") ],
-                                 id, conn->host.name,
-                                 curlx_uitous(conn->remote_port));
-      if(result)
-        return result;
-    }
-#endif
-    else if(conn->handler->protocol & CURLPROTO_RTSP) {
-      result = Curl_rtsp_parseheader(conn, headp);
-      if(result)
-        return result;
-    }
+    result = Curl_http_header(data, conn, headp);
+    if(result)
+      return result;
 
     /*
      * End of header-checks. Write them to the client.
@@ -4027,11 +4331,10 @@
     if(data->set.include_header)
       writetype |= CLIENTWRITE_BODY;
 
-    if(data->set.verbose)
-      Curl_debug(data, CURLINFO_HEADER_IN, headp,
-                 Curl_dyn_len(&data->state.headerb));
+    Curl_debug(data, CURLINFO_HEADER_IN, headp,
+               Curl_dyn_len(&data->state.headerb));
 
-    result = Curl_client_write(conn, writetype, headp,
+    result = Curl_client_write(data, writetype, headp,
                                Curl_dyn_len(&data->state.headerb));
     if(result)
       return result;
diff --git a/lib/http.h b/lib/http.h
index 9ea3eb2..bce1715 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,6 +23,15 @@
  ***************************************************************************/
 #include "curl_setup.h"
 
+typedef enum {
+  HTTPREQ_GET,
+  HTTPREQ_POST,
+  HTTPREQ_POST_FORM, /* we make a difference internally */
+  HTTPREQ_POST_MIME, /* we make a difference internally */
+  HTTPREQ_PUT,
+  HTTPREQ_HEAD
+} Curl_HttpReq;
+
 #ifndef CURL_DISABLE_HTTP
 
 #ifdef USE_NGHTTP2
@@ -42,32 +51,79 @@
 
 char *Curl_copy_header_value(const char *header);
 
-char *Curl_checkProxyheaders(const struct connectdata *conn,
+char *Curl_checkProxyheaders(struct Curl_easy *data,
+                             const struct connectdata *conn,
                              const char *thisheader);
+#ifndef USE_HYPER
 CURLcode Curl_buffer_send(struct dynbuf *in,
-                          struct connectdata *conn,
+                          struct Curl_easy *data,
                           curl_off_t *bytes_written,
-                          size_t included_body_bytes,
+                          curl_off_t included_body_bytes,
                           int socketindex);
+#else
+#define Curl_buffer_send(a,b,c,d,e) CURLE_OK
+#endif
 
-CURLcode Curl_add_timecondition(const struct connectdata *conn,
-                                struct dynbuf *buf);
-CURLcode Curl_add_custom_headers(struct connectdata *conn,
+CURLcode Curl_add_timecondition(struct Curl_easy *data,
+#ifndef USE_HYPER
+                                struct dynbuf *req
+#else
+                                void *headers
+#endif
+  );
+CURLcode Curl_add_custom_headers(struct Curl_easy *data,
                                  bool is_connect,
-                                 struct dynbuf *req_buffer);
+#ifndef USE_HYPER
+                                 struct dynbuf *req
+#else
+                                 void *headers
+#endif
+  );
 CURLcode Curl_http_compile_trailers(struct curl_slist *trailers,
                                     struct dynbuf *buf,
                                     struct Curl_easy *handle);
 
+void Curl_http_method(struct Curl_easy *data, struct connectdata *conn,
+                      const char **method, Curl_HttpReq *);
+CURLcode Curl_http_useragent(struct Curl_easy *data);
+CURLcode Curl_http_host(struct Curl_easy *data, struct connectdata *conn);
+CURLcode Curl_http_target(struct Curl_easy *data, struct connectdata *conn,
+                          struct dynbuf *req);
+CURLcode Curl_http_statusline(struct Curl_easy *data,
+                              struct connectdata *conn);
+CURLcode Curl_http_header(struct Curl_easy *data, struct connectdata *conn,
+                          char *headp);
+CURLcode Curl_transferencode(struct Curl_easy *data);
+CURLcode Curl_http_body(struct Curl_easy *data, struct connectdata *conn,
+                        Curl_HttpReq httpreq,
+                        const char **teep);
+CURLcode Curl_http_bodysend(struct Curl_easy *data, struct connectdata *conn,
+                            struct dynbuf *r, Curl_HttpReq httpreq);
+#ifndef CURL_DISABLE_COOKIES
+CURLcode Curl_http_cookies(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           struct dynbuf *r);
+#else
+#define Curl_http_cookies(a,b,c) CURLE_OK
+#endif
+CURLcode Curl_http_resume(struct Curl_easy *data,
+                          struct connectdata *conn,
+                          Curl_HttpReq httpreq);
+CURLcode Curl_http_range(struct Curl_easy *data,
+                         Curl_HttpReq httpreq);
+CURLcode Curl_http_firstwrite(struct Curl_easy *data,
+                              struct connectdata *conn,
+                              bool *done);
+
 /* protocol-specific functions set up to be called by the main engine */
-CURLcode Curl_http(struct connectdata *conn, bool *done);
-CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature);
-CURLcode Curl_http_connect(struct connectdata *conn, bool *done);
+CURLcode Curl_http(struct Curl_easy *data, bool *done);
+CURLcode Curl_http_done(struct Curl_easy *data, CURLcode, bool premature);
+CURLcode Curl_http_connect(struct Curl_easy *data, bool *done);
 
 /* These functions are in http.c */
-CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy,
+CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
                               const char *auth);
-CURLcode Curl_http_auth_act(struct connectdata *conn);
+CURLcode Curl_http_auth_act(struct Curl_easy *data);
 
 /* If only the PICKNONE bit is set, there has been a round-trip and we
    selected to use no auth at all. Ie, we actively select no auth, as opposed
@@ -115,7 +171,6 @@
   const char *postdata;
 
   const char *p_pragma;      /* Pragma: string */
-  const char *p_accept;      /* Accept: string */
 
   /* For FORM posting */
   curl_mimepart form;
@@ -130,8 +185,7 @@
   enum {
     HTTPSEND_NADA,    /* init */
     HTTPSEND_REQUEST, /* sending a request */
-    HTTPSEND_BODY,    /* sending body */
-    HTTPSEND_LAST     /* never use this */
+    HTTPSEND_BODY     /* sending body */
   } sending;
 
 #ifndef CURL_DISABLE_HTTP
@@ -157,6 +211,7 @@
   char **push_headers;       /* allocated array */
   size_t push_headers_used;  /* number of entries filled in */
   size_t push_headers_alloc; /* number of entries allocated */
+  uint32_t error; /* HTTP/2 stream error code */
 #endif
 #if defined(USE_NGHTTP2) || defined(USE_NGHTTP3)
   bool closed; /* TRUE on HTTP2 stream close */
@@ -197,9 +252,16 @@
 struct http_conn {
 #ifdef USE_NGHTTP2
 #define H2_BINSETTINGS_LEN 80
-  nghttp2_session *h2;
   uint8_t binsettings[H2_BINSETTINGS_LEN];
   size_t  binlen; /* length of the binsettings data */
+
+  /* We associate the connnectdata struct with the connection, but we need to
+     make sure we can identify the current "driving" transfer. This is a
+     work-around for the lack of nghttp2_session_set_user_data() in older
+     nghttp2 versions that we want to support. (Added in 1.31.0) */
+  struct Curl_easy *trnsfr;
+
+  nghttp2_session *h2;
   Curl_send *send_underlying; /* underlying send Curl_send callback */
   Curl_recv *recv_underlying; /* underlying recv Curl_recv callback */
   char *inbuf; /* buffer to receive data from underlying socket */
@@ -220,7 +282,6 @@
   /* list of settings that will be sent */
   nghttp2_settings_entry local_settings[3];
   size_t local_settings_num;
-  uint32_t error_code; /* HTTP/2 error code */
 #else
   int unused; /* prevent a compiler warning */
 #endif
@@ -234,11 +295,13 @@
 /**
  * Curl_http_output_auth() setups the authentication headers for the
  * host/proxy and the correct authentication
- * method. conn->data->state.authdone is set to TRUE when authentication is
+ * method. data->state.authdone is set to TRUE when authentication is
  * done.
  *
+ * @param data all information about the current transfer
  * @param conn all information about the current connection
  * @param request pointer to the request keyword
+ * @param httpreq is the request type
  * @param path pointer to the requested path
  * @param proxytunnel boolean if this is the request setting up a "proxy
  * tunnel"
@@ -246,8 +309,10 @@
  * @returns CURLcode
  */
 CURLcode
-Curl_http_output_auth(struct connectdata *conn,
+Curl_http_output_auth(struct Curl_easy *data,
+                      struct connectdata *conn,
                       const char *request,
+                      Curl_HttpReq httpreq,
                       const char *path,
                       bool proxytunnel); /* TRUE if this is the request setting
                                             up the proxy tunnel */
diff --git a/lib/http2.c b/lib/http2.c
index 925d982..60e0143 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -65,12 +65,13 @@
 #endif
 
 
-static ssize_t http2_recv(struct connectdata *conn, int sockindex,
+static ssize_t http2_recv(struct Curl_easy *data, int sockindex,
                           char *mem, size_t len, CURLcode *err);
-static bool http2_connisdead(struct connectdata *conn);
+static bool http2_connisdead(struct Curl_easy *data,
+                             struct connectdata *conn);
 static int h2_session_send(struct Curl_easy *data,
                            nghttp2_session *h2);
-static int h2_process_pending_input(struct connectdata *conn,
+static int h2_process_pending_input(struct Curl_easy *data,
                                     struct http_conn *httpc,
                                     CURLcode *err);
 
@@ -92,18 +93,20 @@
   set->stream_weight = NGHTTP2_DEFAULT_WEIGHT;
 }
 
-static int http2_perform_getsock(const struct connectdata *conn,
-                                 curl_socket_t *sock)
+static int http2_getsock(struct Curl_easy *data,
+                         struct connectdata *conn,
+                         curl_socket_t *sock)
 {
   const struct http_conn *c = &conn->proto.httpc;
-  struct SingleRequest *k = &conn->data->req;
+  struct SingleRequest *k = &data->req;
   int bitmap = GETSOCK_BLANK;
 
   sock[0] = conn->sock[FIRSTSOCKET];
 
-  /* in a HTTP/2 connection we can basically always get a frame so we should
-     always be ready for one */
-  bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
+  if(!(k->keepon & KEEP_RECV_PAUSE))
+    /* Unless paused - in a HTTP/2 connection we can basically always get a
+       frame so we should always be ready for one */
+    bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
 
   /* we're still uploading or the HTTP/2 layer wants to send data */
   if(((k->keepon & (KEEP_SEND|KEEP_SEND_PAUSE)) == KEEP_SEND) ||
@@ -113,12 +116,6 @@
   return bitmap;
 }
 
-static int http2_getsock(struct connectdata *conn,
-                         curl_socket_t *socks)
-{
-  return http2_perform_getsock(conn, socks);
-}
-
 /*
  * http2_stream_free() free HTTP2 stream related data
  */
@@ -139,18 +136,22 @@
  * connection cache and not the "main" one. Don't touch the easy handle!
  */
 
-static CURLcode http2_disconnect(struct connectdata *conn,
+static CURLcode http2_disconnect(struct Curl_easy *data,
+                                 struct connectdata *conn,
                                  bool dead_connection)
 {
   struct http_conn *c = &conn->proto.httpc;
   (void)dead_connection;
+#ifndef DEBUG_HTTP2
+  (void)data;
+#endif
 
-  H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n"));
+  H2BUGF(infof(data, "HTTP/2 DISCONNECT starts now"));
 
   nghttp2_session_del(c->h2);
   Curl_safefree(c->inbuf);
 
-  H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));
+  H2BUGF(infof(data, "HTTP/2 DISCONNECT done"));
 
   return CURLE_OK;
 }
@@ -162,7 +163,7 @@
  * Instead, if it is readable, run Curl_connalive() to peek at the socket
  * and distinguish between closed and data.
  */
-static bool http2_connisdead(struct connectdata *conn)
+static bool http2_connisdead(struct Curl_easy *data, struct connectdata *conn)
 {
   int sval;
   bool dead = TRUE;
@@ -192,14 +193,16 @@
       if(httpc->recv_underlying)
         /* if called "too early", this pointer isn't setup yet! */
         nread = ((Curl_recv *)httpc->recv_underlying)(
-          conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result);
+          data, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result);
       if(nread != -1) {
-        infof(conn->data,
-              "%d bytes stray data read before trying h2 connection\n",
+        infof(data,
+              "%d bytes stray data read before trying h2 connection",
               (int)nread);
         httpc->nread_inbuf = 0;
         httpc->inbuflen = nread;
-        (void)h2_process_pending_input(conn, httpc, &result);
+        if(h2_process_pending_input(data, httpc, &result) < 0)
+          /* immediate error, considered dead */
+          dead = TRUE;
       }
       else
         /* the read failed so let's say this is dead anyway */
@@ -210,24 +213,43 @@
   return dead;
 }
 
-static unsigned int http2_conncheck(struct connectdata *check,
+/*
+ * Set the transfer that is currently using this HTTP/2 connection.
+ */
+static void set_transfer(struct http_conn *c,
+                         struct Curl_easy *data)
+{
+  c->trnsfr = data;
+}
+
+/*
+ * Get the transfer that is currently using this HTTP/2 connection.
+ */
+static struct Curl_easy *get_transfer(struct http_conn *c)
+{
+  DEBUGASSERT(c && c->trnsfr);
+  return c->trnsfr;
+}
+
+static unsigned int http2_conncheck(struct Curl_easy *data,
+                                    struct connectdata *conn,
                                     unsigned int checks_to_perform)
 {
   unsigned int ret_val = CONNRESULT_NONE;
-  struct http_conn *c = &check->proto.httpc;
+  struct http_conn *c = &conn->proto.httpc;
   int rc;
   bool send_frames = false;
 
   if(checks_to_perform & CONNCHECK_ISDEAD) {
-    if(http2_connisdead(check))
+    if(http2_connisdead(data, conn))
       ret_val |= CONNRESULT_DEAD;
   }
 
   if(checks_to_perform & CONNCHECK_KEEPALIVE) {
     struct curltime now = Curl_now();
-    timediff_t elapsed = Curl_timediff(now, check->keepalive);
+    timediff_t elapsed = Curl_timediff(now, conn->keepalive);
 
-    if(elapsed > check->upkeep_interval_ms) {
+    if(elapsed > data->set.upkeep_interval_ms) {
       /* Perform an HTTP/2 PING */
       rc = nghttp2_submit_ping(c->h2, 0, ZERO_NULL);
       if(!rc) {
@@ -236,18 +258,19 @@
         send_frames = true;
       }
       else {
-       failf(check->data, "nghttp2_submit_ping() failed: %s(%d)",
+       failf(data, "nghttp2_submit_ping() failed: %s(%d)",
              nghttp2_strerror(rc), rc);
       }
 
-      check->keepalive = now;
+      conn->keepalive = now;
     }
   }
 
   if(send_frames) {
+    set_transfer(c, data); /* set the transfer */
     rc = nghttp2_session_send(c->h2);
     if(rc)
-      failf(check->data, "nghttp2_session_send() failed: %s(%d)",
+      failf(data, "nghttp2_session_send() failed: %s(%d)",
             nghttp2_strerror(rc), rc);
   }
 
@@ -257,7 +280,7 @@
 /* called from http_setup_conn */
 void Curl_http2_setup_req(struct Curl_easy *data)
 {
-  struct HTTP *http = data->req.protop;
+  struct HTTP *http = data->req.p.http;
   http->bodystarted = FALSE;
   http->status_code = -1;
   http->pausedata = NULL;
@@ -267,6 +290,7 @@
   http->mem = NULL;
   http->len = 0;
   http->memlen = 0;
+  http->error = NGHTTP2_NO_ERROR;
 }
 
 /* called from http_setup_conn */
@@ -274,7 +298,6 @@
 {
   conn->proto.httpc.settings.max_concurrent_streams =
     DEFAULT_MAX_CONCURRENT_STREAMS;
-  conn->proto.httpc.error_code = NGHTTP2_NO_ERROR;
 }
 
 /*
@@ -294,10 +317,11 @@
   http2_getsock,                        /* proto_getsock */
   http2_getsock,                        /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  http2_perform_getsock,                /* perform_getsock */
+  http2_getsock,                        /* perform_getsock */
   http2_disconnect,                     /* disconnect */
   ZERO_NULL,                            /* readwrite */
   http2_conncheck,                      /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_HTTP,                            /* defport */
   CURLPROTO_HTTP,                       /* protocol */
   CURLPROTO_HTTP,                       /* family */
@@ -316,10 +340,11 @@
   http2_getsock,                        /* proto_getsock */
   http2_getsock,                        /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  http2_perform_getsock,                /* perform_getsock */
+  http2_getsock,                        /* perform_getsock */
   http2_disconnect,                     /* disconnect */
   ZERO_NULL,                            /* readwrite */
   http2_conncheck,                      /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_HTTP,                            /* defport */
   CURLPROTO_HTTPS,                      /* protocol */
   CURLPROTO_HTTP,                       /* family */
@@ -327,13 +352,12 @@
 };
 
 /*
- * Store nghttp2 version info in this buffer, Prefix with a space.  Return
- * total length written.
+ * Store nghttp2 version info in this buffer.
  */
-int Curl_http2_ver(char *p, size_t len)
+void Curl_http2_ver(char *p, size_t len)
 {
   nghttp2_info *h2 = nghttp2_version(0);
-  return msnprintf(p, len, "nghttp2/%s", h2->version_str);
+  (void)msnprintf(p, len, "nghttp2/%s", h2->version_str);
 }
 
 /*
@@ -342,11 +366,12 @@
  * written. See the documentation of nghttp2_send_callback for the details.
  */
 static ssize_t send_callback(nghttp2_session *h2,
-                             const uint8_t *data, size_t length, int flags,
+                             const uint8_t *mem, size_t length, int flags,
                              void *userp)
 {
   struct connectdata *conn = (struct connectdata *)userp;
   struct http_conn *c = &conn->proto.httpc;
+  struct Curl_easy *data = get_transfer(c);
   ssize_t written;
   CURLcode result = CURLE_OK;
 
@@ -357,15 +382,15 @@
     /* called before setup properly! */
     return NGHTTP2_ERR_CALLBACK_FAILURE;
 
-  written = ((Curl_send*)c->send_underlying)(conn, FIRSTSOCKET,
-                                             data, length, &result);
+  written = ((Curl_send*)c->send_underlying)(data, FIRSTSOCKET,
+                                             mem, length, &result);
 
   if(result == CURLE_AGAIN) {
     return NGHTTP2_ERR_WOULDBLOCK;
   }
 
   if(written == -1) {
-    failf(conn->data, "Failed sending HTTP2 data");
+    failf(data, "Failed sending HTTP2 data");
     return NGHTTP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -393,7 +418,7 @@
   if(!h || !GOOD_EASY_HANDLE(h->data))
     return NULL;
   else {
-    struct HTTP *stream = h->data->req.protop;
+    struct HTTP *stream = h->data->req.p.http;
     if(num < stream->push_headers_used)
       return stream->push_headers[num];
   }
@@ -415,7 +440,7 @@
      !strcmp(header, ":") || strchr(header + 1, ':'))
     return NULL;
   else {
-    struct HTTP *stream = h->data->req.protop;
+    struct HTTP *stream = h->data->req.p.http;
     size_t len = strlen(header);
     size_t i;
     for(i = 0; i<stream->push_headers_used; i++) {
@@ -462,7 +487,7 @@
       (void)Curl_close(&second);
     }
     else {
-      second->req.protop = http;
+      second->req.p.http = http;
       Curl_dyn_init(&http->header_recvbuf, DYN_H2_HEADERS);
       Curl_http2_setup_req(second);
       second->state.stream_weight = data->state.stream_weight;
@@ -477,38 +502,48 @@
   const char *v;
   CURLU *u = curl_url();
   CURLUcode uc;
-  char *url;
+  char *url = NULL;
+  int rc = 0;
 
   v = curl_pushheader_byname(hp, ":scheme");
   if(v) {
     uc = curl_url_set(u, CURLUPART_SCHEME, v, 0);
-    if(uc)
-      return 1;
+    if(uc) {
+      rc = 1;
+      goto fail;
+    }
   }
 
   v = curl_pushheader_byname(hp, ":authority");
   if(v) {
     uc = curl_url_set(u, CURLUPART_HOST, v, 0);
-    if(uc)
-      return 2;
+    if(uc) {
+      rc = 2;
+      goto fail;
+    }
   }
 
   v = curl_pushheader_byname(hp, ":path");
   if(v) {
     uc = curl_url_set(u, CURLUPART_PATH, v, 0);
-    if(uc)
-      return 3;
+    if(uc) {
+      rc = 3;
+      goto fail;
+    }
   }
 
   uc = curl_url_get(u, CURLUPART_URL, &url, 0);
   if(uc)
-    return 4;
+    rc = 4;
+  fail:
   curl_url_cleanup(u);
+  if(rc)
+    return rc;
 
-  if(data->change.url_alloc)
-    free(data->change.url);
-  data->change.url_alloc = TRUE;
-  data->change.url = url;
+  if(data->state.url_alloc)
+    free(data->state.url);
+  data->state.url_alloc = TRUE;
+  data->state.url = url;
   return 0;
 }
 
@@ -517,7 +552,7 @@
                         const nghttp2_push_promise *frame)
 {
   int rv; /* one of the CURL_PUSH_* defines */
-  H2BUGF(infof(data, "PUSH_PROMISE received, stream %u!\n",
+  H2BUGF(infof(data, "PUSH_PROMISE received, stream %u!",
                frame->promised_stream_id));
   if(data->multi->push_cb) {
     struct HTTP *stream;
@@ -529,7 +564,7 @@
     /* clone the parent */
     struct Curl_easy *newhandle = duphandle(data);
     if(!newhandle) {
-      infof(data, "failed to duplicate handle\n");
+      infof(data, "failed to duplicate handle");
       rv = CURL_PUSH_DENY; /* FAIL HARD */
       goto fail;
     }
@@ -537,11 +572,11 @@
     heads.data = data;
     heads.frame = frame;
     /* ask the application */
-    H2BUGF(infof(data, "Got PUSH_PROMISE, ask application!\n"));
+    H2BUGF(infof(data, "Got PUSH_PROMISE, ask application!"));
 
-    stream = data->req.protop;
+    stream = data->req.p.http;
     if(!stream) {
-      failf(data, "Internal NULL stream!\n");
+      failf(data, "Internal NULL stream!");
       (void)Curl_close(&newhandle);
       rv = CURL_PUSH_DENY;
       goto fail;
@@ -549,6 +584,7 @@
 
     rv = set_transfer_url(newhandle, &heads);
     if(rv) {
+      (void)Curl_close(&newhandle);
       rv = CURL_PUSH_DENY;
       goto fail;
     }
@@ -569,13 +605,13 @@
     if(rv) {
       DEBUGASSERT((rv > CURL_PUSH_OK) && (rv <= CURL_PUSH_ERROROUT));
       /* denied, kill off the new handle again */
-      http2_stream_free(newhandle->req.protop);
-      newhandle->req.protop = NULL;
+      http2_stream_free(newhandle->req.p.http);
+      newhandle->req.p.http = NULL;
       (void)Curl_close(&newhandle);
       goto fail;
     }
 
-    newstream = newhandle->req.protop;
+    newstream = newhandle->req.p.http;
     newstream->stream_id = frame->promised_stream_id;
     newhandle->req.maxdownload = -1;
     newhandle->req.size = -1;
@@ -584,9 +620,9 @@
        state with the given connection !*/
     rc = Curl_multi_add_perform(data->multi, newhandle, conn);
     if(rc) {
-      infof(data, "failed to add handle to multi\n");
-      http2_stream_free(newhandle->req.protop);
-      newhandle->req.protop = NULL;
+      infof(data, "failed to add handle to multi");
+      http2_stream_free(newhandle->req.p.http);
+      newhandle->req.p.http = NULL;
       Curl_close(&newhandle);
       rv = CURL_PUSH_DENY;
       goto fail;
@@ -597,15 +633,17 @@
                                               frame->promised_stream_id,
                                               newhandle);
     if(rv) {
-      infof(data, "failed to set user_data for stream %d\n",
+      infof(data, "failed to set user_data for stream %d",
             frame->promised_stream_id);
       DEBUGASSERT(0);
       rv = CURL_PUSH_DENY;
       goto fail;
     }
+    Curl_dyn_init(&newstream->header_recvbuf, DYN_H2_HEADERS);
+    Curl_dyn_init(&newstream->trailer_recvbuf, DYN_H2_TRAILERS);
   }
   else {
-    H2BUGF(infof(data, "Got PUSH_PROMISE, ignore it!\n"));
+    H2BUGF(infof(data, "Got PUSH_PROMISE, ignore it!"));
     rv = CURL_PUSH_DENY;
   }
   fail:
@@ -631,6 +669,7 @@
   struct http_conn *httpc = &conn->proto.httpc;
   struct Curl_easy *data_s = NULL;
   struct HTTP *stream = NULL;
+  struct Curl_easy *data = get_transfer(httpc);
   int rv;
   size_t left, ncopy;
   int32_t stream_id = frame->hd.stream_id;
@@ -640,43 +679,43 @@
     /* stream ID zero is for connection-oriented stuff */
     if(frame->hd.type == NGHTTP2_SETTINGS) {
       uint32_t max_conn = httpc->settings.max_concurrent_streams;
-      H2BUGF(infof(conn->data, "Got SETTINGS\n"));
+      H2BUGF(infof(data, "Got SETTINGS"));
       httpc->settings.max_concurrent_streams =
         nghttp2_session_get_remote_settings(
           session, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS);
       httpc->settings.enable_push =
         nghttp2_session_get_remote_settings(
           session, NGHTTP2_SETTINGS_ENABLE_PUSH);
-      H2BUGF(infof(conn->data, "MAX_CONCURRENT_STREAMS == %d\n",
+      H2BUGF(infof(data, "MAX_CONCURRENT_STREAMS == %d",
                    httpc->settings.max_concurrent_streams));
-      H2BUGF(infof(conn->data, "ENABLE_PUSH == %s\n",
+      H2BUGF(infof(data, "ENABLE_PUSH == %s",
                    httpc->settings.enable_push?"TRUE":"false"));
       if(max_conn != httpc->settings.max_concurrent_streams) {
         /* only signal change if the value actually changed */
-        infof(conn->data,
-              "Connection state changed (MAX_CONCURRENT_STREAMS == %u)!\n",
+        infof(data,
+              "Connection state changed (MAX_CONCURRENT_STREAMS == %u)!",
               httpc->settings.max_concurrent_streams);
-        multi_connchanged(conn->data->multi);
+        multi_connchanged(data->multi);
       }
     }
     return 0;
   }
   data_s = nghttp2_session_get_stream_user_data(session, stream_id);
   if(!data_s) {
-    H2BUGF(infof(conn->data,
-                 "No Curl_easy associated with stream: %x\n",
+    H2BUGF(infof(data,
+                 "No Curl_easy associated with stream: %x",
                  stream_id));
     return 0;
   }
 
-  stream = data_s->req.protop;
+  stream = data_s->req.p.http;
   if(!stream) {
-    H2BUGF(infof(data_s, "No proto pointer for stream: %x\n",
+    H2BUGF(infof(data_s, "No proto pointer for stream: %x",
                  stream_id));
     return NGHTTP2_ERR_CALLBACK_FAILURE;
   }
 
-  H2BUGF(infof(data_s, "on_frame_recv() header %x stream %x\n",
+  H2BUGF(infof(data_s, "on_frame_recv() header %x stream %x",
                frame->hd.type, stream_id));
 
   switch(frame->hd.type) {
@@ -724,21 +763,16 @@
            ncopy);
     stream->nread_header_recvbuf += ncopy;
 
-    H2BUGF(infof(data_s, "Store %zu bytes headers from stream %u at %p\n",
+    H2BUGF(infof(data_s, "Store %zu bytes headers from stream %u at %p",
                  ncopy, stream_id, stream->mem));
 
     stream->len -= ncopy;
     stream->memlen += ncopy;
 
     drain_this(data_s, httpc);
-    {
-      /* get the pointer from userp again since it was re-assigned above */
-      struct connectdata *conn_s = (struct connectdata *)userp;
-
-      /* if we receive data for another handle, wake that up */
-      if(conn_s->data != data_s)
-        Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
-    }
+    /* if we receive data for another handle, wake that up */
+    if(get_transfer(httpc) != data_s)
+      Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
     break;
   case NGHTTP2_PUSH_PROMISE:
     rv = push_promise(data_s, conn, &frame->push_promise);
@@ -751,13 +785,13 @@
       if(nghttp2_is_fatal(h2))
         return NGHTTP2_ERR_CALLBACK_FAILURE;
       else if(rv == CURL_PUSH_ERROROUT) {
-        DEBUGF(infof(data_s, "Fail the parent stream (too)\n"));
+        DEBUGF(infof(data_s, "Fail the parent stream (too)"));
         return NGHTTP2_ERR_CALLBACK_FAILURE;
       }
     }
     break;
   default:
-    H2BUGF(infof(data_s, "Got frame type %x for stream %u!\n",
+    H2BUGF(infof(data_s, "Got frame type %x for stream %u!",
                  frame->hd.type, stream_id));
     break;
   }
@@ -766,15 +800,15 @@
 
 static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags,
                               int32_t stream_id,
-                              const uint8_t *data, size_t len, void *userp)
+                              const uint8_t *mem, size_t len, void *userp)
 {
   struct HTTP *stream;
   struct Curl_easy *data_s;
   size_t nread;
   struct connectdata *conn = (struct connectdata *)userp;
+  struct http_conn *httpc = &conn->proto.httpc;
   (void)session;
   (void)flags;
-  (void)data;
 
   DEBUGASSERT(stream_id); /* should never be a zero stream ID here */
 
@@ -785,12 +819,12 @@
        internal error more than anything else! */
     return NGHTTP2_ERR_CALLBACK_FAILURE;
 
-  stream = data_s->req.protop;
+  stream = data_s->req.p.http;
   if(!stream)
     return NGHTTP2_ERR_CALLBACK_FAILURE;
 
   nread = CURLMIN(stream->len, len);
-  memcpy(&stream->mem[stream->memlen], data, nread);
+  memcpy(&stream->mem[stream->memlen], mem, nread);
 
   stream->len -= nread;
   stream->memlen += nread;
@@ -798,20 +832,20 @@
   drain_this(data_s, &conn->proto.httpc);
 
   /* if we receive data for another handle, wake that up */
-  if(conn->data != data_s)
+  if(get_transfer(httpc) != data_s)
     Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
 
   H2BUGF(infof(data_s, "%zu data received for stream %u "
-               "(%zu left in buffer %p, total %zu)\n",
+               "(%zu left in buffer %p, total %zu)",
                nread, stream_id,
                stream->len, stream->mem,
                stream->memlen));
 
   if(nread < len) {
-    stream->pausedata = data + nread;
+    stream->pausedata = mem + nread;
     stream->pauselen = len - nread;
     H2BUGF(infof(data_s, "NGHTTP2_ERR_PAUSE - %zu bytes out of buffer"
-                 ", stream %u\n",
+                 ", stream %u",
                  len - nread, stream_id));
     data_s->conn->proto.httpc.pause_stream_id = stream_id;
 
@@ -820,7 +854,7 @@
 
   /* pause execution of nghttp2 if we received data for another handle
      in order to process them first. */
-  if(conn->data != data_s) {
+  if(get_transfer(httpc) != data_s) {
     data_s->conn->proto.httpc.pause_stream_id = stream_id;
 
     return NGHTTP2_ERR_PAUSE;
@@ -849,9 +883,9 @@
          decided to reject stream (e.g., PUSH_PROMISE). */
       return 0;
     }
-    H2BUGF(infof(data_s, "on_stream_close(), %s (err %d), stream %u\n",
+    H2BUGF(infof(data_s, "on_stream_close(), %s (err %d), stream %u",
                  nghttp2_http2_strerror(error_code), error_code, stream_id));
-    stream = data_s->req.protop;
+    stream = data_s->req.p.http;
     if(!stream)
       return NGHTTP2_ERR_CALLBACK_FAILURE;
 
@@ -859,20 +893,20 @@
     httpc = &conn->proto.httpc;
     drain_this(data_s, httpc);
     Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
-    httpc->error_code = error_code;
+    stream->error = error_code;
 
     /* remove the entry from the hash as the stream is now gone */
     rv = nghttp2_session_set_stream_user_data(session, stream_id, 0);
     if(rv) {
-      infof(data_s, "http/2: failed to clear user_data for stream %d!\n",
+      infof(data_s, "http/2: failed to clear user_data for stream %d!",
             stream_id);
       DEBUGASSERT(0);
     }
     if(stream_id == httpc->pause_stream_id) {
-      H2BUGF(infof(data_s, "Stopped the pause stream!\n"));
+      H2BUGF(infof(data_s, "Stopped the pause stream!"));
       httpc->pause_stream_id = 0;
     }
-    H2BUGF(infof(data_s, "Removed stream %u hash!\n", stream_id));
+    H2BUGF(infof(data_s, "Removed stream %u hash!", stream_id));
     stream->stream_id = 0; /* cleared */
   }
   return 0;
@@ -890,13 +924,13 @@
     return 0;
   }
 
-  H2BUGF(infof(data_s, "on_begin_headers() was called\n"));
+  H2BUGF(infof(data_s, "on_begin_headers() was called"));
 
   if(frame->hd.type != NGHTTP2_HEADERS) {
     return 0;
   }
 
-  stream = data_s->req.protop;
+  stream = data_s->req.p.http;
   if(!stream || !stream->bodystarted) {
     return 0;
   }
@@ -942,6 +976,7 @@
   struct Curl_easy *data_s;
   int32_t stream_id = frame->hd.stream_id;
   struct connectdata *conn = (struct connectdata *)userp;
+  struct http_conn *httpc = &conn->proto.httpc;
   CURLcode result;
   (void)flags;
 
@@ -954,9 +989,9 @@
        internal error more than anything else! */
     return NGHTTP2_ERR_CALLBACK_FAILURE;
 
-  stream = data_s->req.protop;
+  stream = data_s->req.p.http;
   if(!stream) {
-    failf(data_s, "Internal NULL stream! 5\n");
+    failf(data_s, "Internal NULL stream!");
     return NGHTTP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -1017,7 +1052,7 @@
 
   if(stream->bodystarted) {
     /* This is a trailer */
-    H2BUGF(infof(data_s, "h2 trailer: %.*s: %.*s\n", namelen, name, valuelen,
+    H2BUGF(infof(data_s, "h2 trailer: %.*s: %.*s", namelen, name, valuelen,
                  value));
     result = Curl_dyn_addf(&stream->trailer_recvbuf,
                            "%.*s: %.*s\r\n", namelen, name,
@@ -1047,10 +1082,10 @@
     if(result)
       return NGHTTP2_ERR_CALLBACK_FAILURE;
     /* if we receive data for another handle, wake that up */
-    if(conn->data != data_s)
+    if(get_transfer(httpc) != data_s)
       Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
 
-    H2BUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)\n",
+    H2BUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)",
                  stream->status_code, data_s));
     return 0;
   }
@@ -1071,10 +1106,10 @@
   if(result)
     return NGHTTP2_ERR_CALLBACK_FAILURE;
   /* if we receive data for another handle, wake that up */
-  if(conn->data != data_s)
+  if(get_transfer(httpc) != data_s)
     Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
 
-  H2BUGF(infof(data_s, "h2 header: %.*s: %.*s\n", namelen, name, valuelen,
+  H2BUGF(infof(data_s, "h2 header: %.*s: %.*s", namelen, name, valuelen,
                value));
 
   return 0; /* 0 is successful */
@@ -1102,7 +1137,7 @@
          internal error more than anything else! */
       return NGHTTP2_ERR_CALLBACK_FAILURE;
 
-    stream = data_s->req.protop;
+    stream = data_s->req.p.http;
     if(!stream)
       return NGHTTP2_ERR_CALLBACK_FAILURE;
   }
@@ -1124,7 +1159,7 @@
     return NGHTTP2_ERR_DEFERRED;
 
   H2BUGF(infof(data_s, "data_source_read_callback: "
-               "returns %zu bytes stream %u\n",
+               "returns %zu bytes stream %u",
                nread, stream_id));
 
   return nread;
@@ -1136,34 +1171,34 @@
                           size_t len,
                           void *userp)
 {
-  struct connectdata *conn = (struct connectdata *)userp;
   (void)session;
-  infof(conn->data, "http2 error: %.*s\n", len, msg);
+  (void)msg;
+  (void)len;
+  (void)userp;
   return 0;
 }
 #endif
 
-static void populate_settings(struct connectdata *conn,
+static void populate_settings(struct Curl_easy *data,
                               struct http_conn *httpc)
 {
   nghttp2_settings_entry *iv = httpc->local_settings;
-  DEBUGASSERT(conn->data);
 
   iv[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
-  iv[0].value = Curl_multi_max_concurrent_streams(conn->data->multi);
+  iv[0].value = Curl_multi_max_concurrent_streams(data->multi);
 
   iv[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
   iv[1].value = HTTP2_HUGE_WINDOW_SIZE;
 
   iv[2].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
-  iv[2].value = conn->data->multi->push_cb != NULL;
+  iv[2].value = data->multi->push_cb != NULL;
 
   httpc->local_settings_num = 3;
 }
 
 void Curl_http2_done(struct Curl_easy *data, bool premature)
 {
-  struct HTTP *http = data->req.protop;
+  struct HTTP *http = data->req.p.http;
   struct http_conn *httpc = &data->conn->proto.httpc;
 
   /* there might be allocated resources done before this got the 'h2' pointer
@@ -1185,12 +1220,13 @@
 
   if(premature) {
     /* RST_STREAM */
+    set_transfer(httpc, data); /* set the transfer */
     if(!nghttp2_submit_rst_stream(httpc->h2, NGHTTP2_FLAG_NONE,
                                   http->stream_id, NGHTTP2_STREAM_CLOSED))
       (void)nghttp2_session_send(httpc->h2);
 
     if(http->stream_id == httpc->pause_stream_id) {
-      infof(data, "stopped the pause stream!\n");
+      infof(data, "stopped the pause stream!");
       httpc->pause_stream_id = 0;
     }
   }
@@ -1203,10 +1239,11 @@
     int rv = nghttp2_session_set_stream_user_data(httpc->h2,
                                                   http->stream_id, 0);
     if(rv) {
-      infof(data, "http/2: failed to clear user_data for stream %d!\n",
+      infof(data, "http/2: failed to clear user_data for stream %d!",
             http->stream_id);
       DEBUGASSERT(0);
     }
+    set_transfer(httpc, NULL);
     http->stream_id = 0;
   }
 }
@@ -1214,20 +1251,20 @@
 /*
  * Initialize nghttp2 for a Curl connection
  */
-static CURLcode http2_init(struct connectdata *conn)
+static CURLcode http2_init(struct Curl_easy *data, struct connectdata *conn)
 {
   if(!conn->proto.httpc.h2) {
     int rc;
     nghttp2_session_callbacks *callbacks;
 
     conn->proto.httpc.inbuf = malloc(H2_BUFSIZE);
-    if(conn->proto.httpc.inbuf == NULL)
+    if(!conn->proto.httpc.inbuf)
       return CURLE_OUT_OF_MEMORY;
 
     rc = nghttp2_session_callbacks_new(&callbacks);
 
     if(rc) {
-      failf(conn->data, "Couldn't initialize nghttp2 callbacks!");
+      failf(data, "Couldn't initialize nghttp2 callbacks!");
       return CURLE_OUT_OF_MEMORY; /* most likely at least */
     }
 
@@ -1256,7 +1293,7 @@
     nghttp2_session_callbacks_del(callbacks);
 
     if(rc) {
-      failf(conn->data, "Couldn't initialize nghttp2!");
+      failf(data, "Couldn't initialize nghttp2!");
       return CURLE_OUT_OF_MEMORY; /* most likely at least */
     }
   }
@@ -1267,30 +1304,31 @@
  * Append headers to ask for a HTTP1.1 to HTTP2 upgrade.
  */
 CURLcode Curl_http2_request_upgrade(struct dynbuf *req,
-                                    struct connectdata *conn)
+                                    struct Curl_easy *data)
 {
   CURLcode result;
   ssize_t binlen;
   char *base64;
   size_t blen;
-  struct SingleRequest *k = &conn->data->req;
+  struct connectdata *conn = data->conn;
+  struct SingleRequest *k = &data->req;
   uint8_t *binsettings = conn->proto.httpc.binsettings;
   struct http_conn *httpc = &conn->proto.httpc;
 
-  populate_settings(conn, httpc);
+  populate_settings(data, httpc);
 
   /* this returns number of bytes it wrote */
   binlen = nghttp2_pack_settings_payload(binsettings, H2_BINSETTINGS_LEN,
                                          httpc->local_settings,
                                          httpc->local_settings_num);
   if(binlen <= 0) {
-    failf(conn->data, "nghttp2 unexpectedly failed on pack_settings_payload");
+    failf(data, "nghttp2 unexpectedly failed on pack_settings_payload");
     Curl_dyn_free(req);
     return CURLE_FAILED_INIT;
   }
   conn->proto.httpc.binlen = binlen;
 
-  result = Curl_base64url_encode(conn->data, (const char *)binsettings, binlen,
+  result = Curl_base64url_encode(data, (const char *)binsettings, binlen,
                                  &base64, &blen);
   if(result) {
     Curl_dyn_free(req);
@@ -1324,23 +1362,23 @@
  * This function returns 0 if it succeeds, or -1 and error code will
  * be assigned to *err.
  */
-static int h2_process_pending_input(struct connectdata *conn,
+static int h2_process_pending_input(struct Curl_easy *data,
                                     struct http_conn *httpc,
                                     CURLcode *err)
 {
   ssize_t nread;
   char *inbuf;
   ssize_t rv;
-  struct Curl_easy *data = conn->data;
 
   nread = httpc->inbuflen - httpc->nread_inbuf;
   inbuf = httpc->inbuf + httpc->nread_inbuf;
 
+  set_transfer(httpc, data); /* set the transfer */
   rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread);
   if(rv < 0) {
     failf(data,
           "h2_process_pending_input: nghttp2_session_mem_recv() returned "
-          "%zd:%s\n", rv, nghttp2_strerror((int)rv));
+          "%zd:%s", rv, nghttp2_strerror((int)rv));
     *err = CURLE_RECV_ERROR;
     return -1;
   }
@@ -1348,7 +1386,7 @@
   if(nread == rv) {
     H2BUGF(infof(data,
                  "h2_process_pending_input: All data in connection buffer "
-                 "processed\n"));
+                 "processed"));
     httpc->inbuflen = 0;
     httpc->nread_inbuf = 0;
   }
@@ -1356,12 +1394,12 @@
     httpc->nread_inbuf += rv;
     H2BUGF(infof(data,
                  "h2_process_pending_input: %zu bytes left in connection "
-                 "buffer\n",
+                 "buffer",
                  httpc->inbuflen - httpc->nread_inbuf));
   }
 
   rv = h2_session_send(data, httpc->h2);
-  if(rv != 0) {
+  if(rv) {
     *err = CURLE_SEND_ERROR;
     return -1;
   }
@@ -1371,17 +1409,18 @@
        the connection may not be reused. This is set when a
        GOAWAY frame has been received or when the limit of stream
        identifiers has been reached. */
-    connclose(conn, "http/2: No new requests allowed");
+    connclose(data->conn, "http/2: No new requests allowed");
   }
 
   if(should_close_session(httpc)) {
+    struct HTTP *stream = data->req.p.http;
     H2BUGF(infof(data,
-                 "h2_process_pending_input: nothing to do in this session\n"));
-    if(httpc->error_code)
+                 "h2_process_pending_input: nothing to do in this session"));
+    if(stream->error)
       *err = CURLE_HTTP2;
     else {
       /* not an error per se, but should still close the connection */
-      connclose(conn, "GOAWAY received");
+      connclose(data->conn, "GOAWAY received");
       *err = CURLE_OK;
     }
     return -1;
@@ -1392,16 +1431,15 @@
 /*
  * Called from transfer.c:done_sending when we stop uploading.
  */
-CURLcode Curl_http2_done_sending(struct connectdata *conn)
+CURLcode Curl_http2_done_sending(struct Curl_easy *data,
+                                 struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
 
   if((conn->handler == &Curl_handler_http2_ssl) ||
      (conn->handler == &Curl_handler_http2)) {
     /* make sure this is only attempted for HTTP/2 transfers */
-
-    struct HTTP *stream = conn->data->req.protop;
-
+    struct HTTP *stream = data->req.p.http;
     struct http_conn *httpc = &conn->proto.httpc;
     nghttp2_session *h2 = httpc->h2;
 
@@ -1413,25 +1451,25 @@
       /* resume sending here to trigger the callback to get called again so
          that it can signal EOF to nghttp2 */
       (void)nghttp2_session_resume_data(h2, stream->stream_id);
-
-      (void)h2_process_pending_input(conn, httpc, &result);
+      (void)h2_process_pending_input(data, httpc, &result);
     }
 
     /* If nghttp2 still has pending frames unsent */
     if(nghttp2_session_want_write(h2)) {
-      struct Curl_easy *data = conn->data;
       struct SingleRequest *k = &data->req;
       int rv;
 
-      H2BUGF(infof(data, "HTTP/2 still wants to send data (easy %p)\n", data));
-
-      /* re-set KEEP_SEND to make sure we are called again */
-      k->keepon |= KEEP_SEND;
+      H2BUGF(infof(data, "HTTP/2 still wants to send data (easy %p)", data));
 
       /* and attempt to send the pending frames */
       rv = h2_session_send(data, h2);
-      if(rv != 0)
+      if(rv)
         result = CURLE_SEND_ERROR;
+
+      if(nghttp2_session_want_write(h2)) {
+         /* re-set KEEP_SEND to make sure we are called again */
+         k->keepon |= KEEP_SEND;
+      }
     }
   }
   return result;
@@ -1450,7 +1488,7 @@
   drained_transfer(data, httpc);
 
   if(httpc->pause_stream_id == 0) {
-    if(h2_process_pending_input(conn, httpc, err) != 0) {
+    if(h2_process_pending_input(data, httpc, err) != 0) {
       return -1;
     }
   }
@@ -1459,18 +1497,18 @@
 
   /* Reset to FALSE to prevent infinite loop in readwrite_data function. */
   stream->closed = FALSE;
-  if(httpc->error_code == NGHTTP2_REFUSED_STREAM) {
-    H2BUGF(infof(data, "REFUSED_STREAM (%d), try again on a new connection!\n",
+  if(stream->error == NGHTTP2_REFUSED_STREAM) {
+    H2BUGF(infof(data, "REFUSED_STREAM (%d), try again on a new connection!",
                  stream->stream_id));
     connclose(conn, "REFUSED_STREAM"); /* don't use this anymore */
     data->state.refused_stream = TRUE;
     *err = CURLE_RECV_ERROR; /* trigger Curl_retry_request() later */
     return -1;
   }
-  else if(httpc->error_code != NGHTTP2_NO_ERROR) {
+  else if(stream->error != NGHTTP2_NO_ERROR) {
     failf(data, "HTTP/2 stream %d was not closed cleanly: %s (err %u)",
-          stream->stream_id, nghttp2_http2_strerror(httpc->error_code),
-          httpc->error_code);
+          stream->stream_id, nghttp2_http2_strerror(stream->error),
+          stream->error);
     *err = CURLE_HTTP2_STREAM;
     return -1;
   }
@@ -1496,10 +1534,9 @@
         break;
       len = lf + 1 - trailp;
 
-      if(data->set.verbose)
-        Curl_debug(data, CURLINFO_HEADER_IN, trailp, len);
+      Curl_debug(data, CURLINFO_HEADER_IN, trailp, len);
       /* pass the trailers one by one to the callback */
-      result = Curl_client_write(conn, CLIENTWRITE_HEADER, trailp, len);
+      result = Curl_client_write(data, CLIENTWRITE_HEADER, trailp, len);
       if(result) {
         *err = result;
         return -1;
@@ -1510,7 +1547,7 @@
 
   stream->close_handled = TRUE;
 
-  H2BUGF(infof(data, "http2_recv returns 0, http2_handle_stream_close\n"));
+  H2BUGF(infof(data, "http2_recv returns 0, http2_handle_stream_close"));
   return 0;
 }
 
@@ -1524,7 +1561,7 @@
                         nghttp2_priority_spec *pri_spec)
 {
   struct HTTP *depstream = (data->set.stream_depends_on?
-                            data->set.stream_depends_on->req.protop:NULL);
+                            data->set.stream_depends_on->req.p.http:NULL);
   int32_t depstream_id = depstream? depstream->stream_id:0;
   nghttp2_priority_spec_init(pri_spec, depstream_id, data->set.stream_weight,
                              data->set.stream_depends_e);
@@ -1541,7 +1578,9 @@
 static int h2_session_send(struct Curl_easy *data,
                            nghttp2_session *h2)
 {
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
+  struct http_conn *httpc = &data->conn->proto.httpc;
+  set_transfer(httpc, data);
   if((data->set.stream_weight != data->state.stream_weight) ||
      (data->set.stream_depends_e != data->state.stream_depends_e) ||
      (data->set.stream_depends_on != data->state.stream_depends_on) ) {
@@ -1551,7 +1590,7 @@
 
     h2_pri_spec(data, &pri_spec);
 
-    H2BUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)\n",
+    H2BUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)",
                  stream->stream_id, data));
     DEBUGASSERT(stream->stream_id != -1);
     rv = nghttp2_submit_priority(h2, NGHTTP2_FLAG_NONE, stream->stream_id,
@@ -1563,19 +1602,19 @@
   return nghttp2_session_send(h2);
 }
 
-static ssize_t http2_recv(struct connectdata *conn, int sockindex,
+static ssize_t http2_recv(struct Curl_easy *data, int sockindex,
                           char *mem, size_t len, CURLcode *err)
 {
   ssize_t nread;
+  struct connectdata *conn = data->conn;
   struct http_conn *httpc = &conn->proto.httpc;
-  struct Curl_easy *data = conn->data;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
 
   (void)sockindex; /* we always do HTTP2 on sockindex 0 */
 
   if(should_close_session(httpc)) {
     H2BUGF(infof(data,
-                 "http2_recv: nothing to do in this session\n"));
+                 "http2_recv: nothing to do in this session"));
     if(conn->bits.close) {
       /* already marked for closure, return OK and we're done */
       *err = CURLE_OK;
@@ -1585,6 +1624,10 @@
     return -1;
   }
 
+  if(stream->closed)
+    /* closed overrides paused */
+    return http2_handle_stream_close(conn, data, stream, err);
+
   /* Nullify here because we call nghttp2_session_send() and they
      might refer to the old buffer. */
   stream->upload_mem = NULL;
@@ -1605,12 +1648,12 @@
            stream->nread_header_recvbuf, ncopy);
     stream->nread_header_recvbuf += ncopy;
 
-    H2BUGF(infof(data, "http2_recv: Got %d bytes from header_recvbuf\n",
+    H2BUGF(infof(data, "http2_recv: Got %d bytes from header_recvbuf",
                  (int)ncopy));
     return ncopy;
   }
 
-  H2BUGF(infof(data, "http2_recv: easy %p (stream %u) win %u/%u\n",
+  H2BUGF(infof(data, "http2_recv: easy %p (stream %u) win %u/%u",
                data, stream->stream_id,
                nghttp2_session_get_local_window_size(httpc->h2),
                nghttp2_session_get_stream_local_window_size(httpc->h2,
@@ -1618,7 +1661,7 @@
            ));
 
   if((data->state.drain) && stream->memlen) {
-    H2BUGF(infof(data, "http2_recv: DRAIN %zu bytes stream %u!! (%p => %p)\n",
+    H2BUGF(infof(data, "http2_recv: DRAIN %zu bytes stream %u!! (%p => %p)",
                  stream->memlen, stream->stream_id,
                  stream->mem, mem));
     if(mem != stream->mem) {
@@ -1632,7 +1675,7 @@
       /* We have paused nghttp2, but we have no pause data (see
          on_data_chunk_recv). */
       httpc->pause_stream_id = 0;
-      if(h2_process_pending_input(conn, httpc, err) != 0) {
+      if(h2_process_pending_input(data, httpc, err) != 0) {
         return -1;
       }
     }
@@ -1646,7 +1689,7 @@
     stream->pauselen -= nread;
 
     if(stream->pauselen == 0) {
-      H2BUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id));
+      H2BUGF(infof(data, "Unpaused by stream %u", stream->stream_id));
       DEBUGASSERT(httpc->pause_stream_id == stream->stream_id);
       httpc->pause_stream_id = 0;
 
@@ -1660,11 +1703,11 @@
          frames, then we have to call it again with 0-length data.
          Without this, on_stream_close callback will not be called,
          and stream could be hanged. */
-      if(h2_process_pending_input(conn, httpc, err) != 0) {
+      if(h2_process_pending_input(data, httpc, err) != 0) {
         return -1;
       }
     }
-    H2BUGF(infof(data, "http2_recv: returns unpaused %zd bytes on stream %u\n",
+    H2BUGF(infof(data, "http2_recv: returns unpaused %zd bytes on stream %u",
                  nread, stream->stream_id));
     return nread;
   }
@@ -1680,7 +1723,7 @@
     if(stream->closed)
       /* closed overrides paused */
       return 0;
-    H2BUGF(infof(data, "stream %x is paused, pause id: %x\n",
+    H2BUGF(infof(data, "stream %x is paused, pause id: %x",
                  stream->stream_id, httpc->pause_stream_id));
     *err = CURLE_AGAIN;
     return -1;
@@ -1694,7 +1737,7 @@
 
     if(httpc->inbuflen == 0) {
       nread = ((Curl_recv *)httpc->recv_underlying)(
-          conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, err);
+        data, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, err);
 
       if(nread == -1) {
         if(*err != CURLE_AGAIN)
@@ -1707,12 +1750,23 @@
       }
 
       if(nread == 0) {
-        H2BUGF(infof(data, "end of stream\n"));
+        if(!stream->closed) {
+          /* This will happen when the server or proxy server is SIGKILLed
+             during data transfer. We should emit an error since our data
+             received may be incomplete. */
+          failf(data, "HTTP/2 stream %d was not closed cleanly before"
+                " end of the underlying stream",
+                stream->stream_id);
+          *err = CURLE_HTTP2_STREAM;
+          return -1;
+        }
+
+        H2BUGF(infof(data, "end of stream"));
         *err = CURLE_OK;
         return 0;
       }
 
-      H2BUGF(infof(data, "nread=%zd\n", nread));
+      H2BUGF(infof(data, "nread=%zd", nread));
 
       httpc->inbuflen = nread;
 
@@ -1721,23 +1775,23 @@
     else {
       nread = httpc->inbuflen - httpc->nread_inbuf;
       (void)nread;  /* silence warning, used in debug */
-      H2BUGF(infof(data, "Use data left in connection buffer, nread=%zd\n",
+      H2BUGF(infof(data, "Use data left in connection buffer, nread=%zd",
                    nread));
     }
 
-    if(h2_process_pending_input(conn, httpc, err) != 0)
+    if(h2_process_pending_input(data, httpc, err))
       return -1;
   }
   if(stream->memlen) {
     ssize_t retlen = stream->memlen;
-    H2BUGF(infof(data, "http2_recv: returns %zd for stream %u\n",
+    H2BUGF(infof(data, "http2_recv: returns %zd for stream %u",
                  retlen, stream->stream_id));
     stream->memlen = 0;
 
     if(httpc->pause_stream_id == stream->stream_id) {
       /* data for this stream is returned now, but this stream caused a pause
          already so we need it called again asap */
-      H2BUGF(infof(data, "Data returned for PAUSED stream %u\n",
+      H2BUGF(infof(data, "Data returned for PAUSED stream %u",
                    stream->stream_id));
     }
     else if(!stream->closed) {
@@ -1750,9 +1804,9 @@
     return retlen;
   }
   if(stream->closed)
-    return 0;
+    return http2_handle_stream_close(conn, data, stream, err);
   *err = CURLE_AGAIN;
-  H2BUGF(infof(data, "http2_recv returns AGAIN for stream %u\n",
+  H2BUGF(infof(data, "http2_recv returns AGAIN for stream %u",
                stream->stream_id));
   return -1;
 }
@@ -1831,7 +1885,7 @@
   }
 }
 
-static ssize_t http2_send(struct connectdata *conn, int sockindex,
+static ssize_t http2_send(struct Curl_easy *data, int sockindex,
                           const void *mem, size_t len, CURLcode *err)
 {
   /*
@@ -1840,8 +1894,9 @@
    * request.
    */
   int rv;
+  struct connectdata *conn = data->conn;
   struct http_conn *httpc = &conn->proto.httpc;
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   nghttp2_nv *nva = NULL;
   size_t nheader;
   size_t i;
@@ -1855,16 +1910,16 @@
 
   (void)sockindex;
 
-  H2BUGF(infof(conn->data, "http2_send len=%zu\n", len));
+  H2BUGF(infof(data, "http2_send len=%zu", len));
 
   if(stream->stream_id != -1) {
     if(stream->close_handled) {
-      infof(conn->data, "stream %d closed\n", stream->stream_id);
+      infof(data, "stream %d closed", stream->stream_id);
       *err = CURLE_HTTP2_STREAM;
       return -1;
     }
     else if(stream->closed) {
-      return http2_handle_stream_close(conn, conn->data, stream, err);
+      return http2_handle_stream_close(conn, data, stream, err);
     }
     /* If stream_id != -1, we have dispatched request HEADERS, and now
        are going to send or sending request body in DATA frame */
@@ -1875,7 +1930,7 @@
       *err = CURLE_SEND_ERROR;
       return -1;
     }
-    rv = h2_session_send(conn->data, h2);
+    rv = h2_session_send(data, h2);
     if(nghttp2_is_fatal(rv)) {
       *err = CURLE_SEND_ERROR;
       return -1;
@@ -1888,7 +1943,7 @@
     stream->upload_len = 0;
 
     if(should_close_session(httpc)) {
-      H2BUGF(infof(conn->data, "http2_send: nothing to do in this session\n"));
+      H2BUGF(infof(data, "http2_send: nothing to do in this session"));
       *err = CURLE_HTTP2;
       return -1;
     }
@@ -1901,7 +1956,7 @@
       nghttp2_session_resume_data(h2, stream->stream_id);
     }
 
-    H2BUGF(infof(conn->data, "http2_send returns %zu for stream %u\n", len,
+    H2BUGF(infof(data, "http2_send returns %zu for stream %u", len,
                  stream->stream_id));
     return len;
   }
@@ -1924,7 +1979,7 @@
      more space. */
   nheader += 1;
   nva = malloc(sizeof(nghttp2_nv) * nheader);
-  if(nva == NULL) {
+  if(!nva) {
     *err = CURLE_OUT_OF_MEMORY;
     return -1;
   }
@@ -1945,7 +2000,7 @@
   nva[0].valuelen = (size_t)(end - hdbuf);
   nva[0].flags = NGHTTP2_NV_FLAG_NONE;
   if(HEADER_OVERFLOW(nva[0])) {
-    failf(conn->data, "Failed sending HTTP request: Header overflow");
+    failf(data, "Failed sending HTTP request: Header overflow");
     goto fail;
   }
 
@@ -1967,7 +2022,7 @@
   nva[1].valuelen = (size_t)(end - hdbuf);
   nva[1].flags = NGHTTP2_NV_FLAG_NONE;
   if(HEADER_OVERFLOW(nva[1])) {
-    failf(conn->data, "Failed sending HTTP request: Header overflow");
+    failf(data, "Failed sending HTTP request: Header overflow");
     goto fail;
   }
 
@@ -1980,7 +2035,7 @@
   nva[2].valuelen = strlen((char *)nva[2].value);
   nva[2].flags = NGHTTP2_NV_FLAG_NONE;
   if(HEADER_OVERFLOW(nva[2])) {
-    failf(conn->data, "Failed sending HTTP request: Header overflow");
+    failf(data, "Failed sending HTTP request: Header overflow");
     goto fail;
   }
 
@@ -2040,14 +2095,14 @@
 
     nva[i].flags = NGHTTP2_NV_FLAG_NONE;
     if(HEADER_OVERFLOW(nva[i])) {
-      failf(conn->data, "Failed sending HTTP request: Header overflow");
+      failf(data, "Failed sending HTTP request: Header overflow");
       goto fail;
     }
     ++i;
   }
 
   /* :authority must come before non-pseudo header fields */
-  if(authority_idx != 0 && authority_idx != AUTHORITY_DST_IDX) {
+  if(authority_idx && authority_idx != AUTHORITY_DST_IDX) {
     nghttp2_nv authority = nva[authority_idx];
     for(i = authority_idx; i > AUTHORITY_DST_IDX; --i) {
       nva[i] = nva[i - 1];
@@ -2064,30 +2119,30 @@
     for(i = 0; i < nheader; ++i) {
       acc += nva[i].namelen + nva[i].valuelen;
 
-      H2BUGF(infof(conn->data, "h2 header: %.*s:%.*s\n",
+      H2BUGF(infof(data, "h2 header: %.*s:%.*s",
                    nva[i].namelen, nva[i].name,
                    nva[i].valuelen, nva[i].value));
     }
 
     if(acc > MAX_ACC) {
-      infof(conn->data, "http2_send: Warning: The cumulative length of all "
-            "headers exceeds %zu bytes and that could cause the "
-            "stream to be rejected.\n", MAX_ACC);
+      infof(data, "http2_send: Warning: The cumulative length of all "
+            "headers exceeds %d bytes and that could cause the "
+            "stream to be rejected.", MAX_ACC);
     }
   }
 
-  h2_pri_spec(conn->data, &pri_spec);
+  h2_pri_spec(data, &pri_spec);
 
-  H2BUGF(infof(conn->data, "http2_send request allowed %d (easy handle %p)\n",
-         nghttp2_session_check_request_allowed(h2), (void *)conn->data));
+  H2BUGF(infof(data, "http2_send request allowed %d (easy handle %p)",
+               nghttp2_session_check_request_allowed(h2), (void *)data));
 
-  switch(conn->data->state.httpreq) {
+  switch(data->state.httpreq) {
   case HTTPREQ_POST:
   case HTTPREQ_POST_FORM:
   case HTTPREQ_POST_MIME:
   case HTTPREQ_PUT:
-    if(conn->data->state.infilesize != -1)
-      stream->upload_left = conn->data->state.infilesize;
+    if(data->state.infilesize != -1)
+      stream->upload_left = data->state.infilesize;
     else
       /* data sending without specifying the data amount up front */
       stream->upload_left = -1; /* unknown, but not zero */
@@ -2095,33 +2150,31 @@
     data_prd.read_callback = data_source_read_callback;
     data_prd.source.ptr = NULL;
     stream_id = nghttp2_submit_request(h2, &pri_spec, nva, nheader,
-                                       &data_prd, conn->data);
+                                       &data_prd, data);
     break;
   default:
     stream_id = nghttp2_submit_request(h2, &pri_spec, nva, nheader,
-                                       NULL, conn->data);
+                                       NULL, data);
   }
 
   Curl_safefree(nva);
 
   if(stream_id < 0) {
-    H2BUGF(infof(conn->data,
-                 "http2_send() nghttp2_submit_request error (%s)%d\n",
+    H2BUGF(infof(data,
+                 "http2_send() nghttp2_submit_request error (%s)%d",
                  nghttp2_strerror(stream_id), stream_id));
     *err = CURLE_SEND_ERROR;
     return -1;
   }
 
-  infof(conn->data, "Using Stream ID: %x (easy handle %p)\n",
-        stream_id, (void *)conn->data);
+  infof(data, "Using Stream ID: %x (easy handle %p)",
+        stream_id, (void *)data);
   stream->stream_id = stream_id;
 
-  /* this does not call h2_session_send() since there can not have been any
-   * priority update since the nghttp2_submit_request() call above */
-  rv = nghttp2_session_send(h2);
-  if(rv != 0) {
-    H2BUGF(infof(conn->data,
-                 "http2_send() nghttp2_session_send error (%s)%d\n",
+  rv = h2_session_send(data, h2);
+  if(rv) {
+    H2BUGF(infof(data,
+                 "http2_send() nghttp2_session_send error (%s)%d",
                  nghttp2_strerror(rv), rv));
 
     *err = CURLE_SEND_ERROR;
@@ -2129,7 +2182,7 @@
   }
 
   if(should_close_session(httpc)) {
-    H2BUGF(infof(conn->data, "http2_send: nothing to do in this session\n"));
+    H2BUGF(infof(data, "http2_send: nothing to do in this session"));
     *err = CURLE_HTTP2;
     return -1;
   }
@@ -2151,13 +2204,14 @@
   return -1;
 }
 
-CURLcode Curl_http2_setup(struct connectdata *conn)
+CURLcode Curl_http2_setup(struct Curl_easy *data,
+                          struct connectdata *conn)
 {
   CURLcode result;
   struct http_conn *httpc = &conn->proto.httpc;
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
 
-  DEBUGASSERT(conn->data->state.buffer);
+  DEBUGASSERT(data->state.buffer);
 
   stream->stream_id = -1;
 
@@ -2173,18 +2227,18 @@
   else
     conn->handler = &Curl_handler_http2;
 
-  result = http2_init(conn);
+  result = http2_init(data, conn);
   if(result) {
     Curl_dyn_free(&stream->header_recvbuf);
     return result;
   }
 
-  infof(conn->data, "Using HTTP2, server supports multi-use\n");
+  infof(data, "Using HTTP2, server supports multiplexing");
   stream->upload_left = 0;
   stream->upload_mem = NULL;
   stream->upload_len = 0;
-  stream->mem = conn->data->state.buffer;
-  stream->len = conn->data->set.buffer_size;
+  stream->mem = data->state.buffer;
+  stream->len = data->set.buffer_size;
 
   httpc->inbuflen = 0;
   httpc->nread_inbuf = 0;
@@ -2196,22 +2250,22 @@
   conn->httpversion = 20;
   conn->bundle->multiuse = BUNDLE_MULTIPLEX;
 
-  infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n");
-  multi_connchanged(conn->data->multi);
+  infof(data, "Connection state changed (HTTP/2 confirmed)");
+  multi_connchanged(data->multi);
 
   return CURLE_OK;
 }
 
-CURLcode Curl_http2_switched(struct connectdata *conn,
+CURLcode Curl_http2_switched(struct Curl_easy *data,
                              const char *mem, size_t nread)
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
   struct http_conn *httpc = &conn->proto.httpc;
   int rv;
-  struct Curl_easy *data = conn->data;
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
 
-  result = Curl_http2_setup(conn);
+  result = Curl_http2_setup(data, conn);
   if(result)
     return result;
 
@@ -2220,14 +2274,14 @@
   conn->recv[FIRSTSOCKET] = http2_recv;
   conn->send[FIRSTSOCKET] = http2_send;
 
-  if(conn->data->req.upgr101 == UPGR101_RECEIVED) {
+  if(data->req.upgr101 == UPGR101_RECEIVED) {
     /* stream 1 is opened implicitly on upgrade */
     stream->stream_id = 1;
     /* queue SETTINGS frame (again) */
-    rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings,
-                                 httpc->binlen, NULL);
-    if(rv != 0) {
-      failf(data, "nghttp2_session_upgrade() failed: %s(%d)",
+    rv = nghttp2_session_upgrade2(httpc->h2, httpc->binsettings, httpc->binlen,
+                                  data->state.httpreq == HTTPREQ_HEAD, NULL);
+    if(rv) {
+      failf(data, "nghttp2_session_upgrade2() failed: %s(%d)",
             nghttp2_strerror(rv), rv);
       return CURLE_HTTP2;
     }
@@ -2236,20 +2290,20 @@
                                               stream->stream_id,
                                               data);
     if(rv) {
-      infof(data, "http/2: failed to set user_data for stream %d!\n",
+      infof(data, "http/2: failed to set user_data for stream %d!",
             stream->stream_id);
       DEBUGASSERT(0);
     }
   }
   else {
-    populate_settings(conn, httpc);
+    populate_settings(data, httpc);
 
     /* stream ID is unknown at this point */
     stream->stream_id = -1;
     rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE,
                                  httpc->local_settings,
                                  httpc->local_settings_num);
-    if(rv != 0) {
+    if(rv) {
       failf(data, "nghttp2_submit_settings() failed: %s(%d)",
             nghttp2_strerror(rv), rv);
       return CURLE_HTTP2;
@@ -2258,7 +2312,7 @@
 
   rv = nghttp2_session_set_local_window_size(httpc->h2, NGHTTP2_FLAG_NONE, 0,
                                              HTTP2_HUGE_WINDOW_SIZE);
-  if(rv != 0) {
+  if(rv) {
     failf(data, "nghttp2_session_set_local_window_size() failed: %s(%d)",
           nghttp2_strerror(rv), rv);
     return CURLE_HTTP2;
@@ -2270,13 +2324,13 @@
      data into stream->mem, overwriting data already there. */
   if(H2_BUFSIZE < nread) {
     failf(data, "connection buffer size is too small to store data following "
-                "HTTP Upgrade response header: buflen=%zu, datalen=%zu",
+          "HTTP Upgrade response header: buflen=%d, datalen=%zu",
           H2_BUFSIZE, nread);
     return CURLE_HTTP2;
   }
 
-  infof(conn->data, "Copying HTTP/2 data in stream buffer to connection buffer"
-                    " after upgrade: len=%zu\n",
+  infof(data, "Copying HTTP/2 data in stream buffer to connection buffer"
+        " after upgrade: len=%zu",
         nread);
 
   if(nread)
@@ -2286,8 +2340,15 @@
 
   DEBUGASSERT(httpc->nread_inbuf == 0);
 
-  if(-1 == h2_process_pending_input(conn, httpc, &result))
-    return CURLE_HTTP2;
+  /* Good enough to call it an end once the remaining payload is copied to the
+   * connection buffer.
+   * Some servers (e.g. nghttpx v1.43.0) may fulfill stream 1 immediately
+   * following the protocol switch other than waiting for the client-side
+   * connection preface. If h2_process_pending_input is invoked here to parse
+   * the remaining payload, stream 1 would be marked as closed too early and
+   * thus ignored in http2_recv (following 252790c53).
+   * The logic in lib/http.c and lib/transfer.c guarantees a following
+   * http2_recv would be invoked very soon. */
 
   return CURLE_OK;
 }
@@ -2297,11 +2358,12 @@
   DEBUGASSERT(data);
   DEBUGASSERT(data->conn);
   /* if it isn't HTTP/2, we're done */
-  if(!data->conn->proto.httpc.h2)
+  if(!(data->conn->handler->protocol & PROTO_FAMILY_HTTP) ||
+     !data->conn->proto.httpc.h2)
     return CURLE_OK;
 #ifdef NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE
   else {
-    struct HTTP *stream = data->req.protop;
+    struct HTTP *stream = data->req.p.http;
     struct http_conn *httpc = &data->conn->proto.httpc;
     uint32_t window = !pause * HTTP2_HUGE_WINDOW_SIZE;
     int rv = nghttp2_session_set_local_window_size(httpc->h2,
@@ -2319,7 +2381,7 @@
     if(rv)
       return CURLE_SEND_ERROR;
 
-    DEBUGF(infof(data, "Set HTTP/2 window size to %u for stream %u\n",
+    DEBUGF(infof(data, "Set HTTP/2 window size to %u for stream %u",
                  window, stream->stream_id));
 
 #ifdef DEBUGBUILD
@@ -2328,7 +2390,7 @@
       uint32_t window2 =
         nghttp2_session_get_stream_local_window_size(httpc->h2,
                                                      stream->stream_id);
-      DEBUGF(infof(data, "HTTP/2 window size is now %u for stream %u\n",
+      DEBUGF(infof(data, "HTTP/2 window size is now %u for stream %u",
                    window2, stream->stream_id));
     }
 #endif
@@ -2421,10 +2483,10 @@
 
 /* Only call this function for a transfer that already got a HTTP/2
    CURLE_HTTP2_STREAM error! */
-bool Curl_h2_http_1_1_error(struct connectdata *conn)
+bool Curl_h2_http_1_1_error(struct Curl_easy *data)
 {
-  struct http_conn *httpc = &conn->proto.httpc;
-  return (httpc->error_code == NGHTTP2_HTTP_1_1_REQUIRED);
+  struct HTTP *stream = data->req.p.http;
+  return (stream->error == NGHTTP2_HTTP_1_1_REQUIRED);
 }
 
 #else /* !USE_NGHTTP2 */
diff --git a/lib/http2.h b/lib/http2.h
index e82b212..d6986d9 100644
--- a/lib/http2.h
+++ b/lib/http2.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -29,13 +29,12 @@
 
 /* value for MAX_CONCURRENT_STREAMS we use until we get an updated setting
    from the peer */
-#define DEFAULT_MAX_CONCURRENT_STREAMS 13
+#define DEFAULT_MAX_CONCURRENT_STREAMS 100
 
 /*
- * Store nghttp2 version info in this buffer, Prefix with a space.  Return
- * total length written.
+ * Store nghttp2 version info in this buffer.
  */
-int Curl_http2_ver(char *p, size_t len);
+void Curl_http2_ver(char *p, size_t len);
 
 const char *Curl_http2_strerror(uint32_t err);
 
@@ -43,15 +42,16 @@
 void Curl_http2_init_state(struct UrlState *state);
 void Curl_http2_init_userset(struct UserDefined *set);
 CURLcode Curl_http2_request_upgrade(struct dynbuf *req,
-                                    struct connectdata *conn);
-CURLcode Curl_http2_setup(struct connectdata *conn);
-CURLcode Curl_http2_switched(struct connectdata *conn,
-                             const char *data, size_t nread);
+                                    struct Curl_easy *data);
+CURLcode Curl_http2_setup(struct Curl_easy *data, struct connectdata *conn);
+CURLcode Curl_http2_switched(struct Curl_easy *data,
+                             const char *ptr, size_t nread);
 /* called from http_setup_conn */
 void Curl_http2_setup_conn(struct connectdata *conn);
 void Curl_http2_setup_req(struct Curl_easy *data);
 void Curl_http2_done(struct Curl_easy *data, bool premature);
-CURLcode Curl_http2_done_sending(struct connectdata *conn);
+CURLcode Curl_http2_done_sending(struct Curl_easy *data,
+                                 struct connectdata *conn);
 CURLcode Curl_http2_add_child(struct Curl_easy *parent,
                               struct Curl_easy *child,
                               bool exclusive);
@@ -61,17 +61,17 @@
 CURLcode Curl_http2_stream_pause(struct Curl_easy *data, bool pause);
 
 /* returns true if the HTTP/2 stream error was HTTP_1_1_REQUIRED */
-bool Curl_h2_http_1_1_error(struct connectdata *conn);
+bool Curl_h2_http_1_1_error(struct Curl_easy *data);
 #else /* USE_NGHTTP2 */
 #define Curl_http2_request_upgrade(x,y) CURLE_UNSUPPORTED_PROTOCOL
-#define Curl_http2_setup(x) CURLE_UNSUPPORTED_PROTOCOL
+#define Curl_http2_setup(x,y) CURLE_UNSUPPORTED_PROTOCOL
 #define Curl_http2_switched(x,y,z) CURLE_UNSUPPORTED_PROTOCOL
 #define Curl_http2_setup_conn(x) Curl_nop_stmt
 #define Curl_http2_setup_req(x)
 #define Curl_http2_init_state(x)
 #define Curl_http2_init_userset(x)
 #define Curl_http2_done(x,y)
-#define Curl_http2_done_sending(x)
+#define Curl_http2_done_sending(x,y)
 #define Curl_http2_add_child(x, y, z)
 #define Curl_http2_remove_child(x, y)
 #define Curl_http2_cleanup_dependencies(x)
diff --git a/lib/http_aws_sigv4.c b/lib/http_aws_sigv4.c
new file mode 100644
index 0000000..02663ab
--- /dev/null
+++ b/lib/http_aws_sigv4.c
@@ -0,0 +1,394 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#include "curl_setup.h"
+
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
+
+#include "urldata.h"
+#include "strcase.h"
+#include "strdup.h"
+#include "vauth/vauth.h"
+#include "vauth/digest.h"
+#include "http_aws_sigv4.h"
+#include "curl_sha256.h"
+#include "transfer.h"
+
+#include "strcase.h"
+#include "parsedate.h"
+#include "sendf.h"
+
+#include <time.h>
+
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
+#include "curl_memory.h"
+#include "memdebug.h"
+
+#define HMAC_SHA256(k, kl, d, dl, o)        \
+  do {                                      \
+    ret = Curl_hmacit(Curl_HMAC_SHA256,     \
+                      (unsigned char *)k,   \
+                      (unsigned int)kl,     \
+                      (unsigned char *)d,   \
+                      (unsigned int)dl, o); \
+    if(ret != CURLE_OK) {                   \
+      goto fail;                            \
+    }                                       \
+  } while(0)
+
+static void sha256_to_hex(char *dst, unsigned char *sha, size_t dst_l)
+{
+  int i;
+
+  DEBUGASSERT(dst_l >= 65);
+  for(i = 0; i < 32; ++i) {
+    curl_msnprintf(dst + (i * 2), dst_l - (i * 2), "%02x", sha[i]);
+  }
+}
+
+CURLcode Curl_output_aws_sigv4(struct Curl_easy *data, bool proxy)
+{
+  CURLcode ret = CURLE_OUT_OF_MEMORY;
+  struct connectdata *conn = data->conn;
+  size_t len;
+  const char *tmp0;
+  const char *tmp1;
+  char *provider0_low = NULL;
+  char *provider0_up = NULL;
+  char *provider1_low = NULL;
+  char *provider1_mid = NULL;
+  char *region = NULL;
+  char *service = NULL;
+  const char *hostname = conn->host.name;
+#ifdef DEBUGBUILD
+  char *force_timestamp;
+#endif
+  time_t clock;
+  struct tm tm;
+  char timestamp[17];
+  char date[9];
+  const char *content_type = Curl_checkheaders(data, "Content-Type");
+  char *canonical_headers = NULL;
+  char *signed_headers = NULL;
+  Curl_HttpReq httpreq;
+  const char *method;
+  const char *post_data = data->set.postfields ? data->set.postfields : "";
+  unsigned char sha_hash[32];
+  char sha_hex[65];
+  char *canonical_request = NULL;
+  char *request_type = NULL;
+  char *credential_scope = NULL;
+  char *str_to_sign = NULL;
+  const char *user = data->state.aptr.user ? data->state.aptr.user : "";
+  const char *passwd = data->state.aptr.passwd ? data->state.aptr.passwd : "";
+  char *secret = NULL;
+  unsigned char tmp_sign0[32] = {0};
+  unsigned char tmp_sign1[32] = {0};
+  char *auth_headers = NULL;
+
+  DEBUGASSERT(!proxy);
+  (void)proxy;
+
+  if(Curl_checkheaders(data, "Authorization")) {
+    /* Authorization already present, Bailing out */
+    return CURLE_OK;
+  }
+
+  /*
+   * Parameters parsing
+   * Google and Outscale use the same OSC or GOOG,
+   * but Amazon uses AWS and AMZ for header arguments.
+   * AWS is the default because most of non-amazon providers
+   * are still using aws:amz as a prefix.
+   */
+  tmp0 = data->set.str[STRING_AWS_SIGV4] ?
+    data->set.str[STRING_AWS_SIGV4] : "aws:amz";
+  tmp1 = strchr(tmp0, ':');
+  len = tmp1 ? (size_t)(tmp1 - tmp0) : strlen(tmp0);
+  if(len < 1) {
+    infof(data, "first provider can't be empty");
+    ret = CURLE_BAD_FUNCTION_ARGUMENT;
+    goto fail;
+  }
+  provider0_low = malloc(len + 1);
+  provider0_up = malloc(len + 1);
+  if(!provider0_low || !provider0_up) {
+    goto fail;
+  }
+  Curl_strntolower(provider0_low, tmp0, len);
+  provider0_low[len] = '\0';
+  Curl_strntoupper(provider0_up, tmp0, len);
+  provider0_up[len] = '\0';
+
+  if(tmp1) {
+    tmp0 = tmp1 + 1;
+    tmp1 = strchr(tmp0, ':');
+    len = tmp1 ? (size_t)(tmp1 - tmp0) : strlen(tmp0);
+    if(len < 1) {
+      infof(data, "second provider can't be empty");
+      ret = CURLE_BAD_FUNCTION_ARGUMENT;
+      goto fail;
+    }
+    provider1_low = malloc(len + 1);
+    provider1_mid = malloc(len + 1);
+    if(!provider1_low || !provider1_mid) {
+      goto fail;
+    }
+    Curl_strntolower(provider1_low, tmp0, len);
+    provider1_low[len] = '\0';
+    Curl_strntolower(provider1_mid, tmp0, len);
+    provider1_mid[0] = Curl_raw_toupper(provider1_mid[0]);
+    provider1_mid[len] = '\0';
+
+    if(tmp1) {
+      tmp0 = tmp1 + 1;
+      tmp1 = strchr(tmp0, ':');
+      len = tmp1 ? (size_t)(tmp1 - tmp0) : strlen(tmp0);
+      if(len < 1) {
+        infof(data, "region can't be empty");
+        ret = CURLE_BAD_FUNCTION_ARGUMENT;
+        goto fail;
+      }
+      region = Curl_memdup(tmp0, len + 1);
+      if(!region) {
+        goto fail;
+      }
+      region[len] = '\0';
+
+      if(tmp1) {
+        tmp0 = tmp1 + 1;
+        service = strdup(tmp0);
+        if(!service) {
+          goto fail;
+        }
+        if(strlen(service) < 1) {
+          infof(data, "service can't be empty");
+          ret = CURLE_BAD_FUNCTION_ARGUMENT;
+          goto fail;
+        }
+      }
+    }
+  }
+  else {
+    provider1_low = Curl_memdup(provider0_low, len + 1);
+    provider1_mid = Curl_memdup(provider0_low, len + 1);
+    if(!provider1_low || !provider1_mid) {
+      goto fail;
+    }
+    provider1_mid[0] = Curl_raw_toupper(provider1_mid[0]);
+  }
+
+  if(!service) {
+    tmp0 = hostname;
+    tmp1 = strchr(tmp0, '.');
+    len = tmp1 - tmp0;
+    if(!tmp1 || len < 1) {
+      infof(data, "service missing in parameters or hostname");
+      ret = CURLE_URL_MALFORMAT;
+      goto fail;
+    }
+    service = Curl_memdup(tmp0, len + 1);
+    if(!service) {
+      goto fail;
+    }
+    service[len] = '\0';
+
+    if(!region) {
+      tmp0 = tmp1 + 1;
+      tmp1 = strchr(tmp0, '.');
+      len = tmp1 - tmp0;
+      if(!tmp1 || len < 1) {
+        infof(data, "region missing in parameters or hostname");
+        ret = CURLE_URL_MALFORMAT;
+        goto fail;
+      }
+      region = Curl_memdup(tmp0, len + 1);
+      if(!region) {
+        goto fail;
+      }
+      region[len] = '\0';
+    }
+  }
+
+#ifdef DEBUGBUILD
+  force_timestamp = getenv("CURL_FORCETIME");
+  if(force_timestamp)
+    clock = 0;
+  else
+    time(&clock);
+#else
+  time(&clock);
+#endif
+  ret = Curl_gmtime(clock, &tm);
+  if(ret != CURLE_OK) {
+    goto fail;
+  }
+  if(!strftime(timestamp, sizeof(timestamp), "%Y%m%dT%H%M%SZ", &tm)) {
+    goto fail;
+  }
+  memcpy(date, timestamp, sizeof(date));
+  date[sizeof(date) - 1] = 0;
+
+  if(content_type) {
+    content_type = strchr(content_type, ':');
+    if(!content_type) {
+      ret = CURLE_FAILED_INIT;
+      goto fail;
+    }
+    content_type++;
+    /* Skip whitespace now */
+    while(*content_type == ' ' || *content_type == '\t')
+      ++content_type;
+
+    canonical_headers = curl_maprintf("content-type:%s\n"
+                                      "host:%s\n"
+                                      "x-%s-date:%s\n",
+                                      content_type,
+                                      hostname,
+                                      provider1_low, timestamp);
+    signed_headers = curl_maprintf("content-type;host;x-%s-date",
+                                   provider1_low);
+  }
+  else {
+    canonical_headers = curl_maprintf("host:%s\n"
+                                      "x-%s-date:%s\n",
+                                      hostname,
+                                      provider1_low, timestamp);
+    signed_headers = curl_maprintf("host;x-%s-date", provider1_low);
+  }
+
+  if(!canonical_headers || !signed_headers) {
+    goto fail;
+  }
+
+  Curl_sha256it(sha_hash,
+                (const unsigned char *) post_data, strlen(post_data));
+  sha256_to_hex(sha_hex, sha_hash, sizeof(sha_hex));
+
+  Curl_http_method(data, conn, &method, &httpreq);
+
+  canonical_request =
+    curl_maprintf("%s\n" /* HTTPRequestMethod */
+                  "%s\n" /* CanonicalURI */
+                  "%s\n" /* CanonicalQueryString */
+                  "%s\n" /* CanonicalHeaders */
+                  "%s\n" /* SignedHeaders */
+                  "%s",  /* HashedRequestPayload in hex */
+                  method,
+                  data->state.up.path,
+                  data->state.up.query ? data->state.up.query : "",
+                  canonical_headers,
+                  signed_headers,
+                  sha_hex);
+  if(!canonical_request) {
+    goto fail;
+  }
+
+  request_type = curl_maprintf("%s4_request", provider0_low);
+  if(!request_type) {
+    goto fail;
+  }
+
+  credential_scope = curl_maprintf("%s/%s/%s/%s",
+                                   date, region, service, request_type);
+  if(!credential_scope) {
+    goto fail;
+  }
+
+  Curl_sha256it(sha_hash, (unsigned char *) canonical_request,
+                strlen(canonical_request));
+  sha256_to_hex(sha_hex, sha_hash, sizeof(sha_hex));
+
+  /*
+   * Google allow to use rsa key instead of HMAC, so this code might change
+   * In the furure, but for now we support only HMAC version
+   */
+  str_to_sign = curl_maprintf("%s4-HMAC-SHA256\n" /* Algorithm */
+                              "%s\n" /* RequestDateTime */
+                              "%s\n" /* CredentialScope */
+                              "%s",  /* HashedCanonicalRequest in hex */
+                              provider0_up,
+                              timestamp,
+                              credential_scope,
+                              sha_hex);
+  if(!str_to_sign) {
+    goto fail;
+  }
+
+  secret = curl_maprintf("%s4%s", provider0_up, passwd);
+  if(!secret) {
+    goto fail;
+  }
+
+  HMAC_SHA256(secret, strlen(secret),
+              date, strlen(date), tmp_sign0);
+  HMAC_SHA256(tmp_sign0, sizeof(tmp_sign0),
+              region, strlen(region), tmp_sign1);
+  HMAC_SHA256(tmp_sign1, sizeof(tmp_sign1),
+              service, strlen(service), tmp_sign0);
+  HMAC_SHA256(tmp_sign0, sizeof(tmp_sign0),
+              request_type, strlen(request_type), tmp_sign1);
+  HMAC_SHA256(tmp_sign1, sizeof(tmp_sign1),
+              str_to_sign, strlen(str_to_sign), tmp_sign0);
+
+  sha256_to_hex(sha_hex, tmp_sign0, sizeof(sha_hex));
+
+  auth_headers = curl_maprintf("Authorization: %s4-HMAC-SHA256 "
+                               "Credential=%s/%s, "
+                               "SignedHeaders=%s, "
+                               "Signature=%s\r\n"
+                               "X-%s-Date: %s\r\n",
+                               provider0_up,
+                               user,
+                               credential_scope,
+                               signed_headers,
+                               sha_hex,
+                               provider1_mid,
+                               timestamp);
+  if(!auth_headers) {
+    goto fail;
+  }
+
+  Curl_safefree(data->state.aptr.userpwd);
+  data->state.aptr.userpwd = auth_headers;
+  data->state.authhost.done = TRUE;
+  ret = CURLE_OK;
+
+fail:
+  free(provider0_low);
+  free(provider0_up);
+  free(provider1_low);
+  free(provider1_mid);
+  free(region);
+  free(service);
+  free(canonical_headers);
+  free(signed_headers);
+  free(canonical_request);
+  free(request_type);
+  free(credential_scope);
+  free(str_to_sign);
+  free(secret);
+  return ret;
+}
+
+#endif /* !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH) */
diff --git a/lib/http_aws_sigv4.h b/lib/http_aws_sigv4.h
new file mode 100644
index 0000000..886b314
--- /dev/null
+++ b/lib/http_aws_sigv4.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_HTTP_AWS_SIGV4_H
+#define HEADER_CURL_HTTP_AWS_SIGV4_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curl_setup.h"
+
+/* this is for creating aws_sigv4 header output */
+CURLcode Curl_output_aws_sigv4(struct Curl_easy *data, bool proxy);
+
+#endif /* HEADER_CURL_HTTP_AWS_SIGV4_H */
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index 767f806..beb9695 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -77,21 +77,21 @@
 #ifdef CURL_DOES_CONVERSIONS
 /* Check for an ASCII hex digit.
    We avoid the use of ISXDIGIT to accommodate non-ASCII hosts. */
-static bool Curl_isxdigit_ascii(char digit)
+static bool isxdigit_ascii(char digit)
 {
   return (digit >= 0x30 && digit <= 0x39) /* 0-9 */
-        || (digit >= 0x41 && digit <= 0x46) /* A-F */
-        || (digit >= 0x61 && digit <= 0x66); /* a-f */
+    || (digit >= 0x41 && digit <= 0x46) /* A-F */
+    || (digit >= 0x61 && digit <= 0x66); /* a-f */
 }
 #else
-#define Curl_isxdigit_ascii(x) Curl_isxdigit(x)
+#define isxdigit_ascii(x) Curl_isxdigit(x)
 #endif
 
-void Curl_httpchunk_init(struct connectdata *conn)
+void Curl_httpchunk_init(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
   struct Curl_chunker *chunk = &conn->chunk;
   chunk->hexindex = 0;      /* start at 0 */
-  chunk->dataleft = 0;      /* no data left yet! */
   chunk->state = CHUNK_HEX; /* we get hex first! */
   Curl_dyn_init(&conn->trailer, DYN_H1_TRAILER);
 }
@@ -107,14 +107,14 @@
  * This function always uses ASCII hex values to accommodate non-ASCII hosts.
  * For example, 0x0d and 0x0a are used instead of '\r' and '\n'.
  */
-CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
+CHUNKcode Curl_httpchunk_read(struct Curl_easy *data,
                               char *datap,
                               ssize_t datalen,
                               ssize_t *wrotep,
                               CURLcode *extrap)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct Curl_chunker *ch = &conn->chunk;
   struct SingleRequest *k = &data->req;
   size_t piece;
@@ -126,7 +126,7 @@
   /* the original data is written to the client, but we go on with the
      chunk read process, to properly calculate the content length*/
   if(data->set.http_te_skip && !k->ignorebody) {
-    result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, datalen);
+    result = Curl_client_write(data, CLIENTWRITE_BODY, datap, datalen);
     if(result) {
       *extrap = result;
       return CHUNKE_PASSTHRU_ERROR;
@@ -136,8 +136,8 @@
   while(length) {
     switch(ch->state) {
     case CHUNK_HEX:
-      if(Curl_isxdigit_ascii(*datap)) {
-        if(ch->hexindex < MAXNUM_SIZE) {
+      if(isxdigit_ascii(*datap)) {
+        if(ch->hexindex < CHUNK_MAXNUM_LEN) {
           ch->hexbuffer[ch->hexindex] = *datap;
           datap++;
           length--;
@@ -158,8 +158,7 @@
         ch->hexbuffer[ch->hexindex] = 0;
 
         /* convert to host encoding before calling strtoul */
-        result = Curl_convert_from_network(conn->data, ch->hexbuffer,
-                                           ch->hexindex);
+        result = Curl_convert_from_network(data, ch->hexbuffer, ch->hexindex);
         if(result) {
           /* Curl_convert_from_network calls failf if unsuccessful */
           /* Treat it as a bad hex character */
@@ -194,11 +193,11 @@
       piece = curlx_sotouz((ch->datasize >= length)?length:ch->datasize);
 
       /* Write the data portion available */
-      if(!conn->data->set.http_te_skip && !k->ignorebody) {
-        if(!conn->data->set.http_ce_skip && k->writer_stack)
-          result = Curl_unencode_write(conn, k->writer_stack, datap, piece);
+      if(!data->set.http_te_skip && !k->ignorebody) {
+        if(!data->set.http_ce_skip && k->writer_stack)
+          result = Curl_unencode_write(data, k->writer_stack, datap, piece);
         else
-          result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, piece);
+          result = Curl_client_write(data, CLIENTWRITE_BODY, datap, piece);
 
         if(result) {
           *extrap = result;
@@ -219,7 +218,7 @@
     case CHUNK_POSTLF:
       if(*datap == 0x0a) {
         /* The last one before we go back to hex state and start all over. */
-        Curl_httpchunk_init(conn); /* sets state back to CHUNK_HEX */
+        Curl_httpchunk_init(data); /* sets state back to CHUNK_HEX */
       }
       else if(*datap != 0x0d)
         return CHUNKE_BAD_CHUNK;
@@ -242,14 +241,14 @@
           tr = Curl_dyn_ptr(&conn->trailer);
           trlen = Curl_dyn_len(&conn->trailer);
           /* Convert to host encoding before calling Curl_client_write */
-          result = Curl_convert_from_network(conn->data, tr, trlen);
+          result = Curl_convert_from_network(data, tr, trlen);
           if(result)
             /* Curl_convert_from_network calls failf if unsuccessful */
             /* Treat it as a bad chunk */
             return CHUNKE_BAD_CHUNK;
 
           if(!data->set.http_te_skip) {
-            result = Curl_client_write(conn, CLIENTWRITE_HEADER, tr, trlen);
+            result = Curl_client_write(data, CLIENTWRITE_HEADER, tr, trlen);
             if(result) {
               *extrap = result;
               return CHUNKE_PASSTHRU_ERROR;
@@ -309,7 +308,7 @@
 
         /* Record the length of any data left in the end of the buffer
            even if there's no more chunks to read */
-        ch->dataleft = curlx_sotouz(length);
+        ch->datasize = curlx_sotouz(length);
 
         return CHUNKE_STOP; /* return stop */
       }
diff --git a/lib/http_chunks.h b/lib/http_chunks.h
index 8f4a33c..741a9a3 100644
--- a/lib/http_chunks.h
+++ b/lib/http_chunks.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -26,10 +26,10 @@
 
 /*
  * The longest possible hexadecimal number we support in a chunked transfer.
- * Weird enough, RFC2616 doesn't set a maximum size! Since we use strtoul()
- * to convert it, we "only" support 2^32 bytes chunk data.
+ * Neither RFC2616 nor the later HTTP specs define a maximum chunk size.
+ * For 64 bit curl_off_t we support 16 digits. For 32 bit, 8 digits.
  */
-#define MAXNUM_SIZE 16
+#define CHUNK_MAXNUM_LEN (SIZEOF_CURL_OFF_T * 2)
 
 typedef enum {
   /* await and buffer all hexadecimal digits until we get one that isn't a
@@ -48,7 +48,7 @@
      big deal. */
   CHUNK_POSTLF,
 
-  /* Used to mark that we're out of the game.  NOTE: that there's a 'dataleft'
+  /* Used to mark that we're out of the game.  NOTE: that there's a 'datasize'
      field in the struct that will tell how many bytes that were not passed to
      the client in the end of the last buffer! */
   CHUNK_STOP,
@@ -83,16 +83,15 @@
 const char *Curl_chunked_strerror(CHUNKcode code);
 
 struct Curl_chunker {
-  char hexbuffer[ MAXNUM_SIZE + 1];
-  int hexindex;
-  ChunkyState state;
   curl_off_t datasize;
-  size_t dataleft; /* untouched data amount at the end of the last buffer */
+  ChunkyState state;
+  unsigned char hexindex;
+  char hexbuffer[ CHUNK_MAXNUM_LEN + 1]; /* +1 for null-terminator */
 };
 
 /* The following functions are defined in http_chunks.c */
-void Curl_httpchunk_init(struct connectdata *conn);
-CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap,
+void Curl_httpchunk_init(struct Curl_easy *data);
+CHUNKcode Curl_httpchunk_read(struct Curl_easy *data, char *datap,
                               ssize_t length, ssize_t *wrote,
                               CURLcode *passthru);
 
diff --git a/lib/http_digest.c b/lib/http_digest.c
index b06dc0d..34bb5a8 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,13 +41,11 @@
 
 */
 
-CURLcode Curl_input_digest(struct connectdata *conn,
+CURLcode Curl_input_digest(struct Curl_easy *data,
                            bool proxy,
                            const char *header) /* rest of the *-authenticate:
                                                   header */
 {
-  struct Curl_easy *data = conn->data;
-
   /* Point to the correct struct with this */
   struct digestdata *digest;
 
@@ -58,7 +56,7 @@
     digest = &data->state.digest;
   }
 
-  if(!checkprefix("Digest", header))
+  if(!checkprefix("Digest", header) || !ISSPACE(header[6]))
     return CURLE_BAD_CONTENT_ENCODING;
 
   header += strlen("Digest");
@@ -68,13 +66,12 @@
   return Curl_auth_decode_digest_http_message(header, digest);
 }
 
-CURLcode Curl_output_digest(struct connectdata *conn,
+CURLcode Curl_output_digest(struct Curl_easy *data,
                             bool proxy,
                             const unsigned char *request,
                             const unsigned char *uripath)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   unsigned char *path = NULL;
   char *tmp = NULL;
   char *response;
@@ -99,16 +96,16 @@
 #else
     digest = &data->state.proxydigest;
     allocuserpwd = &data->state.aptr.proxyuserpwd;
-    userp = conn->http_proxy.user;
-    passwdp = conn->http_proxy.passwd;
+    userp = data->state.aptr.proxyuser;
+    passwdp = data->state.aptr.proxypasswd;
     authp = &data->state.authproxy;
 #endif
   }
   else {
     digest = &data->state.digest;
     allocuserpwd = &data->state.aptr.userpwd;
-    userp = conn->user;
-    passwdp = conn->passwd;
+    userp = data->state.aptr.user;
+    passwdp = data->state.aptr.passwd;
     authp = &data->state.authhost;
   }
 
@@ -149,7 +146,8 @@
     tmp = strchr((char *)uripath, '?');
     if(tmp) {
       size_t urilen = tmp - (char *)uripath;
-      path = (unsigned char *) aprintf("%.*s", urilen, uripath);
+      /* typecast is fine here since the value is always less than 32 bits */
+      path = (unsigned char *) aprintf("%.*s", (int)urilen, uripath);
     }
   }
   if(!tmp)
diff --git a/lib/http_digest.h b/lib/http_digest.h
index 96e39a7..89438d1 100644
--- a/lib/http_digest.h
+++ b/lib/http_digest.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -26,11 +26,11 @@
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
 
 /* this is for digest header input */
-CURLcode Curl_input_digest(struct connectdata *conn,
+CURLcode Curl_input_digest(struct Curl_easy *data,
                            bool proxy, const char *header);
 
 /* this is for creating digest header output */
-CURLcode Curl_output_digest(struct connectdata *conn,
+CURLcode Curl_output_digest(struct Curl_easy *data,
                             bool proxy,
                             const unsigned char *request,
                             const unsigned char *uripath);
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index 0a19ec2..5f764dc 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -34,11 +34,10 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
-CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
-                              const char *header)
+CURLcode Curl_input_negotiate(struct Curl_easy *data, struct connectdata *conn,
+                              bool proxy, const char *header)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   size_t len;
 
   /* Point to the username, password, service and host */
@@ -90,7 +89,7 @@
   neg_ctx->havenegdata = len != 0;
   if(!len) {
     if(state == GSS_AUTHSUCC) {
-      infof(conn->data, "Negotiate auth restarted\n");
+      infof(data, "Negotiate auth restarted");
       Curl_http_auth_cleanup_negotiate(conn);
     }
     else if(state != GSS_AUTHNONE) {
@@ -116,15 +115,14 @@
   return result;
 }
 
-CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+CURLcode Curl_output_negotiate(struct Curl_easy *data,
+                               struct connectdata *conn, bool proxy)
 {
   struct negotiatedata *neg_ctx = proxy ? &conn->proxyneg :
     &conn->negotiate;
-  struct auth *authp = proxy ? &conn->data->state.authproxy :
-    &conn->data->state.authhost;
+  struct auth *authp = proxy ? &data->state.authproxy : &data->state.authhost;
   curlnegotiate *state = proxy ? &conn->proxy_negotiate_state :
     &conn->http_negotiate_state;
-  struct Curl_easy *data = conn->data;
   char *base64 = NULL;
   size_t len = 0;
   char *userp;
@@ -144,15 +142,15 @@
   }
 
   if(neg_ctx->noauthpersist ||
-    (*state != GSS_AUTHDONE && *state != GSS_AUTHSUCC)) {
+     (*state != GSS_AUTHDONE && *state != GSS_AUTHSUCC)) {
 
     if(neg_ctx->noauthpersist && *state == GSS_AUTHSUCC) {
-      infof(conn->data, "Curl_output_negotiate, "
-       "no persistent authentication: cleanup existing context");
+      infof(data, "Curl_output_negotiate, "
+            "no persistent authentication: cleanup existing context");
       Curl_http_auth_cleanup_negotiate(conn);
     }
     if(!neg_ctx->context) {
-      result = Curl_input_negotiate(conn, proxy, "Negotiate");
+      result = Curl_input_negotiate(data, conn, proxy, "Negotiate");
       if(result == CURLE_AUTH_ERROR) {
         /* negotiate auth failed, let's continue unauthenticated to stay
          * compatible with the behavior before curl-7_64_0-158-g6c6035532 */
@@ -163,8 +161,7 @@
         return result;
     }
 
-    result = Curl_auth_create_spnego_message(conn->data,
-      neg_ctx, &base64, &len);
+    result = Curl_auth_create_spnego_message(data, neg_ctx, &base64, &len);
     if(result)
       return result;
 
@@ -182,7 +179,7 @@
 
     free(base64);
 
-    if(userp == NULL) {
+    if(!userp) {
       return CURLE_OUT_OF_MEMORY;
     }
 
diff --git a/lib/http_negotiate.h b/lib/http_negotiate.h
index a737f6f..2640a3e 100644
--- a/lib/http_negotiate.h
+++ b/lib/http_negotiate.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -25,11 +25,12 @@
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
 
 /* this is for Negotiate header input */
-CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
-                              const char *header);
+CURLcode Curl_input_negotiate(struct Curl_easy *data, struct connectdata *conn,
+                              bool proxy, const char *header);
 
 /* this is for creating Negotiate header output */
-CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy);
+CURLcode Curl_output_negotiate(struct Curl_easy *data,
+                               struct connectdata *conn, bool proxy);
 
 void Curl_http_auth_cleanup_negotiate(struct connectdata *conn);
 
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index cab543c..627a11c 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -39,6 +39,7 @@
 #include "http_ntlm.h"
 #include "curl_ntlm_core.h"
 #include "curl_ntlm_wb.h"
+#include "curl_base64.h"
 #include "vauth/vauth.h"
 #include "url.h"
 
@@ -59,7 +60,7 @@
 # define DEBUG_OUT(x) Curl_nop_stmt
 #endif
 
-CURLcode Curl_input_ntlm(struct connectdata *conn,
+CURLcode Curl_input_ntlm(struct Curl_easy *data,
                          bool proxy,         /* if proxy or not */
                          const char *header) /* rest of the www-authenticate:
                                                 header */
@@ -68,6 +69,7 @@
   struct ntlmdata *ntlm;
   curlntlm *state;
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
   ntlm = proxy ? &conn->proxyntlm : &conn->ntlm;
   state = proxy ? &conn->proxy_ntlm_state : &conn->http_ntlm_state;
@@ -79,7 +81,18 @@
       header++;
 
     if(*header) {
-      result = Curl_auth_decode_ntlm_type2_message(conn->data, header, ntlm);
+      unsigned char *hdr;
+      size_t hdrlen;
+
+      result = Curl_base64_decode(header, &hdr, &hdrlen);
+      if(!result) {
+        struct bufref hdrbuf;
+
+        Curl_bufref_init(&hdrbuf);
+        Curl_bufref_set(&hdrbuf, hdr, hdrlen, curl_free);
+        result = Curl_auth_decode_ntlm_type2_message(data, &hdrbuf, ntlm);
+        Curl_bufref_free(&hdrbuf);
+      }
       if(result)
         return result;
 
@@ -87,17 +100,17 @@
     }
     else {
       if(*state == NTLMSTATE_LAST) {
-        infof(conn->data, "NTLM auth restarted\n");
+        infof(data, "NTLM auth restarted");
         Curl_http_auth_cleanup_ntlm(conn);
       }
       else if(*state == NTLMSTATE_TYPE3) {
-        infof(conn->data, "NTLM handshake rejected\n");
+        infof(data, "NTLM handshake rejected");
         Curl_http_auth_cleanup_ntlm(conn);
         *state = NTLMSTATE_NONE;
         return CURLE_REMOTE_ACCESS_DENIED;
       }
       else if(*state >= NTLMSTATE_TYPE1) {
-        infof(conn->data, "NTLM handshake failure (internal error)\n");
+        infof(data, "NTLM handshake failure (internal error)");
         return CURLE_REMOTE_ACCESS_DENIED;
       }
 
@@ -111,11 +124,12 @@
 /*
  * This is for creating ntlm header output
  */
-CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
+CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy)
 {
   char *base64 = NULL;
   size_t len = 0;
-  CURLcode result;
+  CURLcode result = CURLE_OK;
+  struct bufref ntlmmsg;
 
   /* point to the address of the pointer that holds the string to send to the
      server, which is for a plain host or for a HTTP proxy */
@@ -131,8 +145,7 @@
   struct ntlmdata *ntlm;
   curlntlm *state;
   struct auth *authp;
-  struct Curl_easy *data = conn->data;
-
+  struct connectdata *conn = data->conn;
 
   DEBUGASSERT(conn);
   DEBUGASSERT(data);
@@ -140,28 +153,28 @@
   if(proxy) {
 #ifndef CURL_DISABLE_PROXY
     allocuserpwd = &data->state.aptr.proxyuserpwd;
-    userp = conn->http_proxy.user;
-    passwdp = conn->http_proxy.passwd;
-    service = conn->data->set.str[STRING_PROXY_SERVICE_NAME] ?
-              conn->data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
+    userp = data->state.aptr.proxyuser;
+    passwdp = data->state.aptr.proxypasswd;
+    service = data->set.str[STRING_PROXY_SERVICE_NAME] ?
+      data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
     hostname = conn->http_proxy.host.name;
     ntlm = &conn->proxyntlm;
     state = &conn->proxy_ntlm_state;
-    authp = &conn->data->state.authproxy;
+    authp = &data->state.authproxy;
 #else
     return CURLE_NOT_BUILT_IN;
 #endif
   }
   else {
     allocuserpwd = &data->state.aptr.userpwd;
-    userp = conn->user;
-    passwdp = conn->passwd;
-    service = conn->data->set.str[STRING_SERVICE_NAME] ?
-              conn->data->set.str[STRING_SERVICE_NAME] : "HTTP";
+    userp = data->state.aptr.user;
+    passwdp = data->state.aptr.passwd;
+    service = data->set.str[STRING_SERVICE_NAME] ?
+      data->set.str[STRING_SERVICE_NAME] : "HTTP";
     hostname = conn->host.name;
     ntlm = &conn->ntlm;
     state = &conn->http_ntlm_state;
-    authp = &conn->data->state.authhost;
+    authp = &data->state.authhost;
   }
   authp->done = FALSE;
 
@@ -173,10 +186,10 @@
     passwdp = "";
 
 #ifdef USE_WINDOWS_SSPI
-  if(s_hSecDll == NULL) {
+  if(!s_hSecDll) {
     /* not thread safe and leaks - use curl_global_init() to avoid */
     CURLcode err = Curl_sspi_global_init();
-    if(s_hSecDll == NULL)
+    if(!s_hSecDll)
       return err;
   }
 #ifdef SECPKG_ATTR_ENDPOINT_BINDINGS
@@ -184,50 +197,52 @@
 #endif
 #endif
 
+  Curl_bufref_init(&ntlmmsg);
   switch(*state) {
   case NTLMSTATE_TYPE1:
   default: /* for the weird cases we (re)start here */
     /* Create a type-1 message */
-    result = Curl_auth_create_ntlm_type1_message(conn->data, userp, passwdp,
+    result = Curl_auth_create_ntlm_type1_message(data, userp, passwdp,
                                                  service, hostname,
-                                                 ntlm, &base64,
-                                                 &len);
-    if(result)
-      return result;
-
-    if(base64) {
-      free(*allocuserpwd);
-      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
-                              proxy ? "Proxy-" : "",
-                              base64);
-      free(base64);
-      if(!*allocuserpwd)
-        return CURLE_OUT_OF_MEMORY;
-
-      DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd));
+                                                 ntlm, &ntlmmsg);
+    if(!result) {
+      DEBUGASSERT(Curl_bufref_len(&ntlmmsg) != 0);
+      result = Curl_base64_encode(data,
+                                  (const char *) Curl_bufref_ptr(&ntlmmsg),
+                                  Curl_bufref_len(&ntlmmsg), &base64, &len);
+      if(!result) {
+        free(*allocuserpwd);
+        *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
+                                proxy ? "Proxy-" : "",
+                                base64);
+        free(base64);
+        if(!*allocuserpwd)
+          result = CURLE_OUT_OF_MEMORY;
+      }
     }
     break;
 
   case NTLMSTATE_TYPE2:
     /* We already received the type-2 message, create a type-3 message */
-    result = Curl_auth_create_ntlm_type3_message(conn->data, userp, passwdp,
-                                                 ntlm, &base64, &len);
-    if(result)
-      return result;
-
-    if(base64) {
-      free(*allocuserpwd);
-      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
-                              proxy ? "Proxy-" : "",
-                              base64);
-      free(base64);
-      if(!*allocuserpwd)
-        return CURLE_OUT_OF_MEMORY;
-
-      DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd));
-
-      *state = NTLMSTATE_TYPE3; /* we send a type-3 */
-      authp->done = TRUE;
+    result = Curl_auth_create_ntlm_type3_message(data, userp, passwdp,
+                                                 ntlm, &ntlmmsg);
+    if(!result && Curl_bufref_len(&ntlmmsg)) {
+      result = Curl_base64_encode(data,
+                                  (const char *) Curl_bufref_ptr(&ntlmmsg),
+                                  Curl_bufref_len(&ntlmmsg), &base64, &len);
+      if(!result) {
+        free(*allocuserpwd);
+        *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
+                                proxy ? "Proxy-" : "",
+                                base64);
+        free(base64);
+        if(!*allocuserpwd)
+          result = CURLE_OUT_OF_MEMORY;
+        else {
+          *state = NTLMSTATE_TYPE3; /* we send a type-3 */
+          authp->done = TRUE;
+        }
+      }
     }
     break;
 
@@ -241,8 +256,9 @@
     authp->done = TRUE;
     break;
   }
+  Curl_bufref_free(&ntlmmsg);
 
-  return CURLE_OK;
+  return result;
 }
 
 void Curl_http_auth_cleanup_ntlm(struct connectdata *conn)
diff --git a/lib/http_ntlm.h b/lib/http_ntlm.h
index 3ebdf97..5b4fa00 100644
--- a/lib/http_ntlm.h
+++ b/lib/http_ntlm.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,11 +27,11 @@
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)
 
 /* this is for ntlm header input */
-CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy,
+CURLcode Curl_input_ntlm(struct Curl_easy *data, bool proxy,
                          const char *header);
 
 /* this is for creating ntlm header output */
-CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy);
+CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy);
 
 void Curl_http_auth_cleanup_ntlm(struct connectdata *conn);
 
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 7c34d20..a7f7aa3 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,6 +27,9 @@
 #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
 
 #include <curl/curl.h>
+#ifdef USE_HYPER
+#include <hyper.h>
+#endif
 #include "sendf.h"
 #include "http.h"
 #include "url.h"
@@ -36,6 +39,8 @@
 #include "connect.h"
 #include "curlx.h"
 #include "vtls/vtls.h"
+#include "transfer.h"
+#include "multiif.h"
 
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
@@ -47,15 +52,16 @@
  * proxy_ssl_connected connection bit when complete.  Can be
  * called multiple times.
  */
-static CURLcode https_proxy_connect(struct connectdata *conn, int sockindex)
+static CURLcode https_proxy_connect(struct Curl_easy *data, int sockindex)
 {
 #ifdef USE_SSL
+  struct connectdata *conn = data->conn;
   CURLcode result = CURLE_OK;
   DEBUGASSERT(conn->http_proxy.proxytype == CURLPROXY_HTTPS);
   if(!conn->bits.proxy_ssl_connected[sockindex]) {
     /* perform SSL initialization for this socket */
     result =
-      Curl_ssl_connect_nonblocking(conn, sockindex,
+      Curl_ssl_connect_nonblocking(data, conn, TRUE, sockindex,
                                    &conn->bits.proxy_ssl_connected[sockindex]);
     if(result)
       /* a failed connection is marked for closure to prevent (bad) re-use or
@@ -64,17 +70,17 @@
   }
   return result;
 #else
-  (void) conn;
+  (void) data;
   (void) sockindex;
   return CURLE_NOT_BUILT_IN;
 #endif
 }
 
-CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex)
+CURLcode Curl_proxy_connect(struct Curl_easy *data, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
-    const CURLcode result = https_proxy_connect(conn, sockindex);
+    const CURLcode result = https_proxy_connect(data, sockindex);
     if(result)
       return result;
     if(!conn->bits.proxy_ssl_connected[sockindex])
@@ -84,29 +90,12 @@
   if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
 #ifndef CURL_DISABLE_PROXY
     /* for [protocol] tunneled through HTTP proxy */
-    struct HTTP http_proxy;
-    void *prot_save;
     const char *hostname;
     int remote_port;
     CURLcode result;
 
-    /* BLOCKING */
     /* We want "seamless" operations through HTTP proxy tunnel */
 
-    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the
-     * member conn->proto.http; we want [protocol] through HTTP and we have
-     * to change the member temporarily for connecting to the HTTP
-     * proxy. After Curl_proxyCONNECT we have to set back the member to the
-     * original pointer
-     *
-     * This function might be called several times in the multi interface case
-     * if the proxy's CONNECT response is not instant.
-     */
-    prot_save = conn->data->req.protop;
-    memset(&http_proxy, 0, sizeof(http_proxy));
-    conn->data->req.protop = &http_proxy;
-    connkeep(conn, "HTTP proxy CONNECT");
-
     /* for the secondary socket (FTP), use the "connect to host"
      * but ignore the "connect to port" (use the secondary port)
      */
@@ -124,8 +113,8 @@
       remote_port = conn->conn_to_port;
     else
       remote_port = conn->remote_port;
-    result = Curl_proxyCONNECT(conn, sockindex, hostname, remote_port);
-    conn->data->req.protop = prot_save;
+
+    result = Curl_proxyCONNECT(data, sockindex, hostname, remote_port);
     if(CURLE_OK != result)
       return result;
     Curl_safefree(data->state.aptr.proxyuserpwd);
@@ -140,26 +129,62 @@
 bool Curl_connect_complete(struct connectdata *conn)
 {
   return !conn->connect_state ||
-    (conn->connect_state->tunnel_state == TUNNEL_COMPLETE);
+    (conn->connect_state->tunnel_state >= TUNNEL_COMPLETE);
 }
 
 bool Curl_connect_ongoing(struct connectdata *conn)
 {
   return conn->connect_state &&
-    (conn->connect_state->tunnel_state != TUNNEL_COMPLETE);
+    (conn->connect_state->tunnel_state <= TUNNEL_COMPLETE);
 }
 
-static CURLcode connect_init(struct connectdata *conn, bool reinit)
+/* when we've sent a CONNECT to a proxy, we should rather either wait for the
+   socket to become readable to be able to get the response headers or if
+   we're still sending the request, wait for write. */
+int Curl_connect_getsock(struct connectdata *conn)
+{
+  struct HTTP *http;
+  DEBUGASSERT(conn);
+  DEBUGASSERT(conn->connect_state);
+  http = &conn->connect_state->http_proxy;
+
+  if(http->sending)
+    return GETSOCK_WRITESOCK(0);
+
+  return GETSOCK_READSOCK(0);
+}
+
+static CURLcode connect_init(struct Curl_easy *data, bool reinit)
 {
   struct http_connect_state *s;
+  struct connectdata *conn = data->conn;
   if(!reinit) {
+    CURLcode result;
     DEBUGASSERT(!conn->connect_state);
+    /* we might need the upload buffer for streaming a partial request */
+    result = Curl_get_upload_buffer(data);
+    if(result)
+      return result;
+
     s = calloc(1, sizeof(struct http_connect_state));
     if(!s)
       return CURLE_OUT_OF_MEMORY;
-    infof(conn->data, "allocate connect buffer!\n");
+    infof(data, "allocate connect buffer!");
     conn->connect_state = s;
     Curl_dyn_init(&s->rcvbuf, DYN_PROXY_CONNECT_HEADERS);
+
+    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the
+     * member conn->proto.http; we want [protocol] through HTTP and we have
+     * to change the member temporarily for connecting to the HTTP
+     * proxy. After Curl_proxyCONNECT we have to set back the member to the
+     * original pointer
+     *
+     * This function might be called several times in the multi interface case
+     * if the proxy's CONNECT response is not instant.
+     */
+    s->prot_save = data->req.p.http;
+    data->req.p.http = &s->http_proxy;
+    connkeep(conn, "HTTP proxy CONNECT");
   }
   else {
     DEBUGASSERT(conn->connect_state);
@@ -167,31 +192,73 @@
     Curl_dyn_reset(&s->rcvbuf);
   }
   s->tunnel_state = TUNNEL_INIT;
-  s->keepon = TRUE;
+  s->keepon = KEEPON_CONNECT;
   s->cl = 0;
   s->close_connection = FALSE;
   return CURLE_OK;
 }
 
-static void connect_done(struct connectdata *conn)
+static void connect_done(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
   struct http_connect_state *s = conn->connect_state;
-  s->tunnel_state = TUNNEL_COMPLETE;
-  Curl_dyn_free(&s->rcvbuf);
-  infof(conn->data, "CONNECT phase completed!\n");
+  if(s->tunnel_state != TUNNEL_EXIT) {
+    s->tunnel_state = TUNNEL_EXIT;
+    Curl_dyn_free(&s->rcvbuf);
+    Curl_dyn_free(&s->req);
+
+    /* retore the protocol pointer */
+    data->req.p.http = s->prot_save;
+    s->prot_save = NULL;
+    infof(data, "CONNECT phase completed!");
+  }
 }
 
-static CURLcode CONNECT(struct connectdata *conn,
+static CURLcode CONNECT_host(struct Curl_easy *data,
+                             struct connectdata *conn,
+                             const char *hostname,
+                             int remote_port,
+                             char **connecthostp,
+                             char **hostp)
+{
+  char *hostheader; /* for CONNECT */
+  char *host = NULL; /* Host: */
+  bool ipv6_ip = conn->bits.ipv6_ip;
+
+  /* the hostname may be different */
+  if(hostname != conn->host.name)
+    ipv6_ip = (strchr(hostname, ':') != NULL);
+  hostheader = /* host:port with IPv6 support */
+    aprintf("%s%s%s:%d", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"",
+            remote_port);
+  if(!hostheader)
+    return CURLE_OUT_OF_MEMORY;
+
+  if(!Curl_checkProxyheaders(data, conn, "Host")) {
+    host = aprintf("Host: %s\r\n", hostheader);
+    if(!host) {
+      free(hostheader);
+      return CURLE_OUT_OF_MEMORY;
+    }
+  }
+  *connecthostp = hostheader;
+  *hostp = host;
+  return CURLE_OK;
+}
+
+#ifndef USE_HYPER
+static CURLcode CONNECT(struct Curl_easy *data,
                         int sockindex,
                         const char *hostname,
                         int remote_port)
 {
   int subversion = 0;
-  struct Curl_easy *data = conn->data;
   struct SingleRequest *k = &data->req;
   CURLcode result;
+  struct connectdata *conn = data->conn;
   curl_socket_t tunnelsocket = conn->sock[sockindex];
   struct http_connect_state *s = conn->connect_state;
+  struct HTTP *http = data->req.p.http;
   char *linep;
   size_t perline;
 
@@ -207,10 +274,11 @@
     timediff_t check;
     if(TUNNEL_INIT == s->tunnel_state) {
       /* BEGIN CONNECT PHASE */
-      char *host_port;
-      struct dynbuf req;
+      struct dynbuf *req = &s->req;
+      char *hostheader = NULL;
+      char *host = NULL;
 
-      infof(data, "Establish HTTP proxy tunnel to %s:%d\n",
+      infof(data, "Establish HTTP proxy tunnel to %s:%d",
             hostname, remote_port);
 
         /* This only happens if we've looped here due to authentication
@@ -219,55 +287,33 @@
       free(data->req.newurl);
       data->req.newurl = NULL;
 
-      host_port = aprintf("%s:%d", hostname, remote_port);
-      if(!host_port)
-        return CURLE_OUT_OF_MEMORY;
+      /* initialize send-buffer */
+      Curl_dyn_init(req, DYN_HTTP_REQUEST);
 
-      /* initialize a dynamic send-buffer */
-      Curl_dyn_init(&req, DYN_HTTP_REQUEST);
+      result = CONNECT_host(data, conn,
+                            hostname, remote_port, &hostheader, &host);
+      if(result)
+        return result;
 
       /* Setup the proxy-authorization header, if any */
-      result = Curl_http_output_auth(conn, "CONNECT", host_port, TRUE);
-
-      free(host_port);
+      result = Curl_http_output_auth(data, conn, "CONNECT", HTTPREQ_GET,
+                                     hostheader, TRUE);
 
       if(!result) {
-        char *host = NULL;
         const char *proxyconn = "";
         const char *useragent = "";
         const char *httpv =
           (conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0) ? "1.0" : "1.1";
-        bool ipv6_ip = conn->bits.ipv6_ip;
-        char *hostheader;
 
-        /* the hostname may be different */
-        if(hostname != conn->host.name)
-          ipv6_ip = (strchr(hostname, ':') != NULL);
-        hostheader = /* host:port with IPv6 support */
-          aprintf("%s%s%s:%d", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"",
-                  remote_port);
-        if(!hostheader) {
-          Curl_dyn_free(&req);
-          return CURLE_OUT_OF_MEMORY;
-        }
-
-        if(!Curl_checkProxyheaders(conn, "Host")) {
-          host = aprintf("Host: %s\r\n", hostheader);
-          if(!host) {
-            free(hostheader);
-            Curl_dyn_free(&req);
-            return CURLE_OUT_OF_MEMORY;
-          }
-        }
-        if(!Curl_checkProxyheaders(conn, "Proxy-Connection"))
+        if(!Curl_checkProxyheaders(data, conn, "Proxy-Connection"))
           proxyconn = "Proxy-Connection: Keep-Alive\r\n";
 
-        if(!Curl_checkProxyheaders(conn, "User-Agent") &&
+        if(!Curl_checkProxyheaders(data, conn, "User-Agent") &&
            data->set.str[STRING_USERAGENT])
           useragent = data->state.aptr.uagent;
 
         result =
-          Curl_dyn_addf(&req,
+          Curl_dyn_addf(req,
                         "CONNECT %s HTTP/%s\r\n"
                         "%s"  /* Host: */
                         "%s"  /* Proxy-Authorization */
@@ -281,28 +327,23 @@
                         useragent,
                         proxyconn);
 
-        if(host)
-          free(host);
-        free(hostheader);
-
         if(!result)
-          result = Curl_add_custom_headers(conn, TRUE, &req);
+          result = Curl_add_custom_headers(data, TRUE, req);
 
         if(!result)
           /* CRLF terminate the request */
-          result = Curl_dyn_add(&req, "\r\n");
+          result = Curl_dyn_add(req, "\r\n");
 
         if(!result) {
           /* Send the connect request to the proxy */
-          /* BLOCKING */
-          result = Curl_buffer_send(&req, conn, &data->info.request_size, 0,
+          result = Curl_buffer_send(req, data, &data->info.request_size, 0,
                                     sockindex);
         }
         if(result)
           failf(data, "Failed sending CONNECT to proxy");
       }
-
-      Curl_dyn_free(&req);
+      free(host);
+      free(hostheader);
       if(result)
         return result;
 
@@ -315,12 +356,42 @@
       return CURLE_OPERATION_TIMEDOUT;
     }
 
-    if(!Curl_conn_data_pending(conn, sockindex))
+    if(!Curl_conn_data_pending(conn, sockindex) && !http->sending)
       /* return so we'll be called again polling-style */
       return CURLE_OK;
 
     /* at this point, the tunnel_connecting phase is over. */
 
+    if(http->sending == HTTPSEND_REQUEST) {
+      if(!s->nsend) {
+        size_t fillcount;
+        k->upload_fromhere = data->state.ulbuf;
+        result = Curl_fillreadbuffer(data, data->set.upload_buffer_size,
+                                     &fillcount);
+        if(result)
+          return result;
+        s->nsend = fillcount;
+      }
+      if(s->nsend) {
+        ssize_t bytes_written;
+        /* write to socket (send away data) */
+        result = Curl_write(data,
+                            conn->writesockfd,  /* socket to send to */
+                            k->upload_fromhere, /* buffer pointer */
+                            s->nsend,           /* buffer size */
+                            &bytes_written);    /* actually sent */
+
+        if(!result)
+          /* send to debug callback! */
+          result = Curl_debug(data, CURLINFO_HEADER_OUT,
+                              k->upload_fromhere, bytes_written);
+
+        s->nsend -= bytes_written;
+        k->upload_fromhere += bytes_written;
+        return result;
+      }
+      /* if nothing left to send, continue */
+    }
     { /* READING RESPONSE PHASE */
       int error = SELECT_OK;
 
@@ -330,34 +401,35 @@
 
         /* Read one byte at a time to avoid a race condition. Wait at most one
            second before looping to ensure continuous pgrsUpdates. */
-        result = Curl_read(conn, tunnelsocket, &byte, 1, &gotbytes);
+        result = Curl_read(data, tunnelsocket, &byte, 1, &gotbytes);
         if(result == CURLE_AGAIN)
           /* socket buffer drained, return */
           return CURLE_OK;
 
-        if(Curl_pgrsUpdate(conn))
+        if(Curl_pgrsUpdate(data))
           return CURLE_ABORTED_BY_CALLBACK;
 
         if(result) {
-          s->keepon = FALSE;
+          s->keepon = KEEPON_DONE;
           break;
         }
         else if(gotbytes <= 0) {
-          if(data->set.proxyauth && data->state.authproxy.avail) {
+          if(data->set.proxyauth && data->state.authproxy.avail &&
+             data->state.aptr.proxyuserpwd) {
             /* proxy auth was requested and there was proxy auth available,
                then deem this as "mere" proxy disconnect */
             conn->bits.proxy_connect_closed = TRUE;
-            infof(data, "Proxy CONNECT connection closed\n");
+            infof(data, "Proxy CONNECT connection closed");
           }
           else {
             error = SELECT_ERROR;
             failf(data, "Proxy CONNECT aborted");
           }
-          s->keepon = FALSE;
+          s->keepon = KEEPON_DONE;
           break;
         }
 
-        if(s->keepon > TRUE) {
+        if(s->keepon == KEEPON_IGNORE) {
           /* This means we are currently ignoring a response-body */
 
           if(s->cl) {
@@ -365,7 +437,7 @@
                and make sure to break out of the loop when we're done! */
             s->cl--;
             if(s->cl <= 0) {
-              s->keepon = FALSE;
+              s->keepon = KEEPON_DONE;
               s->tunnel_state = TUNNEL_COMPLETE;
               break;
             }
@@ -379,11 +451,11 @@
 
             /* now parse the chunked piece of data so that we can
                properly tell when the stream ends */
-            r = Curl_httpchunk_read(conn, &byte, 1, &tookcareof, &extra);
+            r = Curl_httpchunk_read(data, &byte, 1, &tookcareof, &extra);
             if(r == CHUNKE_STOP) {
               /* we're done reading chunks! */
-              infof(data, "chunk reading DONE\n");
-              s->keepon = FALSE;
+              infof(data, "chunk reading DONE");
+              s->keepon = KEEPON_DONE;
               /* we did the full CONNECT treatment, go COMPLETE */
               s->tunnel_state = TUNNEL_COMPLETE;
             }
@@ -410,8 +482,7 @@
           return result;
 
         /* output debug if that is requested */
-        if(data->set.verbose)
-          Curl_debug(data, CURLINFO_HEADER_IN, linep, perline);
+        Curl_debug(data, CURLINFO_HEADER_IN, linep, perline);
 
         if(!data->set.suppress_connect_headers) {
           /* send the header to the callback */
@@ -419,7 +490,7 @@
           if(data->set.include_header)
             writetype |= CLIENTWRITE_BODY;
 
-          result = Curl_client_write(conn, writetype, linep, perline);
+          result = Curl_client_write(data, writetype, linep, perline);
           if(result)
             return result;
         }
@@ -438,17 +509,17 @@
             /* If we get a 407 response code with content length
                when we have no auth problem, we must ignore the
                whole response-body */
-            s->keepon = 2;
+            s->keepon = KEEPON_IGNORE;
 
             if(s->cl) {
               infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T
-                    " bytes of response-body\n", s->cl);
+                    " bytes of response-body", s->cl);
             }
             else if(s->chunked_encoding) {
               CHUNKcode r;
               CURLcode extra;
 
-              infof(data, "Ignore chunked response-body\n");
+              infof(data, "Ignore chunked response-body");
 
               /* We set ignorebody true here since the chunked decoder
                  function will acknowledge that. Pay attention so that this is
@@ -461,12 +532,12 @@
 
               /* now parse the chunked piece of data so that we can properly
                  tell when the stream ends */
-              r = Curl_httpchunk_read(conn, linep + 1, 1, &gotbytes,
+              r = Curl_httpchunk_read(data, linep + 1, 1, &gotbytes,
                                       &extra);
               if(r == CHUNKE_STOP) {
                 /* we're done reading chunks! */
-                infof(data, "chunk reading DONE\n");
-                s->keepon = FALSE;
+                infof(data, "chunk reading DONE");
+                s->keepon = KEEPON_DONE;
                 /* we did the full CONNECT treatment, go to COMPLETE */
                 s->tunnel_state = TUNNEL_COMPLETE;
               }
@@ -475,14 +546,17 @@
               /* without content-length or chunked encoding, we
                  can't keep the connection alive since the close is
                  the end signal so we bail out at once instead */
-              s->keepon = FALSE;
+              s->keepon = KEEPON_DONE;
             }
           }
           else
-            s->keepon = FALSE;
-          if(!s->cl)
+            s->keepon = KEEPON_DONE;
+
+          if(s->keepon == KEEPON_DONE && !s->cl)
             /* we did the full CONNECT treatment, go to COMPLETE */
             s->tunnel_state = TUNNEL_COMPLETE;
+
+          DEBUGASSERT(s->keepon == KEEPON_IGNORE || s->keepon == KEEPON_DONE);
           continue;
         }
 
@@ -496,7 +570,7 @@
           if(!auth)
             return CURLE_OUT_OF_MEMORY;
 
-          result = Curl_http_input_auth(conn, proxy, auth);
+          result = Curl_http_input_auth(data, proxy, auth);
 
           free(auth);
 
@@ -508,7 +582,7 @@
             /* A client MUST ignore any Content-Length or Transfer-Encoding
                header fields received in a successful response to CONNECT.
                "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
-            infof(data, "Ignoring Content-Length in CONNECT %03d response\n",
+            infof(data, "Ignoring Content-Length in CONNECT %03d response",
                   k->httpcode);
           }
           else {
@@ -524,14 +598,14 @@
                header fields received in a successful response to CONNECT.
                "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
             infof(data, "Ignoring Transfer-Encoding in "
-                  "CONNECT %03d response\n", k->httpcode);
+                  "CONNECT %03d response", k->httpcode);
           }
           else if(Curl_compareheader(linep,
                                      "Transfer-Encoding:", "chunked")) {
-            infof(data, "CONNECT responded chunked\n");
+            infof(data, "CONNECT responded chunked");
             s->chunked_encoding = TRUE;
             /* init our chunky engine */
-            Curl_httpchunk_init(conn);
+            Curl_httpchunk_init(data);
           }
         }
         else if(Curl_compareheader(linep, "Proxy-Connection:", "close"))
@@ -546,7 +620,7 @@
         Curl_dyn_reset(&s->rcvbuf);
       } /* while there's buffer left and loop is requested */
 
-      if(Curl_pgrsUpdate(conn))
+      if(Curl_pgrsUpdate(data))
         return CURLE_ABORTED_BY_CALLBACK;
 
       if(error)
@@ -555,7 +629,7 @@
       if(data->info.httpproxycode/100 != 2) {
         /* Deal with the possibly already received authenticate
            headers. 'newurl' is set to a new URL if we must loop. */
-        result = Curl_http_auth_act(conn);
+        result = Curl_http_auth_act(data);
         if(result)
           return result;
 
@@ -568,7 +642,7 @@
 
       if(s->close_connection && data->req.newurl) {
         /* Connection closed by server. Don't use it anymore */
-        Curl_closesocket(conn, conn->sock[sockindex]);
+        Curl_closesocket(data, conn, conn->sock[sockindex]);
         conn->sock[sockindex] = CURL_SOCKET_BAD;
         break;
       }
@@ -578,7 +652,7 @@
      * means the HTTP authentication is still going on so if the tunnel
      * is complete we start over in INIT state */
     if(data->req.newurl && (TUNNEL_COMPLETE == s->tunnel_state)) {
-      connect_init(conn, TRUE); /* reinit */
+      connect_init(data, TRUE); /* reinit */
     }
 
   } while(data->req.newurl);
@@ -586,15 +660,15 @@
   if(data->info.httpproxycode/100 != 2) {
     if(s->close_connection && data->req.newurl) {
       conn->bits.proxy_connect_closed = TRUE;
-      infof(data, "Connect me again please\n");
-      connect_done(conn);
+      infof(data, "Connect me again please");
+      connect_done(data);
     }
     else {
       free(data->req.newurl);
       data->req.newurl = NULL;
       /* failure, close this connection to avoid re-use */
       streamclose(conn, "proxy CONNECT failure");
-      Curl_closesocket(conn, conn->sock[sockindex]);
+      Curl_closesocket(data, conn, conn->sock[sockindex]);
       conn->sock[sockindex] = CURL_SOCKET_BAD;
     }
 
@@ -621,7 +695,7 @@
   data->state.authproxy.done = TRUE;
   data->state.authproxy.multipass = FALSE;
 
-  infof(data, "Proxy replied %d to CONNECT request\n",
+  infof(data, "Proxy replied %d to CONNECT request",
         data->info.httpproxycode);
   data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */
   conn->bits.rewindaftersend = FALSE; /* make sure this isn't set for the
@@ -629,6 +703,256 @@
   Curl_dyn_free(&s->rcvbuf);
   return CURLE_OK;
 }
+#else
+/* The Hyper version of CONNECT */
+static CURLcode CONNECT(struct Curl_easy *data,
+                        int sockindex,
+                        const char *hostname,
+                        int remote_port)
+{
+  struct connectdata *conn = data->conn;
+  struct hyptransfer *h = &data->hyp;
+  curl_socket_t tunnelsocket = conn->sock[sockindex];
+  struct http_connect_state *s = conn->connect_state;
+  CURLcode result = CURLE_OUT_OF_MEMORY;
+  hyper_io *io = NULL;
+  hyper_request *req = NULL;
+  hyper_headers *headers = NULL;
+  hyper_clientconn_options *options = NULL;
+  hyper_task *handshake = NULL;
+  hyper_task *task = NULL; /* for the handshake */
+  hyper_task *sendtask = NULL; /* for the send */
+  hyper_clientconn *client = NULL;
+  hyper_error *hypererr = NULL;
+  char *hostheader = NULL; /* for CONNECT */
+  char *host = NULL; /* Host: */
+
+  if(Curl_connect_complete(conn))
+    return CURLE_OK; /* CONNECT is already completed */
+
+  conn->bits.proxy_connect_closed = FALSE;
+
+  do {
+    switch(s->tunnel_state) {
+    case TUNNEL_INIT:
+      /* BEGIN CONNECT PHASE */
+      io = hyper_io_new();
+      if(!io) {
+        failf(data, "Couldn't create hyper IO");
+        goto error;
+      }
+      /* tell Hyper how to read/write network data */
+      hyper_io_set_userdata(io, data);
+      hyper_io_set_read(io, Curl_hyper_recv);
+      hyper_io_set_write(io, Curl_hyper_send);
+      conn->sockfd = tunnelsocket;
+
+      data->state.hconnect = TRUE;
+
+      /* create an executor to poll futures */
+      if(!h->exec) {
+        h->exec = hyper_executor_new();
+        if(!h->exec) {
+          failf(data, "Couldn't create hyper executor");
+          goto error;
+        }
+      }
+
+      options = hyper_clientconn_options_new();
+      if(!options) {
+        failf(data, "Couldn't create hyper client options");
+        goto error;
+      }
+
+      hyper_clientconn_options_exec(options, h->exec);
+
+      /* "Both the `io` and the `options` are consumed in this function
+         call" */
+      handshake = hyper_clientconn_handshake(io, options);
+      if(!handshake) {
+        failf(data, "Couldn't create hyper client handshake");
+        goto error;
+      }
+      io = NULL;
+      options = NULL;
+
+      if(HYPERE_OK != hyper_executor_push(h->exec, handshake)) {
+        failf(data, "Couldn't hyper_executor_push the handshake");
+        goto error;
+      }
+      handshake = NULL; /* ownership passed on */
+
+      task = hyper_executor_poll(h->exec);
+      if(!task) {
+        failf(data, "Couldn't hyper_executor_poll the handshake");
+        goto error;
+      }
+
+      client = hyper_task_value(task);
+      hyper_task_free(task);
+      req = hyper_request_new();
+      if(!req) {
+        failf(data, "Couldn't hyper_request_new");
+        goto error;
+      }
+      if(hyper_request_set_method(req, (uint8_t *)"CONNECT",
+                                  strlen("CONNECT"))) {
+        failf(data, "error setting method");
+        goto error;
+      }
+
+      result = CONNECT_host(data, conn, hostname, remote_port,
+                            &hostheader, &host);
+      if(result)
+        goto error;
+
+      if(hyper_request_set_uri(req, (uint8_t *)hostheader,
+                               strlen(hostheader))) {
+        failf(data, "error setting path");
+        result = CURLE_OUT_OF_MEMORY;
+      }
+      /* Setup the proxy-authorization header, if any */
+      result = Curl_http_output_auth(data, conn, "CONNECT", HTTPREQ_GET,
+                                     hostheader, TRUE);
+      if(result)
+        goto error;
+      Curl_safefree(hostheader);
+
+      /* default is 1.1 */
+      if((conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0) &&
+         (HYPERE_OK != hyper_request_set_version(req,
+                                                 HYPER_HTTP_VERSION_1_0))) {
+        failf(data, "error setting HTTP version");
+        goto error;
+      }
+
+      headers = hyper_request_headers(req);
+      if(!headers) {
+        failf(data, "hyper_request_headers");
+        goto error;
+      }
+      if(host && Curl_hyper_header(data, headers, host))
+        goto error;
+      Curl_safefree(host);
+
+      if(data->state.aptr.proxyuserpwd &&
+         Curl_hyper_header(data, headers, data->state.aptr.proxyuserpwd))
+        goto error;
+
+      if(data->set.str[STRING_USERAGENT] &&
+         *data->set.str[STRING_USERAGENT] &&
+         data->state.aptr.uagent &&
+         Curl_hyper_header(data, headers, data->state.aptr.uagent))
+        goto error;
+
+      if(!Curl_checkProxyheaders(data, conn, "Proxy-Connection") &&
+         Curl_hyper_header(data, headers, "Proxy-Connection: Keep-Alive"))
+        goto error;
+
+      sendtask = hyper_clientconn_send(client, req);
+      if(!sendtask) {
+        failf(data, "hyper_clientconn_send");
+        goto error;
+      }
+
+      if(HYPERE_OK != hyper_executor_push(h->exec, sendtask)) {
+        failf(data, "Couldn't hyper_executor_push the send");
+        goto error;
+      }
+
+      hyper_clientconn_free(client);
+
+      do {
+        task = hyper_executor_poll(h->exec);
+        if(task) {
+          bool error = hyper_task_type(task) == HYPER_TASK_ERROR;
+          if(error)
+            hypererr = hyper_task_value(task);
+          hyper_task_free(task);
+          if(error)
+            goto error;
+        }
+      } while(task);
+      s->tunnel_state = TUNNEL_CONNECT;
+      /* FALLTHROUGH */
+    case TUNNEL_CONNECT: {
+      int didwhat;
+      bool done = FALSE;
+      result = Curl_hyper_stream(data, conn, &didwhat, &done,
+                                 CURL_CSELECT_IN | CURL_CSELECT_OUT);
+      if(result)
+        goto error;
+      if(!done)
+        break;
+      s->tunnel_state = TUNNEL_COMPLETE;
+      if(h->exec) {
+        hyper_executor_free(h->exec);
+        h->exec = NULL;
+      }
+      if(h->read_waker) {
+        hyper_waker_free(h->read_waker);
+        h->read_waker = NULL;
+      }
+      if(h->write_waker) {
+        hyper_waker_free(h->write_waker);
+        h->write_waker = NULL;
+      }
+    }
+      /* FALLTHROUGH */
+    default:
+      break;
+    }
+  } while(data->req.newurl);
+
+  result = CURLE_OK;
+  if(s->tunnel_state == TUNNEL_COMPLETE) {
+    data->info.httpproxycode = data->req.httpcode;
+    if(data->info.httpproxycode/100 != 2) {
+      if(conn->bits.close && data->req.newurl) {
+        conn->bits.proxy_connect_closed = TRUE;
+        infof(data, "Connect me again please");
+        connect_done(data);
+      }
+      else {
+        free(data->req.newurl);
+        data->req.newurl = NULL;
+        /* failure, close this connection to avoid re-use */
+        streamclose(conn, "proxy CONNECT failure");
+        Curl_closesocket(data, conn, conn->sock[sockindex]);
+        conn->sock[sockindex] = CURL_SOCKET_BAD;
+      }
+
+      /* to back to init state */
+      s->tunnel_state = TUNNEL_INIT;
+
+      if(!conn->bits.proxy_connect_closed) {
+        failf(data, "Received HTTP code %d from proxy after CONNECT",
+              data->req.httpcode);
+        result = CURLE_RECV_ERROR;
+      }
+    }
+  }
+  error:
+  free(host);
+  free(hostheader);
+  if(io)
+    hyper_io_free(io);
+
+  if(options)
+    hyper_clientconn_options_free(options);
+
+  if(handshake)
+    hyper_task_free(handshake);
+
+  if(hypererr) {
+    uint8_t errbuf[256];
+    size_t errlen = hyper_error_print(hypererr, errbuf, sizeof(errbuf));
+    failf(data, "Hyper: %.*s", (int)errlen, errbuf);
+    hyper_error_free(hypererr);
+  }
+  return result;
+}
+#endif
 
 void Curl_connect_free(struct Curl_easy *data)
 {
@@ -646,21 +970,22 @@
  * this proxy. After that, the socket can be used just as a normal socket.
  */
 
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+CURLcode Curl_proxyCONNECT(struct Curl_easy *data,
                            int sockindex,
                            const char *hostname,
                            int remote_port)
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
   if(!conn->connect_state) {
-    result = connect_init(conn, FALSE);
+    result = connect_init(data, FALSE);
     if(result)
       return result;
   }
-  result = CONNECT(conn, sockindex, hostname, remote_port);
+  result = CONNECT(data, sockindex, hostname, remote_port);
 
   if(result || Curl_connect_complete(conn))
-    connect_done(conn);
+    connect_done(data);
 
   return result;
 }
diff --git a/lib/http_proxy.h b/lib/http_proxy.h
index 29988a6..cdf8de4 100644
--- a/lib/http_proxy.h
+++ b/lib/http_proxy.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,26 +27,51 @@
 
 #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
 /* ftp can use this as well */
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+CURLcode Curl_proxyCONNECT(struct Curl_easy *data,
                            int tunnelsocket,
                            const char *hostname, int remote_port);
 
 /* Default proxy timeout in milliseconds */
 #define PROXY_TIMEOUT (3600*1000)
 
-CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_proxy_connect(struct Curl_easy *data, int sockindex);
 
 bool Curl_connect_complete(struct connectdata *conn);
 bool Curl_connect_ongoing(struct connectdata *conn);
+int Curl_connect_getsock(struct connectdata *conn);
 
 #else
 #define Curl_proxyCONNECT(x,y,z,w) CURLE_NOT_BUILT_IN
 #define Curl_proxy_connect(x,y) CURLE_OK
 #define Curl_connect_complete(x) CURLE_OK
 #define Curl_connect_ongoing(x) FALSE
+#define Curl_connect_getsock(x) 0
 #endif
 
 void Curl_connect_free(struct Curl_easy *data);
 void Curl_connect_done(struct Curl_easy *data);
 
+/* struct for HTTP CONNECT state data */
+struct http_connect_state {
+  struct HTTP http_proxy;
+  struct HTTP *prot_save;
+  struct dynbuf rcvbuf;
+  struct dynbuf req;
+  size_t nsend;
+  enum keeponval {
+    KEEPON_DONE,
+    KEEPON_CONNECT,
+    KEEPON_IGNORE
+  } keepon;
+  curl_off_t cl; /* size of content to read and ignore */
+  enum {
+    TUNNEL_INIT,     /* init/default/no tunnel state */
+    TUNNEL_CONNECT,  /* CONNECT has been sent off */
+    TUNNEL_COMPLETE, /* CONNECT response received completely */
+    TUNNEL_EXIT
+  } tunnel_state;
+  BIT(chunked_encoding);
+  BIT(close_connection);
+};
+
 #endif /* HEADER_CURL_HTTP_PROXY_H */
diff --git a/lib/idn_win32.c b/lib/idn_win32.c
index 2f5850d..1d475a4 100644
--- a/lib/idn_win32.c
+++ b/lib/idn_win32.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 3938869..21e00b1 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/if2ip.h b/lib/if2ip.h
index f193d42..e074e47 100644
--- a/lib/if2ip.h
+++ b/lib/if2ip.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/imap.c b/lib/imap.c
index 46367be..ab4d412 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -88,25 +88,31 @@
 #include "memdebug.h"
 
 /* Local API functions */
-static CURLcode imap_regular_transfer(struct connectdata *conn, bool *done);
-static CURLcode imap_do(struct connectdata *conn, bool *done);
-static CURLcode imap_done(struct connectdata *conn, CURLcode status,
+static CURLcode imap_regular_transfer(struct Curl_easy *data, bool *done);
+static CURLcode imap_do(struct Curl_easy *data, bool *done);
+static CURLcode imap_done(struct Curl_easy *data, CURLcode status,
                           bool premature);
-static CURLcode imap_connect(struct connectdata *conn, bool *done);
-static CURLcode imap_disconnect(struct connectdata *conn, bool dead);
-static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done);
-static int imap_getsock(struct connectdata *conn, curl_socket_t *socks);
-static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done);
-static CURLcode imap_setup_connection(struct connectdata *conn);
+static CURLcode imap_connect(struct Curl_easy *data, bool *done);
+static CURLcode imap_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead);
+static CURLcode imap_multi_statemach(struct Curl_easy *data, bool *done);
+static int imap_getsock(struct Curl_easy *data, struct connectdata *conn,
+                        curl_socket_t *socks);
+static CURLcode imap_doing(struct Curl_easy *data, bool *dophase_done);
+static CURLcode imap_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
 static char *imap_atom(const char *str, bool escape_only);
-static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...);
+static CURLcode imap_sendf(struct Curl_easy *data,
+                           struct connectdata *conn, const char *fmt, ...);
 static CURLcode imap_parse_url_options(struct connectdata *conn);
-static CURLcode imap_parse_url_path(struct connectdata *conn);
-static CURLcode imap_parse_custom_request(struct connectdata *conn);
-static CURLcode imap_perform_authenticate(struct connectdata *conn,
+static CURLcode imap_parse_url_path(struct Curl_easy *data);
+static CURLcode imap_parse_custom_request(struct Curl_easy *data);
+static CURLcode imap_perform_authenticate(struct Curl_easy *data,
+                                          struct connectdata *conn,
                                           const char *mech,
                                           const char *initresp);
-static CURLcode imap_continue_authenticate(struct connectdata *conn,
+static CURLcode imap_continue_authenticate(struct Curl_easy *data,
+                                           struct connectdata *conn,
                                            const char *resp);
 static void imap_get_message(char *buffer, char **outptr);
 
@@ -130,6 +136,7 @@
   imap_disconnect,                  /* disconnect */
   ZERO_NULL,                        /* readwrite */
   ZERO_NULL,                        /* connection_check */
+  ZERO_NULL,                        /* attach connection */
   PORT_IMAP,                        /* defport */
   CURLPROTO_IMAP,                   /* protocol */
   CURLPROTO_IMAP,                   /* family */
@@ -158,6 +165,7 @@
   imap_disconnect,                  /* disconnect */
   ZERO_NULL,                        /* readwrite */
   ZERO_NULL,                        /* connection_check */
+  ZERO_NULL,                        /* attach connection */
   PORT_IMAPS,                       /* defport */
   CURLPROTO_IMAPS,                  /* protocol */
   CURLPROTO_IMAP,                   /* family */
@@ -243,10 +251,10 @@
  * Checks whether the given string is a valid tagged, untagged or continuation
  * response which can be processed by the response handler.
  */
-static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
-                           int *resp)
+static bool imap_endofresp(struct Curl_easy *data, struct connectdata *conn,
+                           char *line, size_t len, int *resp)
 {
-  struct IMAP *imap = conn->data->req.protop;
+  struct IMAP *imap = data->req.p.imap;
   struct imap_conn *imapc = &conn->proto.imapc;
   const char *id = imapc->resptag;
   size_t id_len = strlen(id);
@@ -328,7 +336,7 @@
         break;
 
       default:
-        failf(conn->data, "Unexpected continuation response");
+        failf(data, "Unexpected continuation response");
         *resp = -1;
         break;
     }
@@ -381,9 +389,9 @@
  *
  * This is the ONLY way to change IMAP state!
  */
-static void state(struct connectdata *conn, imapstate newstate)
+static void state(struct Curl_easy *data, imapstate newstate)
 {
-  struct imap_conn *imapc = &conn->proto.imapc;
+  struct imap_conn *imapc = &data->conn->proto.imapc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
   static const char * const names[]={
@@ -406,7 +414,7 @@
   };
 
   if(imapc->state != newstate)
-    infof(conn->data, "IMAP %p state change from %s to %s\n",
+    infof(data, "IMAP %p state change from %s to %s",
           (void *)imapc, names[imapc->state], names[newstate]);
 #endif
 
@@ -420,7 +428,8 @@
  * Sends the CAPABILITY command in order to obtain a list of server side
  * supported capabilities.
  */
-static CURLcode imap_perform_capability(struct connectdata *conn)
+static CURLcode imap_perform_capability(struct Curl_easy *data,
+                                        struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct imap_conn *imapc = &conn->proto.imapc;
@@ -429,10 +438,10 @@
   imapc->tls_supported = FALSE;           /* Clear the TLS capability */
 
   /* Send the CAPABILITY command */
-  result = imap_sendf(conn, "CAPABILITY");
+  result = imap_sendf(data, conn, "CAPABILITY");
 
   if(!result)
-    state(conn, IMAP_CAPABILITY);
+    state(data, IMAP_CAPABILITY);
 
   return result;
 }
@@ -443,13 +452,14 @@
  *
  * Sends the STARTTLS command to start the upgrade to TLS.
  */
-static CURLcode imap_perform_starttls(struct connectdata *conn)
+static CURLcode imap_perform_starttls(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   /* Send the STARTTLS command */
-  CURLcode result = imap_sendf(conn, "STARTTLS");
+  CURLcode result = imap_sendf(data, conn, "STARTTLS");
 
   if(!result)
-    state(conn, IMAP_STARTTLS);
+    state(data, IMAP_STARTTLS);
 
   return result;
 }
@@ -460,20 +470,21 @@
  *
  * Performs the upgrade to TLS.
  */
-static CURLcode imap_perform_upgrade_tls(struct connectdata *conn)
+static CURLcode imap_perform_upgrade_tls(struct Curl_easy *data,
+                                         struct connectdata *conn)
 {
   /* Start the SSL connection */
   struct imap_conn *imapc = &conn->proto.imapc;
-  CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET,
-                                                 &imapc->ssldone);
+  CURLcode result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                                 FIRSTSOCKET, &imapc->ssldone);
 
   if(!result) {
     if(imapc->state != IMAP_UPGRADETLS)
-      state(conn, IMAP_UPGRADETLS);
+      state(data, IMAP_UPGRADETLS);
 
     if(imapc->ssldone) {
       imap_to_imaps(conn);
-      result = imap_perform_capability(conn);
+      result = imap_perform_capability(data, conn);
     }
   }
 
@@ -486,7 +497,8 @@
  *
  * Sends a clear text LOGIN command to authenticate with.
  */
-static CURLcode imap_perform_login(struct connectdata *conn)
+static CURLcode imap_perform_login(struct Curl_easy *data,
+                                   struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   char *user;
@@ -495,7 +507,7 @@
   /* Check we have a username and password to authenticate with and end the
      connect phase if we don't */
   if(!conn->bits.user_passwd) {
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
 
     return result;
   }
@@ -505,14 +517,14 @@
   passwd = imap_atom(conn->passwd, false);
 
   /* Send the LOGIN command */
-  result = imap_sendf(conn, "LOGIN %s %s", user ? user : "",
+  result = imap_sendf(data, conn, "LOGIN %s %s", user ? user : "",
                       passwd ? passwd : "");
 
   free(user);
   free(passwd);
 
   if(!result)
-    state(conn, IMAP_LOGIN);
+    state(data, IMAP_LOGIN);
 
   return result;
 }
@@ -524,19 +536,21 @@
  * Sends an AUTHENTICATE command allowing the client to login with the given
  * SASL authentication mechanism.
  */
-static CURLcode imap_perform_authenticate(struct connectdata *conn,
+static CURLcode imap_perform_authenticate(struct Curl_easy *data,
+                                          struct connectdata *conn,
                                           const char *mech,
                                           const char *initresp)
 {
   CURLcode result = CURLE_OK;
+  (void)data;
 
   if(initresp) {
     /* Send the AUTHENTICATE command with the initial response */
-    result = imap_sendf(conn, "AUTHENTICATE %s %s", mech, initresp);
+    result = imap_sendf(data, conn, "AUTHENTICATE %s %s", mech, initresp);
   }
   else {
     /* Send the AUTHENTICATE command */
-    result = imap_sendf(conn, "AUTHENTICATE %s", mech);
+    result = imap_sendf(data, conn, "AUTHENTICATE %s", mech);
   }
 
   return result;
@@ -548,12 +562,13 @@
  *
  * Sends SASL continuation data or cancellation.
  */
-static CURLcode imap_continue_authenticate(struct connectdata *conn,
+static CURLcode imap_continue_authenticate(struct Curl_easy *data,
+                                           struct connectdata *conn,
                                            const char *resp)
 {
   struct imap_conn *imapc = &conn->proto.imapc;
 
-  return Curl_pp_sendf(&imapc->pp, "%s", resp);
+  return Curl_pp_sendf(data, &imapc->pp, "%s", resp);
 }
 
 /***********************************************************************
@@ -564,7 +579,8 @@
  * authentication mechanism, falling back to clear text should a common
  * mechanism not be available between the client and server.
  */
-static CURLcode imap_perform_authentication(struct connectdata *conn)
+static CURLcode imap_perform_authentication(struct Curl_easy *data,
+                                            struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct imap_conn *imapc = &conn->proto.imapc;
@@ -574,22 +590,23 @@
      with and end the connect phase if we don't */
   if(imapc->preauth ||
      !Curl_sasl_can_authenticate(&imapc->sasl, conn)) {
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
     return result;
   }
 
   /* Calculate the SASL login details */
-  result = Curl_sasl_start(&imapc->sasl, conn, imapc->ir_supported, &progress);
+  result = Curl_sasl_start(&imapc->sasl, data, conn,
+                           imapc->ir_supported, &progress);
 
   if(!result) {
     if(progress == SASL_INPROGRESS)
-      state(conn, IMAP_AUTHENTICATE);
+      state(data, IMAP_AUTHENTICATE);
     else if(!imapc->login_disabled && (imapc->preftype & IMAP_TYPE_CLEARTEXT))
       /* Perform clear text authentication */
-      result = imap_perform_login(conn);
+      result = imap_perform_login(data, conn);
     else {
       /* Other mechanisms not supported */
-      infof(conn->data, "No known authentication mechanisms supported!\n");
+      infof(data, "No known authentication mechanisms supported!");
       result = CURLE_LOGIN_DENIED;
     }
   }
@@ -603,15 +620,15 @@
  *
  * Sends a LIST command or an alternative custom request.
  */
-static CURLcode imap_perform_list(struct connectdata *conn)
+static CURLcode imap_perform_list(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct IMAP *imap = data->req.p.imap;
 
   if(imap->custom)
     /* Send the custom request */
-    result = imap_sendf(conn, "%s%s", imap->custom,
+    result = imap_sendf(data, conn, "%s%s", imap->custom,
                         imap->custom_params ? imap->custom_params : "");
   else {
     /* Make sure the mailbox is in the correct atom format if necessary */
@@ -621,13 +638,13 @@
       return CURLE_OUT_OF_MEMORY;
 
     /* Send the LIST command */
-    result = imap_sendf(conn, "LIST \"%s\" *", mailbox);
+    result = imap_sendf(data, conn, "LIST \"%s\" *", mailbox);
 
     free(mailbox);
   }
 
   if(!result)
-    state(conn, IMAP_LIST);
+    state(data, IMAP_LIST);
 
   return result;
 }
@@ -638,11 +655,11 @@
  *
  * Sends a SELECT command to ask the server to change the selected mailbox.
  */
-static CURLcode imap_perform_select(struct connectdata *conn)
+static CURLcode imap_perform_select(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct IMAP *imap = data->req.p.imap;
   struct imap_conn *imapc = &conn->proto.imapc;
   char *mailbox;
 
@@ -652,7 +669,7 @@
 
   /* Check we have a mailbox */
   if(!imap->mailbox) {
-    failf(conn->data, "Cannot SELECT without a mailbox.");
+    failf(data, "Cannot SELECT without a mailbox.");
     return CURLE_URL_MALFORMAT;
   }
 
@@ -662,12 +679,12 @@
     return CURLE_OUT_OF_MEMORY;
 
   /* Send the SELECT command */
-  result = imap_sendf(conn, "SELECT %s", mailbox);
+  result = imap_sendf(data, conn, "SELECT %s", mailbox);
 
   free(mailbox);
 
   if(!result)
-    state(conn, IMAP_SELECT);
+    state(data, IMAP_SELECT);
 
   return result;
 }
@@ -678,43 +695,39 @@
  *
  * Sends a FETCH command to initiate the download of a message.
  */
-static CURLcode imap_perform_fetch(struct connectdata *conn)
+static CURLcode imap_perform_fetch(struct Curl_easy *data,
+                                   struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct IMAP *imap = conn->data->req.protop;
+  struct IMAP *imap = data->req.p.imap;
   /* Check we have a UID */
   if(imap->uid) {
 
     /* Send the FETCH command */
     if(imap->partial)
-      result = imap_sendf(conn, "UID FETCH %s BODY[%s]<%s>",
-                            imap->uid,
-                            imap->section ? imap->section : "",
-                            imap->partial);
+      result = imap_sendf(data, conn, "UID FETCH %s BODY[%s]<%s>",
+                          imap->uid, imap->section ? imap->section : "",
+                          imap->partial);
     else
-      result = imap_sendf(conn, "UID FETCH %s BODY[%s]",
-                            imap->uid,
-                            imap->section ? imap->section : "");
+      result = imap_sendf(data, conn, "UID FETCH %s BODY[%s]",
+                          imap->uid, imap->section ? imap->section : "");
   }
   else if(imap->mindex) {
-
     /* Send the FETCH command */
     if(imap->partial)
-      result = imap_sendf(conn, "FETCH %s BODY[%s]<%s>",
-                            imap->mindex,
-                            imap->section ? imap->section : "",
-                            imap->partial);
+      result = imap_sendf(data, conn, "FETCH %s BODY[%s]<%s>",
+                          imap->mindex, imap->section ? imap->section : "",
+                          imap->partial);
     else
-      result = imap_sendf(conn, "FETCH %s BODY[%s]",
-                            imap->mindex,
-                            imap->section ? imap->section : "");
+      result = imap_sendf(data, conn, "FETCH %s BODY[%s]",
+                          imap->mindex, imap->section ? imap->section : "");
   }
   else {
-        failf(conn->data, "Cannot FETCH without a UID.");
-        return CURLE_URL_MALFORMAT;
+    failf(data, "Cannot FETCH without a UID.");
+    return CURLE_URL_MALFORMAT;
   }
   if(!result)
-    state(conn, IMAP_FETCH);
+    state(data, IMAP_FETCH);
 
   return result;
 }
@@ -725,11 +738,11 @@
  *
  * Sends an APPEND command to initiate the upload of a message.
  */
-static CURLcode imap_perform_append(struct connectdata *conn)
+static CURLcode imap_perform_append(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct IMAP *imap = data->req.p.imap;
   char *mailbox;
 
   /* Check we have a mailbox */
@@ -749,7 +762,7 @@
                                        NULL, MIMESTRATEGY_MAIL);
 
     if(!result)
-      if(!Curl_checkheaders(conn, "Mime-Version"))
+      if(!Curl_checkheaders(data, "Mime-Version"))
         result = Curl_mime_add_header(&data->set.mimepost.curlheaders,
                                       "Mime-Version: 1.0");
 
@@ -769,7 +782,7 @@
 
   /* Check we know the size of the upload */
   if(data->state.infilesize < 0) {
-    failf(data, "Cannot APPEND with unknown input file size\n");
+    failf(data, "Cannot APPEND with unknown input file size");
     return CURLE_UPLOAD_FAILED;
   }
 
@@ -779,13 +792,14 @@
     return CURLE_OUT_OF_MEMORY;
 
   /* Send the APPEND command */
-  result = imap_sendf(conn, "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
+  result = imap_sendf(data, conn,
+                      "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
                       mailbox, data->state.infilesize);
 
   free(mailbox);
 
   if(!result)
-    state(conn, IMAP_APPEND);
+    state(data, IMAP_APPEND);
 
   return result;
 }
@@ -796,22 +810,23 @@
  *
  * Sends a SEARCH command.
  */
-static CURLcode imap_perform_search(struct connectdata *conn)
+static CURLcode imap_perform_search(struct Curl_easy *data,
+                                    struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct IMAP *imap = conn->data->req.protop;
+  struct IMAP *imap = data->req.p.imap;
 
   /* Check we have a query string */
   if(!imap->query) {
-    failf(conn->data, "Cannot SEARCH without a query string.");
+    failf(data, "Cannot SEARCH without a query string.");
     return CURLE_URL_MALFORMAT;
   }
 
   /* Send the SEARCH command */
-  result = imap_sendf(conn, "SEARCH %s", imap->query);
+  result = imap_sendf(data, conn, "SEARCH %s", imap->query);
 
   if(!result)
-    state(conn, IMAP_SEARCH);
+    state(data, IMAP_SEARCH);
 
   return result;
 }
@@ -822,46 +837,47 @@
  *
  * Performs the logout action prior to sclose() being called.
  */
-static CURLcode imap_perform_logout(struct connectdata *conn)
+static CURLcode imap_perform_logout(struct Curl_easy *data,
+                                    struct connectdata *conn)
 {
   /* Send the LOGOUT command */
-  CURLcode result = imap_sendf(conn, "LOGOUT");
+  CURLcode result = imap_sendf(data, conn, "LOGOUT");
 
   if(!result)
-    state(conn, IMAP_LOGOUT);
+    state(data, IMAP_LOGOUT);
 
   return result;
 }
 
 /* For the initial server greeting */
-static CURLcode imap_state_servergreet_resp(struct connectdata *conn,
+static CURLcode imap_state_servergreet_resp(struct Curl_easy *data,
                                             int imapcode,
                                             imapstate instate)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   (void)instate; /* no use for this yet */
 
   if(imapcode == IMAP_RESP_PREAUTH) {
     /* PREAUTH */
     struct imap_conn *imapc = &conn->proto.imapc;
     imapc->preauth = TRUE;
-    infof(data, "PREAUTH connection, already authenticated!\n");
+    infof(data, "PREAUTH connection, already authenticated!");
   }
   else if(imapcode != IMAP_RESP_OK) {
     failf(data, "Got unexpected imap-server response");
     return CURLE_WEIRD_SERVER_REPLY;
   }
 
-  return imap_perform_capability(conn);
+  return imap_perform_capability(data, conn);
 }
 
 /* For CAPABILITY responses */
-static CURLcode imap_state_capability_resp(struct connectdata *conn,
+static CURLcode imap_state_capability_resp(struct Curl_easy *data,
                                            int imapcode,
                                            imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct imap_conn *imapc = &conn->proto.imapc;
   const char *line = data->state.buffer;
 
@@ -905,7 +921,7 @@
       /* Do we have a SASL based authentication mechanism? */
       else if(wordlen > 5 && !memcmp(line, "AUTH=", 5)) {
         size_t llen;
-        unsigned int mechbit;
+        unsigned short mechbit;
 
         line += 5;
         wordlen -= 5;
@@ -924,31 +940,31 @@
       /* We don't have a SSL/TLS connection yet, but SSL is requested */
       if(imapc->tls_supported)
         /* Switch to TLS connection now */
-        result = imap_perform_starttls(conn);
+        result = imap_perform_starttls(data, conn);
       else if(data->set.use_ssl == CURLUSESSL_TRY)
         /* Fallback and carry on with authentication */
-        result = imap_perform_authentication(conn);
+        result = imap_perform_authentication(data, conn);
       else {
         failf(data, "STARTTLS not supported.");
         result = CURLE_USE_SSL_FAILED;
       }
     }
     else
-      result = imap_perform_authentication(conn);
+      result = imap_perform_authentication(data, conn);
   }
   else
-    result = imap_perform_authentication(conn);
+    result = imap_perform_authentication(data, conn);
 
   return result;
 }
 
 /* For STARTTLS responses */
-static CURLcode imap_state_starttls_resp(struct connectdata *conn,
+static CURLcode imap_state_starttls_resp(struct Curl_easy *data,
                                          int imapcode,
                                          imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   (void)instate; /* no use for this yet */
 
@@ -958,36 +974,36 @@
       result = CURLE_USE_SSL_FAILED;
     }
     else
-      result = imap_perform_authentication(conn);
+      result = imap_perform_authentication(data, conn);
   }
   else
-    result = imap_perform_upgrade_tls(conn);
+    result = imap_perform_upgrade_tls(data, conn);
 
   return result;
 }
 
 /* For SASL authentication responses */
-static CURLcode imap_state_auth_resp(struct connectdata *conn,
+static CURLcode imap_state_auth_resp(struct Curl_easy *data,
+                                     struct connectdata *conn,
                                      int imapcode,
                                      imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct imap_conn *imapc = &conn->proto.imapc;
   saslprogress progress;
 
   (void)instate; /* no use for this yet */
 
-  result = Curl_sasl_continue(&imapc->sasl, conn, imapcode, &progress);
+  result = Curl_sasl_continue(&imapc->sasl, data, conn, imapcode, &progress);
   if(!result)
     switch(progress) {
     case SASL_DONE:
-      state(conn, IMAP_STOP);  /* Authenticated */
+      state(data, IMAP_STOP);  /* Authenticated */
       break;
     case SASL_IDLE:            /* No mechanism left after cancellation */
       if((!imapc->login_disabled) && (imapc->preftype & IMAP_TYPE_CLEARTEXT))
         /* Perform clear text authentication */
-        result = imap_perform_login(conn);
+        result = imap_perform_login(data, conn);
       else {
         failf(data, "Authentication cancelled");
         result = CURLE_LOGIN_DENIED;
@@ -1001,13 +1017,11 @@
 }
 
 /* For LOGIN responses */
-static CURLcode imap_state_login_resp(struct connectdata *conn,
+static CURLcode imap_state_login_resp(struct Curl_easy *data,
                                       int imapcode,
                                       imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(imapcode != IMAP_RESP_OK) {
@@ -1016,18 +1030,18 @@
   }
   else
     /* End of connect phase */
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
 
   return result;
 }
 
 /* For LIST and SEARCH responses */
-static CURLcode imap_state_listsearch_resp(struct connectdata *conn,
+static CURLcode imap_state_listsearch_resp(struct Curl_easy *data,
                                            int imapcode,
                                            imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  char *line = conn->data->state.buffer;
+  char *line = data->state.buffer;
   size_t len = strlen(line);
 
   (void)instate; /* No use for this yet */
@@ -1035,25 +1049,25 @@
   if(imapcode == '*') {
     /* Temporarily add the LF character back and send as body to the client */
     line[len] = '\n';
-    result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
+    result = Curl_client_write(data, CLIENTWRITE_BODY, line, len + 1);
     line[len] = '\0';
   }
   else if(imapcode != IMAP_RESP_OK)
     result = CURLE_QUOTE_ERROR;
   else
     /* End of DO phase */
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
 
   return result;
 }
 
 /* For SELECT responses */
-static CURLcode imap_state_select_resp(struct connectdata *conn, int imapcode,
+static CURLcode imap_state_select_resp(struct Curl_easy *data, int imapcode,
                                        imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct IMAP *imap = data->req.p.imap;
   struct imap_conn *imapc = &conn->proto.imapc;
   const char *line = data->state.buffer;
 
@@ -1071,7 +1085,7 @@
     /* Check if the UIDVALIDITY has been specified and matches */
     if(imap->uidvalidity && imapc->mailbox_uidvalidity &&
        !strcasecompare(imap->uidvalidity, imapc->mailbox_uidvalidity)) {
-      failf(conn->data, "Mailbox UIDVALIDITY has changed");
+      failf(data, "Mailbox UIDVALIDITY has changed");
       result = CURLE_REMOTE_FILE_NOT_FOUND;
     }
     else {
@@ -1079,11 +1093,11 @@
       imapc->mailbox = strdup(imap->mailbox);
 
       if(imap->custom)
-        result = imap_perform_list(conn);
+        result = imap_perform_list(data);
       else if(imap->query)
-        result = imap_perform_search(conn);
+        result = imap_perform_search(data, conn);
       else
-        result = imap_perform_fetch(conn);
+        result = imap_perform_fetch(data, conn);
     }
   }
   else {
@@ -1095,11 +1109,11 @@
 }
 
 /* For the (first line of the) FETCH responses */
-static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
+static CURLcode imap_state_fetch_resp(struct Curl_easy *data,
+                                      struct connectdata *conn, int imapcode,
                                       imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct imap_conn *imapc = &conn->proto.imapc;
   struct pingpong *pp = &imapc->pp;
   const char *ptr = data->state.buffer;
@@ -1110,7 +1124,7 @@
 
   if(imapcode != '*') {
     Curl_pgrsSetDownloadSize(data, -1);
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
     return CURLE_REMOTE_FILE_NOT_FOUND;
   }
 
@@ -1129,7 +1143,7 @@
   }
 
   if(parsed) {
-    infof(data, "Found %" CURL_FORMAT_CURL_OFF_T " bytes to download\n",
+    infof(data, "Found %" CURL_FORMAT_CURL_OFF_T " bytes to download",
           size);
     Curl_pgrsSetDownloadSize(data, size);
 
@@ -1145,17 +1159,17 @@
 
       if(!chunk) {
         /* no size, we're done with the data */
-        state(conn, IMAP_STOP);
+        state(data, IMAP_STOP);
         return CURLE_OK;
       }
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
+      result = Curl_client_write(data, CLIENTWRITE_BODY, pp->cache, chunk);
       if(result)
         return result;
 
       data->req.bytecount += chunk;
 
       infof(data, "Written %zu bytes, %" CURL_FORMAT_CURL_OFF_TU
-            " bytes are left for transfer\n", chunk, size - chunk);
+            " bytes are left for transfer", chunk, size - chunk);
 
       /* Have we used the entire cache or just part of it?*/
       if(pp->cache_size > chunk) {
@@ -1186,18 +1200,18 @@
   }
   else {
     /* We don't know how to parse this line */
-    failf(pp->conn->data, "Failed to parse FETCH response.");
+    failf(data, "Failed to parse FETCH response.");
     result = CURLE_WEIRD_SERVER_REPLY;
   }
 
   /* End of DO phase */
-  state(conn, IMAP_STOP);
+  state(data, IMAP_STOP);
 
   return result;
 }
 
 /* For final FETCH responses performed after the download */
-static CURLcode imap_state_fetch_final_resp(struct connectdata *conn,
+static CURLcode imap_state_fetch_final_resp(struct Curl_easy *data,
                                             int imapcode,
                                             imapstate instate)
 {
@@ -1209,18 +1223,16 @@
     result = CURLE_WEIRD_SERVER_REPLY;
   else
     /* End of DONE phase */
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
 
   return result;
 }
 
 /* For APPEND responses */
-static CURLcode imap_state_append_resp(struct connectdata *conn, int imapcode,
+static CURLcode imap_state_append_resp(struct Curl_easy *data, int imapcode,
                                        imapstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* No use for this yet */
 
   if(imapcode != '+') {
@@ -1234,14 +1246,14 @@
     Curl_setup_transfer(data, -1, -1, FALSE, FIRSTSOCKET);
 
     /* End of DO phase */
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
   }
 
   return result;
 }
 
 /* For final APPEND responses performed after the upload */
-static CURLcode imap_state_append_final_resp(struct connectdata *conn,
+static CURLcode imap_state_append_final_resp(struct Curl_easy *data,
                                              int imapcode,
                                              imapstate instate)
 {
@@ -1253,12 +1265,13 @@
     result = CURLE_UPLOAD_FAILED;
   else
     /* End of DONE phase */
-    state(conn, IMAP_STOP);
+    state(data, IMAP_STOP);
 
   return result;
 }
 
-static CURLcode imap_statemach_act(struct connectdata *conn)
+static CURLcode imap_statemachine(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
@@ -1266,18 +1279,19 @@
   struct imap_conn *imapc = &conn->proto.imapc;
   struct pingpong *pp = &imapc->pp;
   size_t nread = 0;
+  (void)data;
 
   /* Busy upgrading the connection; right now all I/O is SSL/TLS, not IMAP */
   if(imapc->state == IMAP_UPGRADETLS)
-    return imap_perform_upgrade_tls(conn);
+    return imap_perform_upgrade_tls(data, conn);
 
   /* Flush any data that needs to be sent */
   if(pp->sendleft)
-    return Curl_pp_flushsend(pp);
+    return Curl_pp_flushsend(data, pp);
 
   do {
     /* Read the response from the server */
-    result = Curl_pp_readresp(sock, pp, &imapcode, &nread);
+    result = Curl_pp_readresp(data, sock, pp, &imapcode, &nread);
     if(result)
       return result;
 
@@ -1291,55 +1305,55 @@
     /* We have now received a full IMAP server response */
     switch(imapc->state) {
     case IMAP_SERVERGREET:
-      result = imap_state_servergreet_resp(conn, imapcode, imapc->state);
+      result = imap_state_servergreet_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_CAPABILITY:
-      result = imap_state_capability_resp(conn, imapcode, imapc->state);
+      result = imap_state_capability_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_STARTTLS:
-      result = imap_state_starttls_resp(conn, imapcode, imapc->state);
+      result = imap_state_starttls_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_AUTHENTICATE:
-      result = imap_state_auth_resp(conn, imapcode, imapc->state);
+      result = imap_state_auth_resp(data, conn, imapcode, imapc->state);
       break;
 
     case IMAP_LOGIN:
-      result = imap_state_login_resp(conn, imapcode, imapc->state);
+      result = imap_state_login_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_LIST:
     case IMAP_SEARCH:
-      result = imap_state_listsearch_resp(conn, imapcode, imapc->state);
+      result = imap_state_listsearch_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_SELECT:
-      result = imap_state_select_resp(conn, imapcode, imapc->state);
+      result = imap_state_select_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_FETCH:
-      result = imap_state_fetch_resp(conn, imapcode, imapc->state);
+      result = imap_state_fetch_resp(data, conn, imapcode, imapc->state);
       break;
 
     case IMAP_FETCH_FINAL:
-      result = imap_state_fetch_final_resp(conn, imapcode, imapc->state);
+      result = imap_state_fetch_final_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_APPEND:
-      result = imap_state_append_resp(conn, imapcode, imapc->state);
+      result = imap_state_append_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_APPEND_FINAL:
-      result = imap_state_append_final_resp(conn, imapcode, imapc->state);
+      result = imap_state_append_final_resp(data, imapcode, imapc->state);
       break;
 
     case IMAP_LOGOUT:
       /* fallthrough, just stop! */
     default:
       /* internal error */
-      state(conn, IMAP_STOP);
+      state(data, IMAP_STOP);
       break;
     }
   } while(!result && imapc->state != IMAP_STOP && Curl_pp_moredata(pp));
@@ -1348,44 +1362,46 @@
 }
 
 /* Called repeatedly until done from multi.c */
-static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done)
+static CURLcode imap_multi_statemach(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct imap_conn *imapc = &conn->proto.imapc;
 
   if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) {
-    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
+    result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                          FIRSTSOCKET, &imapc->ssldone);
     if(result || !imapc->ssldone)
       return result;
   }
 
-  result = Curl_pp_statemach(&imapc->pp, FALSE, FALSE);
+  result = Curl_pp_statemach(data, &imapc->pp, FALSE, FALSE);
   *done = (imapc->state == IMAP_STOP) ? TRUE : FALSE;
 
   return result;
 }
 
-static CURLcode imap_block_statemach(struct connectdata *conn,
+static CURLcode imap_block_statemach(struct Curl_easy *data,
+                                     struct connectdata *conn,
                                      bool disconnecting)
 {
   CURLcode result = CURLE_OK;
   struct imap_conn *imapc = &conn->proto.imapc;
 
   while(imapc->state != IMAP_STOP && !result)
-    result = Curl_pp_statemach(&imapc->pp, TRUE, disconnecting);
+    result = Curl_pp_statemach(data, &imapc->pp, TRUE, disconnecting);
 
   return result;
 }
 
 /* Allocate and initialize the struct IMAP for the current Curl_easy if
    required */
-static CURLcode imap_init(struct connectdata *conn)
+static CURLcode imap_init(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct IMAP *imap;
 
-  imap = data->req.protop = calloc(sizeof(struct IMAP), 1);
+  imap = data->req.p.imap = calloc(sizeof(struct IMAP), 1);
   if(!imap)
     result = CURLE_OUT_OF_MEMORY;
 
@@ -1393,9 +1409,11 @@
 }
 
 /* For the IMAP "protocol connect" and "doing" phases only */
-static int imap_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int imap_getsock(struct Curl_easy *data,
+                        struct connectdata *conn,
+                        curl_socket_t *socks)
 {
-  return Curl_pp_getsock(&conn->proto.imapc.pp, socks);
+  return Curl_pp_getsock(data, &conn->proto.imapc.pp, socks);
 }
 
 /***********************************************************************
@@ -1408,9 +1426,10 @@
  * The variable 'done' points to will be TRUE if the protocol-layer connect
  * phase is done when this function returns, or FALSE if not.
  */
-static CURLcode imap_connect(struct connectdata *conn, bool *done)
+static CURLcode imap_connect(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct imap_conn *imapc = &conn->proto.imapc;
   struct pingpong *pp = &imapc->pp;
 
@@ -1419,11 +1438,7 @@
   /* We always support persistent connections in IMAP */
   connkeep(conn, "IMAP default");
 
-  /* Set the default response time-out */
-  pp->response_time = RESP_TIMEOUT;
-  pp->statemach_act = imap_statemach_act;
-  pp->endofresp = imap_endofresp;
-  pp->conn = conn;
+  PINGPONG_SETUP(pp, imap_statemachine, imap_endofresp);
 
   /* Set the default preferred authentication type and mechanism */
   imapc->preftype = IMAP_TYPE_ANY;
@@ -1432,7 +1447,7 @@
   Curl_dyn_init(&imapc->dyn, DYN_IMAP_CMD);
   /* Initialise the pingpong layer */
   Curl_pp_setup(pp);
-  Curl_pp_init(pp);
+  Curl_pp_init(data, pp);
 
   /* Parse the URL options */
   result = imap_parse_url_options(conn);
@@ -1440,12 +1455,12 @@
     return result;
 
   /* Start off waiting for the server greeting response */
-  state(conn, IMAP_SERVERGREET);
+  state(data, IMAP_SERVERGREET);
 
   /* Start off with an response id of '*' */
   strcpy(imapc->resptag, "*");
 
-  result = imap_multi_statemach(conn, done);
+  result = imap_multi_statemach(data, done);
 
   return result;
 }
@@ -1459,12 +1474,12 @@
  *
  * Input argument is already checked for validity.
  */
-static CURLcode imap_done(struct connectdata *conn, CURLcode status,
+static CURLcode imap_done(struct Curl_easy *data, CURLcode status,
                           bool premature)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct IMAP *imap = data->req.p.imap;
 
   (void)premature;
 
@@ -1481,17 +1496,17 @@
     /* Handle responses after FETCH or APPEND transfer has finished */
 
     if(!data->set.upload && data->set.mimepost.kind == MIMEKIND_NONE)
-      state(conn, IMAP_FETCH_FINAL);
+      state(data, IMAP_FETCH_FINAL);
     else {
       /* End the APPEND command first by sending an empty line */
-      result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "");
+      result = Curl_pp_sendf(data, &conn->proto.imapc.pp, "%s", "");
       if(!result)
-        state(conn, IMAP_APPEND_FINAL);
+        state(data, IMAP_APPEND_FINAL);
     }
 
     /* Run the state-machine */
     if(!result)
-      result = imap_block_statemach(conn, FALSE);
+      result = imap_block_statemach(data, conn, FALSE);
   }
 
   /* Cleanup our per-request based variables */
@@ -1506,7 +1521,7 @@
   Curl_safefree(imap->custom_params);
 
   /* Clear the transfer mode for the next request */
-  imap->transfer = FTPTRANSFER_BODY;
+  imap->transfer = PPTRANSFER_BODY;
 
   return result;
 }
@@ -1518,21 +1533,21 @@
  * This is the actual DO function for IMAP. Fetch or append a message, or do
  * other things according to the options previously setup.
  */
-static CURLcode imap_perform(struct connectdata *conn, bool *connected,
+static CURLcode imap_perform(struct Curl_easy *data, bool *connected,
                              bool *dophase_done)
 {
   /* This is IMAP and no proxy */
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct IMAP *imap = data->req.p.imap;
   struct imap_conn *imapc = &conn->proto.imapc;
   bool selected = FALSE;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
-  if(conn->data->set.opt_no_body) {
+  if(data->set.opt_no_body) {
     /* Requested no body means no transfer */
-    imap->transfer = FTPTRANSFER_INFO;
+    imap->transfer = PPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
@@ -1546,36 +1561,36 @@
     selected = TRUE;
 
   /* Start the first command in the DO phase */
-  if(conn->data->set.upload || data->set.mimepost.kind != MIMEKIND_NONE)
+  if(data->set.upload || data->set.mimepost.kind != MIMEKIND_NONE)
     /* APPEND can be executed directly */
-    result = imap_perform_append(conn);
+    result = imap_perform_append(data);
   else if(imap->custom && (selected || !imap->mailbox))
     /* Custom command using the same mailbox or no mailbox */
-    result = imap_perform_list(conn);
+    result = imap_perform_list(data);
   else if(!imap->custom && selected && (imap->uid || imap->mindex))
     /* FETCH from the same mailbox */
-    result = imap_perform_fetch(conn);
+    result = imap_perform_fetch(data, conn);
   else if(!imap->custom && selected && imap->query)
     /* SEARCH the current mailbox */
-    result = imap_perform_search(conn);
+    result = imap_perform_search(data, conn);
   else if(imap->mailbox && !selected &&
          (imap->custom || imap->uid || imap->mindex || imap->query))
     /* SELECT the mailbox */
-    result = imap_perform_select(conn);
+    result = imap_perform_select(data);
   else
     /* LIST */
-    result = imap_perform_list(conn);
+    result = imap_perform_list(data);
 
   if(result)
     return result;
 
   /* Run the state-machine */
-  result = imap_multi_statemach(conn, dophase_done);
+  result = imap_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done)
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
 
   return result;
 }
@@ -1589,23 +1604,22 @@
  *
  * The input argument is already checked for validity.
  */
-static CURLcode imap_do(struct connectdata *conn, bool *done)
+static CURLcode imap_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
-
   *done = FALSE; /* default to false */
 
   /* Parse the URL path */
-  result = imap_parse_url_path(conn);
+  result = imap_parse_url_path(data);
   if(result)
     return result;
 
   /* Parse the custom request */
-  result = imap_parse_custom_request(conn);
+  result = imap_parse_custom_request(data);
   if(result)
     return result;
 
-  result = imap_regular_transfer(conn, done);
+  result = imap_regular_transfer(data, done);
 
   return result;
 }
@@ -1617,9 +1631,11 @@
  * Disconnect from an IMAP server. Cleanup protocol-specific per-connection
  * resources. BLOCKING.
  */
-static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode imap_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead_connection)
 {
   struct imap_conn *imapc = &conn->proto.imapc;
+  (void)data;
 
   /* We cannot send quit unconditionally. If this connection is stale or
      bad in any way, sending quit and waiting around here will make the
@@ -1627,9 +1643,10 @@
 
   /* The IMAP session may or may not have been allocated/setup at this
      point! */
-  if(!dead_connection && imapc->pp.conn && imapc->pp.conn->bits.protoconnstart)
-    if(!imap_perform_logout(conn))
-      (void)imap_block_statemach(conn, TRUE); /* ignore errors on LOGOUT */
+  if(!dead_connection && conn->bits.protoconnstart) {
+    if(!imap_perform_logout(data, conn))
+      (void)imap_block_statemach(data, conn, TRUE); /* ignore errors */
+  }
 
   /* Disconnect from the server */
   Curl_pp_disconnect(&imapc->pp);
@@ -1646,30 +1663,30 @@
 }
 
 /* Call this when the DO phase has completed */
-static CURLcode imap_dophase_done(struct connectdata *conn, bool connected)
+static CURLcode imap_dophase_done(struct Curl_easy *data, bool connected)
 {
-  struct IMAP *imap = conn->data->req.protop;
+  struct IMAP *imap = data->req.p.imap;
 
   (void)connected;
 
-  if(imap->transfer != FTPTRANSFER_BODY)
+  if(imap->transfer != PPTRANSFER_BODY)
     /* no data to transfer */
-    Curl_setup_transfer(conn->data, -1, -1, FALSE, -1);
+    Curl_setup_transfer(data, -1, -1, FALSE, -1);
 
   return CURLE_OK;
 }
 
 /* Called from multi.c while DOing */
-static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done)
+static CURLcode imap_doing(struct Curl_easy *data, bool *dophase_done)
 {
-  CURLcode result = imap_multi_statemach(conn, dophase_done);
+  CURLcode result = imap_multi_statemach(data, dophase_done);
 
   if(result)
-    DEBUGF(infof(conn->data, "DO phase failed\n"));
+    DEBUGF(infof(data, "DO phase failed"));
   else if(*dophase_done) {
-    result = imap_dophase_done(conn, FALSE /* not connected */);
+    result = imap_dophase_done(data, FALSE /* not connected */);
 
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
@@ -1684,12 +1701,11 @@
  * Performs all commands done before a regular transfer between a local and a
  * remote host.
  */
-static CURLcode imap_regular_transfer(struct connectdata *conn,
+static CURLcode imap_regular_transfer(struct Curl_easy *data,
                                       bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
   bool connected = FALSE;
-  struct Curl_easy *data = conn->data;
 
   /* Make sure size is unknown at this point */
   data->req.size = -1;
@@ -1701,19 +1717,20 @@
   Curl_pgrsSetDownloadSize(data, -1);
 
   /* Carry out the perform */
-  result = imap_perform(conn, &connected, dophase_done);
+  result = imap_perform(data, &connected, dophase_done);
 
   /* Perform post DO phase operations if necessary */
   if(!result && *dophase_done)
-    result = imap_dophase_done(conn, connected);
+    result = imap_dophase_done(data, connected);
 
   return result;
 }
 
-static CURLcode imap_setup_connection(struct connectdata *conn)
+static CURLcode imap_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   /* Initialise the IMAP layer */
-  CURLcode result = imap_init(conn);
+  CURLcode result = imap_init(data);
   if(result)
     return result;
 
@@ -1731,7 +1748,8 @@
  *
  * Designed to never block.
  */
-static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...)
+static CURLcode imap_sendf(struct Curl_easy *data,
+                           struct connectdata *conn, const char *fmt, ...)
 {
   CURLcode result = CURLE_OK;
   struct imap_conn *imapc = &conn->proto.imapc;
@@ -1751,7 +1769,7 @@
   if(!result) {
     va_list ap;
     va_start(ap, fmt);
-    result = Curl_pp_vsendf(&imapc->pp, Curl_dyn_ptr(&imapc->dyn), ap);
+    result = Curl_pp_vsendf(data, &imapc->pp, Curl_dyn_ptr(&imapc->dyn), ap);
     va_end(ap);
   }
   return result;
@@ -1940,12 +1958,11 @@
  * Parse the URL path into separate path components.
  *
  */
-static CURLcode imap_parse_url_path(struct connectdata *conn)
+static CURLcode imap_parse_url_path(struct Curl_easy *data)
 {
   /* The imap struct is already initialised in imap_connect() */
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct IMAP *imap = data->req.p.imap;
   const char *begin = &data->state.up.path[1]; /* skip leading slash */
   const char *ptr = begin;
 
@@ -2000,7 +2017,7 @@
       return result;
     }
 
-    DEBUGF(infof(conn->data, "IMAP URL parameter '%s' = '%s'\n", name, value));
+    DEBUGF(infof(data, "IMAP URL parameter '%s' = '%s'", name, value));
 
     /* Process the known hierarchical parameters (UIDVALIDITY, UID, SECTION and
        PARTIAL) stripping of the trailing slash character if it is present.
@@ -2073,11 +2090,10 @@
  *
  * Parse the custom request.
  */
-static CURLcode imap_parse_custom_request(struct connectdata *conn)
+static CURLcode imap_parse_custom_request(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct IMAP *imap = data->req.protop;
+  struct IMAP *imap = data->req.p.imap;
   const char *custom = data->set.str[STRING_CUSTOMREQUEST];
 
   if(custom) {
diff --git a/lib/imap.h b/lib/imap.h
index 8f373d2..ef6515d 100644
--- a/lib/imap.h
+++ b/lib/imap.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index 9a5af7f..b5f9b80 100644
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2019  Internet Software Consortium.
+ * Copyright (C) 1996-2021  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -40,7 +40,7 @@
 #define INT16SZ          2
 
 /*
- * Format an IPv4 address, more or less like inet_ntoa().
+ * Format an IPv4 address, more or less like inet_ntop().
  *
  * Returns `dst' (as a const)
  * Note:
@@ -134,7 +134,7 @@
 
     /* Are we following an initial run of 0x00s or any real hex?
      */
-    if(i != 0)
+    if(i)
       *tp++ = ':';
 
     /* Is this address an encapsulated IPv4?
diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h
index 9d3f237..067632a 100644
--- a/lib/inet_ntop.h
+++ b/lib/inet_ntop.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/inet_pton.h b/lib/inet_pton.h
index e695af9..ec12373 100644
--- a/lib/inet_pton.h
+++ b/lib/inet_pton.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/krb5.c b/lib/krb5.c
index ad6daea..e25f526 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -2,7 +2,7 @@
  *
  * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
- * Copyright (c) 2004 - 2020 Daniel Stenberg
+ * Copyright (c) 2004 - 2021 Daniel Stenberg
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
-static CURLcode ftpsend(struct connectdata *conn, const char *cmd)
+static CURLcode ftpsend(struct Curl_easy *data, struct connectdata *conn,
+                        const char *cmd)
 {
   ssize_t bytes_written;
 #define SBUF_SIZE 1024
@@ -80,7 +81,7 @@
   write_len += 2;
   bytes_written = 0;
 
-  result = Curl_convert_to_network(conn->data, s, write_len);
+  result = Curl_convert_to_network(data, s, write_len);
   /* Curl_convert_to_network calls failf if unsuccessful */
   if(result)
     return result;
@@ -89,7 +90,7 @@
 #ifdef HAVE_GSSAPI
     conn->data_prot = PROT_CMD;
 #endif
-    result = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len,
+    result = Curl_write(data, conn->sock[FIRSTSOCKET], sptr, write_len,
                         &bytes_written);
 #ifdef HAVE_GSSAPI
     DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST);
@@ -99,8 +100,7 @@
     if(result)
       break;
 
-    if(conn->data->set.verbose)
-      Curl_debug(conn->data, CURLINFO_HEADER_OUT, sptr, (size_t)bytes_written);
+    Curl_debug(data, CURLINFO_HEADER_OUT, sptr, (size_t)bytes_written);
 
     if(bytes_written != (ssize_t)write_len) {
       write_len -= bytes_written;
@@ -160,16 +160,6 @@
 }
 
 static int
-krb5_overhead(void *app_data, int level, int len)
-{
-  /* no arguments are used */
-  (void)app_data;
-  (void)level;
-  (void)len;
-  return 0;
-}
-
-static int
 krb5_encode(void *app_data, const void *from, int length, int level, void **to)
 {
   gss_ctx_id_t *context = app_data;
@@ -203,14 +193,13 @@
 }
 
 static int
-krb5_auth(void *app_data, struct connectdata *conn)
+krb5_auth(void *app_data, struct Curl_easy *data, struct connectdata *conn)
 {
   int ret = AUTH_OK;
   char *p;
   const char *host = conn->host.name;
   ssize_t nread;
   curl_socklen_t l = sizeof(conn->local_addr);
-  struct Curl_easy *data = conn->data;
   CURLcode result;
   const char *service = data->set.str[STRING_SERVICE_NAME] ?
                         data->set.str[STRING_SERVICE_NAME] :
@@ -243,11 +232,11 @@
   for(;;) {
     /* this really shouldn't be repeated here, but can't help it */
     if(service == srv_host) {
-      result = ftpsend(conn, "AUTH GSSAPI");
+      result = ftpsend(data, conn, "AUTH GSSAPI");
       if(result)
         return -2;
 
-      if(Curl_GetFTPResponse(&nread, conn, NULL))
+      if(Curl_GetFTPResponse(data, &nread, NULL))
         return -1;
 
       if(data->state.buffer[0] != '3')
@@ -274,7 +263,7 @@
     }
     /* We pass NULL as |output_name_type| to avoid a leak. */
     gss_display_name(&min, gssname, &output_buffer, NULL);
-    Curl_infof(data, "Trying against %s\n", output_buffer.value);
+    infof(data, "Trying against %s", output_buffer.value);
     gssresp = GSS_C_NO_BUFFER;
     *context = GSS_C_NO_CONTEXT;
 
@@ -301,26 +290,25 @@
       }
 
       if(GSS_ERROR(maj)) {
-        Curl_infof(data, "Error creating security context\n");
+        infof(data, "Error creating security context");
         ret = AUTH_ERROR;
         break;
       }
 
-      if(output_buffer.length != 0) {
+      if(output_buffer.length) {
         char *cmd;
 
         result = Curl_base64_encode(data, (char *)output_buffer.value,
                                     output_buffer.length, &p, &base64_sz);
         if(result) {
-          Curl_infof(data, "base64-encoding: %s\n",
-                     curl_easy_strerror(result));
+          infof(data, "base64-encoding: %s", curl_easy_strerror(result));
           ret = AUTH_ERROR;
           break;
         }
 
         cmd = aprintf("ADAT %s", p);
         if(cmd)
-          result = ftpsend(conn, cmd);
+          result = ftpsend(data, conn, cmd);
         else
           result = CURLE_OUT_OF_MEMORY;
 
@@ -332,13 +320,13 @@
           break;
         }
 
-        if(Curl_GetFTPResponse(&nread, conn, NULL)) {
+        if(Curl_GetFTPResponse(data, &nread, NULL)) {
           ret = -1;
           break;
         }
 
         if(data->state.buffer[0] != '2' && data->state.buffer[0] != '3') {
-          Curl_infof(data, "Server didn't accept auth data\n");
+          infof(data, "Server didn't accept auth data");
           ret = AUTH_ERROR;
           break;
         }
@@ -393,7 +381,7 @@
   krb5_auth,
   krb5_end,
   krb5_check_prot,
-  krb5_overhead,
+
   krb5_encode,
   krb5_decode
 };
@@ -413,7 +401,7 @@
 {
   int i;
   for(i = 0; i < (int)sizeof(level_names)/(int)sizeof(level_names[0]); i++)
-    if(checkprefix(name, level_names[i].name))
+    if(curl_strequal(name, level_names[i].name))
       return level_names[i].level;
   return PROT_NONE;
 }
@@ -444,7 +432,7 @@
 
 /* Send an FTP command defined by |message| and the optional arguments. The
    function returns the ftp_code. If an error occurs, -1 is returned. */
-static int ftp_send_command(struct connectdata *conn, const char *message, ...)
+static int ftp_send_command(struct Curl_easy *data, const char *message, ...)
 {
   int ftp_code;
   ssize_t nread = 0;
@@ -455,11 +443,11 @@
   mvsnprintf(print_buffer, sizeof(print_buffer), message, args);
   va_end(args);
 
-  if(ftpsend(conn, print_buffer)) {
+  if(ftpsend(data, data->conn, print_buffer)) {
     ftp_code = -1;
   }
   else {
-    if(Curl_GetFTPResponse(&nread, conn, &ftp_code))
+    if(Curl_GetFTPResponse(data, &nread, &ftp_code))
       ftp_code = -1;
   }
 
@@ -496,7 +484,7 @@
    CURLcode saying whether an error occurred or CURLE_OK if |len| was
    written. */
 static CURLcode
-socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
+socket_write(struct Curl_easy *data, curl_socket_t fd, const void *to,
              size_t len)
 {
   const char *to_p = to;
@@ -504,7 +492,7 @@
   ssize_t written;
 
   while(len > 0) {
-    result = Curl_write_plain(conn, fd, to_p, len, &written);
+    result = Curl_write_plain(data, fd, to_p, len, &written);
     if(!result) {
       len -= written;
       to_p += written;
@@ -557,18 +545,19 @@
 }
 
 /* Matches Curl_recv signature */
-static ssize_t sec_recv(struct connectdata *conn, int sockindex,
+static ssize_t sec_recv(struct Curl_easy *data, int sockindex,
                         char *buffer, size_t len, CURLcode *err)
 {
   size_t bytes_read;
   size_t total_read = 0;
+  struct connectdata *conn = data->conn;
   curl_socket_t fd = conn->sock[sockindex];
 
   *err = CURLE_OK;
 
   /* Handle clear text response. */
   if(conn->sec_complete == 0 || conn->data_prot == PROT_CLEAR)
-      return sread(fd, buffer, len);
+    return sread(fd, buffer, len);
 
   if(conn->in_buffer.eof_flag) {
     conn->in_buffer.eof_flag = 0;
@@ -598,8 +587,8 @@
 
 /* Send |length| bytes from |from| to the |fd| socket taking care of encoding
    and negotiating with the server. |from| can be NULL. */
-static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
-                        const char *from, int length)
+static void do_sec_send(struct Curl_easy *data, struct connectdata *conn,
+                        curl_socket_t fd, const char *from, int length)
 {
   int bytes, htonl_bytes; /* 32-bit integers for htonl */
   char *buffer = NULL;
@@ -623,7 +612,7 @@
     return; /* error */
 
   if(iscmd) {
-    error = Curl_base64_encode(conn->data, buffer, curlx_sitouz(bytes),
+    error = Curl_base64_encode(data, buffer, curlx_sitouz(bytes),
                                &cmd_buffer, &cmd_size);
     if(error) {
       free(buffer);
@@ -633,39 +622,37 @@
       static const char *enc = "ENC ";
       static const char *mic = "MIC ";
       if(prot_level == PROT_PRIVATE)
-        socket_write(conn, fd, enc, 4);
+        socket_write(data, fd, enc, 4);
       else
-        socket_write(conn, fd, mic, 4);
+        socket_write(data, fd, mic, 4);
 
-      socket_write(conn, fd, cmd_buffer, cmd_size);
-      socket_write(conn, fd, "\r\n", 2);
-      infof(conn->data, "Send: %s%s\n", prot_level == PROT_PRIVATE?enc:mic,
+      socket_write(data, fd, cmd_buffer, cmd_size);
+      socket_write(data, fd, "\r\n", 2);
+      infof(data, "Send: %s%s", prot_level == PROT_PRIVATE?enc:mic,
             cmd_buffer);
       free(cmd_buffer);
     }
   }
   else {
     htonl_bytes = htonl(bytes);
-    socket_write(conn, fd, &htonl_bytes, sizeof(htonl_bytes));
-    socket_write(conn, fd, buffer, curlx_sitouz(bytes));
+    socket_write(data, fd, &htonl_bytes, sizeof(htonl_bytes));
+    socket_write(data, fd, buffer, curlx_sitouz(bytes));
   }
   free(buffer);
 }
 
-static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd,
-                         const char *buffer, size_t length)
+static ssize_t sec_write(struct Curl_easy *data, struct connectdata *conn,
+                         curl_socket_t fd, const char *buffer, size_t length)
 {
   ssize_t tx = 0, len = conn->buffer_size;
 
-  len -= conn->mech->overhead(conn->app_data, conn->data_prot,
-                              curlx_sztosi(len));
   if(len <= 0)
     len = length;
   while(length) {
     if(length < (size_t)len)
       len = length;
 
-    do_sec_send(conn, fd, buffer, curlx_sztosi(len));
+    do_sec_send(data, conn, fd, buffer, curlx_sztosi(len));
     length -= len;
     buffer += len;
     tx += len;
@@ -674,16 +661,17 @@
 }
 
 /* Matches Curl_send signature */
-static ssize_t sec_send(struct connectdata *conn, int sockindex,
+static ssize_t sec_send(struct Curl_easy *data, int sockindex,
                         const void *buffer, size_t len, CURLcode *err)
 {
+  struct connectdata *conn = data->conn;
   curl_socket_t fd = conn->sock[sockindex];
   *err = CURLE_OK;
-  return sec_write(conn, fd, buffer, len);
+  return sec_write(data, conn, fd, buffer, len);
 }
 
-int Curl_sec_read_msg(struct connectdata *conn, char *buffer,
-                      enum protection_level level)
+int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn,
+                      char *buffer, enum protection_level level)
 {
   /* decoded_len should be size_t or ssize_t but conn->mech->decode returns an
      int */
@@ -693,6 +681,8 @@
   size_t decoded_sz = 0;
   CURLcode error;
 
+  (void) data;
+
   if(!conn->mech)
     /* not inititalized, return error */
     return -1;
@@ -716,9 +706,9 @@
     return -1;
   }
 
-  if(conn->data->set.verbose) {
+  {
     buf[decoded_len] = '\n';
-    Curl_debug(conn->data, CURLINFO_HEADER_IN, buf, decoded_len + 1);
+    Curl_debug(data, CURLINFO_HEADER_IN, buf, decoded_len + 1);
   }
 
   buf[decoded_len] = '\0';
@@ -737,16 +727,17 @@
   return ret_code;
 }
 
-static int sec_set_protection_level(struct connectdata *conn)
+static int sec_set_protection_level(struct Curl_easy *data)
 {
   int code;
+  struct connectdata *conn = data->conn;
   enum protection_level level = conn->request_data_prot;
 
   DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
 
   if(!conn->sec_complete) {
-    infof(conn->data, "Trying to change the protection level after the"
-                      " completion of the data exchange.\n");
+    infof(data, "Trying to change the protection level after the"
+                " completion of the data exchange.");
     return -1;
   }
 
@@ -756,19 +747,19 @@
 
   if(level) {
     char *pbsz;
-    static unsigned int buffer_size = 1 << 20; /* 1048576 */
+    unsigned int buffer_size = 1 << 20; /* 1048576 */
 
-    code = ftp_send_command(conn, "PBSZ %u", buffer_size);
+    code = ftp_send_command(data, "PBSZ %u", buffer_size);
     if(code < 0)
       return -1;
 
     if(code/100 != 2) {
-      failf(conn->data, "Failed to set the protection's buffer size.");
+      failf(data, "Failed to set the protection's buffer size.");
       return -1;
     }
     conn->buffer_size = buffer_size;
 
-    pbsz = strstr(conn->data->state.buffer, "PBSZ=");
+    pbsz = strstr(data->state.buffer, "PBSZ=");
     if(pbsz) {
       /* ignore return code, use default value if it fails */
       (void)sscanf(pbsz, "PBSZ=%u", &buffer_size);
@@ -778,13 +769,13 @@
   }
 
   /* Now try to negiociate the protection level. */
-  code = ftp_send_command(conn, "PROT %c", level_to_char(level));
+  code = ftp_send_command(data, "PROT %c", level_to_char(level));
 
   if(code < 0)
     return -1;
 
   if(code/100 != 2) {
-    failf(conn->data, "Failed to set the protection level.");
+    failf(data, "Failed to set the protection level.");
     return -1;
   }
 
@@ -806,15 +797,14 @@
   return 0;
 }
 
-static CURLcode choose_mech(struct connectdata *conn)
+static CURLcode choose_mech(struct Curl_easy *data, struct connectdata *conn)
 {
   int ret;
-  struct Curl_easy *data = conn->data;
   void *tmp_allocation;
   const struct Curl_sec_client_mech *mech = &Curl_krb5_client_mech;
 
   tmp_allocation = realloc(conn->app_data, mech->size);
-  if(tmp_allocation == NULL) {
+  if(!tmp_allocation) {
     failf(data, "Failed realloc of size %zu", mech->size);
     mech = NULL;
     return CURLE_OUT_OF_MEMORY;
@@ -824,14 +814,14 @@
   if(mech->init) {
     ret = mech->init(conn->app_data);
     if(ret) {
-      infof(data, "Failed initialization for %s. Skipping it.\n",
+      infof(data, "Failed initialization for %s. Skipping it.",
             mech->name);
       return CURLE_FAILED_INIT;
     }
   }
 
-  infof(data, "Trying mechanism %s...\n", mech->name);
-  ret = ftp_send_command(conn, "AUTH %s", mech->name);
+  infof(data, "Trying mechanism %s...", mech->name);
+  ret = ftp_send_command(data, "AUTH %s", mech->name);
   if(ret < 0)
     return CURLE_COULDNT_CONNECT;
 
@@ -839,15 +829,15 @@
     switch(ret) {
     case 504:
       infof(data, "Mechanism %s is not supported by the server (server "
-            "returned ftp code: 504).\n", mech->name);
+            "returned ftp code: 504).", mech->name);
       break;
     case 534:
       infof(data, "Mechanism %s was rejected by the server (server returned "
-            "ftp code: 534).\n", mech->name);
+            "ftp code: 534).", mech->name);
       break;
     default:
       if(ret/100 == 5) {
-        infof(data, "server does not support the security extensions\n");
+        infof(data, "server does not support the security extensions");
         return CURLE_USE_SSL_FAILED;
       }
       break;
@@ -856,7 +846,7 @@
   }
 
   /* Authenticate */
-  ret = mech->auth(conn->app_data, conn);
+  ret = mech->auth(conn->app_data, data, conn);
 
   if(ret != AUTH_CONTINUE) {
     if(ret != AUTH_OK) {
@@ -874,16 +864,16 @@
     conn->command_prot = PROT_SAFE;
     /* Set the requested protection level */
     /* BLOCKING */
-    (void)sec_set_protection_level(conn);
+    (void)sec_set_protection_level(data);
   }
 
   return CURLE_OK;
 }
 
 CURLcode
-Curl_sec_login(struct connectdata *conn)
+Curl_sec_login(struct Curl_easy *data, struct connectdata *conn)
 {
-  return choose_mech(conn);
+  return choose_mech(data, conn);
 }
 
 
diff --git a/lib/ldap.c b/lib/ldap.c
index 8d1ee64..1d9e44c 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -5,11 +5,11 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -100,7 +100,8 @@
 #undef LDAPURLDesc
 #define LDAPURLDesc struct ldap_urldesc
 
-static int  _ldap_url_parse(const struct connectdata *conn,
+static int  _ldap_url_parse(struct Curl_easy *data,
+                            const struct connectdata *conn,
                             LDAPURLDesc **ludp);
 static void _ldap_free_urldesc(LDAPURLDesc *ludp);
 
@@ -126,7 +127,7 @@
 #endif
 
 
-static CURLcode Curl_ldap(struct connectdata *conn, bool *done);
+static CURLcode ldap_do(struct Curl_easy *data, bool *done);
 
 /*
  * LDAP protocol handler.
@@ -135,7 +136,7 @@
 const struct Curl_handler Curl_handler_ldap = {
   "LDAP",                               /* scheme */
   ZERO_NULL,                            /* setup_connection */
-  Curl_ldap,                            /* do_it */
+  ldap_do,                              /* do_it */
   ZERO_NULL,                            /* done */
   ZERO_NULL,                            /* do_more */
   ZERO_NULL,                            /* connect_it */
@@ -148,6 +149,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_LDAP,                            /* defport */
   CURLPROTO_LDAP,                       /* protocol */
   CURLPROTO_LDAP,                       /* family */
@@ -162,7 +164,7 @@
 const struct Curl_handler Curl_handler_ldaps = {
   "LDAPS",                              /* scheme */
   ZERO_NULL,                            /* setup_connection */
-  Curl_ldap,                            /* do_it */
+  ldap_do,                              /* do_it */
   ZERO_NULL,                            /* done */
   ZERO_NULL,                            /* do_more */
   ZERO_NULL,                            /* connect_it */
@@ -175,6 +177,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_LDAPS,                           /* defport */
   CURLPROTO_LDAPS,                      /* protocol */
   CURLPROTO_LDAP,                       /* family */
@@ -232,7 +235,7 @@
 }
 #endif /* #if defined(USE_WINDOWS_SSPI) */
 
-static int ldap_win_bind(struct connectdata *conn, LDAP *server,
+static int ldap_win_bind(struct Curl_easy *data, LDAP *server,
                          const char *user, const char *passwd)
 {
   int rc = LDAP_INVALID_CREDENTIALS;
@@ -240,7 +243,7 @@
   PTCHAR inuser = NULL;
   PTCHAR inpass = NULL;
 
-  if(user && passwd && (conn->data->set.httpauth & CURLAUTH_BASIC)) {
+  if(user && passwd && (data->set.httpauth & CURLAUTH_BASIC)) {
     inuser = curlx_convert_UTF8_to_tchar((char *) user);
     inpass = curlx_convert_UTF8_to_tchar((char *) passwd);
 
@@ -251,7 +254,7 @@
   }
 #if defined(USE_WINDOWS_SSPI)
   else {
-    rc = ldap_win_bind_auth(server, user, passwd, conn->data->set.httpauth);
+    rc = ldap_win_bind_auth(server, user, passwd, data->set.httpauth);
   }
 #endif
 
@@ -266,7 +269,7 @@
 #endif
 
 
-static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
+static CURLcode ldap_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
   int rc = 0;
@@ -275,7 +278,7 @@
   LDAPMessage *ldapmsg = NULL;
   LDAPMessage *entryIterator;
   int num = 0;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   int ldap_proto = LDAP_VERSION3;
   int ldap_ssl = 0;
   char *val_b64 = NULL;
@@ -293,16 +296,16 @@
   char *passwd = NULL;
 
   *done = TRUE; /* unconditionally */
-  infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d\n",
+  infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d",
           LDAP_VENDOR_NAME, LDAP_VENDOR_VERSION);
-  infof(data, "LDAP local: %s\n", data->change.url);
+  infof(data, "LDAP local: %s", data->state.url);
 
 #ifdef HAVE_LDAP_URL_PARSE
-  rc = ldap_url_parse(data->change.url, &ludp);
+  rc = ldap_url_parse(data->state.url, &ludp);
 #else
-  rc = _ldap_url_parse(conn, &ludp);
+  rc = _ldap_url_parse(data, conn, &ludp);
 #endif
-  if(rc != 0) {
+  if(rc) {
     failf(data, "LDAP local: %s", ldap_err2string(rc));
     result = CURLE_LDAP_INVALID_URL;
     goto quit;
@@ -311,7 +314,7 @@
   /* Get the URL scheme (either ldap or ldaps) */
   if(conn->given->flags & PROTOPT_SSL)
     ldap_ssl = 1;
-  infof(data, "LDAP local: trying to establish %s connection\n",
+  infof(data, "LDAP local: trying to establish %s connection",
           ldap_ssl ? "encrypted" : "cleartext");
 
 #if defined(USE_WIN32_LDAP)
@@ -363,14 +366,14 @@
         result = CURLE_SSL_CERTPROBLEM;
         goto quit;
       }
-      infof(data, "LDAP local: using %s CA cert '%s'\n",
-              (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"),
-              ldap_ca);
+      infof(data, "LDAP local: using %s CA cert '%s'",
+            (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"),
+            ldap_ca);
       rc = ldapssl_add_trusted_cert(ldap_ca, cert_type);
       if(rc != LDAP_SUCCESS) {
         failf(data, "LDAP local: ERROR setting %s CA cert: %s",
-                (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"),
-                ldap_err2string(rc));
+              (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"),
+              ldap_err2string(rc));
         result = CURLE_SSL_CERTPROBLEM;
         goto quit;
       }
@@ -386,7 +389,7 @@
       goto quit;
     }
     server = ldapssl_init(host, (int)conn->port, 1);
-    if(server == NULL) {
+    if(!server) {
       failf(data, "LDAP local: Cannot connect to %s:%ld",
             conn->host.dispname, conn->port);
       result = CURLE_COULDNT_CONNECT;
@@ -406,7 +409,7 @@
         result = CURLE_SSL_CERTPROBLEM;
         goto quit;
       }
-      infof(data, "LDAP local: using PEM CA cert: %s\n", ldap_ca);
+      infof(data, "LDAP local: using PEM CA cert: %s", ldap_ca);
       rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, ldap_ca);
       if(rc != LDAP_SUCCESS) {
         failf(data, "LDAP local: ERROR setting PEM CA cert: %s",
@@ -427,7 +430,7 @@
       goto quit;
     }
     server = ldap_init(host, (int)conn->port);
-    if(server == NULL) {
+    if(!server) {
       failf(data, "LDAP local: Cannot connect to %s:%ld",
             conn->host.dispname, conn->port);
       result = CURLE_COULDNT_CONNECT;
@@ -463,7 +466,7 @@
   }
   else {
     server = ldap_init(host, (int)conn->port);
-    if(server == NULL) {
+    if(!server) {
       failf(data, "LDAP local: Cannot connect to %s:%ld",
             conn->host.dispname, conn->port);
       result = CURLE_COULDNT_CONNECT;
@@ -472,20 +475,20 @@
   }
 #ifdef USE_WIN32_LDAP
   ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto);
-  rc = ldap_win_bind(conn, server, user, passwd);
+  rc = ldap_win_bind(data, server, user, passwd);
 #else
   rc = ldap_simple_bind_s(server, user, passwd);
 #endif
-  if(!ldap_ssl && rc != 0) {
+  if(!ldap_ssl && rc) {
     ldap_proto = LDAP_VERSION2;
     ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto);
 #ifdef USE_WIN32_LDAP
-    rc = ldap_win_bind(conn, server, user, passwd);
+    rc = ldap_win_bind(data, server, user, passwd);
 #else
     rc = ldap_simple_bind_s(server, user, passwd);
 #endif
   }
-  if(rc != 0) {
+  if(rc) {
 #ifdef USE_WIN32_LDAP
     failf(data, "LDAP local: bind via ldap_win_bind %s",
           ldap_err2string(rc));
@@ -500,7 +503,7 @@
   rc = ldap_search_s(server, ludp->lud_dn, ludp->lud_scope,
                      ludp->lud_filter, ludp->lud_attrs, 0, &ldapmsg);
 
-  if(rc != 0 && rc != LDAP_SIZELIMIT_EXCEEDED) {
+  if(rc && rc != LDAP_SIZELIMIT_EXCEEDED) {
     failf(data, "LDAP remote: %s", ldap_err2string(rc));
     result = CURLE_LDAP_SEARCH_FAILED;
     goto quit;
@@ -536,14 +539,14 @@
 #endif
       name_len = strlen(name);
 
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4);
+      result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"DN: ", 4);
       if(result) {
         FREE_ON_WINLDAP(name);
         ldap_memfree(dn);
         goto quit;
       }
 
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *) name,
+      result = Curl_client_write(data, CLIENTWRITE_BODY, (char *) name,
                                  name_len);
       if(result) {
         FREE_ON_WINLDAP(name);
@@ -551,7 +554,7 @@
         goto quit;
       }
 
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+      result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
       if(result) {
         FREE_ON_WINLDAP(name);
         ldap_memfree(dn);
@@ -580,7 +583,7 @@
         result = CURLE_OUT_OF_MEMORY;
 
         goto quit;
-    }
+      }
 #else
       char *attr = attribute;
 #endif
@@ -589,7 +592,7 @@
       vals = ldap_get_values_len(server, entryIterator, attribute);
       if(vals != NULL) {
         for(i = 0; (vals[i] != NULL); i++) {
-          result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
+          result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\t", 1);
           if(result) {
             ldap_value_free_len(vals);
             FREE_ON_WINLDAP(attr);
@@ -600,7 +603,7 @@
             goto quit;
           }
 
-          result = Curl_client_write(conn, CLIENTWRITE_BODY,
+          result = Curl_client_write(data, CLIENTWRITE_BODY,
                                      (char *) attr, attr_len);
           if(result) {
             ldap_value_free_len(vals);
@@ -612,7 +615,7 @@
             goto quit;
           }
 
-          result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2);
+          result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)": ", 2);
           if(result) {
             ldap_value_free_len(vals);
             FREE_ON_WINLDAP(attr);
@@ -644,7 +647,7 @@
             }
 
             if(val_b64_sz > 0) {
-              result = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64,
+              result = Curl_client_write(data, CLIENTWRITE_BODY, val_b64,
                                          val_b64_sz);
               free(val_b64);
               if(result) {
@@ -661,7 +664,7 @@
             }
           }
           else {
-            result = Curl_client_write(conn, CLIENTWRITE_BODY, vals[i]->bv_val,
+            result = Curl_client_write(data, CLIENTWRITE_BODY, vals[i]->bv_val,
                                        vals[i]->bv_len);
             if(result) {
               ldap_value_free_len(vals);
@@ -676,7 +679,7 @@
             dlsize += vals[i]->bv_len;
           }
 
-          result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+          result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
           if(result) {
             ldap_value_free_len(vals);
             FREE_ON_WINLDAP(attr);
@@ -698,7 +701,7 @@
       FREE_ON_WINLDAP(attr);
       ldap_memfree(attribute);
 
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+      result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
       if(result)
         goto quit;
       dlsize++;
@@ -715,7 +718,7 @@
     LDAP_TRACE(("Received %d entries\n", num));
   }
   if(rc == LDAP_SIZELIMIT_EXCEEDED)
-    infof(data, "There are more than %d entries\n", num);
+    infof(data, "There are more than %d entries", num);
   if(ludp)
     ldap_free_urldesc(ludp);
   if(server)
@@ -812,14 +815,15 @@
  *
  * <hostname> already known from 'conn->host.name'.
  * <port>     already known from 'conn->remote_port'.
- * extract the rest from 'conn->data->state.path+1'. All fields are optional.
+ * extract the rest from 'data->state.path+1'. All fields are optional.
  * e.g.
  *   ldap://<hostname>:<port>/?<attributes>?<scope>?<filter>
  * yields ludp->lud_dn = "".
  *
  * Defined in RFC4516 section 2.
  */
-static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
+static int _ldap_url_parse2(struct Curl_easy *data,
+                            const struct connectdata *conn, LDAPURLDesc *ludp)
 {
   int rc = LDAP_SUCCESS;
   char *p;
@@ -828,10 +832,10 @@
   char *query = NULL;
   size_t i;
 
-  if(!conn->data ||
-     !conn->data->state.up.path ||
-     conn->data->state.up.path[0] != '/' ||
-     !strncasecompare("LDAP", conn->data->state.up.scheme, 4))
+  if(!data ||
+     !data->state.up.path ||
+     data->state.up.path[0] != '/' ||
+     !strncasecompare("LDAP", data->state.up.scheme, 4))
     return LDAP_INVALID_SYNTAX;
 
   ludp->lud_scope = LDAP_SCOPE_BASE;
@@ -839,13 +843,13 @@
   ludp->lud_host  = conn->host.name;
 
   /* Duplicate the path */
-  p = path = strdup(conn->data->state.up.path + 1);
+  p = path = strdup(data->state.up.path + 1);
   if(!path)
     return LDAP_NO_MEMORY;
 
   /* Duplicate the query if present */
-  if(conn->data->state.up.query) {
-    q = query = strdup(conn->data->state.up.query);
+  if(data->state.up.query) {
+    q = query = strdup(data->state.up.query);
     if(!query) {
       free(path);
       return LDAP_NO_MEMORY;
@@ -861,7 +865,7 @@
     LDAP_TRACE(("DN '%s'\n", dn));
 
     /* Unescape the DN */
-    result = Curl_urldecode(conn->data, dn, 0, &unescaped, NULL, REJECT_ZERO);
+    result = Curl_urldecode(data, dn, 0, &unescaped, NULL, REJECT_ZERO);
     if(result) {
       rc = LDAP_NO_MEMORY;
 
@@ -873,7 +877,7 @@
     ludp->lud_dn = curlx_convert_UTF8_to_tchar(unescaped);
 
     /* Free the unescaped string as we are done with it */
-    curlx_unicodefree(unescaped);
+    free(unescaped);
 
     if(!ludp->lud_dn) {
       rc = LDAP_NO_MEMORY;
@@ -923,10 +927,10 @@
       char *unescaped;
       CURLcode result;
 
-      LDAP_TRACE(("attr[%d] '%s'\n", i, attributes[i]));
+      LDAP_TRACE(("attr[%zu] '%s'\n", i, attributes[i]));
 
       /* Unescape the attribute */
-      result = Curl_urldecode(conn->data, attributes[i], 0, &unescaped, NULL,
+      result = Curl_urldecode(data, attributes[i], 0, &unescaped, NULL,
                               REJECT_ZERO);
       if(result) {
         free(attributes);
@@ -941,7 +945,7 @@
       ludp->lud_attrs[i] = curlx_convert_UTF8_to_tchar(unescaped);
 
       /* Free the unescaped string as we are done with it */
-      curlx_unicodefree(unescaped);
+      free(unescaped);
 
       if(!ludp->lud_attrs[i]) {
         free(attributes);
@@ -996,8 +1000,7 @@
     LDAP_TRACE(("filter '%s'\n", filter));
 
     /* Unescape the filter */
-    result = Curl_urldecode(conn->data, filter, 0, &unescaped, NULL,
-                            REJECT_ZERO);
+    result = Curl_urldecode(data, filter, 0, &unescaped, NULL, REJECT_ZERO);
     if(result) {
       rc = LDAP_NO_MEMORY;
 
@@ -1009,7 +1012,7 @@
     ludp->lud_filter = curlx_convert_UTF8_to_tchar(unescaped);
 
     /* Free the unescaped string as we are done with it */
-    curlx_unicodefree(unescaped);
+    free(unescaped);
 
     if(!ludp->lud_filter) {
       rc = LDAP_NO_MEMORY;
@@ -1035,7 +1038,8 @@
   return rc;
 }
 
-static int _ldap_url_parse(const struct connectdata *conn,
+static int _ldap_url_parse(struct Curl_easy *data,
+                           const struct connectdata *conn,
                            LDAPURLDesc **ludpp)
 {
   LDAPURLDesc *ludp = calloc(1, sizeof(*ludp));
@@ -1045,7 +1049,7 @@
   if(!ludp)
      return LDAP_NO_MEMORY;
 
-  rc = _ldap_url_parse2(conn, ludp);
+  rc = _ldap_url_parse2(data, conn, ludp);
   if(rc != LDAP_SUCCESS) {
     _ldap_free_urldesc(ludp);
     ludp = NULL;
@@ -1059,13 +1063,23 @@
   if(!ludp)
     return;
 
+#if defined(USE_WIN32_LDAP)
+  curlx_unicodefree(ludp->lud_dn);
+  curlx_unicodefree(ludp->lud_filter);
+#else
   free(ludp->lud_dn);
   free(ludp->lud_filter);
+#endif
 
   if(ludp->lud_attrs) {
     size_t i;
-    for(i = 0; i < ludp->lud_attrs_dups; i++)
+    for(i = 0; i < ludp->lud_attrs_dups; i++) {
+#if defined(USE_WIN32_LDAP)
+      curlx_unicodefree(ludp->lud_attrs[i]);
+#else
       free(ludp->lud_attrs[i]);
+#endif
+    }
     free(ludp->lud_attrs);
   }
 
diff --git a/lib/libcurl.plist b/lib/libcurl.plist
index eab1efe..575e28d 100644
--- a/lib/libcurl.plist
+++ b/lib/libcurl.plist
@@ -12,10 +12,10 @@
 	<string>curl</string>
 
 	<key>CFBundleIdentifier</key>
-	<string>se.haxx.curl.libcurl</string>
+	<string>se.curl.libcurl</string>
 
 	<key>CFBundleVersion</key>
-	<string>7.73.0</string>
+	<string>7.78.0</string>
 
 	<key>CFBundleName</key>
 	<string>libcurl</string>
@@ -27,9 +27,9 @@
 	<string>????</string>
 
 	<key>CFBundleShortVersionString</key>
-	<string>libcurl 7.73.0</string>
+	<string>libcurl 7.78.0</string>
 
 	<key>CFBundleGetInfoString</key>
-	<string>libcurl.plist 7.73.0</string>
+	<string>libcurl.plist 7.78.0</string>
 </dict>
 </plist>
diff --git a/lib/libcurl.rc b/lib/libcurl.rc
index 4839d0a..3f7ae16 100644
--- a/lib/libcurl.rc
+++ b/lib/libcurl.rc
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,7 @@
   BEGIN
     BLOCK "040904b0"
     BEGIN
-      VALUE "CompanyName",      "The curl library, https://curl.haxx.se/\0"
+      VALUE "CompanyName",      "The curl library, https://curl.se/\0"
       VALUE "FileDescription",  "libcurl Shared Library\0"
       VALUE "FileVersion",      LIBCURL_VERSION "\0"
       VALUE "InternalName",     "libcurl\0"
@@ -52,7 +52,7 @@
       VALUE "ProductName",      "The curl library\0"
       VALUE "ProductVersion",   LIBCURL_VERSION "\0"
       VALUE "LegalCopyright",   "\xa9 " LIBCURL_COPYRIGHT "\0"  /* a9: Copyright symbol */
-      VALUE "License",          "https://curl.haxx.se/docs/copyright.html\0"
+      VALUE "License",          "https://curl.se/docs/copyright.html\0"
     END
   END
 
diff --git a/lib/llist.c b/lib/llist.c
index 0a2baa0..e0ec739 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -94,13 +94,13 @@
                   void *user)
 {
   void *ptr;
-  if(e == NULL || list->size == 0)
+  if(!e || list->size == 0)
     return;
 
   if(e == list->head) {
     list->head = e->next;
 
-    if(list->head == NULL)
+    if(!list->head)
       list->tail = NULL;
     else
       e->next->prev = NULL;
diff --git a/lib/llist.h b/lib/llist.h
index 91cfda1..ceae2dd 100644
--- a/lib/llist.h
+++ b/lib/llist.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/makefile.amiga b/lib/makefile.amiga
index 29df654..698a8f4 100644
--- a/lib/makefile.amiga
+++ b/lib/makefile.amiga
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/lib/makefile.dj b/lib/makefile.dj
index 6ea79e4..ef1a24a 100644
--- a/lib/makefile.dj
+++ b/lib/makefile.dj
@@ -5,12 +5,12 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2003 - 2008, Gisle Vanem <gvanem@yahoo.no>.
+# Copyright (C) 2003 - 2021, Gisle Vanem <gvanem@yahoo.no>.
 # Copyright (C) 2003 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -26,7 +26,7 @@
 #
 
 DEPEND_PREREQ = curl_config.h
-VPATH  = vtls vauth
+VPATH  = vtls vauth vquic vssh
 TOPDIR = ..
 
 include ../packages/DOS/common.dj
diff --git a/lib/md4.c b/lib/md4.c
index 67119cd..c651ddf 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,7 @@
 #endif
 #endif /* USE_MBEDTLS */
 
-#if defined(USE_GNUTLS_NETTLE)
+#if defined(USE_GNUTLS)
 
 #include <nettle/md4.h>
 
@@ -70,33 +70,6 @@
   md4_digest(ctx, MD4_DIGEST_SIZE, result);
 }
 
-#elif defined(USE_GNUTLS)
-
-#include <gcrypt.h>
-
-#include "curl_memory.h"
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-typedef gcry_md_hd_t MD4_CTX;
-
-static void MD4_Init(MD4_CTX *ctx)
-{
-  gcry_md_open(ctx, GCRY_MD_MD4, 0);
-}
-
-static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
-{
-  gcry_md_write(*ctx, data, size);
-}
-
-static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
-{
-  memcpy(result, gcry_md_read(*ctx, 0), MD4_DIGEST_LENGTH);
-  gcry_md_close(*ctx);
-}
-
 #elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
 /* When OpenSSL is available we use the MD4-functions from OpenSSL */
 #include <openssl/md4.h>
@@ -201,7 +174,7 @@
 
 static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
 {
-  if(ctx->data == NULL) {
+  if(!ctx->data) {
     ctx->data = malloc(size);
     if(ctx->data != NULL) {
       memcpy(ctx->data, data, size);
diff --git a/lib/md5.c b/lib/md5.c
index d21625f..7a24fd8 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -38,7 +38,7 @@
 #endif
 #endif /* USE_MBEDTLS */
 
-#if defined(USE_GNUTLS_NETTLE)
+#if defined(USE_GNUTLS)
 
 #include <nettle/md5.h>
 #include "curl_memory.h"
@@ -64,33 +64,6 @@
   md5_digest(ctx, 16, digest);
 }
 
-#elif defined(USE_GNUTLS)
-
-#include <gcrypt.h>
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-typedef gcry_md_hd_t MD5_CTX;
-
-static void MD5_Init(MD5_CTX *ctx)
-{
-  gcry_md_open(ctx, GCRY_MD_MD5, 0);
-}
-
-static void MD5_Update(MD5_CTX *ctx,
-                       const unsigned char *input,
-                       unsigned int inputLen)
-{
-  gcry_md_write(*ctx, input, inputLen);
-}
-
-static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
-{
-  memcpy(digest, gcry_md_read(*ctx, 0), 16);
-  gcry_md_close(*ctx);
-}
-
 #elif defined(USE_OPENSSL) && !defined(USE_AMISSL)
 /* When OpenSSL is available we use the MD5-function from OpenSSL */
 #include <openssl/md5.h>
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 6c56084..050c5d4 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -55,9 +55,24 @@
  */
 
 FILE *curl_dbg_logfile = NULL;
+static bool registered_cleanup = FALSE; /* atexit registered cleanup */
 static bool memlimit = FALSE; /* enable memory limit */
 static long memsize = 0;  /* set number of mallocs allowed */
 
+/* LeakSantizier (LSAN) calls _exit() instead of exit() when a leak is detected
+   on exit so the logfile must be closed explicitly or data could be lost.
+   Though _exit() does not call atexit handlers such as this, LSAN's call to
+   _exit() comes after the atexit handlers are called. curl/curl#6620 */
+static void curl_dbg_cleanup(void)
+{
+  if(curl_dbg_logfile &&
+     curl_dbg_logfile != stderr &&
+     curl_dbg_logfile != stdout) {
+    fclose(curl_dbg_logfile);
+  }
+  curl_dbg_logfile = NULL;
+}
+
 /* this sets the log file name */
 void curl_dbg_memdebug(const char *logname)
 {
@@ -72,6 +87,8 @@
       setbuf(curl_dbg_logfile, (char *)NULL);
 #endif
   }
+  if(!registered_cleanup)
+    registered_cleanup = !atexit(curl_dbg_cleanup);
 }
 
 /* This function sets the number of malloc() calls that should return
@@ -91,15 +108,13 @@
      should not be made */
   if(memlimit && source) {
     if(!memsize) {
-      if(source) {
-        /* log to file */
-        curl_dbg_log("LIMIT %s:%d %s reached memlimit\n",
-                     source, line, func);
-        /* log to stderr also */
-        fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
-                source, line, func);
-        fflush(curl_dbg_logfile); /* because it might crash now */
-      }
+      /* log to file */
+      curl_dbg_log("LIMIT %s:%d %s reached memlimit\n",
+                   source, line, func);
+      /* log to stderr also */
+      fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
+              source, line, func);
+      fflush(curl_dbg_logfile); /* because it might crash now */
       errno = ENOMEM;
       return TRUE; /* RETURN ERROR! */
     }
diff --git a/lib/memdebug.h b/lib/memdebug.h
index 4edafdf..8e88cea 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -12,7 +12,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/mime.c b/lib/mime.c
index 6a9b64a..0bf1b46 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -152,14 +152,14 @@
   FILE * file;
 
   file = fopen(name, FOPEN_READTEXT); /* VMS */
-  if(file == NULL)
+  if(!file)
     return 0;
 
   count = 0;
   ret_stat = 1;
   while(ret_stat > 0) {
     ret_stat = fread(buffer, 1, sizeof(buffer), file);
-    if(ret_stat != 0)
+    if(ret_stat)
       count += ret_stat;
   }
   fclose(file);
@@ -1168,6 +1168,7 @@
   part->kind = MIMEKIND_NONE;
   part->flags &= ~MIME_FAST_READ;
   part->lastreadstatus = 1; /* Successful read status. */
+  part->state.state = MIMESTATE_BEGIN;
 }
 
 static void mime_subparts_free(void *ptr)
diff --git a/lib/mime.h b/lib/mime.h
index 50b7ea6..56642ae 100644
--- a/lib/mime.h
+++ b/lib/mime.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -110,6 +110,7 @@
   curl_mime *parent;               /* Parent mime structure. */
   curl_mimepart *nextpart;         /* Forward linked list. */
   enum mimekind kind;              /* The part kind. */
+  unsigned int flags;              /* Flags. */
   char *data;                      /* Memory data or file name. */
   curl_read_callback readfunc;     /* Read function. */
   curl_seek_callback seekfunc;     /* Seek function. */
@@ -122,7 +123,6 @@
   char *filename;                  /* Remote file name. */
   char *name;                      /* Data name. */
   curl_off_t datasize;             /* Expected data size. */
-  unsigned int flags;              /* Flags. */
   struct mime_state state;         /* Current readback state. */
   const struct mime_encoder *encoder; /* Content data encoder. */
   struct mime_encoder_state encstate; /* Data encoder state. */
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl
index b9c7ed2..910fedb 100755
--- a/lib/mk-ca-bundle.pl
+++ b/lib/mk-ca-bundle.pl
@@ -6,11 +6,11 @@
 # *                            | (__| |_| |  _ <| |___
 # *                             \___|\___/|_| \_\_____|
 # *
-# * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 # *
 # * This software is licensed as described in the file COPYING, which
 # * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
+# * are also available at https://curl.se/docs/copyright.html.
 # *
 # * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # * copies of the Software, and permit persons to whom the Software is
@@ -545,7 +545,7 @@
       print CRT @precert if($opt_m);
       my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK | Encode::LEAVE_SRC));
       if ($opt_t) {
-        foreach my $key (keys %trust_purposes_by_level) {
+        foreach my $key (sort keys %trust_purposes_by_level) {
            my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}});
            $maxStringLength = List::Util::max( length($string), $maxStringLength );
            print CRT $string . "\n";
diff --git a/lib/mk-ca-bundle.vbs b/lib/mk-ca-bundle.vbs
index 3487171..21b4c19 100755
--- a/lib/mk-ca-bundle.vbs
+++ b/lib/mk-ca-bundle.vbs
@@ -9,7 +9,7 @@
 '*

 '* This software is licensed as described in the file COPYING, which

 '* you should have received as part of this distribution. The terms

-'* are also available at https://curl.haxx.se/docs/copyright.html.

+'* are also available at https://curl.se/docs/copyright.html.

 '*

 '* You may opt to use, copy, modify, merge, publish, distribute and/or sell

 '* copies of the Software, and permit persons to whom the Software is

diff --git a/lib/mprintf.c b/lib/mprintf.c
index 6aceadc..7a1aec5 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1999 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1999 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -815,7 +815,7 @@
         size_t len;
 
         str = (char *) p->data.str;
-        if(str == NULL) {
+        if(!str) {
           /* Write null[] if there's space.  */
           if(prec == -1 || prec >= (long) sizeof(null) - 1) {
             str = null;
@@ -1017,9 +1017,11 @@
   retcode = dprintf_formatf(&info, addbyter, format, ap_save);
   if((retcode != -1) && info.max) {
     /* we terminate this with a zero byte */
-    if(info.max == info.length)
+    if(info.max == info.length) {
       /* we're at maximum, scrap the last letter */
       info.buffer[-1] = 0;
+      retcode--; /* don't count the nul byte */
+    }
     else
       info.buffer[0] = 0;
   }
diff --git a/lib/mqtt.c b/lib/mqtt.c
index c0e9a2b..f077e6c 100644
--- a/lib/mqtt.c
+++ b/lib/mqtt.c
@@ -5,12 +5,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2020 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2019, Björn Stenberg, <bjorn@haxx.se>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -59,10 +59,12 @@
  * Forward declarations.
  */
 
-static CURLcode mqtt_do(struct connectdata *conn, bool *done);
-static CURLcode mqtt_doing(struct connectdata *conn, bool *done);
-static int mqtt_getsock(struct connectdata *conn, curl_socket_t *sock);
-static CURLcode mqtt_setup_conn(struct connectdata *conn);
+static CURLcode mqtt_do(struct Curl_easy *data, bool *done);
+static CURLcode mqtt_doing(struct Curl_easy *data, bool *done);
+static int mqtt_getsock(struct Curl_easy *data, struct connectdata *conn,
+                        curl_socket_t *sock);
+static CURLcode mqtt_setup_conn(struct Curl_easy *data,
+                                struct connectdata *conn);
 
 /*
  * MQTT protocol handler.
@@ -84,37 +86,39 @@
   ZERO_NULL,                          /* disconnect */
   ZERO_NULL,                          /* readwrite */
   ZERO_NULL,                          /* connection_check */
+  ZERO_NULL,                          /* attach connection */
   PORT_MQTT,                          /* defport */
   CURLPROTO_MQTT,                     /* protocol */
   CURLPROTO_MQTT,                     /* family */
   PROTOPT_NONE                        /* flags */
 };
 
-static CURLcode mqtt_setup_conn(struct connectdata *conn)
+static CURLcode mqtt_setup_conn(struct Curl_easy *data,
+                                struct connectdata *conn)
 {
   /* allocate the HTTP-specific struct for the Curl_easy, only to survive
      during this request */
   struct MQTT *mq;
-  struct Curl_easy *data = conn->data;
-  DEBUGASSERT(data->req.protop == NULL);
+  (void)conn;
+  DEBUGASSERT(data->req.p.mqtt == NULL);
 
   mq = calloc(1, sizeof(struct MQTT));
   if(!mq)
     return CURLE_OUT_OF_MEMORY;
-  data->req.protop = mq;
+  data->req.p.mqtt = mq;
   return CURLE_OK;
 }
 
-static CURLcode mqtt_send(struct connectdata *conn,
+static CURLcode mqtt_send(struct Curl_easy *data,
                           char *buf, size_t len)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
-  struct Curl_easy *data = conn->data;
-  struct MQTT *mq = data->req.protop;
+  struct MQTT *mq = data->req.p.mqtt;
   ssize_t n;
-  result = Curl_write(conn, sockfd, buf, len, &n);
-  if(!result && data->set.verbose)
+  result = Curl_write(data, sockfd, buf, len, &n);
+  if(!result)
     Curl_debug(data, CURLINFO_HEADER_OUT, buf, (size_t)n);
   if(len != (size_t)n) {
     size_t nsend = len - n;
@@ -130,63 +134,229 @@
 /* Generic function called by the multi interface to figure out what socket(s)
    to wait for and for what actions during the DOING and PROTOCONNECT
    states */
-static int mqtt_getsock(struct connectdata *conn,
+static int mqtt_getsock(struct Curl_easy *data,
+                        struct connectdata *conn,
                         curl_socket_t *sock)
 {
+  (void)data;
   sock[0] = conn->sock[FIRSTSOCKET];
   return GETSOCK_READSOCK(FIRSTSOCKET);
 }
 
-static CURLcode mqtt_connect(struct connectdata *conn)
+static int mqtt_encode_len(char *buf, size_t len)
+{
+  unsigned char encoded;
+  int i;
+
+  for(i = 0; (len > 0) && (i<4); i++) {
+    encoded = len % 0x80;
+    len /= 0x80;
+    if(len)
+      encoded |= 0x80;
+    buf[i] = encoded;
+  }
+
+  return i;
+}
+
+/* add the passwd to the CONNECT packet */
+static int add_passwd(const char *passwd, const size_t plen,
+                       char *pkt, const size_t start, int remain_pos)
+{
+  /* magic number that need to be set properly */
+  const size_t conn_flags_pos = remain_pos + 8;
+  if(plen > 0xffff)
+    return 1;
+
+  /* set password flag */
+  pkt[conn_flags_pos] |= 0x40;
+
+  /* length of password provided */
+  pkt[start] = (char)((plen >> 8) & 0xFF);
+  pkt[start + 1] = (char)(plen & 0xFF);
+  memcpy(&pkt[start + 2], passwd, plen);
+  return 0;
+}
+
+/* add user to the CONN packet */
+static int add_user(const char *username, const size_t ulen,
+                    unsigned char *pkt, const size_t start, int remain_pos)
+{
+  /* magic number that need to be set properly */
+  const size_t conn_flags_pos = remain_pos + 8;
+  if(ulen > 0xffff)
+    return 1;
+
+  /* set username flag */
+  pkt[conn_flags_pos] |= 0x80;
+  /* length of username provided */
+  pkt[start] = (unsigned char)((ulen >> 8) & 0xFF);
+  pkt[start + 1] = (unsigned char)(ulen & 0xFF);
+  memcpy(&pkt[start + 2], username, ulen);
+  return 0;
+}
+
+/* add client ID to the CONN packet */
+static int add_client_id(const char *client_id, const size_t client_id_len,
+                         char *pkt, const size_t start)
+{
+  if(client_id_len != MQTT_CLIENTID_LEN)
+    return 1;
+  pkt[start] = 0x00;
+  pkt[start + 1] = MQTT_CLIENTID_LEN;
+  memcpy(&pkt[start + 2], client_id, MQTT_CLIENTID_LEN);
+  return 0;
+}
+
+/* Set initial values of CONN packet */
+static int init_connpack(char *packet, char *remain, int remain_pos)
+{
+  /* Fixed header starts */
+  /* packet type */
+  packet[0] = MQTT_MSG_CONNECT;
+  /* remaining length field */
+  memcpy(&packet[1], remain, remain_pos);
+  /* Fixed header ends */
+
+  /* Variable header starts */
+  /* protocol length */
+  packet[remain_pos + 1] = 0x00;
+  packet[remain_pos + 2] = 0x04;
+  /* protocol name */
+  packet[remain_pos + 3] = 'M';
+  packet[remain_pos + 4] = 'Q';
+  packet[remain_pos + 5] = 'T';
+  packet[remain_pos + 6] = 'T';
+  /* protocol level */
+  packet[remain_pos + 7] = 0x04;
+  /* CONNECT flag: CleanSession */
+  packet[remain_pos + 8] = 0x02;
+  /* keep-alive 0 = disabled */
+  packet[remain_pos + 9] = 0x00;
+  packet[remain_pos + 10] = 0x3c;
+  /*end of variable header*/
+  return remain_pos + 10;
+}
+
+static CURLcode mqtt_connect(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  const size_t client_id_offset = 14;
-  const size_t packetlen = client_id_offset + MQTT_CLIENTID_LEN;
+  int pos = 0;
+  int rc = 0;
+  /*remain length*/
+  int remain_pos = 0;
+  char remain[4] = {0};
+  size_t packetlen = 0;
+  size_t payloadlen = 0;
+  size_t start_user = 0;
+  size_t start_pwd = 0;
   char client_id[MQTT_CLIENTID_LEN + 1] = "curl";
   const size_t clen = strlen("curl");
-  char packet[32] = {
-    MQTT_MSG_CONNECT,  /* packet type */
-    0x00,              /* remaining length */
-    0x00, 0x04,        /* protocol length */
-    'M','Q','T','T',   /* protocol name */
-    0x04,              /* protocol level */
-    0x02,              /* CONNECT flag: CleanSession */
-    0x00, 0x3c,        /* keep-alive 0 = disabled */
-    0x00, 0x00         /* payload1 length */
-  };
-  packet[1] = (packetlen - 2) & 0x7f;
-  packet[client_id_offset - 1] = MQTT_CLIENTID_LEN;
+  char *packet = NULL;
 
-  result = Curl_rand_hex(conn->data, (unsigned char *)&client_id[clen],
+  /* extracting username from request */
+  const char *username = data->state.aptr.user ?
+    data->state.aptr.user : "";
+  const size_t ulen = strlen(username);
+  /* extracting password from request */
+  const char *passwd = data->state.aptr.passwd ?
+    data->state.aptr.passwd : "";
+  const size_t plen = strlen(passwd);
+
+  payloadlen = ulen + plen + MQTT_CLIENTID_LEN + 2;
+  /* The plus 2 are for the MSB and LSB describing the length of the string to
+   * be added on the payload. Refer to spec 1.5.2 and 1.5.4 */
+  if(ulen)
+    payloadlen += 2;
+  if(plen)
+    payloadlen += 2;
+
+  /* getting how much occupy the remain length */
+  remain_pos = mqtt_encode_len(remain, payloadlen + 10);
+
+  /* 10 length of variable header and 1 the first byte of the fixed header */
+  packetlen = payloadlen + 10 + remain_pos + 1;
+
+  /* allocating packet */
+  if(packetlen > 268435455)
+    return CURLE_WEIRD_SERVER_REPLY;
+  packet = malloc(packetlen);
+  if(!packet)
+    return CURLE_OUT_OF_MEMORY;
+  memset(packet, 0, packetlen);
+
+  /* set initial values for CONN pack */
+  pos = init_connpack(packet, remain, remain_pos);
+
+  result = Curl_rand_hex(data, (unsigned char *)&client_id[clen],
                          MQTT_CLIENTID_LEN - clen + 1);
-  memcpy(&packet[client_id_offset], client_id, MQTT_CLIENTID_LEN);
-  infof(conn->data, "Using client id '%s'\n", client_id);
+  /* add client id */
+  rc = add_client_id(client_id, strlen(client_id), packet, pos + 1);
+  if(rc) {
+    failf(data, "Client ID length mismatched: [%lu]", strlen(client_id));
+    result = CURLE_WEIRD_SERVER_REPLY;
+    goto end;
+  }
+  infof(data, "Using client id '%s'", client_id);
+
+  /* position where starts the user payload */
+  start_user = pos + 3 + MQTT_CLIENTID_LEN;
+  /* position where starts the password payload */
+  start_pwd = start_user + ulen;
+  /* if user name was provided, add it to the packet */
+  if(ulen) {
+    start_pwd += 2;
+
+    rc = add_user(username, ulen,
+                  (unsigned char *)packet, start_user, remain_pos);
+    if(rc) {
+      failf(data, "Username is too large: [%lu]", ulen);
+      result = CURLE_WEIRD_SERVER_REPLY;
+      goto end;
+    }
+  }
+
+  /* if passwd was provided, add it to the packet */
+  if(plen) {
+    rc = add_passwd(passwd, plen, packet, start_pwd, remain_pos);
+    if(rc) {
+      failf(data, "Password is too large: [%lu]", plen);
+      result = CURLE_WEIRD_SERVER_REPLY;
+      goto end;
+    }
+  }
+
   if(!result)
-    result = mqtt_send(conn, packet, packetlen);
+    result = mqtt_send(data, packet, packetlen);
+
+end:
+  if(packet)
+    free(packet);
+  Curl_safefree(data->state.aptr.user);
+  Curl_safefree(data->state.aptr.passwd);
   return result;
 }
 
-static CURLcode mqtt_disconnect(struct connectdata *conn)
+static CURLcode mqtt_disconnect(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  result = mqtt_send(conn, (char *)"\xe0\x00", 2);
+  result = mqtt_send(data, (char *)"\xe0\x00", 2);
   return result;
 }
 
-static CURLcode mqtt_verify_connack(struct connectdata *conn)
+static CURLcode mqtt_verify_connack(struct Curl_easy *data)
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
   unsigned char readbuf[MQTT_CONNACK_LEN];
   ssize_t nread;
-  struct Curl_easy *data = conn->data;
 
-  result = Curl_read(conn, sockfd, (char *)readbuf, MQTT_CONNACK_LEN, &nread);
+  result = Curl_read(data, sockfd, (char *)readbuf, MQTT_CONNACK_LEN, &nread);
   if(result)
     goto fail;
 
-  if(data->set.verbose)
-    Curl_debug(data, CURLINFO_HEADER_IN, (char *)readbuf, (size_t)nread);
+  Curl_debug(data, CURLINFO_HEADER_IN, (char *)readbuf, (size_t)nread);
 
   /* fixme */
   if(nread < MQTT_CONNACK_LEN) {
@@ -205,41 +375,18 @@
   return result;
 }
 
-static CURLcode mqtt_get_topic(struct connectdata *conn,
+static CURLcode mqtt_get_topic(struct Curl_easy *data,
                                char **topic, size_t *topiclen)
 {
-  CURLcode result = CURLE_OK;
-  char *path = conn->data->state.up.path;
-
-  if(strlen(path) > 1) {
-    result = Curl_urldecode(conn->data, path + 1, 0, topic, topiclen,
-                            REJECT_NADA);
-  }
-  else {
-    failf(conn->data, "Error: No topic specified.");
-    result = CURLE_URL_MALFORMAT;
-  }
-  return result;
+  char *path = data->state.up.path;
+  if(strlen(path) > 1)
+    return Curl_urldecode(data, path + 1, 0, topic, topiclen,
+                          REJECT_NADA);
+  failf(data, "No MQTT topic found. Forgot to URL encode it?");
+  return CURLE_URL_MALFORMAT;
 }
 
-
-static int mqtt_encode_len(char *buf, size_t len)
-{
-  unsigned char encoded;
-  int i;
-
-  for(i = 0; (len > 0) && (i<4); i++) {
-    encoded = len % 0x80;
-    len /= 0x80;
-    if(len)
-      encoded |= 0x80;
-    buf[i] = encoded;
-  }
-
-  return i;
-}
-
-static CURLcode mqtt_subscribe(struct connectdata *conn)
+static CURLcode mqtt_subscribe(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
   char *topic = NULL;
@@ -248,8 +395,9 @@
   size_t packetlen;
   char encodedsize[4];
   size_t n;
+  struct connectdata *conn = data->conn;
 
-  result = mqtt_get_topic(conn, &topic, &topiclen);
+  result = mqtt_get_topic(data, &topic, &topiclen);
   if(result)
     goto fail;
 
@@ -275,7 +423,7 @@
   memcpy(&packet[5 + n], topic, topiclen);
   packet[5 + n + topiclen] = 0; /* QoS zero */
 
-  result = mqtt_send(conn, (char *)packet, packetlen);
+  result = mqtt_send(data, (char *)packet, packetlen);
 
 fail:
   free(topic);
@@ -286,20 +434,20 @@
 /*
  * Called when the first byte was already read.
  */
-static CURLcode mqtt_verify_suback(struct connectdata *conn)
+static CURLcode mqtt_verify_suback(struct Curl_easy *data)
 {
   CURLcode result;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
   unsigned char readbuf[MQTT_SUBACK_LEN];
   ssize_t nread;
   struct mqtt_conn *mqtt = &conn->proto.mqtt;
 
-  result = Curl_read(conn, sockfd, (char *)readbuf, MQTT_SUBACK_LEN, &nread);
+  result = Curl_read(data, sockfd, (char *)readbuf, MQTT_SUBACK_LEN, &nread);
   if(result)
     goto fail;
 
-  if(conn->data->set.verbose)
-    Curl_debug(conn->data, CURLINFO_HEADER_IN, (char *)readbuf, (size_t)nread);
+  Curl_debug(data, CURLINFO_HEADER_IN, (char *)readbuf, (size_t)nread);
 
   /* fixme */
   if(nread < MQTT_SUBACK_LEN) {
@@ -317,11 +465,11 @@
   return result;
 }
 
-static CURLcode mqtt_publish(struct connectdata *conn)
+static CURLcode mqtt_publish(struct Curl_easy *data)
 {
   CURLcode result;
-  char *payload = conn->data->set.postfields;
-  size_t payloadlen = (size_t)conn->data->set.postfieldsize;
+  char *payload = data->set.postfields;
+  size_t payloadlen;
   char *topic = NULL;
   size_t topiclen;
   unsigned char *pkt = NULL;
@@ -329,8 +477,16 @@
   size_t remaininglength;
   size_t encodelen;
   char encodedbytes[4];
+  curl_off_t postfieldsize = data->set.postfieldsize;
 
-  result = mqtt_get_topic(conn, &topic, &topiclen);
+  if(!payload)
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+  if(postfieldsize < 0)
+    payloadlen = strlen(payload);
+  else
+    payloadlen = (size_t)postfieldsize;
+
+  result = mqtt_get_topic(data, &topic, &topiclen);
   if(result)
     goto fail;
 
@@ -354,7 +510,7 @@
   i += topiclen;
   memcpy(&pkt[i], payload, payloadlen);
   i += payloadlen;
-  result = mqtt_send(conn, (char *)pkt, i);
+  result = mqtt_send(data, (char *)pkt, i);
 
 fail:
   free(pkt);
@@ -397,13 +553,14 @@
 #endif
 
 /* The only way to change state */
-static void mqstate(struct connectdata *conn,
+static void mqstate(struct Curl_easy *data,
                     enum mqttstate state,
                     enum mqttstate nextstate) /* used if state == FIRST */
 {
+  struct connectdata *conn = data->conn;
   struct mqtt_conn *mqtt = &conn->proto.mqtt;
 #ifdef CURLDEBUG
-  infof(conn->data, "%s (from %s) (next is %s)\n",
+  infof(data, "%s (from %s) (next is %s)",
         statenames[state],
         statenames[mqtt->state],
         (state == MQTT_FIRST)? statenames[nextstate] : "");
@@ -417,27 +574,26 @@
 /* for the publish packet */
 #define MQTT_HEADER_LEN 5    /* max 5 bytes */
 
-static CURLcode mqtt_read_publish(struct connectdata *conn,
-                                  bool *done)
+static CURLcode mqtt_read_publish(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
   ssize_t nread;
-  struct Curl_easy *data = conn->data;
   unsigned char *pkt = (unsigned char *)data->state.buffer;
   size_t remlen;
   struct mqtt_conn *mqtt = &conn->proto.mqtt;
-  struct MQTT *mq = data->req.protop;
+  struct MQTT *mq = data->req.p.mqtt;
   unsigned char packet;
 
   switch(mqtt->state) {
   MQTT_SUBACK_COMING:
   case MQTT_SUBACK_COMING:
-    result = mqtt_verify_suback(conn);
+    result = mqtt_verify_suback(data);
     if(result)
       break;
 
-    mqstate(conn, MQTT_FIRST, MQTT_PUBWAIT);
+    mqstate(data, MQTT_FIRST, MQTT_PUBWAIT);
     break;
 
   case MQTT_SUBACK:
@@ -445,13 +601,13 @@
     /* we are expecting PUBLISH or SUBACK */
     packet = mq->firstbyte & 0xf0;
     if(packet == MQTT_MSG_PUBLISH)
-      mqstate(conn, MQTT_PUB_REMAIN, MQTT_NOSTATE);
+      mqstate(data, MQTT_PUB_REMAIN, MQTT_NOSTATE);
     else if(packet == MQTT_MSG_SUBACK) {
-      mqstate(conn, MQTT_SUBACK_COMING, MQTT_NOSTATE);
+      mqstate(data, MQTT_SUBACK_COMING, MQTT_NOSTATE);
       goto MQTT_SUBACK_COMING;
     }
     else if(packet == MQTT_MSG_DISCONNECT) {
-      infof(data, "Got DISCONNECT\n");
+      infof(data, "Got DISCONNECT");
       *done = TRUE;
       goto end;
     }
@@ -462,7 +618,13 @@
 
     /* -- switched state -- */
     remlen = mq->remaining_length;
-    infof(data, "Remaining length: %zd bytes\n", remlen);
+    infof(data, "Remaining length: %zd bytes", remlen);
+    if(data->set.max_filesize &&
+       (curl_off_t)remlen > data->set.max_filesize) {
+      failf(data, "Maximum file size exceeded");
+      result = CURLE_FILESIZE_EXCEEDED;
+      goto end;
+    }
     Curl_pgrsSetDownloadSize(data, remlen);
     data->req.bytecount = 0;
     data->req.size = remlen;
@@ -474,20 +636,19 @@
     size_t rest = mq->npacket;
     if(rest > (size_t)data->set.buffer_size)
       rest = (size_t)data->set.buffer_size;
-    result = Curl_read(conn, sockfd, (char *)pkt, rest, &nread);
+    result = Curl_read(data, sockfd, (char *)pkt, rest, &nread);
     if(result) {
       if(CURLE_AGAIN == result) {
-        infof(data, "EEEE AAAAGAIN\n");
+        infof(data, "EEEE AAAAGAIN");
       }
       goto end;
     }
     if(!nread) {
-      infof(data, "server disconnected\n");
+      infof(data, "server disconnected");
       result = CURLE_PARTIAL_FILE;
       goto end;
     }
-    if(data->set.verbose)
-      Curl_debug(data, CURLINFO_DATA_IN, (char *)pkt, (size_t)nread);
+    Curl_debug(data, CURLINFO_DATA_IN, (char *)pkt, (size_t)nread);
 
     mq->npacket -= nread;
     k->bytecount += nread;
@@ -495,13 +656,13 @@
 
     /* if QoS is set, message contains packet id */
 
-    result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)pkt, nread);
+    result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)pkt, nread);
     if(result)
       goto end;
 
     if(!mq->npacket)
       /* no more PUBLISH payload, back to subscribe wait state */
-      mqstate(conn, MQTT_FIRST, MQTT_PUBWAIT);
+      mqstate(data, MQTT_FIRST, MQTT_PUBWAIT);
     break;
   }
   default:
@@ -513,28 +674,26 @@
   return result;
 }
 
-static CURLcode mqtt_do(struct connectdata *conn, bool *done)
+static CURLcode mqtt_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   *done = FALSE; /* unconditionally */
 
-  result = mqtt_connect(conn);
+  result = mqtt_connect(data);
   if(result) {
     failf(data, "Error %d sending MQTT CONN request", result);
     return result;
   }
-  mqstate(conn, MQTT_FIRST, MQTT_CONNACK);
+  mqstate(data, MQTT_FIRST, MQTT_CONNACK);
   return CURLE_OK;
 }
 
-static CURLcode mqtt_doing(struct connectdata *conn, bool *done)
+static CURLcode mqtt_doing(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct mqtt_conn *mqtt = &conn->proto.mqtt;
-  struct Curl_easy *data = conn->data;
-  struct MQTT *mq = data->req.protop;
+  struct MQTT *mq = data->req.p.mqtt;
   ssize_t nread;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
   unsigned char *pkt = (unsigned char *)data->state.buffer;
@@ -545,66 +704,68 @@
   if(mq->nsend) {
     /* send the remainder of an outgoing packet */
     char *ptr = mq->sendleftovers;
-    result = mqtt_send(conn, mq->sendleftovers, mq->nsend);
+    result = mqtt_send(data, mq->sendleftovers, mq->nsend);
     free(ptr);
     if(result)
       return result;
   }
 
-  infof(data, "mqtt_doing: state [%d]\n", (int) mqtt->state);
+  infof(data, "mqtt_doing: state [%d]", (int) mqtt->state);
   switch(mqtt->state) {
   case MQTT_FIRST:
     /* Read the initial byte only */
-    result = Curl_read(conn, sockfd, (char *)&mq->firstbyte, 1, &nread);
-    if(result)
+    result = Curl_read(data, sockfd, (char *)&mq->firstbyte, 1, &nread);
+    if(!nread)
       break;
-    if(data->set.verbose)
-      Curl_debug(data, CURLINFO_HEADER_IN, (char *)&mq->firstbyte, 1);
+    Curl_debug(data, CURLINFO_HEADER_IN, (char *)&mq->firstbyte, 1);
     /* remember the first byte */
     mq->npacket = 0;
-    mqstate(conn, MQTT_REMAINING_LENGTH, MQTT_NOSTATE);
+    mqstate(data, MQTT_REMAINING_LENGTH, MQTT_NOSTATE);
     /* FALLTHROUGH */
   case MQTT_REMAINING_LENGTH:
     do {
-      result = Curl_read(conn, sockfd, (char *)&byte, 1, &nread);
-      if(result)
+      result = Curl_read(data, sockfd, (char *)&byte, 1, &nread);
+      if(!nread)
         break;
-      if(data->set.verbose)
-        Curl_debug(data, CURLINFO_HEADER_IN, (char *)&byte, 1);
+      Curl_debug(data, CURLINFO_HEADER_IN, (char *)&byte, 1);
       pkt[mq->npacket++] = byte;
     } while((byte & 0x80) && (mq->npacket < 4));
+    if(nread && (byte & 0x80))
+      /* MQTT supports up to 127 * 128^0 + 127 * 128^1 + 127 * 128^2 +
+         127 * 128^3 bytes. server tried to send more */
+      result = CURLE_WEIRD_SERVER_REPLY;
     if(result)
       break;
     mq->remaining_length = mqtt_decode_len(&pkt[0], mq->npacket, NULL);
     mq->npacket = 0;
     if(mq->remaining_length) {
-      mqstate(conn, mqtt->nextstate, MQTT_NOSTATE);
+      mqstate(data, mqtt->nextstate, MQTT_NOSTATE);
       break;
     }
-    mqstate(conn, MQTT_FIRST, MQTT_FIRST);
+    mqstate(data, MQTT_FIRST, MQTT_FIRST);
 
     if(mq->firstbyte == MQTT_MSG_DISCONNECT) {
-      infof(data, "Got DISCONNECT\n");
+      infof(data, "Got DISCONNECT");
       *done = TRUE;
     }
     break;
   case MQTT_CONNACK:
-    result = mqtt_verify_connack(conn);
+    result = mqtt_verify_connack(data);
     if(result)
       break;
 
-    if(conn->data->state.httpreq == HTTPREQ_POST) {
-      result = mqtt_publish(conn);
+    if(data->state.httpreq == HTTPREQ_POST) {
+      result = mqtt_publish(data);
       if(!result) {
-        result = mqtt_disconnect(conn);
+        result = mqtt_disconnect(data);
         *done = TRUE;
       }
       mqtt->nextstate = MQTT_FIRST;
     }
     else {
-      result = mqtt_subscribe(conn);
+      result = mqtt_subscribe(data);
       if(!result) {
-        mqstate(conn, MQTT_FIRST, MQTT_SUBACK);
+        mqstate(data, MQTT_FIRST, MQTT_SUBACK);
       }
     }
     break;
@@ -612,11 +773,11 @@
   case MQTT_SUBACK:
   case MQTT_PUBWAIT:
   case MQTT_PUB_REMAIN:
-    result = mqtt_read_publish(conn, done);
+    result = mqtt_read_publish(data, done);
     break;
 
   default:
-    failf(conn->data, "State not handled yet");
+    failf(data, "State not handled yet");
     *done = TRUE;
     break;
   }
diff --git a/lib/mqtt.h b/lib/mqtt.h
index 37c0441..fb52c72 100644
--- a/lib/mqtt.h
+++ b/lib/mqtt.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/multi.c b/lib/multi.c
index 4cc7c5a..82d538d 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -69,7 +69,7 @@
 #define CURL_MULTI_HANDLE 0x000bab1e
 
 #define GOOD_MULTI_HANDLE(x) \
-  ((x) && (x)->type == CURL_MULTI_HANDLE)
+  ((x) && (x)->magic == CURL_MULTI_HANDLE)
 
 static CURLMcode singlesocket(struct Curl_multi *multi,
                               struct Curl_easy *data);
@@ -83,19 +83,19 @@
 #ifdef DEBUGBUILD
 static const char * const statename[]={
   "INIT",
-  "CONNECT_PEND",
+  "PENDING",
   "CONNECT",
-  "WAITRESOLVE",
-  "WAITCONNECT",
-  "WAITPROXYCONNECT",
-  "SENDPROTOCONNECT",
+  "RESOLVING",
+  "CONNECTING",
+  "TUNNELING",
   "PROTOCONNECT",
+  "PROTOCONNECTING",
   "DO",
   "DOING",
-  "DO_MORE",
-  "DO_DONE",
-  "PERFORM",
-  "TOOFAST",
+  "DOING_MORE",
+  "DID",
+  "PERFORMING",
+  "RATELIMITING",
   "DONE",
   "COMPLETED",
   "MSGSENT",
@@ -105,7 +105,14 @@
 /* function pointer called once when switching TO a state */
 typedef void (*init_multistate_func)(struct Curl_easy *data);
 
-static void Curl_init_completed(struct Curl_easy *data)
+/* called in DID state, before PERFORMING state */
+static void before_perform(struct Curl_easy *data)
+{
+  data->req.chunk = FALSE;
+  Curl_pgrsTime(data, TIMER_PRETRANSFER);
+}
+
+static void init_completed(struct Curl_easy *data)
 {
   /* this is a completed transfer */
 
@@ -123,23 +130,23 @@
 )
 {
   CURLMstate oldstate = data->mstate;
-  static const init_multistate_func finit[CURLM_STATE_LAST] = {
+  static const init_multistate_func finit[MSTATE_LAST] = {
     NULL,              /* INIT */
-    NULL,              /* CONNECT_PEND */
+    NULL,              /* PENDING */
     Curl_init_CONNECT, /* CONNECT */
-    NULL,              /* WAITRESOLVE */
-    NULL,              /* WAITCONNECT */
-    NULL,              /* WAITPROXYCONNECT */
-    NULL,              /* SENDPROTOCONNECT */
+    NULL,              /* RESOLVING */
+    NULL,              /* CONNECTING */
+    NULL,              /* TUNNELING */
     NULL,              /* PROTOCONNECT */
+    NULL,              /* PROTOCONNECTING */
     Curl_connect_free, /* DO */
     NULL,              /* DOING */
-    NULL,              /* DO_MORE */
-    NULL,              /* DO_DONE */
-    NULL,              /* PERFORM */
-    NULL,              /* TOOFAST */
+    NULL,              /* DOING_MORE */
+    before_perform,    /* DID */
+    NULL,              /* PERFORMING */
+    NULL,              /* RATELIMITING */
     NULL,              /* DONE */
-    Curl_init_completed, /* COMPLETED */
+    init_completed,    /* COMPLETED */
     NULL               /* MSGSENT */
   };
 
@@ -154,21 +161,21 @@
   data->mstate = state;
 
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
-  if(data->mstate >= CURLM_STATE_CONNECT_PEND &&
-     data->mstate < CURLM_STATE_COMPLETED) {
+  if(data->mstate >= MSTATE_PENDING &&
+     data->mstate < MSTATE_COMPLETED) {
     long connection_id = -5000;
 
     if(data->conn)
       connection_id = data->conn->connection_id;
 
     infof(data,
-          "STATE: %s => %s handle %p; line %d (connection #%ld)\n",
+          "STATE: %s => %s handle %p; line %d (connection #%ld)",
           statename[oldstate], statename[data->mstate],
           (void *)data, lineno, connection_id);
   }
 #endif
 
-  if(state == CURLM_STATE_COMPLETED) {
+  if(state == MSTATE_COMPLETED) {
     /* changing to COMPLETED means there's one less easy handle 'alive' */
     DEBUGASSERT(data->multi->num_alive > 0);
     data->multi->num_alive--;
@@ -193,8 +200,8 @@
   struct Curl_hash transfers; /* hash of transfers using this socket */
   unsigned int action;  /* what combined action READ/WRITE this socket waits
                            for */
-  void *socketp; /* settable by users with curl_multi_assign() */
   unsigned int users; /* number of transfers using this */
+  void *socketp; /* settable by users with curl_multi_assign() */
   unsigned int readers; /* this many transfers want to read */
   unsigned int writers; /* this many transfers want to write */
 };
@@ -353,7 +360,7 @@
   if(!multi)
     return NULL;
 
-  multi->type = CURL_MULTI_HANDLE;
+  multi->magic = CURL_MULTI_HANDLE;
 
   if(Curl_mk_dnscache(&multi->hostcache))
     goto error;
@@ -446,7 +453,7 @@
     data->set.errorbuffer[0] = 0;
 
   /* set the easy handle */
-  multistate(data, CURLM_STATE_INIT);
+  multistate(data, MSTATE_INIT);
 
   /* for multi interface connections, we share DNS cache automatically if the
      easy handle's one is currently not set. */
@@ -555,16 +562,14 @@
   struct connectdata *conn = data->conn;
   unsigned int i;
 
-  DEBUGF(infof(data, "multi_done\n"));
+  DEBUGF(infof(data, "multi_done"));
 
   if(data->state.done)
     /* Stop if multi_done() has already been called */
     return CURLE_OK;
 
-  conn->data = data; /* ensure the connection uses this transfer now */
-
   /* Stop the resolver and free its own resources (but not dns_entry yet). */
-  Curl_resolver_kill(conn);
+  Curl_resolver_kill(data);
 
   /* Cleanup possible redirect junk */
   Curl_safefree(data->req.newurl);
@@ -585,14 +590,14 @@
 
   /* this calls the protocol-specific function pointer previously set */
   if(conn->handler->done)
-    result = conn->handler->done(conn, status, premature);
+    result = conn->handler->done(data, status, premature);
   else
     result = status;
 
   if(CURLE_ABORTED_BY_CALLBACK != result) {
     /* avoid this if we already aborted by callback to avoid this calling
        another callback */
-    CURLcode rc = Curl_pgrsDone(conn);
+    CURLcode rc = Curl_pgrsDone(data);
     if(!result && rc)
       result = CURLE_ABORTED_BY_CALLBACK;
   }
@@ -603,16 +608,13 @@
   Curl_detach_connnection(data);
   if(CONN_INUSE(conn)) {
     /* Stop if still used. */
-    /* conn->data must not remain pointing to this transfer since it is going
-       away! Find another to own it! */
-    conn->data = conn->easyq.head->ptr;
     CONNCACHE_UNLOCK(data);
     DEBUGF(infof(data, "Connection still in use %zu, "
-                 "no more multi_done now!\n",
+                 "no more multi_done now!",
                  conn->easyq.size));
     return CURLE_OK;
   }
-  conn->data = NULL; /* the connection now has no owner */
+
   data->state.done = TRUE; /* called just now! */
 
   if(conn->dns_entry) {
@@ -685,7 +687,7 @@
     if(Curl_conncache_return_conn(data, conn)) {
       /* remember the most recently used connection */
       data->state.lastconnect_id = conn->connection_id;
-      infof(data, "%s\n", buffer);
+      infof(data, "%s", buffer);
     }
     else
       data->state.lastconnect_id = -1;
@@ -696,22 +698,17 @@
   return result;
 }
 
-static int close_connect_only(struct connectdata *conn, void *param)
+static int close_connect_only(struct Curl_easy *data,
+                              struct connectdata *conn, void *param)
 {
-  struct Curl_easy *data = param;
-
+  (void)param;
   if(data->state.lastconnect_id != conn->connection_id)
     return 0;
 
-  if(conn->data != data)
-    return 1;
-  conn->data = NULL;
-
   if(!conn->bits.connect_only)
     return 1;
 
   connclose(conn, "Removing connect-only easy handle");
-  conn->bits.connect_only = FALSE;
 
   return 1;
 }
@@ -721,7 +718,6 @@
 {
   struct Curl_easy *easy = data;
   bool premature;
-  bool easy_owns_conn;
   struct Curl_llist_element *e;
 
   /* First, make some basic checks that the CURLM handle is a good handle */
@@ -743,9 +739,7 @@
   if(multi->in_callback)
     return CURLM_RECURSIVE_API_CALL;
 
-  premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE;
-  easy_owns_conn = (data->conn && (data->conn->data == easy)) ?
-    TRUE : FALSE;
+  premature = (data->mstate < MSTATE_COMPLETED) ? TRUE : FALSE;
 
   /* If the 'state' is not INIT or COMPLETED, we might need to do something
      nice to put the easy_handle in a good known state when this returns. */
@@ -756,28 +750,20 @@
   }
 
   if(data->conn &&
-     data->mstate > CURLM_STATE_DO &&
-     data->mstate < CURLM_STATE_COMPLETED) {
+     data->mstate > MSTATE_DO &&
+     data->mstate < MSTATE_COMPLETED) {
     /* Set connection owner so that the DONE function closes it.  We can
        safely do this here since connection is killed. */
-    data->conn->data = easy;
     streamclose(data->conn, "Removed with partial response");
-    easy_owns_conn = TRUE;
   }
 
   if(data->conn) {
+    /* multi_done() clears the association between the easy handle and the
+       connection.
 
-    /* we must call multi_done() here (if we still own the connection) so that
-       we don't leave a half-baked one around */
-    if(easy_owns_conn) {
-
-      /* multi_done() clears the association between the easy handle and the
-         connection.
-
-         Note that this ignores the return code simply because there's
-         nothing really useful to do with it anyway! */
-      (void)multi_done(data, data->result, premature);
-    }
+       Note that this ignores the return code simply because there's
+       nothing really useful to do with it anyway! */
+    (void)multi_done(data, data->result, premature);
   }
 
   /* The timer must be shut down before data->multi is set to NULL, else the
@@ -805,7 +791,7 @@
 
   /* change state without using multistate(), only to make singlesocket() do
      what we want */
-  data->mstate = CURLM_STATE_COMPLETED;
+  data->mstate = MSTATE_COMPLETED;
   singlesocket(multi, easy); /* to let the application know what sockets that
                                 vanish with this handle */
 
@@ -815,7 +801,7 @@
   if(data->state.lastconnect_id != -1) {
     /* Mark any connect-only connection for closure */
     Curl_conncache_foreach(data, data->state.conn_cache,
-                           data, &close_connect_only);
+                           NULL, close_connect_only);
   }
 
 #ifdef USE_LIBPSL
@@ -843,6 +829,17 @@
     }
   }
 
+  /* Remove from the pending list if it is there. Otherwise this will
+     remain on the pending list forever due to the state change. */
+  for(e = multi->pending.head; e; e = e->next) {
+    struct Curl_easy *curr_data = e->ptr;
+
+    if(curr_data == data) {
+      Curl_llist_remove(&multi->pending, e, NULL);
+      break;
+    }
+  }
+
   /* make the previous node point to our next */
   if(data->prev)
     data->prev->next = data->next;
@@ -859,6 +856,8 @@
      We do not touch the easy handle here! */
   multi->num_easy--; /* one less to care about now */
 
+  process_pending_handles(multi);
+
   Curl_update_timer(multi);
   return CURLM_OK;
 }
@@ -878,8 +877,10 @@
 void Curl_detach_connnection(struct Curl_easy *data)
 {
   struct connectdata *conn = data->conn;
-  if(conn)
+  if(conn) {
     Curl_llist_remove(&conn->easyq, &data->conn_queue, NULL);
+    Curl_ssl_detach_conn(data, conn);
+  }
   data->conn = NULL;
 }
 
@@ -896,6 +897,9 @@
   data->conn = conn;
   Curl_llist_insert_next(&conn->easyq, conn->easyq.tail, data,
                          &data->conn_queue);
+  if(conn->handler->attach)
+    conn->handler->attach(data, conn);
+  Curl_ssl_associate_conn(data, conn);
 }
 
 static int waitconnect_getsock(struct connectdata *conn,
@@ -908,7 +912,7 @@
 #ifdef USE_SSL
 #ifndef CURL_DISABLE_PROXY
   if(CONNECT_FIRSTSOCKET_PROXY_SSL())
-    return Curl_ssl_getsock(conn, sock);
+    return Curl_ssl->getsock(conn, sock);
 #endif
 #endif
 
@@ -936,35 +940,36 @@
 {
   sock[0] = conn->sock[FIRSTSOCKET];
 
-  /* when we've sent a CONNECT to a proxy, we should rather wait for the
-     socket to become readable to be able to get the response headers */
   if(conn->connect_state)
-    return GETSOCK_READSOCK(0);
+    return Curl_connect_getsock(conn);
 
   return GETSOCK_WRITESOCK(0);
 }
 
-static int domore_getsock(struct connectdata *conn,
+static int domore_getsock(struct Curl_easy *data,
+                          struct connectdata *conn,
                           curl_socket_t *socks)
 {
   if(conn && conn->handler->domore_getsock)
-    return conn->handler->domore_getsock(conn, socks);
+    return conn->handler->domore_getsock(data, conn, socks);
   return GETSOCK_BLANK;
 }
 
-static int doing_getsock(struct connectdata *conn,
+static int doing_getsock(struct Curl_easy *data,
+                         struct connectdata *conn,
                          curl_socket_t *socks)
 {
   if(conn && conn->handler->doing_getsock)
-    return conn->handler->doing_getsock(conn, socks);
+    return conn->handler->doing_getsock(data, conn, socks);
   return GETSOCK_BLANK;
 }
 
-static int protocol_getsock(struct connectdata *conn,
+static int protocol_getsock(struct Curl_easy *data,
+                            struct connectdata *conn,
                             curl_socket_t *socks)
 {
   if(conn->handler->proto_getsock)
-    return conn->handler->proto_getsock(conn, socks);
+    return conn->handler->proto_getsock(data, conn, socks);
   /* Backup getsock logic. Since there is a live socket in use, we must wait
      for it or it will be removed from watching when the multi_socket API is
      used. */
@@ -977,47 +982,41 @@
 static int multi_getsock(struct Curl_easy *data,
                          curl_socket_t *socks)
 {
+  struct connectdata *conn = data->conn;
   /* The no connection case can happen when this is called from
      curl_multi_remove_handle() => singlesocket() => multi_getsock().
   */
-  if(!data->conn)
+  if(!conn)
     return 0;
 
-  if(data->mstate > CURLM_STATE_CONNECT &&
-     data->mstate < CURLM_STATE_COMPLETED) {
-    /* Set up ownership correctly */
-    data->conn->data = data;
-  }
-
   switch(data->mstate) {
   default:
     return 0;
 
-  case CURLM_STATE_WAITRESOLVE:
-    return Curl_resolv_getsock(data->conn, socks);
+  case MSTATE_RESOLVING:
+    return Curl_resolv_getsock(data, socks);
 
-  case CURLM_STATE_PROTOCONNECT:
-  case CURLM_STATE_SENDPROTOCONNECT:
-    return protocol_getsock(data->conn, socks);
+  case MSTATE_PROTOCONNECTING:
+  case MSTATE_PROTOCONNECT:
+    return protocol_getsock(data, conn, socks);
 
-  case CURLM_STATE_DO:
-  case CURLM_STATE_DOING:
-    return doing_getsock(data->conn, socks);
+  case MSTATE_DO:
+  case MSTATE_DOING:
+    return doing_getsock(data, conn, socks);
 
-  case CURLM_STATE_WAITPROXYCONNECT:
-    return waitproxyconnect_getsock(data->conn, socks);
+  case MSTATE_TUNNELING:
+    return waitproxyconnect_getsock(conn, socks);
 
-  case CURLM_STATE_WAITCONNECT:
-    return waitconnect_getsock(data->conn, socks);
+  case MSTATE_CONNECTING:
+    return waitconnect_getsock(conn, socks);
 
-  case CURLM_STATE_DO_MORE:
-    return domore_getsock(data->conn, socks);
+  case MSTATE_DOING_MORE:
+    return domore_getsock(data, conn, socks);
 
-  case CURLM_STATE_DO_DONE: /* since is set after DO is completed, we switch
-                               to waiting for the same as the *PERFORM
-                               states */
-  case CURLM_STATE_PERFORM:
-    return Curl_single_getsock(data->conn, socks);
+  case MSTATE_DID: /* since is set after DO is completed, we switch to
+                        waiting for the same as the PERFORMING state */
+  case MSTATE_PERFORMING:
+    return Curl_single_getsock(data, conn, socks);
   }
 
 }
@@ -1043,7 +1042,12 @@
 
   data = multi->easyp;
   while(data) {
-    int bitmap = multi_getsock(data, sockbunch);
+    int bitmap;
+#ifdef __clang_analyzer_
+    /* to prevent "The left operand of '>=' is a garbage value" warnings */
+    memset(sockbunch, 0, sizeof(sockbunch));
+#endif
+    bitmap = multi_getsock(data, sockbunch);
 
     for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++) {
       curl_socket_t s = CURL_SOCKET_BAD;
@@ -1073,13 +1077,13 @@
 
 #define NUM_POLLS_ON_STACK 10
 
-static CURLMcode Curl_multi_wait(struct Curl_multi *multi,
-                                 struct curl_waitfd extra_fds[],
-                                 unsigned int extra_nfds,
-                                 int timeout_ms,
-                                 int *ret,
-                                 bool extrawait, /* when no socket, wait */
-                                 bool use_wakeup)
+static CURLMcode multi_wait(struct Curl_multi *multi,
+                            struct curl_waitfd extra_fds[],
+                            unsigned int extra_nfds,
+                            int timeout_ms,
+                            int *ret,
+                            bool extrawait, /* when no socket, wait */
+                            bool use_wakeup)
 {
   struct Curl_easy *data;
   curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
@@ -1089,12 +1093,10 @@
   unsigned int curlfds;
   long timeout_internal;
   int retcode = 0;
-#ifndef USE_WINSOCK
   struct pollfd a_few_on_stack[NUM_POLLS_ON_STACK];
   struct pollfd *ufds = &a_few_on_stack[0];
   bool ufds_malloc = FALSE;
-#else
-  struct pollfd pre_poll;
+#ifdef USE_WINSOCK
   WSANETWORKEVENTS wsa_events;
   DEBUGASSERT(multi->wsa_event != WSA_INVALID_EVENT);
 #endif
@@ -1116,11 +1118,11 @@
     for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++) {
       curl_socket_t s = CURL_SOCKET_BAD;
 
-      if(bitmap & GETSOCK_READSOCK(i)) {
+      if((bitmap & GETSOCK_READSOCK(i)) && VALID_SOCK((sockbunch[i]))) {
         ++nfds;
         s = sockbunch[i];
       }
-      if(bitmap & GETSOCK_WRITESOCK(i)) {
+      if((bitmap & GETSOCK_WRITESOCK(i)) && VALID_SOCK((sockbunch[i]))) {
         ++nfds;
         s = sockbunch[i];
       }
@@ -1152,7 +1154,6 @@
   }
 #endif
 
-#ifndef USE_WINSOCK
   if(nfds > NUM_POLLS_ON_STACK) {
     /* 'nfds' is a 32 bit value and 'struct pollfd' is typically 8 bytes
        big, so at 2^29 sockets this value might wrap. When a process gets
@@ -1163,9 +1164,7 @@
       return CURLM_OUT_OF_MEMORY;
     ufds_malloc = TRUE;
   }
-
   nfds = 0;
-#endif
 
   /* only do the second loop if we found descriptors in the first stage run
      above */
@@ -1181,36 +1180,36 @@
 #ifdef USE_WINSOCK
         long mask = 0;
 #endif
-        if(bitmap & GETSOCK_READSOCK(i)) {
+        if((bitmap & GETSOCK_READSOCK(i)) && VALID_SOCK((sockbunch[i]))) {
+          s = sockbunch[i];
 #ifdef USE_WINSOCK
-          if(timeout_ms && SOCKET_READABLE(sockbunch[i], 0) > 0)
-            timeout_ms = 0;
           mask |= FD_READ|FD_ACCEPT|FD_CLOSE;
-#else
-          ufds[nfds].fd = sockbunch[i];
+#endif
+          ufds[nfds].fd = s;
           ufds[nfds].events = POLLIN;
           ++nfds;
-#endif
-          s = sockbunch[i];
         }
-        if(bitmap & GETSOCK_WRITESOCK(i)) {
+        if((bitmap & GETSOCK_WRITESOCK(i)) && VALID_SOCK((sockbunch[i]))) {
+          s = sockbunch[i];
 #ifdef USE_WINSOCK
-          if(timeout_ms && SOCKET_WRITABLE(sockbunch[i], 0) > 0)
-            timeout_ms = 0;
           mask |= FD_WRITE|FD_CONNECT|FD_CLOSE;
-#else
-          ufds[nfds].fd = sockbunch[i];
+          send(s, NULL, 0, 0); /* reset FD_WRITE */
+#endif
+          ufds[nfds].fd = s;
           ufds[nfds].events = POLLOUT;
           ++nfds;
-#endif
-          s = sockbunch[i];
         }
+        /* s is only set if either being readable or writable is checked */
         if(s == CURL_SOCKET_BAD) {
+          /* break on entry not checked for being readable or writable */
           break;
         }
 #ifdef USE_WINSOCK
-        if(WSAEventSelect(s, multi->wsa_event, mask) != 0)
+        if(WSAEventSelect(s, multi->wsa_event, mask) != 0) {
+          if(ufds_malloc)
+            free(ufds);
           return CURLM_INTERNAL_ERROR;
+        }
 #endif
       }
 
@@ -1222,35 +1221,20 @@
   for(i = 0; i < extra_nfds; i++) {
 #ifdef USE_WINSOCK
     long mask = 0;
-    extra_fds[i].revents = 0;
-    pre_poll.fd = extra_fds[i].fd;
-    pre_poll.events = 0;
-    pre_poll.revents = 0;
-    if(extra_fds[i].events & CURL_WAIT_POLLIN) {
+    if(extra_fds[i].events & CURL_WAIT_POLLIN)
       mask |= FD_READ|FD_ACCEPT|FD_CLOSE;
-      pre_poll.events |= POLLIN;
-    }
-    if(extra_fds[i].events & CURL_WAIT_POLLPRI) {
+    if(extra_fds[i].events & CURL_WAIT_POLLPRI)
       mask |= FD_OOB;
-      pre_poll.events |= POLLPRI;
-    }
     if(extra_fds[i].events & CURL_WAIT_POLLOUT) {
       mask |= FD_WRITE|FD_CONNECT|FD_CLOSE;
-      pre_poll.events |= POLLOUT;
+      send(extra_fds[i].fd, NULL, 0, 0); /* reset FD_WRITE */
     }
-    if(Curl_poll(&pre_poll, 1, 0) > 0) {
-      if(pre_poll.revents & POLLIN)
-        extra_fds[i].revents |= CURL_WAIT_POLLIN;
-      if(pre_poll.revents & POLLPRI)
-        extra_fds[i].revents |= CURL_WAIT_POLLPRI;
-      if(pre_poll.revents & POLLOUT)
-        extra_fds[i].revents |= CURL_WAIT_POLLOUT;
-      if(extra_fds[i].revents)
-        timeout_ms = 0;
-    }
-    if(WSAEventSelect(extra_fds[i].fd, multi->wsa_event, mask) != 0)
+    if(WSAEventSelect(extra_fds[i].fd, multi->wsa_event, mask) != 0) {
+      if(ufds_malloc)
+        free(ufds);
       return CURLM_INTERNAL_ERROR;
-#else
+    }
+#endif
     ufds[nfds].fd = extra_fds[i].fd;
     ufds[nfds].events = 0;
     if(extra_fds[i].events & CURL_WAIT_POLLIN)
@@ -1260,7 +1244,6 @@
     if(extra_fds[i].events & CURL_WAIT_POLLOUT)
       ufds[nfds].events |= POLLOUT;
     ++nfds;
-#endif
   }
 
 #ifdef ENABLE_WAKEUP
@@ -1273,53 +1256,59 @@
 #endif
 #endif
 
-  if(nfds) {
-    /* wait... */
-#ifdef USE_WINSOCK
-    WSAWaitForMultipleEvents(1, &multi->wsa_event, FALSE, timeout_ms, FALSE);
+#if defined(ENABLE_WAKEUP) && defined(USE_WINSOCK)
+  if(nfds || use_wakeup) {
 #else
-    int pollrc = Curl_poll(ufds, nfds, timeout_ms);
+  if(nfds) {
+#endif
+    int pollrc;
+#ifdef USE_WINSOCK
+    if(nfds)
+      pollrc = Curl_poll(ufds, nfds, 0); /* just pre-check with WinSock */
+    else
+      pollrc = 0;
+    if(pollrc <= 0) /* now wait... if not ready during the pre-check above */
+      WSAWaitForMultipleEvents(1, &multi->wsa_event, FALSE, timeout_ms, FALSE);
+#else
+    pollrc = Curl_poll(ufds, nfds, timeout_ms); /* wait... */
 #endif
 
-#ifdef USE_WINSOCK
-    /* With Winsock, we have to run this unconditionally to call
-       WSAEventSelect(fd, event, 0) on all the sockets */
-    {
-      retcode = 0;
-#else
     if(pollrc > 0) {
       retcode = pollrc;
+#ifdef USE_WINSOCK
+    }
+    /* With WinSock, we have to run the following section unconditionally
+       to call WSAEventSelect(fd, event, 0) on all the sockets */
+    {
 #endif
       /* copy revents results from the poll to the curl_multi_wait poll
          struct, the bit values of the actual underlying poll() implementation
          may not be the same as the ones in the public libcurl API! */
       for(i = 0; i < extra_nfds; i++) {
+        unsigned r = ufds[curlfds + i].revents;
         unsigned short mask = 0;
 #ifdef USE_WINSOCK
         wsa_events.lNetworkEvents = 0;
-        mask = extra_fds[i].revents;
-        if(WSAEnumNetworkEvents(extra_fds[i].fd, multi->wsa_event,
-                                &wsa_events) == 0) {
+        if(WSAEnumNetworkEvents(extra_fds[i].fd, NULL, &wsa_events) == 0) {
           if(wsa_events.lNetworkEvents & (FD_READ|FD_ACCEPT|FD_CLOSE))
             mask |= CURL_WAIT_POLLIN;
           if(wsa_events.lNetworkEvents & (FD_WRITE|FD_CONNECT|FD_CLOSE))
             mask |= CURL_WAIT_POLLOUT;
           if(wsa_events.lNetworkEvents & FD_OOB)
             mask |= CURL_WAIT_POLLPRI;
-          if(ret && wsa_events.lNetworkEvents != 0)
+          if(ret && pollrc <= 0 && wsa_events.lNetworkEvents)
             retcode++;
         }
         WSAEventSelect(extra_fds[i].fd, multi->wsa_event, 0);
-#else
-        unsigned r = ufds[curlfds + i].revents;
-
+        if(pollrc <= 0)
+          continue;
+#endif
         if(r & POLLIN)
           mask |= CURL_WAIT_POLLIN;
         if(r & POLLOUT)
           mask |= CURL_WAIT_POLLOUT;
         if(r & POLLPRI)
           mask |= CURL_WAIT_POLLPRI;
-#endif
         extra_fds[i].revents = mask;
       }
 
@@ -1334,23 +1323,16 @@
           for(i = 0; i < MAX_SOCKSPEREASYHANDLE; i++) {
             if(bitmap & (GETSOCK_READSOCK(i) | GETSOCK_WRITESOCK(i))) {
               wsa_events.lNetworkEvents = 0;
-              if(WSAEnumNetworkEvents(sockbunch[i], multi->wsa_event,
-                                      &wsa_events) == 0) {
-                if(ret && wsa_events.lNetworkEvents != 0)
-                  retcode++;
-              }
-              if(ret && !timeout_ms && wsa_events.lNetworkEvents == 0) {
-                if((bitmap & GETSOCK_READSOCK(i)) &&
-                   SOCKET_READABLE(sockbunch[i], 0) > 0)
-                  retcode++;
-                else if((bitmap & GETSOCK_WRITESOCK(i)) &&
-                   SOCKET_WRITABLE(sockbunch[i], 0) > 0)
+              if(WSAEnumNetworkEvents(sockbunch[i], NULL, &wsa_events) == 0) {
+                if(ret && pollrc <= 0 && wsa_events.lNetworkEvents)
                   retcode++;
               }
               WSAEventSelect(sockbunch[i], multi->wsa_event, 0);
             }
-            else
+            else {
+              /* break on entry not checked for being readable or writable */
               break;
+            }
           }
 
           data = data->next;
@@ -1385,16 +1367,15 @@
     }
   }
 
-#ifndef USE_WINSOCK
   if(ufds_malloc)
     free(ufds);
-#endif
   if(ret)
     *ret = retcode;
-  if(!extrawait || nfds)
-    /* if any socket was checked */
-    ;
-  else {
+#if defined(ENABLE_WAKEUP) && defined(USE_WINSOCK)
+  if(extrawait && !nfds && !use_wakeup) {
+#else
+  if(extrawait && !nfds) {
+#endif
     long sleep_ms = 0;
 
     /* Avoid busy-looping when there's nothing particular to wait for */
@@ -1418,8 +1399,8 @@
                           int timeout_ms,
                           int *ret)
 {
-  return Curl_multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, FALSE,
-                         FALSE);
+  return multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, FALSE,
+                    FALSE);
 }
 
 CURLMcode curl_multi_poll(struct Curl_multi *multi,
@@ -1428,8 +1409,8 @@
                           int timeout_ms,
                           int *ret)
 {
-  return Curl_multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, TRUE,
-                         TRUE);
+  return multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, TRUE,
+                    TRUE);
 }
 
 CURLMcode curl_multi_wakeup(struct Curl_multi *multi)
@@ -1460,7 +1441,7 @@
 
          The write socket is set to non-blocking, this way this function
          cannot block, making it safe to call even from the same thread
-         that will call Curl_multi_wait(). If swrite() returns that it
+         that will call curl_multi_wait(). If swrite() returns that it
          would block, it's considered successful because it means that
          previous calls to this function will wake up the poll(). */
       if(swrite(multi->wakeup_pair[1], buf, sizeof(buf)) < 0) {
@@ -1518,25 +1499,13 @@
     Curl_init_do(data, NULL);
 
     /* take this handle to the perform state right away */
-    multistate(data, CURLM_STATE_PERFORM);
+    multistate(data, MSTATE_PERFORMING);
     Curl_attach_connnection(data, conn);
     k->keepon |= KEEP_RECV; /* setup to receive! */
   }
   return rc;
 }
 
-/*
- * do_complete is called when the DO actions are complete.
- *
- * We init chunking and trailer bits to their default values here immediately
- * before receiving any header data for the current request.
- */
-static void do_complete(struct connectdata *conn)
-{
-  conn->data->req.chunk = FALSE;
-  Curl_pgrsTime(conn->data, TIMER_PRETRANSFER);
-}
-
 static CURLcode multi_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
@@ -1544,16 +1513,11 @@
 
   DEBUGASSERT(conn);
   DEBUGASSERT(conn->handler);
-  DEBUGASSERT(conn->data == data);
 
-  if(conn->handler->do_it) {
+  if(conn->handler->do_it)
     /* generic protocol-specific function pointer set in curl_connect() */
-    result = conn->handler->do_it(conn, done);
+    result = conn->handler->do_it(data, done);
 
-    if(!result && *done)
-      /* do_complete must be called after the protocol-specific DO function */
-      do_complete(conn);
-  }
   return result;
 }
 
@@ -1566,36 +1530,85 @@
  * DOING state there's more work to do!
  */
 
-static CURLcode multi_do_more(struct connectdata *conn, int *complete)
+static CURLcode multi_do_more(struct Curl_easy *data, int *complete)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
   *complete = 0;
 
   if(conn->handler->do_more)
-    result = conn->handler->do_more(conn, complete);
-
-  if(!result && (*complete == 1))
-    /* do_complete must be called after the protocol-specific DO function */
-    do_complete(conn);
+    result = conn->handler->do_more(data, complete);
 
   return result;
 }
 
 /*
+ * Check whether a timeout occurred, and handle it if it did
+ */
+static bool multi_handle_timeout(struct Curl_easy *data,
+                                 struct curltime *now,
+                                 bool *stream_error,
+                                 CURLcode *result,
+                                 bool connect_timeout)
+{
+  timediff_t timeout_ms;
+  timeout_ms = Curl_timeleft(data, now, connect_timeout);
+
+  if(timeout_ms < 0) {
+    /* Handle timed out */
+    if(data->mstate == MSTATE_RESOLVING)
+      failf(data, "Resolving timed out after %" CURL_FORMAT_TIMEDIFF_T
+            " milliseconds",
+            Curl_timediff(*now, data->progress.t_startsingle));
+    else if(data->mstate == MSTATE_CONNECTING)
+      failf(data, "Connection timed out after %" CURL_FORMAT_TIMEDIFF_T
+            " milliseconds",
+            Curl_timediff(*now, data->progress.t_startsingle));
+    else {
+      struct SingleRequest *k = &data->req;
+      if(k->size != -1) {
+        failf(data, "Operation timed out after %" CURL_FORMAT_TIMEDIFF_T
+              " milliseconds with %" CURL_FORMAT_CURL_OFF_T " out of %"
+              CURL_FORMAT_CURL_OFF_T " bytes received",
+              Curl_timediff(*now, data->progress.t_startsingle),
+              k->bytecount, k->size);
+      }
+      else {
+        failf(data, "Operation timed out after %" CURL_FORMAT_TIMEDIFF_T
+              " milliseconds with %" CURL_FORMAT_CURL_OFF_T
+              " bytes received",
+              Curl_timediff(*now, data->progress.t_startsingle),
+              k->bytecount);
+      }
+    }
+
+    /* Force connection closed if the connection has indeed been used */
+    if(data->mstate > MSTATE_DO) {
+      streamclose(data->conn, "Disconnected with pending data");
+      *stream_error = TRUE;
+    }
+    *result = CURLE_OPERATION_TIMEDOUT;
+    (void)multi_done(data, *result, TRUE);
+  }
+
+  return (timeout_ms < 0);
+}
+
+/*
  * We are doing protocol-specific connecting and this is being called over and
  * over from the multi interface until the connection phase is done on
  * protocol layer.
  */
 
-static CURLcode protocol_connecting(struct connectdata *conn,
-                                    bool *done)
+static CURLcode protocol_connecting(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
   if(conn && conn->handler->connecting) {
     *done = FALSE;
-    result = conn->handler->connecting(conn, done);
+    result = conn->handler->connecting(data, done);
   }
   else
     *done = TRUE;
@@ -1608,13 +1621,14 @@
  * until the DOING phase is done on protocol layer.
  */
 
-static CURLcode protocol_doing(struct connectdata *conn, bool *done)
+static CURLcode protocol_doing(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
   if(conn && conn->handler->doing) {
     *done = FALSE;
-    result = conn->handler->doing(conn, done);
+    result = conn->handler->doing(data, done);
   }
   else
     *done = TRUE;
@@ -1627,11 +1641,11 @@
  * proceed with some action.
  *
  */
-static CURLcode protocol_connect(struct connectdata *conn,
+static CURLcode protocol_connect(struct Curl_easy *data,
                                  bool *protocol_done)
 {
   CURLcode result = CURLE_OK;
-
+  struct connectdata *conn = data->conn;
   DEBUGASSERT(conn);
   DEBUGASSERT(protocol_done);
 
@@ -1652,7 +1666,7 @@
 
   if(!conn->bits.protoconnstart) {
 #ifndef CURL_DISABLE_PROXY
-    result = Curl_proxy_connect(conn, FIRSTSOCKET);
+    result = Curl_proxy_connect(data, FIRSTSOCKET);
     if(result)
       return result;
 
@@ -1670,7 +1684,7 @@
       /* is there a protocol-specific connect() procedure? */
 
       /* Call the protocol-specific connect function */
-      result = conn->handler->connect_it(conn, protocol_done);
+      result = conn->handler->connect_it(data, protocol_done);
     }
     else
       *protocol_done = TRUE;
@@ -1712,7 +1726,6 @@
   bool done = FALSE;
   CURLMcode rc;
   CURLcode result = CURLE_OK;
-  timediff_t timeout_ms;
   timediff_t recv_timeout_ms;
   timediff_t send_timeout_ms;
   int control;
@@ -1727,84 +1740,55 @@
     rc = CURLM_OK;
 
     if(multi_ischanged(multi, TRUE)) {
-      DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!\n"));
+      DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!"));
       process_pending_handles(multi); /* multiplexed */
     }
 
-    if(data->conn && data->mstate > CURLM_STATE_CONNECT &&
-       data->mstate < CURLM_STATE_COMPLETED) {
+    if(data->mstate > MSTATE_CONNECT &&
+       data->mstate < MSTATE_COMPLETED) {
       /* Make sure we set the connection's current owner */
-      data->conn->data = data;
+      DEBUGASSERT(data->conn);
+      if(!data->conn)
+        return CURLM_INTERNAL_ERROR;
     }
 
     if(data->conn &&
-       (data->mstate >= CURLM_STATE_CONNECT) &&
-       (data->mstate < CURLM_STATE_COMPLETED)) {
+       (data->mstate >= MSTATE_CONNECT) &&
+       (data->mstate < MSTATE_COMPLETED)) {
+      /* Check for overall operation timeout here but defer handling the
+       * connection timeout to later, to allow for a connection to be set up
+       * in the window since we last checked timeout. This prevents us
+       * tearing down a completed connection in the case where we were slow
+       * to check the timeout (e.g. process descheduled during this loop).
+       * We set connect_timeout=FALSE to do this. */
+
       /* we need to wait for the connect state as only then is the start time
          stored, but we must not check already completed handles */
-      timeout_ms = Curl_timeleft(data, nowp,
-                                 (data->mstate <= CURLM_STATE_DO)?
-                                 TRUE:FALSE);
-
-      if(timeout_ms < 0) {
-        /* Handle timed out */
-        if(data->mstate == CURLM_STATE_WAITRESOLVE)
-          failf(data, "Resolving timed out after %" CURL_FORMAT_TIMEDIFF_T
-                " milliseconds",
-                Curl_timediff(*nowp, data->progress.t_startsingle));
-        else if(data->mstate == CURLM_STATE_WAITCONNECT)
-          failf(data, "Connection timed out after %" CURL_FORMAT_TIMEDIFF_T
-                " milliseconds",
-                Curl_timediff(*nowp, data->progress.t_startsingle));
-        else {
-          struct SingleRequest *k = &data->req;
-          if(k->size != -1) {
-            failf(data, "Operation timed out after %" CURL_FORMAT_TIMEDIFF_T
-                  " milliseconds with %" CURL_FORMAT_CURL_OFF_T " out of %"
-                  CURL_FORMAT_CURL_OFF_T " bytes received",
-                  Curl_timediff(*nowp, data->progress.t_startsingle),
-                  k->bytecount, k->size);
-          }
-          else {
-            failf(data, "Operation timed out after %" CURL_FORMAT_TIMEDIFF_T
-                  " milliseconds with %" CURL_FORMAT_CURL_OFF_T
-                  " bytes received",
-                  Curl_timediff(*nowp, data->progress.t_startsingle),
-                  k->bytecount);
-          }
-        }
-
-        /* Force connection closed if the connection has indeed been used */
-        if(data->mstate > CURLM_STATE_DO) {
-          streamclose(data->conn, "Disconnected with pending data");
-          stream_error = TRUE;
-        }
-        result = CURLE_OPERATION_TIMEDOUT;
-        (void)multi_done(data, result, TRUE);
+      if(multi_handle_timeout(data, nowp, &stream_error, &result, FALSE)) {
         /* Skip the statemachine and go directly to error handling section. */
         goto statemachine_end;
       }
     }
 
     switch(data->mstate) {
-    case CURLM_STATE_INIT:
+    case MSTATE_INIT:
       /* init this transfer. */
       result = Curl_pretransfer(data);
 
       if(!result) {
         /* after init, go CONNECT */
-        multistate(data, CURLM_STATE_CONNECT);
+        multistate(data, MSTATE_CONNECT);
         *nowp = Curl_pgrsTime(data, TIMER_STARTOP);
         rc = CURLM_CALL_MULTI_PERFORM;
       }
       break;
 
-    case CURLM_STATE_CONNECT_PEND:
+    case MSTATE_PENDING:
       /* We will stay here until there is a connection available. Then
-         we try again in the CURLM_STATE_CONNECT state. */
+         we try again in the MSTATE_CONNECT state. */
       break;
 
-    case CURLM_STATE_CONNECT:
+    case MSTATE_CONNECT:
       /* Connect. We want to get a connection identifier filled in. */
       /* init this transfer. */
       result = Curl_preconnect(data);
@@ -1822,7 +1806,7 @@
       if(CURLE_NO_CONNECTION_AVAILABLE == result) {
         /* There was no connection available. We will go to the pending
            state and wait for an available connection. */
-        multistate(data, CURLM_STATE_CONNECT_PEND);
+        multistate(data, MSTATE_PENDING);
 
         /* add this handle to the list of connect-pending handles */
         Curl_llist_insert_next(&multi->pending, multi->pending.tail, data,
@@ -1832,14 +1816,14 @@
       }
       else if(data->state.previouslypending) {
         /* this transfer comes from the pending queue so try move another */
-        infof(data, "Transfer was pending, now try another\n");
+        infof(data, "Transfer was pending, now try another");
         process_pending_handles(data->multi);
       }
 
       if(!result) {
         if(async)
           /* We're now waiting for an asynchronous name lookup */
-          multistate(data, CURLM_STATE_WAITRESOLVE);
+          multistate(data, MSTATE_RESOLVING);
         else {
           /* after the connect has been sent off, go WAITCONNECT unless the
              protocol connect is already done and we can go directly to
@@ -1847,20 +1831,20 @@
           rc = CURLM_CALL_MULTI_PERFORM;
 
           if(protocol_connected)
-            multistate(data, CURLM_STATE_DO);
+            multistate(data, MSTATE_DO);
           else {
 #ifndef CURL_DISABLE_HTTP
             if(Curl_connect_ongoing(data->conn))
-              multistate(data, CURLM_STATE_WAITPROXYCONNECT);
+              multistate(data, MSTATE_TUNNELING);
             else
 #endif
-              multistate(data, CURLM_STATE_WAITCONNECT);
+              multistate(data, MSTATE_CONNECTING);
           }
         }
       }
       break;
 
-    case CURLM_STATE_WAITRESOLVE:
+    case MSTATE_RESOLVING:
       /* awaiting an asynch name resolve to complete */
     {
       struct Curl_dns_entry *dns = NULL;
@@ -1879,19 +1863,19 @@
         hostname = conn->host.name;
 
       /* check if we have the name resolved by now */
-      dns = Curl_fetch_addr(conn, hostname, (int)conn->port);
+      dns = Curl_fetch_addr(data, hostname, (int)conn->port);
 
       if(dns) {
 #ifdef CURLRES_ASYNCH
-        conn->async.dns = dns;
-        conn->async.done = TRUE;
+        data->state.async.dns = dns;
+        data->state.async.done = TRUE;
 #endif
         result = CURLE_OK;
-        infof(data, "Hostname '%s' was found in DNS cache\n", hostname);
+        infof(data, "Hostname '%s' was found in DNS cache", hostname);
       }
 
       if(!dns)
-        result = Curl_resolv_check(data->conn, &dns);
+        result = Curl_resolv_check(data, &dns);
 
       /* Update sockets here, because the socket(s) may have been
          closed and the application thus needs to be told, even if it
@@ -1904,7 +1888,7 @@
       if(dns) {
         /* Perform the next step in the connection phase, and then move on
            to the WAITCONNECT state */
-        result = Curl_once_resolved(data->conn, &protocol_connected);
+        result = Curl_once_resolved(data, &protocol_connected);
 
         if(result)
           /* if Curl_once_resolved() returns failure, the connection struct
@@ -1914,14 +1898,14 @@
           /* call again please so that we get the next socket setup */
           rc = CURLM_CALL_MULTI_PERFORM;
           if(protocol_connected)
-            multistate(data, CURLM_STATE_DO);
+            multistate(data, MSTATE_DO);
           else {
 #ifndef CURL_DISABLE_HTTP
             if(Curl_connect_ongoing(data->conn))
-              multistate(data, CURLM_STATE_WAITPROXYCONNECT);
+              multistate(data, MSTATE_TUNNELING);
             else
 #endif
-              multistate(data, CURLM_STATE_WAITCONNECT);
+              multistate(data, MSTATE_CONNECTING);
           }
         }
       }
@@ -1935,17 +1919,17 @@
     break;
 
 #ifndef CURL_DISABLE_HTTP
-    case CURLM_STATE_WAITPROXYCONNECT:
+    case MSTATE_TUNNELING:
       /* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */
       DEBUGASSERT(data->conn);
-      result = Curl_http_connect(data->conn, &protocol_connected);
+      result = Curl_http_connect(data, &protocol_connected);
 #ifndef CURL_DISABLE_PROXY
       if(data->conn->bits.proxy_connect_closed) {
         rc = CURLM_CALL_MULTI_PERFORM;
         /* connect back to proxy again */
         result = CURLE_OK;
         multi_done(data, CURLE_OK, FALSE);
-        multistate(data, CURLM_STATE_CONNECT);
+        multistate(data, MSTATE_CONNECT);
       }
       else
 #endif
@@ -1958,7 +1942,7 @@
             Curl_connect_complete(data->conn)) {
             rc = CURLM_CALL_MULTI_PERFORM;
             /* initiate protocol connect phase */
-            multistate(data, CURLM_STATE_SENDPROTOCONNECT);
+            multistate(data, MSTATE_PROTOCONNECT);
           }
         }
       else
@@ -1966,10 +1950,10 @@
       break;
 #endif
 
-    case CURLM_STATE_WAITCONNECT:
+    case MSTATE_CONNECTING:
       /* awaiting a completion of an asynch TCP connect */
       DEBUGASSERT(data->conn);
-      result = Curl_is_connected(data->conn, FIRSTSOCKET, &connected);
+      result = Curl_is_connected(data, data->conn, FIRSTSOCKET, &connected);
       if(connected && !result) {
 #ifndef CURL_DISABLE_HTTP
         if(
@@ -1978,7 +1962,7 @@
            !data->conn->bits.proxy_ssl_connected[FIRSTSOCKET]) ||
 #endif
           Curl_connect_ongoing(data->conn)) {
-          multistate(data, CURLM_STATE_WAITPROXYCONNECT);
+          multistate(data, MSTATE_TUNNELING);
           break;
         }
 #endif
@@ -1986,10 +1970,9 @@
 #ifndef CURL_DISABLE_PROXY
         multistate(data,
                    data->conn->bits.tunnel_proxy?
-                   CURLM_STATE_WAITPROXYCONNECT:
-                   CURLM_STATE_SENDPROTOCONNECT);
+                   MSTATE_TUNNELING : MSTATE_PROTOCONNECT);
 #else
-        multistate(data, CURLM_STATE_SENDPROTOCONNECT);
+        multistate(data, MSTATE_PROTOCONNECT);
 #endif
       }
       else if(result) {
@@ -2001,14 +1984,14 @@
       }
       break;
 
-    case CURLM_STATE_SENDPROTOCONNECT:
-      result = protocol_connect(data->conn, &protocol_connected);
+    case MSTATE_PROTOCONNECT:
+      result = protocol_connect(data, &protocol_connected);
       if(!result && !protocol_connected)
         /* switch to waiting state */
-        multistate(data, CURLM_STATE_PROTOCONNECT);
+        multistate(data, MSTATE_PROTOCONNECTING);
       else if(!result) {
         /* protocol connect has completed, go WAITDO or DO */
-        multistate(data, CURLM_STATE_DO);
+        multistate(data, MSTATE_DO);
         rc = CURLM_CALL_MULTI_PERFORM;
       }
       else {
@@ -2019,12 +2002,12 @@
       }
       break;
 
-    case CURLM_STATE_PROTOCONNECT:
+    case MSTATE_PROTOCONNECTING:
       /* protocol-specific connect phase */
-      result = protocol_connecting(data->conn, &protocol_connected);
+      result = protocol_connecting(data, &protocol_connected);
       if(!result && protocol_connected) {
         /* after the connect has completed, go WAITDO or DO */
-        multistate(data, CURLM_STATE_DO);
+        multistate(data, MSTATE_DO);
         rc = CURLM_CALL_MULTI_PERFORM;
       }
       else if(result) {
@@ -2035,11 +2018,11 @@
       }
       break;
 
-    case CURLM_STATE_DO:
+    case MSTATE_DO:
       if(data->set.connect_only) {
         /* keep connection open for application to use the socket */
         connkeep(data->conn, "CONNECT_ONLY");
-        multistate(data, CURLM_STATE_DONE);
+        multistate(data, MSTATE_DONE);
         result = CURLE_OK;
         rc = CURLM_CALL_MULTI_PERFORM;
       }
@@ -2058,7 +2041,10 @@
               if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
                 /* skip some states if it is important */
                 multi_done(data, CURLE_OK, FALSE);
-                multistate(data, CURLM_STATE_DONE);
+
+                /* if there's no connection left, skip the DONE state */
+                multistate(data, data->conn ?
+                           MSTATE_DONE : MSTATE_COMPLETED);
                 rc = CURLM_CALL_MULTI_PERFORM;
                 break;
               }
@@ -2066,7 +2052,7 @@
 #endif
             /* DO was not completed in one function call, we must continue
                DOING... */
-            multistate(data, CURLM_STATE_DOING);
+            multistate(data, MSTATE_DOING);
             rc = CURLM_OK;
           }
 
@@ -2074,12 +2060,12 @@
           else if(data->conn->bits.do_more) {
             /* we're supposed to do more, but we need to sit down, relax
                and wait a little while first */
-            multistate(data, CURLM_STATE_DO_MORE);
+            multistate(data, MSTATE_DOING_MORE);
             rc = CURLM_OK;
           }
           else {
-            /* we're done with the DO, now DO_DONE */
-            multistate(data, CURLM_STATE_DO_DONE);
+            /* we're done with the DO, now DID */
+            multistate(data, MSTATE_DID);
             rc = CURLM_CALL_MULTI_PERFORM;
           }
         }
@@ -2094,7 +2080,7 @@
           followtype follow = FOLLOW_NONE;
           CURLcode drc;
 
-          drc = Curl_retry_request(data->conn, &newurl);
+          drc = Curl_retry_request(data, &newurl);
           if(drc) {
             /* a failure here pretty much implies an out of memory */
             result = drc;
@@ -2111,7 +2097,7 @@
               follow = FOLLOW_RETRY;
               drc = Curl_follow(data, newurl, follow);
               if(!drc) {
-                multistate(data, CURLM_STATE_CONNECT);
+                multistate(data, MSTATE_CONNECT);
                 rc = CURLM_CALL_MULTI_PERFORM;
                 result = CURLE_OK;
               }
@@ -2141,16 +2127,15 @@
       }
       break;
 
-    case CURLM_STATE_DOING:
+    case MSTATE_DOING:
       /* we continue DOING until the DO phase is complete */
       DEBUGASSERT(data->conn);
-      result = protocol_doing(data->conn, &dophase_done);
+      result = protocol_doing(data, &dophase_done);
       if(!result) {
         if(dophase_done) {
           /* after DO, go DO_DONE or DO_MORE */
           multistate(data, data->conn->bits.do_more?
-                     CURLM_STATE_DO_MORE:
-                     CURLM_STATE_DO_DONE);
+                     MSTATE_DOING_MORE : MSTATE_DID);
           rc = CURLM_CALL_MULTI_PERFORM;
         } /* dophase_done */
       }
@@ -2162,20 +2147,19 @@
       }
       break;
 
-    case CURLM_STATE_DO_MORE:
+    case MSTATE_DOING_MORE:
       /*
-       * When we are connected, DO MORE and then go DO_DONE
+       * When we are connected, DOING MORE and then go DID
        */
       DEBUGASSERT(data->conn);
-      result = multi_do_more(data->conn, &control);
+      result = multi_do_more(data, &control);
 
       if(!result) {
         if(control) {
           /* if positive, advance to DO_DONE
              if negative, go back to DOING */
           multistate(data, control == 1?
-                     CURLM_STATE_DO_DONE:
-                     CURLM_STATE_DOING);
+                     MSTATE_DID : MSTATE_DOING);
           rc = CURLM_CALL_MULTI_PERFORM;
         }
         else
@@ -2190,7 +2174,7 @@
       }
       break;
 
-    case CURLM_STATE_DO_DONE:
+    case MSTATE_DID:
       DEBUGASSERT(data->conn);
       if(data->conn->bits.multiplex)
         /* Check if we can move pending requests to send pipe */
@@ -2200,7 +2184,7 @@
          Having both BAD is a signal to skip immediately to DONE */
       if((data->conn->sockfd != CURL_SOCKET_BAD) ||
          (data->conn->writesockfd != CURL_SOCKET_BAD))
-        multistate(data, CURLM_STATE_PERFORM);
+        multistate(data, MSTATE_PERFORMING);
       else {
 #ifndef CURL_DISABLE_FTP
         if(data->state.wildcardmatch &&
@@ -2208,22 +2192,30 @@
           data->wildcard.state = CURLWC_DONE;
         }
 #endif
-        multistate(data, CURLM_STATE_DONE);
+        multistate(data, MSTATE_DONE);
       }
       rc = CURLM_CALL_MULTI_PERFORM;
       break;
 
-    case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
+    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
       DEBUGASSERT(data->conn);
       /* if both rates are within spec, resume transfer */
-      if(Curl_pgrsUpdate(data->conn))
+      if(Curl_pgrsUpdate(data))
         result = CURLE_ABORTED_BY_CALLBACK;
       else
         result = Curl_speedcheck(data, *nowp);
 
-      if(!result) {
+      if(result) {
+        if(!(data->conn->handler->flags & PROTOPT_DUAL) &&
+           result != CURLE_HTTP2_STREAM)
+          streamclose(data->conn, "Transfer returned error");
+
+        Curl_posttransfer(data);
+        multi_done(data, result, TRUE);
+      }
+      else {
         send_timeout_ms = 0;
-        if(data->set.max_send_speed > 0)
+        if(data->set.max_send_speed)
           send_timeout_ms =
             Curl_pgrsLimitWaitTime(data->progress.uploaded,
                                    data->progress.ul_limit_size,
@@ -2232,7 +2224,7 @@
                                    *nowp);
 
         recv_timeout_ms = 0;
-        if(data->set.max_recv_speed > 0)
+        if(data->set.max_recv_speed)
           recv_timeout_ms =
             Curl_pgrsLimitWaitTime(data->progress.downloaded,
                                    data->progress.dl_limit_size,
@@ -2241,7 +2233,7 @@
                                    *nowp);
 
         if(!send_timeout_ms && !recv_timeout_ms) {
-          multistate(data, CURLM_STATE_PERFORM);
+          multistate(data, MSTATE_PERFORMING);
           Curl_ratelimit(data, *nowp);
         }
         else if(send_timeout_ms >= recv_timeout_ms)
@@ -2251,7 +2243,7 @@
       }
       break;
 
-    case CURLM_STATE_PERFORM:
+    case MSTATE_PERFORMING:
     {
       char *newurl = NULL;
       bool retry = FALSE;
@@ -2259,7 +2251,7 @@
       DEBUGASSERT(data->state.buffer);
       /* check if over send speed */
       send_timeout_ms = 0;
-      if(data->set.max_send_speed > 0)
+      if(data->set.max_send_speed)
         send_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.uploaded,
                                                  data->progress.ul_limit_size,
                                                  data->set.max_send_speed,
@@ -2268,7 +2260,7 @@
 
       /* check if over recv speed */
       recv_timeout_ms = 0;
-      if(data->set.max_recv_speed > 0)
+      if(data->set.max_recv_speed)
         recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded,
                                                  data->progress.dl_limit_size,
                                                  data->set.max_recv_speed,
@@ -2277,7 +2269,7 @@
 
       if(send_timeout_ms || recv_timeout_ms) {
         Curl_ratelimit(data, *nowp);
-        multistate(data, CURLM_STATE_TOOFAST);
+        multistate(data, MSTATE_RATELIMITING);
         if(send_timeout_ms >= recv_timeout_ms)
           Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST);
         else
@@ -2293,7 +2285,7 @@
          * condition and the server closed the re-used connection exactly when
          * we wanted to use it, so figure out if that is indeed the case.
          */
-        CURLcode ret = Curl_retry_request(data->conn, &newurl);
+        CURLcode ret = Curl_retry_request(data, &newurl);
         if(!ret)
           retry = (newurl)?TRUE:FALSE;
         else if(!result)
@@ -2307,17 +2299,18 @@
         }
       }
       else if((CURLE_HTTP2_STREAM == result) &&
-              Curl_h2_http_1_1_error(data->conn)) {
-        CURLcode ret = Curl_retry_request(data->conn, &newurl);
+              Curl_h2_http_1_1_error(data)) {
+        CURLcode ret = Curl_retry_request(data, &newurl);
 
         if(!ret) {
-          infof(data, "Downgrades to HTTP/1.1!\n");
-          data->set.httpversion = CURL_HTTP_VERSION_1_1;
+          infof(data, "Downgrades to HTTP/1.1!");
+          streamclose(data->conn, "Disconnect HTTP/2 for HTTP/1");
+          data->state.httpwant = CURL_HTTP_VERSION_1_1;
           /* clear the error message bit too as we ignore the one we got */
           data->state.errorbuf = FALSE;
           if(!newurl)
             /* typically for HTTP_1_1_REQUIRED error on first flight */
-            newurl = strdup(data->change.url);
+            newurl = strdup(data->state.url);
           /* if we are to retry, set the result to OK and consider the request
              as done */
           retry = TRUE;
@@ -2345,7 +2338,6 @@
         multi_done(data, result, TRUE);
       }
       else if(done) {
-        followtype follow = FOLLOW_NONE;
 
         /* call this even if the readwrite function returned error */
         Curl_posttransfer(data);
@@ -2353,6 +2345,7 @@
         /* When we follow redirects or is set to retry the connection, we must
            to go back to the CONNECT state */
         if(data->req.newurl || retry) {
+          followtype follow = FOLLOW_NONE;
           if(!retry) {
             /* if the URL is a follow-location and not just a retried request
                then figure out the URL here */
@@ -2367,7 +2360,7 @@
           /* multi_done() might return CURLE_GOT_NOTHING */
           result = Curl_follow(data, newurl, follow);
           if(!result) {
-            multistate(data, CURLM_STATE_CONNECT);
+            multistate(data, MSTATE_CONNECT);
             rc = CURLM_CALL_MULTI_PERFORM;
           }
           free(newurl);
@@ -2390,7 +2383,7 @@
           }
 
           if(!result) {
-            multistate(data, CURLM_STATE_DONE);
+            multistate(data, MSTATE_DONE);
             rc = CURLM_CALL_MULTI_PERFORM;
           }
         }
@@ -2405,7 +2398,7 @@
       break;
     }
 
-    case CURLM_STATE_DONE:
+    case MSTATE_DONE:
       /* this state is highly transient, so run another loop after this */
       rc = CURLM_CALL_MULTI_PERFORM;
 
@@ -2422,44 +2415,51 @@
         /* allow a previously set error code take precedence */
         if(!result)
           result = res;
-
-        /*
-         * If there are other handles on the connection, multi_done won't set
-         * conn to NULL.  In such a case, curl_multi_remove_handle() can
-         * access free'd data, if the connection is free'd and the handle
-         * removed before we perform the processing in CURLM_STATE_COMPLETED
-         */
-        Curl_detach_connnection(data);
       }
 
 #ifndef CURL_DISABLE_FTP
       if(data->state.wildcardmatch) {
         if(data->wildcard.state != CURLWC_DONE) {
           /* if a wildcard is set and we are not ending -> lets start again
-             with CURLM_STATE_INIT */
-          multistate(data, CURLM_STATE_INIT);
+             with MSTATE_INIT */
+          multistate(data, MSTATE_INIT);
           break;
         }
       }
 #endif
       /* after we have DONE what we're supposed to do, go COMPLETED, and
          it doesn't matter what the multi_done() returned! */
-      multistate(data, CURLM_STATE_COMPLETED);
+      multistate(data, MSTATE_COMPLETED);
       break;
 
-    case CURLM_STATE_COMPLETED:
+    case MSTATE_COMPLETED:
       break;
 
-    case CURLM_STATE_MSGSENT:
+    case MSTATE_MSGSENT:
       data->result = result;
       return CURLM_OK; /* do nothing */
 
     default:
       return CURLM_INTERNAL_ERROR;
     }
+
+    if(data->conn &&
+       data->mstate >= MSTATE_CONNECT &&
+       data->mstate < MSTATE_DO &&
+       rc != CURLM_CALL_MULTI_PERFORM &&
+       !multi_ischanged(multi, false)) {
+      /* We now handle stream timeouts if and only if this will be the last
+       * loop iteration. We only check this on the last iteration to ensure
+       * that if we know we have additional work to do immediately
+       * (i.e. CURLM_CALL_MULTI_PERFORM == TRUE) then we should do that before
+       * declaring the connection timed out as we may almost have a completed
+       * connection. */
+      multi_handle_timeout(data, nowp, &stream_error, &result, TRUE);
+    }
+
     statemachine_end:
 
-    if(data->mstate < CURLM_STATE_COMPLETED) {
+    if(data->mstate < MSTATE_COMPLETED) {
       if(result) {
         /*
          * If an error was returned, and we aren't in completed state now,
@@ -2490,29 +2490,29 @@
             Curl_disconnect(data, conn, dead_connection);
           }
         }
-        else if(data->mstate == CURLM_STATE_CONNECT) {
+        else if(data->mstate == MSTATE_CONNECT) {
           /* Curl_connect() failed */
           (void)Curl_posttransfer(data);
         }
 
-        multistate(data, CURLM_STATE_COMPLETED);
+        multistate(data, MSTATE_COMPLETED);
         rc = CURLM_CALL_MULTI_PERFORM;
       }
       /* if there's still a connection to use, call the progress function */
-      else if(data->conn && Curl_pgrsUpdate(data->conn)) {
+      else if(data->conn && Curl_pgrsUpdate(data)) {
         /* aborted due to progress callback return code must close the
            connection */
         result = CURLE_ABORTED_BY_CALLBACK;
         streamclose(data->conn, "Aborted by callback");
 
         /* if not yet in DONE state, go there, otherwise COMPLETED */
-        multistate(data, (data->mstate < CURLM_STATE_DONE)?
-                   CURLM_STATE_DONE: CURLM_STATE_COMPLETED);
+        multistate(data, (data->mstate < MSTATE_DONE)?
+                   MSTATE_DONE: MSTATE_COMPLETED);
         rc = CURLM_CALL_MULTI_PERFORM;
       }
     }
 
-    if(CURLM_STATE_COMPLETED == data->mstate) {
+    if(MSTATE_COMPLETED == data->mstate) {
       if(data->set.fmultidone) {
         /* signal via callback instead */
         data->set.fmultidone(data, result);
@@ -2528,7 +2528,7 @@
         rc = multi_addmsg(multi, msg);
         DEBUGASSERT(!data->conn);
       }
-      multistate(data, CURLM_STATE_MSGSENT);
+      multistate(data, MSTATE_MSGSENT);
     }
   } while((rc == CURLM_CALL_MULTI_PERFORM) || multi_ischanged(multi, FALSE));
 
@@ -2600,7 +2600,7 @@
     if(multi->in_callback)
       return CURLM_RECURSIVE_API_CALL;
 
-    multi->type = 0; /* not good anymore */
+    multi->magic = 0; /* not good anymore */
 
     /* Firsrt remove all remaining easy handles */
     data = multi->easyp;
@@ -2705,7 +2705,7 @@
   curl_socket_t s;
   int num;
   unsigned int curraction;
-  int actions[MAX_SOCKSPEREASYHANDLE];
+  unsigned char actions[MAX_SOCKSPEREASYHANDLE];
 
   for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++)
     socks[i] = CURL_SOCKET_BAD;
@@ -2722,9 +2722,9 @@
   for(i = 0; (i< MAX_SOCKSPEREASYHANDLE) &&
         (curraction & (GETSOCK_READSOCK(i) | GETSOCK_WRITESOCK(i)));
       i++) {
-    unsigned int action = CURL_POLL_NONE;
-    unsigned int prevaction = 0;
-    unsigned int comboaction;
+    unsigned char action = CURL_POLL_NONE;
+    unsigned char prevaction = 0;
+    int comboaction;
     bool sincebefore = FALSE;
 
     s = socks[i];
@@ -2782,10 +2782,10 @@
     }
 
     comboaction = (entry->writers? CURL_POLL_OUT : 0) |
-      (entry->readers ? CURL_POLL_IN : 0);
+                   (entry->readers ? CURL_POLL_IN : 0);
 
     /* socket existed before and has the same action set as before */
-    if(sincebefore && (entry->action == comboaction))
+    if(sincebefore && ((int)entry->action == comboaction))
       /* same, continue */
       continue;
 
@@ -2818,7 +2818,7 @@
     /* if this is NULL here, the socket has been closed and notified so
        already by Curl_multi_closed() */
     if(entry) {
-      int oldactions = data->actions[i];
+      unsigned char oldactions = data->actions[i];
       /* this socket has been removed. Decrease user count */
       entry->users--;
       if(oldactions & CURL_POLL_OUT)
@@ -2843,7 +2843,7 @@
   } /* for loop over numsocks */
 
   memcpy(data->sockets, socks, num*sizeof(curl_socket_t));
-  memcpy(data->actions, actions, num*sizeof(int));
+  memcpy(data->actions, actions, num*sizeof(char));
   data->numsocks = num;
   return CURLM_OK;
 }
@@ -3158,7 +3158,6 @@
 }
 
 CURLMcode curl_multi_socket_all(struct Curl_multi *multi, int *running_handles)
-
 {
   CURLMcode result;
   if(multi->in_callback)
@@ -3376,11 +3375,10 @@
 
     /* Since this is an updated time, we must remove the previous entry from
        the splay tree first and then re-add the new value */
-    rc = Curl_splayremovebyaddr(multi->timetree,
-                                &data->state.timenode,
-                                &multi->timetree);
+    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
+                          &multi->timetree);
     if(rc)
-      infof(data, "Internal error removing splay node = %d\n", rc);
+      infof(data, "Internal error removing splay node = %d", rc);
   }
 
   /* Indicate that we are in the splay tree and insert the new timer expiry
@@ -3424,11 +3422,10 @@
     struct Curl_llist *list = &data->state.timeoutlist;
     int rc;
 
-    rc = Curl_splayremovebyaddr(multi->timetree,
-                                &data->state.timenode,
-                                &multi->timetree);
+    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
+                          &multi->timetree);
     if(rc)
-      infof(data, "Internal error clearing splay node = %d\n", rc);
+      infof(data, "Internal error clearing splay node = %d", rc);
 
     /* flush the timeout list too */
     while(list->size > 0) {
@@ -3436,7 +3433,7 @@
     }
 
 #ifdef DEBUGBUILD
-    infof(data, "Expire cleared (transfer %p)\n", data);
+    infof(data, "Expire cleared (transfer %p)", data);
 #endif
     nowp->tv_sec = 0;
     nowp->tv_usec = 0;
@@ -3478,16 +3475,18 @@
  * When information about a connection has appeared, call this!
  */
 
-void Curl_multiuse_state(struct connectdata *conn,
+void Curl_multiuse_state(struct Curl_easy *data,
                          int bundlestate) /* use BUNDLE_* defines */
 {
+  struct connectdata *conn;
+  DEBUGASSERT(data);
+  DEBUGASSERT(data->multi);
+  conn = data->conn;
   DEBUGASSERT(conn);
   DEBUGASSERT(conn->bundle);
-  DEBUGASSERT(conn->data);
-  DEBUGASSERT(conn->data->multi);
 
   conn->bundle->multiuse = bundlestate;
-  process_pending_handles(conn->data->multi);
+  process_pending_handles(data->multi);
 }
 
 static void process_pending_handles(struct Curl_multi *multi)
@@ -3496,9 +3495,9 @@
   if(e) {
     struct Curl_easy *data = e->ptr;
 
-    DEBUGASSERT(data->mstate == CURLM_STATE_CONNECT_PEND);
+    DEBUGASSERT(data->mstate == MSTATE_PENDING);
 
-    multistate(data, CURLM_STATE_CONNECT);
+    multistate(data, MSTATE_CONNECT);
 
     /* Remove this node from the list */
     Curl_llist_remove(&multi->pending, e, NULL);
@@ -3536,7 +3535,7 @@
   fprintf(stderr, "* Multi status: %d handles, %d alive\n",
           multi->num_easy, multi->num_alive);
   for(data = multi->easyp; data; data = data->next) {
-    if(data->mstate < CURLM_STATE_COMPLETED) {
+    if(data->mstate < MSTATE_COMPLETED) {
       /* only display handles that are not completed */
       fprintf(stderr, "handle %p, state %s, %d sockets\n",
               (void *)data,
diff --git a/lib/multihandle.h b/lib/multihandle.h
index c70a1ce..2e4a6ff 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -22,10 +22,14 @@
  *
  ***************************************************************************/
 
+#include "llist.h"
+#include "hash.h"
 #include "conncache.h"
 #include "psl.h"
 #include "socketpair.h"
 
+struct connectdata;
+
 struct Curl_message {
   struct Curl_llist_element list;
   /* the 'CURLMsg' is the part that is visible to the external user */
@@ -36,27 +40,26 @@
    well!
 */
 typedef enum {
-  CURLM_STATE_INIT,         /* 0 - start in this state */
-  CURLM_STATE_CONNECT_PEND, /* 1 - no connections, waiting for one */
-  CURLM_STATE_CONNECT,      /* 2 - resolve/connect has been sent off */
-  CURLM_STATE_WAITRESOLVE,  /* 3 - awaiting the resolve to finalize */
-  CURLM_STATE_WAITCONNECT,  /* 4 - awaiting the TCP connect to finalize */
-  CURLM_STATE_WAITPROXYCONNECT, /* 5 - awaiting HTTPS proxy SSL initialization
-                                   to complete and/or proxy CONNECT to
-                                   finalize */
-  CURLM_STATE_SENDPROTOCONNECT, /* 6 - initiate protocol connect procedure */
-  CURLM_STATE_PROTOCONNECT, /* 7 - completing the protocol-specific connect
-                                   phase */
-  CURLM_STATE_DO,           /* 8 - start send off the request (part 1) */
-  CURLM_STATE_DOING,        /* 9 - sending off the request (part 1) */
-  CURLM_STATE_DO_MORE,      /* 10 - send off the request (part 2) */
-  CURLM_STATE_DO_DONE,      /* 11 - done sending off request */
-  CURLM_STATE_PERFORM,      /* 12 - transfer data */
-  CURLM_STATE_TOOFAST,      /* 13 - wait because limit-rate exceeded */
-  CURLM_STATE_DONE,         /* 14 - post data transfer operation */
-  CURLM_STATE_COMPLETED,    /* 15 - operation complete */
-  CURLM_STATE_MSGSENT,      /* 16 - the operation complete message is sent */
-  CURLM_STATE_LAST          /* 17 - not a true state, never use this */
+  MSTATE_INIT,         /* 0 - start in this state */
+  MSTATE_PENDING,      /* 1 - no connections, waiting for one */
+  MSTATE_CONNECT,      /* 2 - resolve/connect has been sent off */
+  MSTATE_RESOLVING,    /* 3 - awaiting the resolve to finalize */
+  MSTATE_CONNECTING,   /* 4 - awaiting the TCP connect to finalize */
+  MSTATE_TUNNELING,    /* 5 - awaiting HTTPS proxy SSL initialization to
+                          complete and/or proxy CONNECT to finalize */
+  MSTATE_PROTOCONNECT, /* 6 - initiate protocol connect procedure */
+  MSTATE_PROTOCONNECTING, /* 7 - completing the protocol-specific connect
+                             phase */
+  MSTATE_DO,           /* 8 - start send off the request (part 1) */
+  MSTATE_DOING,        /* 9 - sending off the request (part 1) */
+  MSTATE_DOING_MORE,   /* 10 - send off the request (part 2) */
+  MSTATE_DID,          /* 11 - done sending off request */
+  MSTATE_PERFORMING,   /* 12 - transfer data */
+  MSTATE_RATELIMITING, /* 13 - wait because limit-rate exceeded */
+  MSTATE_DONE,         /* 14 - post data transfer operation */
+  MSTATE_COMPLETED,    /* 15 - operation complete */
+  MSTATE_MSGSENT,      /* 16 - the operation complete message is sent */
+  MSTATE_LAST          /* 17 - not a true state, never use this */
 } CURLMstate;
 
 /* we support N sockets per easy handle. Set the corresponding bit to what
@@ -67,8 +70,7 @@
 
 #define CURLPIPE_ANY (CURLPIPE_MULTIPLEX)
 
-#if defined(USE_SOCKETPAIR) && !defined(USE_BLOCKING_SOCKETS) &&        \
-  !defined(CURL_DISABLE_SOCKETPAIR)
+#if !defined(CURL_DISABLE_SOCKETPAIR)
 #define ENABLE_WAKEUP
 #endif
 
@@ -79,7 +81,7 @@
 struct Curl_multi {
   /* First a simple identifier to easier detect if a user mix up
      this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
-  long type;
+  unsigned int magic;
 
   /* We have a doubly-linked list with easy handles */
   struct Curl_easy *easyp;
@@ -92,7 +94,7 @@
   struct Curl_llist msglist; /* a list of messages from completed transfers */
 
   struct Curl_llist pending; /* Curl_easys that are in the
-                                CURLM_STATE_CONNECT_PEND state */
+                                MSTATE_PENDING state */
 
   /* callback function and user data pointer for the *socket() API */
   curl_socket_callback socket_cb;
@@ -151,6 +153,9 @@
   bool recheckstate; /* see Curl_multi_connchanged */
   bool in_callback;            /* true while executing a callback */
   bool ipv6_works;
+#ifdef USE_OPENSSL
+  bool ssl_seeded;
+#endif
 };
 
 #endif /* HEADER_CURL_MULTIHANDLE_H */
diff --git a/lib/multiif.h b/lib/multiif.h
index 7d574df..2fbef53 100644
--- a/lib/multiif.h
+++ b/lib/multiif.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -69,7 +69,7 @@
 /* Return the value of the CURLMOPT_MAX_TOTAL_CONNECTIONS option */
 size_t Curl_multi_max_total_connections(struct Curl_multi *multi);
 
-void Curl_multiuse_state(struct connectdata *conn,
+void Curl_multiuse_state(struct Curl_easy *data,
                          int bundlestate); /* use BUNDLE_* defines */
 
 /*
diff --git a/lib/netrc.c b/lib/netrc.c
index 1c9da31..0a4ae2c 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -42,7 +42,8 @@
 enum host_lookup_state {
   NOTHING,
   HOSTFOUND,    /* the 'machine' keyword was found */
-  HOSTVALID     /* this is "our" machine! */
+  HOSTVALID,    /* this is "our" machine! */
+  MACDEF
 };
 
 #define NETRC_FILE_MISSING 1
@@ -84,12 +85,17 @@
     int  netrcbuffsize = (int)sizeof(netrcbuffer);
 
     while(!done && fgets(netrcbuffer, netrcbuffsize, file)) {
+      if(state == MACDEF) {
+        if((netrcbuffer[0] == '\n') || (netrcbuffer[0] == '\r'))
+          state = NOTHING;
+        else
+          continue;
+      }
       tok = strtok_r(netrcbuffer, " \t\n", &tok_buf);
       if(tok && *tok == '#')
         /* treat an initial hash as a comment line */
         continue;
       while(tok) {
-
         if((login && *login) && (password && *password)) {
           done = TRUE;
           break;
@@ -97,7 +103,13 @@
 
         switch(state) {
         case NOTHING:
-          if(strcasecompare("machine", tok)) {
+          if(strcasecompare("macdef", tok)) {
+            /* Define a macro. A macro is defined with the specified name; its
+               contents begin with the next .netrc line and continue until a
+               null line (consecutive new-line characters) is encountered. */
+            state = MACDEF;
+          }
+          else if(strcasecompare("machine", tok)) {
             /* the next tok is the machine name, this is in itself the
                delimiter that starts the stuff entered for this machine,
                after this we need to search for 'login' and
@@ -109,6 +121,11 @@
             retcode = NETRC_SUCCESS; /* we did find our host */
           }
           break;
+        case MACDEF:
+          if(!strlen(tok)) {
+            state = NOTHING;
+          }
+          break;
         case HOSTFOUND:
           if(strcasecompare(host, tok)) {
             /* and yes, this is our host! */
diff --git a/lib/netrc.h b/lib/netrc.h
index 7f56c4b..4938a59 100644
--- a/lib/netrc.h
+++ b/lib/netrc.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/non-ascii.c b/lib/non-ascii.c
index a48e67d..932cf89 100644
--- a/lib/non-ascii.c
+++ b/lib/non-ascii.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -127,7 +127,7 @@
                &output_ptr, &out_bytes);
     if(!data)
       iconv_close(tmpcd);
-    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+    if((rc == ICONV_ERROR) || (in_bytes)) {
       failf(data,
             "The Curl_convert_to_network iconv call failed with errno %i: %s",
             errno, strerror(errno));
@@ -193,7 +193,7 @@
                &output_ptr, &out_bytes);
     if(!data)
       iconv_close(tmpcd);
-    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+    if((rc == ICONV_ERROR) || (in_bytes)) {
       failf(data,
             "Curl_convert_from_network iconv call failed with errno %i: %s",
             errno, strerror(errno));
@@ -260,7 +260,7 @@
                &output_ptr, &out_bytes);
     if(!data)
       iconv_close(tmpcd);
-    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+    if((rc == ICONV_ERROR) || (in_bytes)) {
       failf(data,
             "The Curl_convert_from_utf8 iconv call failed with errno %i: %s",
             errno, strerror(errno));
diff --git a/lib/non-ascii.h b/lib/non-ascii.h
index 5fb5771..458e8ef 100644
--- a/lib/non-ascii.h
+++ b/lib/non-ascii.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/nonblock.c b/lib/nonblock.c
index abeb659..fda2e9a 100644
--- a/lib/nonblock.c
+++ b/lib/nonblock.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -47,13 +47,7 @@
 int curlx_nonblock(curl_socket_t sockfd,    /* operate on this */
                    int nonblock   /* TRUE or FALSE */)
 {
-#if defined(USE_BLOCKING_SOCKETS)
-  (void)sockfd;
-  (void)nonblock;
-  return 0; /* returns success */
-
-#elif defined(HAVE_FCNTL_O_NONBLOCK)
-
+#if defined(HAVE_FCNTL_O_NONBLOCK)
   /* most recent unix versions */
   int flags;
   flags = sfcntl(sockfd, F_GETFL, 0);
diff --git a/lib/nonblock.h b/lib/nonblock.h
index d50d315..761dab4 100644
--- a/lib/nonblock.h
+++ b/lib/nonblock.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/nwlib.c b/lib/nwlib.c
index beec0b3..7693268 100644
--- a/lib/nwlib.c
+++ b/lib/nwlib.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/nwos.c b/lib/nwos.c
index c6c22cc..8894031 100644
--- a/lib/nwos.c
+++ b/lib/nwos.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/openldap.c b/lib/openldap.c
index 2aff4f6..fb5e743 100644
--- a/lib/openldap.c
+++ b/lib/openldap.c
@@ -5,12 +5,12 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 2011 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
- * Copyright (C) 2011 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -76,14 +76,16 @@
                         LDAP **ld);
 #endif
 
-static CURLcode ldap_setup_connection(struct connectdata *conn);
-static CURLcode ldap_do(struct connectdata *conn, bool *done);
-static CURLcode ldap_done(struct connectdata *conn, CURLcode, bool);
-static CURLcode ldap_connect(struct connectdata *conn, bool *done);
-static CURLcode ldap_connecting(struct connectdata *conn, bool *done);
-static CURLcode ldap_disconnect(struct connectdata *conn, bool dead);
+static CURLcode oldap_setup_connection(struct Curl_easy *data,
+                                       struct connectdata *conn);
+static CURLcode oldap_do(struct Curl_easy *data, bool *done);
+static CURLcode oldap_done(struct Curl_easy *data, CURLcode, bool);
+static CURLcode oldap_connect(struct Curl_easy *data, bool *done);
+static CURLcode oldap_connecting(struct Curl_easy *data, bool *done);
+static CURLcode oldap_disconnect(struct Curl_easy *data,
+                                 struct connectdata *conn, bool dead);
 
-static Curl_recv ldap_recv;
+static Curl_recv oldap_recv;
 
 /*
  * LDAP protocol handler.
@@ -91,20 +93,21 @@
 
 const struct Curl_handler Curl_handler_ldap = {
   "LDAP",                               /* scheme */
-  ldap_setup_connection,                /* setup_connection */
-  ldap_do,                              /* do_it */
-  ldap_done,                            /* done */
+  oldap_setup_connection,               /* setup_connection */
+  oldap_do,                             /* do_it */
+  oldap_done,                           /* done */
   ZERO_NULL,                            /* do_more */
-  ldap_connect,                         /* connect_it */
-  ldap_connecting,                      /* connecting */
+  oldap_connect,                        /* connect_it */
+  oldap_connecting,                     /* connecting */
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
-  ldap_disconnect,                      /* disconnect */
+  oldap_disconnect,                     /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_LDAP,                            /* defport */
   CURLPROTO_LDAP,                       /* protocol */
   CURLPROTO_LDAP,                       /* family */
@@ -118,20 +121,21 @@
 
 const struct Curl_handler Curl_handler_ldaps = {
   "LDAPS",                              /* scheme */
-  ldap_setup_connection,                /* setup_connection */
-  ldap_do,                              /* do_it */
-  ldap_done,                            /* done */
+  oldap_setup_connection,               /* setup_connection */
+  oldap_do,                             /* do_it */
+  oldap_done,                           /* done */
   ZERO_NULL,                            /* do_more */
-  ldap_connect,                         /* connect_it */
-  ldap_connecting,                      /* connecting */
+  oldap_connect,                        /* connect_it */
+  oldap_connecting,                     /* connecting */
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
-  ldap_disconnect,                      /* disconnect */
+  oldap_disconnect,                     /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_LDAPS,                           /* defport */
   CURLPROTO_LDAPS,                      /* protocol */
   CURLPROTO_LDAP,                       /* family */
@@ -169,15 +173,15 @@
   int nument;
 };
 
-static CURLcode ldap_setup_connection(struct connectdata *conn)
+static CURLcode oldap_setup_connection(struct Curl_easy *data,
+                                       struct connectdata *conn)
 {
   struct ldapconninfo *li;
   LDAPURLDesc *lud;
-  struct Curl_easy *data = conn->data;
   int rc, proto;
   CURLcode status;
 
-  rc = ldap_url_parse(data->change.url, &lud);
+  rc = ldap_url_parse(data->state.url, &lud);
   if(rc != LDAP_URL_SUCCESS) {
     const char *msg = "url parsing problem";
     status = CURLE_URL_MALFORMAT;
@@ -186,7 +190,7 @@
         status = CURLE_OUT_OF_MEMORY;
       msg = url_errs[rc];
     }
-    failf(conn->data, "LDAP local: %s", msg);
+    failf(data, "LDAP local: %s", msg);
     return status;
   }
   proto = ldap_pvt_url_scheme2proto(lud->lud_scheme);
@@ -205,10 +209,10 @@
 static Sockbuf_IO ldapsb_tls;
 #endif
 
-static CURLcode ldap_connect(struct connectdata *conn, bool *done)
+static CURLcode oldap_connect(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ldapconninfo *li = conn->proto.ldapc;
-  struct Curl_easy *data = conn->data;
   int rc, proto = LDAP_VERSION3;
   char hosturl[1024];
   char *ptr;
@@ -243,7 +247,8 @@
 #ifdef USE_SSL
   if(conn->handler->flags & PROTOPT_SSL) {
     CURLcode result;
-    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
+    result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                          FIRSTSOCKET, &li->ssldone);
     if(result)
       return result;
   }
@@ -252,10 +257,10 @@
   return CURLE_OK;
 }
 
-static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
+static CURLcode oldap_connecting(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ldapconninfo *li = conn->proto.ldapc;
-  struct Curl_easy *data = conn->data;
   LDAPMessage *msg = NULL;
   struct timeval tv = {0, 1}, *tvp;
   int rc, err;
@@ -265,7 +270,8 @@
   if(conn->handler->flags & PROTOPT_SSL) {
     /* Is the SSL handshake complete yet? */
     if(!li->ssldone) {
-      CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET,
+      CURLcode result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                                     FIRSTSOCKET,
                                                      &li->ssldone);
       if(result || !li->ssldone)
         return result;
@@ -275,7 +281,7 @@
     if(!li->sslinst) {
       Sockbuf *sb;
       ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
-      ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, conn);
+      ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data);
       li->sslinst = TRUE;
       li->recv = conn->recv[FIRSTSOCKET];
       li->send = conn->send[FIRSTSOCKET];
@@ -351,19 +357,28 @@
 
   if(info)
     ldap_memfree(info);
-  conn->recv[FIRSTSOCKET] = ldap_recv;
+  conn->recv[FIRSTSOCKET] = oldap_recv;
   *done = TRUE;
 
   return CURLE_OK;
 }
 
-static CURLcode ldap_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode oldap_disconnect(struct Curl_easy *data,
+                                 struct connectdata *conn,
+                                 bool dead_connection)
 {
   struct ldapconninfo *li = conn->proto.ldapc;
   (void) dead_connection;
 
   if(li) {
     if(li->ld) {
+#ifdef USE_SSL
+      if(conn->ssl[FIRSTSOCKET].use) {
+        Sockbuf *sb;
+        ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
+        ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data);
+      }
+#endif
       ldap_unbind_ext(li->ld, NULL, NULL);
       li->ld = NULL;
     }
@@ -373,21 +388,21 @@
   return CURLE_OK;
 }
 
-static CURLcode ldap_do(struct connectdata *conn, bool *done)
+static CURLcode oldap_do(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ldapconninfo *li = conn->proto.ldapc;
   struct ldapreqinfo *lr;
   CURLcode status = CURLE_OK;
   int rc = 0;
   LDAPURLDesc *ludp = NULL;
   int msgid;
-  struct Curl_easy *data = conn->data;
 
   connkeep(conn, "OpenLDAP do");
 
-  infof(data, "LDAP local: %s\n", data->change.url);
+  infof(data, "LDAP local: %s", data->state.url);
 
-  rc = ldap_url_parse(data->change.url, &ludp);
+  rc = ldap_url_parse(data->state.url, &ludp);
   if(rc != LDAP_URL_SUCCESS) {
     const char *msg = "url parsing problem";
     status = CURLE_URL_MALFORMAT;
@@ -396,7 +411,7 @@
         status = CURLE_OUT_OF_MEMORY;
       msg = url_errs[rc];
     }
-    failf(conn->data, "LDAP local: %s", msg);
+    failf(data, "LDAP local: %s", msg);
     return status;
   }
 
@@ -412,16 +427,17 @@
   if(!lr)
     return CURLE_OUT_OF_MEMORY;
   lr->msgid = msgid;
-  data->req.protop = lr;
+  data->req.p.ldap = lr;
   Curl_setup_transfer(data, FIRSTSOCKET, -1, FALSE, -1);
   *done = TRUE;
   return CURLE_OK;
 }
 
-static CURLcode ldap_done(struct connectdata *conn, CURLcode res,
-                          bool premature)
+static CURLcode oldap_done(struct Curl_easy *data, CURLcode res,
+                           bool premature)
 {
-  struct ldapreqinfo *lr = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct ldapreqinfo *lr = data->req.p.ldap;
 
   (void)res;
   (void)premature;
@@ -433,19 +449,19 @@
       ldap_abandon_ext(li->ld, lr->msgid, NULL, NULL);
       lr->msgid = 0;
     }
-    conn->data->req.protop = NULL;
+    data->req.p.ldap = NULL;
     free(lr);
   }
 
   return CURLE_OK;
 }
 
-static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
-                         size_t len, CURLcode *err)
+static ssize_t oldap_recv(struct Curl_easy *data, int sockindex, char *buf,
+                          size_t len, CURLcode *err)
 {
+  struct connectdata *conn = data->conn;
   struct ldapconninfo *li = conn->proto.ldapc;
-  struct Curl_easy *data = conn->data;
-  struct ldapreqinfo *lr = data->req.protop;
+  struct ldapreqinfo *lr = data->req.p.ldap;
   int rc, ret;
   LDAPMessage *msg = NULL;
   LDAPMessage *ent;
@@ -494,7 +510,7 @@
       else {
         /* successful */
         if(code == LDAP_SIZELIMIT_EXCEEDED)
-          infof(data, "There are more than %d entries\n", lr->nument);
+          infof(data, "There are more than %d entries", lr->nument);
         data->req.size = data->req.bytecount;
         *err = CURLE_OK;
         ret = 0;
@@ -512,20 +528,20 @@
       *err = CURLE_RECV_ERROR;
       return -1;
     }
-    writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4);
+    writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"DN: ", 4);
     if(writeerr) {
       *err = writeerr;
       return -1;
     }
 
-    writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val,
+    writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)bv.bv_val,
                                  bv.bv_len);
     if(writeerr) {
       *err = writeerr;
       return -1;
     }
 
-    writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
+    writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
     if(writeerr) {
       *err = writeerr;
       return -1;
@@ -537,7 +553,7 @@
         rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals)) {
       int i;
 
-      if(bv.bv_val == NULL)
+      if(!bv.bv_val)
         break;
 
       if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
@@ -545,19 +561,19 @@
       else
         binary = 0;
 
-      if(bvals == NULL) {
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
+      if(!bvals) {
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\t", 1);
         if(writeerr) {
           *err = writeerr;
           return -1;
         }
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val,
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)bv.bv_val,
                                      bv.bv_len);
         if(writeerr) {
           *err = writeerr;
           return -1;
         }
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":\n", 2);
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)":\n", 2);
         if(writeerr) {
           *err = writeerr;
           return -1;
@@ -568,20 +584,20 @@
 
       for(i = 0; bvals[i].bv_val != NULL; i++) {
         int binval = 0;
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\t", 1);
         if(writeerr) {
           *err = writeerr;
           return -1;
         }
 
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val,
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)bv.bv_val,
                                      bv.bv_len);
         if(writeerr) {
           *err = writeerr;
           return -1;
         }
 
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1);
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)":", 1);
         if(writeerr) {
           *err = writeerr;
           return -1;
@@ -619,7 +635,7 @@
             *err = error;
             return -1;
           }
-          writeerr = Curl_client_write(conn, CLIENTWRITE_BODY,
+          writeerr = Curl_client_write(data, CLIENTWRITE_BODY,
                                        (char *)": ", 2);
           if(writeerr) {
             *err = writeerr;
@@ -628,7 +644,7 @@
 
           data->req.bytecount += 2;
           if(val_b64_sz > 0) {
-            writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64,
+            writeerr = Curl_client_write(data, CLIENTWRITE_BODY, val_b64,
                                          val_b64_sz);
             if(writeerr) {
               *err = writeerr;
@@ -639,13 +655,13 @@
           }
         }
         else {
-          writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)" ", 1);
+          writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)" ", 1);
           if(writeerr) {
             *err = writeerr;
             return -1;
           }
 
-          writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, bvals[i].bv_val,
+          writeerr = Curl_client_write(data, CLIENTWRITE_BODY, bvals[i].bv_val,
                                        bvals[i].bv_len);
           if(writeerr) {
             *err = writeerr;
@@ -654,7 +670,7 @@
 
           data->req.bytecount += bvals[i].bv_len + 1;
         }
-        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+        writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
         if(writeerr) {
           *err = writeerr;
           return -1;
@@ -663,14 +679,14 @@
         data->req.bytecount++;
       }
       ber_memfree(bvals);
-      writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+      writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
       if(writeerr) {
         *err = writeerr;
         return -1;
       }
       data->req.bytecount++;
     }
-    writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0);
+    writeerr = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
     if(writeerr) {
       *err = writeerr;
       return -1;
@@ -710,8 +726,8 @@
 {
   (void)arg;
   if(opt == LBER_SB_OPT_DATA_READY) {
-    struct connectdata *conn = sbiod->sbiod_pvt;
-    return Curl_ssl_data_pending(conn, FIRSTSOCKET);
+    struct Curl_easy *data = sbiod->sbiod_pvt;
+    return Curl_ssl_data_pending(data->conn, FIRSTSOCKET);
   }
   return 0;
 }
@@ -719,14 +735,19 @@
 static ber_slen_t
 ldapsb_tls_read(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
 {
-  struct connectdata *conn = sbiod->sbiod_pvt;
-  struct ldapconninfo *li = conn->proto.ldapc;
-  ber_slen_t ret;
-  CURLcode err = CURLE_RECV_ERROR;
+  struct Curl_easy *data = sbiod->sbiod_pvt;
+  ber_slen_t ret = 0;
+  if(data) {
+    struct connectdata *conn = data->conn;
+    if(conn) {
+      struct ldapconninfo *li = conn->proto.ldapc;
+      CURLcode err = CURLE_RECV_ERROR;
 
-  ret = (li->recv)(conn, FIRSTSOCKET, buf, len, &err);
-  if(ret < 0 && err == CURLE_AGAIN) {
-    SET_SOCKERRNO(EWOULDBLOCK);
+      ret = (li->recv)(data, FIRSTSOCKET, buf, len, &err);
+      if(ret < 0 && err == CURLE_AGAIN) {
+        SET_SOCKERRNO(EWOULDBLOCK);
+      }
+    }
   }
   return ret;
 }
@@ -734,14 +755,18 @@
 static ber_slen_t
 ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
 {
-  struct connectdata *conn = sbiod->sbiod_pvt;
-  struct ldapconninfo *li = conn->proto.ldapc;
-  ber_slen_t ret;
-  CURLcode err = CURLE_SEND_ERROR;
-
-  ret = (li->send)(conn, FIRSTSOCKET, buf, len, &err);
-  if(ret < 0 && err == CURLE_AGAIN) {
-    SET_SOCKERRNO(EWOULDBLOCK);
+  struct Curl_easy *data = sbiod->sbiod_pvt;
+  ber_slen_t ret = 0;
+  if(data) {
+    struct connectdata *conn = data->conn;
+    if(conn) {
+      struct ldapconninfo *li = conn->proto.ldapc;
+      CURLcode err = CURLE_SEND_ERROR;
+      ret = (li->send)(data, FIRSTSOCKET, buf, len, &err);
+      if(ret < 0 && err == CURLE_AGAIN) {
+        SET_SOCKERRNO(EWOULDBLOCK);
+      }
+    }
   }
   return ret;
 }
diff --git a/lib/parsedate.c b/lib/parsedate.c
index dd6150b..3c38f2c 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/parsedate.h b/lib/parsedate.h
index 8c7ae94..a99faf9 100644
--- a/lib/parsedate.h
+++ b/lib/parsedate.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 5a06674..84c7f51 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,10 +44,10 @@
 
 /* Returns timeout in ms. 0 or negative number means the timeout has already
    triggered */
-timediff_t Curl_pp_state_timeout(struct pingpong *pp, bool disconnecting)
+timediff_t Curl_pp_state_timeout(struct Curl_easy *data,
+                                 struct pingpong *pp, bool disconnecting)
 {
-  struct connectdata *conn = pp->conn;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   timediff_t timeout_ms; /* in milliseconds */
   timediff_t response_time = (data->set.server_response_timeout)?
     data->set.server_response_timeout: pp->response_time;
@@ -77,15 +77,15 @@
 /*
  * Curl_pp_statemach()
  */
-CURLcode Curl_pp_statemach(struct pingpong *pp, bool block,
+CURLcode Curl_pp_statemach(struct Curl_easy *data,
+                           struct pingpong *pp, bool block,
                            bool disconnecting)
 {
-  struct connectdata *conn = pp->conn;
+  struct connectdata *conn = data->conn;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
   int rc;
   timediff_t interval_ms;
-  timediff_t timeout_ms = Curl_pp_state_timeout(pp, disconnecting);
-  struct Curl_easy *data = conn->data;
+  timediff_t timeout_ms = Curl_pp_state_timeout(data, pp, disconnecting);
   CURLcode result = CURLE_OK;
 
   if(timeout_ms <= 0) {
@@ -117,7 +117,7 @@
 
   if(block) {
     /* if we didn't wait, we don't have to spend time on this now */
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
     else
       result = Curl_speedcheck(data, Curl_now());
@@ -131,17 +131,17 @@
     result = CURLE_OUT_OF_MEMORY;
   }
   else if(rc)
-    result = pp->statemach_act(conn);
+    result = pp->statemachine(data, data->conn);
 
   return result;
 }
 
 /* initialize stuff to prepare for reading a fresh new response */
-void Curl_pp_init(struct pingpong *pp)
+void Curl_pp_init(struct Curl_easy *data, struct pingpong *pp)
 {
-  struct connectdata *conn = pp->conn;
+  DEBUGASSERT(data);
   pp->nread_resp = 0;
-  pp->linestart_resp = conn->data->state.buffer;
+  pp->linestart_resp = data->state.buffer;
   pp->pending_resp = TRUE;
   pp->response = Curl_now(); /* start response time-out now! */
 }
@@ -162,7 +162,8 @@
  *
  * made to never block
  */
-CURLcode Curl_pp_vsendf(struct pingpong *pp,
+CURLcode Curl_pp_vsendf(struct Curl_easy *data,
+                        struct pingpong *pp,
                         const char *fmt,
                         va_list args)
 {
@@ -170,8 +171,7 @@
   size_t write_len;
   char *s;
   CURLcode result;
-  struct connectdata *conn = pp->conn;
-  struct Curl_easy *data;
+  struct connectdata *conn = data->conn;
 
 #ifdef HAVE_GSSAPI
   enum protection_level data_sec;
@@ -184,7 +184,6 @@
   if(!conn)
     /* can't send without a connection! */
     return CURLE_SEND_ERROR;
-  data = conn->data;
 
   Curl_dyn_reset(&pp->sendbuf);
   result = Curl_dyn_vaddf(&pp->sendbuf, fmt, args);
@@ -198,7 +197,7 @@
 
   write_len = Curl_dyn_len(&pp->sendbuf);
   s = Curl_dyn_ptr(&pp->sendbuf);
-  Curl_pp_init(pp);
+  Curl_pp_init(data, pp);
 
   result = Curl_convert_to_network(data, s, write_len);
   /* Curl_convert_to_network calls failf if unsuccessful */
@@ -208,7 +207,7 @@
 #ifdef HAVE_GSSAPI
   conn->data_prot = PROT_CMD;
 #endif
-  result = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len,
+  result = Curl_write(data, conn->sock[FIRSTSOCKET], s, write_len,
                       &bytes_written);
   if(result)
     return result;
@@ -218,8 +217,7 @@
   conn->data_prot = data_sec;
 #endif
 
-  if(data->set.verbose)
-    Curl_debug(data, CURLINFO_HEADER_OUT, s, (size_t)bytes_written);
+  Curl_debug(data, CURLINFO_HEADER_OUT, s, (size_t)bytes_written);
 
   if(bytes_written != (ssize_t)write_len) {
     /* the whole chunk was not sent, keep it around and adjust sizes */
@@ -247,14 +245,14 @@
  *
  * made to never block
  */
-CURLcode Curl_pp_sendf(struct pingpong *pp,
+CURLcode Curl_pp_sendf(struct Curl_easy *data, struct pingpong *pp,
                        const char *fmt, ...)
 {
   CURLcode result;
   va_list ap;
   va_start(ap, fmt);
 
-  result = Curl_pp_vsendf(pp, fmt, ap);
+  result = Curl_pp_vsendf(data, pp, fmt, ap);
 
   va_end(ap);
 
@@ -266,7 +264,8 @@
  *
  * Reads a piece of a server response.
  */
-CURLcode Curl_pp_readresp(curl_socket_t sockfd,
+CURLcode Curl_pp_readresp(struct Curl_easy *data,
+                          curl_socket_t sockfd,
                           struct pingpong *pp,
                           int *code, /* return the server code if done */
                           size_t *size) /* size of the response */
@@ -275,8 +274,7 @@
   bool keepon = TRUE;
   ssize_t gotbytes;
   char *ptr;
-  struct connectdata *conn = pp->conn;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   char * const buf = data->state.buffer;
   CURLcode result = CURLE_OK;
 
@@ -316,7 +314,7 @@
 #endif
       DEBUGASSERT((ptr + data->set.buffer_size - pp->nread_resp) <=
                   (buf + data->set.buffer_size + 1));
-      result = Curl_read(conn, sockfd, ptr,
+      result = Curl_read(data, sockfd, ptr,
                          data->set.buffer_size - pp->nread_resp,
                          &gotbytes);
 #ifdef HAVE_GSSAPI
@@ -364,21 +362,20 @@
 #ifdef HAVE_GSSAPI
           if(!conn->sec_complete)
 #endif
-            if(data->set.verbose)
-              Curl_debug(data, CURLINFO_HEADER_IN,
-                         pp->linestart_resp, (size_t)perline);
+            Curl_debug(data, CURLINFO_HEADER_IN,
+                       pp->linestart_resp, (size_t)perline);
 
           /*
            * We pass all response-lines to the callback function registered
            * for "headers". The response lines can be seen as a kind of
            * headers.
            */
-          result = Curl_client_write(conn, CLIENTWRITE_HEADER,
+          result = Curl_client_write(data, CLIENTWRITE_HEADER,
                                      pp->linestart_resp, perline);
           if(result)
             return result;
 
-          if(pp->endofresp(conn, pp->linestart_resp, perline, code)) {
+          if(pp->endofresp(data, conn, pp->linestart_resp, perline, code)) {
             /* This is the end of the last line, copy the last line to the
                start of the buffer and null-terminate, for old times sake */
             size_t n = ptr - pp->linestart_resp;
@@ -405,7 +402,7 @@
         clipamount = gotbytes - i;
         restart = TRUE;
         DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
-                     "server response left\n",
+                     "server response left",
                      (int)clipamount));
       }
       else if(keepon) {
@@ -415,7 +412,7 @@
              with it. We keep the first bytes of the line then we throw
              away the rest. */
           infof(data, "Excessive server response line length received, "
-                "%zd bytes. Stripping\n", gotbytes);
+                "%zd bytes. Stripping", gotbytes);
           restart = TRUE;
 
           /* we keep 40 bytes since all our pingpong protocols are only
@@ -458,10 +455,10 @@
   return result;
 }
 
-int Curl_pp_getsock(struct pingpong *pp,
-                    curl_socket_t *socks)
+int Curl_pp_getsock(struct Curl_easy *data,
+                    struct pingpong *pp, curl_socket_t *socks)
 {
-  struct connectdata *conn = pp->conn;
+  struct connectdata *conn = data->conn;
   socks[0] = conn->sock[FIRSTSOCKET];
 
   if(pp->sendleft) {
@@ -473,13 +470,14 @@
   return GETSOCK_READSOCK(0);
 }
 
-CURLcode Curl_pp_flushsend(struct pingpong *pp)
+CURLcode Curl_pp_flushsend(struct Curl_easy *data,
+                           struct pingpong *pp)
 {
   /* we have a piece of a command still left to send */
-  struct connectdata *conn = pp->conn;
+  struct connectdata *conn = data->conn;
   ssize_t written;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  CURLcode result = Curl_write(conn, sock, pp->sendthis + pp->sendsize -
+  CURLcode result = Curl_write(data, sock, pp->sendthis + pp->sendsize -
                                pp->sendleft, pp->sendleft, &written);
   if(result)
     return result;
diff --git a/lib/pingpong.h b/lib/pingpong.h
index 855815a..8f56f3f 100644
--- a/lib/pingpong.h
+++ b/lib/pingpong.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,10 +33,9 @@
 struct connectdata;
 
 typedef enum {
-  FTPTRANSFER_BODY, /* yes do transfer a body */
-  FTPTRANSFER_INFO, /* do still go through to get info/headers */
-  FTPTRANSFER_NONE, /* don't get anything and don't get info */
-  FTPTRANSFER_LAST  /* end of list marker, never used */
+  PPTRANSFER_BODY, /* yes do transfer a body */
+  PPTRANSFER_INFO, /* do still go through to get info/headers */
+  PPTRANSFER_NONE  /* don't get anything and don't get info */
 } curl_pp_transfer;
 
 /*
@@ -62,37 +61,42 @@
                                off, used to time-out response reading */
   timediff_t response_time; /* When no timeout is given, this is the amount of
                                milliseconds we await for a server response. */
-  struct connectdata *conn; /* points to the connectdata struct that this
-                               belongs to */
   struct dynbuf sendbuf;
 
   /* Function pointers the protocols MUST implement and provide for the
      pingpong layer to function */
 
-  CURLcode (*statemach_act)(struct connectdata *conn);
-
-  bool (*endofresp)(struct connectdata *conn, char *ptr, size_t len,
-                    int *code);
+  CURLcode (*statemachine)(struct Curl_easy *data, struct connectdata *conn);
+  bool (*endofresp)(struct Curl_easy *data, struct connectdata *conn,
+                    char *ptr, size_t len, int *code);
 };
 
+#define PINGPONG_SETUP(pp,s,e)                   \
+  do {                                           \
+    pp->response_time = RESP_TIMEOUT;            \
+    pp->statemachine = s;                        \
+    pp->endofresp = e;                           \
+  } while(0)
+
 /*
  * Curl_pp_statemach()
  *
  * called repeatedly until done. Set 'wait' to make it wait a while on the
  * socket if there's no traffic.
  */
-CURLcode Curl_pp_statemach(struct pingpong *pp, bool block,
-                           bool disconnecting);
+CURLcode Curl_pp_statemach(struct Curl_easy *data, struct pingpong *pp,
+                           bool block, bool disconnecting);
 
 /* initialize stuff to prepare for reading a fresh new response */
-void Curl_pp_init(struct pingpong *pp);
+void Curl_pp_init(struct Curl_easy *data, struct pingpong *pp);
 
 /* setup for the transfer */
 void Curl_pp_setup(struct pingpong *pp);
 
 /* Returns timeout in ms. 0 or negative number means the timeout has already
    triggered */
-timediff_t Curl_pp_state_timeout(struct pingpong *pp, bool disconnecting);
+timediff_t Curl_pp_state_timeout(struct Curl_easy *data,
+                                 struct pingpong *pp, bool disconnecting);
 
 
 /***********************************************************************
@@ -105,7 +109,8 @@
  *
  * made to never block
  */
-CURLcode Curl_pp_sendf(struct pingpong *pp,
+CURLcode Curl_pp_sendf(struct Curl_easy *data,
+                       struct pingpong *pp,
                        const char *fmt, ...);
 
 /***********************************************************************
@@ -118,7 +123,8 @@
  *
  * made to never block
  */
-CURLcode Curl_pp_vsendf(struct pingpong *pp,
+CURLcode Curl_pp_vsendf(struct Curl_easy *data,
+                        struct pingpong *pp,
                         const char *fmt,
                         va_list args);
 
@@ -127,18 +133,21 @@
  *
  * Reads a piece of a server response.
  */
-CURLcode Curl_pp_readresp(curl_socket_t sockfd,
+CURLcode Curl_pp_readresp(struct Curl_easy *data,
+                          curl_socket_t sockfd,
                           struct pingpong *pp,
                           int *code, /* return the server code if done */
                           size_t *size); /* size of the response */
 
 
-CURLcode Curl_pp_flushsend(struct pingpong *pp);
+CURLcode Curl_pp_flushsend(struct Curl_easy *data,
+                           struct pingpong *pp);
 
 /* call this when a pingpong connection is disconnected */
 CURLcode Curl_pp_disconnect(struct pingpong *pp);
 
-int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks);
+int Curl_pp_getsock(struct Curl_easy *data, struct pingpong *pp,
+                    curl_socket_t *socks);
 
 
 /***********************************************************************
diff --git a/lib/pop3.c b/lib/pop3.c
index 5a73545..5fdd6f3 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -88,22 +88,27 @@
 #include "memdebug.h"
 
 /* Local API functions */
-static CURLcode pop3_regular_transfer(struct connectdata *conn, bool *done);
-static CURLcode pop3_do(struct connectdata *conn, bool *done);
-static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
+static CURLcode pop3_regular_transfer(struct Curl_easy *data, bool *done);
+static CURLcode pop3_do(struct Curl_easy *data, bool *done);
+static CURLcode pop3_done(struct Curl_easy *data, CURLcode status,
                           bool premature);
-static CURLcode pop3_connect(struct connectdata *conn, bool *done);
-static CURLcode pop3_disconnect(struct connectdata *conn, bool dead);
-static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done);
-static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks);
-static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done);
-static CURLcode pop3_setup_connection(struct connectdata *conn);
+static CURLcode pop3_connect(struct Curl_easy *data, bool *done);
+static CURLcode pop3_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead);
+static CURLcode pop3_multi_statemach(struct Curl_easy *data, bool *done);
+static int pop3_getsock(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks);
+static CURLcode pop3_doing(struct Curl_easy *data, bool *dophase_done);
+static CURLcode pop3_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
 static CURLcode pop3_parse_url_options(struct connectdata *conn);
-static CURLcode pop3_parse_url_path(struct connectdata *conn);
-static CURLcode pop3_parse_custom_request(struct connectdata *conn);
-static CURLcode pop3_perform_auth(struct connectdata *conn, const char *mech,
+static CURLcode pop3_parse_url_path(struct Curl_easy *data);
+static CURLcode pop3_parse_custom_request(struct Curl_easy *data);
+static CURLcode pop3_perform_auth(struct Curl_easy *data,
+                                  struct connectdata *conn, const char *mech,
                                   const char *initresp);
-static CURLcode pop3_continue_auth(struct connectdata *conn, const char *resp);
+static CURLcode pop3_continue_auth(struct Curl_easy *data,
+                                   struct connectdata *conn, const char *resp);
 static void pop3_get_message(char *buffer, char **outptr);
 
 /*
@@ -126,6 +131,7 @@
   pop3_disconnect,                  /* disconnect */
   ZERO_NULL,                        /* readwrite */
   ZERO_NULL,                        /* connection_check */
+  ZERO_NULL,                        /* attach connection */
   PORT_POP3,                        /* defport */
   CURLPROTO_POP3,                   /* protocol */
   CURLPROTO_POP3,                   /* family */
@@ -154,6 +160,7 @@
   pop3_disconnect,                  /* disconnect */
   ZERO_NULL,                        /* readwrite */
   ZERO_NULL,                        /* connection_check */
+  ZERO_NULL,                        /* attach connection */
   PORT_POP3S,                       /* defport */
   CURLPROTO_POP3S,                  /* protocol */
   CURLPROTO_POP3,                   /* family */
@@ -195,10 +202,11 @@
  * capabilities from the CAPA response including the supported authentication
  * types and allowed SASL mechanisms.
  */
-static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len,
-                           int *resp)
+static bool pop3_endofresp(struct Curl_easy *data, struct connectdata *conn,
+                           char *line, size_t len, int *resp)
 {
   struct pop3_conn *pop3c = &conn->proto.pop3c;
+  (void)data;
 
   /* Do we have an error response? */
   if(len >= 4 && !memcmp("-ERR", line, 4)) {
@@ -279,9 +287,9 @@
  *
  * This is the ONLY way to change POP3 state!
  */
-static void state(struct connectdata *conn, pop3state newstate)
+static void state(struct Curl_easy *data, pop3state newstate)
 {
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  struct pop3_conn *pop3c = &data->conn->proto.pop3c;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
   static const char * const names[] = {
@@ -300,7 +308,7 @@
   };
 
   if(pop3c->state != newstate)
-    infof(conn->data, "POP3 %p state change from %s to %s\n",
+    infof(data, "POP3 %p state change from %s to %s",
           (void *)pop3c, names[pop3c->state], names[newstate]);
 #endif
 
@@ -314,7 +322,8 @@
  * Sends the CAPA command in order to obtain a list of server side supported
  * capabilities.
  */
-static CURLcode pop3_perform_capa(struct connectdata *conn)
+static CURLcode pop3_perform_capa(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
@@ -324,10 +333,10 @@
   pop3c->tls_supported = FALSE;           /* Clear the TLS capability */
 
   /* Send the CAPA command */
-  result = Curl_pp_sendf(&pop3c->pp, "%s", "CAPA");
+  result = Curl_pp_sendf(data, &pop3c->pp, "%s", "CAPA");
 
   if(!result)
-    state(conn, POP3_CAPA);
+    state(data, POP3_CAPA);
 
   return result;
 }
@@ -338,13 +347,14 @@
  *
  * Sends the STLS command to start the upgrade to TLS.
  */
-static CURLcode pop3_perform_starttls(struct connectdata *conn)
+static CURLcode pop3_perform_starttls(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   /* Send the STLS command */
-  CURLcode result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "STLS");
+  CURLcode result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", "STLS");
 
   if(!result)
-    state(conn, POP3_STARTTLS);
+    state(data, POP3_STARTTLS);
 
   return result;
 }
@@ -355,20 +365,22 @@
  *
  * Performs the upgrade to TLS.
  */
-static CURLcode pop3_perform_upgrade_tls(struct connectdata *conn)
+static CURLcode pop3_perform_upgrade_tls(struct Curl_easy *data,
+                                         struct connectdata *conn)
 {
   /* Start the SSL connection */
   struct pop3_conn *pop3c = &conn->proto.pop3c;
-  CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET,
-                                                 &pop3c->ssldone);
+  CURLcode result =
+    Curl_ssl_connect_nonblocking(data, conn, FALSE, FIRSTSOCKET,
+                                 &pop3c->ssldone);
 
   if(!result) {
     if(pop3c->state != POP3_UPGRADETLS)
-      state(conn, POP3_UPGRADETLS);
+      state(data, POP3_UPGRADETLS);
 
     if(pop3c->ssldone) {
       pop3_to_pop3s(conn);
-      result = pop3_perform_capa(conn);
+      result = pop3_perform_capa(data, conn);
     }
   }
 
@@ -381,23 +393,24 @@
  *
  * Sends a clear text USER command to authenticate with.
  */
-static CURLcode pop3_perform_user(struct connectdata *conn)
+static CURLcode pop3_perform_user(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
 
   /* Check we have a username and password to authenticate with and end the
      connect phase if we don't */
   if(!conn->bits.user_passwd) {
-    state(conn, POP3_STOP);
+    state(data, POP3_STOP);
 
     return result;
   }
 
   /* Send the USER command */
-  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s",
+  result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "USER %s",
                          conn->user ? conn->user : "");
   if(!result)
-    state(conn, POP3_USER);
+    state(data, POP3_USER);
 
   return result;
 }
@@ -409,7 +422,8 @@
  *
  * Sends an APOP command to authenticate with.
  */
-static CURLcode pop3_perform_apop(struct connectdata *conn)
+static CURLcode pop3_perform_apop(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
@@ -421,7 +435,7 @@
   /* Check we have a username and password to authenticate with and end the
      connect phase if we don't */
   if(!conn->bits.user_passwd) {
-    state(conn, POP3_STOP);
+    state(data, POP3_STOP);
 
     return result;
   }
@@ -444,10 +458,10 @@
   for(i = 0; i < MD5_DIGEST_LEN; i++)
     msnprintf(&secret[2 * i], 3, "%02x", digest[i]);
 
-  result = Curl_pp_sendf(&pop3c->pp, "APOP %s %s", conn->user, secret);
+  result = Curl_pp_sendf(data, &pop3c->pp, "APOP %s %s", conn->user, secret);
 
   if(!result)
-    state(conn, POP3_APOP);
+    state(data, POP3_APOP);
 
   return result;
 }
@@ -460,7 +474,8 @@
  * Sends an AUTH command allowing the client to login with the given SASL
  * authentication mechanism.
  */
-static CURLcode pop3_perform_auth(struct connectdata *conn,
+static CURLcode pop3_perform_auth(struct Curl_easy *data,
+                                  struct connectdata *conn,
                                   const char *mech,
                                   const char *initresp)
 {
@@ -469,11 +484,11 @@
 
   if(initresp) {                                  /* AUTH <mech> ...<crlf> */
     /* Send the AUTH command with the initial response */
-    result = Curl_pp_sendf(&pop3c->pp, "AUTH %s %s", mech, initresp);
+    result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s %s", mech, initresp);
   }
   else {
     /* Send the AUTH command */
-    result = Curl_pp_sendf(&pop3c->pp, "AUTH %s", mech);
+    result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s", mech);
   }
 
   return result;
@@ -485,12 +500,13 @@
  *
  * Sends SASL continuation data or cancellation.
  */
-static CURLcode pop3_continue_auth(struct connectdata *conn,
+static CURLcode pop3_continue_auth(struct Curl_easy *data,
+                                   struct connectdata *conn,
                                    const char *resp)
 {
   struct pop3_conn *pop3c = &conn->proto.pop3c;
 
-  return Curl_pp_sendf(&pop3c->pp, "%s", resp);
+  return Curl_pp_sendf(data, &pop3c->pp, "%s", resp);
 }
 
 /***********************************************************************
@@ -501,7 +517,8 @@
  * authentication mechanism, falling back to APOP and clear text should a
  * common mechanism not be available between the client and server.
  */
-static CURLcode pop3_perform_authentication(struct connectdata *conn)
+static CURLcode pop3_perform_authentication(struct Curl_easy *data,
+                                            struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
@@ -510,32 +527,32 @@
   /* Check we have enough data to authenticate with and end the
      connect phase if we don't */
   if(!Curl_sasl_can_authenticate(&pop3c->sasl, conn)) {
-    state(conn, POP3_STOP);
+    state(data, POP3_STOP);
     return result;
   }
 
   if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) {
     /* Calculate the SASL login details */
-    result = Curl_sasl_start(&pop3c->sasl, conn, FALSE, &progress);
+    result = Curl_sasl_start(&pop3c->sasl, data, conn, FALSE, &progress);
 
     if(!result)
       if(progress == SASL_INPROGRESS)
-        state(conn, POP3_AUTH);
+        state(data, POP3_AUTH);
   }
 
   if(!result && progress == SASL_IDLE) {
 #ifndef CURL_DISABLE_CRYPTO_AUTH
     if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
       /* Perform APOP authentication */
-      result = pop3_perform_apop(conn);
+      result = pop3_perform_apop(data, conn);
     else
 #endif
     if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
       /* Perform clear text authentication */
-      result = pop3_perform_user(conn);
+      result = pop3_perform_user(data, conn);
     else {
       /* Other mechanisms not supported */
-      infof(conn->data, "No known authentication mechanisms supported!\n");
+      infof(data, "No known authentication mechanisms supported!");
       result = CURLE_LOGIN_DENIED;
     }
   }
@@ -549,36 +566,36 @@
  *
  * Sends a POP3 based command.
  */
-static CURLcode pop3_perform_command(struct connectdata *conn)
+static CURLcode pop3_perform_command(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct POP3 *pop3 = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct POP3 *pop3 = data->req.p.pop3;
   const char *command = NULL;
 
   /* Calculate the default command */
-  if(pop3->id[0] == '\0' || conn->data->set.ftp_list_only) {
+  if(pop3->id[0] == '\0' || data->set.list_only) {
     command = "LIST";
 
     if(pop3->id[0] != '\0')
       /* Message specific LIST so skip the BODY transfer */
-      pop3->transfer = FTPTRANSFER_INFO;
+      pop3->transfer = PPTRANSFER_INFO;
   }
   else
     command = "RETR";
 
   /* Send the command */
   if(pop3->id[0] != '\0')
-    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s %s",
+    result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s %s",
                            (pop3->custom && pop3->custom[0] != '\0' ?
                             pop3->custom : command), pop3->id);
   else
-    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s",
+    result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s",
                            (pop3->custom && pop3->custom[0] != '\0' ?
                             pop3->custom : command));
 
   if(!result)
-    state(conn, POP3_COMMAND);
+    state(data, POP3_COMMAND);
 
   return result;
 }
@@ -589,24 +606,25 @@
  *
  * Performs the quit action prior to sclose() be called.
  */
-static CURLcode pop3_perform_quit(struct connectdata *conn)
+static CURLcode pop3_perform_quit(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   /* Send the QUIT command */
-  CURLcode result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "QUIT");
+  CURLcode result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", "QUIT");
 
   if(!result)
-    state(conn, POP3_QUIT);
+    state(data, POP3_QUIT);
 
   return result;
 }
 
 /* For the initial server greeting */
-static CURLcode pop3_state_servergreet_resp(struct connectdata *conn,
+static CURLcode pop3_state_servergreet_resp(struct Curl_easy *data,
                                             int pop3code,
                                             pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   const char *line = data->state.buffer;
   size_t len = strlen(line);
@@ -654,18 +672,18 @@
       }
     }
 
-    result = pop3_perform_capa(conn);
+    result = pop3_perform_capa(data, conn);
   }
 
   return result;
 }
 
 /* For CAPA responses */
-static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code,
+static CURLcode pop3_state_capa_resp(struct Curl_easy *data, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   const char *line = data->state.buffer;
   size_t len = strlen(line);
@@ -694,7 +712,7 @@
       for(;;) {
         size_t llen;
         size_t wordlen;
-        unsigned int mechbit;
+        unsigned short mechbit;
 
         while(len &&
               (*line == ' ' || *line == '\t' ||
@@ -728,36 +746,35 @@
       /* We don't have a SSL/TLS connection yet, but SSL is requested */
       if(pop3c->tls_supported)
         /* Switch to TLS connection now */
-        result = pop3_perform_starttls(conn);
+        result = pop3_perform_starttls(data, conn);
       else if(data->set.use_ssl == CURLUSESSL_TRY)
         /* Fallback and carry on with authentication */
-        result = pop3_perform_authentication(conn);
+        result = pop3_perform_authentication(data, conn);
       else {
         failf(data, "STLS not supported.");
         result = CURLE_USE_SSL_FAILED;
       }
     }
     else
-      result = pop3_perform_authentication(conn);
+      result = pop3_perform_authentication(data, conn);
   }
   else {
     /* Clear text is supported when CAPA isn't recognised */
     pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
 
-    result = pop3_perform_authentication(conn);
+    result = pop3_perform_authentication(data, conn);
   }
 
   return result;
 }
 
 /* For STARTTLS responses */
-static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
+static CURLcode pop3_state_starttls_resp(struct Curl_easy *data,
+                                         struct connectdata *conn,
                                          int pop3code,
                                          pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(pop3code != '+') {
@@ -766,42 +783,42 @@
       result = CURLE_USE_SSL_FAILED;
     }
     else
-      result = pop3_perform_authentication(conn);
+      result = pop3_perform_authentication(data, conn);
   }
   else
-    result = pop3_perform_upgrade_tls(conn);
+    result = pop3_perform_upgrade_tls(data, conn);
 
   return result;
 }
 
 /* For SASL authentication responses */
-static CURLcode pop3_state_auth_resp(struct connectdata *conn,
+static CURLcode pop3_state_auth_resp(struct Curl_easy *data,
                                      int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   saslprogress progress;
 
   (void)instate; /* no use for this yet */
 
-  result = Curl_sasl_continue(&pop3c->sasl, conn, pop3code, &progress);
+  result = Curl_sasl_continue(&pop3c->sasl, data, conn, pop3code, &progress);
   if(!result)
     switch(progress) {
     case SASL_DONE:
-      state(conn, POP3_STOP);  /* Authenticated */
+      state(data, POP3_STOP);  /* Authenticated */
       break;
     case SASL_IDLE:            /* No mechanism left after cancellation */
 #ifndef CURL_DISABLE_CRYPTO_AUTH
       if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
         /* Perform APOP authentication */
-        result = pop3_perform_apop(conn);
+        result = pop3_perform_apop(data, conn);
       else
 #endif
       if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
         /* Perform clear text authentication */
-        result = pop3_perform_user(conn);
+        result = pop3_perform_user(data, conn);
       else {
         failf(data, "Authentication cancelled");
         result = CURLE_LOGIN_DENIED;
@@ -816,12 +833,10 @@
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
 /* For APOP responses */
-static CURLcode pop3_state_apop_resp(struct connectdata *conn, int pop3code,
+static CURLcode pop3_state_apop_resp(struct Curl_easy *data, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(pop3code != '+') {
@@ -830,19 +845,18 @@
   }
   else
     /* End of connect phase */
-    state(conn, POP3_STOP);
+    state(data, POP3_STOP);
 
   return result;
 }
 #endif
 
 /* For USER responses */
-static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code,
+static CURLcode pop3_state_user_resp(struct Curl_easy *data, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
+  struct connectdata *conn = data->conn;
   (void)instate; /* no use for this yet */
 
   if(pop3code != '+') {
@@ -851,21 +865,19 @@
   }
   else
     /* Send the PASS command */
-    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
+    result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "PASS %s",
                            conn->passwd ? conn->passwd : "");
   if(!result)
-    state(conn, POP3_PASS);
+    state(data, POP3_PASS);
 
   return result;
 }
 
 /* For PASS responses */
-static CURLcode pop3_state_pass_resp(struct connectdata *conn, int pop3code,
+static CURLcode pop3_state_pass_resp(struct Curl_easy *data, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(pop3code != '+') {
@@ -874,26 +886,26 @@
   }
   else
     /* End of connect phase */
-    state(conn, POP3_STOP);
+    state(data, POP3_STOP);
 
   return result;
 }
 
 /* For command responses */
-static CURLcode pop3_state_command_resp(struct connectdata *conn,
+static CURLcode pop3_state_command_resp(struct Curl_easy *data,
                                         int pop3code,
                                         pop3state instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct POP3 *pop3 = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct POP3 *pop3 = data->req.p.pop3;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   struct pingpong *pp = &pop3c->pp;
 
   (void)instate; /* no use for this yet */
 
   if(pop3code != '+') {
-    state(conn, POP3_STOP);
+    state(data, POP3_STOP);
     return CURLE_RECV_ERROR;
   }
 
@@ -907,7 +919,7 @@
      the strip counter here so that these bytes won't be delivered. */
   pop3c->strip = 2;
 
-  if(pop3->transfer == FTPTRANSFER_BODY) {
+  if(pop3->transfer == PPTRANSFER_BODY) {
     /* POP3 download */
     Curl_setup_transfer(data, FIRSTSOCKET, -1, FALSE, -1);
 
@@ -917,7 +929,7 @@
          "headers" after the body */
 
       if(!data->set.opt_no_body) {
-        result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
+        result = Curl_pop3_write(data, pp->cache, pp->cache_size);
         if(result)
           return result;
       }
@@ -931,12 +943,13 @@
   }
 
   /* End of DO phase */
-  state(conn, POP3_STOP);
+  state(data, POP3_STOP);
 
   return result;
 }
 
-static CURLcode pop3_statemach_act(struct connectdata *conn)
+static CURLcode pop3_statemachine(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
@@ -944,20 +957,21 @@
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   struct pingpong *pp = &pop3c->pp;
   size_t nread = 0;
+  (void)data;
 
   /* Busy upgrading the connection; right now all I/O is SSL/TLS, not POP3 */
   if(pop3c->state == POP3_UPGRADETLS)
-    return pop3_perform_upgrade_tls(conn);
+    return pop3_perform_upgrade_tls(data, conn);
 
   /* Flush any data that needs to be sent */
   if(pp->sendleft)
-    return Curl_pp_flushsend(pp);
+    return Curl_pp_flushsend(data, pp);
 
  do {
     /* Read the response from the server */
-    result = Curl_pp_readresp(sock, pp, &pop3code, &nread);
-    if(result)
-      return result;
+   result = Curl_pp_readresp(data, sock, pp, &pop3code, &nread);
+   if(result)
+     return result;
 
     if(!pop3code)
       break;
@@ -965,44 +979,44 @@
     /* We have now received a full POP3 server response */
     switch(pop3c->state) {
     case POP3_SERVERGREET:
-      result = pop3_state_servergreet_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_servergreet_resp(data, pop3code, pop3c->state);
       break;
 
     case POP3_CAPA:
-      result = pop3_state_capa_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_capa_resp(data, pop3code, pop3c->state);
       break;
 
     case POP3_STARTTLS:
-      result = pop3_state_starttls_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_starttls_resp(data, conn, pop3code, pop3c->state);
       break;
 
     case POP3_AUTH:
-      result = pop3_state_auth_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_auth_resp(data, pop3code, pop3c->state);
       break;
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
     case POP3_APOP:
-      result = pop3_state_apop_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_apop_resp(data, pop3code, pop3c->state);
       break;
 #endif
 
     case POP3_USER:
-      result = pop3_state_user_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_user_resp(data, pop3code, pop3c->state);
       break;
 
     case POP3_PASS:
-      result = pop3_state_pass_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_pass_resp(data, pop3code, pop3c->state);
       break;
 
     case POP3_COMMAND:
-      result = pop3_state_command_resp(conn, pop3code, pop3c->state);
+      result = pop3_state_command_resp(data, pop3code, pop3c->state);
       break;
 
     case POP3_QUIT:
       /* fallthrough, just stop! */
     default:
       /* internal error */
-      state(conn, POP3_STOP);
+      state(data, POP3_STOP);
       break;
     }
   } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp));
@@ -1011,44 +1025,46 @@
 }
 
 /* Called repeatedly until done from multi.c */
-static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done)
+static CURLcode pop3_multi_statemach(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
 
   if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) {
-    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
+    result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                          FIRSTSOCKET, &pop3c->ssldone);
     if(result || !pop3c->ssldone)
       return result;
   }
 
-  result = Curl_pp_statemach(&pop3c->pp, FALSE, FALSE);
+  result = Curl_pp_statemach(data, &pop3c->pp, FALSE, FALSE);
   *done = (pop3c->state == POP3_STOP) ? TRUE : FALSE;
 
   return result;
 }
 
-static CURLcode pop3_block_statemach(struct connectdata *conn,
+static CURLcode pop3_block_statemach(struct Curl_easy *data,
+                                     struct connectdata *conn,
                                      bool disconnecting)
 {
   CURLcode result = CURLE_OK;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
 
   while(pop3c->state != POP3_STOP && !result)
-    result = Curl_pp_statemach(&pop3c->pp, TRUE, disconnecting);
+    result = Curl_pp_statemach(data, &pop3c->pp, TRUE, disconnecting);
 
   return result;
 }
 
 /* Allocate and initialize the POP3 struct for the current Curl_easy if
    required */
-static CURLcode pop3_init(struct connectdata *conn)
+static CURLcode pop3_init(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct POP3 *pop3;
 
-  pop3 = data->req.protop = calloc(sizeof(struct POP3), 1);
+  pop3 = data->req.p.pop3 = calloc(sizeof(struct POP3), 1);
   if(!pop3)
     result = CURLE_OUT_OF_MEMORY;
 
@@ -1056,9 +1072,10 @@
 }
 
 /* For the POP3 "protocol connect" and "doing" phases only */
-static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int pop3_getsock(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks)
 {
-  return Curl_pp_getsock(&conn->proto.pop3c.pp, socks);
+  return Curl_pp_getsock(data, &conn->proto.pop3c.pp, socks);
 }
 
 /***********************************************************************
@@ -1071,9 +1088,10 @@
  * The variable 'done' points to will be TRUE if the protocol-layer connect
  * phase is done when this function returns, or FALSE if not.
  */
-static CURLcode pop3_connect(struct connectdata *conn, bool *done)
+static CURLcode pop3_connect(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   struct pingpong *pp = &pop3c->pp;
 
@@ -1082,11 +1100,7 @@
   /* We always support persistent connections in POP3 */
   connkeep(conn, "POP3 default");
 
-  /* Set the default response time-out */
-  pp->response_time = RESP_TIMEOUT;
-  pp->statemach_act = pop3_statemach_act;
-  pp->endofresp = pop3_endofresp;
-  pp->conn = conn;
+  PINGPONG_SETUP(pp, pop3_statemachine, pop3_endofresp);
 
   /* Set the default preferred authentication type and mechanism */
   pop3c->preftype = POP3_TYPE_ANY;
@@ -1094,7 +1108,7 @@
 
   /* Initialise the pingpong layer */
   Curl_pp_setup(pp);
-  Curl_pp_init(pp);
+  Curl_pp_init(data, pp);
 
   /* Parse the URL options */
   result = pop3_parse_url_options(conn);
@@ -1102,9 +1116,9 @@
     return result;
 
   /* Start off waiting for the server greeting response */
-  state(conn, POP3_SERVERGREET);
+  state(data, POP3_SERVERGREET);
 
-  result = pop3_multi_statemach(conn, done);
+  result = pop3_multi_statemach(data, done);
 
   return result;
 }
@@ -1118,12 +1132,11 @@
  *
  * Input argument is already checked for validity.
  */
-static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
+static CURLcode pop3_done(struct Curl_easy *data, CURLcode status,
                           bool premature)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct POP3 *pop3 = data->req.protop;
+  struct POP3 *pop3 = data->req.p.pop3;
 
   (void)premature;
 
@@ -1131,7 +1144,7 @@
     return CURLE_OK;
 
   if(status) {
-    connclose(conn, "POP3 done with bad status");
+    connclose(data->conn, "POP3 done with bad status");
     result = status;         /* use the already set error code */
   }
 
@@ -1140,7 +1153,7 @@
   Curl_safefree(pop3->custom);
 
   /* Clear the transfer mode for the next request */
-  pop3->transfer = FTPTRANSFER_BODY;
+  pop3->transfer = PPTRANSFER_BODY;
 
   return result;
 }
@@ -1152,34 +1165,34 @@
  * This is the actual DO function for POP3. Get a message/listing according to
  * the options previously setup.
  */
-static CURLcode pop3_perform(struct connectdata *conn, bool *connected,
+static CURLcode pop3_perform(struct Curl_easy *data, bool *connected,
                              bool *dophase_done)
 {
   /* This is POP3 and no proxy */
   CURLcode result = CURLE_OK;
-  struct POP3 *pop3 = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct POP3 *pop3 = data->req.p.pop3;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
-  if(conn->data->set.opt_no_body) {
+  if(data->set.opt_no_body) {
     /* Requested no body means no transfer */
-    pop3->transfer = FTPTRANSFER_INFO;
+    pop3->transfer = PPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
 
   /* Start the first command in the DO phase */
-  result = pop3_perform_command(conn);
+  result = pop3_perform_command(data);
   if(result)
     return result;
 
   /* Run the state-machine */
-  result = pop3_multi_statemach(conn, dophase_done);
-
+  result = pop3_multi_statemach(data, dophase_done);
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done)
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
 
   return result;
 }
@@ -1193,23 +1206,22 @@
  *
  * The input argument is already checked for validity.
  */
-static CURLcode pop3_do(struct connectdata *conn, bool *done)
+static CURLcode pop3_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
-
   *done = FALSE; /* default to false */
 
   /* Parse the URL path */
-  result = pop3_parse_url_path(conn);
+  result = pop3_parse_url_path(data);
   if(result)
     return result;
 
   /* Parse the custom request */
-  result = pop3_parse_custom_request(conn);
+  result = pop3_parse_custom_request(data);
   if(result)
     return result;
 
-  result = pop3_regular_transfer(conn, done);
+  result = pop3_regular_transfer(data, done);
 
   return result;
 }
@@ -1221,19 +1233,20 @@
  * Disconnect from an POP3 server. Cleanup protocol-specific per-connection
  * resources. BLOCKING.
  */
-static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode pop3_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead_connection)
 {
   struct pop3_conn *pop3c = &conn->proto.pop3c;
+  (void)data;
 
   /* We cannot send quit unconditionally. If this connection is stale or
      bad in any way, sending quit and waiting around here will make the
      disconnect wait in vain and cause more problems than we need to. */
 
-  /* The POP3 session may or may not have been allocated/setup at this
-     point! */
-  if(!dead_connection && pop3c->pp.conn && pop3c->pp.conn->bits.protoconnstart)
-    if(!pop3_perform_quit(conn))
-      (void)pop3_block_statemach(conn, TRUE); /* ignore errors on QUIT */
+  if(!dead_connection && conn->bits.protoconnstart) {
+    if(!pop3_perform_quit(data, conn))
+      (void)pop3_block_statemach(data, conn, TRUE); /* ignore errors on QUIT */
+  }
 
   /* Disconnect from the server */
   Curl_pp_disconnect(&pop3c->pp);
@@ -1248,25 +1261,25 @@
 }
 
 /* Call this when the DO phase has completed */
-static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected)
+static CURLcode pop3_dophase_done(struct Curl_easy *data, bool connected)
 {
-  (void)conn;
+  (void)data;
   (void)connected;
 
   return CURLE_OK;
 }
 
 /* Called from multi.c while DOing */
-static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done)
+static CURLcode pop3_doing(struct Curl_easy *data, bool *dophase_done)
 {
-  CURLcode result = pop3_multi_statemach(conn, dophase_done);
+  CURLcode result = pop3_multi_statemach(data, dophase_done);
 
   if(result)
-    DEBUGF(infof(conn->data, "DO phase failed\n"));
+    DEBUGF(infof(data, "DO phase failed"));
   else if(*dophase_done) {
-    result = pop3_dophase_done(conn, FALSE /* not connected */);
+    result = pop3_dophase_done(data, FALSE /* not connected */);
 
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
@@ -1281,12 +1294,11 @@
  * Performs all commands done before a regular transfer between a local and a
  * remote host.
  */
-static CURLcode pop3_regular_transfer(struct connectdata *conn,
+static CURLcode pop3_regular_transfer(struct Curl_easy *data,
                                       bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
   bool connected = FALSE;
-  struct Curl_easy *data = conn->data;
 
   /* Make sure size is unknown at this point */
   data->req.size = -1;
@@ -1298,19 +1310,20 @@
   Curl_pgrsSetDownloadSize(data, -1);
 
   /* Carry out the perform */
-  result = pop3_perform(conn, &connected, dophase_done);
+  result = pop3_perform(data, &connected, dophase_done);
 
   /* Perform post DO phase operations if necessary */
   if(!result && *dophase_done)
-    result = pop3_dophase_done(conn, connected);
+    result = pop3_dophase_done(data, connected);
 
   return result;
 }
 
-static CURLcode pop3_setup_connection(struct connectdata *conn)
+static CURLcode pop3_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   /* Initialise the POP3 layer */
-  CURLcode result = pop3_init(conn);
+  CURLcode result = pop3_init(data);
   if(result)
     return result;
 
@@ -1385,11 +1398,10 @@
  *
  * Parse the URL path into separate path components.
  */
-static CURLcode pop3_parse_url_path(struct connectdata *conn)
+static CURLcode pop3_parse_url_path(struct Curl_easy *data)
 {
   /* The POP3 struct is already initialised in pop3_connect() */
-  struct Curl_easy *data = conn->data;
-  struct POP3 *pop3 = data->req.protop;
+  struct POP3 *pop3 = data->req.p.pop3;
   const char *path = &data->state.up.path[1]; /* skip leading path */
 
   /* URL decode the path for the message ID */
@@ -1402,11 +1414,10 @@
  *
  * Parse the custom request.
  */
-static CURLcode pop3_parse_custom_request(struct connectdata *conn)
+static CURLcode pop3_parse_custom_request(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct POP3 *pop3 = data->req.protop;
+  struct POP3 *pop3 = data->req.p.pop3;
   const char *custom = data->set.str[STRING_CUSTOMREQUEST];
 
   /* URL decode the custom request */
@@ -1423,13 +1434,12 @@
  * This function scans the body after the end-of-body and writes everything
  * until the end is found.
  */
-CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread)
+CURLcode Curl_pop3_write(struct Curl_easy *data, char *str, size_t nread)
 {
   /* This code could be made into a special function in the handler struct */
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct SingleRequest *k = &data->req;
-
+  struct connectdata *conn = data->conn;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   bool strip_dot = FALSE;
   size_t last = 0;
@@ -1450,7 +1460,7 @@
 
         if(i) {
           /* Write out the body part that didn't match */
-          result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last],
+          result = Curl_client_write(data, CLIENTWRITE_BODY, &str[last],
                                      i - last);
 
           if(result)
@@ -1508,8 +1518,17 @@
       if(prev) {
         /* If the partial match was the CRLF and dot then only write the CRLF
            as the server would have inserted the dot */
-        result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)POP3_EOB,
-                                   strip_dot ? prev - 1 : prev);
+        if(strip_dot && prev - 1 > 0) {
+          result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
+                                     prev - 1);
+        }
+        else if(!strip_dot) {
+          result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB,
+                                     prev);
+        }
+        else {
+          result = CURLE_OK;
+        }
 
         if(result)
           return result;
@@ -1524,7 +1543,7 @@
     /* We have a full match so the transfer is done, however we must transfer
     the CRLF at the start of the EOB as this is considered to be part of the
     message as per RFC-1939, sect. 3 */
-    result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)POP3_EOB, 2);
+    result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)POP3_EOB, 2);
 
     k->keepon &= ~KEEP_RECV;
     pop3c->eob = 0;
@@ -1537,7 +1556,7 @@
     return CURLE_OK;
 
   if(nread - last) {
-    result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last],
+    result = Curl_client_write(data, CLIENTWRITE_BODY, &str[last],
                                nread - last);
   }
 
diff --git a/lib/pop3.h b/lib/pop3.h
index 3ba7999..17629ee 100644
--- a/lib/pop3.h
+++ b/lib/pop3.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -61,6 +61,7 @@
   struct pingpong pp;
   pop3state state;        /* Always use pop3.c:state() to change state! */
   bool ssldone;           /* Is connect() over SSL done? */
+  bool tls_supported;     /* StartTLS capability supported by server */
   size_t eob;             /* Number of bytes of the EOB (End Of Body) that
                              have been received so far */
   size_t strip;           /* Number of bytes from the start to ignore as
@@ -69,7 +70,6 @@
   unsigned int authtypes; /* Accepted authentication types */
   unsigned int preftype;  /* Preferred authentication type */
   char *apoptimestamp;    /* APOP timestamp from the server greeting */
-  bool tls_supported;     /* StartTLS capability supported by server */
 };
 
 extern const struct Curl_handler Curl_handler_pop3;
@@ -90,6 +90,6 @@
 
 /* This function scans the body after the end-of-body and writes everything
  * until the end is found */
-CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread);
+CURLcode Curl_pop3_write(struct Curl_easy *data, char *str, size_t nread);
 
 #endif /* HEADER_CURL_POP3_H */
diff --git a/lib/progress.c b/lib/progress.c
index eced74c..4bcd615 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -85,7 +85,7 @@
               CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
               (bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
 
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
+#if (SIZEOF_CURL_OFF_T > 4)
 
   else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
     /* 'XXXXM' is good until we're at 10000MB or above */
@@ -137,12 +137,11 @@
 
 */
 
-int Curl_pgrsDone(struct connectdata *conn)
+int Curl_pgrsDone(struct Curl_easy *data)
 {
   int rc;
-  struct Curl_easy *data = conn->data;
   data->progress.lastshow = 0;
-  rc = Curl_pgrsUpdate(conn); /* the final (forced) update */
+  rc = Curl_pgrsUpdate(data); /* the final (forced) update */
   if(rc)
     return rc;
 
@@ -240,10 +239,10 @@
   data->progress.speeder_c = 0; /* reset the progress meter display */
   data->progress.start = Curl_now();
   data->progress.is_t_startransfer_set = false;
-  data->progress.ul_limit_start.tv_sec = 0;
-  data->progress.ul_limit_start.tv_usec = 0;
-  data->progress.dl_limit_start.tv_sec = 0;
-  data->progress.dl_limit_start.tv_usec = 0;
+  data->progress.ul_limit_start = data->progress.start;
+  data->progress.dl_limit_start = data->progress.start;
+  data->progress.ul_limit_size = 0;
+  data->progress.dl_limit_size = 0;
   data->progress.downloaded = 0;
   data->progress.uploaded = 0;
   /* clear all bits except HIDE and HEADERS_OUT */
@@ -324,14 +323,14 @@
 void Curl_ratelimit(struct Curl_easy *data, struct curltime now)
 {
   /* don't set a new stamp unless the time since last update is long enough */
-  if(data->set.max_recv_speed > 0) {
+  if(data->set.max_recv_speed) {
     if(Curl_timediff(now, data->progress.dl_limit_start) >=
        MIN_RATE_LIMIT_PERIOD) {
       data->progress.dl_limit_start = now;
       data->progress.dl_limit_size = data->progress.downloaded;
     }
   }
-  if(data->set.max_send_speed > 0) {
+  if(data->set.max_send_speed) {
     if(Curl_timediff(now, data->progress.ul_limit_start) >=
        MIN_RATE_LIMIT_PERIOD) {
       data->progress.ul_limit_start = now;
@@ -372,104 +371,90 @@
   }
 }
 
-/* returns TRUE if it's time to show the progress meter */
-static bool progress_calc(struct connectdata *conn, struct curltime now)
+/* returns the average speed in bytes / second */
+static curl_off_t trspeed(curl_off_t size, /* number of bytes */
+                          curl_off_t us)   /* microseconds */
 {
-  curl_off_t timespent;
-  curl_off_t timespent_ms; /* milliseconds */
-  struct Curl_easy *data = conn->data;
-  curl_off_t dl = data->progress.downloaded;
-  curl_off_t ul = data->progress.uploaded;
+  if(us < 1)
+    return size * 1000000;
+  return (curl_off_t)((long double)size/us * 1000000);
+}
+
+/* returns TRUE if it's time to show the progress meter */
+static bool progress_calc(struct Curl_easy *data, struct curltime now)
+{
   bool timetoshow = FALSE;
+  struct Progress * const p = &data->progress;
 
-  /* The time spent so far (from the start) */
-  data->progress.timespent = Curl_timediff_us(now, data->progress.start);
-  timespent = (curl_off_t)data->progress.timespent/1000000; /* seconds */
-  timespent_ms = (curl_off_t)data->progress.timespent/1000; /* ms */
-
-  /* The average download speed this far */
-  if(dl < CURL_OFF_T_MAX/1000)
-    data->progress.dlspeed = (dl * 1000 / (timespent_ms>0?timespent_ms:1));
-  else
-    data->progress.dlspeed = (dl / (timespent>0?timespent:1));
-
-  /* The average upload speed this far */
-  if(ul < CURL_OFF_T_MAX/1000)
-    data->progress.ulspeed = (ul * 1000 / (timespent_ms>0?timespent_ms:1));
-  else
-    data->progress.ulspeed = (ul / (timespent>0?timespent:1));
+  /* The time spent so far (from the start) in microseconds */
+  p->timespent = Curl_timediff_us(now, p->start);
+  p->dlspeed = trspeed(p->downloaded, p->timespent);
+  p->ulspeed = trspeed(p->uploaded, p->timespent);
 
   /* Calculations done at most once a second, unless end is reached */
-  if(data->progress.lastshow != now.tv_sec) {
+  if(p->lastshow != now.tv_sec) {
     int countindex; /* amount of seconds stored in the speeder array */
-    int nowindex = data->progress.speeder_c% CURR_TIME;
-    data->progress.lastshow = now.tv_sec;
+    int nowindex = p->speeder_c% CURR_TIME;
+    p->lastshow = now.tv_sec;
     timetoshow = TRUE;
 
     /* Let's do the "current speed" thing, with the dl + ul speeds
        combined. Store the speed at entry 'nowindex'. */
-    data->progress.speeder[ nowindex ] =
-      data->progress.downloaded + data->progress.uploaded;
+    p->speeder[ nowindex ] = p->downloaded + p->uploaded;
 
     /* remember the exact time for this moment */
-    data->progress.speeder_time [ nowindex ] = now;
+    p->speeder_time [ nowindex ] = now;
 
     /* advance our speeder_c counter, which is increased every time we get
        here and we expect it to never wrap as 2^32 is a lot of seconds! */
-    data->progress.speeder_c++;
+    p->speeder_c++;
 
     /* figure out how many index entries of data we have stored in our speeder
        array. With N_ENTRIES filled in, we have about N_ENTRIES-1 seconds of
        transfer. Imagine, after one second we have filled in two entries,
        after two seconds we've filled in three entries etc. */
-    countindex = ((data->progress.speeder_c >= CURR_TIME)?
-                  CURR_TIME:data->progress.speeder_c) - 1;
+    countindex = ((p->speeder_c >= CURR_TIME)? CURR_TIME:p->speeder_c) - 1;
 
     /* first of all, we don't do this if there's no counted seconds yet */
     if(countindex) {
       int checkindex;
       timediff_t span_ms;
+      curl_off_t amount;
 
       /* Get the index position to compare with the 'nowindex' position.
          Get the oldest entry possible. While we have less than CURR_TIME
          entries, the first entry will remain the oldest. */
-      checkindex = (data->progress.speeder_c >= CURR_TIME)?
-        data->progress.speeder_c%CURR_TIME:0;
+      checkindex = (p->speeder_c >= CURR_TIME)? p->speeder_c%CURR_TIME:0;
 
       /* Figure out the exact time for the time span */
-      span_ms = Curl_timediff(now, data->progress.speeder_time[checkindex]);
+      span_ms = Curl_timediff(now, p->speeder_time[checkindex]);
       if(0 == span_ms)
         span_ms = 1; /* at least one millisecond MUST have passed */
 
       /* Calculate the average speed the last 'span_ms' milliseconds */
-      {
-        curl_off_t amount = data->progress.speeder[nowindex]-
-          data->progress.speeder[checkindex];
+      amount = p->speeder[nowindex]- p->speeder[checkindex];
 
-        if(amount > CURL_OFF_T_C(4294967) /* 0xffffffff/1000 */)
-          /* the 'amount' value is bigger than would fit in 32 bits if
-             multiplied with 1000, so we use the double math for this */
-          data->progress.current_speed = (curl_off_t)
-            ((double)amount/((double)span_ms/1000.0));
-        else
-          /* the 'amount' value is small enough to fit within 32 bits even
-             when multiplied with 1000 */
-          data->progress.current_speed = amount*CURL_OFF_T_C(1000)/span_ms;
-      }
+      if(amount > CURL_OFF_T_C(4294967) /* 0xffffffff/1000 */)
+        /* the 'amount' value is bigger than would fit in 32 bits if
+           multiplied with 1000, so we use the double math for this */
+        p->current_speed = (curl_off_t)
+          ((double)amount/((double)span_ms/1000.0));
+      else
+        /* the 'amount' value is small enough to fit within 32 bits even
+           when multiplied with 1000 */
+        p->current_speed = amount*CURL_OFF_T_C(1000)/span_ms;
     }
     else
       /* the first second we use the average */
-      data->progress.current_speed =
-        data->progress.ulspeed + data->progress.dlspeed;
+      p->current_speed = p->ulspeed + p->dlspeed;
 
   } /* Calculations end */
   return timetoshow;
 }
 
 #ifndef CURL_DISABLE_PROGRESS_METER
-static void progress_meter(struct connectdata *conn)
+static void progress_meter(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
   char max5[6][10];
   curl_off_t dlpercen = 0;
   curl_off_t ulpercen = 0;
@@ -583,11 +568,10 @@
  * Curl_pgrsUpdate() returns 0 for success or the value returned by the
  * progress callback!
  */
-int Curl_pgrsUpdate(struct connectdata *conn)
+int Curl_pgrsUpdate(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
   struct curltime now = Curl_now(); /* what time is it */
-  bool showprogress = progress_calc(conn, now);
+  bool showprogress = progress_calc(data, now);
   if(!(data->progress.flags & PGRS_HIDE)) {
     if(data->set.fxferinfo) {
       int result;
@@ -623,7 +607,7 @@
     }
 
     if(showprogress)
-      progress_meter(conn);
+      progress_meter(data);
   }
 
   return 0;
diff --git a/lib/progress.h b/lib/progress.h
index c19d966..ac4ebc0 100644
--- a/lib/progress.h
+++ b/lib/progress.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -40,14 +40,14 @@
   TIMER_LAST /* must be last */
 } timerid;
 
-int Curl_pgrsDone(struct connectdata *);
+int Curl_pgrsDone(struct Curl_easy *data);
 void Curl_pgrsStartNow(struct Curl_easy *data);
 void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size);
 void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size);
 void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size);
 void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);
 void Curl_ratelimit(struct Curl_easy *data, struct curltime now);
-int Curl_pgrsUpdate(struct connectdata *);
+int Curl_pgrsUpdate(struct Curl_easy *data);
 void Curl_pgrsResetTransferSizes(struct Curl_easy *data);
 struct curltime Curl_pgrsTime(struct Curl_easy *data, timerid timer);
 timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize,
diff --git a/lib/psl.c b/lib/psl.c
index 568baff..e460918 100644
--- a/lib/psl.c
+++ b/lib/psl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/psl.h b/lib/psl.h
index e9f99d0..c103674 100644
--- a/lib/psl.h
+++ b/lib/psl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/quic.h b/lib/quic.h
index 8e7df90..b030359 100644
--- a/lib/quic.h
+++ b/lib/quic.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,25 +35,28 @@
 #include "urldata.h"
 
 /* functions provided by the specific backends */
-CURLcode Curl_quic_connect(struct connectdata *conn,
+CURLcode Curl_quic_connect(struct Curl_easy *data,
+                           struct connectdata *conn,
                            curl_socket_t sockfd,
                            int sockindex,
                            const struct sockaddr *addr,
                            socklen_t addrlen);
-CURLcode Curl_quic_is_connected(struct connectdata *conn,
-                                curl_socket_t sockfd,
+CURLcode Curl_quic_is_connected(struct Curl_easy *data,
+                                struct connectdata *conn,
+                                int sockindex,
                                 bool *connected);
-int Curl_quic_ver(char *p, size_t len);
-CURLcode Curl_quic_done_sending(struct connectdata *conn);
+void Curl_quic_ver(char *p, size_t len);
+CURLcode Curl_quic_done_sending(struct Curl_easy *data);
 void Curl_quic_done(struct Curl_easy *data, bool premature);
 bool Curl_quic_data_pending(const struct Curl_easy *data);
-void Curl_quic_disconnect(struct connectdata *conn, int tempindex);
+void Curl_quic_disconnect(struct Curl_easy *data,
+                          struct connectdata *conn, int tempindex);
 
 #else /* ENABLE_QUIC */
 #define Curl_quic_done_sending(x)
 #define Curl_quic_done(x,y)
 #define Curl_quic_data_pending(x)
-#define Curl_quic_disconnect(x,y)
+#define Curl_quic_disconnect(x,y,z)
 #endif /* !ENABLE_QUIC */
 
 #endif /* HEADER_CURL_QUIC_H */
diff --git a/lib/rand.c b/lib/rand.c
index c415048..8f2c1ba 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -87,7 +87,7 @@
 
   if(!seeded) {
     struct curltime now = Curl_now();
-    infof(data, "WARNING: Using weak random seed\n");
+    infof(data, "WARNING: Using weak random seed");
     randseed += (unsigned int)now.tv_usec + (unsigned int)now.tv_sec;
     randseed = randseed * 1103515245 + 12345;
     randseed = randseed * 1103515245 + 12345;
diff --git a/lib/rand.h b/lib/rand.h
index 3c8e2b8..02d95d8 100644
--- a/lib/rand.h
+++ b/lib/rand.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/rename.c b/lib/rename.c
index fe5f95d..f858d43 100644
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,8 +24,8 @@
 
 #include "curl_setup.h"
 
-#if (!defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)) ||  \
-  defined(USE_ALTSVC)
+#if (!defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_COOKIES)) || \
+  !defined(CURL_DISABLE_ALTSVC)
 
 #include "curl_multibyte.h"
 #include "timeval.h"
diff --git a/lib/rename.h b/lib/rename.h
index d7442c8..534f747 100644
--- a/lib/rename.h
+++ b/lib/rename.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/rtsp.c b/lib/rtsp.c
index 46c3c4f..30fefb9 100644
--- a/lib/rtsp.c
+++ b/lib/rtsp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -22,7 +22,7 @@
 
 #include "curl_setup.h"
 
-#ifndef CURL_DISABLE_RTSP
+#if !defined(CURL_DISABLE_RTSP) && !defined(USE_HYPER)
 
 #include "urldata.h"
 #include <curl/curl.h>
@@ -48,11 +48,13 @@
                              ((int)((unsigned char)((p)[3]))))
 
 /* protocol-specific functions set up to be called by the main engine */
-static CURLcode rtsp_do(struct connectdata *conn, bool *done);
-static CURLcode rtsp_done(struct connectdata *conn, CURLcode, bool premature);
-static CURLcode rtsp_connect(struct connectdata *conn, bool *done);
-static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead);
-static int rtsp_getsock_do(struct connectdata *conn, curl_socket_t *socks);
+static CURLcode rtsp_do(struct Curl_easy *data, bool *done);
+static CURLcode rtsp_done(struct Curl_easy *data, CURLcode, bool premature);
+static CURLcode rtsp_connect(struct Curl_easy *data, bool *done);
+static CURLcode rtsp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead);
+static int rtsp_getsock_do(struct Curl_easy *data,
+                           struct connectdata *conn, curl_socket_t *socks);
 
 /*
  * Parse and write out any available RTP data.
@@ -66,23 +68,26 @@
                                    ssize_t *nread,
                                    bool *readmore);
 
-static CURLcode rtsp_setup_connection(struct connectdata *conn);
-static unsigned int rtsp_conncheck(struct connectdata *check,
+static CURLcode rtsp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
+static unsigned int rtsp_conncheck(struct Curl_easy *data,
+                                   struct connectdata *check,
                                    unsigned int checks_to_perform);
 
 /* this returns the socket to wait for in the DO and DOING state for the multi
    interface and then we're always _sending_ a request and thus we wait for
    the single socket to become writable only */
-static int rtsp_getsock_do(struct connectdata *conn,
+static int rtsp_getsock_do(struct Curl_easy *data, struct connectdata *conn,
                            curl_socket_t *socks)
 {
   /* write mode */
+  (void)data;
   socks[0] = conn->sock[FIRSTSOCKET];
   return GETSOCK_WRITESOCK(0);
 }
 
 static
-CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len);
+CURLcode rtp_client_write(struct Curl_easy *data, char *ptr, size_t len);
 
 
 /*
@@ -104,6 +109,7 @@
   rtsp_disconnect,                      /* disconnect */
   rtsp_rtp_readwrite,                   /* readwrite */
   rtsp_conncheck,                       /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_RTSP,                            /* defport */
   CURLPROTO_RTSP,                       /* protocol */
   CURLPROTO_RTSP,                       /* family */
@@ -111,11 +117,13 @@
 };
 
 
-static CURLcode rtsp_setup_connection(struct connectdata *conn)
+static CURLcode rtsp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   struct RTSP *rtsp;
+  (void)conn;
 
-  conn->data->req.protop = rtsp = calloc(1, sizeof(struct RTSP));
+  data->req.p.rtsp = rtsp = calloc(1, sizeof(struct RTSP));
   if(!rtsp)
     return CURLE_OUT_OF_MEMORY;
 
@@ -156,13 +164,15 @@
 /*
  * Function to check on various aspects of a connection.
  */
-static unsigned int rtsp_conncheck(struct connectdata *check,
+static unsigned int rtsp_conncheck(struct Curl_easy *data,
+                                   struct connectdata *conn,
                                    unsigned int checks_to_perform)
 {
   unsigned int ret_val = CONNRESULT_NONE;
+  (void)data;
 
   if(checks_to_perform & CONNCHECK_ISDEAD) {
-    if(rtsp_connisdead(check))
+    if(rtsp_connisdead(conn))
       ret_val |= CONNRESULT_DEAD;
   }
 
@@ -170,12 +180,11 @@
 }
 
 
-static CURLcode rtsp_connect(struct connectdata *conn, bool *done)
+static CURLcode rtsp_connect(struct Curl_easy *data, bool *done)
 {
   CURLcode httpStatus;
-  struct Curl_easy *data = conn->data;
 
-  httpStatus = Curl_http_connect(conn, done);
+  httpStatus = Curl_http_connect(data, done);
 
   /* Initialize the CSeq if not already done */
   if(data->state.rtsp_next_client_CSeq == 0)
@@ -183,31 +192,32 @@
   if(data->state.rtsp_next_server_CSeq == 0)
     data->state.rtsp_next_server_CSeq = 1;
 
-  conn->proto.rtspc.rtp_channel = -1;
+  data->conn->proto.rtspc.rtp_channel = -1;
 
   return httpStatus;
 }
 
-static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead)
+static CURLcode rtsp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead)
 {
   (void) dead;
+  (void) data;
   Curl_safefree(conn->proto.rtspc.rtp_buf);
   return CURLE_OK;
 }
 
 
-static CURLcode rtsp_done(struct connectdata *conn,
+static CURLcode rtsp_done(struct Curl_easy *data,
                           CURLcode status, bool premature)
 {
-  struct Curl_easy *data = conn->data;
-  struct RTSP *rtsp = data->req.protop;
+  struct RTSP *rtsp = data->req.p.rtsp;
   CURLcode httpStatus;
 
   /* Bypass HTTP empty-reply checks on receive */
   if(data->set.rtspreq == RTSPREQ_RECEIVE)
     premature = TRUE;
 
-  httpStatus = Curl_http_done(conn, status, premature);
+  httpStatus = Curl_http_done(data, status, premature);
 
   if(rtsp) {
     /* Check the sequence numbers */
@@ -220,20 +230,20 @@
       return CURLE_RTSP_CSEQ_ERROR;
     }
     if(data->set.rtspreq == RTSPREQ_RECEIVE &&
-            (conn->proto.rtspc.rtp_channel == -1)) {
-      infof(data, "Got an RTP Receive with a CSeq of %ld\n", CSeq_recv);
+            (data->conn->proto.rtspc.rtp_channel == -1)) {
+      infof(data, "Got an RTP Receive with a CSeq of %ld", CSeq_recv);
     }
   }
 
   return httpStatus;
 }
 
-static CURLcode rtsp_do(struct connectdata *conn, bool *done)
+static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   CURLcode result = CURLE_OK;
   Curl_RtspReq rtspreq = data->set.rtspreq;
-  struct RTSP *rtsp = data->req.protop;
+  struct RTSP *rtsp = data->req.p.rtsp;
   struct dynbuf req_buffer;
   curl_off_t postsize = 0; /* for ANNOUNCE and SET_PARAMETER */
   curl_off_t putsize = 0; /* for ANNOUNCE and SET_PARAMETER */
@@ -330,7 +340,7 @@
   }
 
   /* Transport Header for SETUP requests */
-  p_transport = Curl_checkheaders(conn, "Transport");
+  p_transport = Curl_checkheaders(data, "Transport");
   if(rtspreq == RTSPREQ_SETUP && !p_transport) {
     /* New Transport: setting? */
     if(data->set.str[STRING_RTSP_TRANSPORT]) {
@@ -354,11 +364,11 @@
   /* Accept Headers for DESCRIBE requests */
   if(rtspreq == RTSPREQ_DESCRIBE) {
     /* Accept Header */
-    p_accept = Curl_checkheaders(conn, "Accept")?
+    p_accept = Curl_checkheaders(data, "Accept")?
       NULL:"Accept: application/sdp\r\n";
 
     /* Accept-Encoding header */
-    if(!Curl_checkheaders(conn, "Accept-Encoding") &&
+    if(!Curl_checkheaders(data, "Accept-Encoding") &&
        data->set.str[STRING_ENCODING]) {
       Curl_safefree(data->state.aptr.accept_encoding);
       data->state.aptr.accept_encoding =
@@ -375,17 +385,18 @@
      it might have been used in the proxy connect, but if we have got a header
      with the user-agent string specified, we erase the previously made string
      here. */
-  if(Curl_checkheaders(conn, "User-Agent") && data->state.aptr.uagent) {
+  if(Curl_checkheaders(data, "User-Agent") && data->state.aptr.uagent) {
     Curl_safefree(data->state.aptr.uagent);
     data->state.aptr.uagent = NULL;
   }
-  else if(!Curl_checkheaders(conn, "User-Agent") &&
+  else if(!Curl_checkheaders(data, "User-Agent") &&
           data->set.str[STRING_USERAGENT]) {
     p_uagent = data->state.aptr.uagent;
   }
 
   /* setup the authentication headers */
-  result = Curl_http_output_auth(conn, p_request, p_stream_uri, FALSE);
+  result = Curl_http_output_auth(data, conn, p_request, HTTPREQ_GET,
+                                 p_stream_uri, FALSE);
   if(result)
     return result;
 
@@ -394,8 +405,8 @@
 
   /* Referrer */
   Curl_safefree(data->state.aptr.ref);
-  if(data->change.referer && !Curl_checkheaders(conn, "Referer"))
-    data->state.aptr.ref = aprintf("Referer: %s\r\n", data->change.referer);
+  if(data->state.referer && !Curl_checkheaders(data, "Referer"))
+    data->state.aptr.ref = aprintf("Referer: %s\r\n", data->state.referer);
   else
     data->state.aptr.ref = NULL;
 
@@ -411,7 +422,7 @@
      (rtspreq  & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) {
 
     /* Check to see if there is a range set in the custom headers */
-    if(!Curl_checkheaders(conn, "Range") && data->state.range) {
+    if(!Curl_checkheaders(data, "Range") && data->state.range) {
       Curl_safefree(data->state.aptr.rangeline);
       data->state.aptr.rangeline = aprintf("Range: %s\r\n", data->state.range);
       p_range = data->state.aptr.rangeline;
@@ -421,11 +432,11 @@
   /*
    * Sanity check the custom headers
    */
-  if(Curl_checkheaders(conn, "CSeq")) {
+  if(Curl_checkheaders(data, "CSeq")) {
     failf(data, "CSeq cannot be set as a custom header.");
     return CURLE_RTSP_CSEQ_ERROR;
   }
-  if(Curl_checkheaders(conn, "Session")) {
+  if(Curl_checkheaders(data, "Session")) {
     failf(data, "Session ID cannot be set as a custom header.");
     return CURLE_BAD_FUNCTION_ARGUMENT;
   }
@@ -484,12 +495,12 @@
     return result;
 
   if((rtspreq == RTSPREQ_SETUP) || (rtspreq == RTSPREQ_DESCRIBE)) {
-    result = Curl_add_timecondition(conn, &req_buffer);
+    result = Curl_add_timecondition(data, &req_buffer);
     if(result)
       return result;
   }
 
-  result = Curl_add_custom_headers(conn, FALSE, &req_buffer);
+  result = Curl_add_custom_headers(data, FALSE, &req_buffer);
   if(result)
     return result;
 
@@ -512,7 +523,7 @@
     if(putsize > 0 || postsize > 0) {
       /* As stated in the http comments, it is probably not wise to
        * actually set a custom Content-Length in the headers */
-      if(!Curl_checkheaders(conn, "Content-Length")) {
+      if(!Curl_checkheaders(data, "Content-Length")) {
         result =
           Curl_dyn_addf(&req_buffer,
                         "Content-Length: %" CURL_FORMAT_CURL_OFF_T"\r\n",
@@ -523,7 +534,7 @@
 
       if(rtspreq == RTSPREQ_SET_PARAMETER ||
          rtspreq == RTSPREQ_GET_PARAMETER) {
-        if(!Curl_checkheaders(conn, "Content-Type")) {
+        if(!Curl_checkheaders(data, "Content-Type")) {
           result = Curl_dyn_addf(&req_buffer,
                                  "Content-Type: text/parameters\r\n");
           if(result)
@@ -532,7 +543,7 @@
       }
 
       if(rtspreq == RTSPREQ_ANNOUNCE) {
-        if(!Curl_checkheaders(conn, "Content-Type")) {
+        if(!Curl_checkheaders(data, "Content-Type")) {
           result = Curl_dyn_addf(&req_buffer,
                                  "Content-Type: application/sdp\r\n");
           if(result)
@@ -564,7 +575,7 @@
   }
 
   /* issue the request */
-  result = Curl_buffer_send(&req_buffer, conn,
+  result = Curl_buffer_send(&req_buffer, data,
                             &data->info.request_size, 0, FIRSTSOCKET);
   if(result) {
     failf(data, "Failed sending RTSP request");
@@ -580,7 +591,7 @@
     /* if a request-body has been sent off, we make sure this progress is
        noted properly */
     Curl_pgrsSetUploadCounter(data, data->req.writebytecount);
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
   }
 
@@ -640,9 +651,9 @@
       }
       /* We have the full RTP interleaved packet
        * Write out the header including the leading '$' */
-      DEBUGF(infof(data, "RTP write channel %d rtp_length %d\n",
+      DEBUGF(infof(data, "RTP write channel %d rtp_length %d",
              rtspc->rtp_channel, rtp_length));
-      result = rtp_client_write(conn, &rtp[0], rtp_length + 4);
+      result = rtp_client_write(data, &rtp[0], rtp_length + 4);
       if(result) {
         failf(data, "Got an error writing an RTP packet");
         *readmore = FALSE;
@@ -670,8 +681,8 @@
     }
   }
 
-  if(rtp_dataleft != 0 && rtp[0] == '$') {
-    DEBUGF(infof(data, "RTP Rewinding %zd %s\n", rtp_dataleft,
+  if(rtp_dataleft && rtp[0] == '$') {
+    DEBUGF(infof(data, "RTP Rewinding %zd %s", rtp_dataleft,
           *readmore ? "(READMORE)" : ""));
 
     /* Store the incomplete RTP packet for a "rewind" */
@@ -713,9 +724,8 @@
 }
 
 static
-CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len)
+CURLcode rtp_client_write(struct Curl_easy *data, char *ptr, size_t len)
 {
-  struct Curl_easy *data = conn->data;
   size_t wrote;
   curl_write_callback writeit;
   void *user_ptr;
@@ -755,17 +765,15 @@
   return CURLE_OK;
 }
 
-CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
-                               char *header)
+CURLcode Curl_rtsp_parseheader(struct Curl_easy *data, char *header)
 {
-  struct Curl_easy *data = conn->data;
   long CSeq = 0;
 
   if(checkprefix("CSeq:", header)) {
     /* Store the received CSeq. Match is verified in rtsp_done */
     int nc = sscanf(&header[4], ": %ld", &CSeq);
     if(nc == 1) {
-      struct RTSP *rtsp = data->req.protop;
+      struct RTSP *rtsp = data->req.p.rtsp;
       rtsp->CSeq_recv = CSeq; /* mark the request */
       data->state.rtsp_CSeq_recv = CSeq; /* update the handle */
     }
@@ -776,6 +784,8 @@
   }
   else if(checkprefix("Session:", header)) {
     char *start;
+    char *end;
+    size_t idlen;
 
     /* Find the first non-space letter */
     start = header + 8;
@@ -784,11 +794,25 @@
 
     if(!*start) {
       failf(data, "Got a blank Session ID");
+      return CURLE_RTSP_SESSION_ERROR;
     }
-    else if(data->set.str[STRING_RTSP_SESSION_ID]) {
+
+    /* Find the end of Session ID
+     *
+     * Allow any non whitespace content, up to the field separator or end of
+     * line. RFC 2326 isn't 100% clear on the session ID and for example
+     * gstreamer does url-encoded session ID's not covered by the standard.
+     */
+    end = start;
+    while(*end && *end != ';' && !ISSPACE(*end))
+      end++;
+    idlen = end - start;
+
+    if(data->set.str[STRING_RTSP_SESSION_ID]) {
+
       /* If the Session ID is set, then compare */
-      if(strncmp(start, data->set.str[STRING_RTSP_SESSION_ID],
-                 strlen(data->set.str[STRING_RTSP_SESSION_ID]))  != 0) {
+      if(strlen(data->set.str[STRING_RTSP_SESSION_ID]) != idlen ||
+         strncmp(start, data->set.str[STRING_RTSP_SESSION_ID], idlen) != 0) {
         failf(data, "Got RTSP Session ID Line [%s], but wanted ID [%s]",
               start, data->set.str[STRING_RTSP_SESSION_ID]);
         return CURLE_RTSP_SESSION_ERROR;
@@ -797,24 +821,17 @@
     else {
       /* If the Session ID is not set, and we find it in a response, then set
        * it.
-       *
-       * Allow any non whitespace content, up to the field separator or end of
-       * line. RFC 2326 isn't 100% clear on the session ID and for example
-       * gstreamer does url-encoded session ID's not covered by the standard.
        */
-      char *end = start;
-      while(*end && *end != ';' && !ISSPACE(*end))
-        end++;
 
       /* Copy the id substring into a new buffer */
-      data->set.str[STRING_RTSP_SESSION_ID] = malloc(end - start + 1);
-      if(data->set.str[STRING_RTSP_SESSION_ID] == NULL)
+      data->set.str[STRING_RTSP_SESSION_ID] = malloc(idlen + 1);
+      if(!data->set.str[STRING_RTSP_SESSION_ID])
         return CURLE_OUT_OF_MEMORY;
-      memcpy(data->set.str[STRING_RTSP_SESSION_ID], start, end - start);
-      (data->set.str[STRING_RTSP_SESSION_ID])[end - start] = '\0';
+      memcpy(data->set.str[STRING_RTSP_SESSION_ID], start, idlen);
+      (data->set.str[STRING_RTSP_SESSION_ID])[idlen] = '\0';
     }
   }
   return CURLE_OK;
 }
 
-#endif /* CURL_DISABLE_RTSP */
+#endif /* CURL_DISABLE_RTSP or using Hyper */
diff --git a/lib/rtsp.h b/lib/rtsp.h
index 1aae864..da11ade 100644
--- a/lib/rtsp.h
+++ b/lib/rtsp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -21,11 +21,15 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#ifdef USE_HYPER
+#define CURL_DISABLE_RTSP 1
+#endif
+
 #ifndef CURL_DISABLE_RTSP
 
 extern const struct Curl_handler Curl_handler_rtsp;
 
-CURLcode Curl_rtsp_parseheader(struct connectdata *conn, char *header);
+CURLcode Curl_rtsp_parseheader(struct Curl_easy *data, char *header);
 
 #else
 /* disabled */
diff --git a/lib/select.c b/lib/select.c
index 917133b..52dca5a 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -130,6 +130,7 @@
   return r;
 }
 
+#ifndef HAVE_POLL_FINE
 /*
  * This is a wrapper around select() to aid in Windows compatibility.
  * A negative timeout value makes this function wait indefinitely,
@@ -141,11 +142,11 @@
  *    0 = timeout
  *    N = number of signalled file descriptors
  */
-int Curl_select(curl_socket_t maxfd,   /* highest socket number */
-                fd_set *fds_read,      /* sockets ready for reading */
-                fd_set *fds_write,     /* sockets ready for writing */
-                fd_set *fds_err,       /* sockets with errors */
-                timediff_t timeout_ms) /* milliseconds to wait */
+static int our_select(curl_socket_t maxfd,   /* highest socket number */
+                      fd_set *fds_read,      /* sockets ready for reading */
+                      fd_set *fds_write,     /* sockets ready for writing */
+                      fd_set *fds_err,       /* sockets with errors */
+                      timediff_t timeout_ms) /* milliseconds to wait */
 {
   struct timeval pending_tv;
   struct timeval *ptimeout;
@@ -220,6 +221,8 @@
 #endif
 }
 
+#endif
+
 /*
  * Wait for read or write events on a set of file descriptors. It uses poll()
  * when a fine poll() is available, in order to avoid limits with FD_SETSIZE,
@@ -412,7 +415,7 @@
      curl_socket_t is unsigned in such cases and thus -1 is the largest
      value).
   */
-  r = Curl_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
+  r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
   if(r <= 0)
     return r;
 
@@ -439,7 +442,7 @@
       if(ufds[i].events & POLLPRI)
         ufds[i].revents |= POLLPRI;
     }
-    if(ufds[i].revents != 0)
+    if(ufds[i].revents)
       r++;
   }
 
diff --git a/lib/select.h b/lib/select.h
index c9cc5c2..19da1e7 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -72,12 +72,6 @@
    therefore defined here */
 #define CURL_CSELECT_IN2 (CURL_CSELECT_ERR << 1)
 
-int Curl_select(curl_socket_t maxfd,
-                fd_set *fds_read,
-                fd_set *fds_write,
-                fd_set *fds_err,
-                timediff_t timeout_ms);
-
 int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2,
                       curl_socket_t writefd,
                       timediff_t timeout_ms);
@@ -112,7 +106,11 @@
   } \
 } while(0)
 #else
+#ifdef HAVE_POLL_FINE
+#define VALID_SOCK(s) ((s) >= 0)  /* FD_SETSIZE is irrelevant for poll */
+#else
 #define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
+#endif
 #define VERIFY_SOCK(x) do { \
   if(!VALID_SOCK(x)) { \
     SET_SOCKERRNO(EINVAL); \
diff --git a/lib/sendf.c b/lib/sendf.c
index 6cfc89b..14ca84b 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -28,6 +28,8 @@
 
 #ifdef HAVE_LINUX_TCP_H
 #include <linux/tcp.h>
+#elif defined(HAVE_NETINET_TCP_H)
+#include <netinet/tcp.h>
 #endif
 
 #include <curl/curl.h>
@@ -63,7 +65,7 @@
   char *inPtr, *outPtr;
 
   /* sanity check */
-  if((startPtr == NULL) || (size < 1)) {
+  if(!startPtr || (size < 1)) {
     return size;
   }
 
@@ -140,7 +142,8 @@
          psnd->recv_size > psnd->recv_processed;
 }
 
-static CURLcode pre_receive_plain(struct connectdata *conn, int num)
+static CURLcode pre_receive_plain(struct Curl_easy *data,
+                                  struct connectdata *conn, int num)
 {
   const curl_socket_t sockfd = conn->sock[num];
   struct postponed_data * const psnd = &(conn->postponed[num]);
@@ -159,7 +162,7 @@
       /* Have some incoming data */
       if(!psnd->buffer) {
         /* Use buffer double default size for intermediate buffer */
-        psnd->allocated_size = 2 * conn->data->set.buffer_size;
+        psnd->allocated_size = 2 * data->set.buffer_size;
         psnd->buffer = malloc(psnd->allocated_size);
         if(!psnd->buffer)
           return CURLE_OUT_OF_MEMORY;
@@ -228,34 +231,26 @@
   (void)sockindex;
   return false;
 }
-#define pre_receive_plain(c,n) CURLE_OK
+#define pre_receive_plain(d,c,n) CURLE_OK
 #define get_pre_recved(c,n,b,l) 0
 #endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */
 
 /* Curl_infof() is for info message along the way */
+#define MAXINFO 2048
 
 void Curl_infof(struct Curl_easy *data, const char *fmt, ...)
 {
+  DEBUGASSERT(!strchr(fmt, '\n'));
   if(data && data->set.verbose) {
     va_list ap;
     size_t len;
-    char print_buffer[2048 + 1];
+    char buffer[MAXINFO + 2];
     va_start(ap, fmt);
-    len = mvsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
-    /*
-     * Indicate truncation of the input by replacing the last 3 characters
-     * with "...", and transfer the newline over in case the format had one.
-     */
-    if(len >= sizeof(print_buffer)) {
-      len = strlen(fmt);
-      if(fmt[--len] == '\n')
-        msnprintf(print_buffer + (sizeof(print_buffer) - 5), 5, "...\n");
-      else
-        msnprintf(print_buffer + (sizeof(print_buffer) - 4), 4, "...");
-    }
+    len = mvsnprintf(buffer, MAXINFO, fmt, ap);
     va_end(ap);
-    len = strlen(print_buffer);
-    Curl_debug(data, CURLINFO_TEXT, print_buffer, len);
+    buffer[len++] = '\n';
+    buffer[len] = '\0';
+    Curl_debug(data, CURLINFO_TEXT, buffer, len);
   }
 }
 
@@ -265,23 +260,21 @@
 
 void Curl_failf(struct Curl_easy *data, const char *fmt, ...)
 {
+  DEBUGASSERT(!strchr(fmt, '\n'));
   if(data->set.verbose || data->set.errorbuffer) {
     va_list ap;
     size_t len;
     char error[CURL_ERROR_SIZE + 2];
     va_start(ap, fmt);
-    (void)mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
-    len = strlen(error);
+    len = mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
 
     if(data->set.errorbuffer && !data->state.errorbuf) {
       strcpy(data->set.errorbuffer, error);
       data->state.errorbuf = TRUE; /* wrote error string */
     }
-    if(data->set.verbose) {
-      error[len] = '\n';
-      error[++len] = '\0';
-      Curl_debug(data, CURLINFO_TEXT, error, len);
-    }
+    error[len++] = '\n';
+    error[len] = '\0';
+    Curl_debug(data, CURLINFO_TEXT, error, len);
     va_end(ap);
   }
 }
@@ -293,7 +286,7 @@
  * If the write would block (CURLE_AGAIN), we return CURLE_OK and
  * (*written == 0). Otherwise we return regular CURLcode value.
  */
-CURLcode Curl_write(struct connectdata *conn,
+CURLcode Curl_write(struct Curl_easy *data,
                     curl_socket_t sockfd,
                     const void *mem,
                     size_t len,
@@ -301,9 +294,26 @@
 {
   ssize_t bytes_written;
   CURLcode result = CURLE_OK;
-  int num = (sockfd == conn->sock[SECONDARYSOCKET]);
+  struct connectdata *conn;
+  int num;
+  DEBUGASSERT(data);
+  DEBUGASSERT(data->conn);
+  conn = data->conn;
+  num = (sockfd == conn->sock[SECONDARYSOCKET]);
 
-  bytes_written = conn->send[num](conn, num, mem, len, &result);
+#ifdef CURLDEBUG
+  {
+    /* Allow debug builds to override this logic to force short sends
+    */
+    char *p = getenv("CURL_SMALLSENDS");
+    if(p) {
+      size_t altsize = (size_t)strtoul(p, NULL, 10);
+      if(altsize)
+        len = CURLMIN(len, altsize);
+    }
+  }
+#endif
+  bytes_written = conn->send[num](data, num, mem, len, &result);
 
   *written = bytes_written;
   if(bytes_written >= 0)
@@ -326,17 +336,23 @@
   }
 }
 
-ssize_t Curl_send_plain(struct connectdata *conn, int num,
+ssize_t Curl_send_plain(struct Curl_easy *data, int num,
                         const void *mem, size_t len, CURLcode *code)
 {
-  curl_socket_t sockfd = conn->sock[num];
+  struct connectdata *conn;
+  curl_socket_t sockfd;
   ssize_t bytes_written;
+
+  DEBUGASSERT(data);
+  DEBUGASSERT(data->conn);
+  conn = data->conn;
+  sockfd = conn->sock[num];
   /* WinSock will destroy unread received data if send() is
      failed.
      To avoid lossage of received data, recv() must be
      performed before every send() if any incoming data is
      available. */
-  if(pre_receive_plain(conn, num)) {
+  if(pre_receive_plain(data, conn, num)) {
     *code = CURLE_OUT_OF_MEMORY;
     return -1;
   }
@@ -373,9 +389,9 @@
     }
     else {
       char buffer[STRERROR_LEN];
-      failf(conn->data, "Send failure: %s",
+      failf(data, "Send failure: %s",
             Curl_strerror(err, buffer, sizeof(buffer)));
-      conn->data->state.os_errno = err;
+      data->state.os_errno = err;
       *code = CURLE_SEND_ERROR;
     }
   }
@@ -387,28 +403,33 @@
  * server using plain sockets only. Otherwise meant to have the exact same
  * proto as Curl_write()
  */
-CURLcode Curl_write_plain(struct connectdata *conn,
+CURLcode Curl_write_plain(struct Curl_easy *data,
                           curl_socket_t sockfd,
                           const void *mem,
                           size_t len,
                           ssize_t *written)
 {
-  ssize_t bytes_written;
   CURLcode result;
-  int num = (sockfd == conn->sock[SECONDARYSOCKET]);
+  struct connectdata *conn = data->conn;
+  int num;
+  DEBUGASSERT(conn);
+  num = (sockfd == conn->sock[SECONDARYSOCKET]);
 
-  bytes_written = Curl_send_plain(conn, num, mem, len, &result);
-
-  *written = bytes_written;
+  *written = Curl_send_plain(data, num, mem, len, &result);
 
   return result;
 }
 
-ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
+ssize_t Curl_recv_plain(struct Curl_easy *data, int num, char *buf,
                         size_t len, CURLcode *code)
 {
-  curl_socket_t sockfd = conn->sock[num];
+  struct connectdata *conn;
+  curl_socket_t sockfd;
   ssize_t nread;
+  DEBUGASSERT(data);
+  DEBUGASSERT(data->conn);
+  conn = data->conn;
+  sockfd = conn->sock[num];
   /* Check and return data that already received and storied in internal
      intermediate buffer */
   nread = get_pre_recved(conn, num, buf, len);
@@ -439,9 +460,9 @@
     }
     else {
       char buffer[STRERROR_LEN];
-      failf(conn->data, "Recv failure: %s",
+      failf(data, "Recv failure: %s",
             Curl_strerror(err, buffer, sizeof(buffer)));
-      conn->data->state.os_errno = err;
+      data->state.os_errno = err;
       *code = CURLE_RECV_ERROR;
     }
   }
@@ -481,9 +502,7 @@
     /* store this information in the state struct for later use */
     Curl_dyn_init(&s->tempwrite[i].b, DYN_PAUSE_BUFFER);
     s->tempwrite[i].type = type;
-
-    if(newtype)
-      s->tempcount++;
+    s->tempcount++;
   }
 
   if(Curl_dyn_addn(&s->tempwrite[i].b, (unsigned char *)ptr, len))
@@ -500,12 +519,12 @@
  * client write callback(s) and takes care of pause requests from the
  * callbacks.
  */
-static CURLcode chop_write(struct connectdata *conn,
+static CURLcode chop_write(struct Curl_easy *data,
                            int type,
                            char *optr,
                            size_t olen)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_write_callback writeheader = NULL;
   curl_write_callback writebody = NULL;
   char *ptr = optr;
@@ -589,22 +608,20 @@
 /* Curl_client_write() sends data to the write callback(s)
 
    The bit pattern defines to what "streams" to write to. Body and/or header.
-   The defines are in sendf.h of course.
+   The defines are in sendf.h of course. "len" is not allowed to be 0.
 
    If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the
    local character encoding.  This is a problem and should be changed in
    the future to leave the original data alone.
  */
-CURLcode Curl_client_write(struct connectdata *conn,
+CURLcode Curl_client_write(struct Curl_easy *data,
                            int type,
                            char *ptr,
                            size_t len)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
-  if(0 == len)
-    len = strlen(ptr);
-
+  DEBUGASSERT(len);
   DEBUGASSERT(type <= 3);
 
   /* FTP data may need conversion. */
@@ -623,7 +640,7 @@
 #endif /* CURL_DO_LINEEND_CONV */
     }
 
-  return chop_write(conn, type, ptr, len);
+  return chop_write(data, type, ptr, len);
 }
 
 CURLcode Curl_read_plain(curl_socket_t sockfd,
@@ -658,7 +675,7 @@
  *
  * Returns a regular CURLcode value.
  */
-CURLcode Curl_read(struct connectdata *conn, /* connection data */
+CURLcode Curl_read(struct Curl_easy *data,   /* transfer */
                    curl_socket_t sockfd,     /* read from this socket */
                    char *buf,                /* store read data here */
                    size_t sizerequested,     /* max amount to read */
@@ -668,7 +685,7 @@
   ssize_t nread = 0;
   size_t bytesfromsocket = 0;
   char *buffertofill = NULL;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   /* Set 'num' to 0 or 1, depending on which socket that has been sent here.
      If it is the second socket, we set num to 1. Otherwise to 0. This lets
@@ -680,7 +697,7 @@
   bytesfromsocket = CURLMIN(sizerequested, (size_t)data->set.buffer_size);
   buffertofill = buf;
 
-  nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &result);
+  nread = conn->recv[num](data, num, buffertofill, bytesfromsocket, &result);
   if(nread < 0)
     return result;
 
@@ -693,72 +710,74 @@
 int Curl_debug(struct Curl_easy *data, curl_infotype type,
                char *ptr, size_t size)
 {
-  static const char s_infotype[CURLINFO_END][3] = {
-    "* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
   int rc = 0;
+  if(data->set.verbose) {
+    static const char s_infotype[CURLINFO_END][3] = {
+      "* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
 
 #ifdef CURL_DOES_CONVERSIONS
-  char *buf = NULL;
-  size_t conv_size = 0;
+    char *buf = NULL;
+    size_t conv_size = 0;
 
-  switch(type) {
-  case CURLINFO_HEADER_OUT:
-    buf = Curl_memdup(ptr, size);
-    if(!buf)
-      return 1;
-    conv_size = size;
+    switch(type) {
+    case CURLINFO_HEADER_OUT:
+      buf = Curl_memdup(ptr, size);
+      if(!buf)
+        return 1;
+      conv_size = size;
 
-    /* Special processing is needed for this block if it
-     * contains both headers and data (separated by CRLFCRLF).
-     * We want to convert just the headers, leaving the data as-is.
-     */
-    if(size > 4) {
-      size_t i;
-      for(i = 0; i < size-4; i++) {
-        if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) {
-          /* convert everything through this CRLFCRLF but no further */
-          conv_size = i + 4;
-          break;
+      /* Special processing is needed for this block if it
+       * contains both headers and data (separated by CRLFCRLF).
+       * We want to convert just the headers, leaving the data as-is.
+       */
+      if(size > 4) {
+        size_t i;
+        for(i = 0; i < size-4; i++) {
+          if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) {
+            /* convert everything through this CRLFCRLF but no further */
+            conv_size = i + 4;
+            break;
+          }
         }
       }
-    }
 
-    Curl_convert_from_network(data, buf, conv_size);
-    /* Curl_convert_from_network calls failf if unsuccessful */
-    /* we might as well continue even if it fails...   */
-    ptr = buf; /* switch pointer to use my buffer instead */
-    break;
-  default:
-    /* leave everything else as-is */
-    break;
-  }
+      Curl_convert_from_network(data, buf, conv_size);
+      /* Curl_convert_from_network calls failf if unsuccessful */
+      /* we might as well continue even if it fails...   */
+      ptr = buf; /* switch pointer to use my buffer instead */
+      break;
+    default:
+      /* leave everything else as-is */
+      break;
+    }
 #endif /* CURL_DOES_CONVERSIONS */
 
-  if(data->set.fdebug) {
-    Curl_set_in_callback(data, true);
-    rc = (*data->set.fdebug)(data, type, ptr, size, data->set.debugdata);
-    Curl_set_in_callback(data, false);
-  }
-  else {
-    switch(type) {
-    case CURLINFO_TEXT:
-    case CURLINFO_HEADER_OUT:
-    case CURLINFO_HEADER_IN:
-      fwrite(s_infotype[type], 2, 1, data->set.err);
-      fwrite(ptr, size, 1, data->set.err);
-#ifdef CURL_DOES_CONVERSIONS
-      if(size != conv_size) {
-        /* we had untranslated data so we need an explicit newline */
-        fwrite("\n", 1, 1, data->set.err);
-      }
-#endif
-      break;
-    default: /* nada */
-      break;
+    if(data->set.fdebug) {
+      Curl_set_in_callback(data, true);
+      rc = (*data->set.fdebug)(data, type, ptr, size, data->set.debugdata);
+      Curl_set_in_callback(data, false);
     }
-  }
+    else {
+      switch(type) {
+      case CURLINFO_TEXT:
+      case CURLINFO_HEADER_OUT:
+      case CURLINFO_HEADER_IN:
+        fwrite(s_infotype[type], 2, 1, data->set.err);
+        fwrite(ptr, size, 1, data->set.err);
 #ifdef CURL_DOES_CONVERSIONS
-  free(buf);
+        if(size != conv_size) {
+          /* we had untranslated data so we need an explicit newline */
+          fwrite("\n", 1, 1, data->set.err);
+        }
 #endif
+        break;
+      default: /* nada */
+        break;
+      }
+    }
+#ifdef CURL_DOES_CONVERSIONS
+    free(buf);
+#endif
+  }
   return rc;
 }
diff --git a/lib/sendf.h b/lib/sendf.h
index 2e270c5..108a5e9 100644
--- a/lib/sendf.h
+++ b/lib/sendf.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -49,7 +49,7 @@
 #define CLIENTWRITE_HEADER (1<<1)
 #define CLIENTWRITE_BOTH   (CLIENTWRITE_BODY|CLIENTWRITE_HEADER)
 
-CURLcode Curl_client_write(struct connectdata *conn, int type, char *ptr,
+CURLcode Curl_client_write(struct Curl_easy *data, int type, char *ptr,
                            size_t len) WARN_UNUSED_RESULT;
 
 bool Curl_recv_has_postponed_data(struct connectdata *conn, int sockindex);
@@ -60,23 +60,24 @@
                          size_t bytesfromsocket,
                          ssize_t *n);
 
-ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
+ssize_t Curl_recv_plain(struct Curl_easy *data, int num, char *buf,
                         size_t len, CURLcode *code);
-ssize_t Curl_send_plain(struct connectdata *conn, int num,
+ssize_t Curl_send_plain(struct Curl_easy *data, int num,
                         const void *mem, size_t len, CURLcode *code);
 
 /* internal read-function, does plain socket, SSL and krb4 */
-CURLcode Curl_read(struct connectdata *conn, curl_socket_t sockfd,
+CURLcode Curl_read(struct Curl_easy *data, curl_socket_t sockfd,
                    char *buf, size_t buffersize,
                    ssize_t *n);
+
 /* internal write-function, does plain socket, SSL, SCP, SFTP and krb4 */
-CURLcode Curl_write(struct connectdata *conn,
+CURLcode Curl_write(struct Curl_easy *data,
                     curl_socket_t sockfd,
                     const void *mem, size_t len,
                     ssize_t *written);
 
 /* internal write-function, does plain sockets ONLY */
-CURLcode Curl_write_plain(struct connectdata *conn,
+CURLcode Curl_write_plain(struct Curl_easy *data,
                           curl_socket_t sockfd,
                           const void *mem, size_t len,
                           ssize_t *written);
diff --git a/lib/setopt.c b/lib/setopt.c
index fa53982..076fe5f 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,6 +30,8 @@
 
 #ifdef HAVE_LINUX_TCP_H
 #include <linux/tcp.h>
+#elif defined(HAVE_NETINET_TCP_H)
+#include <netinet/tcp.h>
 #endif
 
 #include "urldata.h"
@@ -45,6 +47,7 @@
 #include "setopt.h"
 #include "multiif.h"
 #include "altsvc.h"
+#include "hsts.h"
 
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
@@ -174,7 +177,7 @@
     break;
   case CURLOPT_SSL_CIPHER_LIST:
     /* set a list of cipher we want to use in the SSL connection */
-    result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
                             va_arg(param, char *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -187,7 +190,7 @@
   case CURLOPT_TLS13_CIPHERS:
     if(Curl_ssl_tls13_ciphersuites()) {
       /* set preferred list of TLS 1.3 cipher suites */
-      result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER13_LIST_ORIG],
+      result = Curl_setstropt(&data->set.str[STRING_SSL_CIPHER13_LIST],
                               va_arg(param, char *));
     }
     else
@@ -271,11 +274,13 @@
      * Do not include the body part in the output data stream.
      */
     data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE;
+#ifndef CURL_DISABLE_HTTP
     if(data->set.opt_no_body)
       /* in HTTP lingo, no body means using the HEAD request... */
       data->set.method = HTTPREQ_HEAD;
     else if(data->set.method == HTTPREQ_HEAD)
       data->set.method = HTTPREQ_GET;
+#endif
     break;
   case CURLOPT_FAILONERROR:
     /*
@@ -421,6 +426,8 @@
       version_max = C_SSLVERSION_MAX_VALUE(arg);
 
       if(version < CURL_SSLVERSION_DEFAULT ||
+         version == CURL_SSLVERSION_SSLv2 ||
+         version == CURL_SSLVERSION_SSLv3 ||
          version >= CURL_SSLVERSION_LAST ||
          version_max < CURL_SSLVERSION_MAX_NONE ||
          version_max >= CURL_SSLVERSION_MAX_LAST)
@@ -597,7 +604,7 @@
 
   case CURLOPT_POSTREDIR:
     /*
-     * Set the behaviour of POST when redirecting
+     * Set the behavior of POST when redirecting
      * CURL_REDIR_GET_ALL - POST is changed to GET after 301 and 302
      * CURL_REDIR_POST_301 - POST is kept as POST after 301
      * CURL_REDIR_POST_302 - POST is kept as POST after 302
@@ -633,7 +640,20 @@
     data->set.method = HTTPREQ_POST_FORM;
     data->set.opt_no_body = FALSE; /* this is implied */
     break;
-#endif   /* CURL_DISABLE_HTTP */
+
+  case CURLOPT_AWS_SIGV4:
+    /*
+     * String that is merged to some authentication
+     * parameters are used by the algorithm.
+     */
+    result = Curl_setstropt(&data->set.str[STRING_AWS_SIGV4],
+                            va_arg(param, char *));
+    /*
+     * Basic been set by default it need to be unset here
+     */
+    if(data->set.str[STRING_AWS_SIGV4])
+      data->set.httpauth = CURLAUTH_AWS_SIGV4;
+    break;
 
   case CURLOPT_MIMEPOST:
     /*
@@ -651,13 +671,13 @@
     /*
      * String to set in the HTTP Referer: field.
      */
-    if(data->change.referer_alloc) {
-      Curl_safefree(data->change.referer);
-      data->change.referer_alloc = FALSE;
+    if(data->state.referer_alloc) {
+      Curl_safefree(data->state.referer);
+      data->state.referer_alloc = FALSE;
     }
     result = Curl_setstropt(&data->set.str[STRING_SET_REFERER],
                             va_arg(param, char *));
-    data->change.referer = data->set.str[STRING_SET_REFERER];
+    data->state.referer = data->set.str[STRING_SET_REFERER];
     break;
 
   case CURLOPT_USERAGENT:
@@ -675,7 +695,6 @@
     data->set.headers = va_arg(param, struct curl_slist *);
     break;
 
-#ifndef CURL_DISABLE_HTTP
 #ifndef CURL_DISABLE_PROXY
   case CURLOPT_PROXYHEADER:
     /*
@@ -727,13 +746,27 @@
         return CURLE_BAD_FUNCTION_ARGUMENT;
       /* append the cookie file name to the list of file names, and deal with
          them later */
-      cl = curl_slist_append(data->change.cookielist, argptr);
+      cl = curl_slist_append(data->state.cookielist, argptr);
       if(!cl) {
-        curl_slist_free_all(data->change.cookielist);
-        data->change.cookielist = NULL;
+        curl_slist_free_all(data->state.cookielist);
+        data->state.cookielist = NULL;
         return CURLE_OUT_OF_MEMORY;
       }
-      data->change.cookielist = cl; /* store the list for later use */
+      data->state.cookielist = cl; /* store the list for later use */
+    }
+    else {
+      /* clear the list of cookie files */
+      curl_slist_free_all(data->state.cookielist);
+      data->state.cookielist = NULL;
+
+      if(!data->share || !data->share->cookies) {
+        /* throw away all existing cookies if this isn't a shared cookie
+           container */
+        Curl_cookie_clearall(data->cookies);
+        Curl_cookie_cleanup(data->cookies);
+      }
+      /* disable the cookie engine */
+      data->cookies = NULL;
     }
     break;
 
@@ -780,7 +813,7 @@
   case CURLOPT_COOKIELIST:
     argptr = va_arg(param, char *);
 
-    if(argptr == NULL)
+    if(!argptr)
       break;
 
     if(strcasecompare(argptr, "ALL")) {
@@ -862,7 +895,7 @@
       ;
     else
 #endif
-#ifndef USE_NGHTTP2
+#if !defined(USE_NGHTTP2) && !defined(USE_HYPER)
     if(arg >= CURL_HTTP_VERSION_2)
       return CURLE_UNSUPPORTED_PROTOCOL;
 #else
@@ -871,7 +904,7 @@
     if(arg == CURL_HTTP_VERSION_NONE)
       arg = CURL_HTTP_VERSION_2TLS;
 #endif
-    data->set.httpversion = arg;
+    data->set.httpwant = (unsigned char)arg;
     break;
 
   case CURLOPT_EXPECT_100_TIMEOUT_MS:
@@ -889,7 +922,13 @@
     arg = va_arg(param, unsigned long);
     if(arg > 1L)
       return CURLE_BAD_FUNCTION_ARGUMENT;
+#ifdef USE_HYPER
+    /* Hyper does not support HTTP/0.9 */
+    if(arg)
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+#else
     data->set.http09_allowed = arg ? TRUE : FALSE;
+#endif
     break;
 #endif   /* CURL_DISABLE_HTTP */
 
@@ -1140,7 +1179,7 @@
      * An option that changes the command to one that asks for a list only, no
      * file info details. Used for FTP, POP3 and SFTP.
      */
-    data->set.ftp_list_only = (0 != va_arg(param, long)) ? TRUE : FALSE;
+    data->set.list_only = (0 != va_arg(param, long)) ? TRUE : FALSE;
     break;
 
   case CURLOPT_APPEND:
@@ -1148,7 +1187,7 @@
      * We want to upload and append to an existing file. Used for FTP and
      * SFTP.
      */
-    data->set.ftp_append = (0 != va_arg(param, long)) ? TRUE : FALSE;
+    data->set.remote_append = (0 != va_arg(param, long)) ? TRUE : FALSE;
     break;
 
 #ifndef CURL_DISABLE_FTP
@@ -1315,14 +1354,14 @@
     /*
      * The URL to fetch.
      */
-    if(data->change.url_alloc) {
+    if(data->state.url_alloc) {
       /* the already set URL is allocated, free it first! */
-      Curl_safefree(data->change.url);
-      data->change.url_alloc = FALSE;
+      Curl_safefree(data->state.url);
+      data->state.url_alloc = FALSE;
     }
     result = Curl_setstropt(&data->set.str[STRING_SET_URL],
                             va_arg(param, char *));
-    data->change.url = data->set.str[STRING_SET_URL];
+    data->state.url = data->set.str[STRING_SET_URL];
     break;
   case CURLOPT_PORT:
     /*
@@ -1396,7 +1435,6 @@
     result = Curl_setstropt(&data->set.str[STRING_USERNAME],
                             va_arg(param, char *));
     break;
-
   case CURLOPT_PASSWORD:
     /*
      * authentication password to use in the operation
@@ -1441,17 +1479,20 @@
     break;
   case CURLOPT_RESOLVE:
     /*
-     * List of NAME:[address] names to populate the DNS cache with
-     * Prefix the NAME with dash (-) to _remove_ the name from the cache.
-     *
-     * Names added with this API will remain in the cache until explicitly
+     * List of HOST:PORT:[addresses] strings to populate the DNS cache with
+     * Entries added this way will remain in the cache until explicitly
      * removed or the handle is cleaned up.
      *
-     * This API can remove any name from the DNS cache, but only entries
+     * Prefix the HOST with plus sign (+) to have the entry expire just like
+     * automatically added entries.
+     *
+     * Prefix the HOST with dash (-) to _remove_ the entry from the cache.
+     *
+     * This API can remove any entry from the DNS cache, but only entries
      * that aren't actually in use right now will be pruned immediately.
      */
     data->set.resolve = va_arg(param, struct curl_slist *);
-    data->change.resolve = data->set.resolve;
+    data->state.resolve = data->set.resolve;
     break;
   case CURLOPT_PROGRESSFUNCTION:
     /*
@@ -1643,14 +1684,14 @@
     /*
      * String that holds file name of the SSL certificate to use
      */
-    result = Curl_setstropt(&data->set.str[STRING_CERT_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_CERT],
                             va_arg(param, char *));
     break;
   case CURLOPT_SSLCERT_BLOB:
     /*
-     * Blob that holds file name of the SSL certificate to use
+     * Blob that holds file content of the SSL certificate to use
      */
-    result = Curl_setblobopt(&data->set.blobs[BLOB_CERT_ORIG],
+    result = Curl_setblobopt(&data->set.blobs[BLOB_CERT],
                              va_arg(param, struct curl_blob *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -1663,7 +1704,7 @@
     break;
   case CURLOPT_PROXY_SSLCERT_BLOB:
     /*
-     * Blob that holds file name of the SSL certificate to use for proxy
+     * Blob that holds file content of the SSL certificate to use for proxy
      */
     result = Curl_setblobopt(&data->set.blobs[BLOB_CERT_PROXY],
                              va_arg(param, struct curl_blob *));
@@ -1673,7 +1714,7 @@
     /*
      * String that holds file type of the SSL certificate to use
      */
-    result = Curl_setstropt(&data->set.str[STRING_CERT_TYPE_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_CERT_TYPE],
                             va_arg(param, char *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -1689,14 +1730,14 @@
     /*
      * String that holds file name of the SSL key to use
      */
-    result = Curl_setstropt(&data->set.str[STRING_KEY_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_KEY],
                             va_arg(param, char *));
     break;
   case CURLOPT_SSLKEY_BLOB:
     /*
-     * Blob that holds file name of the SSL key to use
+     * Blob that holds file content of the SSL key to use
      */
-    result = Curl_setblobopt(&data->set.blobs[BLOB_KEY_ORIG],
+    result = Curl_setblobopt(&data->set.blobs[BLOB_KEY],
                              va_arg(param, struct curl_blob *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -1709,7 +1750,7 @@
     break;
   case CURLOPT_PROXY_SSLKEY_BLOB:
     /*
-     * Blob that holds file name of the SSL key to use for proxy
+     * Blob that holds file content of the SSL key to use for proxy
      */
     result = Curl_setblobopt(&data->set.blobs[BLOB_KEY_PROXY],
                              va_arg(param, struct curl_blob *));
@@ -1719,7 +1760,7 @@
     /*
      * String that holds file type of the SSL key to use
      */
-    result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE],
                             va_arg(param, char *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -1735,7 +1776,7 @@
     /*
      * String that holds the SSL or SSH private key password.
      */
-    result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD],
                             va_arg(param, char *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -1829,6 +1870,13 @@
         data->set.ssl.primary.verifypeer;
     }
     break;
+  case CURLOPT_DOH_SSL_VERIFYPEER:
+    /*
+     * Enable peer SSL verifying for DoH.
+     */
+    data->set.doh_verifypeer = (0 != va_arg(param, long)) ?
+      TRUE : FALSE;
+    break;
 #ifndef CURL_DISABLE_PROXY
   case CURLOPT_PROXY_SSL_VERIFYPEER:
     /*
@@ -1861,6 +1909,15 @@
         data->set.ssl.primary.verifyhost;
     }
     break;
+  case CURLOPT_DOH_SSL_VERIFYHOST:
+    /*
+     * Enable verification of the host name in the peer certificate for DoH
+     */
+    arg = va_arg(param, long);
+
+    /* Treat both 1 and 2 as TRUE */
+    data->set.doh_verifyhost = (bool)((arg & 3) ? TRUE : FALSE);
+    break;
 #ifndef CURL_DISABLE_PROXY
   case CURLOPT_PROXY_SSL_VERIFYHOST:
     /*
@@ -1896,6 +1953,18 @@
         data->set.ssl.primary.verifystatus;
     }
     break;
+  case CURLOPT_DOH_SSL_VERIFYSTATUS:
+    /*
+     * Enable certificate status verifying for DoH.
+     */
+    if(!Curl_ssl_cert_status_request()) {
+      result = CURLE_NOT_BUILT_IN;
+      break;
+    }
+
+    data->set.doh_verifystatus = (0 != va_arg(param, long)) ?
+      TRUE : FALSE;
+    break;
   case CURLOPT_SSL_CTX_FUNCTION:
     /*
      * Set a SSL_CTX callback
@@ -1944,7 +2013,7 @@
      */
 #ifdef USE_SSL
     if(Curl_ssl->supports & SSLSUPP_PINNEDPUBKEY)
-      result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG],
+      result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY],
                               va_arg(param, char *));
     else
 #endif
@@ -1969,9 +2038,23 @@
     /*
      * Set CA info for SSL connection. Specify file name of the CA certificate
      */
-    result = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE],
                             va_arg(param, char *));
     break;
+  case CURLOPT_CAINFO_BLOB:
+    /*
+     * Blob that holds CA info for SSL connection.
+     * Specify entire PEM of the CA certificate
+     */
+#ifdef USE_SSL
+    if(Curl_ssl->supports & SSLSUPP_CAINFO_BLOB)
+      result = Curl_setblobopt(&data->set.blobs[BLOB_CAINFO],
+                               va_arg(param, struct curl_blob *));
+    else
+#endif
+      return CURLE_NOT_BUILT_IN;
+
+    break;
 #ifndef CURL_DISABLE_PROXY
   case CURLOPT_PROXY_CAINFO:
     /*
@@ -1981,6 +2064,19 @@
     result = Curl_setstropt(&data->set.str[STRING_SSL_CAFILE_PROXY],
                             va_arg(param, char *));
     break;
+  case CURLOPT_PROXY_CAINFO_BLOB:
+    /*
+     * Blob that holds CA info for SSL connection proxy.
+     * Specify entire PEM of the CA certificate
+     */
+#ifdef USE_SSL
+    if(Curl_ssl->supports & SSLSUPP_CAINFO_BLOB)
+      result = Curl_setblobopt(&data->set.blobs[BLOB_CAINFO_PROXY],
+                               va_arg(param, struct curl_blob *));
+    else
+#endif
+      return CURLE_NOT_BUILT_IN;
+    break;
 #endif
   case CURLOPT_CAPATH:
     /*
@@ -1990,7 +2086,7 @@
 #ifdef USE_SSL
     if(Curl_ssl->supports & SSLSUPP_CA_PATH)
       /* This does not work on windows. */
-      result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG],
+      result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH],
                               va_arg(param, char *));
     else
 #endif
@@ -2017,7 +2113,7 @@
      * Set CRL file info for SSL connection. Specify file name of the CRL
      * to check certificates revocation
      */
-    result = Curl_setstropt(&data->set.str[STRING_SSL_CRLFILE_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_SSL_CRLFILE],
                             va_arg(param, char *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -2035,14 +2131,14 @@
      * Set Issuer certificate file
      * to check certificates issuer
      */
-    result = Curl_setstropt(&data->set.str[STRING_SSL_ISSUERCERT_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_SSL_ISSUERCERT],
                             va_arg(param, char *));
     break;
   case CURLOPT_ISSUERCERT_BLOB:
     /*
      * Blob that holds Issuer certificate to check certificates issuer
      */
-    result = Curl_setblobopt(&data->set.blobs[BLOB_SSL_ISSUERCERT_ORIG],
+    result = Curl_setblobopt(&data->set.blobs[BLOB_SSL_ISSUERCERT],
                              va_arg(param, struct curl_blob *));
     break;
 #ifndef CURL_DISABLE_PROXY
@@ -2102,7 +2198,7 @@
     else if(arg < UPLOADBUFFER_MIN)
       arg = UPLOADBUFFER_MIN;
 
-    data->set.upload_buffer_size = arg;
+    data->set.upload_buffer_size = (unsigned int)arg;
     Curl_safefree(data->state.ulbuf); /* force a realloc next opportunity */
     break;
 
@@ -2147,8 +2243,9 @@
       data->share = NULL;
     }
 
-    /* use new share if it set */
-    data->share = set;
+    if(GOOD_SHARE_HANDLE(set))
+      /* use new share if it set */
+      data->share = set;
     if(data->share) {
 
       Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE);
@@ -2214,24 +2311,27 @@
 
   case CURLOPT_SSL_OPTIONS:
     arg = va_arg(param, long);
-    data->set.ssl.enable_beast =
-      (bool)((arg&CURLSSLOPT_ALLOW_BEAST) ? TRUE : FALSE);
+    data->set.ssl.enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST);
     data->set.ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE);
     data->set.ssl.no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN);
     data->set.ssl.revoke_best_effort = !!(arg & CURLSSLOPT_REVOKE_BEST_EFFORT);
     data->set.ssl.native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA);
+    data->set.ssl.auto_client_cert = !!(arg & CURLSSLOPT_AUTO_CLIENT_CERT);
+    /* If a setting is added here it should also be added in dohprobe()
+       which sets its own CURLOPT_SSL_OPTIONS based on these settings. */
     break;
 
 #ifndef CURL_DISABLE_PROXY
   case CURLOPT_PROXY_SSL_OPTIONS:
     arg = va_arg(param, long);
-    data->set.proxy_ssl.enable_beast =
-      (bool)((arg&CURLSSLOPT_ALLOW_BEAST) ? TRUE : FALSE);
+    data->set.proxy_ssl.enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST);
     data->set.proxy_ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE);
     data->set.proxy_ssl.no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN);
-    data->set.proxy_ssl.native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA);
     data->set.proxy_ssl.revoke_best_effort =
       !!(arg & CURLSSLOPT_REVOKE_BEST_EFFORT);
+    data->set.proxy_ssl.native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA);
+    data->set.proxy_ssl.auto_client_cert =
+      !!(arg & CURLSSLOPT_AUTO_CLIENT_CERT);
     break;
 #endif
 
@@ -2248,7 +2348,7 @@
     arg = va_arg(param, long);
     if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
       return CURLE_BAD_FUNCTION_ARGUMENT;
-    data->set.ipver = arg;
+    data->set.ipver = (unsigned char) arg;
     break;
 
   case CURLOPT_MAXFILESIZE_LARGE:
@@ -2270,8 +2370,12 @@
     break;
 
   case CURLOPT_IGNORE_CONTENT_LENGTH:
+#ifndef USE_HYPER
     data->set.ignorecl = (0 != va_arg(param, long)) ? TRUE : FALSE;
     break;
+#else
+    return CURLE_NOT_BUILT_IN;
+#endif
 
   case CURLOPT_CONNECT_ONLY:
     /*
@@ -2638,9 +2742,9 @@
 #endif
 #ifdef USE_TLS_SRP
   case CURLOPT_TLSAUTH_USERNAME:
-    result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_USERNAME],
                             va_arg(param, char *));
-    if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype)
+    if(data->set.str[STRING_TLSAUTH_USERNAME] && !data->set.ssl.authtype)
       data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */
     break;
   case CURLOPT_PROXY_TLSAUTH_USERNAME:
@@ -2653,9 +2757,9 @@
 #endif
     break;
   case CURLOPT_TLSAUTH_PASSWORD:
-    result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_ORIG],
+    result = Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD],
                             va_arg(param, char *));
-    if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype)
+    if(data->set.str[STRING_TLSAUTH_USERNAME] && !data->set.ssl.authtype)
       data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */
     break;
   case CURLOPT_PROXY_TLSAUTH_PASSWORD:
@@ -2839,7 +2943,46 @@
     data->set.trailer_data = va_arg(param, void *);
 #endif
     break;
-#ifdef USE_ALTSVC
+#ifndef CURL_DISABLE_HSTS
+  case CURLOPT_HSTSREADFUNCTION:
+    data->set.hsts_read = va_arg(param, curl_hstsread_callback);
+    break;
+  case CURLOPT_HSTSREADDATA:
+    data->set.hsts_read_userp = va_arg(param, void *);
+    break;
+  case CURLOPT_HSTSWRITEFUNCTION:
+    data->set.hsts_write = va_arg(param, curl_hstswrite_callback);
+    break;
+  case CURLOPT_HSTSWRITEDATA:
+    data->set.hsts_write_userp = va_arg(param, void *);
+    break;
+  case CURLOPT_HSTS:
+    if(!data->hsts) {
+      data->hsts = Curl_hsts_init();
+      if(!data->hsts)
+        return CURLE_OUT_OF_MEMORY;
+    }
+    argptr = va_arg(param, char *);
+    result = Curl_setstropt(&data->set.str[STRING_HSTS], argptr);
+    if(result)
+      return result;
+    if(argptr)
+      (void)Curl_hsts_loadfile(data, data->hsts, argptr);
+    break;
+  case CURLOPT_HSTS_CTRL:
+    arg = va_arg(param, long);
+    if(arg & CURLHSTS_ENABLE) {
+      if(!data->hsts) {
+        data->hsts = Curl_hsts_init();
+        if(!data->hsts)
+          return CURLE_OUT_OF_MEMORY;
+      }
+    }
+    else
+      Curl_hsts_cleanup(&data->hsts);
+    break;
+#endif
+#ifndef CURL_DISABLE_ALTSVC
   case CURLOPT_ALTSVC:
     if(!data->asi) {
       data->asi = Curl_altsvc_init();
diff --git a/lib/setopt.h b/lib/setopt.h
index 5fc4368..affbfd9 100644
--- a/lib/setopt.h
+++ b/lib/setopt.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/setup-os400.h b/lib/setup-os400.h
index b693cb3..8c97371 100644
--- a/lib/setup-os400.h
+++ b/lib/setup-os400.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/setup-vms.h b/lib/setup-vms.h
index 0e39c9f..a6710d9 100644
--- a/lib/setup-vms.h
+++ b/lib/setup-vms.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -87,7 +87,7 @@
   /* See if the result is in VMS format, if not, we are done */
   /* Assume that this is a PATH, not just some data */
   test_str = strpbrk(path, ":[<^");
-  if(test_str == NULL) {
+  if(!test_str) {
     return (char *)path;
   }
 
@@ -119,7 +119,7 @@
 
   /* first use the DECC getenv() function */
   result = decc$getenv(envvar);
-  if(result == NULL) {
+  if(!result) {
     return result;
   }
 
@@ -154,7 +154,7 @@
 #endif
 
   my_passwd = decc_getpwuid(uid);
-  if(my_passwd == NULL) {
+  if(!my_passwd) {
     return my_passwd;
   }
 
diff --git a/lib/setup-win32.h b/lib/setup-win32.h
index d20662a..c35dec8 100644
--- a/lib/setup-win32.h
+++ b/lib/setup-win32.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/sha256.c b/lib/sha256.c
index ee5d273..c34f97e 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -6,11 +6,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2017, Florin Petriuc, <petriuc.florin@gmail.com>
- * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,6 +27,7 @@
 
 #include "warnless.h"
 #include "curl_sha256.h"
+#include "curl_hmac.h"
 
 #if defined(USE_OPENSSL)
 
@@ -49,11 +50,10 @@
 /* Please keep the SSL backend-specific #if branches in this order:
  *
  * 1. USE_OPENSSL
- * 2. USE_GNUTLS_NETTLE
- * 3. USE_GNUTLS
- * 4. USE_MBEDTLS
- * 5. USE_COMMON_CRYPTO
- * 6. USE_WIN32_CRYPTO
+ * 2. USE_GNUTLS
+ * 3. USE_MBEDTLS
+ * 4. USE_COMMON_CRYPTO
+ * 5. USE_WIN32_CRYPTO
  *
  * This ensures that the same SSL branch gets activated throughout this source
  * file even if multiple backends are enabled at the same time.
@@ -64,7 +64,7 @@
 /* When OpenSSL is available we use the SHA256-function from OpenSSL */
 #include <openssl/sha.h>
 
-#elif defined(USE_GNUTLS_NETTLE)
+#elif defined(USE_GNUTLS)
 
 #include <nettle/sha.h>
 
@@ -92,35 +92,6 @@
   sha256_digest(ctx, SHA256_DIGEST_SIZE, digest);
 }
 
-#elif defined(USE_GNUTLS)
-
-#include <gcrypt.h>
-
-#include "curl_memory.h"
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-typedef gcry_md_hd_t SHA256_CTX;
-
-static void SHA256_Init(SHA256_CTX *ctx)
-{
-  gcry_md_open(ctx, GCRY_MD_SHA256, 0);
-}
-
-static void SHA256_Update(SHA256_CTX *ctx,
-                          const unsigned char *data,
-                          unsigned int length)
-{
-  gcry_md_write(*ctx, data, length);
-}
-
-static void SHA256_Final(unsigned char *digest, SHA256_CTX *ctx)
-{
-  memcpy(digest, gcry_md_read(*ctx, 0), SHA256_DIGEST_LENGTH);
-  gcry_md_close(*ctx);
-}
-
 #elif defined(USE_MBEDTLS)
 
 #include <mbedtls/sha256.h>
@@ -343,11 +314,14 @@
   }
 
   /* Compress */
-#define RND(a,b,c,d,e,f,g,h,i)                                  \
-  unsigned long t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \
-  unsigned long t1 = Sigma0(a) + Maj(a, b, c);                  \
-  d += t0;                                                      \
-  h = t0 + t1;
+#define RND(a,b,c,d,e,f,g,h,i)                                          \
+  do {                                                                  \
+    unsigned long t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i];       \
+    unsigned long t1 = Sigma0(a) + Maj(a, b, c);                        \
+    d += t0;                                                            \
+    h = t0 + t1;                                                        \
+  } while(0)
+
   for(i = 0; i < 64; ++i) {
     unsigned long t;
     RND(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], i);
@@ -491,4 +465,23 @@
   SHA256_Final(output, &ctx);
 }
 
+
+const struct HMAC_params Curl_HMAC_SHA256[] = {
+  {
+    /* Hash initialization function. */
+    CURLX_FUNCTION_CAST(HMAC_hinit_func, SHA256_Init),
+    /* Hash update function. */
+    CURLX_FUNCTION_CAST(HMAC_hupdate_func, SHA256_Update),
+    /* Hash computation end function. */
+    CURLX_FUNCTION_CAST(HMAC_hfinal_func, SHA256_Final),
+    /* Size of hash context structure. */
+    sizeof(SHA256_CTX),
+    /* Maximum key length. */
+    64,
+    /* Result size. */
+    32
+  }
+};
+
+
 #endif /* CURL_DISABLE_CRYPTO_AUTH */
diff --git a/lib/share.c b/lib/share.c
index 407ac34..9c43c8f 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -37,6 +37,7 @@
 {
   struct Curl_share *share = calloc(1, sizeof(struct Curl_share));
   if(share) {
+    share->magic = CURL_GOOD_SHARE;
     share->specifier |= (1<<CURL_LOCK_DATA_SHARE);
 
     if(Curl_mk_dnscache(&share->hostcache)) {
@@ -59,6 +60,9 @@
   void *ptr;
   CURLSHcode res = CURLSHE_OK;
 
+  if(!GOOD_SHARE_HANDLE(share))
+    return CURLSHE_INVALID;
+
   if(share->dirty)
     /* don't allow setting options while one or more handles are already
        using this share */
@@ -184,7 +188,7 @@
 CURLSHcode
 curl_share_cleanup(struct Curl_share *share)
 {
-  if(share == NULL)
+  if(!GOOD_SHARE_HANDLE(share))
     return CURLSHE_INVALID;
 
   if(share->lockfunc)
@@ -218,6 +222,7 @@
 
   if(share->unlockfunc)
     share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
+  share->magic = 0;
   free(share);
 
   return CURLSHE_OK;
@@ -230,7 +235,7 @@
 {
   struct Curl_share *share = data->share;
 
-  if(share == NULL)
+  if(!share)
     return CURLSHE_INVALID;
 
   if(share->specifier & (1<<type)) {
@@ -247,7 +252,7 @@
 {
   struct Curl_share *share = data->share;
 
-  if(share == NULL)
+  if(!share)
     return CURLSHE_INVALID;
 
   if(share->specifier & (1<<type)) {
diff --git a/lib/share.h b/lib/share.h
index aa964b6..222e34b 100644
--- a/lib/share.h
+++ b/lib/share.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -37,8 +37,12 @@
 #define CURL_VOLATILE volatile
 #endif
 
+#define CURL_GOOD_SHARE 0x7e117a1e
+#define GOOD_SHARE_HANDLE(x) ((x) && (x)->magic == CURL_GOOD_SHARE)
+
 /* this struct is libcurl-private, don't export details */
 struct Curl_share {
+  unsigned int magic; /* CURL_GOOD_SHARE */
   unsigned int specifier;
   CURL_VOLATILE unsigned int dirty;
 
diff --git a/lib/sigpipe.h b/lib/sigpipe.h
index 3960a13..d6ec5fc 100644
--- a/lib/sigpipe.h
+++ b/lib/sigpipe.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,7 +24,7 @@
 #include "curl_setup.h"
 
 #if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) &&        \
-  (defined(USE_OPENSSL) || defined(USE_MBEDTLS))
+  (defined(USE_OPENSSL) || defined(USE_MBEDTLS) || defined(USE_WOLFSSL))
 #include <signal.h>
 
 struct sigpipe_ignore {
diff --git a/lib/slist.c b/lib/slist.c
index d27fbe1..907c203 100644
--- a/lib/slist.c
+++ b/lib/slist.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/slist.h b/lib/slist.h
index 799b3c0..3114259 100644
--- a/lib/slist.h
+++ b/lib/slist.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/smb.c b/lib/smb.c
index 41d97b8..fd49cf6 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -5,12 +5,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 2016 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2014, Bill Nagel <wnagel@tycoint.com>, Exacq Technologies
- * Copyright (C) 2016-2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,7 +24,7 @@
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) &&  \
-  (CURL_SIZEOF_CURL_OFF_T > 4)
+  (SIZEOF_CURL_OFF_T > 4)
 
 #define BUILDING_CURL_SMB_C
 
@@ -54,16 +54,20 @@
 #include "memdebug.h"
 
 /* Local API functions */
-static CURLcode smb_setup_connection(struct connectdata *conn);
-static CURLcode smb_connect(struct connectdata *conn, bool *done);
-static CURLcode smb_connection_state(struct connectdata *conn, bool *done);
-static CURLcode smb_do(struct connectdata *conn, bool *done);
-static CURLcode smb_request_state(struct connectdata *conn, bool *done);
-static CURLcode smb_done(struct connectdata *conn, CURLcode status,
+static CURLcode smb_setup_connection(struct Curl_easy *data,
+                                     struct connectdata *conn);
+static CURLcode smb_connect(struct Curl_easy *data, bool *done);
+static CURLcode smb_connection_state(struct Curl_easy *data, bool *done);
+static CURLcode smb_do(struct Curl_easy *data, bool *done);
+static CURLcode smb_request_state(struct Curl_easy *data, bool *done);
+static CURLcode smb_done(struct Curl_easy *data, CURLcode status,
                          bool premature);
-static CURLcode smb_disconnect(struct connectdata *conn, bool dead);
-static int smb_getsock(struct connectdata *conn, curl_socket_t *socks);
-static CURLcode smb_parse_url_path(struct connectdata *conn);
+static CURLcode smb_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn, bool dead);
+static int smb_getsock(struct Curl_easy *data, struct connectdata *conn,
+                       curl_socket_t *socks);
+static CURLcode smb_parse_url_path(struct Curl_easy *data,
+                                   struct connectdata *conn);
 
 /*
  * SMB handler interface
@@ -84,6 +88,7 @@
   smb_disconnect,                       /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_SMB,                             /* defport */
   CURLPROTO_SMB,                        /* protocol */
   CURLPROTO_SMB,                        /* family */
@@ -110,6 +115,7 @@
   smb_disconnect,                       /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_SMBS,                            /* defport */
   CURLPROTO_SMBS,                       /* protocol */
   CURLPROTO_SMB,                        /* family */
@@ -124,13 +130,17 @@
 
 /* Append a string to an SMB message */
 #define MSGCAT(str)                             \
-  strcpy(p, (str));                             \
-  p += strlen(str);
+  do {                                          \
+    strcpy(p, (str));                           \
+    p += strlen(str);                           \
+  } while(0)
 
 /* Append a null-terminated string to an SMB message */
 #define MSGCATNULL(str)                         \
-  strcpy(p, (str));                             \
-  p += strlen(str) + 1;
+  do {                                          \
+    strcpy(p, (str));                           \
+    p += strlen(str) + 1;                       \
+  } while(0)
 
 /* SMB is mostly little endian */
 #if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \
@@ -179,9 +189,9 @@
   CURLcode result;
 };
 
-static void conn_state(struct connectdata *conn, enum smb_conn_state newstate)
+static void conn_state(struct Curl_easy *data, enum smb_conn_state newstate)
 {
-  struct smb_conn *smbc = &conn->proto.smbc;
+  struct smb_conn *smbc = &data->conn->proto.smbc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* For debug purposes */
   static const char * const names[] = {
@@ -194,17 +204,17 @@
   };
 
   if(smbc->state != newstate)
-    infof(conn->data, "SMB conn %p state change from %s to %s\n",
+    infof(data, "SMB conn %p state change from %s to %s",
           (void *)smbc, names[smbc->state], names[newstate]);
 #endif
 
   smbc->state = newstate;
 }
 
-static void request_state(struct connectdata *conn,
+static void request_state(struct Curl_easy *data,
                           enum smb_req_state newstate)
 {
-  struct smb_request *req = conn->data->req.protop;
+  struct smb_request *req = data->req.p.smb;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* For debug purposes */
   static const char * const names[] = {
@@ -220,7 +230,7 @@
   };
 
   if(req->state != newstate)
-    infof(conn->data, "SMB request %p state change from %s to %s\n",
+    infof(data, "SMB request %p state change from %s to %s",
           (void *)req, names[req->state], names[newstate]);
 #endif
 
@@ -229,21 +239,23 @@
 
 /* this should setup things in the connection, not in the easy
    handle */
-static CURLcode smb_setup_connection(struct connectdata *conn)
+static CURLcode smb_setup_connection(struct Curl_easy *data,
+                                     struct connectdata *conn)
 {
   struct smb_request *req;
 
   /* Initialize the request state */
-  conn->data->req.protop = req = calloc(1, sizeof(struct smb_request));
+  data->req.p.smb = req = calloc(1, sizeof(struct smb_request));
   if(!req)
     return CURLE_OUT_OF_MEMORY;
 
   /* Parse the URL path */
-  return smb_parse_url_path(conn);
+  return smb_parse_url_path(data, conn);
 }
 
-static CURLcode smb_connect(struct connectdata *conn, bool *done)
+static CURLcode smb_connect(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   char *slash;
 
@@ -284,8 +296,9 @@
   return CURLE_OK;
 }
 
-static CURLcode smb_recv_message(struct connectdata *conn, void **msg)
+static CURLcode smb_recv_message(struct Curl_easy *data, void **msg)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   char *buf = smbc->recv_buf;
   ssize_t bytes_read;
@@ -294,7 +307,7 @@
   size_t len = MAX_MESSAGE_SIZE - smbc->got;
   CURLcode result;
 
-  result = Curl_read(conn, FIRSTSOCKET, buf + smbc->got, len, &bytes_read);
+  result = Curl_read(data, FIRSTSOCKET, buf + smbc->got, len, &bytes_read);
   if(result)
     return result;
 
@@ -338,11 +351,12 @@
   smbc->got = 0;
 }
 
-static void smb_format_message(struct connectdata *conn, struct smb_header *h,
+static void smb_format_message(struct Curl_easy *data, struct smb_header *h,
                                unsigned char cmd, size_t len)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
-  struct smb_request *req = conn->data->req.protop;
+  struct smb_request *req = data->req.p.smb;
   unsigned int pid;
 
   memset(h, 0, sizeof(*h));
@@ -359,14 +373,15 @@
   h->pid = smb_swap16((unsigned short) pid);
 }
 
-static CURLcode smb_send(struct connectdata *conn, ssize_t len,
+static CURLcode smb_send(struct Curl_easy *data, ssize_t len,
                          size_t upload_size)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   ssize_t bytes_written;
   CURLcode result;
 
-  result = Curl_write(conn, FIRSTSOCKET, conn->data->state.ulbuf,
+  result = Curl_write(data, FIRSTSOCKET, data->state.ulbuf,
                       len, &bytes_written);
   if(result)
     return result;
@@ -381,8 +396,9 @@
   return CURLE_OK;
 }
 
-static CURLcode smb_flush(struct connectdata *conn)
+static CURLcode smb_flush(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   ssize_t bytes_written;
   ssize_t len = smbc->send_size - smbc->sent;
@@ -391,8 +407,8 @@
   if(!smbc->send_size)
     return CURLE_OK;
 
-  result = Curl_write(conn, FIRSTSOCKET,
-                      conn->data->state.ulbuf + smbc->sent,
+  result = Curl_write(data, FIRSTSOCKET,
+                      data->state.ulbuf + smbc->sent,
                       len, &bytes_written);
   if(result)
     return result;
@@ -405,29 +421,30 @@
   return CURLE_OK;
 }
 
-static CURLcode smb_send_message(struct connectdata *conn, unsigned char cmd,
+static CURLcode smb_send_message(struct Curl_easy *data, unsigned char cmd,
                                  const void *msg, size_t msg_len)
 {
-  CURLcode result = Curl_get_upload_buffer(conn->data);
+  CURLcode result = Curl_get_upload_buffer(data);
   if(result)
     return result;
-  smb_format_message(conn, (struct smb_header *)conn->data->state.ulbuf,
+  smb_format_message(data, (struct smb_header *)data->state.ulbuf,
                      cmd, msg_len);
-  memcpy(conn->data->state.ulbuf + sizeof(struct smb_header),
+  memcpy(data->state.ulbuf + sizeof(struct smb_header),
          msg, msg_len);
 
-  return smb_send(conn, sizeof(struct smb_header) + msg_len, 0);
+  return smb_send(data, sizeof(struct smb_header) + msg_len, 0);
 }
 
-static CURLcode smb_send_negotiate(struct connectdata *conn)
+static CURLcode smb_send_negotiate(struct Curl_easy *data)
 {
   const char *msg = "\x00\x0c\x00\x02NT LM 0.12";
 
-  return smb_send_message(conn, SMB_COM_NEGOTIATE, msg, 15);
+  return smb_send_message(data, SMB_COM_NEGOTIATE, msg, 15);
 }
 
-static CURLcode smb_send_setup(struct connectdata *conn)
+static CURLcode smb_send_setup(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   struct smb_setup msg;
   char *p = msg.bytes;
@@ -442,10 +459,10 @@
   if(byte_count > sizeof(msg.bytes))
     return CURLE_FILESIZE_EXCEEDED;
 
-  Curl_ntlm_core_mk_lm_hash(conn->data, conn->passwd, lm_hash);
+  Curl_ntlm_core_mk_lm_hash(data, conn->passwd, lm_hash);
   Curl_ntlm_core_lm_resp(lm_hash, smbc->challenge, lm);
 #ifdef USE_NTRESPONSES
-  Curl_ntlm_core_mk_nt_hash(conn->data, conn->passwd, nt_hash);
+  Curl_ntlm_core_mk_nt_hash(data, conn->passwd, nt_hash);
   Curl_ntlm_core_lm_resp(nt_hash, smbc->challenge, nt);
 #else
   memset(nt, 0, sizeof(nt));
@@ -472,13 +489,14 @@
   byte_count = p - msg.bytes;
   msg.byte_count = smb_swap16((unsigned short)byte_count);
 
-  return smb_send_message(conn, SMB_COM_SETUP_ANDX, &msg,
+  return smb_send_message(data, SMB_COM_SETUP_ANDX, &msg,
                           sizeof(msg) - sizeof(msg.bytes) + byte_count);
 }
 
-static CURLcode smb_send_tree_connect(struct connectdata *conn)
+static CURLcode smb_send_tree_connect(struct Curl_easy *data)
 {
   struct smb_tree_connect msg;
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   char *p = msg.bytes;
 
@@ -499,13 +517,13 @@
   byte_count = p - msg.bytes;
   msg.byte_count = smb_swap16((unsigned short)byte_count);
 
-  return smb_send_message(conn, SMB_COM_TREE_CONNECT_ANDX, &msg,
+  return smb_send_message(data, SMB_COM_TREE_CONNECT_ANDX, &msg,
                           sizeof(msg) - sizeof(msg.bytes) + byte_count);
 }
 
-static CURLcode smb_send_open(struct connectdata *conn)
+static CURLcode smb_send_open(struct Curl_easy *data)
 {
-  struct smb_request *req = conn->data->req.protop;
+  struct smb_request *req = data->req.p.smb;
   struct smb_nt_create msg;
   size_t byte_count;
 
@@ -518,7 +536,7 @@
   byte_count = strlen(req->path);
   msg.name_length = smb_swap16((unsigned short)byte_count);
   msg.share_access = smb_swap32(SMB_FILE_SHARE_ALL);
-  if(conn->data->set.upload) {
+  if(data->set.upload) {
     msg.access = smb_swap32(SMB_GENERIC_READ | SMB_GENERIC_WRITE);
     msg.create_disposition = smb_swap32(SMB_FILE_OVERWRITE_IF);
   }
@@ -529,35 +547,35 @@
   msg.byte_count = smb_swap16((unsigned short) ++byte_count);
   strcpy(msg.bytes, req->path);
 
-  return smb_send_message(conn, SMB_COM_NT_CREATE_ANDX, &msg,
+  return smb_send_message(data, SMB_COM_NT_CREATE_ANDX, &msg,
                           sizeof(msg) - sizeof(msg.bytes) + byte_count);
 }
 
-static CURLcode smb_send_close(struct connectdata *conn)
+static CURLcode smb_send_close(struct Curl_easy *data)
 {
-  struct smb_request *req = conn->data->req.protop;
+  struct smb_request *req = data->req.p.smb;
   struct smb_close msg;
 
   memset(&msg, 0, sizeof(msg));
   msg.word_count = SMB_WC_CLOSE;
   msg.fid = smb_swap16(req->fid);
 
-  return smb_send_message(conn, SMB_COM_CLOSE, &msg, sizeof(msg));
+  return smb_send_message(data, SMB_COM_CLOSE, &msg, sizeof(msg));
 }
 
-static CURLcode smb_send_tree_disconnect(struct connectdata *conn)
+static CURLcode smb_send_tree_disconnect(struct Curl_easy *data)
 {
   struct smb_tree_disconnect msg;
 
   memset(&msg, 0, sizeof(msg));
 
-  return smb_send_message(conn, SMB_COM_TREE_DISCONNECT, &msg, sizeof(msg));
+  return smb_send_message(data, SMB_COM_TREE_DISCONNECT, &msg, sizeof(msg));
 }
 
-static CURLcode smb_send_read(struct connectdata *conn)
+static CURLcode smb_send_read(struct Curl_easy *data)
 {
-  struct smb_request *req = conn->data->req.protop;
-  curl_off_t offset = conn->data->req.offset;
+  struct smb_request *req = data->req.p.smb;
+  curl_off_t offset = data->req.offset;
   struct smb_read msg;
 
   memset(&msg, 0, sizeof(msg));
@@ -569,19 +587,19 @@
   msg.min_bytes = smb_swap16(MAX_PAYLOAD_SIZE);
   msg.max_bytes = smb_swap16(MAX_PAYLOAD_SIZE);
 
-  return smb_send_message(conn, SMB_COM_READ_ANDX, &msg, sizeof(msg));
+  return smb_send_message(data, SMB_COM_READ_ANDX, &msg, sizeof(msg));
 }
 
-static CURLcode smb_send_write(struct connectdata *conn)
+static CURLcode smb_send_write(struct Curl_easy *data)
 {
   struct smb_write *msg;
-  struct smb_request *req = conn->data->req.protop;
-  curl_off_t offset = conn->data->req.offset;
-  curl_off_t upload_size = conn->data->req.size - conn->data->req.bytecount;
-  CURLcode result = Curl_get_upload_buffer(conn->data);
+  struct smb_request *req = data->req.p.smb;
+  curl_off_t offset = data->req.offset;
+  curl_off_t upload_size = data->req.size - data->req.bytecount;
+  CURLcode result = Curl_get_upload_buffer(data);
   if(result)
     return result;
-  msg = (struct smb_write *)conn->data->state.ulbuf;
+  msg = (struct smb_write *)data->state.ulbuf;
 
   if(upload_size >= MAX_PAYLOAD_SIZE - 1) /* There is one byte of padding */
     upload_size = MAX_PAYLOAD_SIZE - 1;
@@ -596,25 +614,25 @@
   msg->data_offset = smb_swap16(sizeof(*msg) - sizeof(unsigned int));
   msg->byte_count = smb_swap16((unsigned short) (upload_size + 1));
 
-  smb_format_message(conn, &msg->h, SMB_COM_WRITE_ANDX,
+  smb_format_message(data, &msg->h, SMB_COM_WRITE_ANDX,
                      sizeof(*msg) - sizeof(msg->h) + (size_t) upload_size);
 
-  return smb_send(conn, sizeof(*msg), (size_t) upload_size);
+  return smb_send(data, sizeof(*msg), (size_t) upload_size);
 }
 
-static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg)
+static CURLcode smb_send_and_recv(struct Curl_easy *data, void **msg)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   CURLcode result;
   *msg = NULL; /* if it returns early */
 
   /* Check if there is data in the transfer buffer */
   if(!smbc->send_size && smbc->upload_size) {
-    size_t nread = smbc->upload_size > conn->data->set.upload_buffer_size ?
-      conn->data->set.upload_buffer_size :
-      smbc->upload_size;
-    conn->data->req.upload_fromhere = conn->data->state.ulbuf;
-    result = Curl_fillreadbuffer(conn, nread, &nread);
+    size_t nread = smbc->upload_size > (size_t)data->set.upload_buffer_size ?
+      (size_t)data->set.upload_buffer_size : smbc->upload_size;
+    data->req.upload_fromhere = data->state.ulbuf;
+    result = Curl_fillreadbuffer(data, nread, &nread);
     if(result && result != CURLE_AGAIN)
       return result;
     if(!nread)
@@ -627,7 +645,7 @@
 
   /* Check if there is data to send */
   if(smbc->send_size) {
-    result = smb_flush(conn);
+    result = smb_flush(data);
     if(result)
       return result;
   }
@@ -636,11 +654,12 @@
   if(smbc->send_size || smbc->upload_size)
     return CURLE_AGAIN;
 
-  return smb_recv_message(conn, msg);
+  return smb_recv_message(data, msg);
 }
 
-static CURLcode smb_connection_state(struct connectdata *conn, bool *done)
+static CURLcode smb_connection_state(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
   struct smb_negotiate_response *nrsp;
   struct smb_header *h;
@@ -651,7 +670,8 @@
 #ifdef USE_SSL
     if((conn->handler->flags & PROTOPT_SSL)) {
       bool ssl_done = FALSE;
-      result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &ssl_done);
+      result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                            FIRSTSOCKET, &ssl_done);
       if(result && result != CURLE_AGAIN)
         return result;
       if(!ssl_done)
@@ -659,17 +679,17 @@
     }
 #endif
 
-    result = smb_send_negotiate(conn);
+    result = smb_send_negotiate(data);
     if(result) {
       connclose(conn, "SMB: failed to send negotiate message");
       return result;
     }
 
-    conn_state(conn, SMB_NEGOTIATE);
+    conn_state(data, SMB_NEGOTIATE);
   }
 
   /* Send the previous message and check for a response */
-  result = smb_send_and_recv(conn, &msg);
+  result = smb_send_and_recv(data, &msg);
   if(result && result != CURLE_AGAIN) {
     connclose(conn, "SMB: failed to communicate");
     return result;
@@ -690,12 +710,12 @@
     nrsp = msg;
     memcpy(smbc->challenge, nrsp->bytes, sizeof(smbc->challenge));
     smbc->session_key = smb_swap32(nrsp->session_key);
-    result = smb_send_setup(conn);
+    result = smb_send_setup(data);
     if(result) {
       connclose(conn, "SMB: failed to send setup message");
       return result;
     }
-    conn_state(conn, SMB_SETUP);
+    conn_state(data, SMB_SETUP);
     break;
 
   case SMB_SETUP:
@@ -704,7 +724,7 @@
       return CURLE_LOGIN_DENIED;
     }
     smbc->uid = smb_swap16(h->uid);
-    conn_state(conn, SMB_CONNECTED);
+    conn_state(data, SMB_CONNECTED);
     *done = true;
     break;
 
@@ -736,9 +756,10 @@
     *out = (time_t) timestamp;
 }
 
-static CURLcode smb_request_state(struct connectdata *conn, bool *done)
+static CURLcode smb_request_state(struct Curl_easy *data, bool *done)
 {
-  struct smb_request *req = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct smb_request *req = data->req.p.smb;
   struct smb_header *h;
   struct smb_conn *smbc = &conn->proto.smbc;
   enum smb_req_state next_state = SMB_DONE;
@@ -750,17 +771,17 @@
 
   /* Start the request */
   if(req->state == SMB_REQUESTING) {
-    result = smb_send_tree_connect(conn);
+    result = smb_send_tree_connect(data);
     if(result) {
       connclose(conn, "SMB: failed to send tree connect message");
       return result;
     }
 
-    request_state(conn, SMB_TREE_CONNECT);
+    request_state(data, SMB_TREE_CONNECT);
   }
 
   /* Send the previous message and check for a response */
-  result = smb_send_and_recv(conn, &msg);
+  result = smb_send_and_recv(data, &msg);
   if(result && result != CURLE_AGAIN) {
     connclose(conn, "SMB: failed to communicate");
     return result;
@@ -793,23 +814,23 @@
     }
     smb_m = (const struct smb_nt_create_response*) msg;
     req->fid = smb_swap16(smb_m->fid);
-    conn->data->req.offset = 0;
-    if(conn->data->set.upload) {
-      conn->data->req.size = conn->data->state.infilesize;
-      Curl_pgrsSetUploadSize(conn->data, conn->data->req.size);
+    data->req.offset = 0;
+    if(data->set.upload) {
+      data->req.size = data->state.infilesize;
+      Curl_pgrsSetUploadSize(data, data->req.size);
       next_state = SMB_UPLOAD;
     }
     else {
       smb_m = (const struct smb_nt_create_response*) msg;
-      conn->data->req.size = smb_swap64(smb_m->end_of_file);
-      if(conn->data->req.size < 0) {
+      data->req.size = smb_swap64(smb_m->end_of_file);
+      if(data->req.size < 0) {
         req->result = CURLE_WEIRD_SERVER_REPLY;
         next_state = SMB_CLOSE;
       }
       else {
-        Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size);
-        if(conn->data->set.get_filetime)
-          get_posix_time(&conn->data->info.filetime, smb_m->last_change_time);
+        Curl_pgrsSetDownloadSize(data, data->req.size);
+        if(data->set.get_filetime)
+          get_posix_time(&data->info.filetime, smb_m->last_change_time);
         next_state = SMB_DOWNLOAD;
       }
     }
@@ -827,11 +848,11 @@
                          sizeof(struct smb_header) + 13);
     if(len > 0) {
       if(off + sizeof(unsigned int) + len > smbc->got) {
-        failf(conn->data, "Invalid input packet");
+        failf(data, "Invalid input packet");
         result = CURLE_RECV_ERROR;
       }
       else
-        result = Curl_client_write(conn, CLIENTWRITE_BODY,
+        result = Curl_client_write(data, CLIENTWRITE_BODY,
                                    (char *)msg + off + sizeof(unsigned int),
                                    len);
       if(result) {
@@ -840,9 +861,9 @@
         break;
       }
     }
-    conn->data->req.bytecount += len;
-    conn->data->req.offset += len;
-    Curl_pgrsSetDownloadCounter(conn->data, conn->data->req.bytecount);
+    data->req.bytecount += len;
+    data->req.offset += len;
+    Curl_pgrsSetDownloadCounter(data, data->req.bytecount);
     next_state = (len < MAX_PAYLOAD_SIZE) ? SMB_CLOSE : SMB_DOWNLOAD;
     break;
 
@@ -854,10 +875,10 @@
     }
     len = Curl_read16_le(((const unsigned char *) msg) +
                          sizeof(struct smb_header) + 5);
-    conn->data->req.bytecount += len;
-    conn->data->req.offset += len;
-    Curl_pgrsSetUploadCounter(conn->data, conn->data->req.bytecount);
-    if(conn->data->req.bytecount >= conn->data->req.size)
+    data->req.bytecount += len;
+    data->req.offset += len;
+    Curl_pgrsSetUploadCounter(data, data->req.bytecount);
+    if(data->req.bytecount >= data->req.size)
       next_state = SMB_CLOSE;
     else
       next_state = SMB_UPLOAD;
@@ -881,23 +902,23 @@
 
   switch(next_state) {
   case SMB_OPEN:
-    result = smb_send_open(conn);
+    result = smb_send_open(data);
     break;
 
   case SMB_DOWNLOAD:
-    result = smb_send_read(conn);
+    result = smb_send_read(data);
     break;
 
   case SMB_UPLOAD:
-    result = smb_send_write(conn);
+    result = smb_send_write(data);
     break;
 
   case SMB_CLOSE:
-    result = smb_send_close(conn);
+    result = smb_send_close(data);
     break;
 
   case SMB_TREE_DISCONNECT:
-    result = smb_send_tree_disconnect(conn);
+    result = smb_send_tree_disconnect(data);
     break;
 
   case SMB_DONE:
@@ -914,37 +935,42 @@
     return result;
   }
 
-  request_state(conn, next_state);
+  request_state(data, next_state);
 
   return CURLE_OK;
 }
 
-static CURLcode smb_done(struct connectdata *conn, CURLcode status,
+static CURLcode smb_done(struct Curl_easy *data, CURLcode status,
                          bool premature)
 {
   (void) premature;
-  Curl_safefree(conn->data->req.protop);
+  Curl_safefree(data->req.p.smb);
   return status;
 }
 
-static CURLcode smb_disconnect(struct connectdata *conn, bool dead)
+static CURLcode smb_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn, bool dead)
 {
   struct smb_conn *smbc = &conn->proto.smbc;
   (void) dead;
+  (void) data;
   Curl_safefree(smbc->share);
   Curl_safefree(smbc->domain);
   Curl_safefree(smbc->recv_buf);
   return CURLE_OK;
 }
 
-static int smb_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int smb_getsock(struct Curl_easy *data,
+                       struct connectdata *conn, curl_socket_t *socks)
 {
+  (void)data;
   socks[0] = conn->sock[FIRSTSOCKET];
   return GETSOCK_READSOCK(0) | GETSOCK_WRITESOCK(0);
 }
 
-static CURLcode smb_do(struct connectdata *conn, bool *done)
+static CURLcode smb_do(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct smb_conn *smbc = &conn->proto.smbc;
 
   *done = FALSE;
@@ -954,10 +980,10 @@
   return CURLE_URL_MALFORMAT;
 }
 
-static CURLcode smb_parse_url_path(struct connectdata *conn)
+static CURLcode smb_parse_url_path(struct Curl_easy *data,
+                                   struct connectdata *conn)
 {
-  struct Curl_easy *data = conn->data;
-  struct smb_request *req = data->req.protop;
+  struct smb_request *req = data->req.p.smb;
   struct smb_conn *smbc = &conn->proto.smbc;
   char *path;
   char *slash;
@@ -997,4 +1023,4 @@
 }
 
 #endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
-          CURL_SIZEOF_CURL_OFF_T > 4 */
+          SIZEOF_CURL_OFF_T > 4 */
diff --git a/lib/smb.h b/lib/smb.h
index ff0a354..0e3c2ec 100644
--- a/lib/smb.h
+++ b/lib/smb.h
@@ -8,11 +8,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2014, Bill Nagel <wnagel@tycoint.com>, Exacq Technologies
- * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -244,12 +244,12 @@
 #endif /* BUILDING_CURL_SMB_C */
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
-    (CURL_SIZEOF_CURL_OFF_T > 4)
+    (SIZEOF_CURL_OFF_T > 4)
 
 extern const struct Curl_handler Curl_handler_smb;
 extern const struct Curl_handler Curl_handler_smbs;
 
 #endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
-          CURL_SIZEOF_CURL_OFF_T > 4 */
+          SIZEOF_CURL_OFF_T > 4 */
 
 #endif /* HEADER_CURL_SMB_H */
diff --git a/lib/smtp.c b/lib/smtp.c
index 49743c0..1a3da15 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -91,24 +91,29 @@
 #include "memdebug.h"
 
 /* Local API functions */
-static CURLcode smtp_regular_transfer(struct connectdata *conn, bool *done);
-static CURLcode smtp_do(struct connectdata *conn, bool *done);
-static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
+static CURLcode smtp_regular_transfer(struct Curl_easy *data, bool *done);
+static CURLcode smtp_do(struct Curl_easy *data, bool *done);
+static CURLcode smtp_done(struct Curl_easy *data, CURLcode status,
                           bool premature);
-static CURLcode smtp_connect(struct connectdata *conn, bool *done);
-static CURLcode smtp_disconnect(struct connectdata *conn, bool dead);
-static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done);
-static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks);
-static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done);
-static CURLcode smtp_setup_connection(struct connectdata *conn);
+static CURLcode smtp_connect(struct Curl_easy *data, bool *done);
+static CURLcode smtp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead);
+static CURLcode smtp_multi_statemach(struct Curl_easy *data, bool *done);
+static int smtp_getsock(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks);
+static CURLcode smtp_doing(struct Curl_easy *data, bool *dophase_done);
+static CURLcode smtp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
 static CURLcode smtp_parse_url_options(struct connectdata *conn);
-static CURLcode smtp_parse_url_path(struct connectdata *conn);
-static CURLcode smtp_parse_custom_request(struct connectdata *conn);
-static CURLcode smtp_parse_address(struct connectdata *conn, const char *fqma,
+static CURLcode smtp_parse_url_path(struct Curl_easy *data);
+static CURLcode smtp_parse_custom_request(struct Curl_easy *data);
+static CURLcode smtp_parse_address(struct Curl_easy *data, const char *fqma,
                                    char **address, struct hostname *host);
-static CURLcode smtp_perform_auth(struct connectdata *conn, const char *mech,
+static CURLcode smtp_perform_auth(struct Curl_easy *data,
+                                  struct connectdata *conn, const char *mech,
                                   const char *initresp);
-static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp);
+static CURLcode smtp_continue_auth(struct Curl_easy *data,
+                                   struct connectdata *conn, const char *resp);
 static void smtp_get_message(char *buffer, char **outptr);
 
 /*
@@ -131,6 +136,7 @@
   smtp_disconnect,                  /* disconnect */
   ZERO_NULL,                        /* readwrite */
   ZERO_NULL,                        /* connection_check */
+  ZERO_NULL,                        /* attach connection */
   PORT_SMTP,                        /* defport */
   CURLPROTO_SMTP,                   /* protocol */
   CURLPROTO_SMTP,                   /* family */
@@ -159,6 +165,7 @@
   smtp_disconnect,                  /* disconnect */
   ZERO_NULL,                        /* readwrite */
   ZERO_NULL,                        /* connection_check */
+  ZERO_NULL,                        /* attach connection */
   PORT_SMTPS,                       /* defport */
   CURLPROTO_SMTPS,                  /* protocol */
   CURLPROTO_SMTP,                   /* family */
@@ -199,11 +206,12 @@
  * also detects various capabilities from the EHLO response including the
  * supported authentication mechanisms.
  */
-static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len,
-                           int *resp)
+static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
+                           char *line, size_t len, int *resp)
 {
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   bool result = FALSE;
+  (void)data;
 
   /* Nothing for us */
   if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2]))
@@ -277,9 +285,9 @@
  *
  * This is the ONLY way to change SMTP state!
  */
-static void state(struct connectdata *conn, smtpstate newstate)
+static void state(struct Curl_easy *data, smtpstate newstate)
 {
-  struct smtp_conn *smtpc = &conn->proto.smtpc;
+  struct smtp_conn *smtpc = &data->conn->proto.smtpc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
   static const char * const names[] = {
@@ -300,7 +308,7 @@
   };
 
   if(smtpc->state != newstate)
-    infof(conn->data, "SMTP %p state change from %s to %s\n",
+    infof(data, "SMTP %p state change from %s to %s",
           (void *)smtpc, names[smtpc->state], names[newstate]);
 #endif
 
@@ -314,9 +322,10 @@
  * Sends the EHLO command to not only initialise communication with the ESMTP
  * server but to also obtain a list of server side supported capabilities.
  */
-static CURLcode smtp_perform_ehlo(struct connectdata *conn)
+static CURLcode smtp_perform_ehlo(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 
   smtpc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanism yet */
@@ -326,10 +335,10 @@
   smtpc->auth_supported = FALSE;          /* Clear the AUTH capability */
 
   /* Send the EHLO command */
-  result = Curl_pp_sendf(&smtpc->pp, "EHLO %s", smtpc->domain);
+  result = Curl_pp_sendf(data, &smtpc->pp, "EHLO %s", smtpc->domain);
 
   if(!result)
-    state(conn, SMTP_EHLO);
+    state(data, SMTP_EHLO);
 
   return result;
 }
@@ -340,7 +349,8 @@
  *
  * Sends the HELO command to initialise communication with the SMTP server.
  */
-static CURLcode smtp_perform_helo(struct connectdata *conn)
+static CURLcode smtp_perform_helo(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
@@ -349,10 +359,10 @@
                                             in smtp connections */
 
   /* Send the HELO command */
-  result = Curl_pp_sendf(&smtpc->pp, "HELO %s", smtpc->domain);
+  result = Curl_pp_sendf(data, &smtpc->pp, "HELO %s", smtpc->domain);
 
   if(!result)
-    state(conn, SMTP_HELO);
+    state(data, SMTP_HELO);
 
   return result;
 }
@@ -363,13 +373,15 @@
  *
  * Sends the STLS command to start the upgrade to TLS.
  */
-static CURLcode smtp_perform_starttls(struct connectdata *conn)
+static CURLcode smtp_perform_starttls(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   /* Send the STARTTLS command */
-  CURLcode result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "STARTTLS");
+  CURLcode result = Curl_pp_sendf(data, &conn->proto.smtpc.pp,
+                                  "%s", "STARTTLS");
 
   if(!result)
-    state(conn, SMTP_STARTTLS);
+    state(data, SMTP_STARTTLS);
 
   return result;
 }
@@ -380,20 +392,22 @@
  *
  * Performs the upgrade to TLS.
  */
-static CURLcode smtp_perform_upgrade_tls(struct connectdata *conn)
+static CURLcode smtp_perform_upgrade_tls(struct Curl_easy *data)
 {
   /* Start the SSL connection */
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
-  CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET,
+  CURLcode result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                                 FIRSTSOCKET,
                                                  &smtpc->ssldone);
 
   if(!result) {
     if(smtpc->state != SMTP_UPGRADETLS)
-      state(conn, SMTP_UPGRADETLS);
+      state(data, SMTP_UPGRADETLS);
 
     if(smtpc->ssldone) {
       smtp_to_smtps(conn);
-      result = smtp_perform_ehlo(conn);
+      result = smtp_perform_ehlo(data);
     }
   }
 
@@ -407,7 +421,8 @@
  * Sends an AUTH command allowing the client to login with the given SASL
  * authentication mechanism.
  */
-static CURLcode smtp_perform_auth(struct connectdata *conn,
+static CURLcode smtp_perform_auth(struct Curl_easy *data,
+                                  struct connectdata *conn,
                                   const char *mech,
                                   const char *initresp)
 {
@@ -416,11 +431,11 @@
 
   if(initresp) {                                  /* AUTH <mech> ...<crlf> */
     /* Send the AUTH command with the initial response */
-    result = Curl_pp_sendf(&smtpc->pp, "AUTH %s %s", mech, initresp);
+    result = Curl_pp_sendf(data, &smtpc->pp, "AUTH %s %s", mech, initresp);
   }
   else {
     /* Send the AUTH command */
-    result = Curl_pp_sendf(&smtpc->pp, "AUTH %s", mech);
+    result = Curl_pp_sendf(data, &smtpc->pp, "AUTH %s", mech);
   }
 
   return result;
@@ -432,11 +447,12 @@
  *
  * Sends SASL continuation data or cancellation.
  */
-static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp)
+static CURLcode smtp_continue_auth(struct Curl_easy *data,
+                                   struct connectdata *conn, const char *resp)
 {
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 
-  return Curl_pp_sendf(&smtpc->pp, "%s", resp);
+  return Curl_pp_sendf(data, &smtpc->pp, "%s", resp);
 }
 
 /***********************************************************************
@@ -446,9 +462,10 @@
  * Initiates the authentication sequence, with the appropriate SASL
  * authentication mechanism.
  */
-static CURLcode smtp_perform_authentication(struct connectdata *conn)
+static CURLcode smtp_perform_authentication(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   saslprogress progress;
 
@@ -456,19 +473,19 @@
      server supports authentiation, and end the connect phase if not */
   if(!smtpc->auth_supported ||
      !Curl_sasl_can_authenticate(&smtpc->sasl, conn)) {
-    state(conn, SMTP_STOP);
+    state(data, SMTP_STOP);
     return result;
   }
 
   /* Calculate the SASL login details */
-  result = Curl_sasl_start(&smtpc->sasl, conn, FALSE, &progress);
+  result = Curl_sasl_start(&smtpc->sasl, data, conn, FALSE, &progress);
 
   if(!result) {
     if(progress == SASL_INPROGRESS)
-      state(conn, SMTP_AUTH);
+      state(data, SMTP_AUTH);
     else {
       /* Other mechanisms not supported */
-      infof(conn->data, "No known authentication mechanisms supported!\n");
+      infof(data, "No known authentication mechanisms supported!");
       result = CURLE_LOGIN_DENIED;
     }
   }
@@ -482,11 +499,11 @@
  *
  * Sends a SMTP based command.
  */
-static CURLcode smtp_perform_command(struct connectdata *conn)
+static CURLcode smtp_perform_command(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SMTP *smtp = data->req.p.smtp;
 
   if(smtp->rcpt) {
     /* We notify the server we are sending UTF-8 data if a) it supports the
@@ -501,7 +518,7 @@
 
       /* Parse the mailbox to verify into the local address and host name
          parts, converting the host name to an IDN A-label if necessary */
-      result = smtp_parse_address(conn, smtp->rcpt->data,
+      result = smtp_parse_address(data, smtp->rcpt->data,
                                   &address, &host);
       if(result)
         return result;
@@ -514,7 +531,7 @@
 
       /* Send the VRFY command (Note: The host name part may be absent when the
          host is a local system) */
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "VRFY %s%s%s%s",
+      result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "VRFY %s%s%s%s",
                              address,
                              host.name ? "@" : "",
                              host.name ? host.name : "",
@@ -530,19 +547,20 @@
              (!strcmp(smtp->custom, "EXPN"));
 
       /* Send the custom recipient based command such as the EXPN command */
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s %s%s", smtp->custom,
+      result = Curl_pp_sendf(data, &conn->proto.smtpc.pp,
+                             "%s %s%s", smtp->custom,
                              smtp->rcpt->data,
                              utf8 ? " SMTPUTF8" : "");
     }
   }
   else
     /* Send the non-recipient based command such as HELP */
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s",
+    result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s",
                            smtp->custom && smtp->custom[0] != '\0' ?
                            smtp->custom : "HELP");
 
   if(!result)
-    state(conn, SMTP_COMMAND);
+    state(data, SMTP_COMMAND);
 
   return result;
 }
@@ -553,13 +571,13 @@
  *
  * Sends an MAIL command to initiate the upload of a message.
  */
-static CURLcode smtp_perform_mail(struct connectdata *conn)
+static CURLcode smtp_perform_mail(struct Curl_easy *data)
 {
   char *from = NULL;
   char *auth = NULL;
   char *size = NULL;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   /* We notify the server we are sending UTF-8 data if a) it supports the
      SMTPUTF8 extension and b) The mailbox contains UTF-8 charaacters, in
@@ -574,7 +592,7 @@
 
     /* Parse the FROM mailbox into the local address and host name parts,
        converting the host name to an IDN A-label if necessary */
-    result = smtp_parse_address(conn, data->set.str[STRING_MAIL_FROM],
+    result = smtp_parse_address(data, data->set.str[STRING_MAIL_FROM],
                                 &address, &host);
     if(result)
       return result;
@@ -612,7 +630,7 @@
 
       /* Parse the AUTH mailbox into the local address and host name parts,
          converting the host name to an IDN A-label if necessary */
-      result = smtp_parse_address(conn, data->set.str[STRING_MAIL_AUTH],
+      result = smtp_parse_address(data, data->set.str[STRING_MAIL_AUTH],
                                   &address, &host);
       if(result) {
         free(from);
@@ -660,7 +678,7 @@
                                        NULL, MIMESTRATEGY_MAIL);
 
     if(!result)
-      if(!Curl_checkheaders(conn, "Mime-Version"))
+      if(!Curl_checkheaders(data, "Mime-Version"))
         result = Curl_mime_add_header(&data->set.mimepost.curlheaders,
                                       "Mime-Version: 1.0");
 
@@ -699,7 +717,7 @@
      any there do, as we need to correctly identify our support for SMTPUTF8
      in the envelope, as per RFC-6531 sect. 3.4 */
   if(conn->proto.smtpc.utf8_supported && !utf8) {
-    struct SMTP *smtp = data->req.protop;
+    struct SMTP *smtp = data->req.p.smtp;
     struct curl_slist *rcpt = smtp->rcpt;
 
     while(rcpt && !utf8) {
@@ -712,7 +730,7 @@
   }
 
   /* Send the MAIL command */
-  result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+  result = Curl_pp_sendf(data, &conn->proto.smtpc.pp,
                          "MAIL FROM:%s%s%s%s%s%s",
                          from,                 /* Mandatory                 */
                          auth ? " AUTH=" : "", /* Optional on AUTH support  */
@@ -727,7 +745,7 @@
   free(size);
 
   if(!result)
-    state(conn, SMTP_MAIL);
+    state(data, SMTP_MAIL);
 
   return result;
 }
@@ -739,35 +757,36 @@
  * Sends a RCPT TO command for a given recipient as part of the message upload
  * process.
  */
-static CURLcode smtp_perform_rcpt_to(struct connectdata *conn)
+static CURLcode smtp_perform_rcpt_to(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SMTP *smtp = data->req.p.smtp;
   char *address = NULL;
   struct hostname host = { NULL, NULL, NULL, NULL };
 
   /* Parse the recipient mailbox into the local address and host name parts,
      converting the host name to an IDN A-label if necessary */
-  result = smtp_parse_address(conn, smtp->rcpt->data,
+  result = smtp_parse_address(data, smtp->rcpt->data,
                               &address, &host);
   if(result)
     return result;
 
   /* Send the RCPT TO command */
   if(host.name)
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s@%s>", address,
-                           host.name);
+    result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "RCPT TO:<%s@%s>",
+                           address, host.name);
   else
     /* An invalid mailbox was provided but we'll simply let the server worry
        about that and reply with a 501 error */
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>", address);
+    result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "RCPT TO:<%s>",
+                           address);
 
   Curl_free_idnconverted_hostname(&host);
   free(address);
 
   if(!result)
-    state(conn, SMTP_RCPT);
+    state(data, SMTP_RCPT);
 
   return result;
 }
@@ -778,25 +797,24 @@
  *
  * Performs the quit action prior to sclose() being called.
  */
-static CURLcode smtp_perform_quit(struct connectdata *conn)
+static CURLcode smtp_perform_quit(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   /* Send the QUIT command */
-  CURLcode result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "QUIT");
+  CURLcode result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", "QUIT");
 
   if(!result)
-    state(conn, SMTP_QUIT);
+    state(data, SMTP_QUIT);
 
   return result;
 }
 
 /* For the initial server greeting */
-static CURLcode smtp_state_servergreet_resp(struct connectdata *conn,
+static CURLcode smtp_state_servergreet_resp(struct Curl_easy *data,
                                             int smtpcode,
                                             smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
@@ -804,19 +822,17 @@
     result = CURLE_WEIRD_SERVER_REPLY;
   }
   else
-    result = smtp_perform_ehlo(conn);
+    result = smtp_perform_ehlo(data);
 
   return result;
 }
 
 /* For STARTTLS responses */
-static CURLcode smtp_state_starttls_resp(struct connectdata *conn,
+static CURLcode smtp_state_starttls_resp(struct Curl_easy *data,
                                          int smtpcode,
                                          smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(smtpcode != 220) {
@@ -825,20 +841,20 @@
       result = CURLE_USE_SSL_FAILED;
     }
     else
-      result = smtp_perform_authentication(conn);
+      result = smtp_perform_authentication(data);
   }
   else
-    result = smtp_perform_upgrade_tls(conn);
+    result = smtp_perform_upgrade_tls(data);
 
   return result;
 }
 
 /* For EHLO responses */
-static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
+static CURLcode smtp_state_ehlo_resp(struct Curl_easy *data,
+                                     struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   const char *line = data->state.buffer;
   size_t len = strlen(line);
@@ -847,7 +863,7 @@
 
   if(smtpcode/100 != 2 && smtpcode != 1) {
     if(data->set.use_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use)
-      result = smtp_perform_helo(conn);
+      result = smtp_perform_helo(data, conn);
     else {
       failf(data, "Remote access denied: %d", smtpcode);
       result = CURLE_REMOTE_ACCESS_DENIED;
@@ -881,7 +897,7 @@
       for(;;) {
         size_t llen;
         size_t wordlen;
-        unsigned int mechbit;
+        unsigned short mechbit;
 
         while(len &&
               (*line == ' ' || *line == '\t' ||
@@ -915,17 +931,17 @@
         /* We don't have a SSL/TLS connection yet, but SSL is requested */
         if(smtpc->tls_supported)
           /* Switch to TLS connection now */
-          result = smtp_perform_starttls(conn);
+          result = smtp_perform_starttls(data, conn);
         else if(data->set.use_ssl == CURLUSESSL_TRY)
           /* Fallback and carry on with authentication */
-          result = smtp_perform_authentication(conn);
+          result = smtp_perform_authentication(data);
         else {
           failf(data, "STARTTLS not supported.");
           result = CURLE_USE_SSL_FAILED;
         }
       }
       else
-        result = smtp_perform_authentication(conn);
+        result = smtp_perform_authentication(data);
     }
   }
   else {
@@ -937,12 +953,10 @@
 }
 
 /* For HELO responses */
-static CURLcode smtp_state_helo_resp(struct connectdata *conn, int smtpcode,
+static CURLcode smtp_state_helo_resp(struct Curl_easy *data, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
@@ -951,28 +965,28 @@
   }
   else
     /* End of connect phase */
-    state(conn, SMTP_STOP);
+    state(data, SMTP_STOP);
 
   return result;
 }
 
 /* For SASL authentication responses */
-static CURLcode smtp_state_auth_resp(struct connectdata *conn,
+static CURLcode smtp_state_auth_resp(struct Curl_easy *data,
                                      int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   saslprogress progress;
 
   (void)instate; /* no use for this yet */
 
-  result = Curl_sasl_continue(&smtpc->sasl, conn, smtpcode, &progress);
+  result = Curl_sasl_continue(&smtpc->sasl, data, conn, smtpcode, &progress);
   if(!result)
     switch(progress) {
     case SASL_DONE:
-      state(conn, SMTP_STOP);  /* Authenticated */
+      state(data, SMTP_STOP);  /* Authenticated */
       break;
     case SASL_IDLE:            /* No mechanism left after cancellation */
       failf(data, "Authentication cancelled");
@@ -986,12 +1000,11 @@
 }
 
 /* For command responses */
-static CURLcode smtp_state_command_resp(struct connectdata *conn, int smtpcode,
+static CURLcode smtp_state_command_resp(struct Curl_easy *data, int smtpcode,
                                         smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct SMTP *smtp = data->req.p.smtp;
   char *line = data->state.buffer;
   size_t len = strlen(line);
 
@@ -1006,7 +1019,7 @@
     /* Temporarily add the LF character back and send as body to the client */
     if(!data->set.opt_no_body) {
       line[len] = '\n';
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
+      result = Curl_client_write(data, CLIENTWRITE_BODY, line, len + 1);
       line[len] = '\0';
     }
 
@@ -1016,15 +1029,15 @@
 
         if(smtp->rcpt) {
           /* Send the next command */
-          result = smtp_perform_command(conn);
+          result = smtp_perform_command(data);
         }
         else
           /* End of DO phase */
-          state(conn, SMTP_STOP);
+          state(data, SMTP_STOP);
       }
       else
         /* End of DO phase */
-        state(conn, SMTP_STOP);
+        state(data, SMTP_STOP);
     }
   }
 
@@ -1032,12 +1045,10 @@
 }
 
 /* For MAIL responses */
-static CURLcode smtp_state_mail_resp(struct connectdata *conn, int smtpcode,
+static CURLcode smtp_state_mail_resp(struct Curl_easy *data, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
@@ -1046,18 +1057,18 @@
   }
   else
     /* Start the RCPT TO command */
-    result = smtp_perform_rcpt_to(conn);
+    result = smtp_perform_rcpt_to(data);
 
   return result;
 }
 
 /* For RCPT responses */
-static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
+static CURLcode smtp_state_rcpt_resp(struct Curl_easy *data,
+                                     struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct SMTP *smtp = data->req.p.smtp;
   bool is_smtp_err = FALSE;
   bool is_smtp_blocking_err = FALSE;
 
@@ -1090,7 +1101,7 @@
 
     if(smtp->rcpt)
       /* Send the next RCPT TO command */
-      result = smtp_perform_rcpt_to(conn);
+      result = smtp_perform_rcpt_to(data);
     else {
       /* We weren't able to issue a successful RCPT TO command while going
          over recipients (potentially multiple). Sending back last error. */
@@ -1100,10 +1111,10 @@
       }
       else {
         /* Send the DATA command */
-        result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "DATA");
+        result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", "DATA");
 
         if(!result)
-          state(conn, SMTP_DATA);
+          state(data, SMTP_DATA);
       }
     }
   }
@@ -1112,12 +1123,10 @@
 }
 
 /* For DATA response */
-static CURLcode smtp_state_data_resp(struct connectdata *conn, int smtpcode,
+static CURLcode smtp_state_data_resp(struct Curl_easy *data, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-
   (void)instate; /* no use for this yet */
 
   if(smtpcode != 354) {
@@ -1132,7 +1141,7 @@
     Curl_setup_transfer(data, -1, -1, FALSE, FIRSTSOCKET);
 
     /* End of DO phase */
-    state(conn, SMTP_STOP);
+    state(data, SMTP_STOP);
   }
 
   return result;
@@ -1140,7 +1149,7 @@
 
 /* For POSTDATA responses, which are received after the entire DATA
    part has been sent to the server */
-static CURLcode smtp_state_postdata_resp(struct connectdata *conn,
+static CURLcode smtp_state_postdata_resp(struct Curl_easy *data,
                                          int smtpcode,
                                          smtpstate instate)
 {
@@ -1152,16 +1161,16 @@
     result = CURLE_RECV_ERROR;
 
   /* End of DONE phase */
-  state(conn, SMTP_STOP);
+  state(data, SMTP_STOP);
 
   return result;
 }
 
-static CURLcode smtp_statemach_act(struct connectdata *conn)
+static CURLcode smtp_statemachine(struct Curl_easy *data,
+                                  struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  struct Curl_easy *data = conn->data;
   int smtpcode;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   struct pingpong *pp = &smtpc->pp;
@@ -1169,15 +1178,15 @@
 
   /* Busy upgrading the connection; right now all I/O is SSL/TLS, not SMTP */
   if(smtpc->state == SMTP_UPGRADETLS)
-    return smtp_perform_upgrade_tls(conn);
+    return smtp_perform_upgrade_tls(data);
 
   /* Flush any data that needs to be sent */
   if(pp->sendleft)
-    return Curl_pp_flushsend(pp);
+    return Curl_pp_flushsend(data, pp);
 
   do {
     /* Read the response from the server */
-    result = Curl_pp_readresp(sock, pp, &smtpcode, &nread);
+    result = Curl_pp_readresp(data, sock, pp, &smtpcode, &nread);
     if(result)
       return result;
 
@@ -1191,50 +1200,50 @@
     /* We have now received a full SMTP server response */
     switch(smtpc->state) {
     case SMTP_SERVERGREET:
-      result = smtp_state_servergreet_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_servergreet_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_EHLO:
-      result = smtp_state_ehlo_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_ehlo_resp(data, conn, smtpcode, smtpc->state);
       break;
 
     case SMTP_HELO:
-      result = smtp_state_helo_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_helo_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_STARTTLS:
-      result = smtp_state_starttls_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_starttls_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_AUTH:
-      result = smtp_state_auth_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_auth_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_COMMAND:
-      result = smtp_state_command_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_command_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_MAIL:
-      result = smtp_state_mail_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_mail_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_RCPT:
-      result = smtp_state_rcpt_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_rcpt_resp(data, conn, smtpcode, smtpc->state);
       break;
 
     case SMTP_DATA:
-      result = smtp_state_data_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_data_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_POSTDATA:
-      result = smtp_state_postdata_resp(conn, smtpcode, smtpc->state);
+      result = smtp_state_postdata_resp(data, smtpcode, smtpc->state);
       break;
 
     case SMTP_QUIT:
       /* fallthrough, just stop! */
     default:
       /* internal error */
-      state(conn, SMTP_STOP);
+      state(data, SMTP_STOP);
       break;
     }
   } while(!result && smtpc->state != SMTP_STOP && Curl_pp_moredata(pp));
@@ -1243,44 +1252,46 @@
 }
 
 /* Called repeatedly until done from multi.c */
-static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done)
+static CURLcode smtp_multi_statemach(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 
   if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone) {
-    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone);
+    result = Curl_ssl_connect_nonblocking(data, conn, FALSE,
+                                          FIRSTSOCKET, &smtpc->ssldone);
     if(result || !smtpc->ssldone)
       return result;
   }
 
-  result = Curl_pp_statemach(&smtpc->pp, FALSE, FALSE);
+  result = Curl_pp_statemach(data, &smtpc->pp, FALSE, FALSE);
   *done = (smtpc->state == SMTP_STOP) ? TRUE : FALSE;
 
   return result;
 }
 
-static CURLcode smtp_block_statemach(struct connectdata *conn,
+static CURLcode smtp_block_statemach(struct Curl_easy *data,
+                                     struct connectdata *conn,
                                      bool disconnecting)
 {
   CURLcode result = CURLE_OK;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 
   while(smtpc->state != SMTP_STOP && !result)
-    result = Curl_pp_statemach(&smtpc->pp, TRUE, disconnecting);
+    result = Curl_pp_statemach(data, &smtpc->pp, TRUE, disconnecting);
 
   return result;
 }
 
 /* Allocate and initialize the SMTP struct for the current Curl_easy if
    required */
-static CURLcode smtp_init(struct connectdata *conn)
+static CURLcode smtp_init(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct SMTP *smtp;
 
-  smtp = data->req.protop = calloc(sizeof(struct SMTP), 1);
+  smtp = data->req.p.smtp = calloc(sizeof(struct SMTP), 1);
   if(!smtp)
     result = CURLE_OUT_OF_MEMORY;
 
@@ -1288,9 +1299,10 @@
 }
 
 /* For the SMTP "protocol connect" and "doing" phases only */
-static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int smtp_getsock(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks)
 {
-  return Curl_pp_getsock(&conn->proto.smtpc.pp, socks);
+  return Curl_pp_getsock(data, &conn->proto.smtpc.pp, socks);
 }
 
 /***********************************************************************
@@ -1303,9 +1315,10 @@
  * The variable pointed to by 'done' will be TRUE if the protocol-layer
  * connect phase is done when this function returns, or FALSE if not.
  */
-static CURLcode smtp_connect(struct connectdata *conn, bool *done)
+static CURLcode smtp_connect(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   struct pingpong *pp = &smtpc->pp;
 
@@ -1314,18 +1327,14 @@
   /* We always support persistent connections in SMTP */
   connkeep(conn, "SMTP default");
 
-  /* Set the default response time-out */
-  pp->response_time = RESP_TIMEOUT;
-  pp->statemach_act = smtp_statemach_act;
-  pp->endofresp = smtp_endofresp;
-  pp->conn = conn;
+  PINGPONG_SETUP(pp, smtp_statemachine, smtp_endofresp);
 
   /* Initialize the SASL storage */
   Curl_sasl_init(&smtpc->sasl, &saslsmtp);
 
   /* Initialise the pingpong layer */
   Curl_pp_setup(pp);
-  Curl_pp_init(pp);
+  Curl_pp_init(data, pp);
 
   /* Parse the URL options */
   result = smtp_parse_url_options(conn);
@@ -1333,14 +1342,14 @@
     return result;
 
   /* Parse the URL path */
-  result = smtp_parse_url_path(conn);
+  result = smtp_parse_url_path(data);
   if(result)
     return result;
 
   /* Start off waiting for the server greeting response */
-  state(conn, SMTP_SERVERGREET);
+  state(data, SMTP_SERVERGREET);
 
-  result = smtp_multi_statemach(conn, done);
+  result = smtp_multi_statemach(data, done);
 
   return result;
 }
@@ -1354,12 +1363,12 @@
  *
  * Input argument is already checked for validity.
  */
-static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
+static CURLcode smtp_done(struct Curl_easy *data, CURLcode status,
                           bool premature)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SMTP *smtp = data->req.p.smtp;
   struct pingpong *pp = &conn->proto.smtpc.pp;
   char *eob;
   ssize_t len;
@@ -1367,7 +1376,7 @@
 
   (void)premature;
 
-  if(!smtp || !pp->conn)
+  if(!smtp)
     return CURLE_OK;
 
   /* Cleanup our per-request based variables */
@@ -1387,7 +1396,7 @@
        fail when using a different pointer following a previous write, that
        returned CURLE_AGAIN, we duplicate the EOB now rather than when the
        bytes written doesn't equal len. */
-    if(smtp->trailing_crlf || !conn->data->state.infilesize) {
+    if(smtp->trailing_crlf || !data->state.infilesize) {
       eob = strdup(&SMTP_EOB[2]);
       len = SMTP_EOB_LEN - 2;
     }
@@ -1400,7 +1409,7 @@
       return CURLE_OUT_OF_MEMORY;
 
     /* Send the end of block data */
-    result = Curl_write(conn, conn->writesockfd, eob, len, &bytes_written);
+    result = Curl_write(data, conn->writesockfd, eob, len, &bytes_written);
     if(result) {
       free(eob);
       return result;
@@ -1420,14 +1429,14 @@
       free(eob);
     }
 
-    state(conn, SMTP_POSTDATA);
+    state(data, SMTP_POSTDATA);
 
     /* Run the state-machine */
-    result = smtp_block_statemach(conn, FALSE);
+    result = smtp_block_statemach(data, conn, FALSE);
   }
 
   /* Clear the transfer mode for the next request */
-  smtp->transfer = FTPTRANSFER_BODY;
+  smtp->transfer = PPTRANSFER_BODY;
 
   return result;
 }
@@ -1439,19 +1448,19 @@
  * This is the actual DO function for SMTP. Transfer a mail, send a command
  * or get some data according to the options previously setup.
  */
-static CURLcode smtp_perform(struct connectdata *conn, bool *connected,
+static CURLcode smtp_perform(struct Curl_easy *data, bool *connected,
                              bool *dophase_done)
 {
   /* This is SMTP and no proxy */
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SMTP *smtp = data->req.p.smtp;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
   if(data->set.opt_no_body) {
     /* Requested no body means no transfer */
-    smtp->transfer = FTPTRANSFER_INFO;
+    smtp->transfer = PPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
@@ -1473,21 +1482,21 @@
   /* Start the first command in the DO phase */
   if((data->set.upload || data->set.mimepost.kind) && data->set.mail_rcpt)
     /* MAIL transfer */
-    result = smtp_perform_mail(conn);
+    result = smtp_perform_mail(data);
   else
     /* SMTP based command (VRFY, EXPN, NOOP, RSET or HELP) */
-    result = smtp_perform_command(conn);
+    result = smtp_perform_command(data);
 
   if(result)
     return result;
 
   /* Run the state-machine */
-  result = smtp_multi_statemach(conn, dophase_done);
+  result = smtp_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done)
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
 
   return result;
 }
@@ -1501,18 +1510,17 @@
  *
  * The input argument is already checked for validity.
  */
-static CURLcode smtp_do(struct connectdata *conn, bool *done)
+static CURLcode smtp_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result = CURLE_OK;
-
   *done = FALSE; /* default to false */
 
   /* Parse the custom request */
-  result = smtp_parse_custom_request(conn);
+  result = smtp_parse_custom_request(data);
   if(result)
     return result;
 
-  result = smtp_regular_transfer(conn, done);
+  result = smtp_regular_transfer(data, done);
 
   return result;
 }
@@ -1524,19 +1532,21 @@
  * Disconnect from an SMTP server. Cleanup protocol-specific per-connection
  * resources. BLOCKING.
  */
-static CURLcode smtp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode smtp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
+                                bool dead_connection)
 {
   struct smtp_conn *smtpc = &conn->proto.smtpc;
+  (void)data;
 
   /* We cannot send quit unconditionally. If this connection is stale or
      bad in any way, sending quit and waiting around here will make the
      disconnect wait in vain and cause more problems than we need to. */
 
-  /* The SMTP session may or may not have been allocated/setup at this
-     point! */
-  if(!dead_connection && smtpc->pp.conn && smtpc->pp.conn->bits.protoconnstart)
-    if(!smtp_perform_quit(conn))
-      (void)smtp_block_statemach(conn, TRUE); /* ignore errors on QUIT */
+  if(!dead_connection && conn->bits.protoconnstart) {
+    if(!smtp_perform_quit(data, conn))
+      (void)smtp_block_statemach(data, conn, TRUE); /* ignore errors on QUIT */
+  }
 
   /* Disconnect from the server */
   Curl_pp_disconnect(&smtpc->pp);
@@ -1551,30 +1561,30 @@
 }
 
 /* Call this when the DO phase has completed */
-static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected)
+static CURLcode smtp_dophase_done(struct Curl_easy *data, bool connected)
 {
-  struct SMTP *smtp = conn->data->req.protop;
+  struct SMTP *smtp = data->req.p.smtp;
 
   (void)connected;
 
-  if(smtp->transfer != FTPTRANSFER_BODY)
+  if(smtp->transfer != PPTRANSFER_BODY)
     /* no data to transfer */
-    Curl_setup_transfer(conn->data, -1, -1, FALSE, -1);
+    Curl_setup_transfer(data, -1, -1, FALSE, -1);
 
   return CURLE_OK;
 }
 
 /* Called from multi.c while DOing */
-static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done)
+static CURLcode smtp_doing(struct Curl_easy *data, bool *dophase_done)
 {
-  CURLcode result = smtp_multi_statemach(conn, dophase_done);
+  CURLcode result = smtp_multi_statemach(data, dophase_done);
 
   if(result)
-    DEBUGF(infof(conn->data, "DO phase failed\n"));
+    DEBUGF(infof(data, "DO phase failed"));
   else if(*dophase_done) {
-    result = smtp_dophase_done(conn, FALSE /* not connected */);
+    result = smtp_dophase_done(data, FALSE /* not connected */);
 
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
@@ -1589,12 +1599,11 @@
  * Performs all commands done before a regular transfer between a local and a
  * remote host.
  */
-static CURLcode smtp_regular_transfer(struct connectdata *conn,
+static CURLcode smtp_regular_transfer(struct Curl_easy *data,
                                       bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
   bool connected = FALSE;
-  struct Curl_easy *data = conn->data;
 
   /* Make sure size is unknown at this point */
   data->req.size = -1;
@@ -1606,16 +1615,17 @@
   Curl_pgrsSetDownloadSize(data, -1);
 
   /* Carry out the perform */
-  result = smtp_perform(conn, &connected, dophase_done);
+  result = smtp_perform(data, &connected, dophase_done);
 
   /* Perform post DO phase operations if necessary */
   if(!result && *dophase_done)
-    result = smtp_dophase_done(conn, connected);
+    result = smtp_dophase_done(data, connected);
 
   return result;
 }
 
-static CURLcode smtp_setup_connection(struct connectdata *conn)
+static CURLcode smtp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   CURLcode result;
 
@@ -1623,7 +1633,7 @@
   conn->bits.tls_upgraded = FALSE;
 
   /* Initialise the SMTP layer */
-  result = smtp_init(conn);
+  result = smtp_init(data);
   if(result)
     return result;
 
@@ -1675,10 +1685,10 @@
  *
  * Parse the URL path into separate path components.
  */
-static CURLcode smtp_parse_url_path(struct connectdata *conn)
+static CURLcode smtp_parse_url_path(struct Curl_easy *data)
 {
   /* The SMTP struct is already initialised in smtp_connect() */
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   const char *path = &data->state.up.path[1]; /* skip leading path */
   char localhost[HOSTNAME_MAX + 1];
@@ -1692,7 +1702,7 @@
   }
 
   /* URL decode the path and use it as the domain in our EHLO */
-  return Curl_urldecode(conn->data, path, 0, &smtpc->domain, NULL,
+  return Curl_urldecode(data, path, 0, &smtpc->domain, NULL,
                         REJECT_CTRL);
 }
 
@@ -1702,11 +1712,10 @@
  *
  * Parse the custom request.
  */
-static CURLcode smtp_parse_custom_request(struct connectdata *conn)
+static CURLcode smtp_parse_custom_request(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct SMTP *smtp = data->req.p.smtp;
   const char *custom = data->set.str[STRING_CUSTOMREQUEST];
 
   /* URL decode the custom request */
@@ -1750,7 +1759,7 @@
  * calling function deems it to be) then the input will simply be returned in
  * the address part with the host name being NULL.
  */
-static CURLcode smtp_parse_address(struct connectdata *conn, const char *fqma,
+static CURLcode smtp_parse_address(struct Curl_easy *data, const char *fqma,
                                    char **address, struct hostname *host)
 {
   CURLcode result = CURLE_OK;
@@ -1775,7 +1784,7 @@
     host->name = host->name + 1;
 
     /* Attempt to convert the host name to IDN ACE */
-    (void) Curl_idnconvert_hostname(conn, host);
+    (void) Curl_idnconvert_hostname(data, host);
 
     /* If Curl_idnconvert_hostname() fails then we shall attempt to continue
        and send the host name using UTF-8 rather than as 7-bit ACE (which is
@@ -1788,7 +1797,7 @@
   return result;
 }
 
-CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
+CURLcode Curl_smtp_escape_eob(struct Curl_easy *data, const ssize_t nread)
 {
   /* When sending a SMTP payload we must detect CRLF. sequences making sure
      they are sent as CRLF.. instead, as a . on the beginning of a line will
@@ -1798,8 +1807,7 @@
   */
   ssize_t i;
   ssize_t si;
-  struct Curl_easy *data = conn->data;
-  struct SMTP *smtp = data->req.protop;
+  struct SMTP *smtp = data->req.p.smtp;
   char *scratch = data->state.scratch;
   char *newscratch = NULL;
   char *oldscratch = NULL;
@@ -1816,7 +1824,7 @@
       return CURLE_OUT_OF_MEMORY;
     }
   }
-  DEBUGASSERT(data->set.upload_buffer_size >= (size_t)nread);
+  DEBUGASSERT((size_t)data->set.upload_buffer_size >= (size_t)nread);
 
   /* Have we already sent part of the EOB? */
   eob_sent = smtp->eob;
diff --git a/lib/smtp.h b/lib/smtp.h
index 164a175..1fe4534 100644
--- a/lib/smtp.h
+++ b/lib/smtp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -57,10 +57,10 @@
   struct curl_slist *rcpt; /* Recipient list */
   bool rcpt_had_ok;        /* Whether any of RCPT TO commands (depends on
                               total number of recipients) succeeded so far */
+  bool trailing_crlf;      /* Specifies if the trailing CRLF is present */
   int rcpt_last_error;     /* The last error received for RCPT TO command */
   size_t eob;              /* Number of bytes of the EOB (End Of Body) that
                               have been received so far */
-  bool trailing_crlf;      /* Specifies if the tailing CRLF is present */
 };
 
 /* smtp_conn is used for struct connection-oriented data in the connectdata
@@ -91,6 +91,6 @@
 #define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e"
 #define SMTP_EOB_REPL_LEN 4
 
-CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread);
+CURLcode Curl_smtp_escape_eob(struct Curl_easy *data, const ssize_t nread);
 
 #endif /* HEADER_CURL_SMTP_H */
diff --git a/lib/sockaddr.h b/lib/sockaddr.h
index b037ee0..84c08d9 100644
--- a/lib/sockaddr.h
+++ b/lib/sockaddr.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/socketpair.c b/lib/socketpair.c
index 9e1f9ef..409d2ad 100644
--- a/lib/socketpair.c
+++ b/lib/socketpair.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,6 +48,10 @@
 #endif /* !INADDR_LOOPBACK */
 #endif /* !WIN32 */
 
+#include "nonblock.h" /* for curlx_nonblock */
+#include "timeval.h"  /* needed before select.h */
+#include "select.h"   /* for Curl_poll */
+
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
@@ -59,12 +63,11 @@
   union {
     struct sockaddr_in inaddr;
     struct sockaddr addr;
-  } a;
+  } a, a2;
   curl_socket_t listener;
   curl_socklen_t addrlen = sizeof(a.inaddr);
   int reuse = 1;
-  char data[2][12];
-  ssize_t dlen;
+  struct pollfd pfd[1];
   (void)domain;
   (void)type;
   (void)protocol;
@@ -85,7 +88,8 @@
     goto error;
   if(bind(listener, &a.addr, sizeof(a.inaddr)) == -1)
     goto error;
-  if(getsockname(listener, &a.addr, &addrlen) == -1)
+  if(getsockname(listener, &a.addr, &addrlen) == -1 ||
+     addrlen < (int)sizeof(a.inaddr))
     goto error;
   if(listen(listener, 1) == -1)
     goto error;
@@ -94,18 +98,30 @@
     goto error;
   if(connect(socks[0], &a.addr, sizeof(a.inaddr)) == -1)
     goto error;
+
+  /* use non-blocking accept to make sure we don't block forever */
+  if(curlx_nonblock(listener, TRUE) < 0)
+    goto error;
+  pfd[0].fd = listener;
+  pfd[0].events = POLLIN;
+  pfd[0].revents = 0;
+  (void)Curl_poll(pfd, 1, 10*1000); /* 10 seconds */
   socks[1] = accept(listener, NULL, NULL);
   if(socks[1] == CURL_SOCKET_BAD)
     goto error;
 
   /* verify that nothing else connected */
-  msnprintf(data[0], sizeof(data[0]), "%p", socks);
-  dlen = strlen(data[0]);
-  if(swrite(socks[0], data[0], dlen) != dlen)
+  addrlen = sizeof(a.inaddr);
+  if(getsockname(socks[0], &a.addr, &addrlen) == -1 ||
+     addrlen < (int)sizeof(a.inaddr))
     goto error;
-  if(sread(socks[1], data[1], sizeof(data[1])) != dlen)
+  addrlen = sizeof(a2.inaddr);
+  if(getpeername(socks[1], &a2.addr, &addrlen) == -1 ||
+     addrlen < (int)sizeof(a2.inaddr))
     goto error;
-  if(memcmp(data[0], data[1], dlen))
+  if(a.inaddr.sin_family != a2.inaddr.sin_family ||
+     a.inaddr.sin_addr.s_addr != a2.inaddr.sin_addr.s_addr ||
+     a.inaddr.sin_port != a2.inaddr.sin_port)
     goto error;
 
   sclose(listener);
diff --git a/lib/socketpair.h b/lib/socketpair.h
index be9fb24..cdcc0b9 100644
--- a/lib/socketpair.h
+++ b/lib/socketpair.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,4 @@
 #define Curl_socketpair(a,b,c,d) socketpair(a,b,c,d)
 #endif
 
-/* Defined here to allow specific build configs to disable it completely */
-#define USE_SOCKETPAIR 1
-
 #endif /* HEADER_CURL_SOCKETPAIR_H */
diff --git a/lib/socks.c b/lib/socks.c
index a41b67d..91c4223 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -51,7 +51,7 @@
  *
  * This is STUPID BLOCKING behavior. Only used by the SOCKS GSSAPI functions.
  */
-int Curl_blockread_all(struct connectdata *conn, /* connection data */
+int Curl_blockread_all(struct Curl_easy *data,   /* transfer */
                        curl_socket_t sockfd,     /* read from this socket */
                        char *buf,                /* store read data here */
                        ssize_t buffersize,       /* max amount to read */
@@ -62,7 +62,7 @@
   int result;
   *n = 0;
   for(;;) {
-    timediff_t timeout_ms = Curl_timeleft(conn->data, NULL, TRUE);
+    timediff_t timeout_ms = Curl_timeleft(data, NULL, TRUE);
     if(timeout_ms < 0) {
       /* we already got the timeout */
       result = CURLE_OPERATION_TIMEDOUT;
@@ -107,13 +107,14 @@
 
 
 /* always use this function to change state, to make debugging easier */
-static void socksstate(struct connectdata *conn,
+static void socksstate(struct Curl_easy *data,
                        enum connect_t state
 #ifdef DEBUGBUILD
                        , int lineno
 #endif
 )
 {
+  struct connectdata *conn = data->conn;
   enum connect_t oldstate = conn->cnnct.state;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* synced with the state list in urldata.h */
@@ -146,8 +147,8 @@
   conn->cnnct.state = state;
 
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
-  infof(conn->data,
-        "SXSTATE: %s => %s conn %p; line %d\n",
+  infof(data,
+        "SXSTATE: %s => %s conn %p; line %d",
         statename[oldstate], statename[conn->cnnct.state], conn,
         lineno);
 #endif
@@ -188,32 +189,35 @@
                           const char *hostname,
                           int remote_port,
                           int sockindex,
-                          struct connectdata *conn,
+                          struct Curl_easy *data,
                           bool *done)
 {
+  struct connectdata *conn = data->conn;
   const bool protocol4a =
     (conn->socks_proxy.proxytype == CURLPROXY_SOCKS4A) ? TRUE : FALSE;
-  unsigned char *socksreq = &conn->cnnct.socksreq[0];
+  unsigned char *socksreq = (unsigned char *)data->state.buffer;
   CURLcode result;
   curl_socket_t sockfd = conn->sock[sockindex];
-  struct Curl_easy *data = conn->data;
   struct connstate *sx = &conn->cnnct;
   struct Curl_dns_entry *dns = NULL;
   ssize_t actualread;
   ssize_t written;
 
+  /* make sure that the buffer is at least 600 bytes */
+  DEBUGASSERT(READBUFFER_MIN >= 600);
+
   if(!SOCKS_STATE(sx->state) && !*done)
-    sxstate(conn, CONNECT_SOCKS_INIT);
+    sxstate(data, CONNECT_SOCKS_INIT);
 
   switch(sx->state) {
   case CONNECT_SOCKS_INIT:
     /* SOCKS4 can only do IPv4, insist! */
     conn->ip_version = CURL_IPRESOLVE_V4;
     if(conn->bits.httpproxy)
-      infof(conn->data, "SOCKS4%s: connecting to HTTP proxy %s port %d\n",
+      infof(data, "SOCKS4%s: connecting to HTTP proxy %s port %d",
             protocol4a ? "a" : "", hostname, remote_port);
 
-    infof(data, "SOCKS4 communication to %s:%d\n", hostname, remote_port);
+    infof(data, "SOCKS4 communication to %s:%d", hostname, remote_port);
 
     /*
      * Compose socks4 request
@@ -234,37 +238,37 @@
     /* DNS resolve only for SOCKS4, not SOCKS4a */
     if(!protocol4a) {
       enum resolve_t rc =
-        Curl_resolv(conn, hostname, remote_port, FALSE, &dns);
+        Curl_resolv(data, hostname, remote_port, FALSE, &dns);
 
       if(rc == CURLRESOLV_ERROR)
         return CURLPX_RESOLVE_HOST;
       else if(rc == CURLRESOLV_PENDING) {
-        sxstate(conn, CONNECT_RESOLVING);
-        infof(data, "SOCKS4 non-blocking resolve of %s\n", hostname);
+        sxstate(data, CONNECT_RESOLVING);
+        infof(data, "SOCKS4 non-blocking resolve of %s", hostname);
         return CURLPX_OK;
       }
-      sxstate(conn, CONNECT_RESOLVED);
+      sxstate(data, CONNECT_RESOLVED);
       goto CONNECT_RESOLVED;
     }
 
     /* socks4a doesn't resolve anything locally */
-    sxstate(conn, CONNECT_REQ_INIT);
+    sxstate(data, CONNECT_REQ_INIT);
     goto CONNECT_REQ_INIT;
 
   case CONNECT_RESOLVING:
     /* check if we have the name resolved by now */
-    dns = Curl_fetch_addr(conn, hostname, (int)conn->port);
+    dns = Curl_fetch_addr(data, hostname, (int)conn->port);
 
     if(dns) {
 #ifdef CURLRES_ASYNCH
-      conn->async.dns = dns;
-      conn->async.done = TRUE;
+      data->state.async.dns = dns;
+      data->state.async.done = TRUE;
 #endif
-      infof(data, "Hostname '%s' was found\n", hostname);
-      sxstate(conn, CONNECT_RESOLVED);
+      infof(data, "Hostname '%s' was found", hostname);
+      sxstate(data, CONNECT_RESOLVED);
     }
     else {
-      result = Curl_resolv_check(data->conn, &dns);
+      result = Curl_resolv_check(data, &dns);
       if(!dns) {
         if(result)
           return CURLPX_RESOLVE_HOST;
@@ -275,18 +279,21 @@
   CONNECT_RESOLVED:
   case CONNECT_RESOLVED: {
     struct Curl_addrinfo *hp = NULL;
-    char buf[64];
     /*
      * We cannot use 'hostent' as a struct that Curl_resolv() returns.  It
      * returns a Curl_addrinfo pointer that may not always look the same.
      */
-    if(dns)
+    if(dns) {
       hp = dns->addr;
-    if(hp) {
-      Curl_printable_address(hp, buf, sizeof(buf));
 
-      if(hp->ai_family == AF_INET) {
+      /* scan for the first IPv4 address */
+      while(hp && (hp->ai_family != AF_INET))
+        hp = hp->ai_next;
+
+      if(hp) {
         struct sockaddr_in *saddr_in;
+        char buf[64];
+        Curl_printable_address(hp, buf, sizeof(buf));
 
         saddr_in = (struct sockaddr_in *)(void *)hp->ai_addr;
         socksreq[4] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[0];
@@ -294,20 +301,19 @@
         socksreq[6] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[2];
         socksreq[7] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[3];
 
-        infof(data, "SOCKS4 connect to IPv4 %s (locally resolved)\n", buf);
-      }
-      else {
-        hp = NULL; /* fail! */
-        failf(data, "SOCKS4 connection to %s not supported\n", buf);
-      }
+        infof(data, "SOCKS4 connect to IPv4 %s (locally resolved)", buf);
 
-      Curl_resolv_unlock(data, dns); /* not used anymore from now on */
+        Curl_resolv_unlock(data, dns); /* not used anymore from now on */
+      }
+      else
+        failf(data, "SOCKS4 connection to %s not supported", hostname);
     }
-    if(!hp) {
+    else
       failf(data, "Failed to resolve \"%s\" for SOCKS4 connect.",
             hostname);
+
+    if(!hp)
       return CURLPX_RESOLVE_HOST;
-    }
   }
     /* FALLTHROUGH */
   CONNECT_REQ_INIT:
@@ -318,8 +324,8 @@
     socksreq[8] = 0; /* ensure empty userid is NUL-terminated */
     if(proxy_user) {
       size_t plen = strlen(proxy_user);
-      if(plen >= sizeof(sx->socksreq) - 8) {
-        failf(data, "Too long SOCKS proxy user name, can't use!\n");
+      if(plen >= (size_t)data->set.buffer_size - 8) {
+        failf(data, "Too long SOCKS proxy user name, can't use!");
         return CURLPX_LONG_USER;
       }
       /* copy the proxy name WITH trailing zero */
@@ -352,12 +358,12 @@
       }
       sx->outp = socksreq;
       sx->outstanding = packetsize;
-      sxstate(conn, CONNECT_REQ_SENDING);
+      sxstate(data, CONNECT_REQ_SENDING);
     }
     /* FALLTHROUGH */
   case CONNECT_REQ_SENDING:
     /* Send request */
-    result = Curl_write_plain(conn, sockfd, (char *)sx->outp,
+    result = Curl_write_plain(data, sockfd, (char *)sx->outp,
                               sx->outstanding, &written);
     if(result && (CURLE_AGAIN != result)) {
       failf(data, "Failed to send SOCKS4 connect request.");
@@ -373,7 +379,7 @@
     /* done sending! */
     sx->outstanding = 8; /* receive data size */
     sx->outp = socksreq;
-    sxstate(conn, CONNECT_SOCKS_READ);
+    sxstate(data, CONNECT_SOCKS_READ);
 
     /* FALLTHROUGH */
   case CONNECT_SOCKS_READ:
@@ -396,7 +402,7 @@
       sx->outp += actualread;
       return CURLPX_OK;
     }
-    sxstate(conn, CONNECT_DONE);
+    sxstate(data, CONNECT_DONE);
     break;
   default: /* lots of unused states in SOCKS4 */
     break;
@@ -422,7 +428,7 @@
    */
 
   /* wrong version ? */
-  if(socksreq[0] != 0) {
+  if(socksreq[0]) {
     failf(data,
           "SOCKS4 reply has wrong version, version should be 0.");
     return CURLPX_BAD_VERSION;
@@ -431,14 +437,13 @@
   /* Result */
   switch(socksreq[1]) {
   case 90:
-    infof(data, "SOCKS4%s request granted.\n", protocol4a?"a":"");
+    infof(data, "SOCKS4%s request granted.", protocol4a?"a":"");
     break;
   case 91:
     failf(data,
           "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)"
           ", request rejected or failed.",
-          (unsigned char)socksreq[4], (unsigned char)socksreq[5],
-          (unsigned char)socksreq[6], (unsigned char)socksreq[7],
+          socksreq[4], socksreq[5], socksreq[6], socksreq[7],
           (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]),
           (unsigned char)socksreq[1]);
     return CURLPX_REQUEST_FAILED;
@@ -447,8 +452,7 @@
           "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)"
           ", request rejected because SOCKS server cannot connect to "
           "identd on the client.",
-          (unsigned char)socksreq[4], (unsigned char)socksreq[5],
-          (unsigned char)socksreq[6], (unsigned char)socksreq[7],
+          socksreq[4], socksreq[5], socksreq[6], socksreq[7],
           (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]),
           (unsigned char)socksreq[1]);
     return CURLPX_IDENTD;
@@ -457,8 +461,7 @@
           "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)"
           ", request rejected because the client program and identd "
           "report different user-ids.",
-          (unsigned char)socksreq[4], (unsigned char)socksreq[5],
-          (unsigned char)socksreq[6], (unsigned char)socksreq[7],
+          socksreq[4], socksreq[5], socksreq[6], socksreq[7],
           (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]),
           (unsigned char)socksreq[1]);
     return CURLPX_IDENTD_DIFFER;
@@ -466,8 +469,7 @@
     failf(data,
           "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)"
           ", Unknown.",
-          (unsigned char)socksreq[4], (unsigned char)socksreq[5],
-          (unsigned char)socksreq[6], (unsigned char)socksreq[7],
+          socksreq[4], socksreq[5], socksreq[6], socksreq[7],
           (((unsigned char)socksreq[2] << 8) | (unsigned char)socksreq[3]),
           (unsigned char)socksreq[1]);
     return CURLPX_UNKNOWN_FAIL;
@@ -486,7 +488,7 @@
                           const char *hostname,
                           int remote_port,
                           int sockindex,
-                          struct connectdata *conn,
+                          struct Curl_easy *data,
                           bool *done)
 {
   /*
@@ -505,14 +507,14 @@
     o  REP    Reply field:
     o  X'00' succeeded
   */
-  unsigned char *socksreq = &conn->cnnct.socksreq[0];
+  struct connectdata *conn = data->conn;
+  unsigned char *socksreq = (unsigned char *)data->state.buffer;
   char dest[256] = "unknown";  /* printable hostname:port */
   int idx;
   ssize_t actualread;
   ssize_t written;
   CURLcode result;
   curl_socket_t sockfd = conn->sock[sockindex];
-  struct Curl_easy *data = conn->data;
   bool socks5_resolve_local =
     (conn->socks_proxy.proxytype == CURLPROXY_SOCKS5) ? TRUE : FALSE;
   const size_t hostname_len = strlen(hostname);
@@ -523,24 +525,24 @@
   struct Curl_dns_entry *dns = NULL;
 
   if(!SOCKS_STATE(sx->state) && !*done)
-    sxstate(conn, CONNECT_SOCKS_INIT);
+    sxstate(data, CONNECT_SOCKS_INIT);
 
   switch(sx->state) {
   case CONNECT_SOCKS_INIT:
     if(conn->bits.httpproxy)
-      infof(conn->data, "SOCKS5: connecting to HTTP proxy %s port %d\n",
+      infof(data, "SOCKS5: connecting to HTTP proxy %s port %d",
             hostname, remote_port);
 
     /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
     if(!socks5_resolve_local && hostname_len > 255) {
-      infof(conn->data, "SOCKS5: server resolving disabled for hostnames of "
-            "length > 255 [actual len=%zu]\n", hostname_len);
+      infof(data, "SOCKS5: server resolving disabled for hostnames of "
+            "length > 255 [actual len=%zu]", hostname_len);
       socks5_resolve_local = TRUE;
     }
 
     if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
-      infof(conn->data,
-            "warning: unsupported value passed to CURLOPT_SOCKS5_AUTH: %lu\n",
+      infof(data,
+            "warning: unsupported value passed to CURLOPT_SOCKS5_AUTH: %lu",
             auth);
     if(!(auth & CURLAUTH_BASIC))
       /* disable username/password auth */
@@ -561,21 +563,21 @@
     /* write the number of authentication methods */
     socksreq[1] = (unsigned char) (idx - 2);
 
-    result = Curl_write_plain(conn, sockfd, (char *)socksreq, idx, &written);
+    result = Curl_write_plain(data, sockfd, (char *)socksreq, idx, &written);
     if(result && (CURLE_AGAIN != result)) {
       failf(data, "Unable to send initial SOCKS5 request.");
       return CURLPX_SEND_CONNECT;
     }
     if(written != idx) {
-      sxstate(conn, CONNECT_SOCKS_SEND);
+      sxstate(data, CONNECT_SOCKS_SEND);
       sx->outstanding = idx - written;
       sx->outp = &socksreq[written];
       return CURLPX_OK;
     }
-    sxstate(conn, CONNECT_SOCKS_READ);
+    sxstate(data, CONNECT_SOCKS_READ);
     goto CONNECT_SOCKS_READ_INIT;
   case CONNECT_SOCKS_SEND:
-    result = Curl_write_plain(conn, sockfd, (char *)sx->outp,
+    result = Curl_write_plain(data, sockfd, (char *)sx->outp,
                               sx->outstanding, &written);
     if(result && (CURLE_AGAIN != result)) {
       failf(data, "Unable to send initial SOCKS5 request.");
@@ -617,18 +619,18 @@
     }
     else if(socksreq[1] == 0) {
       /* DONE! No authentication needed. Send request. */
-      sxstate(conn, CONNECT_REQ_INIT);
+      sxstate(data, CONNECT_REQ_INIT);
       goto CONNECT_REQ_INIT;
     }
     else if(socksreq[1] == 2) {
       /* regular name + password authentication */
-      sxstate(conn, CONNECT_AUTH_INIT);
+      sxstate(data, CONNECT_AUTH_INIT);
       goto CONNECT_AUTH_INIT;
     }
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
     else if(allow_gssapi && (socksreq[1] == 1)) {
-      sxstate(conn, CONNECT_GSSAPI_INIT);
-      result = Curl_SOCKS5_gssapi_negotiate(sockindex, conn);
+      sxstate(data, CONNECT_GSSAPI_INIT);
+      result = Curl_SOCKS5_gssapi_negotiate(sockindex, data);
       if(result) {
         failf(data, "Unable to negotiate SOCKS5 GSS-API context.");
         return CURLPX_GSSAPI;
@@ -701,13 +703,13 @@
       memcpy(socksreq + len, proxy_password, proxy_password_len);
     }
     len += proxy_password_len;
-    sxstate(conn, CONNECT_AUTH_SEND);
+    sxstate(data, CONNECT_AUTH_SEND);
     sx->outstanding = len;
     sx->outp = socksreq;
   }
     /* FALLTHROUGH */
   case CONNECT_AUTH_SEND:
-    result = Curl_write_plain(conn, sockfd, (char *)sx->outp,
+    result = Curl_write_plain(data, sockfd, (char *)sx->outp,
                               sx->outstanding, &written);
     if(result && (CURLE_AGAIN != result)) {
       failf(data, "Failed to send SOCKS5 sub-negotiation request.");
@@ -721,7 +723,7 @@
     }
     sx->outp = socksreq;
     sx->outstanding = 2;
-    sxstate(conn, CONNECT_AUTH_READ);
+    sxstate(data, CONNECT_AUTH_READ);
     /* FALLTHROUGH */
   case CONNECT_AUTH_READ:
     result = Curl_read_plain(sockfd, (char *)sx->outp,
@@ -742,47 +744,47 @@
       return CURLPX_OK;
     }
     /* ignore the first (VER) byte */
-    else if(socksreq[1] != 0) { /* status */
+    else if(socksreq[1]) { /* status */
       failf(data, "User was rejected by the SOCKS5 server (%d %d).",
             socksreq[0], socksreq[1]);
       return CURLPX_USER_REJECTED;
     }
 
     /* Everything is good so far, user was authenticated! */
-    sxstate(conn, CONNECT_REQ_INIT);
+    sxstate(data, CONNECT_REQ_INIT);
     /* FALLTHROUGH */
   CONNECT_REQ_INIT:
   case CONNECT_REQ_INIT:
     if(socks5_resolve_local) {
-      enum resolve_t rc = Curl_resolv(conn, hostname, remote_port,
+      enum resolve_t rc = Curl_resolv(data, hostname, remote_port,
                                       FALSE, &dns);
 
       if(rc == CURLRESOLV_ERROR)
         return CURLPX_RESOLVE_HOST;
 
       if(rc == CURLRESOLV_PENDING) {
-        sxstate(conn, CONNECT_RESOLVING);
+        sxstate(data, CONNECT_RESOLVING);
         return CURLPX_OK;
       }
-      sxstate(conn, CONNECT_RESOLVED);
+      sxstate(data, CONNECT_RESOLVED);
       goto CONNECT_RESOLVED;
     }
     goto CONNECT_RESOLVE_REMOTE;
 
   case CONNECT_RESOLVING:
     /* check if we have the name resolved by now */
-    dns = Curl_fetch_addr(conn, hostname, (int)conn->port);
+    dns = Curl_fetch_addr(data, hostname, remote_port);
 
     if(dns) {
 #ifdef CURLRES_ASYNCH
-      conn->async.dns = dns;
-      conn->async.done = TRUE;
+      data->state.async.dns = dns;
+      data->state.async.done = TRUE;
 #endif
-      infof(data, "SOCKS5: hostname '%s' found\n", hostname);
+      infof(data, "SOCKS5: hostname '%s' found", hostname);
     }
 
     if(!dns) {
-      result = Curl_resolv_check(data->conn, &dns);
+      result = Curl_resolv_check(data, &dns);
       if(!dns) {
         if(result)
           return CURLPX_RESOLVE_HOST;
@@ -820,7 +822,7 @@
         socksreq[len++] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[i];
       }
 
-      infof(data, "SOCKS5 connect to IPv4 %s (locally resolved)\n", dest);
+      infof(data, "SOCKS5 connect to IPv4 %s (locally resolved)", dest);
     }
 #ifdef ENABLE_IPV6
     else if(hp->ai_family == AF_INET6) {
@@ -834,12 +836,12 @@
           ((unsigned char *)&saddr_in6->sin6_addr.s6_addr)[i];
       }
 
-      infof(data, "SOCKS5 connect to IPv6 %s (locally resolved)\n", dest);
+      infof(data, "SOCKS5 connect to IPv6 %s (locally resolved)", dest);
     }
 #endif
     else {
       hp = NULL; /* fail! */
-      failf(data, "SOCKS5 connection to %s not supported\n", dest);
+      failf(data, "SOCKS5 connection to %s not supported", dest);
     }
 
     Curl_resolv_unlock(data, dns); /* not used anymore from now on */
@@ -858,7 +860,7 @@
       socksreq[len++] = (char) hostname_len; /* one byte address length */
       memcpy(&socksreq[len], hostname, hostname_len); /* address w/o NULL */
       len += hostname_len;
-      infof(data, "SOCKS5 connect to %s:%d (remotely resolved)\n",
+      infof(data, "SOCKS5 connect to %s:%d (remotely resolved)",
             hostname, remote_port);
     }
     /* FALLTHROUGH */
@@ -878,10 +880,10 @@
 #endif
     sx->outp = socksreq;
     sx->outstanding = len;
-    sxstate(conn, CONNECT_REQ_SENDING);
+    sxstate(data, CONNECT_REQ_SENDING);
     /* FALLTHROUGH */
   case CONNECT_REQ_SENDING:
-    result = Curl_write_plain(conn, sockfd, (char *)sx->outp,
+    result = Curl_write_plain(data, sockfd, (char *)sx->outp,
                               sx->outstanding, &written);
     if(result && (CURLE_AGAIN != result)) {
       failf(data, "Failed to send SOCKS5 connect request.");
@@ -901,7 +903,7 @@
 #endif
     sx->outstanding = 10; /* minimum packet size is 10 */
     sx->outp = socksreq;
-    sxstate(conn, CONNECT_REQ_READ);
+    sxstate(data, CONNECT_REQ_READ);
     /* FALLTHROUGH */
   case CONNECT_REQ_READ:
     result = Curl_read_plain(sockfd, (char *)sx->outp,
@@ -927,7 +929,7 @@
             "SOCKS5 reply has wrong version, version should be 5.");
       return CURLPX_BAD_VERSION;
     }
-    else if(socksreq[1] != 0) { /* Anything besides 0 is an error */
+    else if(socksreq[1]) { /* Anything besides 0 is an error */
       CURLproxycode rc = CURLPX_REPLY_UNASSIGNED;
       int code = socksreq[1];
       failf(data, "Can't complete SOCKS5 connection to %s. (%d)",
@@ -992,10 +994,10 @@
       if(len > 10) {
         sx->outstanding = len - 10; /* get the rest */
         sx->outp = &socksreq[10];
-        sxstate(conn, CONNECT_REQ_READ_MORE);
+        sxstate(data, CONNECT_REQ_READ_MORE);
       }
       else {
-        sxstate(conn, CONNECT_DONE);
+        sxstate(data, CONNECT_DONE);
         break;
       }
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
@@ -1020,9 +1022,9 @@
       sx->outp += actualread;
       return CURLPX_OK;
     }
-    sxstate(conn, CONNECT_DONE);
+    sxstate(data, CONNECT_DONE);
   }
-  infof(data, "SOCKS5 request granted.\n");
+  infof(data, "SOCKS5 request granted.");
 
   *done = TRUE;
   return CURLPX_OK; /* Proxy was successful! */
diff --git a/lib/socks.h b/lib/socks.h
index 17e6f46..b0c7f9b 100644
--- a/lib/socks.h
+++ b/lib/socks.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,7 +35,7 @@
  *
  * This is STUPID BLOCKING behavior
  */
-int Curl_blockread_all(struct connectdata *conn,
+int Curl_blockread_all(struct Curl_easy *data,
                        curl_socket_t sockfd,
                        char *buf,
                        ssize_t buffersize,
@@ -52,7 +52,7 @@
                           const char *hostname,
                           int remote_port,
                           int sockindex,
-                          struct connectdata *conn,
+                          struct Curl_easy *data,
                           bool *done);
 
 /*
@@ -64,7 +64,7 @@
                           const char *hostname,
                           int remote_port,
                           int sockindex,
-                          struct connectdata *conn,
+                          struct Curl_easy *data,
                           bool *done);
 
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
@@ -72,7 +72,7 @@
  * This function handles the SOCKS5 GSS-API negotiation and initialisation
  */
 CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
-                                      struct connectdata *conn);
+                                      struct Curl_easy *data);
 #endif
 
 #endif /* CURL_DISABLE_PROXY */
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
index 2e36b99..34bfa37 100644
--- a/lib/socks_gssapi.c
+++ b/lib/socks_gssapi.c
@@ -5,12 +5,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -92,7 +92,7 @@
       }
       gss_release_buffer(&min_stat, &status_string);
     }
-    failf(data, "GSS-API error: %s failed:\n%s", function, buf);
+    failf(data, "GSS-API error: %s failed: %s", function, buf);
     return 1;
   }
 
@@ -100,9 +100,9 @@
 }
 
 CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
-                                      struct connectdata *conn)
+                                      struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t sock = conn->sock[sockindex];
   CURLcode code;
   ssize_t actualread;
@@ -195,13 +195,13 @@
       return CURLE_COULDNT_CONNECT;
     }
 
-    if(gss_send_token.length != 0) {
+    if(gss_send_token.length) {
       socksreq[0] = 1;    /* GSS-API subnegotiation version */
       socksreq[1] = 1;    /* authentication message type */
       us_length = htons((short)gss_send_token.length);
       memcpy(socksreq + 2, &us_length, sizeof(short));
 
-      code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
+      code = Curl_write_plain(data, sock, (char *)socksreq, 4, &written);
       if(code || (4 != written)) {
         failf(data, "Failed to send GSS-API authentication request.");
         gss_release_name(&gss_status, &server);
@@ -211,7 +211,7 @@
         return CURLE_COULDNT_CONNECT;
       }
 
-      code = Curl_write_plain(conn, sock, (char *)gss_send_token.value,
+      code = Curl_write_plain(data, sock, (char *)gss_send_token.value,
                               gss_send_token.length, &written);
 
       if(code || ((ssize_t)gss_send_token.length != written)) {
@@ -240,7 +240,7 @@
      * +----+------+-----+----------------+
      */
 
-    result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+    result = Curl_blockread_all(data, sock, (char *)socksreq, 4, &actualread);
     if(result || (actualread != 4)) {
       failf(data, "Failed to receive GSS-API authentication response.");
       gss_release_name(&gss_status, &server);
@@ -279,7 +279,7 @@
       return CURLE_OUT_OF_MEMORY;
     }
 
-    result = Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
+    result = Curl_blockread_all(data, sock, (char *)gss_recv_token.value,
                                 gss_recv_token.length, &actualread);
 
     if(result || (actualread != us_length)) {
@@ -328,7 +328,7 @@
   user[gss_send_token.length] = '\0';
   gss_release_name(&gss_status, &gss_client_name);
   gss_release_buffer(&gss_status, &gss_send_token);
-  infof(data, "SOCKS5 server authenticated user %s with GSS-API.\n",user);
+  infof(data, "SOCKS5 server authenticated user %s with GSS-API.",user);
   free(user);
   user = NULL;
 
@@ -344,7 +344,7 @@
   else if(gss_ret_flags & GSS_C_INTEG_FLAG)
     gss_enc = 1;
 
-  infof(data, "SOCKS5 server supports GSS-API %s data protection.\n",
+  infof(data, "SOCKS5 server supports GSS-API %s data protection.",
         (gss_enc == 0)?"no":((gss_enc==1)?"integrity":"confidentiality"));
   /* force for the moment to no data protection */
   gss_enc = 0;
@@ -408,7 +408,7 @@
     memcpy(socksreq + 2, &us_length, sizeof(short));
   }
 
-  code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
+  code = Curl_write_plain(data, sock, (char *)socksreq, 4, &written);
   if(code  || (4 != written)) {
     failf(data, "Failed to send GSS-API encryption request.");
     gss_release_buffer(&gss_status, &gss_w_token);
@@ -418,7 +418,7 @@
 
   if(data->set.socks5_gssapi_nec) {
     memcpy(socksreq, &gss_enc, 1);
-    code = Curl_write_plain(conn, sock, socksreq, 1, &written);
+    code = Curl_write_plain(data, sock, socksreq, 1, &written);
     if(code || ( 1 != written)) {
       failf(data, "Failed to send GSS-API encryption type.");
       gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -426,7 +426,7 @@
     }
   }
   else {
-    code = Curl_write_plain(conn, sock, (char *)gss_w_token.value,
+    code = Curl_write_plain(data, sock, (char *)gss_w_token.value,
                             gss_w_token.length, &written);
     if(code || ((ssize_t)gss_w_token.length != written)) {
       failf(data, "Failed to send GSS-API encryption type.");
@@ -437,7 +437,7 @@
     gss_release_buffer(&gss_status, &gss_w_token);
   }
 
-  result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+  result = Curl_blockread_all(data, sock, (char *)socksreq, 4, &actualread);
   if(result || (actualread != 4)) {
     failf(data, "Failed to receive GSS-API encryption response.");
     gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -468,7 +468,7 @@
     gss_delete_sec_context(&gss_status, &gss_context, NULL);
     return CURLE_OUT_OF_MEMORY;
   }
-  result = Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
+  result = Curl_blockread_all(data, sock, (char *)gss_recv_token.value,
                               gss_recv_token.length, &actualread);
 
   if(result || (actualread != us_length)) {
@@ -493,7 +493,7 @@
     gss_release_buffer(&gss_status, &gss_recv_token);
 
     if(gss_w_token.length != 1) {
-      failf(data, "Invalid GSS-API encryption response length (%d).",
+      failf(data, "Invalid GSS-API encryption response length (%zu).",
             gss_w_token.length);
       gss_release_buffer(&gss_status, &gss_w_token);
       gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -505,7 +505,7 @@
   }
   else {
     if(gss_recv_token.length != 1) {
-      failf(data, "Invalid GSS-API encryption response length (%d).",
+      failf(data, "Invalid GSS-API encryption response length (%zu).",
             gss_recv_token.length);
       gss_release_buffer(&gss_status, &gss_recv_token);
       gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -518,7 +518,7 @@
 
   (void)curlx_nonblock(sock, TRUE);
 
-  infof(data, "SOCKS5 access with%s protection granted.\n",
+  infof(data, "SOCKS5 access with%s protection granted.",
         (socksreq[0] == 0)?"out GSS-API data":
         ((socksreq[0] == 1)?" GSS-API integrity":" GSS-API confidentiality"));
 
diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c
index 2f1fd36..cb225b9 100644
--- a/lib/socks_sspi.c
+++ b/lib/socks_sspi.c
@@ -5,12 +5,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -43,7 +43,7 @@
 /*
  * Helper sspi error functions.
  */
-static int check_sspi_err(struct connectdata *conn,
+static int check_sspi_err(struct Curl_easy *data,
                           SECURITY_STATUS status,
                           const char *function)
 {
@@ -52,7 +52,7 @@
      status != SEC_I_COMPLETE_NEEDED &&
      status != SEC_I_CONTINUE_NEEDED) {
     char buffer[STRERROR_LEN];
-    failf(conn->data, "SSPI error: %s failed: %s", function,
+    failf(data, "SSPI error: %s failed: %s", function,
           Curl_sspi_strerror(status, buffer, sizeof(buffer)));
     return 1;
   }
@@ -61,9 +61,9 @@
 
 /* This is the SSPI-using version of this function */
 CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
-                                      struct connectdata *conn)
+                                      struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t sock = conn->sock[sockindex];
   CURLcode code;
   ssize_t actualread;
@@ -86,7 +86,7 @@
   unsigned long qop;
   unsigned char socksreq[4]; /* room for GSS-API exchange header only */
   const char *service = data->set.str[STRING_PROXY_SERVICE_NAME] ?
-                        data->set.str[STRING_PROXY_SERVICE_NAME]  : "rcmd";
+    data->set.str[STRING_PROXY_SERVICE_NAME]  : "rcmd";
   const size_t service_length = strlen(service);
 
   /*   GSS-API request looks like
@@ -146,7 +146,7 @@
                                               &cred_handle,
                                               &expiry);
 
-  if(check_sspi_err(conn, status, "AcquireCredentialsHandle")) {
+  if(check_sspi_err(data, status, "AcquireCredentialsHandle")) {
     failf(data, "Failed to acquire credentials.");
     free(service_name);
     s_pSecFn->FreeCredentialsHandle(&cred_handle);
@@ -188,7 +188,7 @@
       sspi_recv_token.cbBuffer = 0;
     }
 
-    if(check_sspi_err(conn, status, "InitializeSecurityContext")) {
+    if(check_sspi_err(data, status, "InitializeSecurityContext")) {
       free(service_name);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -198,13 +198,13 @@
       return CURLE_COULDNT_CONNECT;
     }
 
-    if(sspi_send_token.cbBuffer != 0) {
+    if(sspi_send_token.cbBuffer) {
       socksreq[0] = 1;    /* GSS-API subnegotiation version */
       socksreq[1] = 1;    /* authentication message type */
       us_length = htons((short)sspi_send_token.cbBuffer);
       memcpy(socksreq + 2, &us_length, sizeof(short));
 
-      code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
+      code = Curl_write_plain(data, sock, (char *)socksreq, 4, &written);
       if(code || (4 != written)) {
         failf(data, "Failed to send SSPI authentication request.");
         free(service_name);
@@ -217,7 +217,7 @@
         return CURLE_COULDNT_CONNECT;
       }
 
-      code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer,
+      code = Curl_write_plain(data, sock, (char *)sspi_send_token.pvBuffer,
                               sspi_send_token.cbBuffer, &written);
       if(code || (sspi_send_token.cbBuffer != (size_t)written)) {
         failf(data, "Failed to send SSPI authentication token.");
@@ -258,7 +258,7 @@
      * +----+------+-----+----------------+
      */
 
-    result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+    result = Curl_blockread_all(data, sock, (char *)socksreq, 4, &actualread);
     if(result || (actualread != 4)) {
       failf(data, "Failed to receive SSPI authentication response.");
       free(service_name);
@@ -298,7 +298,7 @@
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_OUT_OF_MEMORY;
     }
-    result = Curl_blockread_all(conn, sock, (char *)sspi_recv_token.pvBuffer,
+    result = Curl_blockread_all(data, sock, (char *)sspi_recv_token.pvBuffer,
                                 sspi_recv_token.cbBuffer, &actualread);
 
     if(result || (actualread != us_length)) {
@@ -321,13 +321,13 @@
                                                 SECPKG_CRED_ATTR_NAMES,
                                                 &names);
   s_pSecFn->FreeCredentialsHandle(&cred_handle);
-  if(check_sspi_err(conn, status, "QueryCredentialAttributes")) {
+  if(check_sspi_err(data, status, "QueryCredentialAttributes")) {
     s_pSecFn->DeleteSecurityContext(&sspi_context);
     s_pSecFn->FreeContextBuffer(names.sUserName);
     failf(data, "Failed to determine user name.");
     return CURLE_COULDNT_CONNECT;
   }
-  infof(data, "SOCKS5 server authenticated user %s with GSS-API.\n",
+  infof(data, "SOCKS5 server authenticated user %s with GSS-API.",
         names.sUserName);
   s_pSecFn->FreeContextBuffer(names.sUserName);
 
@@ -343,7 +343,7 @@
   else if(sspi_ret_flags & ISC_REQ_INTEGRITY)
     gss_enc = 1;
 
-  infof(data, "SOCKS5 server supports GSS-API %s data protection.\n",
+  infof(data, "SOCKS5 server supports GSS-API %s data protection.",
         (gss_enc == 0)?"no":((gss_enc == 1)?"integrity":"confidentiality") );
   /* force to no data protection, avoid encryption/decryption for now */
   gss_enc = 0;
@@ -386,7 +386,7 @@
     status = s_pSecFn->QueryContextAttributes(&sspi_context,
                                               SECPKG_ATTR_SIZES,
                                               &sspi_sizes);
-    if(check_sspi_err(conn, status, "QueryContextAttributes")) {
+    if(check_sspi_err(data, status, "QueryContextAttributes")) {
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       failf(data, "Failed to query security context attributes.");
       return CURLE_COULDNT_CONNECT;
@@ -423,7 +423,7 @@
                                       KERB_WRAP_NO_ENCRYPT,
                                       &wrap_desc,
                                       0);
-    if(check_sspi_err(conn, status, "EncryptMessage")) {
+    if(check_sspi_err(data, status, "EncryptMessage")) {
       s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer);
@@ -466,7 +466,7 @@
     memcpy(socksreq + 2, &us_length, sizeof(short));
   }
 
-  code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
+  code = Curl_write_plain(data, sock, (char *)socksreq, 4, &written);
   if(code || (4 != written)) {
     failf(data, "Failed to send SSPI encryption request.");
     if(sspi_send_token.pvBuffer)
@@ -477,7 +477,7 @@
 
   if(data->set.socks5_gssapi_nec) {
     memcpy(socksreq, &gss_enc, 1);
-    code = Curl_write_plain(conn, sock, (char *)socksreq, 1, &written);
+    code = Curl_write_plain(data, sock, (char *)socksreq, 1, &written);
     if(code || (1 != written)) {
       failf(data, "Failed to send SSPI encryption type.");
       s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -485,7 +485,7 @@
     }
   }
   else {
-    code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer,
+    code = Curl_write_plain(data, sock, (char *)sspi_send_token.pvBuffer,
                             sspi_send_token.cbBuffer, &written);
     if(code || (sspi_send_token.cbBuffer != (size_t)written)) {
       failf(data, "Failed to send SSPI encryption type.");
@@ -498,7 +498,7 @@
       s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
   }
 
-  result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
+  result = Curl_blockread_all(data, sock, (char *)socksreq, 4, &actualread);
   if(result || (actualread != 4)) {
     failf(data, "Failed to receive SSPI encryption response.");
     s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -530,7 +530,7 @@
     return CURLE_OUT_OF_MEMORY;
   }
 
-  result = Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer,
+  result = Curl_blockread_all(data, sock, (char *)sspi_w_token[0].pvBuffer,
                               sspi_w_token[0].cbBuffer, &actualread);
 
   if(result || (actualread != us_length)) {
@@ -553,7 +553,7 @@
                                       0,
                                       &qop);
 
-    if(check_sspi_err(conn, status, "DecryptMessage")) {
+    if(check_sspi_err(data, status, "DecryptMessage")) {
       if(sspi_w_token[0].pvBuffer)
         s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       if(sspi_w_token[1].pvBuffer)
@@ -591,7 +591,7 @@
   }
   (void)curlx_nonblock(sock, TRUE);
 
-  infof(data, "SOCKS5 access with%s protection granted.\n",
+  infof(data, "SOCKS5 access with%s protection granted.",
         (socksreq[0] == 0)?"out GSS-API data":
         ((socksreq[0] == 1)?" GSS-API integrity":" GSS-API confidentiality"));
 
diff --git a/lib/speedcheck.c b/lib/speedcheck.c
index 3aeea91..841d256 100644
--- a/lib/speedcheck.c
+++ b/lib/speedcheck.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -39,6 +39,10 @@
 CURLcode Curl_speedcheck(struct Curl_easy *data,
                          struct curltime now)
 {
+  if(data->req.keepon & KEEP_RECV_PAUSE)
+    /* A paused transfer is not qualified for speed checks */
+    return CURLE_OK;
+
   if((data->progress.current_speed >= 0) && data->set.low_speed_time) {
     if(data->progress.current_speed < data->set.low_speed_limit) {
       if(!data->state.keeps_speed.tv_sec)
diff --git a/lib/speedcheck.h b/lib/speedcheck.h
index 5c2dc9a..1d4c7bf 100644
--- a/lib/speedcheck.h
+++ b/lib/speedcheck.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/splay.c b/lib/splay.c
index 0f5fcd1..a94e2c8 100644
--- a/lib/splay.c
+++ b/lib/splay.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1997 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -42,7 +42,7 @@
 {
   struct Curl_tree N, *l, *r, *y;
 
-  if(t == NULL)
+  if(!t)
     return t;
   N.smaller = N.larger = NULL;
   l = r = &N;
@@ -50,14 +50,14 @@
   for(;;) {
     long comp = compare(i, t->key);
     if(comp < 0) {
-      if(t->smaller == NULL)
+      if(!t->smaller)
         break;
       if(compare(i, t->smaller->key) < 0) {
         y = t->smaller;                           /* rotate smaller */
         t->smaller = y->larger;
         y->larger = t;
         t = y;
-        if(t->smaller == NULL)
+        if(!t->smaller)
           break;
       }
       r->smaller = t;                               /* link smaller */
@@ -65,14 +65,14 @@
       t = t->smaller;
     }
     else if(comp > 0) {
-      if(t->larger == NULL)
+      if(!t->larger)
         break;
       if(compare(i, t->larger->key) > 0) {
         y = t->larger;                          /* rotate larger */
         t->larger = y->smaller;
         y->smaller = t;
         t = y;
-        if(t->larger == NULL)
+        if(!t->larger)
           break;
       }
       l->larger = t;                              /* link larger */
@@ -104,7 +104,7 @@
     (time_t)-1, (unsigned int)-1
   }; /* will *NEVER* appear */
 
-  if(node == NULL)
+  if(!node)
     return t;
 
   if(t != NULL) {
@@ -125,7 +125,7 @@
     }
   }
 
-  if(t == NULL) {
+  if(!t) {
     node->smaller = node->larger = NULL;
   }
   else if(compare(i, t->key) < 0) {
@@ -206,9 +206,9 @@
  *
  * @unittest: 1309
  */
-int Curl_splayremovebyaddr(struct Curl_tree *t,
-                           struct Curl_tree *removenode,
-                           struct Curl_tree **newroot)
+int Curl_splayremove(struct Curl_tree *t,
+                     struct Curl_tree *removenode,
+                     struct Curl_tree **newroot)
 {
   static const struct curltime KEY_NOTUSED = {
     (time_t)-1, (unsigned int)-1
@@ -262,7 +262,7 @@
   }
   else {
     /* Remove the root node */
-    if(t->smaller == NULL)
+    if(!t->smaller)
       x = t->larger;
     else {
       x = Curl_splay(removenode->key, t->smaller);
diff --git a/lib/splay.h b/lib/splay.h
index 9292f34..eb9f65f 100644
--- a/lib/splay.h
+++ b/lib/splay.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1997 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -40,19 +40,13 @@
                                    struct Curl_tree *t,
                                    struct Curl_tree *newnode);
 
-#if 0
-struct Curl_tree *Curl_splayremove(struct curltime key,
-                                   struct Curl_tree *t,
-                                   struct Curl_tree **removed);
-#endif
-
 struct Curl_tree *Curl_splaygetbest(struct curltime key,
                                     struct Curl_tree *t,
                                     struct Curl_tree **removed);
 
-int Curl_splayremovebyaddr(struct Curl_tree *t,
-                           struct Curl_tree *removenode,
-                           struct Curl_tree **newroot);
+int Curl_splayremove(struct Curl_tree *t,
+                     struct Curl_tree *removenode,
+                     struct Curl_tree **newroot);
 
 #define Curl_splaycomparekeys(i,j) ( ((i.tv_sec)  < (j.tv_sec)) ? -1 : \
                                    ( ((i.tv_sec)  > (j.tv_sec)) ?  1 : \
diff --git a/lib/strcase.c b/lib/strcase.c
index a309e35..955e3c7 100644
--- a/lib/strcase.c
+++ b/lib/strcase.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strcase.h b/lib/strcase.h
index cd4c419..10dc698 100644
--- a/lib/strcase.h
+++ b/lib/strcase.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strdup.c b/lib/strdup.c
index 7732802..9af47ea 100644
--- a/lib/strdup.c
+++ b/lib/strdup.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strdup.h b/lib/strdup.h
index ae3d5d0..0936956 100644
--- a/lib/strdup.h
+++ b/lib/strdup.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strerror.c b/lib/strerror.c
index b5808df..a1ec539 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2004 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2004 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -188,8 +188,8 @@
   case CURLE_UNKNOWN_OPTION:
     return "An unknown option was passed in to libcurl";
 
-  case CURLE_TELNET_OPTION_SYNTAX :
-    return "Malformed telnet option";
+  case CURLE_SETOPT_OPTION_SYNTAX :
+    return "Malformed option provided in a setopt";
 
   case CURLE_GOT_NOTHING:
     return "Server returned nothing (no headers, no data)";
@@ -320,9 +320,12 @@
   case CURLE_QUIC_CONNECT_ERROR:
     return "QUIC connection error";
 
- case CURLE_PROXY:
+  case CURLE_PROXY:
     return "proxy handshake error";
 
+  case CURLE_SSL_CLIENTCERT:
+    return "SSL Client Certificate required";
+
     /* error codes not used by current libcurl */
   case CURLE_OBSOLETE20:
   case CURLE_OBSOLETE24:
@@ -721,7 +724,9 @@
   if(!buflen)
     return NULL;
 
+#ifndef WIN32
   DEBUGASSERT(err >= 0);
+#endif
 
   max = buflen - 1;
   *buf = '\0';
@@ -781,7 +786,7 @@
   }
 #else
   {
-    char *msg = strerror(err);
+    const char *msg = strerror(err);
     if(msg)
       strncpy(buf, msg, max);
     else
diff --git a/lib/strerror.h b/lib/strerror.h
index bae8f89..96a7e27 100644
--- a/lib/strerror.h
+++ b/lib/strerror.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strtok.c b/lib/strtok.c
index ba6e025..d53e587 100644
--- a/lib/strtok.c
+++ b/lib/strtok.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strtok.h b/lib/strtok.h
index e221fa6..831ef0c 100644
--- a/lib/strtok.h
+++ b/lib/strtok.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strtoofft.c b/lib/strtoofft.c
index 96e3820..ac87cfc 100644
--- a/lib/strtoofft.c
+++ b/lib/strtoofft.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/strtoofft.h b/lib/strtoofft.h
index be19cd7..4d22ba3 100644
--- a/lib/strtoofft.h
+++ b/lib/strtoofft.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/system_win32.c b/lib/system_win32.c
index 9b0797b..2939fd0 100644
--- a/lib/system_win32.c
+++ b/lib/system_win32.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2016 - 2020, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2016 - 2021, Steve Holme, <steve_holme@hotmail.com>.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -58,7 +58,7 @@
     wVersionRequested = MAKEWORD(2, 2);
     res = WSAStartup(wVersionRequested, &wsaData);
 
-    if(res != 0)
+    if(res)
       /* Tell the user that we couldn't find a usable */
       /* winsock.dll.     */
       return CURLE_FAILED_INIT;
@@ -196,7 +196,7 @@
       pLoadLibraryEx(filename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) :
       LoadLibrary(filename);
   }
-  /* Detect if KB2533623 is installed, as LOAD_LIBARY_SEARCH_SYSTEM32 is only
+  /* Detect if KB2533623 is installed, as LOAD_LIBRARY_SEARCH_SYSTEM32 is only
      supported on Windows Vista, Windows Server 2008, Windows 7 and Windows
      Server 2008 R2 with this patch or natively on Windows 8 and above */
   else if(pLoadLibraryEx && GetProcAddress(hKernel32, "AddDllDirectory")) {
diff --git a/lib/system_win32.h b/lib/system_win32.h
index 2547bda..69e0c81 100644
--- a/lib/system_win32.h
+++ b/lib/system_win32.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/telnet.c b/lib/telnet.c
index 754febe..a81bb81 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -88,7 +88,7 @@
 #endif
 
 static
-CURLcode telrcv(struct connectdata *,
+CURLcode telrcv(struct Curl_easy *data,
                 const unsigned char *inbuf, /* Data received from socket */
                 ssize_t count);             /* Number of bytes received */
 
@@ -98,23 +98,23 @@
                         int cmd, int option);
 #endif
 
-static void negotiate(struct connectdata *);
-static void send_negotiation(struct connectdata *, int cmd, int option);
-static void set_local_option(struct connectdata *conn,
+static void negotiate(struct Curl_easy *data);
+static void send_negotiation(struct Curl_easy *data, int cmd, int option);
+static void set_local_option(struct Curl_easy *data,
                              int option, int newstate);
-static void set_remote_option(struct connectdata *conn,
+static void set_remote_option(struct Curl_easy *data,
                               int option, int newstate);
 
 static void printsub(struct Curl_easy *data,
                      int direction, unsigned char *pointer,
                      size_t length);
-static void suboption(struct connectdata *);
-static void sendsuboption(struct connectdata *conn, int option);
+static void suboption(struct Curl_easy *data);
+static void sendsuboption(struct Curl_easy *data, int option);
 
-static CURLcode telnet_do(struct connectdata *conn, bool *done);
-static CURLcode telnet_done(struct connectdata *conn,
+static CURLcode telnet_do(struct Curl_easy *data, bool *done);
+static CURLcode telnet_done(struct Curl_easy *data,
                                  CURLcode, bool premature);
-static CURLcode send_telnet_data(struct connectdata *conn,
+static CURLcode send_telnet_data(struct Curl_easy *data,
                                  char *buffer, ssize_t nread);
 
 /* For negotiation compliant to RFC 1143 */
@@ -156,13 +156,12 @@
   char subopt_xdisploc[128];         /* Set with suboption XDISPLOC */
   unsigned short subopt_wsx;         /* Set with suboption NAWS */
   unsigned short subopt_wsy;         /* Set with suboption NAWS */
+  TelnetReceive telrcv_state;
   struct curl_slist *telnet_vars;    /* Environment variables */
 
   /* suboptions */
   unsigned char subbuffer[SUBBUFSIZE];
   unsigned char *subpointer, *subend;      /* buffer for sub-options */
-
-  TelnetReceive telrcv_state;
 };
 
 
@@ -186,6 +185,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_TELNET,                          /* defport */
   CURLPROTO_TELNET,                     /* protocol */
   CURLPROTO_TELNET,                     /* family */
@@ -194,7 +194,7 @@
 
 
 static
-CURLcode init_telnet(struct connectdata *conn)
+CURLcode init_telnet(struct Curl_easy *data)
 {
   struct TELNET *tn;
 
@@ -202,7 +202,7 @@
   if(!tn)
     return CURLE_OUT_OF_MEMORY;
 
-  conn->data->req.protop = tn; /* make us known */
+  data->req.p.telnet = tn; /* make us known */
 
   tn->telrcv_state = CURL_TS_DATA;
 
@@ -214,7 +214,7 @@
   tn->him_preferred[CURL_TELOPT_SGA] = CURL_YES;
 
   /* To be compliant with previous releases of libcurl
-     we enable this option by default. This behaviour
+     we enable this option by default. This behavior
          can be changed thanks to the "BINARY" option in
          CURLOPT_TELNETOPTIONS
   */
@@ -244,20 +244,20 @@
   return CURLE_OK;
 }
 
-static void negotiate(struct connectdata *conn)
+static void negotiate(struct Curl_easy *data)
 {
   int i;
-  struct TELNET *tn = (struct TELNET *) conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
 
   for(i = 0; i < CURL_NTELOPTS; i++) {
     if(i == CURL_TELOPT_ECHO)
       continue;
 
     if(tn->us_preferred[i] == CURL_YES)
-      set_local_option(conn, i, CURL_YES);
+      set_local_option(data, i, CURL_YES);
 
     if(tn->him_preferred[i] == CURL_YES)
-      set_remote_option(conn, i, CURL_YES);
+      set_remote_option(data, i, CURL_YES);
   }
 }
 
@@ -268,9 +268,9 @@
   if(data->set.verbose) {
     if(cmd == CURL_IAC) {
       if(CURL_TELCMD_OK(option))
-        infof(data, "%s IAC %s\n", direction, CURL_TELCMD(option));
+        infof(data, "%s IAC %s", direction, CURL_TELCMD(option));
       else
-        infof(data, "%s IAC %d\n", direction, option);
+        infof(data, "%s IAC %d", direction, option);
     }
     else {
       const char *fmt = (cmd == CURL_WILL) ? "WILL" :
@@ -287,45 +287,45 @@
           opt = NULL;
 
         if(opt)
-          infof(data, "%s %s %s\n", direction, fmt, opt);
+          infof(data, "%s %s %s", direction, fmt, opt);
         else
-          infof(data, "%s %s %d\n", direction, fmt, option);
+          infof(data, "%s %s %d", direction, fmt, option);
       }
       else
-        infof(data, "%s %d %d\n", direction, cmd, option);
+        infof(data, "%s %d %d", direction, cmd, option);
     }
   }
 }
 #endif
 
-static void send_negotiation(struct connectdata *conn, int cmd, int option)
+static void send_negotiation(struct Curl_easy *data, int cmd, int option)
 {
-   unsigned char buf[3];
-   ssize_t bytes_written;
-   struct Curl_easy *data = conn->data;
+  unsigned char buf[3];
+  ssize_t bytes_written;
+  struct connectdata *conn = data->conn;
 
-   buf[0] = CURL_IAC;
-   buf[1] = (unsigned char)cmd;
-   buf[2] = (unsigned char)option;
+  buf[0] = CURL_IAC;
+  buf[1] = (unsigned char)cmd;
+  buf[2] = (unsigned char)option;
 
-   bytes_written = swrite(conn->sock[FIRSTSOCKET], buf, 3);
-   if(bytes_written < 0) {
-     int err = SOCKERRNO;
-     failf(data,"Sending data failed (%d)",err);
-   }
+  bytes_written = swrite(conn->sock[FIRSTSOCKET], buf, 3);
+  if(bytes_written < 0) {
+    int err = SOCKERRNO;
+    failf(data,"Sending data failed (%d)",err);
+  }
 
-   printoption(conn->data, "SENT", cmd, option);
+  printoption(data, "SENT", cmd, option);
 }
 
 static
-void set_remote_option(struct connectdata *conn, int option, int newstate)
+void set_remote_option(struct Curl_easy *data, int option, int newstate)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   if(newstate == CURL_YES) {
     switch(tn->him[option]) {
     case CURL_NO:
       tn->him[option] = CURL_WANTYES;
-      send_negotiation(conn, CURL_DO, option);
+      send_negotiation(data, CURL_DO, option);
       break;
 
     case CURL_YES:
@@ -364,7 +364,7 @@
 
     case CURL_YES:
       tn->him[option] = CURL_WANTNO;
-      send_negotiation(conn, CURL_DONT, option);
+      send_negotiation(data, CURL_DONT, option);
       break;
 
     case CURL_WANTNO:
@@ -392,17 +392,17 @@
 }
 
 static
-void rec_will(struct connectdata *conn, int option)
+void rec_will(struct Curl_easy *data, int option)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   switch(tn->him[option]) {
   case CURL_NO:
     if(tn->him_preferred[option] == CURL_YES) {
       tn->him[option] = CURL_YES;
-      send_negotiation(conn, CURL_DO, option);
+      send_negotiation(data, CURL_DO, option);
     }
     else
-      send_negotiation(conn, CURL_DONT, option);
+      send_negotiation(data, CURL_DONT, option);
 
     break;
 
@@ -432,7 +432,7 @@
     case CURL_OPPOSITE:
       tn->him[option] = CURL_WANTNO;
       tn->himq[option] = CURL_EMPTY;
-      send_negotiation(conn, CURL_DONT, option);
+      send_negotiation(data, CURL_DONT, option);
       break;
     }
     break;
@@ -440,9 +440,9 @@
 }
 
 static
-void rec_wont(struct connectdata *conn, int option)
+void rec_wont(struct Curl_easy *data, int option)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   switch(tn->him[option]) {
   case CURL_NO:
     /* Already disabled */
@@ -450,7 +450,7 @@
 
   case CURL_YES:
     tn->him[option] = CURL_NO;
-    send_negotiation(conn, CURL_DONT, option);
+    send_negotiation(data, CURL_DONT, option);
     break;
 
   case CURL_WANTNO:
@@ -462,7 +462,7 @@
     case CURL_OPPOSITE:
       tn->him[option] = CURL_WANTYES;
       tn->himq[option] = CURL_EMPTY;
-      send_negotiation(conn, CURL_DO, option);
+      send_negotiation(data, CURL_DO, option);
       break;
     }
     break;
@@ -482,14 +482,14 @@
 }
 
 static void
-set_local_option(struct connectdata *conn, int option, int newstate)
+set_local_option(struct Curl_easy *data, int option, int newstate)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   if(newstate == CURL_YES) {
     switch(tn->us[option]) {
     case CURL_NO:
       tn->us[option] = CURL_WANTYES;
-      send_negotiation(conn, CURL_WILL, option);
+      send_negotiation(data, CURL_WILL, option);
       break;
 
     case CURL_YES:
@@ -528,7 +528,7 @@
 
     case CURL_YES:
       tn->us[option] = CURL_WANTNO;
-      send_negotiation(conn, CURL_WONT, option);
+      send_negotiation(data, CURL_WONT, option);
       break;
 
     case CURL_WANTNO:
@@ -556,26 +556,26 @@
 }
 
 static
-void rec_do(struct connectdata *conn, int option)
+void rec_do(struct Curl_easy *data, int option)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   switch(tn->us[option]) {
   case CURL_NO:
     if(tn->us_preferred[option] == CURL_YES) {
       tn->us[option] = CURL_YES;
-      send_negotiation(conn, CURL_WILL, option);
+      send_negotiation(data, CURL_WILL, option);
       if(tn->subnegotiation[option] == CURL_YES)
         /* transmission of data option */
-        sendsuboption(conn, option);
+        sendsuboption(data, option);
     }
     else if(tn->subnegotiation[option] == CURL_YES) {
       /* send information to achieve this option*/
       tn->us[option] = CURL_YES;
-      send_negotiation(conn, CURL_WILL, option);
-      sendsuboption(conn, option);
+      send_negotiation(data, CURL_WILL, option);
+      sendsuboption(data, option);
     }
     else
-      send_negotiation(conn, CURL_WONT, option);
+      send_negotiation(data, CURL_WONT, option);
     break;
 
   case CURL_YES:
@@ -602,13 +602,13 @@
       tn->us[option] = CURL_YES;
       if(tn->subnegotiation[option] == CURL_YES) {
         /* transmission of data option */
-        sendsuboption(conn, option);
+        sendsuboption(data, option);
       }
       break;
     case CURL_OPPOSITE:
       tn->us[option] = CURL_WANTNO;
       tn->himq[option] = CURL_EMPTY;
-      send_negotiation(conn, CURL_WONT, option);
+      send_negotiation(data, CURL_WONT, option);
       break;
     }
     break;
@@ -616,9 +616,9 @@
 }
 
 static
-void rec_dont(struct connectdata *conn, int option)
+void rec_dont(struct Curl_easy *data, int option)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   switch(tn->us[option]) {
   case CURL_NO:
     /* Already disabled */
@@ -626,7 +626,7 @@
 
   case CURL_YES:
     tn->us[option] = CURL_NO;
-    send_negotiation(conn, CURL_WONT, option);
+    send_negotiation(data, CURL_WONT, option);
     break;
 
   case CURL_WANTNO:
@@ -638,7 +638,7 @@
     case CURL_OPPOSITE:
       tn->us[option] = CURL_WANTYES;
       tn->usq[option] = CURL_EMPTY;
-      send_negotiation(conn, CURL_WILL, option);
+      send_negotiation(data, CURL_WILL, option);
       break;
     }
     break;
@@ -765,19 +765,17 @@
         break;
       }
     }
-    if(direction)
-      infof(data, "\n");
   }
 }
 
-static CURLcode check_telnet_options(struct connectdata *conn)
+static CURLcode check_telnet_options(struct Curl_easy *data)
 {
   struct curl_slist *head;
   struct curl_slist *beg;
   char option_keyword[128] = "";
   char option_arg[256] = "";
-  struct Curl_easy *data = conn->data;
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
+  struct connectdata *conn = data->conn;
   CURLcode result = CURLE_OK;
   int binary_option;
 
@@ -834,7 +832,7 @@
           tn->us_preferred[CURL_TELOPT_NAWS] = CURL_YES;
         else {
           failf(data, "Syntax error in telnet option: %s", head->data);
-          result = CURLE_TELNET_OPTION_SYNTAX;
+          result = CURLE_SETOPT_OPTION_SYNTAX;
           break;
         }
         continue;
@@ -855,7 +853,7 @@
       break;
     }
     failf(data, "Syntax error in telnet option: %s", head->data);
-    result = CURLE_TELNET_OPTION_SYNTAX;
+    result = CURLE_SETOPT_OPTION_SYNTAX;
     break;
   }
 
@@ -874,7 +872,7 @@
  * side.
  */
 
-static void suboption(struct connectdata *conn)
+static void suboption(struct Curl_easy *data)
 {
   struct curl_slist *v;
   unsigned char temp[2048];
@@ -883,8 +881,8 @@
   int err;
   char varname[128] = "";
   char varval[128] = "";
-  struct Curl_easy *data = conn->data;
-  struct TELNET *tn = (struct TELNET *)data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
+  struct connectdata *conn = data->conn;
 
   printsub(data, '<', (unsigned char *)tn->subbuffer, CURL_SB_LEN(tn) + 2);
   switch(CURL_SB_GET(tn)) {
@@ -922,12 +920,17 @@
         size_t tmplen = (strlen(v->data) + 1);
         /* Add the variable only if it fits */
         if(len + tmplen < (int)sizeof(temp)-6) {
-          if(sscanf(v->data, "%127[^,],%127s", varname, varval)) {
-            msnprintf((char *)&temp[len], sizeof(temp) - len,
-                      "%c%s%c%s", CURL_NEW_ENV_VAR, varname,
-                      CURL_NEW_ENV_VALUE, varval);
-            len += tmplen;
-          }
+          int rv;
+          char sep[2] = "";
+          varval[0] = 0;
+          rv = sscanf(v->data, "%127[^,]%1[,]%127s", varname, sep, varval);
+          if(rv == 1)
+            len += msnprintf((char *)&temp[len], sizeof(temp) - len,
+                             "%c%s", CURL_NEW_ENV_VAR, varname);
+          else if(rv >= 2)
+            len += msnprintf((char *)&temp[len], sizeof(temp) - len,
+                             "%c%s%c%s", CURL_NEW_ENV_VAR, varname,
+                             CURL_NEW_ENV_VALUE, varval);
         }
       }
       msnprintf((char *)&temp[len], sizeof(temp) - len,
@@ -951,15 +954,14 @@
  * Send suboption information to the server side.
  */
 
-static void sendsuboption(struct connectdata *conn, int option)
+static void sendsuboption(struct Curl_easy *data, int option)
 {
   ssize_t bytes_written;
   int err;
   unsigned short x, y;
   unsigned char *uc1, *uc2;
-
-  struct Curl_easy *data = conn->data;
-  struct TELNET *tn = (struct TELNET *)data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
+  struct connectdata *conn = data->conn;
 
   switch(option) {
   case CURL_TELOPT_NAWS:
@@ -995,7 +997,7 @@
     }
     /* ... then the window size with the send_telnet_data() function
        to deal with 0xFF cases ... */
-    send_telnet_data(conn, (char *)tn->subbuffer + 3, 4);
+    send_telnet_data(data, (char *)tn->subbuffer + 3, 4);
     /* ... and the footer */
     bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer + 7, 2);
     if(bytes_written < 0) {
@@ -1008,7 +1010,7 @@
 
 
 static
-CURLcode telrcv(struct connectdata *conn,
+CURLcode telrcv(struct Curl_easy *data,
                 const unsigned char *inbuf, /* Data received from socket */
                 ssize_t count)              /* Number of bytes received */
 {
@@ -1016,12 +1018,11 @@
   CURLcode result;
   int in = 0;
   int startwrite = -1;
-  struct Curl_easy *data = conn->data;
-  struct TELNET *tn = (struct TELNET *)data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
 
 #define startskipping()                                       \
   if(startwrite >= 0) {                                       \
-    result = Curl_client_write(conn,                          \
+    result = Curl_client_write(data,                          \
                                CLIENTWRITE_BODY,              \
                                (char *)&inbuf[startwrite],    \
                                in-startwrite);                \
@@ -1097,28 +1098,28 @@
       case CURL_TS_WILL:
         printoption(data, "RCVD", CURL_WILL, c);
         tn->please_negotiate = 1;
-        rec_will(conn, c);
+        rec_will(data, c);
         tn->telrcv_state = CURL_TS_DATA;
         break;
 
       case CURL_TS_WONT:
         printoption(data, "RCVD", CURL_WONT, c);
         tn->please_negotiate = 1;
-        rec_wont(conn, c);
+        rec_wont(data, c);
         tn->telrcv_state = CURL_TS_DATA;
         break;
 
       case CURL_TS_DO:
         printoption(data, "RCVD", CURL_DO, c);
         tn->please_negotiate = 1;
-        rec_do(conn, c);
+        rec_do(data, c);
         tn->telrcv_state = CURL_TS_DATA;
         break;
 
       case CURL_TS_DONT:
         printoption(data, "RCVD", CURL_DONT, c);
         tn->please_negotiate = 1;
-        rec_dont(conn, c);
+        rec_dont(data, c);
         tn->telrcv_state = CURL_TS_DATA;
         break;
 
@@ -1147,7 +1148,7 @@
             CURL_SB_TERM(tn);
 
             printoption(data, "In SUBOPTION processing, RCVD", CURL_IAC, c);
-            suboption(conn);   /* handle sub-option */
+            suboption(data);   /* handle sub-option */
             tn->telrcv_state = CURL_TS_IAC;
             goto process_iac;
           }
@@ -1159,7 +1160,7 @@
           CURL_SB_ACCUM(tn, CURL_SE);
           tn->subpointer -= 2;
           CURL_SB_TERM(tn);
-          suboption(conn);   /* handle sub-option */
+          suboption(data);   /* handle sub-option */
           tn->telrcv_state = CURL_TS_DATA;
         }
         break;
@@ -1171,13 +1172,14 @@
 }
 
 /* Escape and send a telnet data block */
-static CURLcode send_telnet_data(struct connectdata *conn,
+static CURLcode send_telnet_data(struct Curl_easy *data,
                                  char *buffer, ssize_t nread)
 {
   ssize_t escapes, i, outlen;
   unsigned char *outbuf = NULL;
   CURLcode result = CURLE_OK;
   ssize_t bytes_written, total_written;
+  struct connectdata *conn = data->conn;
 
   /* Determine size of new buffer after escaping */
   escapes = 0;
@@ -1216,7 +1218,7 @@
         break;
       default:                    /* write! */
         bytes_written = 0;
-        result = Curl_write(conn, conn->sock[FIRSTSOCKET],
+        result = Curl_write(data, conn->sock[FIRSTSOCKET],
                             outbuf + total_written,
                             outlen - total_written,
                             &bytes_written);
@@ -1232,10 +1234,10 @@
   return result;
 }
 
-static CURLcode telnet_done(struct connectdata *conn,
-                                 CURLcode status, bool premature)
+static CURLcode telnet_done(struct Curl_easy *data,
+                            CURLcode status, bool premature)
 {
-  struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
+  struct TELNET *tn = data->req.p.telnet;
   (void)status; /* unused */
   (void)premature; /* not used */
 
@@ -1245,15 +1247,15 @@
   curl_slist_free_all(tn->telnet_vars);
   tn->telnet_vars = NULL;
 
-  Curl_safefree(conn->data->req.protop);
+  Curl_safefree(data->req.p.telnet);
 
   return CURLE_OK;
 }
 
-static CURLcode telnet_do(struct connectdata *conn, bool *done)
+static CURLcode telnet_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
 #ifdef USE_WINSOCK
   WSAEVENT event_handle;
@@ -1279,13 +1281,13 @@
 
   *done = TRUE; /* unconditionally */
 
-  result = init_telnet(conn);
+  result = init_telnet(data);
   if(result)
     return result;
 
-  tn = (struct TELNET *)data->req.protop;
+  tn = data->req.p.telnet;
 
-  result = check_telnet_options(conn);
+  result = check_telnet_options(data);
   if(result)
     return result;
 
@@ -1378,7 +1380,7 @@
           }
         }
 
-        result = send_telnet_data(conn, buf, readfile_read);
+        result = send_telnet_data(data, buf, readfile_read);
         if(result) {
           keepon = FALSE;
           break;
@@ -1396,7 +1398,7 @@
         break;
       }
 
-      result = send_telnet_data(conn, buf, readfile_read);
+      result = send_telnet_data(data, buf, readfile_read);
       if(result) {
         keepon = FALSE;
         break;
@@ -1418,7 +1420,7 @@
       }
       if(events.lNetworkEvents & FD_READ) {
         /* read data from network */
-        result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread);
+        result = Curl_read(data, sockfd, buf, data->set.buffer_size, &nread);
         /* read would've blocked. Loop again */
         if(result == CURLE_AGAIN)
           break;
@@ -1434,7 +1436,7 @@
           break;
         }
 
-        result = telrcv(conn, (unsigned char *) buf, nread);
+        result = telrcv(data, (unsigned char *) buf, nread);
         if(result) {
           keepon = FALSE;
           break;
@@ -1444,7 +1446,7 @@
            otherwise don't. We don't want to speak telnet with
            non-telnet servers, like POP or SMTP. */
         if(tn->please_negotiate && !tn->already_negotiated) {
-          negotiate(conn);
+          negotiate(data);
           tn->already_negotiated = 1;
         }
       }
@@ -1498,7 +1500,7 @@
     default:                    /* read! */
       if(pfd[0].revents & POLLIN) {
         /* read data from network */
-        result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread);
+        result = Curl_read(data, sockfd, buf, data->set.buffer_size, &nread);
         /* read would've blocked. Loop again */
         if(result == CURLE_AGAIN)
           break;
@@ -1516,7 +1518,7 @@
 
         total_dl += nread;
         Curl_pgrsSetDownloadCounter(data, total_dl);
-        result = telrcv(conn, (unsigned char *)buf, nread);
+        result = telrcv(data, (unsigned char *)buf, nread);
         if(result) {
           keepon = FALSE;
           break;
@@ -1526,7 +1528,7 @@
            otherwise don't. We don't want to speak telnet with
            non-telnet servers, like POP or SMTP. */
         if(tn->please_negotiate && !tn->already_negotiated) {
-          negotiate(conn);
+          negotiate(data);
           tn->already_negotiated = 1;
         }
       }
@@ -1550,7 +1552,7 @@
       }
 
       if(nread > 0) {
-        result = send_telnet_data(conn, buf, nread);
+        result = send_telnet_data(data, buf, nread);
         if(result) {
           keepon = FALSE;
           break;
@@ -1573,7 +1575,7 @@
       }
     }
 
-    if(Curl_pgrsUpdate(conn)) {
+    if(Curl_pgrsUpdate(data)) {
       result = CURLE_ABORTED_BY_CALLBACK;
       break;
     }
diff --git a/lib/telnet.h b/lib/telnet.h
index 431427f..1427473 100644
--- a/lib/telnet.h
+++ b/lib/telnet.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/tftp.c b/lib/tftp.c
index 1d3b8e8..8aeb14a 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -124,15 +124,12 @@
   tftp_mode_t     mode;
   tftp_error_t    error;
   tftp_event_t    event;
-  struct connectdata      *conn;
+  struct Curl_easy *data;
   curl_socket_t   sockfd;
   int             retries;
   int             retry_time;
   int             retry_max;
-  time_t          start_time;
-  time_t          max_time;
   time_t          rx_time;
-  unsigned short  block;
   struct Curl_sockaddr_storage   local_addr;
   struct Curl_sockaddr_storage   remote_addr;
   curl_socklen_t  remote_addrlen;
@@ -140,6 +137,7 @@
   int             sbytes;
   int             blksize;
   int             requested_blksize;
+  unsigned short  block;
   struct tftp_packet rpacket;
   struct tftp_packet spacket;
 };
@@ -148,16 +146,19 @@
 /* Forward declarations */
 static CURLcode tftp_rx(struct tftp_state_data *state, tftp_event_t event);
 static CURLcode tftp_tx(struct tftp_state_data *state, tftp_event_t event);
-static CURLcode tftp_connect(struct connectdata *conn, bool *done);
-static CURLcode tftp_disconnect(struct connectdata *conn,
+static CURLcode tftp_connect(struct Curl_easy *data, bool *done);
+static CURLcode tftp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 bool dead_connection);
-static CURLcode tftp_do(struct connectdata *conn, bool *done);
-static CURLcode tftp_done(struct connectdata *conn,
+static CURLcode tftp_do(struct Curl_easy *data, bool *done);
+static CURLcode tftp_done(struct Curl_easy *data,
                           CURLcode, bool premature);
-static CURLcode tftp_setup_connection(struct connectdata *conn);
-static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done);
-static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done);
-static int tftp_getsock(struct connectdata *conn, curl_socket_t *socks);
+static CURLcode tftp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
+static CURLcode tftp_multi_statemach(struct Curl_easy *data, bool *done);
+static CURLcode tftp_doing(struct Curl_easy *data, bool *dophase_done);
+static int tftp_getsock(struct Curl_easy *data, struct connectdata *conn,
+                        curl_socket_t *socks);
 static CURLcode tftp_translate_code(tftp_error_t error);
 
 
@@ -181,6 +182,7 @@
   tftp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_TFTP,                            /* defport */
   CURLPROTO_TFTP,                       /* protocol */
   CURLPROTO_TFTP,                       /* family */
@@ -203,52 +205,26 @@
   timediff_t timeout_ms;
   bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE;
 
-  time(&state->start_time);
-
   /* Compute drop-dead time */
-  timeout_ms = Curl_timeleft(state->conn->data, NULL, start);
+  timeout_ms = Curl_timeleft(state->data, NULL, start);
 
   if(timeout_ms < 0) {
     /* time-out, bail out, go home */
-    failf(state->conn->data, "Connection time-out");
+    failf(state->data, "Connection time-out");
     return CURLE_OPERATION_TIMEDOUT;
   }
 
-  if(start) {
-
+  if(timeout_ms > 0)
     maxtime = (time_t)(timeout_ms + 500) / 1000;
-    state->max_time = state->start_time + maxtime;
+  else
+    maxtime = 3600; /* use for calculating block timeouts */
 
-    /* Set per-block timeout to total */
-    timeout = maxtime;
+  /* Set per-block timeout to total */
+  timeout = maxtime;
 
-    /* Average restart after 5 seconds */
-    state->retry_max = (int)timeout/5;
+  /* Average reposting an ACK after 5 seconds */
+  state->retry_max = (int)timeout/5;
 
-    if(state->retry_max < 1)
-      /* avoid division by zero below */
-      state->retry_max = 1;
-
-    /* Compute the re-start interval to suit the timeout */
-    state->retry_time = (int)timeout/state->retry_max;
-    if(state->retry_time<1)
-      state->retry_time = 1;
-
-  }
-  else {
-    if(timeout_ms > 0)
-      maxtime = (time_t)(timeout_ms + 500) / 1000;
-    else
-      maxtime = 3600;
-
-    state->max_time = state->start_time + maxtime;
-
-    /* Set per-block timeout to total */
-    timeout = maxtime;
-
-    /* Average reposting an ACK after 5 seconds */
-    state->retry_max = (int)timeout/5;
-  }
   /* But bound the total number */
   if(state->retry_max<3)
     state->retry_max = 3;
@@ -261,10 +237,10 @@
   if(state->retry_time<1)
     state->retry_time = 1;
 
-  infof(state->conn->data,
-        "set timeouts for state %d; Total %ld, retry %d maxtry %d\n",
-        (int)state->state, (long)(state->max_time-state->start_time),
-        state->retry_time, state->retry_max);
+  infof(state->data,
+        "set timeouts for state %d; Total % " CURL_FORMAT_CURL_OFF_T
+        ", retry %d maxtry %d",
+        (int)state->state, timeout_ms, state->retry_time, state->retry_max);
 
   /* init RX time */
   time(&state->rx_time);
@@ -303,7 +279,7 @@
   return (unsigned short)((packet->data[2] << 8) | packet->data[3]);
 }
 
-static size_t Curl_strnlen(const char *string, size_t maxlen)
+static size_t tftp_strnlen(const char *string, size_t maxlen)
 {
   const char *end = memchr(string, '\0', maxlen);
   return end ? (size_t) (end - string) : maxlen;
@@ -314,14 +290,14 @@
 {
   size_t loc;
 
-  loc = Curl_strnlen(buf, len);
+  loc = tftp_strnlen(buf, len);
   loc++; /* NULL term */
 
   if(loc >= len)
     return NULL;
   *option = buf;
 
-  loc += Curl_strnlen(buf + loc, len-loc);
+  loc += tftp_strnlen(buf + loc, len-loc);
   loc++; /* NULL term */
 
   if(loc > len)
@@ -335,7 +311,7 @@
                                       const char *ptr, int len)
 {
   const char *tmp = ptr;
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
 
   /* if OACK doesn't contain blksize option, the default (512) must be used */
   state->blksize = TFTP_BLKSIZE_DEFAULT;
@@ -344,12 +320,12 @@
     const char *option, *value;
 
     tmp = tftp_option_get(tmp, ptr + len - tmp, &option, &value);
-    if(tmp == NULL) {
+    if(!tmp) {
       failf(data, "Malformed ACK packet, rejecting");
       return CURLE_TFTP_ILLEGAL;
     }
 
-    infof(data, "got option=(%s) value=(%s)\n", option, value);
+    infof(data, "got option=(%s) value=(%s)", option, value);
 
     if(checkprefix(option, TFTP_OPTION_BLKSIZE)) {
       long blksize;
@@ -380,14 +356,14 @@
       }
 
       state->blksize = (int)blksize;
-      infof(data, "%s (%d) %s (%d)\n", "blksize parsed from OACK",
+      infof(data, "%s (%d) %s (%d)", "blksize parsed from OACK",
             state->blksize, "requested", state->requested_blksize);
     }
     else if(checkprefix(option, TFTP_OPTION_TSIZE)) {
       long tsize = 0;
 
       tsize = strtol(value, NULL, 10);
-      infof(data, "%s (%ld)\n", "tsize parsed from OACK", tsize);
+      infof(data, "%s (%ld)", "tsize parsed from OACK", tsize);
 
       /* tsize should be ignored on upload: Who cares about the size of the
          remote file? */
@@ -419,9 +395,9 @@
 {
   CURLcode result;
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
 
-  infof(data, "%s\n", "Connected for transmit");
+  infof(data, "%s", "Connected for transmit");
 #endif
   state->state = TFTP_STATE_TX;
   result = tftp_set_timeouts(state);
@@ -435,9 +411,9 @@
 {
   CURLcode result;
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
 
-  infof(data, "%s\n", "Connected for receive");
+  infof(data, "%s", "Connected for receive");
 #endif
   state->state = TFTP_STATE_RX;
   result = tftp_set_timeouts(state);
@@ -453,11 +429,11 @@
   ssize_t senddata;
   const char *mode = "octet";
   char *filename;
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
   CURLcode result = CURLE_OK;
 
   /* Set ascii mode if -B flag was used */
-  if(data->set.prefer_ascii)
+  if(data->state.prefer_ascii)
     mode = "netascii";
 
   switch(event) {
@@ -475,7 +451,7 @@
     if(data->set.upload) {
       /* If we are uploading, send an WRQ */
       setpacketevent(&state->spacket, TFTP_EVENT_WRQ);
-      state->conn->data->req.upload_fromhere =
+      state->data->req.upload_fromhere =
         (char *)state->spacket.data + 4;
       if(data->state.infilesize != -1)
         Curl_pgrsSetUploadSize(data, data->state.infilesize);
@@ -487,13 +463,13 @@
     /* As RFC3617 describes the separator slash is not actually part of the
        file name so we skip the always-present first letter of the path
        string. */
-    result = Curl_urldecode(data, &state->conn->data->state.up.path[1], 0,
+    result = Curl_urldecode(data, &state->data->state.up.path[1], 0,
                             &filename, NULL, REJECT_ZERO);
     if(result)
       return result;
 
     if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
-      failf(data, "TFTP file name too long\n");
+      failf(data, "TFTP file name too long");
       free(filename);
       return CURLE_TFTP_ILLEGAL; /* too long file name field */
     }
@@ -551,8 +527,8 @@
        not have a size_t argument, like older unixes that want an 'int' */
     senddata = sendto(state->sockfd, (void *)state->spacket.data,
                       (SEND_TYPE_ARG3)sbytes, 0,
-                      state->conn->ip_addr->ai_addr,
-                      state->conn->ip_addr->ai_addrlen);
+                      data->conn->ip_addr->ai_addr,
+                      data->conn->ip_addr->ai_addrlen);
     if(senddata != (ssize_t)sbytes) {
       char buffer[STRERROR_LEN];
       failf(data, "%s", Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
@@ -582,7 +558,7 @@
     break;
 
   default:
-    failf(state->conn->data, "tftp_send_first: internal error");
+    failf(state->data, "tftp_send_first: internal error");
     break;
   }
 
@@ -605,7 +581,7 @@
 {
   ssize_t sbytes;
   int rblock;
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
   char buffer[STRERROR_LEN];
 
   switch(event) {
@@ -620,12 +596,12 @@
     else if(state->block == rblock) {
       /* This is the last recently received block again. Log it and ACK it
          again. */
-      infof(data, "Received last DATA packet block %d again.\n", rblock);
+      infof(data, "Received last DATA packet block %d again.", rblock);
     }
     else {
       /* totally unexpected, just log it */
       infof(data,
-            "Received unexpected DATA packet block %d, expecting block %d\n",
+            "Received unexpected DATA packet block %d, expecting block %d",
             rblock, NEXT_BLOCKNUM(state->block));
       break;
     }
@@ -677,7 +653,7 @@
     /* Increment the retry count and fail if over the limit */
     state->retries++;
     infof(data,
-          "Timeout waiting for block %d ACK.  Retries = %d\n",
+          "Timeout waiting for block %d ACK.  Retries = %d",
           NEXT_BLOCKNUM(state->block), state->retries);
     if(state->retries > state->retry_max) {
       state->error = TFTP_ERR_TIMEOUT;
@@ -725,7 +701,7 @@
  **********************************************************/
 static CURLcode tftp_tx(struct tftp_state_data *state, tftp_event_t event)
 {
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
   ssize_t sbytes;
   CURLcode result = CURLE_OK;
   struct SingleRequest *k = &data->req;
@@ -748,7 +724,7 @@
           * */
          !(state->block == 0 && rblock == 65535)) {
         /* This isn't the expected block.  Log it and up the retry counter */
-        infof(data, "Received ACK for block %d, expecting %d\n",
+        infof(data, "Received ACK for block %d, expecting %d",
               rblock, state->block);
         state->retries++;
         /* Bail out if over the maximum */
@@ -794,15 +770,14 @@
      * data block.
      * */
     state->sbytes = 0;
-    state->conn->data->req.upload_fromhere = (char *)state->spacket.data + 4;
+    state->data->req.upload_fromhere = (char *)state->spacket.data + 4;
     do {
-      result = Curl_fillreadbuffer(state->conn, state->blksize - state->sbytes,
-                                   &cb);
+      result = Curl_fillreadbuffer(data, state->blksize - state->sbytes, &cb);
       if(result)
         return result;
       state->sbytes += (int)cb;
-      state->conn->data->req.upload_fromhere += cb;
-    } while(state->sbytes < state->blksize && cb != 0);
+      state->data->req.upload_fromhere += cb;
+    } while(state->sbytes < state->blksize && cb);
 
     sbytes = sendto(state->sockfd, (void *) state->spacket.data,
                     4 + state->sbytes, SEND_4TH_ARG,
@@ -822,7 +797,7 @@
     /* Increment the retry counter and log the timeout */
     state->retries++;
     infof(data, "Timeout waiting for block %d ACK. "
-          " Retries = %d\n", NEXT_BLOCKNUM(state->block), state->retries);
+          " Retries = %d", NEXT_BLOCKNUM(state->block), state->retries);
     /* Decide if we've had enough */
     if(state->retries > state->retry_max) {
       state->error = TFTP_ERR_TIMEOUT;
@@ -927,26 +902,26 @@
                                    tftp_event_t event)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = state->conn->data;
+  struct Curl_easy *data = state->data;
 
   switch(state->state) {
   case TFTP_STATE_START:
-    DEBUGF(infof(data, "TFTP_STATE_START\n"));
+    DEBUGF(infof(data, "TFTP_STATE_START"));
     result = tftp_send_first(state, event);
     break;
   case TFTP_STATE_RX:
-    DEBUGF(infof(data, "TFTP_STATE_RX\n"));
+    DEBUGF(infof(data, "TFTP_STATE_RX"));
     result = tftp_rx(state, event);
     break;
   case TFTP_STATE_TX:
-    DEBUGF(infof(data, "TFTP_STATE_TX\n"));
+    DEBUGF(infof(data, "TFTP_STATE_TX"));
     result = tftp_tx(state, event);
     break;
   case TFTP_STATE_FIN:
-    infof(data, "%s\n", "TFTP finished");
+    infof(data, "%s", "TFTP finished");
     break;
   default:
-    DEBUGF(infof(data, "STATE: %d\n", state->state));
+    DEBUGF(infof(data, "STATE: %d", state->state));
     failf(data, "%s", "Internal state machine error");
     result = CURLE_TFTP_ILLEGAL;
     break;
@@ -962,9 +937,11 @@
  * The disconnect callback
  *
  **********************************************************/
-static CURLcode tftp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode tftp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead_connection)
 {
   struct tftp_state_data *state = conn->proto.tftpc;
+  (void) data;
   (void) dead_connection;
 
   /* done, free dynamically allocated pkt buffers */
@@ -984,11 +961,12 @@
  * The connect callback
  *
  **********************************************************/
-static CURLcode tftp_connect(struct connectdata *conn, bool *done)
+static CURLcode tftp_connect(struct Curl_easy *data, bool *done)
 {
   struct tftp_state_data *state;
   int blksize;
   int need_blksize;
+  struct connectdata *conn = data->conn;
 
   blksize = TFTP_BLKSIZE_DEFAULT;
 
@@ -997,8 +975,8 @@
     return CURLE_OUT_OF_MEMORY;
 
   /* alloc pkt buffers based on specified blksize */
-  if(conn->data->set.tftp_blksize) {
-    blksize = (int)conn->data->set.tftp_blksize;
+  if(data->set.tftp_blksize) {
+    blksize = (int)data->set.tftp_blksize;
     if(blksize > TFTP_BLKSIZE_MAX || blksize < TFTP_BLKSIZE_MIN)
       return CURLE_TFTP_ILLEGAL;
   }
@@ -1026,8 +1004,8 @@
    * little gain for UDP */
   connclose(conn, "TFTP");
 
-  state->conn = conn;
-  state->sockfd = state->conn->sock[FIRSTSOCKET];
+  state->data = data;
+  state->sockfd = conn->sock[FIRSTSOCKET];
   state->state = TFTP_STATE_START;
   state->error = TFTP_ERR_NONE;
   state->blksize = TFTP_BLKSIZE_DEFAULT; /* Unless updated by OACK response */
@@ -1056,14 +1034,14 @@
                   conn->ip_addr->ai_addrlen);
     if(rc) {
       char buffer[STRERROR_LEN];
-      failf(conn->data, "bind() failed; %s",
+      failf(data, "bind() failed; %s",
             Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
       return CURLE_COULDNT_CONNECT;
     }
     conn->bits.bound = TRUE;
   }
 
-  Curl_pgrsStartNow(conn->data);
+  Curl_pgrsStartNow(data);
 
   *done = TRUE;
 
@@ -1077,16 +1055,17 @@
  * The done callback
  *
  **********************************************************/
-static CURLcode tftp_done(struct connectdata *conn, CURLcode status,
+static CURLcode tftp_done(struct Curl_easy *data, CURLcode status,
                           bool premature)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct tftp_state_data *state = conn->proto.tftpc;
 
   (void)status; /* unused */
   (void)premature; /* not used */
 
-  if(Curl_pgrsDone(conn))
+  if(Curl_pgrsDone(data))
     return CURLE_ABORTED_BY_CALLBACK;
 
   /* If we have encountered an error */
@@ -1103,8 +1082,10 @@
  * The getsock callback
  *
  **********************************************************/
-static int tftp_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int tftp_getsock(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks)
 {
+  (void)data;
   socks[0] = conn->sock[FIRSTSOCKET];
   return GETSOCK_READSOCK(0);
 }
@@ -1116,12 +1097,12 @@
  * Called once select fires and data is ready on the socket
  *
  **********************************************************/
-static CURLcode tftp_receive_packet(struct connectdata *conn)
+static CURLcode tftp_receive_packet(struct Curl_easy *data)
 {
   struct Curl_sockaddr_storage fromaddr;
   curl_socklen_t        fromlen;
   CURLcode              result = CURLE_OK;
-  struct Curl_easy  *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct tftp_state_data *state = conn->proto.tftpc;
   struct SingleRequest  *k = &data->req;
 
@@ -1154,7 +1135,7 @@
       /* Don't pass to the client empty or retransmitted packets */
       if(state->rbytes > 4 &&
          (NEXT_BLOCKNUM(state->block) == getrpacketblock(&state->rpacket))) {
-        result = Curl_client_write(conn, CLIENTWRITE_BODY,
+        result = Curl_client_write(data, CLIENTWRITE_BODY,
                                    (char *)state->rpacket.data + 4,
                                    state->rbytes-4);
         if(result) {
@@ -1171,8 +1152,8 @@
       char *str = (char *)state->rpacket.data + 4;
       size_t strn = state->rbytes - 4;
       state->error = (tftp_error_t)error;
-      if(Curl_strnlen(str, strn) < strn)
-        infof(data, "TFTP error: %s\n", str);
+      if(tftp_strnlen(str, strn) < strn)
+        infof(data, "TFTP error: %s", str);
       break;
     }
     case TFTP_EVENT_ACK:
@@ -1192,7 +1173,7 @@
     }
 
     /* Update the progress meter */
-    if(Curl_pgrsUpdate(conn)) {
+    if(Curl_pgrsUpdate(data)) {
       tftp_state_machine(state, TFTP_EVENT_ERROR);
       return CURLE_ABORTED_BY_CALLBACK;
     }
@@ -1207,32 +1188,32 @@
  * Check if timeouts have been reached
  *
  **********************************************************/
-static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
+static timediff_t tftp_state_timeout(struct Curl_easy *data,
+                                     tftp_event_t *event)
 {
   time_t current;
+  struct connectdata *conn = data->conn;
   struct tftp_state_data *state = conn->proto.tftpc;
+  timediff_t timeout_ms;
 
   if(event)
     *event = TFTP_EVENT_NONE;
 
-  time(&current);
-  if(current > state->max_time) {
-    DEBUGF(infof(conn->data, "timeout: %ld > %ld\n",
-                 (long)current, (long)state->max_time));
+  timeout_ms = Curl_timeleft(state->data, NULL,
+                             (state->state == TFTP_STATE_START));
+  if(timeout_ms < 0) {
     state->error = TFTP_ERR_TIMEOUT;
     state->state = TFTP_STATE_FIN;
     return 0;
   }
+  time(&current);
   if(current > state->rx_time + state->retry_time) {
     if(event)
       *event = TFTP_EVENT_TIMEOUT;
     time(&state->rx_time); /* update even though we received nothing */
   }
 
-  /* there's a typecast below here since 'time_t' may in fact be larger than
-     'long', but we estimate that a 'long' will still be able to hold number
-     of seconds even if "only" 32 bit */
-  return (long)(state->max_time - current);
+  return timeout_ms;
 }
 
 /**********************************************************
@@ -1242,17 +1223,17 @@
  * Handle single RX socket event and return
  *
  **********************************************************/
-static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
+static CURLcode tftp_multi_statemach(struct Curl_easy *data, bool *done)
 {
-  tftp_event_t          event;
-  CURLcode              result = CURLE_OK;
-  struct Curl_easy  *data = conn->data;
+  tftp_event_t event;
+  CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct tftp_state_data *state = conn->proto.tftpc;
-  long                  timeout_ms = tftp_state_timeout(conn, &event);
+  timediff_t timeout_ms = tftp_state_timeout(data, &event);
 
   *done = FALSE;
 
-  if(timeout_ms <= 0) {
+  if(timeout_ms < 0) {
     failf(data, "TFTP response timeout");
     return CURLE_OPERATION_TIMEDOUT;
   }
@@ -1276,8 +1257,8 @@
       failf(data, "%s", Curl_strerror(error, buffer, sizeof(buffer)));
       state->event = TFTP_EVENT_ERROR;
     }
-    else if(rc != 0) {
-      result = tftp_receive_packet(conn);
+    else if(rc) {
+      result = tftp_receive_packet(data);
       if(result)
         return result;
       result = tftp_state_machine(state, state->event);
@@ -1301,22 +1282,22 @@
  * Called from multi.c while DOing
  *
  **********************************************************/
-static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done)
+static CURLcode tftp_doing(struct Curl_easy *data, bool *dophase_done)
 {
   CURLcode result;
-  result = tftp_multi_statemach(conn, dophase_done);
+  result = tftp_multi_statemach(data, dophase_done);
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
   else if(!result) {
     /* The multi code doesn't have this logic for the DOING state so we
        provide it for TFTP since it may do the entire transfer in this
        state. */
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       result = CURLE_ABORTED_BY_CALLBACK;
     else
-      result = Curl_speedcheck(conn->data, Curl_now());
+      result = Curl_speedcheck(data, Curl_now());
   }
   return result;
 }
@@ -1328,9 +1309,10 @@
  * Entry point for transfer from tftp_do, sarts state mach
  *
  **********************************************************/
-static CURLcode tftp_perform(struct connectdata *conn, bool *dophase_done)
+static CURLcode tftp_perform(struct Curl_easy *data, bool *dophase_done)
 {
-  CURLcode              result = CURLE_OK;
+  CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct tftp_state_data *state = conn->proto.tftpc;
 
   *dophase_done = FALSE;
@@ -1340,10 +1322,10 @@
   if((state->state == TFTP_STATE_FIN) || result)
     return result;
 
-  tftp_multi_statemach(conn, dophase_done);
+  tftp_multi_statemach(data, dophase_done);
 
   if(*dophase_done)
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
 
   return result;
 }
@@ -1359,15 +1341,16 @@
  *
  **********************************************************/
 
-static CURLcode tftp_do(struct connectdata *conn, bool *done)
+static CURLcode tftp_do(struct Curl_easy *data, bool *done)
 {
   struct tftp_state_data *state;
   CURLcode result;
+  struct connectdata *conn = data->conn;
 
   *done = FALSE;
 
   if(!conn->proto.tftpc) {
-    result = tftp_connect(conn, done);
+    result = tftp_connect(data, done);
     if(result)
       return result;
   }
@@ -1376,7 +1359,7 @@
   if(!state)
     return CURLE_TFTP_ILLEGAL;
 
-  result = tftp_perform(conn, done);
+  result = tftp_perform(data, done);
 
   /* If tftp_perform() returned an error, use that for return code. If it
      was OK, see if tftp_translate_code() has an error. */
@@ -1387,9 +1370,9 @@
   return result;
 }
 
-static CURLcode tftp_setup_connection(struct connectdata *conn)
+static CURLcode tftp_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
-  struct Curl_easy *data = conn->data;
   char *type;
 
   conn->transport = TRNSPRT_UDP;
@@ -1409,14 +1392,14 @@
     switch(command) {
     case 'A': /* ASCII mode */
     case 'N': /* NETASCII mode */
-      data->set.prefer_ascii = TRUE;
+      data->state.prefer_ascii = TRUE;
       break;
 
     case 'O': /* octet mode */
     case 'I': /* binary mode */
     default:
       /* switch off ASCII */
-      data->set.prefer_ascii = FALSE;
+      data->state.prefer_ascii = FALSE;
       break;
     }
   }
diff --git a/lib/tftp.h b/lib/tftp.h
index 3334830..4b5bea2 100644
--- a/lib/tftp.h
+++ b/lib/tftp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/timeval.c b/lib/timeval.c
index e761966..ca98fe5 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -78,14 +78,16 @@
   ** code compiles but fails during run-time if clock_gettime() is
   ** called on unsupported OS version.
   */
-#if defined(__APPLE__) && (HAVE_BUILTIN_AVAILABLE == 1)
+#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
+        (HAVE_BUILTIN_AVAILABLE == 1)
   bool have_clock_gettime = FALSE;
   if(__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *))
     have_clock_gettime = TRUE;
 #endif
 
   if(
-#if defined(__APPLE__) && (HAVE_BUILTIN_AVAILABLE == 1)
+#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
+        (HAVE_BUILTIN_AVAILABLE == 1)
     have_clock_gettime &&
 #endif
     (0 == clock_gettime(CLOCK_MONOTONIC, &tsnow))) {
diff --git a/lib/timeval.h b/lib/timeval.h
index 53e0636..685e729 100644
--- a/lib/timeval.h
+++ b/lib/timeval.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/transfer.c b/lib/transfer.c
index a07c7af..3e650b5 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -78,6 +78,8 @@
 #include "mime.h"
 #include "strcase.h"
 #include "urlapi-int.h"
+#include "hsts.h"
+#include "setopt.h"
 
 /* The last 3 #include files should be in this order */
 #include "curl_printf.h"
@@ -92,12 +94,13 @@
  *
  * Returns a pointer to the first matching header or NULL if none matched.
  */
-char *Curl_checkheaders(const struct connectdata *conn,
+char *Curl_checkheaders(const struct Curl_easy *data,
                         const char *thisheader)
 {
   struct curl_slist *head;
   size_t thislen = strlen(thisheader);
-  struct Curl_easy *data = conn->data;
+  DEBUGASSERT(thislen);
+  DEBUGASSERT(thisheader[thislen-1] != ':');
 
   for(head = data->set.headers; head; head = head->next) {
     if(strncasecompare(head->data, thisheader, thislen) &&
@@ -124,8 +127,8 @@
  * This function will be called to loop through the trailers buffer
  * until no more data is available for sending.
  */
-static size_t Curl_trailers_read(char *buffer, size_t size, size_t nitems,
-                                 void *raw)
+static size_t trailers_read(char *buffer, size_t size, size_t nitems,
+                            void *raw)
 {
   struct Curl_easy *data = (struct Curl_easy *)raw;
   struct dynbuf *trailers_buf = &data->state.trailers_buf;
@@ -141,7 +144,7 @@
   return to_copy;
 }
 
-static size_t Curl_trailers_left(void *raw)
+static size_t trailers_left(void *raw)
 {
   struct Curl_easy *data = (struct Curl_easy *)raw;
   struct dynbuf *trailers_buf = &data->state.trailers_buf;
@@ -153,10 +156,9 @@
  * This function will call the read callback to fill our buffer with data
  * to upload.
  */
-CURLcode Curl_fillreadbuffer(struct connectdata *conn, size_t bytes,
+CURLcode Curl_fillreadbuffer(struct Curl_easy *data, size_t bytes,
                              size_t *nreadp)
 {
-  struct Curl_easy *data = conn->data;
   size_t buffersize = bytes;
   size_t nread;
 
@@ -165,9 +167,10 @@
 
 #ifdef CURL_DOES_CONVERSIONS
   bool sending_http_headers = FALSE;
+  struct connectdata *conn = data->conn;
 
   if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) {
-    const struct HTTP *http = data->req.protop;
+    const struct HTTP *http = data->req.p.http;
 
     if(http->sending == HTTPSEND_REQUEST)
       /* We're sending the HTTP request headers, not the data.
@@ -185,7 +188,7 @@
     /* at this point we already verified that the callback exists
        so we compile and store the trailers buffer, then proceed */
     infof(data,
-          "Moving trailers state machine from initialized to sending.\n");
+          "Moving trailers state machine from initialized to sending.");
     data->state.trailers_state = TRAILERS_SENDING;
     Curl_dyn_init(&data->state.trailers_buf, DYN_TRAILERS);
 
@@ -208,7 +211,7 @@
       curl_slist_free_all(trailers);
       return result;
     }
-    infof(data, "Successfully compiled trailers.\r\n");
+    infof(data, "Successfully compiled trailers.");
     curl_slist_free_all(trailers);
   }
 #endif
@@ -230,7 +233,7 @@
        simply return to the previous point in the state machine as if
        nothing happened.
        */
-    readfunc = Curl_trailers_read;
+    readfunc = trailers_read;
     extra_data = (void *)data;
   }
   else
@@ -253,7 +256,7 @@
   if(nread == CURL_READFUNC_PAUSE) {
     struct SingleRequest *k = &data->req;
 
-    if(conn->handler->flags & PROTOPT_NONETWORK) {
+    if(data->conn->handler->flags & PROTOPT_NONETWORK) {
       /* protocols that work without network cannot be paused. This is
          actually only FILE:// just now, and it can't pause since the transfer
          isn't done using the "normal" procedure. */
@@ -286,7 +289,7 @@
      *        <DATA> CRLF
      */
     /* On non-ASCII platforms the <DATA> may or may not be
-       translated based on set.prefer_ascii while the protocol
+       translated based on state.prefer_ascii while the protocol
        portion must always be translated to the network encoding.
        To further complicate matters, line end conversion might be
        done later on, so we need to prevent CRLFs from becoming
@@ -301,7 +304,7 @@
 
     if(
 #ifdef CURL_DO_LINEEND_CONV
-       (data->set.prefer_ascii) ||
+       (data->state.prefer_ascii) ||
 #endif
        (data->set.crlf)) {
       /* \n will become \r\n later on */
@@ -348,7 +351,7 @@
     {
       CURLcode result;
       size_t length;
-      if(data->set.prefer_ascii)
+      if(data->state.prefer_ascii)
         /* translate the protocol and data */
         length = nread;
       else
@@ -366,14 +369,14 @@
 
 #ifndef CURL_DISABLE_HTTP
     if(data->state.trailers_state == TRAILERS_SENDING &&
-       !Curl_trailers_left(data)) {
+       !trailers_left(data)) {
       Curl_dyn_free(&data->state.trailers_buf);
       data->state.trailers_state = TRAILERS_DONE;
       data->set.trailer_data = NULL;
       data->set.trailer_callback = NULL;
       /* mark the transfer as done */
       data->req.upload_done = TRUE;
-      infof(data, "Signaling end of chunked upload after trailers.\n");
+      infof(data, "Signaling end of chunked upload after trailers.");
     }
     else
 #endif
@@ -382,14 +385,14 @@
         /* mark this as done once this chunk is transferred */
         data->req.upload_done = TRUE;
         infof(data,
-              "Signaling end of chunked upload via terminating chunk.\n");
+              "Signaling end of chunked upload via terminating chunk.");
       }
 
     if(added_crlf)
       nread += strlen(endofline_network); /* for the added end of line */
   }
 #ifdef CURL_DOES_CONVERSIONS
-  else if((data->set.prefer_ascii) && (!sending_http_headers)) {
+  else if((data->state.prefer_ascii) && (!sending_http_headers)) {
     CURLcode result;
     result = Curl_convert_to_network(data, data->req.upload_fromhere, nread);
     /* Curl_convert_to_network calls failf if unsuccessful */
@@ -409,9 +412,9 @@
  * POST/PUT with multi-pass authentication when a sending was denied and a
  * resend is necessary.
  */
-CURLcode Curl_readrewind(struct connectdata *conn)
+CURLcode Curl_readrewind(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   curl_mimepart *mimepart = &data->set.mimepost;
 
   conn->bits.rewindaftersend = FALSE; /* we rewind now */
@@ -426,7 +429,7 @@
      CURLOPT_HTTPPOST, call app to rewind
   */
   if(conn->handler->protocol & PROTO_FAMILY_HTTP) {
-    struct HTTP *http = data->req.protop;
+    struct HTTP *http = data->req.p.http;
 
     if(http->sendit)
       mimepart = http->sendit;
@@ -435,9 +438,10 @@
     ; /* do nothing */
   else if(data->state.httpreq == HTTPREQ_POST_MIME ||
           data->state.httpreq == HTTPREQ_POST_FORM) {
-    if(Curl_mime_rewind(mimepart)) {
+    CURLcode result = Curl_mime_rewind(mimepart);
+    if(result) {
       failf(data, "Cannot rewind mime/post data");
-      return CURLE_SEND_FAIL_REWIND;
+      return result;
     }
   }
   else {
@@ -459,7 +463,7 @@
       err = (data->set.ioctl_func)(data, CURLIOCMD_RESTARTREAD,
                                    data->set.ioctl_client);
       Curl_set_in_callback(data, false);
-      infof(data, "the ioctl callback returned %d\n", (int)err);
+      infof(data, "the ioctl callback returned %d", (int)err);
 
       if(err) {
         failf(data, "ioctl callback returned error %d", (int)err);
@@ -493,11 +497,13 @@
     return Curl_quic_data_pending(data);
 #endif
 
+  if(conn->handler->protocol&PROTO_FAMILY_FTP)
+    return Curl_ssl_data_pending(conn, SECONDARYSOCKET);
+
   /* in the case of libssh2, we can never be really sure that we have emptied
      its internal buffers so we MUST always try until we get EAGAIN back */
   return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) ||
 #if defined(USE_NGHTTP2)
-    Curl_ssl_data_pending(conn, FIRSTSOCKET) ||
     /* For HTTP/2, we may read up everything including response body
        with header fields in Curl_http_readwrite_headers. If no
        content-length is provided, curl waits for the connection
@@ -505,10 +511,9 @@
        TRUE. The thing is if we read everything, then http2_recv won't
        be called and we cannot signal the HTTP/2 stream has closed. As
        a workaround, we return nonzero here to call http2_recv. */
-    ((conn->handler->protocol&PROTO_FAMILY_HTTP) && conn->httpversion >= 20);
-#else
-    Curl_ssl_data_pending(conn, FIRSTSOCKET);
+    ((conn->handler->protocol&PROTO_FAMILY_HTTP) && conn->httpversion >= 20) ||
 #endif
+    Curl_ssl_data_pending(conn, FIRSTSOCKET);
 }
 
 /*
@@ -525,7 +530,7 @@
   default:
     if(timeofdoc <= data->set.timevalue) {
       infof(data,
-            "The requested document is not new enough\n");
+            "The requested document is not new enough");
       data->info.timecond = TRUE;
       return FALSE;
     }
@@ -533,7 +538,7 @@
   case CURL_TIMECOND_IFUNMODSINCE:
     if(timeofdoc >= data->set.timevalue) {
       infof(data,
-            "The requested document is not old enough\n");
+            "The requested document is not old enough");
       data->info.timecond = TRUE;
       return FALSE;
     }
@@ -598,7 +603,7 @@
 
     if(bytestoread) {
       /* receive data from the network! */
-      result = Curl_read(conn, conn->sockfd, buf, bytestoread, &nread);
+      result = Curl_read(data, conn->sockfd, buf, bytestoread, &nread);
 
       /* read would've blocked */
       if(CURLE_AGAIN == result)
@@ -610,7 +615,7 @@
     else {
       /* read nothing but since we wanted nothing we consider this an OK
          situation to proceed from */
-      DEBUGF(infof(data, "readwrite_data: we're done!\n"));
+      DEBUGF(infof(data, "readwrite_data: we're done!"));
       nread = 0;
     }
 
@@ -633,10 +638,10 @@
          server closed the connection and we bail out from this! */
 #ifdef USE_NGHTTP2
       if(is_http2 && !nread)
-        DEBUGF(infof(data, "nread == 0, stream closed, bailing\n"));
+        DEBUGF(infof(data, "nread == 0, stream closed, bailing"));
       else
 #endif
-        DEBUGF(infof(data, "nread <= 0, server closed connection, bailing\n"));
+        DEBUGF(infof(data, "nread <= 0, server closed connection, bailing"));
       k->keepon &= ~KEEP_RECV;
       break;
     }
@@ -679,7 +684,7 @@
           infof(data,
                 "Excess found:"
                 " excess = %zd"
-                " url = %s (zero-length body)\n",
+                " url = %s (zero-length body)",
                 nread, data->state.up.path);
         }
 
@@ -707,64 +712,10 @@
            write a piece of the body */
         if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) {
           /* HTTP-only checks */
-
-          if(data->req.newurl) {
-            if(conn->bits.close) {
-              /* Abort after the headers if "follow Location" is set
-                 and we're set to close anyway. */
-              k->keepon &= ~KEEP_RECV;
-              *done = TRUE;
-              return CURLE_OK;
-            }
-            /* We have a new url to load, but since we want to be able
-               to re-use this connection properly, we read the full
-               response in "ignore more" */
-            k->ignorebody = TRUE;
-            infof(data, "Ignoring the response-body\n");
-          }
-          if(data->state.resume_from && !k->content_range &&
-             (data->state.httpreq == HTTPREQ_GET) &&
-             !k->ignorebody) {
-
-            if(k->size == data->state.resume_from) {
-              /* The resume point is at the end of file, consider this fine
-                 even if it doesn't allow resume from here. */
-              infof(data, "The entire document is already downloaded");
-              connclose(conn, "already downloaded");
-              /* Abort download */
-              k->keepon &= ~KEEP_RECV;
-              *done = TRUE;
-              return CURLE_OK;
-            }
-
-            /* we wanted to resume a download, although the server doesn't
-             * seem to support this and we did this with a GET (if it
-             * wasn't a GET we did a POST or PUT resume) */
-            failf(data, "HTTP server doesn't seem to support "
-                  "byte ranges. Cannot resume.");
-            return CURLE_RANGE_ERROR;
-          }
-
-          if(data->set.timecondition && !data->state.range) {
-            /* A time condition has been set AND no ranges have been
-               requested. This seems to be what chapter 13.3.4 of
-               RFC 2616 defines to be the correct action for a
-               HTTP/1.1 client */
-
-            if(!Curl_meets_timecondition(data, k->timeofdoc)) {
-              *done = TRUE;
-              /* We're simulating a http 304 from server so we return
-                 what should have been returned from the server */
-              data->info.httpcode = 304;
-              infof(data, "Simulate a HTTP 304 response!\n");
-              /* we abort the transfer before it is completed == we ruin the
-                 re-use ability. Close the connection */
-              connclose(conn, "Simulated 304 handling");
-              return CURLE_OK;
-            }
-          } /* we have a time condition */
-
-        } /* this is HTTP or RTSP */
+          result = Curl_http_firstwrite(data, conn, done);
+          if(result || *done)
+            return result;
+        }
       } /* this is the first time we write a body part */
 #endif /* CURL_DISABLE_HTTP */
 
@@ -795,7 +746,7 @@
          */
         CURLcode extra;
         CHUNKcode res =
-          Curl_httpchunk_read(conn, k->str, nread, &nread, &extra);
+          Curl_httpchunk_read(data, k->str, nread, &nread, &extra);
 
         if(CHUNKE_OK < res) {
           if(CHUNKE_PASSTHRU_ERROR == res) {
@@ -806,18 +757,15 @@
           return CURLE_RECV_ERROR;
         }
         if(CHUNKE_STOP == res) {
-          size_t dataleft;
           /* we're done reading chunks! */
           k->keepon &= ~KEEP_RECV; /* read no more */
 
-          /* There are now possibly N number of bytes at the end of the
-             str buffer that weren't written to the client.
-             Push it back to be read on the next pass. */
-
-          dataleft = conn->chunk.dataleft;
-          if(dataleft != 0) {
-            infof(conn->data, "Leftovers after chunking: %zu bytes\n",
-                  dataleft);
+          /* N number of bytes at the end of the str buffer that weren't
+             written to the client. */
+          if(conn->chunk.datasize) {
+            infof(data, "Leftovers after chunking: % "
+                  CURL_FORMAT_CURL_OFF_T "u bytes",
+                  conn->chunk.datasize);
           }
         }
         /* If it returned OK, we just keep going */
@@ -827,7 +775,7 @@
       /* Account for body content stored in the header buffer */
       if((k->badheader == HEADER_PARTHEADER) && !k->ignorebody) {
         size_t headlen = Curl_dyn_len(&data->state.headerb);
-        DEBUGF(infof(data, "Increasing bytecount by %zu\n", headlen));
+        DEBUGF(infof(data, "Increasing bytecount by %zu", headlen));
         k->bytecount += headlen;
       }
 
@@ -841,7 +789,7 @@
                 " excess = %zu"
                 ", size = %" CURL_FORMAT_CURL_OFF_T
                 ", maxdownload = %" CURL_FORMAT_CURL_OFF_T
-                ", bytecount = %" CURL_FORMAT_CURL_OFF_T "\n",
+                ", bytecount = %" CURL_FORMAT_CURL_OFF_T,
                 excess, k->size, k->maxdownload, k->bytecount);
           connclose(conn, "excess found in a read");
         }
@@ -867,11 +815,11 @@
 
           /* Don't let excess data pollute body writes */
           if(k->maxdownload == -1 || (curl_off_t)headlen <= k->maxdownload)
-            result = Curl_client_write(conn, CLIENTWRITE_BODY,
+            result = Curl_client_write(data, CLIENTWRITE_BODY,
                                        Curl_dyn_ptr(&data->state.headerb),
                                        headlen);
           else
-            result = Curl_client_write(conn, CLIENTWRITE_BODY,
+            result = Curl_client_write(data, CLIENTWRITE_BODY,
                                        Curl_dyn_ptr(&data->state.headerb),
                                        (size_t)k->maxdownload);
 
@@ -884,19 +832,19 @@
              in http_chunks.c.
              Make sure that ALL_CONTENT_ENCODINGS contains all the
              encodings handled here. */
-          if(conn->data->set.http_ce_skip || !k->writer_stack) {
-            if(!k->ignorebody) {
+          if(data->set.http_ce_skip || !k->writer_stack) {
+            if(!k->ignorebody && nread) {
 #ifndef CURL_DISABLE_POP3
               if(conn->handler->protocol & PROTO_FAMILY_POP3)
-                result = Curl_pop3_write(conn, k->str, nread);
+                result = Curl_pop3_write(data, k->str, nread);
               else
 #endif /* CURL_DISABLE_POP3 */
-                result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str,
+                result = Curl_client_write(data, CLIENTWRITE_BODY, k->str,
                                            nread);
             }
           }
-          else if(!k->ignorebody)
-            result = Curl_unencode_write(conn, k->writer_stack, k->str, nread);
+          else if(!k->ignorebody && nread)
+            result = Curl_unencode_write(data, k->writer_stack, k->str, nread);
         }
         k->badheader = HEADER_NORMAL; /* taken care of now */
 
@@ -950,31 +898,32 @@
     /* When we've read the entire thing and the close bit is set, the server
        may now close the connection. If there's now any kind of sending going
        on from our side, we need to stop that immediately. */
-    infof(data, "we are done reading and this is set to close, stop send\n");
+    infof(data, "we are done reading and this is set to close, stop send");
     k->keepon &= ~KEEP_SEND; /* no writing anymore either */
   }
 
   return CURLE_OK;
 }
 
-CURLcode Curl_done_sending(struct connectdata *conn,
+CURLcode Curl_done_sending(struct Curl_easy *data,
                            struct SingleRequest *k)
 {
+  struct connectdata *conn = data->conn;
   k->keepon &= ~KEEP_SEND; /* we're done writing */
 
   /* These functions should be moved into the handler struct! */
-  Curl_http2_done_sending(conn);
-  Curl_quic_done_sending(conn);
+  Curl_http2_done_sending(data, conn);
+  Curl_quic_done_sending(data);
 
   if(conn->bits.rewindaftersend) {
-    CURLcode result = Curl_readrewind(conn);
+    CURLcode result = Curl_readrewind(data);
     if(result)
       return result;
   }
   return CURLE_OK;
 }
 
-#if defined(WIN32) && !defined(USE_LWIPSOCK)
+#if defined(WIN32) && defined(USE_WINSOCK)
 #ifndef SIO_IDEAL_SEND_BACKLOG_QUERY
 #define SIO_IDEAL_SEND_BACKLOG_QUERY 0x4004747B
 #endif
@@ -1015,6 +964,8 @@
   *didwhat |= KEEP_SEND;
 
   do {
+    curl_off_t nbody;
+
     /* only read more data if there's no upload data already
        present in the upload buffer */
     if(0 == k->upload_present) {
@@ -1028,7 +979,7 @@
         /* HTTP pollution, this should be written nicer to become more
            protocol agnostic. */
         size_t fillcount;
-        struct HTTP *http = k->protop;
+        struct HTTP *http = k->p.http;
 
         if((k->exp100 == EXP100_SENDING_REQUEST) &&
            (http->sending == HTTPSEND_BODY)) {
@@ -1053,7 +1004,7 @@
             sending_http_headers = FALSE;
         }
 
-        result = Curl_fillreadbuffer(conn, data->set.upload_buffer_size,
+        result = Curl_fillreadbuffer(data, data->set.upload_buffer_size,
                                      &fillcount);
         if(result)
           return result;
@@ -1068,7 +1019,7 @@
         break;
       }
       if(nread <= 0) {
-        result = Curl_done_sending(conn, k);
+        result = Curl_done_sending(data, k);
         if(result)
           return result;
         break;
@@ -1081,7 +1032,7 @@
       if((!sending_http_headers) && (
 #ifdef CURL_DO_LINEEND_CONV
          /* always convert if we're FTPing in ASCII mode */
-         (data->set.prefer_ascii) ||
+         (data->state.prefer_ascii) ||
 #endif
          (data->set.crlf))) {
         /* Do we need to allocate a scratch buffer? */
@@ -1130,7 +1081,7 @@
 
 #ifndef CURL_DISABLE_SMTP
       if(conn->handler->protocol & PROTO_FAMILY_SMTP) {
-        result = Curl_smtp_escape_eob(conn, nread);
+        result = Curl_smtp_escape_eob(data, nread);
         if(result)
           return result;
       }
@@ -1142,7 +1093,7 @@
     }
 
     /* write to socket (send away data) */
-    result = Curl_write(conn,
+    result = Curl_write(data,
                         conn->writesockfd,  /* socket to send to */
                         k->upload_fromhere, /* buffer pointer */
                         k->upload_present,  /* buffer size */
@@ -1152,19 +1103,32 @@
 
     win_update_buffer_size(conn->writesockfd);
 
-    if(data->set.verbose)
+    if(k->pendingheader) {
+      /* parts of what was sent was header */
+      curl_off_t n = CURLMIN(k->pendingheader, bytes_written);
       /* show the data before we change the pointer upload_fromhere */
-      Curl_debug(data, CURLINFO_DATA_OUT, k->upload_fromhere,
-                 (size_t)bytes_written);
+      Curl_debug(data, CURLINFO_HEADER_OUT, k->upload_fromhere, (size_t)n);
+      k->pendingheader -= n;
+      nbody = bytes_written - n; /* size of the written body part */
+    }
+    else
+      nbody = bytes_written;
 
-    k->writebytecount += bytes_written;
-    Curl_pgrsSetUploadCounter(data, k->writebytecount);
+    if(nbody) {
+      /* show the data before we change the pointer upload_fromhere */
+      Curl_debug(data, CURLINFO_DATA_OUT,
+                 &k->upload_fromhere[bytes_written - nbody],
+                 (size_t)nbody);
+
+      k->writebytecount += nbody;
+      Curl_pgrsSetUploadCounter(data, k->writebytecount);
+    }
 
     if((!k->upload_chunky || k->forbidchunk) &&
        (k->writebytecount == data->state.infilesize)) {
       /* we have sent all data we were supposed to */
       k->upload_done = TRUE;
-      infof(data, "We are completely uploaded and fine\n");
+      infof(data, "We are completely uploaded and fine");
     }
 
     if(k->upload_present != bytes_written) {
@@ -1186,7 +1150,7 @@
       k->upload_present = 0; /* no more bytes left */
 
       if(k->upload_done) {
-        result = Curl_done_sending(conn, k);
+        result = Curl_done_sending(data, k);
         if(result)
           return result;
       }
@@ -1233,9 +1197,9 @@
   else
     fd_write = CURL_SOCKET_BAD;
 
-  if(conn->data->state.drain) {
+  if(data->state.drain) {
     select_res |= CURL_CSELECT_IN;
-    DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data\n"));
+    DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data"));
   }
 
   if(!select_res) /* Call for select()/poll() only, if read/write/error
@@ -1247,6 +1211,14 @@
     return CURLE_SEND_ERROR;
   }
 
+#ifdef USE_HYPER
+  if(conn->datastream) {
+    result = conn->datastream(data, conn, &didwhat, done, select_res);
+    if(result || *done)
+      return result;
+  }
+  else {
+#endif
   /* We go ahead and do a read if we have a readable socket or if
      the stream was rewound (in which case we have data in a
      buffer) */
@@ -1264,12 +1236,12 @@
     if(result)
       return result;
   }
+#ifdef USE_HYPER
+  }
+#endif
 
   k->now = Curl_now();
-  if(didwhat) {
-    ;
-  }
-  else {
+  if(!didwhat) {
     /* no read no write, this is a timeout? */
     if(k->exp100 == EXP100_AWAITING_CONTINUE) {
       /* This should allow some time for the header to arrive, but only a
@@ -1291,12 +1263,12 @@
         k->exp100 = EXP100_SEND_DATA;
         k->keepon |= KEEP_SEND;
         Curl_expire_done(data, EXPIRE_100_TIMEOUT);
-        infof(data, "Done waiting for 100-continue\n");
+        infof(data, "Done waiting for 100-continue");
       }
     }
   }
 
-  if(Curl_pgrsUpdate(conn))
+  if(Curl_pgrsUpdate(data))
     result = CURLE_ABORTED_BY_CALLBACK;
   else
     result = Curl_speedcheck(data, k->now);
@@ -1355,7 +1327,7 @@
       failf(data, "transfer closed with outstanding read data remaining");
       return CURLE_PARTIAL_FILE;
     }
-    if(Curl_pgrsUpdate(conn))
+    if(Curl_pgrsUpdate(data))
       return CURLE_ABORTED_BY_CALLBACK;
   }
 
@@ -1373,15 +1345,15 @@
  * keeps track of. This function will only be called for connections that are
  * in the proper state to have this information available.
  */
-int Curl_single_getsock(const struct connectdata *conn,
+int Curl_single_getsock(struct Curl_easy *data,
+                        struct connectdata *conn,
                         curl_socket_t *sock)
 {
-  const struct Curl_easy *data = conn->data;
   int bitmap = GETSOCK_BLANK;
   unsigned sockindex = 0;
 
   if(conn->handler->perform_getsock)
-    return conn->handler->perform_getsock(conn, sock);
+    return conn->handler->perform_getsock(data, conn, sock);
 
   /* don't include HOLD and PAUSE connections */
   if((data->req.keepon & KEEP_RECVBITS) == KEEP_RECV) {
@@ -1430,20 +1402,20 @@
 {
   CURLcode result;
 
-  if(!data->change.url && !data->set.uh) {
+  if(!data->state.url && !data->set.uh) {
     /* we can't do anything without URL */
     failf(data, "No URL set!");
     return CURLE_URL_MALFORMAT;
   }
 
   /* since the URL may have been redirected in a previous use of this handle */
-  if(data->change.url_alloc) {
+  if(data->state.url_alloc) {
     /* the already set URL is allocated, free it first! */
-    Curl_safefree(data->change.url);
-    data->change.url_alloc = FALSE;
+    Curl_safefree(data->state.url);
+    data->state.url_alloc = FALSE;
   }
 
-  if(!data->change.url && data->set.uh) {
+  if(!data->state.url && data->set.uh) {
     CURLUcode uc;
     free(data->set.str[STRING_SET_URL]);
     uc = curl_url_get(data->set.uh,
@@ -1454,8 +1426,10 @@
     }
   }
 
+  data->state.prefer_ascii = data->set.prefer_ascii;
+  data->state.list_only = data->set.list_only;
   data->state.httpreq = data->set.method;
-  data->change.url = data->set.str[STRING_SET_URL];
+  data->state.url = data->set.str[STRING_SET_URL];
 
   /* Init the SSL session ID cache here. We do it here since we want to do it
      after the *_setopt() calls (that could specify the size of the cache) but
@@ -1465,11 +1439,11 @@
     return result;
 
   data->state.wildcardmatch = data->set.wildcard_enabled;
-  data->set.followlocation = 0; /* reset the location-follow counter */
+  data->state.followlocation = 0; /* reset the location-follow counter */
   data->state.this_is_a_follow = FALSE; /* reset this */
   data->state.errorbuf = FALSE; /* no error has occurred */
-  data->state.httpversion = 0; /* don't assume any particular server version */
-
+  data->state.httpwant = data->set.httpwant;
+  data->state.httpversion = 0;
   data->state.authproblem = FALSE;
   data->state.authhost.want = data->set.httpauth;
   data->state.authproxy.want = data->set.proxyauth;
@@ -1487,11 +1461,11 @@
     data->state.infilesize = 0;
 
   /* If there is a list of cookie files to read, do it now! */
-  if(data->change.cookielist)
+  if(data->state.cookielist)
     Curl_cookie_loadfiles(data);
 
   /* If there is a list of host pairs to deal with */
-  if(data->change.resolve)
+  if(data->state.resolve)
     result = Curl_loadhostpairs(data);
 
   if(!result) {
@@ -1529,8 +1503,36 @@
     }
 #endif
     Curl_http2_init_state(&data->state);
+    Curl_hsts_loadcb(data, data->hsts);
   }
 
+  /*
+   * Set user-agent. Used for HTTP, but since we can attempt to tunnel
+   * basically anything through a http proxy we can't limit this based on
+   * protocol.
+   */
+  if(data->set.str[STRING_USERAGENT]) {
+    Curl_safefree(data->state.aptr.uagent);
+    data->state.aptr.uagent =
+      aprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]);
+    if(!data->state.aptr.uagent)
+      return CURLE_OUT_OF_MEMORY;
+  }
+
+  if(!result)
+    result = Curl_setstropt(&data->state.aptr.user,
+                            data->set.str[STRING_USERNAME]);
+  if(!result)
+    result = Curl_setstropt(&data->state.aptr.passwd,
+                            data->set.str[STRING_PASSWORD]);
+  if(!result)
+    result = Curl_setstropt(&data->state.aptr.proxyuser,
+                            data->set.str[STRING_PROXYUSERNAME]);
+  if(!result)
+    result = Curl_setstropt(&data->state.aptr.proxypasswd,
+                            data->set.str[STRING_PROXYPASSWORD]);
+
+  data->req.headerbytecount = 0;
   return result;
 }
 
@@ -1573,9 +1575,11 @@
   bool reachedmax = FALSE;
   CURLUcode uc;
 
+  DEBUGASSERT(type != FOLLOW_NONE);
+
   if(type == FOLLOW_REDIR) {
     if((data->set.maxredirs != -1) &&
-       (data->set.followlocation >= data->set.maxredirs)) {
+       (data->state.followlocation >= data->set.maxredirs)) {
       reachedmax = TRUE;
       type = FOLLOW_FAKE; /* switch to fake to store the would-be-redirected
                              to URL */
@@ -1584,34 +1588,59 @@
       /* mark the next request as a followed location: */
       data->state.this_is_a_follow = TRUE;
 
-      data->set.followlocation++; /* count location-followers */
+      data->state.followlocation++; /* count location-followers */
 
       if(data->set.http_auto_referer) {
+        CURLU *u;
+        char *referer = NULL;
+
         /* We are asked to automatically set the previous URL as the referer
            when we get the next URL. We pick the ->url field, which may or may
            not be 100% correct */
 
-        if(data->change.referer_alloc) {
-          Curl_safefree(data->change.referer);
-          data->change.referer_alloc = FALSE;
+        if(data->state.referer_alloc) {
+          Curl_safefree(data->state.referer);
+          data->state.referer_alloc = FALSE;
         }
 
-        data->change.referer = strdup(data->change.url);
-        if(!data->change.referer)
+        /* Make a copy of the URL without crenditals and fragment */
+        u = curl_url();
+        if(!u)
           return CURLE_OUT_OF_MEMORY;
-        data->change.referer_alloc = TRUE; /* yes, free this later */
+
+        uc = curl_url_set(u, CURLUPART_URL, data->state.url, 0);
+        if(!uc)
+          uc = curl_url_set(u, CURLUPART_FRAGMENT, NULL, 0);
+        if(!uc)
+          uc = curl_url_set(u, CURLUPART_USER, NULL, 0);
+        if(!uc)
+          uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0);
+        if(!uc)
+          uc = curl_url_get(u, CURLUPART_URL, &referer, 0);
+
+        curl_url_cleanup(u);
+
+        if(uc || !referer)
+          return CURLE_OUT_OF_MEMORY;
+
+        data->state.referer = referer;
+        data->state.referer_alloc = TRUE; /* yes, free this later */
       }
     }
   }
 
-  if(Curl_is_absolute_url(newurl, NULL, MAX_SCHEME_LEN))
-    /* This is an absolute URL, don't allow the custom port number */
+  if((type != FOLLOW_RETRY) &&
+     (data->req.httpcode != 401) && (data->req.httpcode != 407) &&
+     Curl_is_absolute_url(newurl, NULL, MAX_SCHEME_LEN))
+    /* If this is not redirect due to a 401 or 407 response and an absolute
+       URL: don't allow a custom port number */
     disallowport = TRUE;
 
   DEBUGASSERT(data->state.uh);
   uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl,
                     (type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME :
-                    ((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) );
+                    ((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) |
+                    CURLU_ALLOW_SPACE);
   if(uc) {
     if(type != FOLLOW_FAKE)
       return Curl_uc_to_curlcode(uc);
@@ -1644,13 +1673,13 @@
   if(disallowport)
     data->state.allow_port = FALSE;
 
-  if(data->change.url_alloc)
-    Curl_safefree(data->change.url);
+  if(data->state.url_alloc)
+    Curl_safefree(data->state.url);
 
-  data->change.url = newurl;
-  data->change.url_alloc = TRUE;
+  data->state.url = newurl;
+  data->state.url_alloc = TRUE;
 
-  infof(data, "Issue another request to this URL: '%s'\n", data->change.url);
+  infof(data, "Issue another request to this URL: '%s'", data->state.url);
 
   /*
    * We get here when the HTTP code is 300-399 (and 401). We need to perform
@@ -1686,14 +1715,14 @@
      * request with an error page. To be sure that libcurl gets the page that
      * most user agents would get, libcurl has to force GET.
      *
-     * This behaviour is forbidden by RFC1945 and the obsolete RFC2616, and
+     * This behavior is forbidden by RFC1945 and the obsolete RFC2616, and
      * can be overridden with CURLOPT_POSTREDIR.
      */
     if((data->state.httpreq == HTTPREQ_POST
         || data->state.httpreq == HTTPREQ_POST_FORM
         || data->state.httpreq == HTTPREQ_POST_MIME)
        && !(data->set.keep_post & CURL_REDIR_POST_301)) {
-      infof(data, "Switch from POST to GET\n");
+      infof(data, "Switch from POST to GET");
       data->state.httpreq = HTTPREQ_GET;
     }
     break;
@@ -1711,14 +1740,14 @@
      * request with an error page. To be sure that libcurl gets the page that
      * most user agents would get, libcurl has to force GET.
      *
-     * This behaviour is forbidden by RFC1945 and the obsolete RFC2616, and
+     * This behavior is forbidden by RFC1945 and the obsolete RFC2616, and
      * can be overridden with CURLOPT_POSTREDIR.
      */
     if((data->state.httpreq == HTTPREQ_POST
         || data->state.httpreq == HTTPREQ_POST_FORM
         || data->state.httpreq == HTTPREQ_POST_MIME)
        && !(data->set.keep_post & CURL_REDIR_POST_302)) {
-      infof(data, "Switch from POST to GET\n");
+      infof(data, "Switch from POST to GET");
       data->state.httpreq = HTTPREQ_GET;
     }
     break;
@@ -1736,7 +1765,7 @@
         !(data->set.keep_post & CURL_REDIR_POST_303))) {
       data->state.httpreq = HTTPREQ_GET;
       data->set.upload = false;
-      infof(data, "Switch to %s\n",
+      infof(data, "Switch to %s",
             data->set.opt_no_body?"HEAD":"GET");
     }
     break;
@@ -1765,10 +1794,9 @@
 /* Returns CURLE_OK *and* sets '*url' if a request retry is wanted.
 
    NOTE: that the *url is malloc()ed. */
-CURLcode Curl_retry_request(struct connectdata *conn,
-                            char **url)
+CURLcode Curl_retry_request(struct Curl_easy *data, char **url)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   bool retry = FALSE;
   *url = NULL;
 
@@ -1798,7 +1826,7 @@
        to issue again, but the nghttp2 API can deliver the message to other
        streams as well, which is why this adds the check the data counters
        too. */
-    infof(conn->data, "REFUSED_STREAM, retrying a fresh connect\n");
+    infof(data, "REFUSED_STREAM, retrying a fresh connect");
     data->state.refused_stream = FALSE; /* clear again */
     retry = TRUE;
   }
@@ -1810,9 +1838,9 @@
       data->state.retrycount = 0;
       return CURLE_SEND_ERROR;
     }
-    infof(conn->data, "Connection died, retrying a fresh connect\
-(retry count: %d)\n", data->state.retrycount);
-    *url = strdup(conn->data->change.url);
+    infof(data, "Connection died, retrying a fresh connect (retry count: %d)",
+          data->state.retrycount);
+    *url = strdup(data->state.url);
     if(!*url)
       return CURLE_OUT_OF_MEMORY;
 
@@ -1826,7 +1854,7 @@
 
     if(conn->handler->protocol&PROTO_FAMILY_HTTP) {
       if(data->req.writebytecount) {
-        CURLcode result = Curl_readrewind(conn);
+        CURLcode result = Curl_readrewind(data);
         if(result) {
           Curl_safefree(*url);
           return result;
@@ -1853,7 +1881,7 @@
 {
   struct SingleRequest *k = &data->req;
   struct connectdata *conn = data->conn;
-  struct HTTP *http = data->req.protop;
+  struct HTTP *http = data->req.p.http;
   bool httpsending = ((conn->handler->protocol&PROTO_FAMILY_HTTP) &&
                       (http->sending == HTTPSEND_REQUEST));
   DEBUGASSERT(conn != NULL);
diff --git a/lib/transfer.h b/lib/transfer.h
index 67fd91f..0fa3d55 100644
--- a/lib/transfer.h
+++ b/lib/transfer.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,7 +23,7 @@
  ***************************************************************************/
 
 #define Curl_headersep(x) ((((x)==':') || ((x)==';')))
-char *Curl_checkheaders(const struct connectdata *conn,
+char *Curl_checkheaders(const struct Curl_easy *data,
                         const char *thisheader);
 
 void Curl_init_CONNECT(struct Curl_easy *data);
@@ -36,9 +36,8 @@
                    allow initing to this */
   FOLLOW_FAKE,  /* only records stuff, not actually following */
   FOLLOW_RETRY, /* set if this is a request retry as opposed to a real
-                          redirect following */
-  FOLLOW_REDIR, /* a full true redirect */
-  FOLLOW_LAST   /* never used */
+                   redirect following */
+  FOLLOW_REDIR /* a full true redirect */
 } followtype;
 
 CURLcode Curl_follow(struct Curl_easy *data, char *newurl,
@@ -46,16 +45,16 @@
 CURLcode Curl_readwrite(struct connectdata *conn,
                         struct Curl_easy *data, bool *done,
                         bool *comeback);
-int Curl_single_getsock(const struct connectdata *conn,
-                        curl_socket_t *socks);
-CURLcode Curl_readrewind(struct connectdata *conn);
-CURLcode Curl_fillreadbuffer(struct connectdata *conn, size_t bytes,
+int Curl_single_getsock(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks);
+CURLcode Curl_readrewind(struct Curl_easy *data);
+CURLcode Curl_fillreadbuffer(struct Curl_easy *data, size_t bytes,
                              size_t *nreadp);
-CURLcode Curl_retry_request(struct connectdata *conn, char **url);
+CURLcode Curl_retry_request(struct Curl_easy *data, char **url);
 bool Curl_meets_timecondition(struct Curl_easy *data, time_t timeofdoc);
 CURLcode Curl_get_upload_buffer(struct Curl_easy *data);
 
-CURLcode Curl_done_sending(struct connectdata *conn,
+CURLcode Curl_done_sending(struct Curl_easy *data,
                            struct SingleRequest *k);
 
 /* This sets up a forthcoming transfer */
diff --git a/lib/url.c b/lib/url.c
index 8af33c0..8a2845d 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -62,6 +62,14 @@
 #ifdef USE_LIBIDN2
 #include <idn2.h>
 
+#if defined(WIN32) && defined(UNICODE)
+#define IDN2_LOOKUP(name, host, flags) \
+  idn2_lookup_u8((const uint8_t *)name, (uint8_t **)host, flags)
+#else
+#define IDN2_LOOKUP(name, host, flags) \
+  idn2_lookup_ul((const char *)name, (char **)host, flags)
+#endif
+
 #elif defined(USE_WIN32_IDN)
 /* prototype for curl_win32_idn_to_ascii() */
 bool curl_win32_idn_to_ascii(const char *in, char **out);
@@ -92,10 +100,10 @@
 #include "speedcheck.h"
 #include "warnless.h"
 #include "non-ascii.h"
-#include "inet_pton.h"
 #include "getinfo.h"
 #include "urlapi-int.h"
 #include "system_win32.h"
+#include "hsts.h"
 
 /* And now for the protocols */
 #include "ftp.h"
@@ -233,7 +241,7 @@
 #endif
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
-   (CURL_SIZEOF_CURL_OFF_T > 4)
+   (SIZEOF_CURL_OFF_T > 4)
   &Curl_handler_smb,
 #ifdef USE_SSL
   &Curl_handler_smbs,
@@ -250,6 +258,9 @@
 
 #ifndef CURL_DISABLE_GOPHER
   &Curl_handler_gopher,
+#ifdef USE_SSL
+  &Curl_handler_gophers,
+#endif
 #endif
 
 #ifdef USE_LIBRTMP
@@ -288,6 +299,7 @@
   ZERO_NULL,                            /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   0,                                    /* defport */
   0,                                    /* protocol */
   0,                                    /* family */
@@ -308,16 +320,16 @@
     Curl_safefree(data->set.blobs[j]);
   }
 
-  if(data->change.referer_alloc) {
-    Curl_safefree(data->change.referer);
-    data->change.referer_alloc = FALSE;
+  if(data->state.referer_alloc) {
+    Curl_safefree(data->state.referer);
+    data->state.referer_alloc = FALSE;
   }
-  data->change.referer = NULL;
-  if(data->change.url_alloc) {
-    Curl_safefree(data->change.url);
-    data->change.url_alloc = FALSE;
+  data->state.referer = NULL;
+  if(data->state.url_alloc) {
+    Curl_safefree(data->state.url);
+    data->state.url_alloc = FALSE;
   }
-  data->change.url = NULL;
+  data->state.url = NULL;
 
   Curl_mime_cleanpart(&data->set.mimepost);
 }
@@ -360,6 +372,9 @@
 
   Curl_expire_clear(data); /* shut off timers */
 
+  /* Detach connection if any is left. This should not be normal, but can be
+     the case for example with CONNECT_ONLY + recv/send (test 556) */
+  Curl_detach_connnection(data);
   m = data->multi;
   if(m)
     /* This handle is still part of a multi handle, take care of this first
@@ -398,11 +413,11 @@
   free(data->req.newurl);
   data->req.newurl = NULL;
 
-  if(data->change.referer_alloc) {
-    Curl_safefree(data->change.referer);
-    data->change.referer_alloc = FALSE;
+  if(data->state.referer_alloc) {
+    Curl_safefree(data->state.referer);
+    data->state.referer_alloc = FALSE;
   }
-  data->change.referer = NULL;
+  data->state.referer = NULL;
 
   up_free(data);
   Curl_safefree(data->state.buffer);
@@ -411,6 +426,8 @@
   Curl_flush_cookies(data, TRUE);
   Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
   Curl_altsvc_cleanup(&data->asi);
+  Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);
+  Curl_hsts_cleanup(&data->hsts);
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
   Curl_http_auth_cleanup_digest(data);
 #endif
@@ -418,7 +435,7 @@
   Curl_safefree(data->info.wouldredirect);
 
   /* this destroys the channel and we cannot use it anymore after this */
-  Curl_resolver_cleanup(data->state.resolver);
+  Curl_resolver_cleanup(data->state.async.resolver);
 
   Curl_http2_cleanup_dependencies(data);
   Curl_convert_close(data);
@@ -440,11 +457,18 @@
   Curl_safefree(data->state.aptr.host);
   Curl_safefree(data->state.aptr.cookiehost);
   Curl_safefree(data->state.aptr.rtsp_transport);
+  Curl_safefree(data->state.aptr.user);
+  Curl_safefree(data->state.aptr.passwd);
+  Curl_safefree(data->state.aptr.proxyuser);
+  Curl_safefree(data->state.aptr.proxypasswd);
 
 #ifndef CURL_DISABLE_DOH
-  Curl_dyn_free(&data->req.doh.probe[0].serverdoh);
-  Curl_dyn_free(&data->req.doh.probe[1].serverdoh);
-  curl_slist_free_all(data->req.doh.headers);
+  if(data->req.doh) {
+    Curl_dyn_free(&data->req.doh->probe[0].serverdoh);
+    Curl_dyn_free(&data->req.doh->probe[1].serverdoh);
+    curl_slist_free_all(data->req.doh->headers);
+    Curl_safefree(data->req.doh);
+  }
 #endif
 
   /* destruct wildcard structures if it is needed */
@@ -494,6 +518,7 @@
   set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
   set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
   set->ftp_filemethod = FTPFILE_MULTICWD;
+  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
 #endif
   set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
 
@@ -517,6 +542,8 @@
    * libcurl 7.10 introduced SSL verification *by default*! This needs to be
    * switched off unless wanted.
    */
+  set->doh_verifyhost = TRUE;
+  set->doh_verifypeer = TRUE;
   set->ssl.primary.verifypeer = TRUE;
   set->ssl.primary.verifyhost = TRUE;
 #ifdef USE_TLS_SRP
@@ -556,7 +583,7 @@
    */
   if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
 #if defined(CURL_CA_BUNDLE)
-    result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_ORIG], CURL_CA_BUNDLE);
+    result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], CURL_CA_BUNDLE);
     if(result)
       return result;
 
@@ -566,7 +593,7 @@
       return result;
 #endif
 #if defined(CURL_CA_PATH)
-    result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_ORIG], CURL_CA_PATH);
+    result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], CURL_CA_PATH);
     if(result)
       return result;
 
@@ -596,7 +623,7 @@
   set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
   set->maxage_conn = 118;
   set->http09_allowed = FALSE;
-  set->httpversion =
+  set->httpwant =
 #ifdef USE_NGHTTP2
     CURL_HTTP_VERSION_2TLS
 #else
@@ -630,7 +657,7 @@
 
   data->magic = CURLEASY_MAGIC_NUMBER;
 
-  result = Curl_resolver_init(data, &data->state.resolver);
+  result = Curl_resolver_init(data, &data->state.async.resolver);
   if(result) {
     DEBUGF(fprintf(stderr, "Error: resolver_init failed\n"));
     free(data);
@@ -651,7 +678,7 @@
   }
 
   if(result) {
-    Curl_resolver_cleanup(data->state.resolver);
+    Curl_resolver_cleanup(data->state.async.resolver);
     Curl_dyn_free(&data->state.headerb);
     Curl_freeset(data);
     free(data);
@@ -702,29 +729,38 @@
 #endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */
 
 
-static void conn_shutdown(struct connectdata *conn)
+static void conn_shutdown(struct Curl_easy *data, struct connectdata *conn)
 {
   DEBUGASSERT(conn);
-  infof(conn->data, "Closing connection %ld\n", conn->connection_id);
-  DEBUGASSERT(conn->data);
+  DEBUGASSERT(data);
+  infof(data, "Closing connection %ld", conn->connection_id);
+
+#ifndef USE_HYPER
+  if(conn->connect_state && conn->connect_state->prot_save) {
+    /* If this was closed with a CONNECT in progress, cleanup this temporary
+       struct arrangement */
+    data->req.p.http = NULL;
+    Curl_safefree(conn->connect_state->prot_save);
+  }
+#endif
 
   /* possible left-overs from the async name resolvers */
-  Curl_resolver_cancel(conn);
+  Curl_resolver_cancel(data);
 
   /* close the SSL stuff before we close any sockets since they will/may
      write to the sockets */
-  Curl_ssl_close(conn, FIRSTSOCKET);
-  Curl_ssl_close(conn, SECONDARYSOCKET);
+  Curl_ssl_close(data, conn, FIRSTSOCKET);
+  Curl_ssl_close(data, conn, SECONDARYSOCKET);
 
   /* close possibly still open sockets */
   if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET])
-    Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
+    Curl_closesocket(data, conn, conn->sock[SECONDARYSOCKET]);
   if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])
-    Curl_closesocket(conn, conn->sock[FIRSTSOCKET]);
+    Curl_closesocket(data, conn, conn->sock[FIRSTSOCKET]);
   if(CURL_SOCKET_BAD != conn->tempsock[0])
-    Curl_closesocket(conn, conn->tempsock[0]);
+    Curl_closesocket(data, conn, conn->tempsock[0]);
   if(CURL_SOCKET_BAD != conn->tempsock[1])
-    Curl_closesocket(conn, conn->tempsock[1]);
+    Curl_closesocket(data, conn, conn->tempsock[1]);
 }
 
 static void conn_free(struct connectdata *conn)
@@ -804,7 +840,7 @@
    * are other users of it
    */
   if(CONN_INUSE(conn) && !dead_connection) {
-    DEBUGF(infof(data, "Curl_disconnect when inuse: %zu\n", CONN_INUSE(conn)));
+    DEBUGF(infof(data, "Curl_disconnect when inuse: %zu", CONN_INUSE(conn)));
     return CURLE_OK;
   }
 
@@ -819,19 +855,23 @@
   /* Cleanup NEGOTIATE connection-related data */
   Curl_http_auth_cleanup_negotiate(conn);
 
-  /* the protocol specific disconnect handler and conn_shutdown need a transfer
-     for the connection! */
-  conn->data = data;
-
   if(conn->bits.connect_only)
     /* treat the connection as dead in CONNECT_ONLY situations */
     dead_connection = TRUE;
 
+  /* temporarily attach the connection to this transfer handle for the
+     disconnect and shutdown */
+  Curl_attach_connnection(data, conn);
+
   if(conn->handler->disconnect)
     /* This is set if protocol-specific cleanups should be made */
-    conn->handler->disconnect(conn, dead_connection);
+    conn->handler->disconnect(data, conn, dead_connection);
 
-  conn_shutdown(conn);
+  conn_shutdown(data, conn);
+
+  /* detach it again */
+  Curl_detach_connnection(data);
+
   conn_free(conn);
   return CURLE_OK;
 }
@@ -870,7 +910,7 @@
      (!conn->bits.protoconnstart || !conn->bits.close)) {
 
     if(Curl_multiplex_wanted(handle->multi) &&
-       (handle->set.httpversion >= CURL_HTTP_VERSION_2))
+       (handle->state.httpwant >= CURL_HTTP_VERSION_2))
       /* allows HTTP/2 */
       avail |= CURLPIPE_MULTIPLEX;
   }
@@ -900,14 +940,14 @@
   /* the user information is case-sensitive
      or at least it is not defined as case-insensitive
      see https://tools.ietf.org/html/rfc3986#section-3.2.1 */
-  if((data->user == NULL) != (needle->user == NULL))
+  if(!data->user != !needle->user)
     return FALSE;
   /* curl_strequal does a case insentive comparison, so do not use it here! */
   if(data->user &&
      needle->user &&
      strcmp(data->user, needle->user) != 0)
     return FALSE;
-  if((data->passwd == NULL) != (needle->passwd == NULL))
+  if(!data->passwd != !needle->passwd)
     return FALSE;
   /* curl_strequal does a case insentive comparison, so do not use it here! */
   if(data->passwd &&
@@ -929,15 +969,13 @@
                         struct connectdata *conn,
                         struct curltime now)
 {
-  if(!conn->data) {
-    timediff_t idletime = Curl_timediff(now, conn->lastused);
-    idletime /= 1000; /* integer seconds is fine */
+  timediff_t idletime = Curl_timediff(now, conn->lastused);
+  idletime /= 1000; /* integer seconds is fine */
 
-    if(idletime > data->set.maxage_conn) {
-      infof(data, "Too old connection (%ld seconds), disconnect it\n",
-            idletime);
-      return TRUE;
-    }
+  if(idletime > data->set.maxage_conn) {
+    infof(data, "Too old connection (%ld seconds), disconnect it",
+          idletime);
+    return TRUE;
   }
   return FALSE;
 }
@@ -954,23 +992,29 @@
 static bool extract_if_dead(struct connectdata *conn,
                             struct Curl_easy *data)
 {
-  if(!CONN_INUSE(conn) && !conn->data) {
+  if(!CONN_INUSE(conn)) {
     /* The check for a dead socket makes sense only if the connection isn't in
        use */
     bool dead;
     struct curltime now = Curl_now();
     if(conn_maxage(data, conn, now)) {
+      /* avoid check if already too old */
       dead = TRUE;
     }
     else if(conn->handler->connection_check) {
       /* The protocol has a special method for checking the state of the
          connection. Use it to check if the connection is dead. */
       unsigned int state;
-      struct Curl_easy *olddata = conn->data;
-      conn->data = data; /* use this transfer for now */
-      state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
-      conn->data = olddata;
+
+      /* briefly attach the connection to this transfer for the purpose of
+         checking it */
+      Curl_attach_connnection(data, conn);
+
+      state = conn->handler->connection_check(data, conn, CONNCHECK_ISDEAD);
       dead = (state & CONNRESULT_DEAD);
+      /* detach the connection again */
+      Curl_detach_connnection(data);
+
     }
     else {
       /* Use the general method for determining the death of a connection */
@@ -978,7 +1022,7 @@
     }
 
     if(dead) {
-      infof(data, "Connection %ld seems to be dead!\n", conn->connection_id);
+      infof(data, "Connection %ld seems to be dead!", conn->connection_id);
       Curl_conncache_remove_conn(data, conn, FALSE);
       return TRUE;
     }
@@ -995,10 +1039,11 @@
  * Wrapper to use extract_if_dead() function in Curl_conncache_foreach()
  *
  */
-static int call_extract_if_dead(struct connectdata *conn, void *param)
+static int call_extract_if_dead(struct Curl_easy *data,
+                                struct connectdata *conn, void *param)
 {
   struct prunedead *p = (struct prunedead *)param;
-  if(extract_if_dead(conn, p->data)) {
+  if(extract_if_dead(conn, data)) {
     /* stop the iteration here, pass back the connection that was extracted */
     p->extracted = conn;
     return 1;
@@ -1008,14 +1053,16 @@
 
 /*
  * This function scans the connection cache for half-open/dead connections,
- * closes and removes them.
- * The cleanup is done at most once per second.
+ * closes and removes them. The cleanup is done at most once per second.
+ *
+ * When called, this transfer has no connection attached.
  */
 static void prune_dead_connections(struct Curl_easy *data)
 {
   struct curltime now = Curl_now();
   timediff_t elapsed;
 
+  DEBUGASSERT(!data->conn); /* no connection */
   CONNCACHE_LOCK(data);
   elapsed =
     Curl_timediff(now, data->state.conn_cache->last_cleanup);
@@ -1068,13 +1115,13 @@
 
 #ifdef USE_NTLM
   bool wantNTLMhttp = ((data->state.authhost.want &
-                      (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
-                      (needle->handler->protocol & PROTO_FAMILY_HTTP));
+                        (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
+                       (needle->handler->protocol & PROTO_FAMILY_HTTP));
 #ifndef CURL_DISABLE_PROXY
   bool wantProxyNTLMhttp = (needle->bits.proxy_user_passwd &&
-                           ((data->state.authproxy.want &
-                           (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
-                           (needle->handler->protocol & PROTO_FAMILY_HTTP)));
+                            ((data->state.authproxy.want &
+                              (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
+                             (needle->handler->protocol & PROTO_FAMILY_HTTP)));
 #else
   bool wantProxyNTLMhttp = FALSE;
 #endif
@@ -1085,13 +1132,13 @@
 
   /* Look up the bundle with all the connections to this particular host.
      Locks the connection cache, beware of early returns! */
-  bundle = Curl_conncache_find_bundle(needle, data->state.conn_cache,
+  bundle = Curl_conncache_find_bundle(data, needle, data->state.conn_cache,
                                       &hostbundle);
   if(bundle) {
     /* Max pipe length is zero (unlimited) for multiplexed connections */
     struct Curl_llist_element *curr;
 
-    infof(data, "Found bundle for host %s: %p [%s]\n",
+    infof(data, "Found bundle for host %s: %p [%s]",
           hostbundle, (void *)bundle, (bundle->multiuse == BUNDLE_MULTIPLEX ?
                                        "can multiplex" : "serially"));
 
@@ -1099,22 +1146,22 @@
     if(canmultiplex) {
       if(bundle->multiuse == BUNDLE_UNKNOWN) {
         if(data->set.pipewait) {
-          infof(data, "Server doesn't support multiplex yet, wait\n");
+          infof(data, "Server doesn't support multiplex yet, wait");
           *waitpipe = TRUE;
           CONNCACHE_UNLOCK(data);
           return FALSE; /* no re-use */
         }
 
-        infof(data, "Server doesn't support multiplex (yet)\n");
+        infof(data, "Server doesn't support multiplex (yet)");
         canmultiplex = FALSE;
       }
       if((bundle->multiuse == BUNDLE_MULTIPLEX) &&
          !Curl_multiplex_wanted(data->multi)) {
-        infof(data, "Could multiplex, but not asked to!\n");
+        infof(data, "Could multiplex, but not asked to!");
         canmultiplex = FALSE;
       }
       if(bundle->multiuse == BUNDLE_NO_MULTIUSE) {
-        infof(data, "Can not multiplex, even if we wanted to!\n");
+        infof(data, "Can not multiplex, even if we wanted to!");
         canmultiplex = FALSE;
       }
     }
@@ -1141,13 +1188,16 @@
         continue;
       }
 
+      if(data->set.ipver != CURL_IPRESOLVE_WHATEVER
+          && data->set.ipver != check->ip_version) {
+        /* skip because the connection is not via the requested IP version */
+        continue;
+      }
+
       if(bundle->multiuse == BUNDLE_MULTIPLEX)
         multiplexed = CONN_INUSE(check);
 
-      if(canmultiplex) {
-        ;
-      }
-      else {
+      if(!canmultiplex) {
         if(multiplexed) {
           /* can only happen within multi handles, and means that another easy
              handle is using this connection */
@@ -1155,11 +1205,11 @@
         }
 
         if(Curl_resolver_asynch()) {
-          /* ip_addr_str[0] is NUL only if the resolving of the name hasn't
+          /* primary_ip[0] is NUL only if the resolving of the name hasn't
              completed yet and until then we don't re-use this connection */
-          if(!check->ip_addr_str[0]) {
+          if(!check->primary_ip[0]) {
             infof(data,
-                  "Connection #%ld is still name resolving, can't reuse\n",
+                  "Connection #%ld is still name resolving, can't reuse",
                   check->connection_id);
             continue;
           }
@@ -1168,7 +1218,7 @@
         if(check->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) {
           foundPendingCandidate = TRUE;
           /* Don't pick a connection that hasn't connected yet */
-          infof(data, "Connection #%ld isn't open enough, can't reuse\n",
+          infof(data, "Connection #%ld isn't open enough, can't reuse",
                 check->connection_id);
           continue;
         }
@@ -1245,17 +1295,19 @@
       }
 #endif
 
-      DEBUGASSERT(!check->data || GOOD_EASY_HANDLE(check->data));
-
-      if(!canmultiplex && check->data)
+      if(!canmultiplex && CONN_INUSE(check))
         /* this request can't be multiplexed but the checked connection is
            already in use so we skip it */
         continue;
 
-      if(check->data && (check->data->multi != needle->data->multi))
-        /* this could be subject for multiplex use, but only if they belong to
-         * the same multi handle */
-        continue;
+      if(CONN_INUSE(check)) {
+        /* Subject for multiplex use if 'checks' belongs to the same multi
+           handle as 'data' is. */
+        struct Curl_llist_element *e = check->easyq.head;
+        struct Curl_easy *entry = e->ptr;
+        if(entry->multi != data->multi)
+          continue;
+      }
 
       if(needle->localdev || needle->localport) {
         /* If we are bound to a specific local end (IP+port), we must not
@@ -1286,6 +1338,13 @@
         }
       }
 
+      /* If multiplexing isn't enabled on the h2 connection and h1 is
+         explicitly requested, handle it: */
+      if((needle->handler->protocol & PROTO_FAMILY_HTTP) &&
+         (check->httpversion >= 20) &&
+         (data->state.httpwant < CURL_HTTP_VERSION_2_0))
+        continue;
+
       if((needle->handler->flags&PROTOPT_SSL)
 #ifndef CURL_DISABLE_PROXY
          || !needle->bits.httpproxy || needle->bits.tunnel_proxy
@@ -1314,7 +1373,7 @@
                                         &check->ssl_config)) {
               DEBUGF(infof(data,
                            "Connection #%ld has different SSL parameters, "
-                           "can't reuse\n",
+                           "can't reuse",
                            check->connection_id));
               continue;
             }
@@ -1322,7 +1381,7 @@
               foundPendingCandidate = TRUE;
               DEBUGF(infof(data,
                            "Connection #%ld has not started SSL connect, "
-                           "can't reuse\n",
+                           "can't reuse",
                            check->connection_id));
               continue;
             }
@@ -1409,14 +1468,14 @@
             /* Multiplexed connections can only be HTTP/2 for now */
             struct http_conn *httpc = &check->proto.httpc;
             if(multiplexed >= httpc->settings.max_concurrent_streams) {
-              infof(data, "MAX_CONCURRENT_STREAMS reached, skip (%zu)\n",
+              infof(data, "MAX_CONCURRENT_STREAMS reached, skip (%zu)",
                     multiplexed);
               continue;
             }
             else if(multiplexed >=
-                    Curl_multi_max_concurrent_streams(needle->data->multi)) {
+                    Curl_multi_max_concurrent_streams(data->multi)) {
               infof(data, "client side MAX_CONCURRENT_STREAMS reached"
-                    ", skip (%zu)\n",
+                    ", skip (%zu)",
                     multiplexed);
               continue;
             }
@@ -1424,7 +1483,7 @@
 #endif
           /* When not multiplexed, we have a match here! */
           chosen = check;
-          infof(data, "Multiplexed connection found!\n");
+          infof(data, "Multiplexed connection found!");
           break;
         }
         else {
@@ -1438,7 +1497,6 @@
 
   if(chosen) {
     /* mark it as used before releasing the lock */
-    chosen->data = data; /* own it! */
     Curl_attach_connnection(data, chosen);
     CONNCACHE_UNLOCK(data);
     *usethis = chosen;
@@ -1448,7 +1506,7 @@
 
   if(foundPendingCandidate && data->set.pipewait) {
     infof(data,
-          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set\n");
+          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
     *waitpipe = TRUE;
   }
 
@@ -1459,17 +1517,18 @@
  * verboseconnect() displays verbose information after a connect
  */
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
-void Curl_verboseconnect(struct connectdata *conn)
+void Curl_verboseconnect(struct Curl_easy *data,
+                         struct connectdata *conn)
 {
-  if(conn->data->set.verbose)
-    infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
+  if(data->set.verbose)
+    infof(data, "Connected to %s (%s) port %u (#%ld)",
 #ifndef CURL_DISABLE_PROXY
           conn->bits.socksproxy ? conn->socks_proxy.host.dispname :
           conn->bits.httpproxy ? conn->http_proxy.host.dispname :
 #endif
           conn->bits.conn_to_host ? conn->conn_to_host.dispname :
           conn->host.dispname,
-          conn->ip_addr_str, conn->port, conn->connection_id);
+          conn->primary_ip, conn->port, conn->connection_id);
 }
 #endif
 
@@ -1508,16 +1567,14 @@
 /*
  * Perform any necessary IDN conversion of hostname
  */
-CURLcode Curl_idnconvert_hostname(struct connectdata *conn,
+CURLcode Curl_idnconvert_hostname(struct Curl_easy *data,
                                   struct hostname *host)
 {
-  struct Curl_easy *data = conn->data;
-
 #ifndef USE_LIBIDN2
   (void)data;
-  (void)conn;
+  (void)data;
 #elif defined(CURL_DISABLE_VERBOSE_STRINGS)
-  (void)conn;
+  (void)data;
 #endif
 
   /* set the name we use to display the host name */
@@ -1536,14 +1593,19 @@
 #else
       int flags = IDN2_NFC_INPUT;
 #endif
-      int rc = idn2_lookup_ul((const char *)host->name, &ace_hostname, flags);
+      int rc = IDN2_LOOKUP(host->name, &ace_hostname, flags);
+      if(rc != IDN2_OK)
+        /* fallback to TR46 Transitional mode for better IDNA2003
+           compatibility */
+        rc = IDN2_LOOKUP(host->name, &ace_hostname,
+                         IDN2_TRANSITIONAL);
       if(rc == IDN2_OK) {
         host->encalloc = (char *)ace_hostname;
         /* change the name pointer to point to the encoded hostname */
         host->name = host->encalloc;
       }
       else {
-        failf(data, "Failed to convert %s to ACE; %s\n", host->name,
+        failf(data, "Failed to convert %s to ACE; %s", host->name,
               idn2_strerror(rc));
         return CURLE_URL_MALFORMAT;
       }
@@ -1558,12 +1620,12 @@
     }
     else {
       char buffer[STRERROR_LEN];
-      failf(data, "Failed to convert %s to ACE; %s\n", host->name,
+      failf(data, "Failed to convert %s to ACE; %s", host->name,
             Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer)));
       return CURLE_URL_MALFORMAT;
     }
 #else
-    infof(data, "IDN support not present, can't parse Unicode domains\n");
+    infof(data, "IDN support not present, can't parse Unicode domains");
 #endif
   }
   return CURLE_OK;
@@ -1649,12 +1711,6 @@
   /* Store current time to give a baseline to keepalive connection times. */
   conn->keepalive = Curl_now();
 
-  /* Store off the configured connection upkeep time. */
-  conn->upkeep_interval_ms = data->set.upkeep_interval_ms;
-
-  conn->data = data; /* Setup the association between this connection
-                        and the Curl_easy */
-
 #ifndef CURL_DISABLE_PROXY
   conn->http_proxy.proxytype = data->set.proxytype;
   conn->socks_proxy.proxytype = CURLPROXY_SOCKS4;
@@ -1677,11 +1733,11 @@
   }
 
   conn->bits.proxy_user_passwd =
-    (data->set.str[STRING_PROXYUSERNAME]) ? TRUE : FALSE;
+    (data->state.aptr.proxyuser) ? TRUE : FALSE;
   conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
 #endif /* CURL_DISABLE_PROXY */
 
-  conn->bits.user_passwd = (data->set.str[STRING_USERNAME]) ? TRUE : FALSE;
+  conn->bits.user_passwd = (data->state.aptr.user) ? TRUE : FALSE;
 #ifndef CURL_DISABLE_FTP
   conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
   conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
@@ -1807,12 +1863,14 @@
  * the scope_id based on that!
  */
 
-static void zonefrom_url(CURLU *uh, struct connectdata *conn)
+static void zonefrom_url(CURLU *uh, struct Curl_easy *data,
+                         struct connectdata *conn)
 {
   char *zoneid;
-  CURLUcode uc;
-
-  uc = curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0);
+  CURLUcode uc = curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0);
+#ifdef CURL_DISABLE_VERBOSE_STRINGS
+  (void)data;
+#endif
 
   if(!uc && zoneid) {
     char *endp;
@@ -1835,7 +1893,7 @@
       scopeidx = if_nametoindex(zoneid);
 #endif
       if(!scopeidx)
-        infof(conn->data, "Invalid zoneid: %s; %s\n", zoneid,
+        infof(data, "Invalid zoneid: %s; %s", zoneid,
               strerror(errno));
       else
         conn->scope_id = scopeidx;
@@ -1872,28 +1930,27 @@
     return CURLE_OUT_OF_MEMORY;
 
   if(data->set.str[STRING_DEFAULT_PROTOCOL] &&
-     !Curl_is_absolute_url(data->change.url, NULL, MAX_SCHEME_LEN)) {
-    char *url;
-    if(data->change.url_alloc)
-      free(data->change.url);
-    url = aprintf("%s://%s", data->set.str[STRING_DEFAULT_PROTOCOL],
-                  data->change.url);
+     !Curl_is_absolute_url(data->state.url, NULL, MAX_SCHEME_LEN)) {
+    char *url = aprintf("%s://%s", data->set.str[STRING_DEFAULT_PROTOCOL],
+                        data->state.url);
     if(!url)
       return CURLE_OUT_OF_MEMORY;
-    data->change.url = url;
-    data->change.url_alloc = TRUE;
+    if(data->state.url_alloc)
+      free(data->state.url);
+    data->state.url = url;
+    data->state.url_alloc = TRUE;
   }
 
   if(!use_set_uh) {
     char *newurl;
-    uc = curl_url_set(uh, CURLUPART_URL, data->change.url,
+    uc = curl_url_set(uh, CURLUPART_URL, data->state.url,
                     CURLU_GUESS_SCHEME |
                     CURLU_NON_SUPPORT_SCHEME |
                     (data->set.disallow_username_in_url ?
                      CURLU_DISALLOW_USER : 0) |
                     (data->set.path_as_is ? CURLU_PATH_AS_IS : 0));
     if(uc) {
-      DEBUGF(infof(data, "curl_url_set rejected %s\n", data->change.url));
+      DEBUGF(infof(data, "curl_url_set rejected %s", data->state.url));
       return Curl_uc_to_curlcode(uc);
     }
 
@@ -1901,50 +1958,97 @@
     uc = curl_url_get(uh, CURLUPART_URL, &newurl, 0);
     if(uc)
       return Curl_uc_to_curlcode(uc);
-    if(data->change.url_alloc)
-      free(data->change.url);
-    data->change.url = newurl;
-    data->change.url_alloc = TRUE;
+    if(data->state.url_alloc)
+      free(data->state.url);
+    data->state.url = newurl;
+    data->state.url_alloc = TRUE;
   }
 
   uc = curl_url_get(uh, CURLUPART_SCHEME, &data->state.up.scheme, 0);
   if(uc)
     return Curl_uc_to_curlcode(uc);
 
+  uc = curl_url_get(uh, CURLUPART_HOST, &data->state.up.hostname, 0);
+  if(uc) {
+    if(!strcasecompare("file", data->state.up.scheme))
+      return CURLE_OUT_OF_MEMORY;
+  }
+
+#ifndef CURL_DISABLE_HSTS
+  if(data->hsts && strcasecompare("http", data->state.up.scheme)) {
+    if(Curl_hsts(data->hsts, data->state.up.hostname, TRUE)) {
+      char *url;
+      Curl_safefree(data->state.up.scheme);
+      uc = curl_url_set(uh, CURLUPART_SCHEME, "https", 0);
+      if(uc)
+        return Curl_uc_to_curlcode(uc);
+      if(data->state.url_alloc)
+        Curl_safefree(data->state.url);
+      /* after update, get the updated version */
+      uc = curl_url_get(uh, CURLUPART_URL, &url, 0);
+      if(uc)
+        return Curl_uc_to_curlcode(uc);
+      uc = curl_url_get(uh, CURLUPART_SCHEME, &data->state.up.scheme, 0);
+      if(uc) {
+        free(url);
+        return Curl_uc_to_curlcode(uc);
+      }
+      data->state.url = url;
+      data->state.url_alloc = TRUE;
+      infof(data, "Switched from HTTP to HTTPS due to HSTS => %s",
+            data->state.url);
+    }
+  }
+#endif
+
   result = findprotocol(data, conn, data->state.up.scheme);
   if(result)
     return result;
 
-  /* we don't use the URL API's URL decoder option here since it rejects
-     control codes and we want to allow them for some schemes in the user and
-     password fields */
-  uc = curl_url_get(uh, CURLUPART_USER, &data->state.up.user, 0);
-  if(!uc) {
-    char *decoded;
-    result = Curl_urldecode(NULL, data->state.up.user, 0, &decoded, NULL,
-                            conn->handler->flags&PROTOPT_USERPWDCTRL ?
-                            REJECT_ZERO : REJECT_CTRL);
-    if(result)
-      return result;
-    conn->user = decoded;
-    conn->bits.user_passwd = TRUE;
+  /*
+   * User name and password set with their own options override the
+   * credentials possibly set in the URL.
+   */
+  if(!data->state.aptr.user) {
+    /* we don't use the URL API's URL decoder option here since it rejects
+       control codes and we want to allow them for some schemes in the user
+       and password fields */
+    uc = curl_url_get(uh, CURLUPART_USER, &data->state.up.user, 0);
+    if(!uc) {
+      char *decoded;
+      result = Curl_urldecode(NULL, data->state.up.user, 0, &decoded, NULL,
+                              conn->handler->flags&PROTOPT_USERPWDCTRL ?
+                              REJECT_ZERO : REJECT_CTRL);
+      if(result)
+        return result;
+      conn->user = decoded;
+      conn->bits.user_passwd = TRUE;
+      result = Curl_setstropt(&data->state.aptr.user, decoded);
+      if(result)
+        return result;
+    }
+    else if(uc != CURLUE_NO_USER)
+      return Curl_uc_to_curlcode(uc);
   }
-  else if(uc != CURLUE_NO_USER)
-    return Curl_uc_to_curlcode(uc);
 
-  uc = curl_url_get(uh, CURLUPART_PASSWORD, &data->state.up.password, 0);
-  if(!uc) {
-    char *decoded;
-    result = Curl_urldecode(NULL, data->state.up.password, 0, &decoded, NULL,
-                            conn->handler->flags&PROTOPT_USERPWDCTRL ?
-                            REJECT_ZERO : REJECT_CTRL);
-    if(result)
-      return result;
-    conn->passwd = decoded;
-    conn->bits.user_passwd = TRUE;
+  if(!data->state.aptr.passwd) {
+    uc = curl_url_get(uh, CURLUPART_PASSWORD, &data->state.up.password, 0);
+    if(!uc) {
+      char *decoded;
+      result = Curl_urldecode(NULL, data->state.up.password, 0, &decoded, NULL,
+                              conn->handler->flags&PROTOPT_USERPWDCTRL ?
+                              REJECT_ZERO : REJECT_CTRL);
+      if(result)
+        return result;
+      conn->passwd = decoded;
+      conn->bits.user_passwd = TRUE;
+      result = Curl_setstropt(&data->state.aptr.passwd, decoded);
+      if(result)
+        return result;
+    }
+    else if(uc != CURLUE_NO_PASSWORD)
+      return Curl_uc_to_curlcode(uc);
   }
-  else if(uc != CURLUE_NO_PASSWORD)
-    return Curl_uc_to_curlcode(uc);
 
   uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
                     CURLU_URLDECODE);
@@ -1956,12 +2060,6 @@
   else if(uc != CURLUE_NO_OPTIONS)
     return Curl_uc_to_curlcode(uc);
 
-  uc = curl_url_get(uh, CURLUPART_HOST, &data->state.up.hostname, 0);
-  if(uc) {
-    if(!strcasecompare("file", data->state.up.scheme))
-      return CURLE_OUT_OF_MEMORY;
-  }
-
   uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, 0);
   if(uc)
     return Curl_uc_to_curlcode(uc);
@@ -1974,7 +2072,9 @@
   }
   else {
     unsigned long port = strtoul(data->state.up.port, NULL, 10);
-    conn->port = conn->remote_port = curlx_ultous(port);
+    conn->port = conn->remote_port =
+      (data->set.use_port && data->state.allow_port) ?
+      (int)data->set.use_port : curlx_ultous(port);
   }
 
   (void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
@@ -1990,7 +2090,7 @@
     hlen = strlen(hostname);
     hostname[hlen - 1] = 0;
 
-    zonefrom_url(uh, conn);
+    zonefrom_url(uh, data, conn);
   }
 
   /* make sure the connect struct gets its own copy of the host name */
@@ -2048,7 +2148,8 @@
  *
  * This MUST get called after proxy magic has been figured out.
  */
-static CURLcode setup_connection_internals(struct connectdata *conn)
+static CURLcode setup_connection_internals(struct Curl_easy *data,
+                                           struct connectdata *conn)
 {
   const struct Curl_handler *p;
   CURLcode result;
@@ -2057,7 +2158,7 @@
   p = conn->handler;
 
   if(p->setup_connection) {
-    result = (*p->setup_connection)(conn);
+    result = (*p->setup_connection)(data, conn);
 
     if(result)
       return result;
@@ -2080,12 +2181,14 @@
 
 void Curl_free_request_state(struct Curl_easy *data)
 {
-  Curl_safefree(data->req.protop);
+  Curl_safefree(data->req.p.http);
   Curl_safefree(data->req.newurl);
 
 #ifndef CURL_DISABLE_DOH
-  Curl_close(&data->req.doh.probe[0].easy);
-  Curl_close(&data->req.doh.probe[1].easy);
+  if(data->req.doh) {
+    Curl_close(&data->req.doh->probe[0].easy);
+    Curl_close(&data->req.doh->probe[1].easy);
+  }
 #endif
 }
 
@@ -2142,7 +2245,7 @@
         /* Look for the end of the token. */
         ;
 
-      /* To match previous behaviour, where it was necessary to specify
+      /* To match previous behavior, where it was necessary to specify
        * ".local.com" to prevent matching "notlocal.com", we will leave
        * the '.' off.
        */
@@ -2175,7 +2278,8 @@
 * name and is not limited to HTTP proxies only.
 * The returned pointer must be freed by the caller (unless NULL)
 ****************************************************************/
-static char *detect_proxy(struct connectdata *conn)
+static char *detect_proxy(struct Curl_easy *data,
+                          struct connectdata *conn)
 {
   char *proxy = NULL;
 
@@ -2200,6 +2304,9 @@
   const char *protop = conn->handler->scheme;
   char *envp = proxy_env;
   char *prox;
+#ifdef CURL_DISABLE_VERBOSE_STRINGS
+  (void)data;
+#endif
 
   /* Now, build <protocol>_proxy and check for such a one to use */
   while(*protop)
@@ -2242,7 +2349,7 @@
     }
   }
   if(proxy)
-    infof(conn->data, "Uses proxy env variable %s == '%s'\n", envp, proxy);
+    infof(data, "Uses proxy env variable %s == '%s'", envp, proxy);
 
   return proxy;
 }
@@ -2258,7 +2365,7 @@
                             curl_proxytype proxytype)
 {
   char *portptr = NULL;
-  long port = -1;
+  int port = -1;
   char *proxyuser = NULL;
   char *proxypasswd = NULL;
   char *host;
@@ -2327,11 +2434,20 @@
   proxyinfo->proxytype = proxytype;
 
   /* Is there a username and password given in this proxy url? */
-  curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE);
-  curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE);
+  uc = curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE);
+  if(uc && (uc != CURLUE_NO_USER))
+    goto error;
+  uc = curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE);
+  if(uc && (uc != CURLUE_NO_PASSWORD))
+    goto error;
+
   if(proxyuser || proxypasswd) {
     Curl_safefree(proxyinfo->user);
     proxyinfo->user = proxyuser;
+    result = Curl_setstropt(&data->state.aptr.proxyuser, proxyuser);
+    proxyuser = NULL;
+    if(result)
+      goto error;
     Curl_safefree(proxyinfo->passwd);
     if(!proxypasswd) {
       proxypasswd = strdup("");
@@ -2341,20 +2457,24 @@
       }
     }
     proxyinfo->passwd = proxypasswd;
+    result = Curl_setstropt(&data->state.aptr.proxypasswd, proxypasswd);
+    proxypasswd = NULL;
+    if(result)
+      goto error;
     conn->bits.proxy_user_passwd = TRUE; /* enable it */
   }
 
-  curl_url_get(uhp, CURLUPART_PORT, &portptr, 0);
+  (void)curl_url_get(uhp, CURLUPART_PORT, &portptr, 0);
 
   if(portptr) {
-    port = strtol(portptr, NULL, 10);
+    port = (int)strtol(portptr, NULL, 10);
     free(portptr);
   }
   else {
     if(data->set.proxyport)
       /* None given in the proxy string, then get the default one if it is
          given */
-      port = data->set.proxyport;
+      port = (int)data->set.proxyport;
     else {
       if(proxytype == CURLPROXY_HTTPS)
         port = CURL_DEFAULT_HTTPS_PROXY_PORT;
@@ -2381,11 +2501,13 @@
     size_t len = strlen(host);
     host[len-1] = 0; /* clear the trailing bracket */
     host++;
-    zonefrom_url(uhp, conn);
+    zonefrom_url(uhp, data, conn);
   }
   proxyinfo->host.name = host;
 
   error:
+  free(proxyuser);
+  free(proxypasswd);
   free(scheme);
   curl_url_cleanup(uhp);
   return result;
@@ -2397,30 +2519,38 @@
 static CURLcode parse_proxy_auth(struct Curl_easy *data,
                                  struct connectdata *conn)
 {
-  const char *proxyuser = data->set.str[STRING_PROXYUSERNAME] ?
-    data->set.str[STRING_PROXYUSERNAME] : "";
-  const char *proxypasswd = data->set.str[STRING_PROXYPASSWORD] ?
-    data->set.str[STRING_PROXYPASSWORD] : "";
+  const char *proxyuser = data->state.aptr.proxyuser ?
+    data->state.aptr.proxyuser : "";
+  const char *proxypasswd = data->state.aptr.proxypasswd ?
+    data->state.aptr.proxypasswd : "";
   CURLcode result = CURLE_OK;
 
-  if(proxyuser)
+  if(proxyuser) {
     result = Curl_urldecode(data, proxyuser, 0, &conn->http_proxy.user, NULL,
                             REJECT_ZERO);
-  if(!result && proxypasswd)
+    if(!result)
+      result = Curl_setstropt(&data->state.aptr.proxyuser,
+                              conn->http_proxy.user);
+  }
+  if(!result && proxypasswd) {
     result = Curl_urldecode(data, proxypasswd, 0, &conn->http_proxy.passwd,
                             NULL, REJECT_ZERO);
+    if(!result)
+      result = Curl_setstropt(&data->state.aptr.proxypasswd,
+                              conn->http_proxy.passwd);
+  }
   return result;
 }
 
 /* create_conn helper to parse and init proxy values. to be called after unix
    socket init but before any proxy vars are evaluated. */
-static CURLcode create_conn_helper_init_proxy(struct connectdata *conn)
+static CURLcode create_conn_helper_init_proxy(struct Curl_easy *data,
+                                              struct connectdata *conn)
 {
   char *proxy = NULL;
   char *socksproxy = NULL;
   char *no_proxy = NULL;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
 
   /*************************************************************
    * Extract the user and password from the authentication string
@@ -2462,7 +2592,7 @@
       no_proxy = curl_getenv(p);
     }
     if(no_proxy) {
-      infof(conn->data, "Uses proxy env variable %s == '%s'\n", p, no_proxy);
+      infof(data, "Uses proxy env variable %s == '%s'", p, no_proxy);
     }
   }
 
@@ -2474,7 +2604,7 @@
 #ifndef CURL_DISABLE_HTTP
   else if(!proxy && !socksproxy)
     /* if the host is not in the noproxy list, detect proxy. */
-    proxy = detect_proxy(conn);
+    proxy = detect_proxy(data, conn);
 #endif /* CURL_DISABLE_HTTP */
 
   Curl_safefree(no_proxy);
@@ -2750,43 +2880,20 @@
  * option or a .netrc file, if applicable.
  */
 static CURLcode override_login(struct Curl_easy *data,
-                               struct connectdata *conn,
-                               char **userp, char **passwdp, char **optionsp)
+                               struct connectdata *conn)
 {
-  bool user_changed = FALSE;
-  bool passwd_changed = FALSE;
   CURLUcode uc;
+  char **userp = &conn->user;
+  char **passwdp = &conn->passwd;
+  char **optionsp = &conn->options;
 
+#ifndef CURL_DISABLE_NETRC
   if(data->set.use_netrc == CURL_NETRC_REQUIRED && conn->bits.user_passwd) {
-    /* ignore user+password in the URL */
-    if(*userp) {
-      Curl_safefree(*userp);
-      user_changed = TRUE;
-    }
-    if(*passwdp) {
-      Curl_safefree(*passwdp);
-      passwd_changed = TRUE;
-    }
+    Curl_safefree(*userp);
+    Curl_safefree(*passwdp);
     conn->bits.user_passwd = FALSE; /* disable user+password */
   }
-
-  if(data->set.str[STRING_USERNAME]) {
-    free(*userp);
-    *userp = strdup(data->set.str[STRING_USERNAME]);
-    if(!*userp)
-      return CURLE_OUT_OF_MEMORY;
-    conn->bits.user_passwd = TRUE; /* enable user+password */
-    user_changed = TRUE;
-  }
-
-  if(data->set.str[STRING_PASSWORD]) {
-    free(*passwdp);
-    *passwdp = strdup(data->set.str[STRING_PASSWORD]);
-    if(!*passwdp)
-      return CURLE_OUT_OF_MEMORY;
-    conn->bits.user_passwd = TRUE; /* enable user+password */
-    passwd_changed = TRUE;
-  }
+#endif
 
   if(data->set.str[STRING_OPTIONS]) {
     free(*optionsp);
@@ -2795,9 +2902,9 @@
       return CURLE_OUT_OF_MEMORY;
   }
 
+#ifndef CURL_DISABLE_NETRC
   conn->bits.netrc = FALSE;
-  if(data->set.use_netrc != CURL_NETRC_IGNORED &&
-      (!*userp || !**userp || !*passwdp || !**passwdp)) {
+  if(data->set.use_netrc && !data->set.str[STRING_USERNAME]) {
     bool netrc_user_changed = FALSE;
     bool netrc_passwd_changed = FALSE;
     int ret;
@@ -2807,8 +2914,8 @@
                           &netrc_user_changed, &netrc_passwd_changed,
                           data->set.str[STRING_NETRC_FILE]);
     if(ret > 0) {
-      infof(data, "Couldn't find host %s in the .netrc file; using defaults\n",
-            conn->host.name);
+      infof(data, "Couldn't find host %s in the %s file; using defaults",
+            conn->host.name, data->set.str[STRING_NETRC_FILE]);
     }
     else if(ret < 0) {
       return CURLE_OUT_OF_MEMORY;
@@ -2819,29 +2926,45 @@
          different host or similar. */
       conn->bits.netrc = TRUE;
       conn->bits.user_passwd = TRUE; /* enable user+password */
+    }
+  }
+#endif
 
-      if(netrc_user_changed) {
-        user_changed = TRUE;
-      }
-      if(netrc_passwd_changed) {
-        passwd_changed = TRUE;
-      }
+  /* for updated strings, we update them in the URL */
+  if(*userp) {
+    CURLcode result = Curl_setstropt(&data->state.aptr.user, *userp);
+    if(result)
+      return result;
+  }
+  if(data->state.aptr.user) {
+    uc = curl_url_set(data->state.uh, CURLUPART_USER, data->state.aptr.user,
+                      CURLU_URLENCODE);
+    if(uc)
+      return Curl_uc_to_curlcode(uc);
+    if(!*userp) {
+      *userp = strdup(data->state.aptr.user);
+      if(!*userp)
+        return CURLE_OUT_OF_MEMORY;
     }
   }
 
-  /* for updated strings, we update them in the URL */
-  if(user_changed) {
-    uc = curl_url_set(data->state.uh, CURLUPART_USER, *userp,
-                      CURLU_URLENCODE);
+  if(*passwdp) {
+    CURLcode result = Curl_setstropt(&data->state.aptr.passwd, *passwdp);
+    if(result)
+      return result;
+  }
+  if(data->state.aptr.passwd) {
+    uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
+                      data->state.aptr.passwd, CURLU_URLENCODE);
     if(uc)
       return Curl_uc_to_curlcode(uc);
+    if(!*passwdp) {
+      *passwdp = strdup(data->state.aptr.passwd);
+      if(!*passwdp)
+        return CURLE_OUT_OF_MEMORY;
+    }
   }
-  if(passwd_changed) {
-    uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD, *passwdp,
-                      CURLU_URLENCODE);
-    if(uc)
-      return Curl_uc_to_curlcode(uc);
-  }
+
   return CURLE_OK;
 }
 
@@ -2893,6 +3016,7 @@
   char *host_portno;
   char *portptr;
   int port = -1;
+  CURLcode result = CURLE_OK;
 
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
   (void) data;
@@ -2922,7 +3046,7 @@
     if(*ptr == '%') {
       /* There might be a zone identifier */
       if(strncmp("%25", ptr, 3))
-        infof(data, "Please URL encode %% as %%25, see RFC 6874.\n");
+        infof(data, "Please URL encode %% as %%25, see RFC 6874.");
       ptr++;
       /* Allow unreserved characters as defined in RFC 3986 */
       while(*ptr && (ISALPHA(*ptr) || ISXDIGIT(*ptr) || (*ptr == '-') ||
@@ -2933,7 +3057,7 @@
       /* yeps, it ended nicely with a bracket as well */
       *ptr++ = '\0';
     else
-      infof(data, "Invalid IPv6 address format\n");
+      infof(data, "Invalid IPv6 address format");
     portptr = ptr;
     /* Note that if this didn't end with a bracket, we still advanced the
      * hostptr first, but I can't see anything wrong with that as no host
@@ -2941,8 +3065,8 @@
      */
 #else
     failf(data, "Use of IPv6 in *_CONNECT_TO without IPv6 support built-in!");
-    free(host_dup);
-    return CURLE_NOT_BUILT_IN;
+    result = CURLE_NOT_BUILT_IN;
+    goto error;
 #endif
   }
 
@@ -2955,10 +3079,10 @@
     if(*host_portno) {
       long portparse = strtol(host_portno, &endp, 10);
       if((endp && *endp) || (portparse < 0) || (portparse > 65535)) {
-        infof(data, "No valid port number in connect to host string (%s)\n",
+        failf(data, "No valid port number in connect to host string (%s)",
               host_portno);
-        hostptr = NULL;
-        port = -1;
+        result = CURLE_SETOPT_OPTION_SYNTAX;
+        goto error;
       }
       else
         port = (int)portparse; /* we know it will fit */
@@ -2969,15 +3093,16 @@
   if(hostptr) {
     *hostname_result = strdup(hostptr);
     if(!*hostname_result) {
-      free(host_dup);
-      return CURLE_OUT_OF_MEMORY;
+      result = CURLE_OUT_OF_MEMORY;
+      goto error;
     }
   }
 
   *port_result = port;
 
+  error:
   free(host_dup);
-  return CURLE_OK;
+  return result;
 }
 
 /*
@@ -3073,7 +3198,7 @@
       conn->conn_to_host.name = host;
       conn->bits.conn_to_host = TRUE;
 
-      infof(data, "Connecting to hostname: %s\n", host);
+      infof(data, "Connecting to hostname: %s", host);
     }
     else {
       /* no "connect to host" */
@@ -3084,7 +3209,7 @@
     if(port >= 0) {
       conn->conn_to_port = port;
       conn->bits.conn_to_port = TRUE;
-      infof(data, "Connecting to port: %d\n", port);
+      infof(data, "Connecting to port: %d", port);
     }
     else {
       /* no "connect to port" */
@@ -3095,7 +3220,7 @@
     conn_to_host = conn_to_host->next;
   }
 
-#ifdef USE_ALTSVC
+#ifndef CURL_DISABLE_ALTSVC
   if(data->asi && !host && (port == -1) &&
      ((conn->handler->protocol == CURLPROTO_HTTPS) ||
 #ifdef CURLDEBUG
@@ -3145,7 +3270,7 @@
       conn->conn_to_port = as->dst.port;
       conn->bits.conn_to_port = TRUE;
       conn->bits.altused = TRUE;
-      infof(data, "Alt-svc connecting from [%s]%s:%d to [%s]%s:%d\n",
+      infof(data, "Alt-svc connecting from [%s]%s:%d to [%s]%s:%d",
             Curl_alpnid2str(srcalpnid), host, conn->remote_port,
             Curl_alpnid2str(as->dst.alpnid), hostd, as->dst.port);
       if(srcalpnid != as->dst.alpnid) {
@@ -3248,16 +3373,19 @@
       conn->hostname_resolve = strdup(connhost->name);
       if(!conn->hostname_resolve)
         return CURLE_OUT_OF_MEMORY;
-      rc = Curl_resolv_timeout(conn, conn->hostname_resolve, (int)conn->port,
+      rc = Curl_resolv_timeout(data, conn->hostname_resolve, (int)conn->port,
                                &hostaddr, timeout_ms);
       if(rc == CURLRESOLV_PENDING)
         *async = TRUE;
 
-      else if(rc == CURLRESOLV_TIMEDOUT)
+      else if(rc == CURLRESOLV_TIMEDOUT) {
+        failf(data, "Failed to resolve host '%s' with timeout after %ld ms",
+              connhost->dispname,
+              Curl_timediff(Curl_now(), data->progress.t_startsingle));
         result = CURLE_OPERATION_TIMEDOUT;
-
+      }
       else if(!hostaddr) {
-        failf(data, "Couldn't resolve host '%s'", connhost->dispname);
+        failf(data, "Could not resolve host: %s", connhost->dispname);
         result = CURLE_COULDNT_RESOLVE_HOST;
         /* don't return yet, we need to clean up the timeout first */
       }
@@ -3273,7 +3401,7 @@
       conn->hostname_resolve = strdup(host->name);
       if(!conn->hostname_resolve)
         return CURLE_OUT_OF_MEMORY;
-      rc = Curl_resolv_timeout(conn, conn->hostname_resolve, (int)conn->port,
+      rc = Curl_resolv_timeout(data, conn->hostname_resolve, (int)conn->port,
                                &hostaddr, timeout_ms);
 
       if(rc == CURLRESOLV_PENDING)
@@ -3301,9 +3429,15 @@
  * previously existing one.  All relevant data is copied over and old_conn is
  * ready for freeing once this function returns.
  */
-static void reuse_conn(struct connectdata *old_conn,
+static void reuse_conn(struct Curl_easy *data,
+                       struct connectdata *old_conn,
                        struct connectdata *conn)
 {
+  /* 'local_ip' and 'local_port' get filled with local's numerical
+     ip address and port number whenever an outgoing connection is
+     **established** from the primary socket to a remote address. */
+  char local_ip[MAX_IPADR_LEN] = "";
+  int local_port = -1;
 #ifndef CURL_DISABLE_PROXY
   Curl_free_idnconverted_hostname(&old_conn->http_proxy.host);
   Curl_free_idnconverted_hostname(&old_conn->socks_proxy.host);
@@ -3316,8 +3450,6 @@
      allocated in vain and is targeted for destruction */
   Curl_free_primary_ssl_config(&old_conn->ssl_config);
 
-  conn->data = old_conn->data;
-
   /* get the user+password information from the old_conn struct since it may
    * be new for this request even when we re-use an existing connection */
   conn->bits.user_passwd = old_conn->bits.user_passwd;
@@ -3370,7 +3502,11 @@
   old_conn->hostname_resolve = NULL;
 
   /* persist connection info in session handle */
-  Curl_persistconninfo(conn);
+  if(conn->transport == TRNSPRT_TCP) {
+    Curl_conninfo_local(data, conn->sock[FIRSTSOCKET],
+                        local_ip, &local_port);
+  }
+  Curl_persistconninfo(data, conn, local_ip, local_port);
 
   conn_reset_all_postponed_data(old_conn); /* free buffers */
 
@@ -3401,7 +3537,6 @@
  * @param async is set TRUE when an async DNS resolution is pending
  * @see Curl_setup_conn()
  *
- * *NOTE* this function assigns the conn->data pointer!
  */
 
 static CURLcode create_conn(struct Curl_easy *data,
@@ -3424,7 +3559,7 @@
   /*************************************************************
    * Check input data
    *************************************************************/
-  if(!data->change.url) {
+  if(!data->state.url) {
     result = CURLE_URL_MALFORMAT;
     goto out;
   }
@@ -3460,7 +3595,7 @@
 #ifdef USE_UNIX_SOCKETS
   if(data->set.str[STRING_UNIX_SOCKET_PATH]) {
     conn->unix_domain_socket = strdup(data->set.str[STRING_UNIX_SOCKET_PATH]);
-    if(conn->unix_domain_socket == NULL) {
+    if(!conn->unix_domain_socket) {
       result = CURLE_OUT_OF_MEMORY;
       goto out;
     }
@@ -3471,7 +3606,7 @@
   /* After the unix socket init but before the proxy vars are used, parse and
      initialize the proxy vars */
 #ifndef CURL_DISABLE_PROXY
-  result = create_conn_helper_init_proxy(conn);
+  result = create_conn_helper_init_proxy(data, conn);
   if(result)
     goto out;
 
@@ -3490,10 +3625,9 @@
   if(result)
     goto out;
 
-  /* Check for overridden login details and set them accordingly so they
+  /* Check for overridden login details and set them accordingly so that
      they are known when protocol->setup_connection is called! */
-  result = override_login(data, conn, &conn->user, &conn->passwd,
-                          &conn->options);
+  result = override_login(data, conn);
   if(result)
     goto out;
 
@@ -3512,22 +3646,22 @@
   /*************************************************************
    * IDN-convert the hostnames
    *************************************************************/
-  result = Curl_idnconvert_hostname(conn, &conn->host);
+  result = Curl_idnconvert_hostname(data, &conn->host);
   if(result)
     goto out;
   if(conn->bits.conn_to_host) {
-    result = Curl_idnconvert_hostname(conn, &conn->conn_to_host);
+    result = Curl_idnconvert_hostname(data, &conn->conn_to_host);
     if(result)
       goto out;
   }
 #ifndef CURL_DISABLE_PROXY
   if(conn->bits.httpproxy) {
-    result = Curl_idnconvert_hostname(conn, &conn->http_proxy.host);
+    result = Curl_idnconvert_hostname(data, &conn->http_proxy.host);
     if(result)
       goto out;
   }
   if(conn->bits.socksproxy) {
-    result = Curl_idnconvert_hostname(conn, &conn->socks_proxy.host);
+    result = Curl_idnconvert_hostname(data, &conn->socks_proxy.host);
     if(result)
       goto out;
   }
@@ -3564,7 +3698,7 @@
    * Setup internals depending on protocol. Needs to be done after
    * we figured out what/if proxy to use.
    *************************************************************/
-  result = setup_connection_internals(conn);
+  result = setup_connection_internals(data, conn);
   if(result)
     goto out;
 
@@ -3584,15 +3718,15 @@
     /* this is supposed to be the connect function so we better at least check
        that the file is present here! */
     DEBUGASSERT(conn->handler->connect_it);
-    Curl_persistconninfo(conn);
-    result = conn->handler->connect_it(conn, &done);
+    Curl_persistconninfo(data, conn, NULL, -1);
+    result = conn->handler->connect_it(data, &done);
 
     /* Setup a "faked" transfer that'll do nothing */
     if(!result) {
       conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */
 
       Curl_attach_connnection(data, conn);
-      result = Curl_conncache_add_conn(data->state.conn_cache, conn);
+      result = Curl_conncache_add_conn(data);
       if(result)
         goto out;
 
@@ -3603,7 +3737,7 @@
       if(result) {
         DEBUGASSERT(conn->handler->done);
         /* we ignore the return code for the protocol-specific DONE */
-        (void)conn->handler->done(conn, result, FALSE);
+        (void)conn->handler->done(data, result, FALSE);
         goto out;
       }
       Curl_setup_transfer(data, -1, -1, FALSE, -1);
@@ -3625,17 +3759,20 @@
      that will be freed as part of the Curl_easy struct, but all cloned
      copies will be separately allocated.
   */
-  data->set.ssl.primary.CApath = data->set.str[STRING_SSL_CAPATH_ORIG];
-  data->set.ssl.primary.CAfile = data->set.str[STRING_SSL_CAFILE_ORIG];
+  data->set.ssl.primary.CApath = data->set.str[STRING_SSL_CAPATH];
+  data->set.ssl.primary.CAfile = data->set.str[STRING_SSL_CAFILE];
+  data->set.ssl.primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT];
+  data->set.ssl.primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
   data->set.ssl.primary.random_file = data->set.str[STRING_SSL_RANDOM_FILE];
   data->set.ssl.primary.egdsocket = data->set.str[STRING_SSL_EGDSOCKET];
   data->set.ssl.primary.cipher_list =
-    data->set.str[STRING_SSL_CIPHER_LIST_ORIG];
+    data->set.str[STRING_SSL_CIPHER_LIST];
   data->set.ssl.primary.cipher_list13 =
-    data->set.str[STRING_SSL_CIPHER13_LIST_ORIG];
+    data->set.str[STRING_SSL_CIPHER13_LIST];
   data->set.ssl.primary.pinned_key =
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
-  data->set.ssl.primary.cert_blob = data->set.blobs[BLOB_CERT_ORIG];
+    data->set.str[STRING_SSL_PINNEDPUBLICKEY];
+  data->set.ssl.primary.cert_blob = data->set.blobs[BLOB_CERT];
+  data->set.ssl.primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
   data->set.ssl.primary.curves = data->set.str[STRING_SSL_EC_CURVES];
 
 #ifndef CURL_DISABLE_PROXY
@@ -3651,8 +3788,13 @@
   data->set.proxy_ssl.primary.pinned_key =
     data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
   data->set.proxy_ssl.primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
+  data->set.proxy_ssl.primary.ca_info_blob =
+    data->set.blobs[BLOB_CAINFO_PROXY];
+  data->set.proxy_ssl.primary.issuercert =
+    data->set.str[STRING_SSL_ISSUERCERT_PROXY];
+  data->set.proxy_ssl.primary.issuercert_blob =
+    data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
   data->set.proxy_ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
-  data->set.proxy_ssl.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
   data->set.proxy_ssl.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];
   data->set.proxy_ssl.key = data->set.str[STRING_KEY_PROXY];
   data->set.proxy_ssl.key_type = data->set.str[STRING_KEY_TYPE_PROXY];
@@ -3660,24 +3802,21 @@
   data->set.proxy_ssl.primary.clientcert = data->set.str[STRING_CERT_PROXY];
   data->set.proxy_ssl.key_blob = data->set.blobs[BLOB_KEY_PROXY];
 #endif
-  data->set.ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_ORIG];
-  data->set.ssl.issuercert = data->set.str[STRING_SSL_ISSUERCERT_ORIG];
-  data->set.ssl.cert_type = data->set.str[STRING_CERT_TYPE_ORIG];
-  data->set.ssl.key = data->set.str[STRING_KEY_ORIG];
-  data->set.ssl.key_type = data->set.str[STRING_KEY_TYPE_ORIG];
-  data->set.ssl.key_passwd = data->set.str[STRING_KEY_PASSWD_ORIG];
-  data->set.ssl.primary.clientcert = data->set.str[STRING_CERT_ORIG];
+  data->set.ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE];
+  data->set.ssl.cert_type = data->set.str[STRING_CERT_TYPE];
+  data->set.ssl.key = data->set.str[STRING_KEY];
+  data->set.ssl.key_type = data->set.str[STRING_KEY_TYPE];
+  data->set.ssl.key_passwd = data->set.str[STRING_KEY_PASSWD];
+  data->set.ssl.primary.clientcert = data->set.str[STRING_CERT];
 #ifdef USE_TLS_SRP
-  data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME_ORIG];
-  data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD_ORIG];
+  data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME];
+  data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD];
 #ifndef CURL_DISABLE_PROXY
   data->set.proxy_ssl.username = data->set.str[STRING_TLSAUTH_USERNAME_PROXY];
   data->set.proxy_ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD_PROXY];
 #endif
 #endif
-
-  data->set.ssl.key_blob = data->set.blobs[BLOB_KEY_ORIG];
-  data->set.ssl.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_ORIG];
+  data->set.ssl.key_blob = data->set.blobs[BLOB_KEY];
 
   if(!Curl_clone_primary_ssl_config(&data->set.ssl.primary,
                                     &conn->ssl_config)) {
@@ -3716,12 +3855,11 @@
 
   if(reuse) {
     /*
-     * We already have a connection for this, we got the former connection
-     * in the conn_temp variable and thus we need to cleanup the one we
-     * just allocated before we can move along and use the previously
-     * existing one.
+     * We already have a connection for this, we got the former connection in
+     * the conn_temp variable and thus we need to cleanup the one we just
+     * allocated before we can move along and use the previously existing one.
      */
-    reuse_conn(conn, conn_temp);
+    reuse_conn(data, conn, conn_temp);
 #ifdef USE_SSL
     free(conn->ssl_extra);
 #endif
@@ -3730,14 +3868,14 @@
     *in_connect = conn;
 
 #ifndef CURL_DISABLE_PROXY
-    infof(data, "Re-using existing connection! (#%ld) with %s %s\n",
+    infof(data, "Re-using existing connection! (#%ld) with %s %s",
           conn->connection_id,
           conn->bits.proxy?"proxy":"host",
           conn->socks_proxy.host.name ? conn->socks_proxy.host.dispname :
           conn->http_proxy.host.name ? conn->http_proxy.host.dispname :
           conn->host.dispname);
 #else
-    infof(data, "Re-using existing connection! (#%ld) with host %s\n",
+    infof(data, "Re-using existing connection! (#%ld) with host %s",
           conn->connection_id, conn->host.dispname);
 #endif
   }
@@ -3763,7 +3901,8 @@
       /* this gets a lock on the conncache */
       const char *bundlehost;
       struct connectbundle *bundle =
-        Curl_conncache_find_bundle(conn, data->state.conn_cache, &bundlehost);
+        Curl_conncache_find_bundle(data, conn, data->state.conn_cache,
+                                   &bundlehost);
 
       if(max_host_connections > 0 && bundle &&
          (bundle->num_connections >= max_host_connections)) {
@@ -3776,7 +3915,7 @@
         if(conn_candidate)
           (void)Curl_disconnect(data, conn_candidate, FALSE);
         else {
-          infof(data, "No more connections allowed to host %s: %zu\n",
+          infof(data, "No more connections allowed to host %s: %zu",
                 bundlehost, max_host_connections);
           connections_available = FALSE;
         }
@@ -3796,13 +3935,13 @@
       if(conn_candidate)
         (void)Curl_disconnect(data, conn_candidate, FALSE);
       else {
-        infof(data, "No connections available in cache\n");
+        infof(data, "No connections available in cache");
         connections_available = FALSE;
       }
     }
 
     if(!connections_available) {
-      infof(data, "No connections available.\n");
+      infof(data, "No connections available.");
 
       conn_free(conn);
       *in_connect = NULL;
@@ -3816,8 +3955,7 @@
        * cache of ours!
        */
       Curl_attach_connnection(data, conn);
-
-      result = Curl_conncache_add_conn(data->state.conn_cache, conn);
+      result = Curl_conncache_add_conn(data);
       if(result)
         goto out;
     }
@@ -3828,14 +3966,14 @@
        connection based. */
     if((data->state.authhost.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
        data->state.authhost.done) {
-      infof(data, "NTLM picked AND auth done set, clear picked!\n");
+      infof(data, "NTLM picked AND auth done set, clear picked!");
       data->state.authhost.picked = CURLAUTH_NONE;
       data->state.authhost.done = FALSE;
     }
 
     if((data->state.authproxy.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
        data->state.authproxy.done) {
-      infof(data, "NTLM-proxy picked AND auth done set, clear picked!\n");
+      infof(data, "NTLM-proxy picked AND auth done set, clear picked!");
       data->state.authproxy.picked = CURLAUTH_NONE;
       data->state.authproxy.done = FALSE;
     }
@@ -3885,15 +4023,12 @@
  * create_conn() is all done.
  *
  * Curl_setup_conn() also handles reused connections
- *
- * conn->data MUST already have been setup fine (in create_conn)
  */
-
-CURLcode Curl_setup_conn(struct connectdata *conn,
+CURLcode Curl_setup_conn(struct Curl_easy *data,
                          bool *protocol_done)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 
@@ -3911,20 +4046,6 @@
      lingering set from a previous invoke */
   conn->bits.proxy_connect_closed = FALSE;
 #endif
-  /*
-   * Set user-agent. Used for HTTP, but since we can attempt to tunnel
-   * basically anything through a http proxy we can't limit this based on
-   * protocol.
-   */
-  if(data->set.str[STRING_USERAGENT]) {
-    Curl_safefree(data->state.aptr.uagent);
-    data->state.aptr.uagent =
-      aprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]);
-    if(!data->state.aptr.uagent)
-      return CURLE_OUT_OF_MEMORY;
-  }
-
-  data->req.headerbytecount = 0;
 
 #ifdef CURL_DO_LINEEND_CONV
   data->state.crlf_conversions = 0; /* reset CRLF conversion counter */
@@ -3936,7 +4057,7 @@
 
   if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
     conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
-    result = Curl_connecthost(conn, conn->dns_entry);
+    result = Curl_connecthost(data, conn, conn->dns_entry);
     if(result)
       return result;
   }
@@ -3947,8 +4068,8 @@
       Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
     conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
     *protocol_done = TRUE;
-    Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
-    Curl_verboseconnect(conn);
+    Curl_updateconninfo(data, conn, conn->sock[FIRSTSOCKET]);
+    Curl_verboseconnect(data, conn);
   }
 
   conn->now = Curl_now(); /* time this *after* the connect is done, we set
@@ -3981,7 +4102,7 @@
       /* DNS resolution is done: that's either because this is a reused
          connection, in which case DNS was unnecessary, or because DNS
          really did finish already (synch resolver/fast async resolve) */
-      result = Curl_setup_conn(conn, protocol_done);
+      result = Curl_setup_conn(data, protocol_done);
     }
   }
 
diff --git a/lib/url.h b/lib/url.h
index 1941dc6..929fc60 100644
--- a/lib/url.h
+++ b/lib/url.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,22 +23,6 @@
  ***************************************************************************/
 #include "curl_setup.h"
 
-#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
-#define READBUFFER_MAX  CURL_MAX_READ_SIZE
-#define READBUFFER_MIN  1024
-
-/* The default upload buffer size, should not be smaller than
-   CURL_MAX_WRITE_SIZE, as it needs to hold a full buffer as could be sent in
-   a write callback.
-
-   The size was 16KB for many years but was bumped to 64KB because it makes
-   libcurl able to do significantly faster uploads in some circumstances. Even
-   larger buffers can help further, but this is deemed a fair memory/speed
-   compromise. */
-#define UPLOADBUFFER_DEFAULT 65536
-#define UPLOADBUFFER_MAX (2*1024*1024)
-#define UPLOADBUFFER_MIN CURL_MAX_WRITE_SIZE
-
 /*
  * Prototypes for library-wide functions provided by url.c
  */
@@ -53,7 +37,7 @@
 CURLcode Curl_connect(struct Curl_easy *, bool *async, bool *protocol_connect);
 CURLcode Curl_disconnect(struct Curl_easy *data,
                          struct connectdata *, bool dead_connection);
-CURLcode Curl_setup_conn(struct connectdata *conn,
+CURLcode Curl_setup_conn(struct Curl_easy *data,
                          bool *protocol_done);
 void Curl_free_request_state(struct Curl_easy *data);
 CURLcode Curl_parse_login_details(const char *login, const size_t len,
@@ -63,7 +47,7 @@
 const struct Curl_handler *Curl_builtin_scheme(const char *scheme);
 
 bool Curl_is_ASCII_name(const char *hostname);
-CURLcode Curl_idnconvert_hostname(struct connectdata *conn,
+CURLcode Curl_idnconvert_hostname(struct Curl_easy *data,
                                   struct hostname *host);
 void Curl_free_idnconverted_hostname(struct hostname *host);
 
@@ -72,9 +56,9 @@
                                              specified */
 
 #ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define Curl_verboseconnect(x)  Curl_nop_stmt
+#define Curl_verboseconnect(x,y)  Curl_nop_stmt
 #else
-void Curl_verboseconnect(struct connectdata *conn);
+void Curl_verboseconnect(struct Curl_easy *data, struct connectdata *conn);
 #endif
 
 #ifdef CURL_DISABLE_PROXY
diff --git a/lib/urlapi-int.h b/lib/urlapi-int.h
index d14d53d..4257233 100644
--- a/lib/urlapi-int.h
+++ b/lib/urlapi-int.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -28,7 +28,7 @@
 bool Curl_is_absolute_url(const char *url, char *scheme, size_t buflen);
 
 #ifdef DEBUGBUILD
-CURLUcode Curl_parse_port(struct Curl_URL *u, char *hostname);
+CURLUcode Curl_parse_port(struct Curl_URL *u, char *hostname, bool);
 #endif
 
 #endif /* HEADER_CURL_URLAPI_INT_H */
diff --git a/lib/urlapi.c b/lib/urlapi.c
index 88b7f04..905c499 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -131,7 +131,7 @@
  */
 static bool urlchar_needs_escaping(int c)
 {
-    return !(ISCNTRL(c) || ISSPACE(c) || ISGRAPH(c));
+  return !(ISCNTRL(c) || ISSPACE(c) || ISGRAPH(c));
 }
 
 /*
@@ -497,7 +497,8 @@
   return result;
 }
 
-UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, char *hostname)
+UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, char *hostname,
+                                   bool has_scheme)
 {
   char *portptr = NULL;
   char endbracket;
@@ -542,10 +543,14 @@
 
     /* Browser behavior adaptation. If there's a colon with no digits after,
        just cut off the name there which makes us ignore the colon and just
-       use the default port. Firefox, Chrome and Safari all do that. */
+       use the default port. Firefox, Chrome and Safari all do that.
+
+       Don't do it if the URL has no scheme, to make something that looks like
+       a scheme not work!
+    */
     if(!portptr[1]) {
       *portptr = '\0';
-      return CURLUE_OK;
+      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
     }
 
     if(!ISDIGIT(portptr[1]))
@@ -575,7 +580,7 @@
 }
 
 /* scan for byte values < 31 or 127 */
-static CURLUcode junkscan(const char *part)
+static bool junkscan(const char *part, unsigned int flags)
 {
   if(part) {
     static const char badbytes[]={
@@ -583,17 +588,18 @@
       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
-      0x7f,
-      0x00 /* null-terminate */
+      0x7f, 0x00 /* null-terminate */
     };
     size_t n = strlen(part);
     size_t nfine = strcspn(part, badbytes);
     if(nfine != n)
       /* since we don't know which part is scanned, return a generic error
          code */
-      return CURLUE_MALFORMED_INPUT;
+      return TRUE;
+    if(!(flags & CURLU_ALLOW_SPACE) && strchr(part, ' '))
+      return TRUE;
   }
-  return CURLUE_OK;
+  return FALSE;
 }
 
 static CURLUcode hostname_check(struct Curl_URL *u, char *hostname)
@@ -662,6 +668,94 @@
 
 #define HOSTNAME_END(x) (((x) == '/') || ((x) == '?') || ((x) == '#'))
 
+/*
+ * Handle partial IPv4 numerical addresses and different bases, like
+ * '16843009', '0x7f', '0x7f.1' '0177.1.1.1' etc.
+ *
+ * If the given input string is syntactically wrong or any part for example is
+ * too big, this function returns FALSE and doesn't create any output.
+ *
+ * Output the "normalized" version of that input string in plain quad decimal
+ * integers and return TRUE.
+ */
+static bool ipv4_normalize(const char *hostname, char *outp, size_t olen)
+{
+  bool done = FALSE;
+  int n = 0;
+  const char *c = hostname;
+  unsigned long parts[4] = {0, 0, 0, 0};
+
+  while(!done) {
+    char *endp;
+    unsigned long l;
+    if((*c < '0') || (*c > '9'))
+      /* most importantly this doesn't allow a leading plus or minus */
+      return FALSE;
+    l = strtoul(c, &endp, 0);
+
+    /* overflow or nothing parsed at all */
+    if(((l == ULONG_MAX) && (errno == ERANGE)) ||  (endp == c))
+      return FALSE;
+
+#if SIZEOF_LONG > 4
+    /* a value larger than 32 bits */
+    if(l > UINT_MAX)
+      return FALSE;
+#endif
+
+    parts[n] = l;
+    c = endp;
+
+    switch (*c) {
+    case '.' :
+      if(n == 3)
+        return FALSE;
+      n++;
+      c++;
+      break;
+
+    case '\0':
+      done = TRUE;
+      break;
+
+    default:
+      return FALSE;
+    }
+  }
+
+  /* this is deemed a valid IPv4 numerical address */
+
+  switch(n) {
+  case 0: /* a -- 32 bits */
+    msnprintf(outp, olen, "%u.%u.%u.%u",
+              parts[0] >> 24, (parts[0] >> 16) & 0xff,
+              (parts[0] >> 8) & 0xff, parts[0] & 0xff);
+    break;
+  case 1: /* a.b -- 8.24 bits */
+    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
+      return FALSE;
+    msnprintf(outp, olen, "%u.%u.%u.%u",
+              parts[0], (parts[1] >> 16) & 0xff,
+              (parts[1] >> 8) & 0xff, parts[1] & 0xff);
+    break;
+  case 2: /* a.b.c -- 8.8.16 bits */
+    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
+      return FALSE;
+    msnprintf(outp, olen, "%u.%u.%u.%u",
+              parts[0], parts[1], (parts[2] >> 8) & 0xff,
+              parts[2] & 0xff);
+    break;
+  case 3: /* a.b.c.d -- 8.8.8.8 bits */
+    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
+       (parts[3] > 0xff))
+      return FALSE;
+    msnprintf(outp, olen, "%u.%u.%u.%u",
+              parts[0], parts[1], parts[2], parts[3]);
+    break;
+  }
+  return TRUE;
+}
+
 static CURLUcode seturl(const char *url, CURLU *u, unsigned int flags)
 {
   char *path;
@@ -791,9 +885,8 @@
          !(flags & CURLU_NON_SUPPORT_SCHEME))
         return CURLUE_UNSUPPORTED_SCHEME;
 
-      if(junkscan(schemep))
+      if(junkscan(schemep, flags))
         return CURLUE_MALFORMED_INPUT;
-
     }
     else {
       /* no scheme! */
@@ -834,7 +927,7 @@
     }
   }
 
-  if(junkscan(path))
+  if(junkscan(path, flags))
     return CURLUE_MALFORMED_INPUT;
 
   if((flags & CURLU_URLENCODE) && path[0]) {
@@ -894,17 +987,18 @@
   }
 
   if(hostname) {
+    char normalized_ipv4[sizeof("255.255.255.255") + 1];
     /*
      * Parse the login details and strip them out of the host name.
      */
-    if(junkscan(hostname))
+    if(junkscan(hostname, flags))
       return CURLUE_MALFORMED_INPUT;
 
     result = parse_hostname_login(u, &hostname, flags);
     if(result)
       return result;
 
-    result = Curl_parse_port(u, hostname);
+    result = Curl_parse_port(u, hostname, url_has_scheme);
     if(result)
       return result;
 
@@ -917,7 +1011,10 @@
         return result;
     }
 
-    u->host = strdup(hostname);
+    if(ipv4_normalize(hostname, normalized_ipv4, sizeof(normalized_ipv4)))
+      u->host = strdup(normalized_ipv4);
+    else
+      u->host = strdup(hostname);
     if(!u->host)
       return CURLUE_OUT_OF_MEMORY;
 
@@ -978,12 +1075,14 @@
   }
 }
 
-#define DUP(dest, src, name)         \
-  if(src->name) {                    \
-    dest->name = strdup(src->name);  \
-    if(!dest->name)                  \
-      goto fail;                     \
-  }
+#define DUP(dest, src, name)                    \
+  do {                                          \
+    if(src->name) {                             \
+      dest->name = strdup(src->name);           \
+      if(!dest->name)                           \
+        goto fail;                              \
+    }                                           \
+  } while(0)
 
 CURLU *curl_url_dup(CURLU *in)
 {
@@ -1056,7 +1155,7 @@
       const struct Curl_handler *h =
         Curl_builtin_scheme(u->scheme);
       if(h) {
-        msnprintf(portbuf, sizeof(portbuf), "%ld", h->defport);
+        msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
         ptr = portbuf;
       }
     }
@@ -1115,7 +1214,7 @@
         /* there's no stored port number, but asked to deliver
            a default one for the scheme */
         if(h) {
-          msnprintf(portbuf, sizeof(portbuf), "%ld", h->defport);
+          msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
           port = portbuf;
         }
       }
@@ -1387,28 +1486,17 @@
     if(urlencode) {
       const unsigned char *i;
       char *o;
-      bool free_part = FALSE;
       char *enc = malloc(nalloc * 3 + 1); /* for worst case! */
       if(!enc)
         return CURLUE_OUT_OF_MEMORY;
-      if(plusencode) {
-        /* space to plus */
-        i = (const unsigned char *)part;
-        for(o = enc; *i; ++o, ++i)
-          *o = (*i == ' ') ? '+' : *i;
-        *o = 0; /* null-terminate */
-        part = strdup(enc);
-        if(!part) {
-          free(enc);
-          return CURLUE_OUT_OF_MEMORY;
-        }
-        free_part = TRUE;
-      }
       for(i = (const unsigned char *)part, o = enc; *i; i++) {
-        if(Curl_isunreserved(*i) ||
-           ((*i == '/') && urlskipslash) ||
-           ((*i == '=') && equalsencode) ||
-           ((*i == '+') && plusencode)) {
+        if((*i == ' ') && plusencode) {
+          *o = '+';
+          o++;
+        }
+        else if(Curl_isunreserved(*i) ||
+                ((*i == '/') && urlskipslash) ||
+                ((*i == '=') && equalsencode)) {
           if((*i == '=') && equalsencode)
             /* only skip the first equals sign */
             equalsencode = FALSE;
@@ -1422,8 +1510,6 @@
       }
       *o = 0; /* null-terminate */
       newp = enc;
-      if(free_part)
-        free((char *)part);
     }
     else {
       char *p;
diff --git a/lib/urldata.h b/lib/urldata.h
index 5ee8177..1d99112 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -105,19 +105,27 @@
 #include "dynbuf.h"
 
 /* return the count of bytes sent, or -1 on error */
-typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
+typedef ssize_t (Curl_send)(struct Curl_easy *data,   /* transfer */
                             int sockindex,            /* socketindex */
                             const void *buf,          /* data to write */
                             size_t len,               /* max amount to write */
                             CURLcode *err);           /* error to return */
 
 /* return the count of bytes read, or -1 on error */
-typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */
+typedef ssize_t (Curl_recv)(struct Curl_easy *data,   /* transfer */
                             int sockindex,            /* socketindex */
                             char *buf,                /* store data here */
                             size_t len,               /* max amount to read */
                             CURLcode *err);           /* error to return */
 
+#ifdef USE_HYPER
+typedef CURLcode (*Curl_datastream)(struct Curl_easy *data,
+                                    struct connectdata *conn,
+                                    int *didwhat,
+                                    bool *done,
+                                    int select_res);
+#endif
+
 #include "mime.h"
 #include "imap.h"
 #include "pop3.h"
@@ -132,6 +140,7 @@
 #include "wildcard.h"
 #include "multihandle.h"
 #include "quic.h"
+#include "c-hyper.h"
 
 #ifdef HAVE_GSSAPI
 # ifdef HAVE_GSSGNU
@@ -151,6 +160,22 @@
 #include <libssh2_sftp.h>
 #endif /* HAVE_LIBSSH2_H */
 
+#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
+#define READBUFFER_MAX  CURL_MAX_READ_SIZE
+#define READBUFFER_MIN  1024
+
+/* The default upload buffer size, should not be smaller than
+   CURL_MAX_WRITE_SIZE, as it needs to hold a full buffer as could be sent in
+   a write callback.
+
+   The size was 16KB for many years but was bumped to 64KB because it makes
+   libcurl able to do significantly faster uploads in some circumstances. Even
+   larger buffers can help further, but this is deemed a fair memory/speed
+   compromise. */
+#define UPLOADBUFFER_DEFAULT 65536
+#define UPLOADBUFFER_MAX (2*1024*1024)
+#define UPLOADBUFFER_MIN CURL_MAX_WRITE_SIZE
+
 #define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
 #define GOOD_EASY_HANDLE(x) \
   ((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER))
@@ -205,14 +230,14 @@
 
 /* struct for data related to each SSL connection */
 struct ssl_connect_data {
-  /* Use ssl encrypted communications TRUE/FALSE, not necessarily using it atm
-     but at least asked to or meaning to use it. See 'state' for the exact
-     current state of the connection. */
   ssl_connection_state state;
   ssl_connect_state connecting_state;
 #if defined(USE_SSL)
   struct ssl_backend_data *backend;
 #endif
+  /* Use ssl encrypted communications TRUE/FALSE. The library is not
+     necessarily using ssl at the moment but at least asked to or means to use
+     it. See 'state' for the exact current state of the connection. */
   BIT(use);
 };
 
@@ -221,6 +246,7 @@
   long version_max;      /* max supported version the client wants to use*/
   char *CApath;          /* certificate dir (doesn't work on windows) */
   char *CAfile;          /* certificate to verify peer against */
+  char *issuercert;      /* optional issuer certificate filename */
   char *clientcert;
   char *random_file;     /* path to file containing "random" data */
   char *egdsocket;       /* path to file containing the EGD daemon socket */
@@ -228,6 +254,8 @@
   char *cipher_list13;   /* list of TLS 1.3 cipher suites to use */
   char *pinned_key;
   struct curl_blob *cert_blob;
+  struct curl_blob *ca_info_blob;
+  struct curl_blob *issuercert_blob;
   char *curves;          /* list of curves to use */
   BIT(verifypeer);       /* set TRUE if this is desired */
   BIT(verifyhost);       /* set TRUE if CN/SAN must match hostname */
@@ -239,8 +267,6 @@
   struct ssl_primary_config primary;
   long certverifyresult; /* result from the certificate verification */
   char *CRLfile;   /* CRL to check certificate revocation */
-  char *issuercert;/* optional issuer certificate filename */
-  struct curl_blob *issuercert_blob;
   curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */
   void *fsslctxp;        /* parameter for call back */
   char *cert_type; /* format for certificate (default: PEM)*/
@@ -261,6 +287,8 @@
   BIT(revoke_best_effort); /* ignore SSL revocation offline/missing revocation
                               list errors */
   BIT(native_ca_store); /* use the native ca store of operating system */
+  BIT(auto_client_cert);   /* automatically locate and use a client
+                              certificate for authentication (Schannel) */
 };
 
 struct ssl_general_config {
@@ -346,6 +374,15 @@
 };
 #endif
 
+/* Struct used for SCRAM-SHA-1 authentication */
+#ifdef USE_GSASL
+#include <gsasl.h>
+struct gsasldata {
+  Gsasl *ctx;
+  Gsasl_session *client;
+};
+#endif
+
 /* Struct used for NTLM challenge-response authentication */
 #if defined(USE_NTLM)
 struct ntlmdata {
@@ -368,8 +405,8 @@
 #else
   unsigned int flags;
   unsigned char nonce[8];
-  void *target_info; /* TargetInfo received in the ntlm type-2 message */
   unsigned int target_info_len;
+  void *target_info; /* TargetInfo received in the ntlm type-2 message */
 
 #if defined(NTLM_WB_ENABLED)
   /* used for communication with Samba's winbind daemon helper ntlm_auth */
@@ -471,7 +508,9 @@
   BIT(ftp_use_data_ssl); /* Enabled SSL for the data connection */
   BIT(ftp_use_control_ssl); /* Enabled SSL for the control connection */
 #endif
+#ifndef CURL_DISABLE_NETRC
   BIT(netrc);         /* name+password provided by netrc */
+#endif
   BIT(bound); /* set true if bind() has already been done on this socket/
                  connection */
   BIT(multiplex); /* connection is multiplexed */
@@ -514,24 +553,24 @@
 #define KEEP_RECVBITS (KEEP_RECV | KEEP_RECV_HOLD | KEEP_RECV_PAUSE)
 #define KEEP_SENDBITS (KEEP_SEND | KEEP_SEND_HOLD | KEEP_SEND_PAUSE)
 
+#if defined(CURLRES_ASYNCH) || !defined(CURL_DISABLE_DOH)
+#define USE_CURL_ASYNC
 struct Curl_async {
   char *hostname;
-  int port;
   struct Curl_dns_entry *dns;
+  struct thread_data *tdata;
+  void *resolver; /* resolver state, if it is used in the URL state -
+                     ares_channel f.e. */
+  int port;
   int status; /* if done is TRUE, this is the status from the callback */
-  void *os_specific;  /* 'struct thread_data' for Windows */
   BIT(done);  /* set TRUE when the lookup is complete */
 };
 
+#endif
+
 #define FIRSTSOCKET     0
 #define SECONDARYSOCKET 1
 
-/* These function pointer types are here only to allow easier typecasting
-   within the source when we need to cast between data pointers (such as NULL)
-   and function pointers. */
-typedef CURLcode (*Curl_do_more_func)(struct connectdata *, int *);
-typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool);
-
 enum expect100 {
   EXP100_SEND_DATA,           /* enough waiting, just send the body now */
   EXP100_AWAITING_CONTINUE,   /* waiting for the 100 Continue header */
@@ -578,8 +617,8 @@
   struct curl_slist *headers;
   struct dnsprobe probe[DOH_PROBE_SLOTS];
   unsigned int pending; /* still outstanding requests */
-  const char *host;
   int port;
+  const char *host;
 };
 
 /*
@@ -604,6 +643,8 @@
                                    following second response code) result in a
                                    CURLE_GOT_NOTHING error code */
 
+  curl_off_t pendingheader;      /* this many bytes left to send is actually
+                                    header and not body */
   struct curltime start;         /* transfer started at this time */
   struct curltime now;           /* current time */
   enum {
@@ -620,6 +661,7 @@
                                    Content-Range: header */
   int httpcode;                 /* error code from the 'HTTP/1.? XXX' or
                                    'RTSP/1.? XXX' line */
+  int keepon;
   struct curltime start100;      /* time stamp to wait for the 100 code from */
   enum expect100 exp100;        /* expect 100 continue state */
   enum upgrade101 upgr101;      /* 101 upgrade state */
@@ -628,7 +670,6 @@
   struct contenc_writer *writer_stack;
   time_t timeofdoc;
   long bodywrites;
-  int keepon;
   char *location;   /* This points to an allocated version of the Location:
                        header data */
   char *newurl;     /* Set to the new URL to use when a redirect or a retry is
@@ -643,10 +684,25 @@
      and the 'upload_present' contains the number of bytes available at this
      position */
   char *upload_fromhere;
-  void *protop;       /* Allocated protocol-specific data. Each protocol
-                         handler makes sure this points to data it needs. */
+
+  /* Allocated protocol-specific data. Each protocol handler makes sure this
+     points to data it needs. */
+  union {
+    struct FILEPROTO *file;
+    struct FTP *ftp;
+    struct HTTP *http;
+    struct IMAP *imap;
+    struct ldapreqinfo *ldap;
+    struct MQTT *mqtt;
+    struct POP3 *pop3;
+    struct RTSP *rtsp;
+    struct smb_request *smb;
+    struct SMTP *smtp;
+    struct SSHPROTO *ssh;
+    struct TELNET *telnet;
+  } p;
 #ifndef CURL_DISABLE_DOH
-  struct dohdata doh; /* DoH specific data for this request */
+  struct dohdata *doh; /* DoH specific data for this request */
 #endif
   BIT(header);       /* incoming data has HTTP header */
   BIT(content_range); /* set TRUE if Content-Range: was found */
@@ -671,18 +727,20 @@
 struct Curl_handler {
   const char *scheme;        /* URL scheme name. */
 
-  /* Complement to setup_connection_internals(). */
-  CURLcode (*setup_connection)(struct connectdata *);
+  /* Complement to setup_connection_internals(). This is done before the
+     transfer "owns" the connection. */
+  CURLcode (*setup_connection)(struct Curl_easy *data,
+                               struct connectdata *conn);
 
   /* These two functions MUST be set to be protocol dependent */
-  CURLcode (*do_it)(struct connectdata *, bool *done);
-  Curl_done_func done;
+  CURLcode (*do_it)(struct Curl_easy *data, bool *done);
+  CURLcode (*done)(struct Curl_easy *, CURLcode, bool);
 
   /* If the curl_do() function is better made in two halves, this
    * curl_do_more() function will be called afterwards, if set. For example
    * for doing the FTP stuff after the PASV/PORT command.
    */
-  Curl_do_more_func do_more;
+  CURLcode (*do_more)(struct Curl_easy *, int *);
 
   /* This function *MAY* be set to a protocol-dependent function that is run
    * after the connect() and everything is done, as a step in the connection.
@@ -690,39 +748,41 @@
    * function completes before return. If it doesn't complete, the caller
    * should call the curl_connecting() function until it is.
    */
-  CURLcode (*connect_it)(struct connectdata *, bool *done);
+  CURLcode (*connect_it)(struct Curl_easy *data, bool *done);
 
   /* See above. */
-  CURLcode (*connecting)(struct connectdata *, bool *done);
-  CURLcode (*doing)(struct connectdata *, bool *done);
+  CURLcode (*connecting)(struct Curl_easy *data, bool *done);
+  CURLcode (*doing)(struct Curl_easy *data, bool *done);
 
   /* Called from the multi interface during the PROTOCONNECT phase, and it
      should then return a proper fd set */
-  int (*proto_getsock)(struct connectdata *conn,
-                       curl_socket_t *socks);
+  int (*proto_getsock)(struct Curl_easy *data,
+                       struct connectdata *conn, curl_socket_t *socks);
 
   /* Called from the multi interface during the DOING phase, and it should
      then return a proper fd set */
-  int (*doing_getsock)(struct connectdata *conn,
-                       curl_socket_t *socks);
+  int (*doing_getsock)(struct Curl_easy *data,
+                       struct connectdata *conn, curl_socket_t *socks);
 
   /* Called from the multi interface during the DO_MORE phase, and it should
      then return a proper fd set */
-  int (*domore_getsock)(struct connectdata *conn,
-                        curl_socket_t *socks);
+  int (*domore_getsock)(struct Curl_easy *data,
+                        struct connectdata *conn, curl_socket_t *socks);
 
   /* Called from the multi interface during the DO_DONE, PERFORM and
      WAITPERFORM phases, and it should then return a proper fd set. Not setting
      this will make libcurl use the generic default one. */
-  int (*perform_getsock)(const struct connectdata *conn,
-                         curl_socket_t *socks);
+  int (*perform_getsock)(struct Curl_easy *data,
+                         struct connectdata *conn, curl_socket_t *socks);
 
   /* This function *MAY* be set to a protocol-dependent function that is run
    * by the curl_disconnect(), as a step in the disconnection.  If the handler
-   * is called because the connection has been considered dead, dead_connection
-   * is set to TRUE.
+   * is called because the connection has been considered dead,
+   * dead_connection is set to TRUE. The connection is already disassociated
+   * from the transfer here.
    */
-  CURLcode (*disconnect)(struct connectdata *, bool dead_connection);
+  CURLcode (*disconnect)(struct Curl_easy *, struct connectdata *,
+                         bool dead_connection);
 
   /* If used, this function gets called from transfer.c:readwrite_data() to
      allow the protocol to do extra reads/writes */
@@ -732,15 +792,20 @@
   /* This function can perform various checks on the connection. See
      CONNCHECK_* for more information about the checks that can be performed,
      and CONNRESULT_* for the results that can be returned. */
-  unsigned int (*connection_check)(struct connectdata *conn,
+  unsigned int (*connection_check)(struct Curl_easy *data,
+                                   struct connectdata *conn,
                                    unsigned int checks_to_perform);
 
-  long defport;           /* Default port. */
+  /* attach() attaches this transfer to this connection */
+  void (*attach)(struct Curl_easy *data, struct connectdata *conn);
+
+  int defport;            /* Default port. */
   unsigned int protocol;  /* See CURLPROTO_* - this needs to be the single
                              specific protocol bit */
   unsigned int family;    /* single bit for protocol family; basically the
                              non-TLS name of the protocol this is */
   unsigned int flags;     /* Extra particular characteristics, see PROTOPT_* */
+
 };
 
 #define PROTOPT_NONE 0             /* nothing extra */
@@ -799,21 +864,8 @@
   char *passwd;  /* proxy password string, allocated */
 };
 
-/* struct for HTTP CONNECT state data */
-struct http_connect_state {
-  struct dynbuf rcvbuf;
-  int keepon;
-  curl_off_t cl; /* size of content to read and ignore */
-  enum {
-    TUNNEL_INIT,    /* init/default/no tunnel state */
-    TUNNEL_CONNECT, /* CONNECT has been sent off */
-    TUNNEL_COMPLETE /* CONNECT response received completely */
-  } tunnel_state;
-  BIT(chunked_encoding);
-  BIT(close_connection);
-};
-
 struct ldapconninfo;
+struct http_connect_state;
 
 /* for the (SOCKS) connect state machine */
 enum connect_t {
@@ -839,13 +891,9 @@
 
 #define SOCKS_STATE(x) (((x) >= CONNECT_SOCKS_INIT) &&  \
                         ((x) < CONNECT_DONE))
-#define SOCKS_REQUEST_BUFSIZE 600  /* room for large user/pw (255 max each) */
 
 struct connstate {
   enum connect_t state;
-  unsigned char socksreq[SOCKS_REQUEST_BUFSIZE];
-
-  /* CONNECT_SOCKS_SEND */
   ssize_t outstanding;  /* send this many bytes more */
   unsigned char *outp; /* send from this pointer */
 };
@@ -855,10 +903,6 @@
  * unique for an entire connection.
  */
 struct connectdata {
-  /* 'data' is the CURRENT Curl_easy using this connection -- take great
-     caution that this might very well vary between different times this
-     connection is used! */
-  struct Curl_easy *data;
   struct connstate cnnct;
   struct Curl_llist_element bundle_node; /* conncache */
 
@@ -892,11 +936,6 @@
   struct Curl_addrinfo *ip_addr;
   struct Curl_addrinfo *tempaddr[2]; /* for happy eyeballs */
 
-  /* 'ip_addr_str' is the ip_addr data as a human readable string.
-     It remains available as long as the connection does, which is longer than
-     the ip_addr itself. */
-  char ip_addr_str[MAX_IPADR_LEN];
-
   unsigned int scope_id;  /* Scope id for IPv6 */
 
   enum {
@@ -919,7 +958,7 @@
   struct proxy_info socks_proxy;
   struct proxy_info http_proxy;
 #endif
-  long port;       /* which port to use locally */
+  int port;        /* which port to use locally - to connect to */
   int remote_port; /* the remote port, not the proxy port! */
   int conn_to_port; /* the remote port to connect to. valid only if
                        bits.conn_to_port is set */
@@ -934,24 +973,13 @@
      these are updated with data which comes directly from the socket. */
 
   char primary_ip[MAX_IPADR_LEN];
-  long primary_port;
-
-  /* 'local_ip' and 'local_port' get filled with local's numerical
-     ip address and port number whenever an outgoing connection is
-     **established** from the primary socket to a remote address. */
-
-  char local_ip[MAX_IPADR_LEN];
-  long local_port;
+  unsigned char ip_version; /* copied from the Curl_easy at creation time */
 
   char *user;    /* user name string, allocated */
   char *passwd;  /* password string, allocated */
   char *options; /* options string, allocated */
-
   char *sasl_authzid;     /* authorisation identity string, allocated */
-
-  int httpversion;        /* the HTTP version*10 reported by the server */
-  int rtspversion;        /* the RTSP version*10 reported by the server */
-
+  unsigned char httpversion; /* the HTTP version*10 reported by the server */
   struct curltime now;     /* "current" time */
   struct curltime created; /* creation time */
   struct curltime lastused; /* when returned to the connection cache */
@@ -978,13 +1006,14 @@
 #endif
   struct ConnectBits bits;    /* various state-flags for this connection */
 
+  /* The field below gets set in Curl_connecthost */
+  int num_addr; /* number of addresses to try to connect to */
  /* connecttime: when connect() is called on the current IP address. Used to
     be able to track when to move on to try next IP - but only when the multi
     interface is used. */
   struct curltime connecttime;
-  /* The two fields below get set in Curl_connecthost */
-  int num_addr; /* number of addresses to try to connect to */
 
+  /* The field below gets set in Curl_connecthost */
   /* how long time in milliseconds to spend on trying to connect to each IP
      address, per family */
   timediff_t timeoutms_per_addr[2];
@@ -992,15 +1021,11 @@
   const struct Curl_handler *handler; /* Connection's protocol handler */
   const struct Curl_handler *given;   /* The protocol first given */
 
-  long ip_version; /* copied from the Curl_easy at creation time */
-
   /* Protocols can use a custom keepalive mechanism to keep connections alive.
      This allows those protocols to track the last time the keepalive mechanism
      was used on this connection. */
   struct curltime keepalive;
 
-  long upkeep_interval_ms;      /* Time between calls for connection upkeep. */
-
   /**** curl_get() phase fields */
 
   curl_socket_t sockfd;   /* socket to read from or CURL_SOCKET_BAD */
@@ -1033,6 +1058,10 @@
   CtxtHandle *sslContext;
 #endif
 
+#ifdef USE_GSASL
+  struct gsasldata gsasl;
+#endif
+
 #if defined(USE_NTLM)
   curlntlm http_ntlm_state;
   curlntlm proxy_ntlm_state;
@@ -1051,9 +1080,6 @@
   struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
 #endif
 
-  /* data used for the asynch name resolve callback */
-  struct Curl_async async;
-
   /* for chunked-encoded trailer */
   struct dynbuf trailer;
 
@@ -1072,27 +1098,30 @@
     struct mqtt_conn mqtt;
   } proto;
 
-  int cselect_bits; /* bitmask of socket events */
-  int waitfor;      /* current READ/WRITE bits to wait for */
-
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-  int socks5_gssapi_enctype;
+  struct http_connect_state *connect_state; /* for HTTP CONNECT */
+  struct connectbundle *bundle; /* The bundle we are member of */
+#ifdef USE_UNIX_SOCKETS
+  char *unix_domain_socket;
 #endif
-
+#ifdef USE_HYPER
+  /* if set, an alternative data transfer function */
+  Curl_datastream datastream;
+#endif
   /* When this connection is created, store the conditions for the local end
      bind. This is stored before the actual bind and before any connection is
      made and will serve the purpose of being used for comparison reasons so
      that subsequent bound-requested connections aren't accidentally re-using
      wrong connections. */
   char *localdev;
-  unsigned short localport;
   int localportrange;
-  struct http_connect_state *connect_state; /* for HTTP CONNECT */
-  struct connectbundle *bundle; /* The bundle we are member of */
+  int cselect_bits; /* bitmask of socket events */
+  int waitfor;      /* current READ/WRITE bits to wait for */
   int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */
-#ifdef USE_UNIX_SOCKETS
-  char *unix_domain_socket;
+
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+  int socks5_gssapi_enctype;
 #endif
+  unsigned short localport;
 };
 
 /* The end of connectdata. */
@@ -1125,9 +1154,9 @@
      reused, in the connection cache. */
 
   char conn_primary_ip[MAX_IPADR_LEN];
-  long conn_primary_port;
+  int conn_primary_port;
   char conn_local_ip[MAX_IPADR_LEN];
-  long conn_local_port;
+  int conn_local_port;
   const char *conn_scheme;
   unsigned int conn_protocol;
   struct curl_certinfo certs; /* info about the certs, only populated in
@@ -1188,17 +1217,6 @@
 };
 
 typedef enum {
-  HTTPREQ_NONE, /* first in list */
-  HTTPREQ_GET,
-  HTTPREQ_POST,
-  HTTPREQ_POST_FORM, /* we make a difference internally */
-  HTTPREQ_POST_MIME, /* we make a difference internally */
-  HTTPREQ_PUT,
-  HTTPREQ_HEAD,
-  HTTPREQ_LAST /* last in list */
-} Curl_HttpReq;
-
-typedef enum {
     RTSPREQ_NONE, /* first in list */
     RTSPREQ_OPTIONS,
     RTSPREQ_DESCRIBE,
@@ -1295,9 +1313,6 @@
 struct UrlState {
   /* Points to the connection cache */
   struct conncache *conn_cache;
-
-  int retrycount; /* number of retries on a new connection */
-
   /* buffers to store authentication data in, as parsed from input options */
   struct curltime keeps_speed; /* for the progress meter really */
 
@@ -1314,13 +1329,15 @@
                        following not keep sending user+password... This is
                        strdup() data.
                     */
+  int retrycount; /* number of retries on a new connection */
   int first_remote_port; /* remote port of the first (not followed) request */
   struct Curl_ssl_session *session; /* array of 'max_ssl_sessions' size */
   long sessionage;                  /* number of the most recent session */
-  unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */
   struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */
-  char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */
+  unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */
   int os_errno;  /* filled in with errno whenever an error occurs */
+  char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */
+  long followlocation; /* redirect counter */
 #ifdef HAVE_SIGNAL
   /* storage for the previous bag^H^H^HSIGPIPE signal handler :-) */
   void (*prev_signal)(int sig);
@@ -1330,8 +1347,9 @@
 
   struct auth authhost;  /* auth details for host */
   struct auth authproxy; /* auth details for proxy */
-  void *resolver; /* resolver state, if it is used in the URL state -
-                     ares_channel f.e. */
+#ifdef USE_CURL_ASYNC
+  struct Curl_async async;  /* asynchronous name resolver data */
+#endif
 
 #if defined(USE_OPENSSL)
   /* void instead of ENGINE to avoid bleeding OpenSSL into this header */
@@ -1344,9 +1362,10 @@
 
   /* a place to store the most recently set FTP entrypath */
   char *most_recent_ftp_entrypath;
-
-  int httpversion;       /* the lowest HTTP version*10 reported by any server
-                            involved in this request */
+  unsigned char httpwant; /* when non-zero, a specific HTTP version requested
+                             to be used in the library's request(s) */
+  unsigned char httpversion; /* the lowest HTTP version*10 reported by any
+                                server involved in this request */
 
 #if !defined(WIN32) && !defined(MSDOS) && !defined(__EMX__)
 /* do FTP line-end conversions on most platforms */
@@ -1380,6 +1399,12 @@
   CURLU *uh; /* URL handle for the current parsed URL */
   struct urlpieces up;
   Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */
+  char *url;        /* work URL, copied from UserDefined */
+  char *referer;    /* referer string */
+  struct curl_slist *cookielist; /* list of cookie files set by
+                                    curl_easy_setopt(COOKIEFILE) calls */
+  struct curl_slist *resolve; /* set to point to the set.resolve list when
+                                 this should be dealt with in pretransfer */
 #ifndef CURL_DISABLE_HTTP
   size_t trailers_bytes_sent;
   struct dynbuf trailers_buf; /* a buffer containing the compiled trailing
@@ -1387,6 +1412,10 @@
 #endif
   trailers_state trailers_state; /* whether we are sending trailers
                                        and what stage are we at */
+#ifdef USE_HYPER
+  bool hconnect;  /* set if a CONNECT request */
+  CURLcode hresult; /* used to pass return codes back from hyper callbacks */
+#endif
 
   /* Dynamically allocated strings, MUST be freed before this struct is
      killed. */
@@ -1401,6 +1430,12 @@
     char *cookiehost;
     char *rtsp_transport;
     char *te; /* TE: request header */
+
+    /* transfer credentials */
+    char *user;
+    char *passwd;
+    char *proxyuser;
+    char *proxypasswd;
   } aptr;
 
 #ifdef CURLDEBUG
@@ -1428,32 +1463,16 @@
   BIT(use_range);
   BIT(rangestringalloc); /* the range string is malloc()'ed */
   BIT(done); /* set to FALSE when Curl_init_do() is called and set to TRUE
-                  when multi_done() is called, to prevent multi_done() to get
-                  invoked twice when the multi interface is used. */
+                when multi_done() is called, to prevent multi_done() to get
+                invoked twice when the multi interface is used. */
   BIT(stream_depends_e); /* set or don't set the Exclusive bit */
   BIT(previouslypending); /* this transfer WAS in the multi->pending queue */
   BIT(cookie_engine);
-};
-
-
-/*
- * This 'DynamicStatic' struct defines dynamic states that actually change
- * values in the 'UserDefined' area, which MUST be taken into consideration
- * if the UserDefined struct is cloned or similar. You can probably just
- * copy these, but each one indicate a special action on other data.
- */
-
-struct DynamicStatic {
-  char *url;        /* work URL, copied from UserDefined */
-  char *referer;    /* referer string */
-  struct curl_slist *cookielist; /* list of cookie files set by
-                                    curl_easy_setopt(COOKIEFILE) calls */
-  struct curl_slist *resolve; /* set to point to the set.resolve list when
-                                 this should be dealt with in pretransfer */
+  BIT(prefer_ascii);   /* ASCII rather than binary */
+  BIT(list_only);      /* list directory contents */
   BIT(url_alloc);   /* URL string is malloc()'ed */
   BIT(referer_alloc); /* referer string is malloc()ed */
-  BIT(wildcard_resolve); /* Set to true if any resolve change is a
-                              wildcard */
+  BIT(wildcard_resolve); /* Set to true if any resolve change is a wildcard */
 };
 
 /*
@@ -1476,9 +1495,9 @@
  * are catered for in curl_easy_setopt_ccsid()
  */
 enum dupstring {
-  STRING_CERT_ORIG,       /* client certificate file name */
+  STRING_CERT,            /* client certificate file name */
   STRING_CERT_PROXY,      /* client certificate file name */
-  STRING_CERT_TYPE_ORIG,  /* format for certificate (default: PEM)*/
+  STRING_CERT_TYPE,       /* format for certificate (default: PEM)*/
   STRING_CERT_TYPE_PROXY, /* format for certificate (default: PEM)*/
   STRING_COOKIE,          /* HTTP cookie string to send */
   STRING_COOKIEJAR,       /* dump all cookies to this file */
@@ -1489,11 +1508,11 @@
   STRING_FTP_ACCOUNT,     /* ftp account data */
   STRING_FTP_ALTERNATIVE_TO_USER, /* command to send if USER/PASS fails */
   STRING_FTPPORT,         /* port to send with the FTP PORT command */
-  STRING_KEY_ORIG,        /* private key file name */
+  STRING_KEY,             /* private key file name */
   STRING_KEY_PROXY,       /* private key file name */
-  STRING_KEY_PASSWD_ORIG, /* plain text private key password */
+  STRING_KEY_PASSWD,      /* plain text private key password */
   STRING_KEY_PASSWD_PROXY, /* plain text private key password */
-  STRING_KEY_TYPE_ORIG,   /* format for private key (default: PEM) */
+  STRING_KEY_TYPE,        /* format for private key (default: PEM) */
   STRING_KEY_TYPE_PROXY,  /* format for private key (default: PEM) */
   STRING_KRB_LEVEL,       /* krb security level */
   STRING_NETRC_FILE,      /* if not NULL, use this instead of trying to find
@@ -1503,22 +1522,22 @@
   STRING_SET_RANGE,       /* range, if used */
   STRING_SET_REFERER,     /* custom string for the HTTP referer field */
   STRING_SET_URL,         /* what original URL to work on */
-  STRING_SSL_CAPATH_ORIG, /* CA directory name (doesn't work on windows) */
+  STRING_SSL_CAPATH,      /* CA directory name (doesn't work on windows) */
   STRING_SSL_CAPATH_PROXY, /* CA directory name (doesn't work on windows) */
-  STRING_SSL_CAFILE_ORIG, /* certificate file to verify peer against */
+  STRING_SSL_CAFILE,      /* certificate file to verify peer against */
   STRING_SSL_CAFILE_PROXY, /* certificate file to verify peer against */
-  STRING_SSL_PINNEDPUBLICKEY_ORIG, /* public key file to verify peer against */
+  STRING_SSL_PINNEDPUBLICKEY, /* public key file to verify peer against */
   STRING_SSL_PINNEDPUBLICKEY_PROXY, /* public key file to verify proxy */
-  STRING_SSL_CIPHER_LIST_ORIG, /* list of ciphers to use */
+  STRING_SSL_CIPHER_LIST, /* list of ciphers to use */
   STRING_SSL_CIPHER_LIST_PROXY, /* list of ciphers to use */
-  STRING_SSL_CIPHER13_LIST_ORIG, /* list of TLS 1.3 ciphers to use */
+  STRING_SSL_CIPHER13_LIST, /* list of TLS 1.3 ciphers to use */
   STRING_SSL_CIPHER13_LIST_PROXY, /* list of TLS 1.3 ciphers to use */
   STRING_SSL_EGDSOCKET,   /* path to file containing the EGD daemon socket */
   STRING_SSL_RANDOM_FILE, /* path to file containing "random" data */
   STRING_USERAGENT,       /* User-Agent string */
-  STRING_SSL_CRLFILE_ORIG, /* crl file to check certificate */
+  STRING_SSL_CRLFILE,     /* crl file to check certificate */
   STRING_SSL_CRLFILE_PROXY, /* crl file to check certificate */
-  STRING_SSL_ISSUERCERT_ORIG, /* issuer cert file to check certificate */
+  STRING_SSL_ISSUERCERT, /* issuer cert file to check certificate */
   STRING_SSL_ISSUERCERT_PROXY, /* issuer cert file to check certificate */
   STRING_SSL_ENGINE,      /* name of ssl engine */
   STRING_USERNAME,        /* <username>, if used */
@@ -1531,35 +1550,25 @@
   STRING_RTSP_SESSION_ID, /* Session ID to use */
   STRING_RTSP_STREAM_URI, /* Stream URI for this request */
   STRING_RTSP_TRANSPORT,  /* Transport for this session */
-
   STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */
   STRING_SSH_PUBLIC_KEY,  /* path to the public key file for auth */
   STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */
   STRING_SSH_KNOWNHOSTS,  /* file name of knownhosts file */
-
   STRING_PROXY_SERVICE_NAME, /* Proxy service name */
   STRING_SERVICE_NAME,    /* Service name */
   STRING_MAIL_FROM,
   STRING_MAIL_AUTH,
-
-  STRING_TLSAUTH_USERNAME_ORIG,  /* TLS auth <username> */
+  STRING_TLSAUTH_USERNAME,  /* TLS auth <username> */
   STRING_TLSAUTH_USERNAME_PROXY, /* TLS auth <username> */
-  STRING_TLSAUTH_PASSWORD_ORIG,  /* TLS auth <password> */
+  STRING_TLSAUTH_PASSWORD,  /* TLS auth <password> */
   STRING_TLSAUTH_PASSWORD_PROXY, /* TLS auth <password> */
-
   STRING_BEARER,                /* <bearer>, if used */
-
   STRING_UNIX_SOCKET_PATH,      /* path to Unix socket, if used */
-
   STRING_TARGET,                /* CURLOPT_REQUEST_TARGET */
   STRING_DOH,                   /* CURLOPT_DOH_URL */
-
   STRING_ALTSVC,                /* CURLOPT_ALTSVC */
-
+  STRING_HSTS,                  /* CURLOPT_HSTS */
   STRING_SASL_AUTHZID,          /* CURLOPT_SASL_AUTHZID */
-
-  STRING_TEMP_URL,              /* temp URL storage for proxy use */
-
   STRING_DNS_SERVERS,
   STRING_DNS_INTERFACE,
   STRING_DNS_LOCAL_IP4,
@@ -1574,17 +1583,20 @@
 
   STRING_COPYPOSTFIELDS,  /* if POST, set the fields' values here */
 
+  STRING_AWS_SIGV4, /* Parameters for V4 signature */
 
   STRING_LAST /* not used, just an end-of-list marker */
 };
 
 enum dupblob {
-  BLOB_CERT_ORIG,
+  BLOB_CERT,
   BLOB_CERT_PROXY,
-  BLOB_KEY_ORIG,
+  BLOB_KEY,
   BLOB_KEY_PROXY,
-  BLOB_SSL_ISSUERCERT_ORIG,
+  BLOB_SSL_ISSUERCERT,
   BLOB_SSL_ISSUERCERT_PROXY,
+  BLOB_CAINFO,
+  BLOB_CAINFO_PROXY,
   BLOB_LAST
 };
 
@@ -1608,7 +1620,6 @@
   unsigned long httpauth;  /* kind of HTTP authentication to use (bitmask) */
   unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */
   unsigned long socks5auth;/* kind of SOCKS5 authentication to use (bitmask) */
-  long followlocation; /* as in HTTP Location: */
   long maxredirs;    /* maximum no. of http(s) redirects to follow, set to -1
                         for infinity */
 
@@ -1648,7 +1659,12 @@
   curl_conv_callback convtonetwork;
   /* function to convert from UTF-8 encoding: */
   curl_conv_callback convfromutf8;
-
+#ifndef CURL_DISABLE_HSTS
+  curl_hstsread_callback hsts_read;
+  void *hsts_read_userp;
+  curl_hstswrite_callback hsts_write;
+  void *hsts_write_userp;
+#endif
   void *progress_client; /* pointer to pass to the progress callback */
   void *ioctl_client;   /* pointer to pass to the ioctl callback */
   long timeout;         /* in milliseconds, 0 means no timeout */
@@ -1684,24 +1700,24 @@
   struct curl_slist *connect_to; /* list of host:port mappings to override
                                     the hostname and port to connect to */
   curl_TimeCond timecondition; /* kind of time/date comparison */
+  curl_proxytype proxytype; /* what kind of proxy that is in use */
   time_t timevalue;       /* what time to compare with */
   Curl_HttpReq method;   /* what kind of HTTP request (if any) is this */
-  long httpversion; /* when non-zero, a specific HTTP version requested to
-                       be used in the library's request(s) */
+  unsigned char httpwant; /* when non-zero, a specific HTTP version requested
+                             to be used in the library's request(s) */
   struct ssl_config_data ssl;  /* user defined SSL stuff */
 #ifndef CURL_DISABLE_PROXY
   struct ssl_config_data proxy_ssl;  /* user defined SSL stuff for proxy */
 #endif
   struct ssl_general_config general_ssl; /* general user defined SSL stuff */
-  curl_proxytype proxytype; /* what kind of proxy that is in use */
   long dns_cache_timeout; /* DNS cache timeout */
   long buffer_size;      /* size of receive buffer to use */
-  size_t upload_buffer_size; /* size of upload buffer to use,
-                                keep it >= CURL_MAX_WRITE_SIZE */
+  unsigned int upload_buffer_size; /* size of upload buffer to use,
+                                      keep it >= CURL_MAX_WRITE_SIZE */
   void *private_data; /* application-private data */
   struct curl_slist *http200aliases; /* linked list of aliases for http200 */
-  long ipver; /* the CURL_IPRESOLVE_* defines in the public header file
-                 0 - whatever, 1 - v2, 2 - v6 */
+  unsigned char ipver; /* the CURL_IPRESOLVE_* defines in the public header
+                          file 0 - whatever, 1 - v2, 2 - v6 */
   curl_off_t max_filesize; /* Maximum file size to download */
 #ifndef CURL_DISABLE_FTP
   curl_ftpfile ftp_filemethod; /* how to get to a file when FTP is used  */
@@ -1713,8 +1729,10 @@
                                */
   curl_sshkeycallback ssh_keyfunc; /* key matching callback */
   void *ssh_keyfunc_userp;         /* custom pointer to callback */
+#ifndef CURL_DISABLE_NETRC
   enum CURL_NETRC_OPTION
        use_netrc;        /* defined in include/curl.h */
+#endif
   curl_usessl use_ssl;   /* if AUTH TLS is to be attempted etc, for FTP or
                             IMAP or POP3 or others! */
   long new_file_perms;    /* Permissions to use when creating remote files */
@@ -1776,8 +1794,8 @@
   BIT(get_filetime);     /* get the time and get of the remote file */
   BIT(tunnel_thru_httpproxy); /* use CONNECT through a HTTP proxy */
   BIT(prefer_ascii);     /* ASCII rather than binary */
-  BIT(ftp_append);       /* append, not overwrite, on upload */
-  BIT(ftp_list_only);    /* switch FTP command for listing directories */
+  BIT(remote_append);    /* append, not overwrite, on upload */
+  BIT(list_only);        /* list directory */
 #ifndef CURL_DISABLE_FTP
   BIT(ftp_use_port);     /* use the FTP PORT command */
   BIT(ftp_use_epsv);     /* if EPSV is to be attempted or not */
@@ -1834,6 +1852,9 @@
   BIT(disallow_username_in_url); /* disallow username in url */
   BIT(doh); /* DNS-over-HTTPS enabled */
   BIT(doh_get); /* use GET for DoH requests, instead of POST */
+  BIT(doh_verifypeer);     /* DoH certificate peer verification */
+  BIT(doh_verifyhost);     /* DoH certificate hostname verification */
+  BIT(doh_verifystatus);   /* DoH certificate status verification */
   BIT(http09_allowed); /* allow HTTP/0.9 responses */
   BIT(mail_rcpt_allowfails); /* allow RCPT TO command to fail for some
                                 recipients */
@@ -1859,6 +1880,10 @@
  */
 
 struct Curl_easy {
+  /* First a simple identifier to easier detect if a user mix up this easy
+     handle with a multi handle. Set this to CURLEASY_MAGIC_NUMBER */
+  unsigned int magic;
+
   /* first, two fields for the linked list of these */
   struct Curl_easy *next;
   struct Curl_easy *prev;
@@ -1877,8 +1902,8 @@
      the state etc are also kept. This array is mostly used to detect when a
      socket is to be removed from the hash. See singlesocket(). */
   curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE];
-  int actions[MAX_SOCKSPEREASYHANDLE]; /* action for each socket in
-                                          sockets[] */
+  unsigned char actions[MAX_SOCKSPEREASYHANDLE]; /* action for each socket in
+                                                    sockets[] */
   int numsocks;
 
   struct Names dns;
@@ -1894,12 +1919,14 @@
 #endif
   struct SingleRequest req;    /* Request-specific data */
   struct UserDefined set;      /* values set by the libcurl user */
-  struct DynamicStatic change; /* possibly modified userdefined data */
   struct CookieInfo *cookies;  /* the cookies, read from files and servers.
                                   NOTE that the 'cookie' field in the
                                   UserDefined struct defines if the "engine"
                                   is to be used or not. */
-#ifdef USE_ALTSVC
+#ifndef CURL_DISABLE_HSTS
+  struct hsts *hsts;
+#endif
+#ifndef CURL_DISABLE_ALTSVC
   struct altsvcinfo *asi;      /* the alt-svc cache */
 #endif
   struct Progress progress;    /* for all the progress meter data */
@@ -1916,7 +1943,9 @@
   iconv_t inbound_cd;          /* for translating from the network encoding */
   iconv_t utf8_cd;             /* for translating to UTF8 */
 #endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-  unsigned int magic;          /* set to a CURLEASY_MAGIC_NUMBER */
+#ifdef USE_HYPER
+  struct hyptransfer hyp;
+#endif
 };
 
 #define LIBCURL_NAME "libcurl"
diff --git a/lib/vauth/cleartext.c b/lib/vauth/cleartext.c
index 3a5c943..d17e16f 100644
--- a/lib/vauth/cleartext.c
+++ b/lib/vauth/cleartext.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,7 +32,6 @@
 #include "urldata.h"
 
 #include "vauth/vauth.h"
-#include "curl_base64.h"
 #include "curl_md5.h"
 #include "warnless.h"
 #include "strtok.h"
@@ -51,31 +50,24 @@
  *
  * Parameters:
  *
- * data    [in]     - The session handle.
  * authzid [in]     - The authorization identity.
  * authcid [in]     - The authentication identity.
  * passwd  [in]     - The password.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_auth_create_plain_message(struct Curl_easy *data,
-                                        const char *authzid,
+CURLcode Curl_auth_create_plain_message(const char *authzid,
                                         const char *authcid,
                                         const char *passwd,
-                                        char **outptr, size_t *outlen)
+                                        struct bufref *out)
 {
-  CURLcode result;
   char *plainauth;
+  size_t plainlen;
   size_t zlen;
   size_t clen;
   size_t plen;
-  size_t plainlen;
 
-  *outlen = 0;
-  *outptr = NULL;
   zlen = (authzid == NULL ? 0 : strlen(authzid));
   clen = strlen(authcid);
   plen = strlen(passwd);
@@ -86,23 +78,20 @@
     return CURLE_OUT_OF_MEMORY;
   plainlen = zlen + clen + plen + 2;
 
-  plainauth = malloc(plainlen);
+  plainauth = malloc(plainlen + 1);
   if(!plainauth)
     return CURLE_OUT_OF_MEMORY;
 
   /* Calculate the reply */
-  if(zlen != 0)
+  if(zlen)
     memcpy(plainauth, authzid, zlen);
   plainauth[zlen] = '\0';
   memcpy(plainauth + zlen + 1, authcid, clen);
   plainauth[zlen + clen + 1] = '\0';
   memcpy(plainauth + zlen + clen + 2, passwd, plen);
-
-  /* Base64 encode the reply */
-  result = Curl_base64_encode(data, plainauth, plainlen, outptr, outlen);
-  free(plainauth);
-
-  return result;
+  plainauth[plainlen] = '\0';
+  Curl_bufref_set(out, plainauth, plainlen, curl_free);
+  return CURLE_OK;
 }
 
 /*
@@ -113,34 +102,15 @@
  *
  * Parameters:
  *
- * data    [in]     - The session handle.
  * valuep  [in]     - The user name or user's password.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_auth_create_login_message(struct Curl_easy *data,
-                                        const char *valuep, char **outptr,
-                                        size_t *outlen)
+CURLcode Curl_auth_create_login_message(const char *valuep, struct bufref *out)
 {
-  size_t vlen = strlen(valuep);
-
-  if(!vlen) {
-    /* Calculate an empty reply */
-    *outptr = strdup("=");
-    if(*outptr) {
-      *outlen = (size_t) 1;
-      return CURLE_OK;
-    }
-
-    *outlen = 0;
-    return CURLE_OUT_OF_MEMORY;
-  }
-
-  /* Base64 encode the value */
-  return Curl_base64_encode(data, valuep, vlen, outptr, outlen);
+  Curl_bufref_set(out, valuep, strlen(valuep), NULL);
+  return CURLE_OK;
 }
 
 /*
@@ -151,20 +121,16 @@
  *
  * Parameters:
  *
- * data    [in]     - The session handle.
  * user    [in]     - The user name.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_auth_create_external_message(struct Curl_easy *data,
-                                           const char *user, char **outptr,
-                                           size_t *outlen)
+CURLcode Curl_auth_create_external_message(const char *user,
+                                           struct bufref *out)
 {
   /* This is the same formatting as the login message */
-  return Curl_auth_create_login_message(data, user, outptr, outlen);
+  return Curl_auth_create_login_message(user, out);
 }
 
 #endif /* if no users */
diff --git a/lib/vauth/cram.c b/lib/vauth/cram.c
index 717d7f0..9ddb0ac 100644
--- a/lib/vauth/cram.c
+++ b/lib/vauth/cram.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,6 @@
 #include "urldata.h"
 
 #include "vauth/vauth.h"
-#include "curl_base64.h"
 #include "curl_hmac.h"
 #include "curl_md5.h"
 #include "warnless.h"
@@ -40,69 +39,31 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
-/*
- * Curl_auth_decode_cram_md5_message()
- *
- * This is used to decode an already encoded CRAM-MD5 challenge message.
- *
- * Parameters:
- *
- * chlg64  [in]     - The base64 encoded challenge message.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
- *
- * Returns CURLE_OK on success.
- */
-CURLcode Curl_auth_decode_cram_md5_message(const char *chlg64, char **outptr,
-                                           size_t *outlen)
-{
-  CURLcode result = CURLE_OK;
-  size_t chlg64len = strlen(chlg64);
-
-  *outptr = NULL;
-  *outlen = 0;
-
-  /* Decode the challenge if necessary */
-  if(chlg64len && *chlg64 != '=')
-    result = Curl_base64_decode(chlg64, (unsigned char **) outptr, outlen);
-
-  return result;
-}
 
 /*
  * Curl_auth_create_cram_md5_message()
  *
- * This is used to generate an already encoded CRAM-MD5 response message ready
- * for sending to the recipient.
+ * This is used to generate a CRAM-MD5 response message ready for sending to
+ * the recipient.
  *
  * Parameters:
  *
- * data    [in]     - The session handle.
  * chlg    [in]     - The challenge.
  * userp   [in]     - The user name.
  * passwdp [in]     - The user's password.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_auth_create_cram_md5_message(struct Curl_easy *data,
-                                           const char *chlg,
+CURLcode Curl_auth_create_cram_md5_message(const struct bufref *chlg,
                                            const char *userp,
                                            const char *passwdp,
-                                           char **outptr, size_t *outlen)
+                                           struct bufref *out)
 {
-  CURLcode result = CURLE_OK;
-  size_t chlglen = 0;
   struct HMAC_context *ctxt;
   unsigned char digest[MD5_DIGEST_LEN];
   char *response;
 
-  if(chlg)
-    chlglen = strlen(chlg);
-
   /* Compute the digest using the password as the key */
   ctxt = Curl_HMAC_init(Curl_HMAC_MD5,
                         (const unsigned char *) passwdp,
@@ -111,9 +72,9 @@
     return CURLE_OUT_OF_MEMORY;
 
   /* Update the digest with the given challenge */
-  if(chlglen > 0)
-    Curl_HMAC_update(ctxt, (const unsigned char *) chlg,
-                     curlx_uztoui(chlglen));
+  if(Curl_bufref_len(chlg))
+    Curl_HMAC_update(ctxt, Curl_bufref_ptr(chlg),
+                     curlx_uztoui(Curl_bufref_len(chlg)));
 
   /* Finalise the digest */
   Curl_HMAC_final(ctxt, digest);
@@ -127,12 +88,8 @@
   if(!response)
     return CURLE_OUT_OF_MEMORY;
 
-  /* Base64 encode the response */
-  result = Curl_base64_encode(data, response, 0, outptr, outlen);
-
-  free(response);
-
-  return result;
+  Curl_bufref_set(out, response, strlen(response), curl_free);
+  return CURLE_OK;
 }
 
 #endif /* !CURL_DISABLE_CRYPTO_AUTH */
diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c
index b9210a8..a04ffab 100644
--- a/lib/vauth/digest.c
+++ b/lib/vauth/digest.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -61,12 +61,14 @@
    It converts digest text to ASCII so the MD5 will be correct for
    what ultimately goes over the network.
 */
-#define CURL_OUTPUT_DIGEST_CONV(a, b) \
-  result = Curl_convert_to_network(a, b, strlen(b)); \
-  if(result) { \
-    free(b); \
-    return result; \
-  }
+#define CURL_OUTPUT_DIGEST_CONV(a, b)                  \
+  do {                                                 \
+    result = Curl_convert_to_network(a, b, strlen(b)); \
+    if(result) {                                       \
+      free(b);                                         \
+      return result;                                   \
+    }                                                  \
+  } while(0)
 #endif /* !USE_WINDOWS_SSPI */
 
 bool Curl_auth_digest_get_pair(const char *str, char *value, char *content,
@@ -252,7 +254,7 @@
  *
  * Parameters:
  *
- * chlg64  [in]     - The base64 encoded challenge message.
+ * chlgref [in]     - The challenge message.
  * nonce   [in/out] - The buffer where the nonce will be stored.
  * nlen    [in]     - The length of the nonce buffer.
  * realm   [in/out] - The buffer where the realm will be stored.
@@ -264,55 +266,35 @@
  *
  * Returns CURLE_OK on success.
  */
-static CURLcode auth_decode_digest_md5_message(const char *chlg64,
+static CURLcode auth_decode_digest_md5_message(const struct bufref *chlgref,
                                                char *nonce, size_t nlen,
                                                char *realm, size_t rlen,
                                                char *alg, size_t alen,
                                                char *qop, size_t qlen)
 {
-  CURLcode result = CURLE_OK;
-  unsigned char *chlg = NULL;
-  size_t chlglen = 0;
-  size_t chlg64len = strlen(chlg64);
-
-  /* Decode the base-64 encoded challenge message */
-  if(chlg64len && *chlg64 != '=') {
-    result = Curl_base64_decode(chlg64, &chlg, &chlglen);
-    if(result)
-      return result;
-  }
+  const char *chlg = (const char *) Curl_bufref_ptr(chlgref);
 
   /* Ensure we have a valid challenge message */
-  if(!chlg)
+  if(!Curl_bufref_len(chlgref))
     return CURLE_BAD_CONTENT_ENCODING;
 
   /* Retrieve nonce string from the challenge */
-  if(!auth_digest_get_key_value((char *) chlg, "nonce=\"", nonce, nlen,
-                                '\"')) {
-    free(chlg);
+  if(!auth_digest_get_key_value(chlg, "nonce=\"", nonce, nlen, '\"'))
     return CURLE_BAD_CONTENT_ENCODING;
-  }
 
   /* Retrieve realm string from the challenge */
-  if(!auth_digest_get_key_value((char *) chlg, "realm=\"", realm, rlen,
-                                '\"')) {
+  if(!auth_digest_get_key_value(chlg, "realm=\"", realm, rlen, '\"')) {
     /* Challenge does not have a realm, set empty string [RFC2831] page 6 */
     strcpy(realm, "");
   }
 
   /* Retrieve algorithm string from the challenge */
-  if(!auth_digest_get_key_value((char *) chlg, "algorithm=", alg, alen, ',')) {
-    free(chlg);
+  if(!auth_digest_get_key_value(chlg, "algorithm=", alg, alen, ','))
     return CURLE_BAD_CONTENT_ENCODING;
-  }
 
   /* Retrieve qop-options string from the challenge */
-  if(!auth_digest_get_key_value((char *) chlg, "qop=\"", qop, qlen, '\"')) {
-    free(chlg);
+  if(!auth_digest_get_key_value(chlg, "qop=\"", qop, qlen, '\"'))
     return CURLE_BAD_CONTENT_ENCODING;
-  }
-
-  free(chlg);
 
   return CURLE_OK;
 }
@@ -340,22 +322,20 @@
  * Parameters:
  *
  * data    [in]     - The session handle.
- * chlg64  [in]     - The base64 encoded challenge message.
+ * chlg    [in]     - The challenge message.
  * userp   [in]     - The user name.
  * passwdp [in]     - The user's password.
  * service [in]     - The service type such as http, smtp, pop or imap.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
-                                             const char *chlg64,
+                                             const struct bufref *chlg,
                                              const char *userp,
                                              const char *passwdp,
                                              const char *service,
-                                             char **outptr, size_t *outlen)
+                                             struct bufref *out)
 {
   size_t i;
   struct MD5_context *ctxt;
@@ -376,9 +356,10 @@
   char *spn         = NULL;
 
   /* Decode the challenge message */
-  CURLcode result = auth_decode_digest_md5_message(chlg64, nonce,
-                                                   sizeof(nonce), realm,
-                                                   sizeof(realm), algorithm,
+  CURLcode result = auth_decode_digest_md5_message(chlg,
+                                                   nonce, sizeof(nonce),
+                                                   realm, sizeof(realm),
+                                                   algorithm,
                                                    sizeof(algorithm),
                                                    qop_options,
                                                    sizeof(qop_options));
@@ -498,11 +479,8 @@
   if(!response)
     return CURLE_OUT_OF_MEMORY;
 
-  /* Base64 encode the response */
-  result = Curl_base64_encode(data, response, 0, outptr, outlen);
-
-  free(response);
-
+  /* Return the response. */
+  Curl_bufref_set(out, response, strlen(response), curl_free);
   return result;
 }
 
diff --git a/lib/vauth/digest.h b/lib/vauth/digest.h
index cc05fdb..ee373cd 100644
--- a/lib/vauth/digest.h
+++ b/lib/vauth/digest.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c
index 4998306..94f8f8c 100644
--- a/lib/vauth/digest_sspi.c
+++ b/lib/vauth/digest_sspi.c
@@ -6,11 +6,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2014 - 2016, Steve Holme, <steve_holme@hotmail.com>.
- * Copyright (C) 2015 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2015 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,12 +32,12 @@
 #include "vauth/vauth.h"
 #include "vauth/digest.h"
 #include "urldata.h"
-#include "curl_base64.h"
 #include "warnless.h"
 #include "curl_multibyte.h"
 #include "sendf.h"
 #include "strdup.h"
 #include "strcase.h"
+#include "strerror.h"
 
 /* The last #include files should be: */
 #include "curl_memory.h"
@@ -78,28 +78,24 @@
  * Parameters:
  *
  * data    [in]     - The session handle.
- * chlg64  [in]     - The base64 encoded challenge message.
+ * chlg    [in]     - The challenge message.
  * userp   [in]     - The user name in the format User or Domain\User.
  * passwdp [in]     - The user's password.
  * service [in]     - The service type such as http, smtp, pop or imap.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
-                                             const char *chlg64,
+                                             const struct bufref *chlg,
                                              const char *userp,
                                              const char *passwdp,
                                              const char *service,
-                                             char **outptr, size_t *outlen)
+                                             struct bufref *out)
 {
   CURLcode result = CURLE_OK;
   TCHAR *spn = NULL;
-  size_t chlglen = 0;
   size_t token_max = 0;
-  unsigned char *input_token = NULL;
   unsigned char *output_token = NULL;
   CredHandle credentials;
   CtxtHandle context;
@@ -114,17 +110,9 @@
   unsigned long attrs;
   TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
 
-  /* Decode the base-64 encoded challenge message */
-  if(strlen(chlg64) && *chlg64 != '=') {
-    result = Curl_base64_decode(chlg64, &input_token, &chlglen);
-    if(result)
-      return result;
-  }
-
   /* Ensure we have a valid challenge message */
-  if(!input_token) {
-    infof(data, "DIGEST-MD5 handshake failure (empty challenge message)\n");
-
+  if(!Curl_bufref_len(chlg)) {
+    infof(data, "DIGEST-MD5 handshake failure (empty challenge message)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
@@ -132,9 +120,7 @@
   status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
                                               &SecurityPackage);
   if(status != SEC_E_OK) {
-    free(input_token);
-
-    failf(data, "SSPI: couldn't get auth info\n");
+    failf(data, "SSPI: couldn't get auth info");
     return CURLE_AUTH_ERROR;
   }
 
@@ -145,18 +131,13 @@
 
   /* Allocate our response buffer */
   output_token = malloc(token_max);
-  if(!output_token) {
-    free(input_token);
-
+  if(!output_token)
     return CURLE_OUT_OF_MEMORY;
-  }
 
   /* Generate our SPN */
   spn = Curl_auth_build_spn(service, data->conn->host.name, NULL);
   if(!spn) {
     free(output_token);
-    free(input_token);
-
     return CURLE_OUT_OF_MEMORY;
   }
 
@@ -166,8 +147,6 @@
     if(result) {
       free(spn);
       free(output_token);
-      free(input_token);
-
       return result;
     }
 
@@ -189,8 +168,6 @@
     Curl_sspi_free_identity(p_identity);
     free(spn);
     free(output_token);
-    free(input_token);
-
     return CURLE_LOGIN_DENIED;
   }
 
@@ -199,8 +176,8 @@
   chlg_desc.cBuffers  = 1;
   chlg_desc.pBuffers  = &chlg_buf;
   chlg_buf.BufferType = SECBUFFER_TOKEN;
-  chlg_buf.pvBuffer   = input_token;
-  chlg_buf.cbBuffer   = curlx_uztoul(chlglen);
+  chlg_buf.pvBuffer   = (void *) Curl_bufref_ptr(chlg);
+  chlg_buf.cbBuffer   = curlx_uztoul(Curl_bufref_len(chlg));
 
   /* Setup the response "output" security buffer */
   resp_desc.ulVersion = SECBUFFER_VERSION;
@@ -220,21 +197,26 @@
      status == SEC_I_COMPLETE_AND_CONTINUE)
     s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
   else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
+    char buffer[STRERROR_LEN];
+#endif
+
     s_pSecFn->FreeCredentialsHandle(&credentials);
     Curl_sspi_free_identity(p_identity);
     free(spn);
     free(output_token);
-    free(input_token);
 
     if(status == SEC_E_INSUFFICIENT_MEMORY)
       return CURLE_OUT_OF_MEMORY;
 
+    infof(data, "schannel: InitializeSecurityContext failed: %s",
+          Curl_sspi_strerror(status, buffer, sizeof(buffer)));
+
     return CURLE_AUTH_ERROR;
   }
 
-  /* Base64 encode the response */
-  result = Curl_base64_encode(data, (char *) output_token, resp_buf.cbBuffer,
-                              outptr, outlen);
+  /* Return the response. */
+  Curl_bufref_set(out, output_token, resp_buf.cbBuffer, curl_free);
 
   /* Free our handles */
   s_pSecFn->DeleteSecurityContext(&context);
@@ -246,12 +228,6 @@
   /* Free the SPN */
   free(spn);
 
-  /* Free the response buffer */
-  free(output_token);
-
-  /* Free the decoded challenge message */
-  free(input_token);
-
   return result;
 }
 
@@ -433,7 +409,7 @@
   status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
                                               &SecurityPackage);
   if(status != SEC_E_OK) {
-    failf(data, "SSPI: couldn't get auth info\n");
+    failf(data, "SSPI: couldn't get auth info");
     return CURLE_AUTH_ERROR;
   }
 
@@ -487,7 +463,7 @@
     if(status == SEC_E_OK)
       output_token_len = chlg_buf[4].cbBuffer;
     else { /* delete the context so a new one can be made */
-      infof(data, "digest_sspi: MakeSignature failed, error 0x%08lx\n",
+      infof(data, "digest_sspi: MakeSignature failed, error 0x%08lx",
             (long)status);
       s_pSecFn->DeleteSecurityContext(digest->http_context);
       Curl_safefree(digest->http_context);
@@ -611,6 +587,10 @@
        status == SEC_I_COMPLETE_AND_CONTINUE)
       s_pSecFn->CompleteAuthToken(&credentials, &resp_desc);
     else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
+      char buffer[STRERROR_LEN];
+#endif
+
       s_pSecFn->FreeCredentialsHandle(&credentials);
 
       Curl_sspi_free_identity(p_identity);
@@ -621,6 +601,9 @@
       if(status == SEC_E_INSUFFICIENT_MEMORY)
         return CURLE_OUT_OF_MEMORY;
 
+      infof(data, "schannel: InitializeSecurityContext failed: %s",
+            Curl_sspi_strerror(status, buffer, sizeof(buffer)));
+
       return CURLE_AUTH_ERROR;
     }
 
diff --git a/lib/vauth/gsasl.c b/lib/vauth/gsasl.c
new file mode 100644
index 0000000..40fef53
--- /dev/null
+++ b/lib/vauth/gsasl.c
@@ -0,0 +1,124 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020 - 2021, Simon Josefsson, <simon@josefsson.org>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * RFC5802 SCRAM-SHA-1 authentication
+ *
+ ***************************************************************************/
+
+#include "curl_setup.h"
+
+#ifdef USE_GSASL
+
+#include <curl/curl.h>
+
+#include "vauth/vauth.h"
+#include "urldata.h"
+#include "sendf.h"
+
+#include <gsasl.h>
+
+/* The last #include files should be: */
+#include "curl_memory.h"
+#include "memdebug.h"
+
+bool Curl_auth_gsasl_is_supported(struct Curl_easy *data,
+                                  const char *mech,
+                                  struct gsasldata *gsasl)
+{
+  int res;
+
+  res = gsasl_init(&gsasl->ctx);
+  if(res != GSASL_OK) {
+    failf(data, "gsasl init: %s\n", gsasl_strerror(res));
+    return FALSE;
+  }
+
+  res = gsasl_client_start(gsasl->ctx, mech, &gsasl->client);
+  if(res != GSASL_OK) {
+    gsasl_done(gsasl->ctx);
+    return FALSE;
+  }
+
+  return true;
+}
+
+CURLcode Curl_auth_gsasl_start(struct Curl_easy *data,
+                               const char *userp,
+                               const char *passwdp,
+                               struct gsasldata *gsasl)
+{
+#if GSASL_VERSION_NUMBER >= 0x010b00
+  int res;
+  res =
+#endif
+    gsasl_property_set(gsasl->client, GSASL_AUTHID, userp);
+#if GSASL_VERSION_NUMBER >= 0x010b00
+  if(res != GSASL_OK) {
+    failf(data, "setting AUTHID failed: %s\n", gsasl_strerror(res));
+    return CURLE_OUT_OF_MEMORY;
+  }
+#endif
+
+#if GSASL_VERSION_NUMBER >= 0x010b00
+  res =
+#endif
+    gsasl_property_set(gsasl->client, GSASL_PASSWORD, passwdp);
+#if GSASL_VERSION_NUMBER >= 0x010b00
+  if(res != GSASL_OK) {
+    failf(data, "setting PASSWORD failed: %s\n", gsasl_strerror(res));
+    return CURLE_OUT_OF_MEMORY;
+  }
+#endif
+
+  (void)data;
+
+  return CURLE_OK;
+}
+
+CURLcode Curl_auth_gsasl_token(struct Curl_easy *data,
+                               const struct bufref *chlg,
+                               struct gsasldata *gsasl,
+                               struct bufref *out)
+{
+  int res;
+  char *response;
+  size_t outlen;
+
+  res = gsasl_step(gsasl->client,
+                   (const char *) Curl_bufref_ptr(chlg), Curl_bufref_len(chlg),
+                   &response, &outlen);
+  if(res != GSASL_OK && res != GSASL_NEEDS_MORE) {
+    failf(data, "GSASL step: %s\n", gsasl_strerror(res));
+    return CURLE_BAD_CONTENT_ENCODING;
+  }
+
+  Curl_bufref_set(out, response, outlen, gsasl_free);
+  return CURLE_OK;
+}
+
+void Curl_auth_gsasl_cleanup(struct gsasldata *gsasl)
+{
+  gsasl_finish(gsasl->client);
+  gsasl->client = NULL;
+
+  gsasl_done(gsasl->ctx);
+  gsasl->ctx = NULL;
+}
+#endif
diff --git a/lib/vauth/krb5_gssapi.c b/lib/vauth/krb5_gssapi.c
index 95bab0e..fee24ee 100644
--- a/lib/vauth/krb5_gssapi.c
+++ b/lib/vauth/krb5_gssapi.c
@@ -6,11 +6,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2014 - 2019, Steve Holme, <steve_holme@hotmail.com>.
- * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2015 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,7 +32,6 @@
 #include "vauth/vauth.h"
 #include "curl_sasl.h"
 #include "urldata.h"
-#include "curl_base64.h"
 #include "curl_gssapi.h"
 #include "sendf.h"
 #include "curl_printf.h"
@@ -70,12 +69,9 @@
  * host        [in[     - The host name.
  * mutual_auth [in]     - Flag specifying whether or not mutual authentication
  *                        is enabled.
- * chlg64      [in]     - Pointer to the optional base64 encoded challenge
- *                        message.
+ * chlg        [in]     - Optional challenge message.
  * krb5        [in/out] - The Kerberos 5 data struct being used and modified.
- * outptr      [in/out] - The address where a pointer to newly allocated memory
- *                        holding the result will be stored upon completion.
- * outlen      [out]    - The length of the output message.
+ * out         [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
@@ -85,13 +81,11 @@
                                               const char *service,
                                               const char *host,
                                               const bool mutual_auth,
-                                              const char *chlg64,
+                                              const struct bufref *chlg,
                                               struct kerberos5data *krb5,
-                                              char **outptr, size_t *outlen)
+                                              struct bufref *out)
 {
   CURLcode result = CURLE_OK;
-  size_t chlglen = 0;
-  unsigned char *chlg = NULL;
   OM_uint32 major_status;
   OM_uint32 minor_status;
   OM_uint32 unused_status;
@@ -127,24 +121,13 @@
     free(spn);
   }
 
-  if(chlg64 && *chlg64) {
-    /* Decode the base-64 encoded challenge message */
-    if(*chlg64 != '=') {
-      result = Curl_base64_decode(chlg64, &chlg, &chlglen);
-      if(result)
-        return result;
-    }
-
-    /* Ensure we have a valid challenge message */
-    if(!chlg) {
-      infof(data, "GSSAPI handshake failure (empty challenge message)\n");
-
+  if(chlg) {
+    if(!Curl_bufref_len(chlg)) {
+      infof(data, "GSSAPI handshake failure (empty challenge message)");
       return CURLE_BAD_CONTENT_ENCODING;
     }
-
-    /* Setup the challenge "input" security buffer */
-    input_token.value = chlg;
-    input_token.length = chlglen;
+    input_token.value = (void *) Curl_bufref_ptr(chlg);
+    input_token.length = Curl_bufref_len(chlg);
   }
 
   major_status = Curl_gss_init_sec_context(data,
@@ -158,9 +141,6 @@
                                            mutual_auth,
                                            NULL);
 
-  /* Free the decoded challenge as it is not required anymore */
-  free(input_token.value);
-
   if(GSS_ERROR(major_status)) {
     if(output_token.value)
       gss_release_buffer(&unused_status, &output_token);
@@ -172,17 +152,11 @@
   }
 
   if(output_token.value && output_token.length) {
-    /* Base64 encode the response */
-    result = Curl_base64_encode(data, (char *) output_token.value,
-                                output_token.length, outptr, outlen);
-
+    result = Curl_bufref_memdup(out, output_token.value, output_token.length);
     gss_release_buffer(&unused_status, &output_token);
   }
-  else if(mutual_auth) {
-    *outptr = strdup("");
-    if(!*outptr)
-      result = CURLE_OUT_OF_MEMORY;
-  }
+  else
+    Curl_bufref_set(out, mutual_auth? "": NULL, 0, NULL);
 
   return result;
 }
@@ -196,24 +170,19 @@
  * Parameters:
  *
  * data    [in]     - The session handle.
- * chlg64  [in]     - Pointer to the optional base64 encoded challenge message.
+ * chlg    [in]     - Optional challenge message.
  * krb5    [in/out] - The Kerberos 5 data struct being used and modified.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
-                                                  const char *chlg64,
+                                                  const struct bufref *chlg,
                                                   struct kerberos5data *krb5,
-                                                  char **outptr,
-                                                  size_t *outlen)
+                                                  struct bufref *out)
 {
   CURLcode result = CURLE_OK;
-  size_t chlglen = 0;
   size_t messagelen = 0;
-  unsigned char *chlg = NULL;
   unsigned char *message = NULL;
   OM_uint32 major_status;
   OM_uint32 minor_status;
@@ -228,17 +197,9 @@
   gss_name_t username = GSS_C_NO_NAME;
   gss_buffer_desc username_token;
 
-  /* Decode the base-64 encoded input message */
-  if(strlen(chlg64) && *chlg64 != '=') {
-    result = Curl_base64_decode(chlg64, &chlg, &chlglen);
-    if(result)
-      return result;
-  }
-
   /* Ensure we have a valid challenge message */
-  if(!chlg) {
-    infof(data, "GSSAPI handshake failure (empty security message)\n");
-
+  if(!Curl_bufref_len(chlg)) {
+    infof(data, "GSSAPI handshake failure (empty security message)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
@@ -249,9 +210,6 @@
   if(GSS_ERROR(major_status)) {
     Curl_gss_log_error(data, "gss_inquire_context() failed: ",
                        major_status, minor_status);
-
-    free(chlg);
-
     return CURLE_AUTH_ERROR;
   }
 
@@ -261,15 +219,12 @@
   if(GSS_ERROR(major_status)) {
     Curl_gss_log_error(data, "gss_display_name() failed: ",
                        major_status, minor_status);
-
-    free(chlg);
-
     return CURLE_AUTH_ERROR;
   }
 
   /* Setup the challenge "input" security buffer */
-  input_token.value = chlg;
-  input_token.length = chlglen;
+  input_token.value = (void *) Curl_bufref_ptr(chlg);
+  input_token.length = Curl_bufref_len(chlg);
 
   /* Decrypt the inbound challenge and obtain the qop */
   major_status = gss_unwrap(&minor_status, krb5->context, &input_token,
@@ -277,35 +232,27 @@
   if(GSS_ERROR(major_status)) {
     Curl_gss_log_error(data, "gss_unwrap() failed: ",
                        major_status, minor_status);
-
     gss_release_buffer(&unused_status, &username_token);
-    free(chlg);
-
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
   /* Not 4 octets long so fail as per RFC4752 Section 3.1 */
   if(output_token.length != 4) {
-    infof(data, "GSSAPI handshake failure (invalid security data)\n");
-
+    infof(data, "GSSAPI handshake failure (invalid security data)");
     gss_release_buffer(&unused_status, &username_token);
-    free(chlg);
-
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
   /* Copy the data out and free the challenge as it is not required anymore */
   memcpy(&indata, output_token.value, 4);
   gss_release_buffer(&unused_status, &output_token);
-  free(chlg);
 
   /* Extract the security layer */
   sec_layer = indata & 0x000000FF;
   if(!(sec_layer & GSSAUTH_P_NONE)) {
-    infof(data, "GSSAPI handshake failure (invalid security layer)\n");
+    infof(data, "GSSAPI handshake failure (invalid security layer)");
 
     gss_release_buffer(&unused_status, &username_token);
-
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
@@ -323,7 +270,6 @@
   message = malloc(messagelen);
   if(!message) {
     gss_release_buffer(&unused_status, &username_token);
-
     return CURLE_OUT_OF_MEMORY;
   }
 
@@ -352,16 +298,12 @@
   if(GSS_ERROR(major_status)) {
     Curl_gss_log_error(data, "gss_wrap() failed: ",
                        major_status, minor_status);
-
     free(message);
-
     return CURLE_AUTH_ERROR;
   }
 
-  /* Base64 encode the response */
-  result = Curl_base64_encode(data, (char *) output_token.value,
-                              output_token.length, outptr, outlen);
-
+  /* Return the response. */
+  result = Curl_bufref_memdup(out, output_token.value, output_token.length);
   /* Free the output buffer */
   gss_release_buffer(&unused_status, &output_token);
 
diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c
index 1fb6257..8f7a2b0 100644
--- a/lib/vauth/krb5_sspi.c
+++ b/lib/vauth/krb5_sspi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2014 - 2020, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2014 - 2021, Steve Holme, <steve_holme@hotmail.com>.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,6 @@
 
 #include "vauth/vauth.h"
 #include "urldata.h"
-#include "curl_base64.h"
 #include "warnless.h"
 #include "curl_multibyte.h"
 #include "sendf.h"
@@ -81,11 +80,9 @@
  * host        [in]     - The host name.
  * mutual_auth [in]     - Flag specifying whether or not mutual authentication
  *                        is enabled.
- * chlg64      [in]     - The optional base64 encoded challenge message.
+ * chlg        [in]     - Optional challenge message.
  * krb5        [in/out] - The Kerberos 5 data struct being used and modified.
- * outptr      [in/out] - The address where a pointer to newly allocated memory
- *                        holding the result will be stored upon completion.
- * outlen      [out]    - The length of the output message.
+ * out         [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
@@ -95,13 +92,11 @@
                                               const char *service,
                                               const char *host,
                                               const bool mutual_auth,
-                                              const char *chlg64,
+                                              const struct bufref *chlg,
                                               struct kerberos5data *krb5,
-                                              char **outptr, size_t *outlen)
+                                              struct bufref *out)
 {
   CURLcode result = CURLE_OK;
-  size_t chlglen = 0;
-  unsigned char *chlg = NULL;
   CtxtHandle context;
   PSecPkgInfo SecurityPackage;
   SecBuffer chlg_buf;
@@ -125,7 +120,7 @@
                                                 TEXT(SP_NAME_KERBEROS),
                                                 &SecurityPackage);
     if(status != SEC_E_OK) {
-      failf(data, "SSPI: couldn't get auth info\n");
+      failf(data, "SSPI: couldn't get auth info");
       return CURLE_AUTH_ERROR;
     }
 
@@ -176,18 +171,9 @@
       return CURLE_OUT_OF_MEMORY;
   }
 
-  if(chlg64 && *chlg64) {
-    /* Decode the base-64 encoded challenge message */
-    if(*chlg64 != '=') {
-      result = Curl_base64_decode(chlg64, &chlg, &chlglen);
-      if(result)
-        return result;
-    }
-
-    /* Ensure we have a valid challenge message */
-    if(!chlg) {
-      infof(data, "GSSAPI handshake failure (empty challenge message)\n");
-
+  if(chlg) {
+    if(!Curl_bufref_len(chlg)) {
+      infof(data, "GSSAPI handshake failure (empty challenge message)");
       return CURLE_BAD_CONTENT_ENCODING;
     }
 
@@ -196,8 +182,8 @@
     chlg_desc.cBuffers  = 1;
     chlg_desc.pBuffers  = &chlg_buf;
     chlg_buf.BufferType = SECBUFFER_TOKEN;
-    chlg_buf.pvBuffer   = chlg;
-    chlg_buf.cbBuffer   = curlx_uztoul(chlglen);
+    chlg_buf.pvBuffer   = (void *) Curl_bufref_ptr(chlg);
+    chlg_buf.cbBuffer   = curlx_uztoul(Curl_bufref_len(chlg));
   }
 
   /* Setup the response "output" security buffer */
@@ -220,16 +206,11 @@
                                                &resp_desc, &attrs,
                                                &expiry);
 
-  /* Free the decoded challenge as it is not required anymore */
-  free(chlg);
-
-  if(status == SEC_E_INSUFFICIENT_MEMORY) {
+  if(status == SEC_E_INSUFFICIENT_MEMORY)
     return CURLE_OUT_OF_MEMORY;
-  }
 
-  if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
+  if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED)
     return CURLE_AUTH_ERROR;
-  }
 
   if(memcmp(&context, krb5->context, sizeof(context))) {
     s_pSecFn->DeleteSecurityContext(krb5->context);
@@ -238,15 +219,12 @@
   }
 
   if(resp_buf.cbBuffer) {
-    /* Base64 encode the response */
-    result = Curl_base64_encode(data, (char *) resp_buf.pvBuffer,
-                                resp_buf.cbBuffer, outptr, outlen);
+    result = Curl_bufref_memdup(out, resp_buf.pvBuffer, resp_buf.cbBuffer);
   }
-  else if(mutual_auth) {
-    *outptr = strdup("");
-    if(!*outptr)
-      result = CURLE_OUT_OF_MEMORY;
-  }
+  else if(mutual_auth)
+    Curl_bufref_set(out, "", 0, NULL);
+  else
+    Curl_bufref_set(out, NULL, 0, NULL);
 
   return result;
 }
@@ -260,26 +238,20 @@
  * Parameters:
  *
  * data    [in]     - The session handle.
- * chlg64  [in]     - The optional base64 encoded challenge message.
+ * chlg     [in]     - The optional challenge message.
  * krb5    [in/out] - The Kerberos 5 data struct being used and modified.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
-                                                  const char *chlg64,
+                                                  const struct bufref *chlg,
                                                   struct kerberos5data *krb5,
-                                                  char **outptr,
-                                                  size_t *outlen)
+                                                  struct bufref *out)
 {
-  CURLcode result = CURLE_OK;
   size_t offset = 0;
-  size_t chlglen = 0;
   size_t messagelen = 0;
   size_t appdatalen = 0;
-  unsigned char *chlg = NULL;
   unsigned char *trailer = NULL;
   unsigned char *message = NULL;
   unsigned char *padding = NULL;
@@ -298,17 +270,13 @@
   SECURITY_STATUS status;
   char *user_name;
 
-  /* Decode the base-64 encoded input message */
-  if(strlen(chlg64) && *chlg64 != '=') {
-    result = Curl_base64_decode(chlg64, &chlg, &chlglen);
-    if(result)
-      return result;
-  }
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
+  (void) data;
+#endif
 
   /* Ensure we have a valid challenge message */
-  if(!chlg) {
-    infof(data, "GSSAPI handshake failure (empty security message)\n");
-
+  if(!Curl_bufref_len(chlg)) {
+    infof(data, "GSSAPI handshake failure (empty security message)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
@@ -316,35 +284,31 @@
   status = s_pSecFn->QueryContextAttributes(krb5->context,
                                             SECPKG_ATTR_SIZES,
                                             &sizes);
-  if(status != SEC_E_OK) {
-    free(chlg);
 
-    if(status == SEC_E_INSUFFICIENT_MEMORY)
-      return CURLE_OUT_OF_MEMORY;
+  if(status == SEC_E_INSUFFICIENT_MEMORY)
+    return CURLE_OUT_OF_MEMORY;
 
+  if(status != SEC_E_OK)
     return CURLE_AUTH_ERROR;
-  }
 
   /* Get the fully qualified username back from the context */
   status = s_pSecFn->QueryCredentialsAttributes(krb5->credentials,
                                                 SECPKG_CRED_ATTR_NAMES,
                                                 &names);
-  if(status != SEC_E_OK) {
-    free(chlg);
 
-    if(status == SEC_E_INSUFFICIENT_MEMORY)
-      return CURLE_OUT_OF_MEMORY;
+  if(status == SEC_E_INSUFFICIENT_MEMORY)
+    return CURLE_OUT_OF_MEMORY;
 
+  if(status != SEC_E_OK)
     return CURLE_AUTH_ERROR;
-  }
 
   /* Setup the "input" security buffer */
   input_desc.ulVersion = SECBUFFER_VERSION;
   input_desc.cBuffers = 2;
   input_desc.pBuffers = input_buf;
   input_buf[0].BufferType = SECBUFFER_STREAM;
-  input_buf[0].pvBuffer = chlg;
-  input_buf[0].cbBuffer = curlx_uztoul(chlglen);
+  input_buf[0].pvBuffer = (void *) Curl_bufref_ptr(chlg);
+  input_buf[0].cbBuffer = curlx_uztoul(Curl_bufref_len(chlg));
   input_buf[1].BufferType = SECBUFFER_DATA;
   input_buf[1].pvBuffer = NULL;
   input_buf[1].cbBuffer = 0;
@@ -352,32 +316,24 @@
   /* Decrypt the inbound challenge and obtain the qop */
   status = s_pSecFn->DecryptMessage(krb5->context, &input_desc, 0, &qop);
   if(status != SEC_E_OK) {
-    infof(data, "GSSAPI handshake failure (empty security message)\n");
-
-    free(chlg);
-
+    infof(data, "GSSAPI handshake failure (empty security message)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
   /* Not 4 octets long so fail as per RFC4752 Section 3.1 */
   if(input_buf[1].cbBuffer != 4) {
-    infof(data, "GSSAPI handshake failure (invalid security data)\n");
-
-    free(chlg);
-
+    infof(data, "GSSAPI handshake failure (invalid security data)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
   /* Copy the data out and free the challenge as it is not required anymore */
   memcpy(&indata, input_buf[1].pvBuffer, 4);
   s_pSecFn->FreeContextBuffer(input_buf[1].pvBuffer);
-  free(chlg);
 
   /* Extract the security layer */
   sec_layer = indata & 0x000000FF;
   if(!(sec_layer & KERB_WRAP_NO_ENCRYPT)) {
-    infof(data, "GSSAPI handshake failure (invalid security layer)\n");
-
+    infof(data, "GSSAPI handshake failure (invalid security layer)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
@@ -479,17 +435,14 @@
   offset += wrap_buf[1].cbBuffer;
   memcpy(appdata + offset, wrap_buf[2].pvBuffer, wrap_buf[2].cbBuffer);
 
-  /* Base64 encode the response */
-  result = Curl_base64_encode(data, (char *) appdata, appdatalen, outptr,
-                              outlen);
-
   /* Free all of our local buffers */
-  free(appdata);
   free(padding);
   free(message);
   free(trailer);
 
-  return result;
+  /* Return the response. */
+  Curl_bufref_set(out, appdata, appdatalen, curl_free);
+  return CURLE_OK;
 }
 
 /*
diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c
index ecfeacb..0aa3f1c 100644
--- a/lib/vauth/ntlm.c
+++ b/lib/vauth/ntlm.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,7 +36,6 @@
 #include "urldata.h"
 #include "non-ascii.h"
 #include "sendf.h"
-#include "curl_base64.h"
 #include "curl_ntlm_core.h"
 #include "curl_gethostname.h"
 #include "curl_multibyte.h"
@@ -64,10 +63,6 @@
 /* "NTLMSSP" signature is always in ASCII regardless of the platform */
 #define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
 
-#define SHORTPAIR(x) ((int)((x) & 0xff)), ((int)(((x) >> 8) & 0xff))
-#define LONGQUARTET(x) ((int)((x) & 0xff)), ((int)(((x) >> 8) & 0xff)), \
-  ((int)(((x) >> 16) & 0xff)), ((int)(((x) >> 24) & 0xff))
-
 #if DEBUG_ME
 # define DEBUG_OUT(x) x
 static void ntlm_print_flags(FILE *handle, unsigned long flags)
@@ -161,33 +156,33 @@
  * Parameters:
  *
  * data      [in]     - The session handle.
- * buffer    [in]     - The decoded type-2 message.
- * size      [in]     - The input buffer size, at least 32 bytes.
+ * type2ref  [in]     - The type-2 message.
  * ntlm      [in/out] - The NTLM data struct being used and modified.
  *
  * Returns CURLE_OK on success.
  */
 static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
-                                         unsigned char *buffer,
-                                         size_t size,
+                                         const struct bufref *type2ref,
                                          struct ntlmdata *ntlm)
 {
   unsigned short target_info_len = 0;
   unsigned int target_info_offset = 0;
+  const unsigned char *type2 = Curl_bufref_ptr(type2ref);
+  size_t type2len = Curl_bufref_len(type2ref);
 
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
   (void) data;
 #endif
 
-  if(size >= 48) {
-    target_info_len = Curl_read16_le(&buffer[40]);
-    target_info_offset = Curl_read32_le(&buffer[44]);
+  if(type2len >= 48) {
+    target_info_len = Curl_read16_le(&type2[40]);
+    target_info_offset = Curl_read32_le(&type2[44]);
     if(target_info_len > 0) {
-      if((target_info_offset >= size) ||
-         ((target_info_offset + target_info_len) > size) ||
-         (target_info_offset < 48)) {
+      if((target_info_offset > type2len) ||
+         (target_info_offset + target_info_len) > type2len ||
+         target_info_offset < 48) {
         infof(data, "NTLM handshake failure (bad type-2 message). "
-              "Target Info Offset Len is set incorrect by the peer\n");
+              "Target Info Offset Len is set incorrect by the peer");
         return CURLE_BAD_CONTENT_ENCODING;
       }
 
@@ -196,7 +191,7 @@
       if(!ntlm->target_info)
         return CURLE_OUT_OF_MEMORY;
 
-      memcpy(ntlm->target_info, &buffer[target_info_offset], target_info_len);
+      memcpy(ntlm->target_info, &type2[target_info_offset], target_info_len);
     }
   }
 
@@ -238,21 +233,20 @@
 /*
  * Curl_auth_decode_ntlm_type2_message()
  *
- * This is used to decode an already encoded NTLM type-2 message. The message
- * is first decoded from a base64 string into a raw NTLM message and checked
- * for validity before the appropriate data for creating a type-3 message is
- * written to the given NTLM data structure.
+ * This is used to decode an NTLM type-2 message. The raw NTLM message is
+ * checked * for validity before the appropriate data for creating a type-3
+ * message is * written to the given NTLM data structure.
  *
  * Parameters:
  *
  * data     [in]     - The session handle.
- * type2msg [in]     - The base64 encoded type-2 message.
+ * type2ref [in]     - The type-2 message.
  * ntlm     [in/out] - The NTLM data struct being used and modified.
  *
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
-                                             const char *type2msg,
+                                             const struct bufref *type2ref,
                                              struct ntlmdata *ntlm)
 {
   static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
@@ -274,8 +268,8 @@
   */
 
   CURLcode result = CURLE_OK;
-  unsigned char *type2 = NULL;
-  size_t type2_len = 0;
+  const unsigned char *type2 = Curl_bufref_ptr(type2ref);
+  size_t type2len = Curl_bufref_len(type2ref);
 
 #if defined(NTLM_NEEDS_NSS_INIT)
   /* Make sure the crypto backend is initialized */
@@ -286,27 +280,13 @@
   (void)data;
 #endif
 
-  /* Decode the base-64 encoded type-2 message */
-  if(strlen(type2msg) && *type2msg != '=') {
-    result = Curl_base64_decode(type2msg, &type2, &type2_len);
-    if(result)
-      return result;
-  }
-
-  /* Ensure we have a valid type-2 message */
-  if(!type2) {
-    infof(data, "NTLM handshake failure (empty type-2 message)\n");
-    return CURLE_BAD_CONTENT_ENCODING;
-  }
-
   ntlm->flags = 0;
 
-  if((type2_len < 32) ||
+  if((type2len < 32) ||
      (memcmp(type2, NTLMSSP_SIGNATURE, 8) != 0) ||
      (memcmp(type2 + 8, type2_marker, sizeof(type2_marker)) != 0)) {
     /* This was not a good enough type-2 message */
-    free(type2);
-    infof(data, "NTLM handshake failure (bad type-2 message)\n");
+    infof(data, "NTLM handshake failure (bad type-2 message)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
@@ -314,10 +294,9 @@
   memcpy(ntlm->nonce, &type2[24], 8);
 
   if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) {
-    result = ntlm_decode_type2_target(data, type2, type2_len, ntlm);
+    result = ntlm_decode_type2_target(data, type2ref, ntlm);
     if(result) {
-      free(type2);
-      infof(data, "NTLM handshake failure (bad type-2 message)\n");
+      infof(data, "NTLM handshake failure (bad type-2 message)");
       return result;
     }
   }
@@ -331,8 +310,6 @@
     fprintf(stderr, "**** Header %s\n ", header);
   });
 
-  free(type2);
-
   return result;
 }
 
@@ -350,8 +327,8 @@
 /*
  * Curl_auth_create_ntlm_type1_message()
  *
- * This is used to generate an already encoded NTLM type-1 message ready for
- * sending to the recipient using the appropriate compile time crypto API.
+ * This is used to generate an NTLM type-1 message ready for sending to the
+ * recipient using the appropriate compile time crypto API.
  *
  * Parameters:
  *
@@ -361,9 +338,7 @@
  * service [in]     - The service type such as http, smtp, pop or imap.
  * host    [in]     - The host name.
  * ntlm    [in/out] - The NTLM data struct being used and modified.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
@@ -373,7 +348,7 @@
                                              const char *service,
                                              const char *hostname,
                                              struct ntlmdata *ntlm,
-                                             char **outptr, size_t *outlen)
+                                             struct bufref *out)
 {
   /* NTLM type-1 message structure:
 
@@ -391,7 +366,7 @@
 
   size_t size;
 
-  unsigned char ntlmbuf[NTLM_BUFSIZE];
+  char *ntlmbuf;
   const char *host = "";              /* empty */
   const char *domain = "";            /* empty */
   size_t hostlen = 0;
@@ -399,6 +374,7 @@
   size_t hostoff = 0;
   size_t domoff = hostoff + hostlen;  /* This is 0: remember that host and
                                          domain are empty */
+  (void)data;
   (void)userp;
   (void)passwdp;
   (void)service,
@@ -407,43 +383,46 @@
   /* Clean up any former leftovers and initialise to defaults */
   Curl_auth_cleanup_ntlm(ntlm);
 
-#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION)
+#if defined(USE_NTRESPONSES) && \
+    (defined(USE_NTLM2SESSION) || defined(USE_NTLM_V2))
 #define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
 #else
 #define NTLM2FLAG 0
 #endif
-  msnprintf((char *)ntlmbuf, NTLM_BUFSIZE,
-            NTLMSSP_SIGNATURE "%c"
-            "\x01%c%c%c" /* 32-bit type = 1 */
-            "%c%c%c%c"   /* 32-bit NTLM flag field */
-            "%c%c"       /* domain length */
-            "%c%c"       /* domain allocated space */
-            "%c%c"       /* domain name offset */
-            "%c%c"       /* 2 zeroes */
-            "%c%c"       /* host length */
-            "%c%c"       /* host allocated space */
-            "%c%c"       /* host name offset */
-            "%c%c"       /* 2 zeroes */
-            "%s"         /* host name */
-            "%s",        /* domain string */
-            0,           /* trailing zero */
-            0, 0, 0,     /* part of type-1 long */
+  ntlmbuf = aprintf(NTLMSSP_SIGNATURE "%c"
+                    "\x01%c%c%c" /* 32-bit type = 1 */
+                    "%c%c%c%c"   /* 32-bit NTLM flag field */
+                    "%c%c"       /* domain length */
+                    "%c%c"       /* domain allocated space */
+                    "%c%c"       /* domain name offset */
+                    "%c%c"       /* 2 zeroes */
+                    "%c%c"       /* host length */
+                    "%c%c"       /* host allocated space */
+                    "%c%c"       /* host name offset */
+                    "%c%c"       /* 2 zeroes */
+                    "%s"         /* host name */
+                    "%s",        /* domain string */
+                    0,           /* trailing zero */
+                    0, 0, 0,     /* part of type-1 long */
 
-            LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM |
-                        NTLMFLAG_REQUEST_TARGET |
-                        NTLMFLAG_NEGOTIATE_NTLM_KEY |
-                        NTLM2FLAG |
-                        NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
-            SHORTPAIR(domlen),
-            SHORTPAIR(domlen),
-            SHORTPAIR(domoff),
-            0, 0,
-            SHORTPAIR(hostlen),
-            SHORTPAIR(hostlen),
-            SHORTPAIR(hostoff),
-            0, 0,
-            host,  /* this is empty */
-            domain /* this is empty */);
+                    LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM |
+                                NTLMFLAG_REQUEST_TARGET |
+                                NTLMFLAG_NEGOTIATE_NTLM_KEY |
+                                NTLM2FLAG |
+                                NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
+                    SHORTPAIR(domlen),
+                    SHORTPAIR(domlen),
+                    SHORTPAIR(domoff),
+                    0, 0,
+                    SHORTPAIR(hostlen),
+                    SHORTPAIR(hostlen),
+                    SHORTPAIR(hostoff),
+                    0, 0,
+                    host,  /* this is empty */
+                    domain /* this is empty */);
+
+  if(!ntlmbuf)
+    return CURLE_OUT_OF_MEMORY;
 
   /* Initial packet length */
   size = 32 + hostlen + domlen;
@@ -470,8 +449,8 @@
     fprintf(stderr, "\n****\n");
   });
 
-  /* Return with binary blob encoded into base64 */
-  return Curl_base64_encode(data, (char *)ntlmbuf, size, outptr, outlen);
+  Curl_bufref_set(out, ntlmbuf, size, curl_free);
+  return CURLE_OK;
 }
 
 /*
@@ -486,9 +465,7 @@
  * userp   [in]     - The user name in the format User or Domain\User.
  * passwdp [in]     - The user's password.
  * ntlm    [in/out] - The NTLM data struct being used and modified.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
@@ -496,8 +473,7 @@
                                              const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
-                                             char **outptr, size_t *outlen)
-
+                                             struct bufref *out)
 {
   /* NTLM type-3 message structure:
 
@@ -557,19 +533,27 @@
   /* Get the machine's un-qualified host name as NTLM doesn't like the fully
      qualified domain name */
   if(Curl_gethostname(host, sizeof(host))) {
-    infof(data, "gethostname() failed, continuing without!\n");
+    infof(data, "gethostname() failed, continuing without!");
     hostlen = 0;
   }
   else {
     hostlen = strlen(host);
   }
 
-#if defined(USE_NTRESPONSES) && defined(USE_NTLM_V2)
+#if defined(USE_NTRESPONSES) && \
+    (defined(USE_NTLM2SESSION) || defined(USE_NTLM_V2))
+  /* We don't support NTLM2 or extended security if we don't have
+     USE_NTRESPONSES */
   if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
+# if defined(USE_NTLM_V2)
     unsigned char ntbuffer[0x18];
     unsigned char entropy[8];
     unsigned char ntlmv2hash[0x18];
 
+    /* Full NTLM version 2
+       Although this cannot be negotiated, it is used here if available, as
+       servers featuring extended security are likely supporting also
+       NTLMv2. */
     result = Curl_rand(data, entropy, 8);
     if(result)
       return result;
@@ -596,21 +580,14 @@
       return result;
 
     ptr_ntresp = ntlmv2resp;
-  }
-  else
-#endif
-
-#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION)
-
-#define CURL_MD5_DIGEST_LENGTH 16 /* fixed size */
-
-  /* We don't support NTLM2 if we don't have USE_NTRESPONSES */
-  if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM_KEY) {
+# else /* defined(USE_NTLM_V2) */
     unsigned char ntbuffer[0x18];
     unsigned char tmp[0x18];
-    unsigned char md5sum[CURL_MD5_DIGEST_LENGTH];
+    unsigned char md5sum[MD5_DIGEST_LEN];
     unsigned char entropy[8];
 
+    /* NTLM version 1 with extended security. */
+
     /* Need to create 8 bytes random data */
     result = Curl_rand(data, entropy, 8);
     if(result)
@@ -640,6 +617,7 @@
     /* NTLM v2 session security is a misnomer because it is not NTLM v2.
        It is NTLM v1 using the extended session security that is also
        in NTLM v2 */
+# endif /* defined(USE_NTLM_V2) */
   }
   else
 #endif
@@ -650,6 +628,8 @@
 #endif
     unsigned char lmbuffer[0x18];
 
+    /* NTLM version 1 */
+
 #ifdef USE_NTRESPONSES
     result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
     if(result)
@@ -663,6 +643,7 @@
       return result;
 
     Curl_ntlm_core_lm_resp(lmbuffer, &ntlm->nonce[0], lmresp);
+    ntlm->flags &= ~NTLMFLAG_NEGOTIATE_NTLM2_KEY;
 
     /* A safer but less compatible alternative is:
      *   Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], lmresp);
@@ -846,8 +827,8 @@
   if(result)
     return CURLE_CONV_FAILED;
 
-  /* Return with binary blob encoded into base64 */
-  result = Curl_base64_encode(data, (char *)ntlmbuf, size, outptr, outlen);
+  /* Return the binary blob. */
+  result = Curl_bufref_memdup(out, ntlmbuf, size);
 
   Curl_auth_cleanup_ntlm(ntlm);
 
diff --git a/lib/vauth/ntlm.h b/lib/vauth/ntlm.h
index 1136b0f..8ec23ad 100644
--- a/lib/vauth/ntlm.h
+++ b/lib/vauth/ntlm.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vauth/ntlm_sspi.c b/lib/vauth/ntlm_sspi.c
index 84ea51d..3e39dad 100644
--- a/lib/vauth/ntlm_sspi.c
+++ b/lib/vauth/ntlm_sspi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -28,7 +28,6 @@
 
 #include "vauth/vauth.h"
 #include "urldata.h"
-#include "curl_base64.h"
 #include "curl_ntlm_core.h"
 #include "warnless.h"
 #include "curl_multibyte.h"
@@ -78,9 +77,7 @@
  * service [in]     - The service type such as http, smtp, pop or imap.
  * host    [in]     - The host name.
  * ntlm    [in/out] - The NTLM data struct being used and modified.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
@@ -90,7 +87,7 @@
                                              const char *service,
                                              const char *host,
                                              struct ntlmdata *ntlm,
-                                             char **outptr, size_t *outlen)
+                                             struct bufref *out)
 {
   PSecPkgInfo SecurityPackage;
   SecBuffer type_1_buf;
@@ -106,7 +103,7 @@
   status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM),
                                               &SecurityPackage);
   if(status != SEC_E_OK) {
-    failf(data, "SSPI: couldn't get auth info\n");
+    failf(data, "SSPI: couldn't get auth info");
     return CURLE_AUTH_ERROR;
   }
 
@@ -181,9 +178,9 @@
   else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED)
     return CURLE_AUTH_ERROR;
 
-  /* Base64 encode the response */
-  return Curl_base64_encode(data, (char *) ntlm->output_token,
-                            type_1_buf.cbBuffer, outptr, outlen);
+  /* Return the response. */
+  Curl_bufref_set(out, ntlm->output_token, type_1_buf.cbBuffer, NULL);
+  return CURLE_OK;
 }
 
 /*
@@ -194,42 +191,34 @@
  * Parameters:
  *
  * data     [in]     - The session handle.
- * type2msg [in]     - The base64 encoded type-2 message.
+ * type2    [in]     - The type-2 message.
  * ntlm     [in/out] - The NTLM data struct being used and modified.
  *
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
-                                             const char *type2msg,
+                                             const struct bufref *type2,
                                              struct ntlmdata *ntlm)
 {
-  CURLcode result = CURLE_OK;
-  unsigned char *type2 = NULL;
-  size_t type2_len = 0;
-
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
   (void) data;
 #endif
 
-  /* Decode the base-64 encoded type-2 message */
-  if(strlen(type2msg) && *type2msg != '=') {
-    result = Curl_base64_decode(type2msg, &type2, &type2_len);
-    if(result)
-      return result;
-  }
-
   /* Ensure we have a valid type-2 message */
-  if(!type2) {
-    infof(data, "NTLM handshake failure (empty type-2 message)\n");
-
+  if(!Curl_bufref_len(type2)) {
+    infof(data, "NTLM handshake failure (empty type-2 message)");
     return CURLE_BAD_CONTENT_ENCODING;
   }
 
-  /* Simply store the challenge for use later */
-  ntlm->input_token = type2;
-  ntlm->input_token_len = type2_len;
+  /* Store the challenge for later use */
+  ntlm->input_token = malloc(Curl_bufref_len(type2) + 1);
+  if(!ntlm->input_token)
+    return CURLE_OUT_OF_MEMORY;
+  memcpy(ntlm->input_token, Curl_bufref_ptr(type2), Curl_bufref_len(type2));
+  ntlm->input_token[Curl_bufref_len(type2)] = '\0';
+  ntlm->input_token_len = Curl_bufref_len(type2);
 
-  return result;
+  return CURLE_OK;
 }
 
 /*
@@ -245,9 +234,7 @@
  * userp   [in]     - The user name in the format User or Domain\User.
  * passwdp [in]     - The user's password.
  * ntlm    [in/out] - The NTLM data struct being used and modified.
- * outptr  [in/out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen  [out]    - The length of the output message.
+ * out     [out]    - The result storage.
  *
  * Returns CURLE_OK on success.
  */
@@ -255,7 +242,7 @@
                                              const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
-                                             char **outptr, size_t *outlen)
+                                             struct bufref *out)
 {
   CURLcode result = CURLE_OK;
   SecBuffer type_2_bufs[2];
@@ -266,6 +253,9 @@
   unsigned long attrs;
   TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */
 
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
+  (void) data;
+#endif
   (void) passwdp;
   (void) userp;
 
@@ -322,7 +312,7 @@
                                                &type_3_desc,
                                                &attrs, &expiry);
   if(status != SEC_E_OK) {
-    infof(data, "NTLM handshake failure (type-3 message): Status=%x\n",
+    infof(data, "NTLM handshake failure (type-3 message): Status=%x",
           status);
 
     if(status == SEC_E_INSUFFICIENT_MEMORY)
@@ -331,12 +321,9 @@
     return CURLE_AUTH_ERROR;
   }
 
-  /* Base64 encode the response */
-  result = Curl_base64_encode(data, (char *) ntlm->output_token,
-                              type_3_buf.cbBuffer, outptr, outlen);
-
+  /* Return the response. */
+  result = Curl_bufref_memdup(out, ntlm->output_token, type_3_buf.cbBuffer);
   Curl_auth_cleanup_ntlm(ntlm);
-
   return result;
 }
 
diff --git a/lib/vauth/oauth2.c b/lib/vauth/oauth2.c
index b4e9f8e..a5f16a0 100644
--- a/lib/vauth/oauth2.c
+++ b/lib/vauth/oauth2.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,6 @@
 #include "urldata.h"
 
 #include "vauth/vauth.h"
-#include "curl_base64.h"
 #include "warnless.h"
 #include "curl_printf.h"
 
@@ -42,31 +41,26 @@
 /*
  * Curl_auth_create_oauth_bearer_message()
  *
- * This is used to generate an already encoded OAuth 2.0 message ready for
- * sending to the recipient.
+ * This is used to generate an OAuth 2.0 message ready for sending to the
+ * recipient.
  *
  * Parameters:
  *
- * data[in]         - The session handle.
  * user[in]         - The user name.
  * host[in]         - The host name.
  * port[in]         - The port(when not Port 80).
  * bearer[in]       - The bearer token.
- * outptr[in / out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen[out]      - The length of the output message.
+ * out[out]         - The result storage.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_auth_create_oauth_bearer_message(struct Curl_easy *data,
-                                               const char *user,
+CURLcode Curl_auth_create_oauth_bearer_message(const char *user,
                                                const char *host,
                                                const long port,
                                                const char *bearer,
-                                               char **outptr, size_t *outlen)
+                                               struct bufref *out)
 {
-  CURLcode result = CURLE_OK;
-  char *oauth = NULL;
+  char *oauth;
 
   /* Generate the message */
   if(port == 0 || port == 80)
@@ -78,49 +72,34 @@
   if(!oauth)
     return CURLE_OUT_OF_MEMORY;
 
-  /* Base64 encode the reply */
-  result = Curl_base64_encode(data, oauth, strlen(oauth), outptr, outlen);
-
-  free(oauth);
-
-  return result;
+  Curl_bufref_set(out, oauth, strlen(oauth), curl_free);
+  return CURLE_OK;
 }
 
 /*
  * Curl_auth_create_xoauth_bearer_message()
  *
- * This is used to generate an already encoded XOAuth 2.0 message ready for
- * sending to the recipient.
+ * This is used to generate a XOAuth 2.0 message ready for * sending to the
+ * recipient.
  *
  * Parameters:
  *
- * data[in]         - The session handle.
  * user[in]         - The user name.
  * bearer[in]       - The bearer token.
- * outptr[in / out] - The address where a pointer to newly allocated memory
- *                    holding the result will be stored upon completion.
- * outlen[out]      - The length of the output message.
+ * out[out]         - The result storage.
  *
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_auth_create_xoauth_bearer_message(struct Curl_easy *data,
-                                               const char *user,
+CURLcode Curl_auth_create_xoauth_bearer_message(const char *user,
                                                const char *bearer,
-                                               char **outptr, size_t *outlen)
+                                               struct bufref *out)
 {
-  CURLcode result = CURLE_OK;
-
   /* Generate the message */
   char *xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer);
   if(!xoauth)
     return CURLE_OUT_OF_MEMORY;
 
-  /* Base64 encode the reply */
-  result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, outlen);
-
-  free(xoauth);
-
-  return result;
+  Curl_bufref_set(out, xoauth, strlen(xoauth), curl_free);
+  return CURLE_OK;
 }
 #endif /* disabled, no users */
-
diff --git a/lib/vauth/spnego_gssapi.c b/lib/vauth/spnego_gssapi.c
index ed7ce02..8e8932b 100644
--- a/lib/vauth/spnego_gssapi.c
+++ b/lib/vauth/spnego_gssapi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -137,8 +137,7 @@
 
     /* Ensure we have a valid challenge message */
     if(!chlg) {
-      infof(data, "SPNEGO handshake failure (empty challenge message)\n");
-
+      infof(data, "SPNEGO handshake failure (empty challenge message)");
       return CURLE_BAD_CONTENT_ENCODING;
     }
 
diff --git a/lib/vauth/spnego_sspi.c b/lib/vauth/spnego_sspi.c
index 194f250..68bb17d 100644
--- a/lib/vauth/spnego_sspi.c
+++ b/lib/vauth/spnego_sspi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -130,7 +130,7 @@
                                                       TEXT(SP_NAME_NEGOTIATE),
                                                       &SecurityPackage);
     if(nego->status != SEC_E_OK) {
-      failf(data, "SSPI: couldn't get auth info\n");
+      failf(data, "SSPI: couldn't get auth info");
       return CURLE_AUTH_ERROR;
     }
 
@@ -191,8 +191,7 @@
 
     /* Ensure we have a valid challenge message */
     if(!chlg) {
-      infof(data, "SPNEGO handshake failure (empty challenge message)\n");
-
+      infof(data, "SPNEGO handshake failure (empty challenge message)");
       return CURLE_BAD_CONTENT_ENCODING;
     }
 
diff --git a/lib/vauth/vauth.c b/lib/vauth/vauth.c
index d98e66c..3624fb0 100644
--- a/lib/vauth/vauth.c
+++ b/lib/vauth/vauth.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2014 - 2020, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2014 - 2021, Steve Holme, <steve_holme@hotmail.com>.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -72,6 +72,7 @@
 {
   char *utf8_spn = NULL;
   TCHAR *tchar_spn = NULL;
+  TCHAR *dupe_tchar_spn = NULL;
 
   (void) realm;
 
@@ -84,23 +85,19 @@
 
   /* Generate our UTF8 based SPN */
   utf8_spn = aprintf("%s/%s", service, host);
-  if(!utf8_spn) {
+  if(!utf8_spn)
     return NULL;
-  }
 
-  /* Allocate our TCHAR based SPN */
+  /* Allocate and return a TCHAR based SPN. Since curlx_convert_UTF8_to_tchar
+     must be freed by curlx_unicodefree we'll dupe the result so that the
+     pointer this function returns can be normally free'd. */
   tchar_spn = curlx_convert_UTF8_to_tchar(utf8_spn);
-  if(!tchar_spn) {
-    free(utf8_spn);
-
+  free(utf8_spn);
+  if(!tchar_spn)
     return NULL;
-  }
-
-  /* Release the UTF8 variant when operating with Unicode */
-  curlx_unicodefree(utf8_spn);
-
-  /* Return our newly allocated SPN */
-  return tchar_spn;
+  dupe_tchar_spn = _tcsdup(tchar_spn);
+  curlx_unicodefree(tchar_spn);
+  return dupe_tchar_spn;
 }
 #endif /* USE_WINDOWS_SSPI */
 
diff --git a/lib/vauth/vauth.h b/lib/vauth/vauth.h
index a1a557d..ec5b000 100644
--- a/lib/vauth/vauth.h
+++ b/lib/vauth/vauth.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2014 - 2019, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2014 - 2021, Steve Holme, <steve_holme@hotmail.com>.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,6 +24,8 @@
 
 #include <curl/curl.h>
 
+#include "bufref.h"
+
 struct Curl_easy;
 
 #if !defined(CURL_DISABLE_CRYPTO_AUTH)
@@ -42,6 +44,10 @@
 struct negotiatedata;
 #endif
 
+#if defined(USE_GSASL)
+struct gsasldata;
+#endif
+
 #if defined(USE_WINDOWS_SSPI)
 #define GSS_ERROR(status) ((status) & 0x80000000)
 #endif
@@ -58,45 +64,37 @@
 /* This is used to test if the user contains a Windows domain name */
 bool Curl_auth_user_contains_domain(const char *user);
 
-/* This is used to generate a base64 encoded PLAIN cleartext message */
-CURLcode Curl_auth_create_plain_message(struct Curl_easy *data,
-                                        const char *authzid,
+/* This is used to generate a PLAIN cleartext message */
+CURLcode Curl_auth_create_plain_message(const char *authzid,
                                         const char *authcid,
                                         const char *passwd,
-                                        char **outptr, size_t *outlen);
+                                        struct bufref *out);
 
-/* This is used to generate a base64 encoded LOGIN cleartext message */
-CURLcode Curl_auth_create_login_message(struct Curl_easy *data,
-                                        const char *valuep, char **outptr,
-                                        size_t *outlen);
+/* This is used to generate a LOGIN cleartext message */
+CURLcode Curl_auth_create_login_message(const char *value,
+                                        struct bufref *out);
 
-/* This is used to generate a base64 encoded EXTERNAL cleartext message */
-CURLcode Curl_auth_create_external_message(struct Curl_easy *data,
-                                           const char *user, char **outptr,
-                                           size_t *outlen);
+/* This is used to generate an EXTERNAL cleartext message */
+CURLcode Curl_auth_create_external_message(const char *user,
+                                           struct bufref *out);
 
 #if !defined(CURL_DISABLE_CRYPTO_AUTH)
-/* This is used to decode a CRAM-MD5 challenge message */
-CURLcode Curl_auth_decode_cram_md5_message(const char *chlg64, char **outptr,
-                                           size_t *outlen);
-
 /* This is used to generate a CRAM-MD5 response message */
-CURLcode Curl_auth_create_cram_md5_message(struct Curl_easy *data,
-                                           const char *chlg,
+CURLcode Curl_auth_create_cram_md5_message(const struct bufref *chlg,
                                            const char *userp,
                                            const char *passwdp,
-                                           char **outptr, size_t *outlen);
+                                           struct bufref *out);
 
 /* This is used to evaluate if DIGEST is supported */
 bool Curl_auth_is_digest_supported(void);
 
 /* This is used to generate a base64 encoded DIGEST-MD5 response message */
 CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
-                                             const char *chlg64,
+                                             const struct bufref *chlg,
                                              const char *userp,
                                              const char *passwdp,
                                              const char *service,
-                                             char **outptr, size_t *outlen);
+                                             struct bufref *out);
 
 /* This is used to decode a HTTP DIGEST challenge message */
 CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
@@ -115,6 +113,27 @@
 void Curl_auth_digest_cleanup(struct digestdata *digest);
 #endif /* !CURL_DISABLE_CRYPTO_AUTH */
 
+#ifdef USE_GSASL
+/* This is used to evaluate if MECH is supported by gsasl */
+bool Curl_auth_gsasl_is_supported(struct Curl_easy *data,
+                                  const char *mech,
+                                  struct gsasldata *gsasl);
+/* This is used to start a gsasl method */
+CURLcode Curl_auth_gsasl_start(struct Curl_easy *data,
+                               const char *userp,
+                               const char *passwdp,
+                               struct gsasldata *gsasl);
+
+/* This is used to process and generate a new SASL token */
+CURLcode Curl_auth_gsasl_token(struct Curl_easy *data,
+                               const struct bufref *chlg,
+                               struct gsasldata *gsasl,
+                               struct bufref *out);
+
+/* This is used to clean up the gsasl specific data */
+void Curl_auth_gsasl_cleanup(struct gsasldata *digest);
+#endif
+
 #if defined(USE_NTLM)
 /* This is used to evaluate if NTLM is supported */
 bool Curl_auth_is_ntlm_supported(void);
@@ -126,12 +145,11 @@
                                              const char *service,
                                              const char *host,
                                              struct ntlmdata *ntlm,
-                                             char **outptr,
-                                             size_t *outlen);
+                                             struct bufref *out);
 
 /* This is used to decode a base64 encoded NTLM type-2 message */
 CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
-                                             const char *type2msg,
+                                             const struct bufref *type2,
                                              struct ntlmdata *ntlm);
 
 /* This is used to generate a base64 encoded NTLM type-3 message */
@@ -139,25 +157,23 @@
                                              const char *userp,
                                              const char *passwdp,
                                              struct ntlmdata *ntlm,
-                                             char **outptr, size_t *outlen);
+                                             struct bufref *out);
 
 /* This is used to clean up the NTLM specific data */
 void Curl_auth_cleanup_ntlm(struct ntlmdata *ntlm);
 #endif /* USE_NTLM */
 
 /* This is used to generate a base64 encoded OAuth 2.0 message */
-CURLcode Curl_auth_create_oauth_bearer_message(struct Curl_easy *data,
-                                               const char *user,
+CURLcode Curl_auth_create_oauth_bearer_message(const char *user,
                                                const char *host,
                                                const long port,
                                                const char *bearer,
-                                               char **outptr, size_t *outlen);
+                                               struct bufref *out);
 
 /* This is used to generate a base64 encoded XOAuth 2.0 message */
-CURLcode Curl_auth_create_xoauth_bearer_message(struct Curl_easy *data,
-                                                const char *user,
+CURLcode Curl_auth_create_xoauth_bearer_message(const char *user,
                                                 const char *bearer,
-                                                char **outptr, size_t *outlen);
+                                                struct bufref *out);
 
 #if defined(USE_KERBEROS5)
 /* This is used to evaluate if GSSAPI (Kerberos V5) is supported */
@@ -171,17 +187,16 @@
                                               const char *service,
                                               const char *host,
                                               const bool mutual,
-                                              const char *chlg64,
+                                              const struct bufref *chlg,
                                               struct kerberos5data *krb5,
-                                              char **outptr, size_t *outlen);
+                                              struct bufref *out);
 
 /* This is used to generate a base64 encoded GSSAPI (Kerberos V5) security
    token message */
 CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
-                                                  const char *input,
+                                                  const struct bufref *chlg,
                                                   struct kerberos5data *krb5,
-                                                  char **outptr,
-                                                  size_t *outlen);
+                                                  struct bufref *out);
 
 /* This is used to clean up the GSSAPI specific data */
 void Curl_auth_cleanup_gssapi(struct kerberos5data *krb5);
diff --git a/lib/version.c b/lib/version.c
index bdeba88..c84ef85 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -66,29 +66,35 @@
 #include <zstd.h>
 #endif
 
+#ifdef USE_GSASL
+#include <gsasl.h>
+#endif
+
+#ifdef USE_OPENLDAP
+#include <ldap.h>
+#endif
+
 #ifdef HAVE_BROTLI
-static size_t brotli_version(char *buf, size_t bufsz)
+static void brotli_version(char *buf, size_t bufsz)
 {
   uint32_t brotli_version = BrotliDecoderVersion();
   unsigned int major = brotli_version >> 24;
   unsigned int minor = (brotli_version & 0x00FFFFFF) >> 12;
   unsigned int patch = brotli_version & 0x00000FFF;
-
-  return msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
+  (void)msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
 }
 #endif
 
 #ifdef HAVE_ZSTD
-static size_t zstd_version(char *buf, size_t bufsz)
+static void zstd_version(char *buf, size_t bufsz)
 {
   unsigned long zstd_version = (unsigned long)ZSTD_versionNumber();
   unsigned int major = (unsigned int)(zstd_version / (100 * 100));
   unsigned int minor = (unsigned int)((zstd_version -
-                         (major * 100 * 100)) / 100);
+                                       (major * 100 * 100)) / 100);
   unsigned int patch = (unsigned int)(zstd_version -
-                         (major * 100 * 100) - (minor * 100));
-
-  return msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
+                                      (major * 100 * 100) - (minor * 100));
+  (void)msnprintf(buf, bufsz, "%u.%u.%u", major, minor, patch);
 }
 #endif
 
@@ -100,7 +106,7 @@
  * zeros in the data.
  */
 
-#define VERSION_PARTS 14 /* number of substrings we can concatenate */
+#define VERSION_PARTS 17 /* number of substrings we can concatenate */
 
 char *curl_version(void)
 {
@@ -144,6 +150,15 @@
 #ifdef USE_LIBRTMP
   char rtmp_version[40];
 #endif
+#ifdef USE_HYPER
+  char hyper_buf[30];
+#endif
+#ifdef USE_GSASL
+  char gsasl_buf[30];
+#endif
+#ifdef USE_OPENLDAP
+  char ldap_buf[30];
+#endif
   int i = 0;
   int j;
 
@@ -228,6 +243,33 @@
     src[i++] = rtmp_version;
   }
 #endif
+#ifdef USE_HYPER
+  msnprintf(hyper_buf, sizeof(hyper_buf), "Hyper/%s", hyper_version());
+  src[i++] = hyper_buf;
+#endif
+#ifdef USE_GSASL
+  msnprintf(gsasl_buf, sizeof(gsasl_buf), "libgsasl/%s",
+            gsasl_check_version(NULL));
+  src[i++] = gsasl_buf;
+#endif
+#ifdef USE_OPENLDAP
+  {
+    LDAPAPIInfo api;
+    api.ldapai_info_version = LDAP_API_INFO_VERSION;
+
+    if(ldap_get_option(NULL, LDAP_OPT_API_INFO, &api) == LDAP_OPT_SUCCESS) {
+      unsigned int patch = api.ldapai_vendor_version % 100;
+      unsigned int major = api.ldapai_vendor_version / 10000;
+      unsigned int minor =
+        ((api.ldapai_vendor_version - major * 10000) - patch) / 100;
+      msnprintf(ldap_buf, sizeof(ldap_buf), "%s/%u.%u.%u",
+                api.ldapai_vendor_name, major, minor, patch);
+      src[i++] = ldap_buf;
+      ldap_memfree(api.ldapai_vendor_name);
+      ber_memvfree((void **)api.ldapai_extensions);
+    }
+  }
+#endif
 
   DEBUGASSERT(i <= VERSION_PARTS);
 
@@ -274,6 +316,9 @@
 #ifndef CURL_DISABLE_GOPHER
   "gopher",
 #endif
+#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)
+  "gophers",
+#endif
 #ifndef CURL_DISABLE_HTTP
   "http",
 #endif
@@ -316,7 +361,7 @@
   "sftp",
 #endif
 #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
-   (CURL_SIZEOF_CURL_OFF_T > 4)
+   (SIZEOF_CURL_OFF_T > 4)
   "smb",
 #  ifdef USE_SSL
   "smbs",
@@ -381,7 +426,7 @@
 #ifdef CURLRES_ASYNCH
   | CURL_VERSION_ASYNCHDNS
 #endif
-#if (CURL_SIZEOF_CURL_OFF_T > 4) && \
+#if (SIZEOF_CURL_OFF_T > 4) && \
     ( (SIZEOF_OFF_T > 4) || defined(USE_WIN32_LARGE_FILES) )
   | CURL_VERSION_LARGEFILE
 #endif
@@ -394,7 +439,7 @@
 #if defined(USE_TLS_SRP)
   | CURL_VERSION_TLSAUTH_SRP
 #endif
-#if defined(USE_NGHTTP2)
+#if defined(USE_NGHTTP2) || defined(USE_HYPER)
   | CURL_VERSION_HTTP2
 #endif
 #if defined(ENABLE_QUIC)
@@ -415,9 +460,15 @@
 #if defined(HAVE_ZSTD)
   | CURL_VERSION_ZSTD
 #endif
-#if defined(USE_ALTSVC)
+#ifndef CURL_DISABLE_ALTSVC
   | CURL_VERSION_ALTSVC
 #endif
+#ifndef CURL_DISABLE_HSTS
+  | CURL_VERSION_HSTS
+#endif
+#if defined(USE_GSASL)
+  | CURL_VERSION_GSASL
+#endif
   ,
   NULL, /* ssl_version */
   0,    /* ssl_version_num, this is kept at zero */
@@ -444,7 +495,9 @@
   NULL,
 #endif
   0,    /* zstd_ver_num */
-  NULL  /* zstd version */
+  NULL, /* zstd version */
+  NULL, /* Hyper version */
+  NULL  /* gsasl version */
 };
 
 curl_version_info_data *curl_version_info(CURLversion stamp)
@@ -466,7 +519,6 @@
   static char zstd_buffer[80];
 #endif
 
-
 #ifdef USE_SSL
   Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer));
   version_info.ssl_version = ssl_buffer;
@@ -541,6 +593,20 @@
   }
 #endif
 
+#ifdef USE_HYPER
+  {
+    static char hyper_buffer[30];
+    msnprintf(hyper_buffer, sizeof(hyper_buffer), "Hyper/%s", hyper_version());
+    version_info.hyper_version = hyper_buffer;
+  }
+#endif
+
+#ifdef USE_GSASL
+  {
+    version_info.gsasl_version = gsasl_check_version(NULL);
+  }
+#endif
+
   (void)stamp; /* avoid compiler warnings, we don't use this */
   return &version_info;
 }
diff --git a/lib/version_win32.c b/lib/version_win32.c
index 6561d36..b8157e9 100644
--- a/lib/version_win32.c
+++ b/lib/version_win32.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/version_win32.h b/lib/version_win32.h
index 94cc626..9b1bd88 100644
--- a/lib/version_win32.h
+++ b/lib/version_win32.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index c076b7c..fc449c4 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -57,6 +57,8 @@
 #define H3BUGF(x) do { } while(0)
 #endif
 
+#define H3_ALPN_H3_29 "\x5h3-29"
+
 /*
  * This holds outgoing HTTP/3 stream data that is used by nghttp3 until acked.
  * It is used as a circular buffer. Add new bytes at the end until it reaches
@@ -84,13 +86,14 @@
 #define QUIC_PRIORITY \
   "NORMAL:-VERS-ALL:+VERS-TLS1.3:-CIPHER-ALL:+AES-128-GCM:+AES-256-GCM:" \
   "+CHACHA20-POLY1305:+AES-128-CCM:-GROUP-ALL:+GROUP-SECP256R1:" \
-  "+GROUP-X25519:+GROUP-SECP384R1:+GROUP-SECP521R1"
+  "+GROUP-X25519:+GROUP-SECP384R1:+GROUP-SECP521R1:" \
+  "%DISABLE_TLS13_COMPAT_MODE"
 #endif
 
-static CURLcode ng_process_ingress(struct connectdata *conn,
+static CURLcode ng_process_ingress(struct Curl_easy *data,
                                    curl_socket_t sockfd,
                                    struct quicsocket *qs);
-static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
+static CURLcode ng_flush_egress(struct Curl_easy *data, int sockfd,
                                 struct quicsocket *qs);
 static int cb_h3_acked_stream_data(nghttp3_conn *conn, int64_t stream_id,
                                    size_t datalen, void *user_data,
@@ -126,7 +129,7 @@
   case ssl_encryption_handshake:
     return NGTCP2_CRYPTO_LEVEL_HANDSHAKE;
   case ssl_encryption_application:
-    return NGTCP2_CRYPTO_LEVEL_APP;
+    return NGTCP2_CRYPTO_LEVEL_APPLICATION;
   default:
     assert(0);
   }
@@ -143,7 +146,7 @@
   case GNUTLS_ENCRYPTION_LEVEL_HANDSHAKE:
     return NGTCP2_CRYPTO_LEVEL_HANDSHAKE;
   case GNUTLS_ENCRYPTION_LEVEL_APPLICATION:
-    return NGTCP2_CRYPTO_LEVEL_APP;
+    return NGTCP2_CRYPTO_LEVEL_APPLICATION;
   default:
     assert(0);
   }
@@ -170,20 +173,22 @@
                           uint64_t stream_buffer_size)
 {
   ngtcp2_settings *s = &qs->settings;
+  ngtcp2_transport_params *t = &qs->transport_params;
   ngtcp2_settings_default(s);
+  ngtcp2_transport_params_default(t);
 #ifdef DEBUG_NGTCP2
   s->log_printf = quic_printf;
 #else
   s->log_printf = NULL;
 #endif
   s->initial_ts = timestamp();
-  s->transport_params.initial_max_stream_data_bidi_local = stream_buffer_size;
-  s->transport_params.initial_max_stream_data_bidi_remote = QUIC_MAX_STREAMS;
-  s->transport_params.initial_max_stream_data_uni = QUIC_MAX_STREAMS;
-  s->transport_params.initial_max_data = QUIC_MAX_DATA;
-  s->transport_params.initial_max_streams_bidi = 1;
-  s->transport_params.initial_max_streams_uni = 3;
-  s->transport_params.max_idle_timeout = QUIC_IDLE_TIMEOUT;
+  t->initial_max_stream_data_bidi_local = stream_buffer_size;
+  t->initial_max_stream_data_bidi_remote = QUIC_MAX_STREAMS;
+  t->initial_max_stream_data_uni = QUIC_MAX_STREAMS;
+  t->initial_max_data = QUIC_MAX_DATA;
+  t->initial_max_streams_bidi = 1;
+  t->initial_max_streams_uni = 3;
+  t->max_idle_timeout = QUIC_IDLE_TIMEOUT;
   if(qs->qlogfd != -1) {
     s->qlog.write = qlog_callback;
   }
@@ -222,7 +227,7 @@
   int rv;
 
   crypto_data = &qs->crypto_data[level];
-  if(crypto_data->buf == NULL) {
+  if(!crypto_data->buf) {
     crypto_data->buf = malloc(4096);
     if(!crypto_data->buf)
       return 0;
@@ -265,7 +270,7 @@
        qs->qconn, NULL, NULL, NULL, level, tx_secret, secretlen) != 0)
     return 0;
 
-  if(level == NGTCP2_CRYPTO_LEVEL_APP) {
+  if(level == NGTCP2_CRYPTO_LEVEL_APPLICATION) {
     if(init_ngh3_conn(qs) != CURLE_OK)
       return 0;
   }
@@ -349,14 +354,8 @@
   SSL_set_app_data(qs->ssl, qs);
   SSL_set_connect_state(qs->ssl);
 
-  switch(qs->version) {
-#ifdef NGTCP2_PROTO_VER
-  case NGTCP2_PROTO_VER:
-    alpn = (const uint8_t *)NGHTTP3_ALPN_H3;
-    alpnlen = sizeof(NGHTTP3_ALPN_H3) - 1;
-    break;
-#endif
-  }
+  alpn = (const uint8_t *)H3_ALPN_H3_29;
+  alpnlen = sizeof(H3_ALPN_H3_29) - 1;
   if(alpn)
     SSL_set_alpn_protos(qs->ssl, alpn, (int)alpnlen);
 
@@ -382,7 +381,7 @@
        qs->qconn, NULL, NULL, NULL, level, tx_secret, secretlen) != 0)
     return 0;
 
-  if(level == NGTCP2_CRYPTO_LEVEL_APP) {
+  if(level == NGTCP2_CRYPTO_LEVEL_APPLICATION) {
     if(init_ngh3_conn(qs) != CURLE_OK)
       return -1;
   }
@@ -532,15 +531,9 @@
     return 1;
   }
 
-  switch(qs->version) {
-#ifdef NGTCP2_PROTO_VER
-  case NGTCP2_PROTO_VER:
-    /* strip the first byte (the length) from NGHTTP3_ALPN_H3 */
-    alpn.data = (unsigned char *)NGHTTP3_ALPN_H3 + 1;
-    alpn.size = sizeof(NGHTTP3_ALPN_H3) - 2;
-    break;
-#endif
-  }
+  /* strip the first byte (the length) from NGHTTP3_ALPN_H3 */
+  alpn.data = (unsigned char *)H3_ALPN_H3_29 + 1;
+  alpn.size = sizeof(H3_ALPN_H3_29) - 2;
   if(alpn.data)
     gnutls_alpn_set_protocols(qs->ssl, &alpn, 1, 0);
 
@@ -568,10 +561,8 @@
 
 static int cb_handshake_completed(ngtcp2_conn *tconn, void *user_data)
 {
-  struct quicsocket *qs = (struct quicsocket *)user_data;
+  (void)user_data;
   (void)tconn;
-  infof(qs->conn->data, "QUIC handshake is completed\n");
-
   return 0;
 }
 
@@ -592,15 +583,13 @@
 {
   struct quicsocket *qs = (struct quicsocket *)user_data;
   ssize_t nconsumed;
-  int fin = flags & NGTCP2_STREAM_DATA_FLAG_FIN ? 1 : 0;
+  int fin = (flags & NGTCP2_STREAM_DATA_FLAG_FIN) ? 1 : 0;
   (void)offset;
   (void)stream_user_data;
 
   nconsumed =
     nghttp3_conn_read_stream(qs->h3conn, stream_id, buf, buflen, fin);
   if(nconsumed < 0) {
-    failf(qs->conn->data, "nghttp3_conn_read_stream returned error: %s\n",
-          nghttp3_strerror((int)nconsumed));
     return NGTCP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -615,7 +604,7 @@
 
 static int
 cb_acked_stream_data_offset(ngtcp2_conn *tconn, int64_t stream_id,
-                            uint64_t offset, size_t datalen, void *user_data,
+                            uint64_t offset, uint64_t datalen, void *user_data,
                             void *stream_user_data)
 {
   struct quicsocket *qs = (struct quicsocket *)user_data;
@@ -627,9 +616,7 @@
   (void)stream_user_data;
 
   rv = nghttp3_conn_add_ack_offset(qs->h3conn, stream_id, datalen);
-  if(rv != 0) {
-    failf(qs->conn->data, "nghttp3_conn_add_ack_offset returned error: %s\n",
-          nghttp3_strerror(rv));
+  if(rv) {
     return NGTCP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -648,9 +635,7 @@
 
   rv = nghttp3_conn_close_stream(qs->h3conn, stream_id,
                                  app_error_code);
-  if(rv != 0) {
-    failf(qs->conn->data, "nghttp3_conn_close_stream returned error: %s\n",
-          nghttp3_strerror(rv));
+  if(rv) {
     return NGTCP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -669,9 +654,7 @@
   (void)stream_user_data;
 
   rv = nghttp3_conn_reset_stream(qs->h3conn, stream_id);
-  if(rv != 0) {
-    failf(qs->conn->data, "nghttp3_conn_reset_stream returned error: %s\n",
-          nghttp3_strerror(rv));
+  if(rv) {
     return NGTCP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -700,9 +683,7 @@
   (void)stream_user_data;
 
   rv = nghttp3_conn_unblock_stream(qs->h3conn, stream_id);
-  if(rv != 0) {
-    failf(qs->conn->data, "nghttp3_conn_unblock_stream returned error: %s\n",
-          nghttp3_strerror(rv));
+  if(rv) {
     return NGTCP2_ERR_CALLBACK_FAILURE;
   }
 
@@ -713,23 +694,23 @@
                                     uint8_t *token, size_t cidlen,
                                     void *user_data)
 {
-  struct quicsocket *qs = (struct quicsocket *)user_data;
   CURLcode result;
   (void)tconn;
+  (void)user_data;
 
-  result = Curl_rand(qs->conn->data, cid->data, cidlen);
+  result = Curl_rand(NULL, cid->data, cidlen);
   if(result)
     return NGTCP2_ERR_CALLBACK_FAILURE;
   cid->datalen = cidlen;
 
-  result = Curl_rand(qs->conn->data, token, NGTCP2_STATELESS_RESET_TOKENLEN);
+  result = Curl_rand(NULL, token, NGTCP2_STATELESS_RESET_TOKENLEN);
   if(result)
     return NGTCP2_ERR_CALLBACK_FAILURE;
 
   return 0;
 }
 
-static ngtcp2_conn_callbacks ng_callbacks = {
+static ngtcp2_callbacks ng_callbacks = {
   ngtcp2_crypto_client_initial_cb,
   NULL, /* recv_client_initial */
   cb_recv_crypto_data,
@@ -761,13 +742,17 @@
   NULL, /* handshake_confirmed */
   NULL, /* recv_new_token */
   ngtcp2_crypto_delete_crypto_aead_ctx_cb,
-  ngtcp2_crypto_delete_crypto_cipher_ctx_cb
+  ngtcp2_crypto_delete_crypto_cipher_ctx_cb,
+  NULL, /* recv_datagram */
+  NULL, /* ack_datagram */
+  NULL  /* lost_datagram */
 };
 
 /*
  * Might be called twice for happy eyeballs.
  */
-CURLcode Curl_quic_connect(struct connectdata *conn,
+CURLcode Curl_quic_connect(struct Curl_easy *data,
+                           struct connectdata *conn,
                            curl_socket_t sockfd,
                            int sockindex,
                            const struct sockaddr *addr,
@@ -777,14 +762,13 @@
   int rv;
   CURLcode result;
   ngtcp2_path path; /* TODO: this must be initialized properly */
-  struct Curl_easy *data = conn->data;
   struct quicsocket *qs = &conn->hequic[sockindex];
   char ipbuf[40];
-  long port;
+  int port;
   int qfd;
 
   if(qs->conn)
-    Curl_quic_disconnect(conn, sockindex);
+    Curl_quic_disconnect(data, conn, sockindex);
   qs->conn = conn;
 
   /* extract the used address as a string */
@@ -795,7 +779,7 @@
     return CURLE_BAD_FUNCTION_ARGUMENT;
   }
 
-  infof(data, "Connect socket %d over QUIC to %s:%ld\n",
+  infof(data, "Connect socket %d over QUIC to %s:%d",
         sockfd, ipbuf, port);
 
   qs->version = NGTCP2_PROTO_VER_MAX;
@@ -828,12 +812,13 @@
   if(rv == -1)
     return CURLE_QUIC_CONNECT_ERROR;
 
-  ngtcp2_addr_init(&path.local, &qs->local_addr, qs->local_addrlen, NULL);
-  ngtcp2_addr_init(&path.remote, addr, addrlen, NULL);
+  ngtcp2_addr_init(&path.local, (struct sockaddr *)&qs->local_addr,
+                   qs->local_addrlen);
+  ngtcp2_addr_init(&path.remote, addr, addrlen);
 
   rc = ngtcp2_conn_client_new(&qs->qconn, &qs->dcid, &qs->scid, &path,
-                              NGTCP2_PROTO_VER_MAX, &ng_callbacks,
-                              &qs->settings, NULL, qs);
+                              NGTCP2_PROTO_VER_MIN, &ng_callbacks,
+                              &qs->settings, &qs->transport_params, NULL, qs);
   if(rc)
     return CURLE_QUIC_CONNECT_ERROR;
 
@@ -843,20 +828,20 @@
 }
 
 /*
- * Store ngtp2 version info in this buffer, Prefix with a space.  Return total
- * length written.
+ * Store ngtcp2 version info in this buffer.
  */
-int Curl_quic_ver(char *p, size_t len)
+void Curl_quic_ver(char *p, size_t len)
 {
-  ngtcp2_info *ng2 = ngtcp2_version(0);
+  const ngtcp2_info *ng2 = ngtcp2_version(0);
   nghttp3_info *ht3 = nghttp3_version(0);
-  return msnprintf(p, len, "ngtcp2/%s nghttp3/%s",
-                   ng2->version_str, ht3->version_str);
+  (void)msnprintf(p, len, "ngtcp2/%s nghttp3/%s",
+                  ng2->version_str, ht3->version_str);
 }
 
-static int ng_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int ng_getsock(struct Curl_easy *data, struct connectdata *conn,
+                      curl_socket_t *socks)
 {
-  struct SingleRequest *k = &conn->data->req;
+  struct SingleRequest *k = &data->req;
   int bitmap = GETSOCK_BLANK;
 
   socks[0] = conn->sock[FIRSTSOCKET];
@@ -872,12 +857,6 @@
   return bitmap;
 }
 
-static int ng_perform_getsock(const struct connectdata *conn,
-                              curl_socket_t *socks)
-{
-  return ng_getsock((struct connectdata *)conn, socks);
-}
-
 static void qs_disconnect(struct quicsocket *qs)
 {
   int i;
@@ -896,8 +875,10 @@
 #endif
   qs->ssl = NULL;
 #ifdef USE_GNUTLS
-  if(qs->cred)
+  if(qs->cred) {
     gnutls_certificate_free_credentials(qs->cred);
+    qs->cred = NULL;
+  }
 #endif
   for(i = 0; i < 3; i++)
     Curl_safefree(qs->crypto_data[i].buf);
@@ -908,25 +889,30 @@
 #endif
 }
 
-void Curl_quic_disconnect(struct connectdata *conn,
+void Curl_quic_disconnect(struct Curl_easy *data,
+                          struct connectdata *conn,
                           int tempindex)
 {
+  (void)data;
   if(conn->transport == TRNSPRT_QUIC)
     qs_disconnect(&conn->hequic[tempindex]);
 }
 
-static CURLcode ng_disconnect(struct connectdata *conn,
+static CURLcode ng_disconnect(struct Curl_easy *data,
+                              struct connectdata *conn,
                               bool dead_connection)
 {
   (void)dead_connection;
-  Curl_quic_disconnect(conn, 0);
-  Curl_quic_disconnect(conn, 1);
+  Curl_quic_disconnect(data, conn, 0);
+  Curl_quic_disconnect(data, conn, 1);
   return CURLE_OK;
 }
 
-static unsigned int ng_conncheck(struct connectdata *conn,
+static unsigned int ng_conncheck(struct Curl_easy *data,
+                                 struct connectdata *conn,
                                  unsigned int checks_to_perform)
 {
+  (void)data;
   (void)conn;
   (void)checks_to_perform;
   return CONNRESULT_NONE;
@@ -944,10 +930,11 @@
   ng_getsock,                           /* proto_getsock */
   ng_getsock,                           /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  ng_perform_getsock,                   /* perform_getsock */
+  ng_getsock,                           /* perform_getsock */
   ng_disconnect,                        /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ng_conncheck,                         /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_HTTP,                            /* defport */
   CURLPROTO_HTTPS,                      /* protocol */
   CURLPROTO_HTTP,                       /* family */
@@ -959,12 +946,12 @@
                               void *stream_user_data)
 {
   struct Curl_easy *data = stream_user_data;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   (void)conn;
   (void)stream_id;
   (void)app_error_code;
   (void)user_data;
-  H3BUGF(infof(data, "cb_h3_stream_close CALLED\n"));
+  H3BUGF(infof(data, "cb_h3_stream_close CALLED"));
 
   stream->closed = TRUE;
   Curl_expire(data, 0, EXPIRE_QUIC);
@@ -1005,7 +992,7 @@
                            void *user_data, void *stream_user_data)
 {
   struct Curl_easy *data = stream_user_data;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   CURLcode result = CURLE_OK;
   (void)conn;
 
@@ -1064,7 +1051,7 @@
                              void *user_data, void *stream_user_data)
 {
   struct Curl_easy *data = stream_user_data;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   CURLcode result = CURLE_OK;
   (void)conn;
   (void)stream_id;
@@ -1088,7 +1075,7 @@
   nghttp3_vec h3name = nghttp3_rcbuf_get_buf(name);
   nghttp3_vec h3val = nghttp3_rcbuf_get_buf(value);
   struct Curl_easy *data = stream_user_data;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   CURLcode result = CURLE_OK;
   (void)conn;
   (void)stream_id;
@@ -1145,7 +1132,7 @@
   return 0;
 }
 
-static nghttp3_conn_callbacks ngh3_callbacks = {
+static nghttp3_callbacks ngh3_callbacks = {
   cb_h3_acked_stream_data, /* acked_stream_data */
   cb_h3_stream_close,
   cb_h3_recv_data,
@@ -1163,6 +1150,7 @@
   cb_h3_send_stop_sending,
   NULL, /* push_stream */
   NULL, /* end_stream */
+  NULL, /* reset_stream */
 };
 
 static int init_ngh3_conn(struct quicsocket *qs)
@@ -1172,11 +1160,10 @@
   int64_t ctrl_stream_id, qpack_enc_stream_id, qpack_dec_stream_id;
 
   if(ngtcp2_conn_get_max_local_streams_uni(qs->qconn) < 3) {
-    failf(qs->conn->data, "too few available QUIC streams");
     return CURLE_QUIC_CONNECT_ERROR;
   }
 
-  nghttp3_conn_settings_default(&qs->h3settings);
+  nghttp3_settings_default(&qs->h3settings);
 
   rc = nghttp3_conn_client_new(&qs->h3conn,
                                &ngh3_callbacks,
@@ -1245,14 +1232,15 @@
 }
 
 /* incoming data frames on the h3 stream */
-static ssize_t ngh3_stream_recv(struct connectdata *conn,
+static ssize_t ngh3_stream_recv(struct Curl_easy *data,
                                 int sockindex,
                                 char *buf,
                                 size_t buffersize,
                                 CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[sockindex];
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   struct quicsocket *qs = conn->quic;
 
   if(!stream->memlen) {
@@ -1267,11 +1255,11 @@
      as possible to the receive buffer before receiving more */
   drain_overflow_buffer(stream);
 
-  if(ng_process_ingress(conn, sockfd, qs)) {
+  if(ng_process_ingress(data, sockfd, qs)) {
     *curlcode = CURLE_RECV_ERROR;
     return -1;
   }
-  if(ng_flush_egress(conn, sockfd, qs)) {
+  if(ng_flush_egress(data, sockfd, qs)) {
     *curlcode = CURLE_SEND_ERROR;
     return -1;
   }
@@ -1287,7 +1275,7 @@
     /* extend the stream window with the data we're consuming and send out
        any additional packets to tell the server that we can receive more */
     extend_stream_window(qs->qconn, stream);
-    if(ng_flush_egress(conn, sockfd, qs)) {
+    if(ng_flush_egress(data, sockfd, qs)) {
       *curlcode = CURLE_SEND_ERROR;
       return -1;
     }
@@ -1299,7 +1287,7 @@
     return 0;
   }
 
-  infof(conn->data, "ngh3_stream_recv returns 0 bytes and EAGAIN\n");
+  infof(data, "ngh3_stream_recv returns 0 bytes and EAGAIN");
   *curlcode = CURLE_AGAIN;
   return -1;
 }
@@ -1310,17 +1298,22 @@
                                    void *stream_user_data)
 {
   struct Curl_easy *data = stream_user_data;
-  struct HTTP *stream = data->req.protop;
-  (void)conn;
-  (void)stream_id;
+  struct HTTP *stream = data->req.p.http;
   (void)user_data;
 
   if(!data->set.postfields) {
     stream->h3out->used -= datalen;
     H3BUGF(infof(data,
-                 "cb_h3_acked_stream_data, %zd bytes, %zd left unacked\n",
+                 "cb_h3_acked_stream_data, %zd bytes, %zd left unacked",
                  datalen, stream->h3out->used));
     DEBUGASSERT(stream->h3out->used < H3_SEND_SIZE);
+
+    if(stream->h3out->used == 0) {
+      int rv = nghttp3_conn_resume_stream(conn, stream_id);
+      if(rv) {
+        return NGTCP2_ERR_CALLBACK_FAILURE;
+      }
+    }
   }
   return 0;
 }
@@ -1332,7 +1325,7 @@
 {
   struct Curl_easy *data = stream_user_data;
   size_t nread;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   (void)conn;
   (void)stream_id;
   (void)user_data;
@@ -1356,13 +1349,14 @@
       nread = H3_SEND_SIZE - out->windex;
 
     memcpy(&out->buf[out->windex], stream->upload_mem, nread);
-    out->windex += nread;
-    out->used += nread;
 
     /* that's the chunk we return to nghttp3 */
     vec[0].base = &out->buf[out->windex];
     vec[0].len = nread;
 
+    out->windex += nread;
+    out->used += nread;
+
     if(out->windex == H3_SEND_SIZE)
       out->windex = 0; /* wrap */
     stream->upload_mem += nread;
@@ -1372,15 +1366,15 @@
       if(!stream->upload_left)
         *pflags = NGHTTP3_DATA_FLAG_EOF;
     }
-    H3BUGF(infof(data, "cb_h3_readfunction %zd bytes%s (at %zd unacked)\n",
+    H3BUGF(infof(data, "cb_h3_readfunction %zd bytes%s (at %zd unacked)",
                  nread, *pflags == NGHTTP3_DATA_FLAG_EOF?" EOF":"",
                  out->used));
   }
   if(stream->upload_done && !stream->upload_len &&
      (stream->upload_left <= 0)) {
-    H3BUGF(infof(data, "!!!!!!!!! cb_h3_readfunction sets EOF\n"));
+    H3BUGF(infof(data, "!!!!!!!!! cb_h3_readfunction sets EOF"));
     *pflags = NGHTTP3_DATA_FLAG_EOF;
-    return 0;
+    return nread ? 1 : 0;
   }
   else if(!nread) {
     return NGHTTP3_ERR_WOULDBLOCK;
@@ -1392,10 +1386,11 @@
    field list. */
 #define AUTHORITY_DST_IDX 3
 
-static CURLcode http_request(struct connectdata *conn, const void *mem,
+static CURLcode http_request(struct Curl_easy *data, const void *mem,
                              size_t len)
 {
-  struct HTTP *stream = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct HTTP *stream = data->req.p.http;
   size_t nheader;
   size_t i;
   size_t authority_idx;
@@ -1403,7 +1398,6 @@
   char *end, *line_end;
   struct quicsocket *qs = conn->quic;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   nghttp3_nv *nva = NULL;
   int64_t stream3_id;
   int rc;
@@ -1411,7 +1405,7 @@
 
   rc = ngtcp2_conn_open_bidi_stream(qs->qconn, &stream3_id, NULL);
   if(rc) {
-    failf(conn->data, "can get bidi streams");
+    failf(data, "can get bidi streams");
     result = CURLE_SEND_ERROR;
     goto fail;
   }
@@ -1552,7 +1546,7 @@
   }
 
   /* :authority must come before non-pseudo header fields */
-  if(authority_idx != 0 && authority_idx != AUTHORITY_DST_IDX) {
+  if(authority_idx && authority_idx != AUTHORITY_DST_IDX) {
     nghttp3_nv authority = nva[authority_idx];
     for(i = authority_idx; i > AUTHORITY_DST_IDX; --i) {
       nva[i] = nva[i - 1];
@@ -1570,8 +1564,8 @@
 
     if(acc > MAX_ACC) {
       infof(data, "http_request: Warning: The cumulative length of all "
-            "headers exceeds %zu bytes and that could cause the "
-            "stream to be rejected.\n", MAX_ACC);
+            "headers exceeds %d bytes and that could cause the "
+            "stream to be rejected.", MAX_ACC);
     }
   }
 
@@ -1597,8 +1591,7 @@
     stream->h3out = h3out;
 
     rc = nghttp3_conn_submit_request(qs->h3conn, stream->stream3_id,
-                                     nva, nheader, &data_reader,
-                                     conn->data);
+                                     nva, nheader, &data_reader, data);
     if(rc) {
       result = CURLE_SEND_ERROR;
       goto fail;
@@ -1608,9 +1601,7 @@
   default:
     stream->upload_left = 0; /* nothing left to send */
     rc = nghttp3_conn_submit_request(qs->h3conn, stream->stream3_id,
-                                     nva, nheader,
-                                     NULL, /* no body! */
-                                     conn->data);
+                                     nva, nheader, NULL, data);
     if(rc) {
       result = CURLE_SEND_ERROR;
       goto fail;
@@ -1620,7 +1611,7 @@
 
   Curl_safefree(nva);
 
-  infof(data, "Using HTTP/3 Stream ID: %x (easy handle %p)\n",
+  infof(data, "Using HTTP/3 Stream ID: %x (easy handle %p)",
         stream3_id, (void *)data);
 
   return CURLE_OK;
@@ -1629,19 +1620,20 @@
   free(nva);
   return result;
 }
-static ssize_t ngh3_stream_send(struct connectdata *conn,
+static ssize_t ngh3_stream_send(struct Curl_easy *data,
                                 int sockindex,
                                 const void *mem,
                                 size_t len,
                                 CURLcode *curlcode)
 {
   ssize_t sent;
+  struct connectdata *conn = data->conn;
   struct quicsocket *qs = conn->quic;
   curl_socket_t sockfd = conn->sock[sockindex];
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
 
   if(!stream->h3req) {
-    CURLcode result = http_request(conn, mem, len);
+    CURLcode result = http_request(data, mem, len);
     if(result) {
       *curlcode = CURLE_SEND_ERROR;
       return -1;
@@ -1649,7 +1641,7 @@
     sent = len;
   }
   else {
-    H3BUGF(infof(conn->data, "ngh3_stream_send() wants to send %zd bytes\n",
+    H3BUGF(infof(data, "ngh3_stream_send() wants to send %zd bytes",
                  len));
     if(!stream->upload_len) {
       stream->upload_mem = mem;
@@ -1663,7 +1655,7 @@
     }
   }
 
-  if(ng_flush_egress(conn, sockfd, qs)) {
+  if(ng_flush_egress(data, sockfd, qs)) {
     *curlcode = CURLE_SEND_ERROR;
     return -1;
   }
@@ -1681,13 +1673,13 @@
   conn->httpversion = 30;
   conn->bundle->multiuse = BUNDLE_MULTIPLEX;
   conn->quic = &conn->hequic[tempindex];
-  DEBUGF(infof(conn->data, "ngtcp2 established connection!\n"));
 }
 
 /*
  * There can be multiple connection attempts going on in parallel.
  */
-CURLcode Curl_quic_is_connected(struct connectdata *conn,
+CURLcode Curl_quic_is_connected(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 int sockindex,
                                 bool *done)
 {
@@ -1695,11 +1687,11 @@
   struct quicsocket *qs = &conn->hequic[sockindex];
   curl_socket_t sockfd = conn->tempsock[sockindex];
 
-  result = ng_process_ingress(conn, sockfd, qs);
+  result = ng_process_ingress(data, sockfd, qs);
   if(result)
     goto error;
 
-  result = ng_flush_egress(conn, sockfd, qs);
+  result = ng_flush_egress(data, sockfd, qs);
   if(result)
     goto error;
 
@@ -1715,7 +1707,8 @@
 
 }
 
-static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
+static CURLcode ng_process_ingress(struct Curl_easy *data,
+                                   curl_socket_t sockfd,
                                    struct quicsocket *qs)
 {
   ssize_t recvd;
@@ -1730,7 +1723,7 @@
 
   for(;;) {
     remote_addrlen = sizeof(remote_addr);
-    while((recvd = recvfrom(sockfd, buf, bufsize, 0,
+    while((recvd = recvfrom(sockfd, (char *)buf, bufsize, 0,
                             (struct sockaddr *)&remote_addr,
                             &remote_addrlen)) == -1 &&
           SOCKERRNO == EINTR)
@@ -1739,17 +1732,17 @@
       if(SOCKERRNO == EAGAIN || SOCKERRNO == EWOULDBLOCK)
         break;
 
-      failf(conn->data, "ngtcp2: recvfrom() unexpectedly returned %d", recvd);
+      failf(data, "ngtcp2: recvfrom() unexpectedly returned %zd", recvd);
       return CURLE_RECV_ERROR;
     }
 
-    ngtcp2_addr_init(&path.local, &qs->local_addr,
-                     qs->local_addrlen, NULL);
+    ngtcp2_addr_init(&path.local, (struct sockaddr *)&qs->local_addr,
+                     qs->local_addrlen);
     ngtcp2_addr_init(&path.remote, (struct sockaddr *)&remote_addr,
-                     remote_addrlen, NULL);
+                     remote_addrlen);
 
     rv = ngtcp2_conn_read_pkt(qs->qconn, &path, &pi, buf, recvd, ts);
-    if(rv != 0) {
+    if(rv) {
       /* TODO Send CONNECTION_CLOSE if possible */
       return CURLE_RECV_ERROR;
     }
@@ -1758,7 +1751,8 @@
   return CURLE_OK;
 }
 
-static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
+static CURLcode ng_flush_egress(struct Curl_easy *data,
+                                int sockfd,
                                 struct quicsocket *qs)
 {
   int rv;
@@ -1776,8 +1770,9 @@
   int fin;
   nghttp3_vec vec[16];
   ssize_t ndatalen;
+  uint32_t flags;
 
-  switch(qs->local_addr.sa_family) {
+  switch(qs->local_addr.ss_family) {
   case AF_INET:
     pktlen = NGTCP2_MAX_PKTLEN_IPV4;
     break;
@@ -1791,8 +1786,8 @@
   }
 
   rv = ngtcp2_conn_handle_expiry(qs->qconn, ts);
-  if(rv != 0) {
-    failf(conn->data, "ngtcp2_conn_handle_expiry returned error: %s\n",
+  if(rv) {
+    failf(data, "ngtcp2_conn_handle_expiry returned error: %s",
           ngtcp2_strerror(rv));
     return CURLE_SEND_ERROR;
   }
@@ -1800,77 +1795,68 @@
   ngtcp2_path_storage_zero(&ps);
 
   for(;;) {
-    outlen = -1;
+    veccnt = 0;
+    stream_id = -1;
+    fin = 0;
+
     if(qs->h3conn && ngtcp2_conn_get_max_data_left(qs->qconn)) {
       veccnt = nghttp3_conn_writev_stream(qs->h3conn, &stream_id, &fin, vec,
                                           sizeof(vec) / sizeof(vec[0]));
       if(veccnt < 0) {
-        failf(conn->data, "nghttp3_conn_writev_stream returned error: %s\n",
+        failf(data, "nghttp3_conn_writev_stream returned error: %s",
               nghttp3_strerror((int)veccnt));
         return CURLE_SEND_ERROR;
       }
-      else if(veccnt > 0) {
-        uint32_t flags = NGTCP2_WRITE_STREAM_FLAG_MORE |
-          (fin ? NGTCP2_WRITE_STREAM_FLAG_FIN : 0);
-        outlen =
-          ngtcp2_conn_writev_stream(qs->qconn, &ps.path, NULL,
-                                    out, pktlen, &ndatalen,
-                                    flags, stream_id,
-                                    (const ngtcp2_vec *)vec, veccnt, ts);
-        if(outlen == 0) {
-          break;
-        }
-        if(outlen < 0) {
-          if(outlen == NGTCP2_ERR_STREAM_DATA_BLOCKED ||
-             outlen == NGTCP2_ERR_STREAM_SHUT_WR) {
-            assert(ndatalen == -1);
-            rv = nghttp3_conn_block_stream(qs->h3conn, stream_id);
-            if(rv != 0) {
-              failf(conn->data,
-                    "nghttp3_conn_block_stream returned error: %s\n",
-                    nghttp3_strerror(rv));
-              return CURLE_SEND_ERROR;
-            }
-            continue;
-          }
-          else if(outlen == NGTCP2_ERR_WRITE_MORE) {
-            assert(ndatalen > 0);
-            rv = nghttp3_conn_add_write_offset(qs->h3conn, stream_id,
-                                               ndatalen);
-            if(rv != 0) {
-              failf(conn->data,
-                    "nghttp3_conn_add_write_offset returned error: %s\n",
-                    nghttp3_strerror(rv));
-              return CURLE_SEND_ERROR;
-            }
-            continue;
-          }
-          else {
-            assert(ndatalen == -1);
-            failf(conn->data, "ngtcp2_conn_writev_stream returned error: %s\n",
-                  ngtcp2_strerror((int)outlen));
-            return CURLE_SEND_ERROR;
-          }
-        }
-        else {
-          assert(ndatalen == -1);
-        }
-      }
+    }
+
+    flags = NGTCP2_WRITE_STREAM_FLAG_MORE |
+            (fin ? NGTCP2_WRITE_STREAM_FLAG_FIN : 0);
+    outlen = ngtcp2_conn_writev_stream(qs->qconn, &ps.path, NULL, out, pktlen,
+                                       &ndatalen, flags, stream_id,
+                                       (const ngtcp2_vec *)vec, veccnt, ts);
+    if(outlen == 0) {
+      break;
     }
     if(outlen < 0) {
-      outlen = ngtcp2_conn_write_pkt(qs->qconn, &ps.path, NULL,
-                                     out, pktlen, ts);
-      if(outlen < 0) {
-        failf(conn->data, "ngtcp2_conn_write_pkt returned error: %s\n",
+      if(outlen == NGTCP2_ERR_STREAM_DATA_BLOCKED ||
+         outlen == NGTCP2_ERR_STREAM_SHUT_WR) {
+        assert(ndatalen == -1);
+        rv = nghttp3_conn_block_stream(qs->h3conn, stream_id);
+        if(rv) {
+          failf(data, "nghttp3_conn_block_stream returned error: %s\n",
+                nghttp3_strerror(rv));
+          return CURLE_SEND_ERROR;
+        }
+        continue;
+      }
+      else if(outlen == NGTCP2_ERR_WRITE_MORE) {
+        assert(ndatalen >= 0);
+        rv = nghttp3_conn_add_write_offset(qs->h3conn, stream_id, ndatalen);
+        if(rv) {
+          failf(data, "nghttp3_conn_add_write_offset returned error: %s\n",
+                nghttp3_strerror(rv));
+          return CURLE_SEND_ERROR;
+        }
+        continue;
+      }
+      else {
+        assert(ndatalen == -1);
+        failf(data, "ngtcp2_conn_writev_stream returned error: %s",
               ngtcp2_strerror((int)outlen));
         return CURLE_SEND_ERROR;
       }
-      if(outlen == 0)
-        break;
+    }
+    else if(ndatalen >= 0) {
+      rv = nghttp3_conn_add_write_offset(qs->h3conn, stream_id, ndatalen);
+      if(rv) {
+        failf(data, "nghttp3_conn_add_write_offset returned error: %s\n",
+              nghttp3_strerror(rv));
+        return CURLE_SEND_ERROR;
+      }
     }
 
     memcpy(&remote_addr, ps.path.remote.addr, ps.path.remote.addrlen);
-    while((sent = send(sockfd, out, outlen, 0)) == -1 &&
+    while((sent = send(sockfd, (const char *)out, outlen, 0)) == -1 &&
           SOCKERRNO == EINTR)
       ;
 
@@ -1880,7 +1866,7 @@
         break;
       }
       else {
-        failf(conn->data, "send() returned %zd (errno %d)\n", sent,
+        failf(data, "send() returned %zd (errno %d)", sent,
               SOCKERRNO);
         return CURLE_SEND_ERROR;
       }
@@ -1895,7 +1881,7 @@
     else {
       timeout = expiry - ts;
     }
-    Curl_expire(conn->data, timeout / NGTCP2_MILLISECONDS, EXPIRE_QUIC);
+    Curl_expire(data, timeout / NGTCP2_MILLISECONDS, EXPIRE_QUIC);
   }
 
   return CURLE_OK;
@@ -1904,11 +1890,13 @@
 /*
  * Called from transfer.c:done_sending when we stop HTTP/3 uploading.
  */
-CURLcode Curl_quic_done_sending(struct connectdata *conn)
+CURLcode Curl_quic_done_sending(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
+  DEBUGASSERT(conn);
   if(conn->handler == &Curl_handler_http3) {
     /* only for HTTP/3 transfers */
-    struct HTTP *stream = conn->data->req.protop;
+    struct HTTP *stream = data->req.p.http;
     struct quicsocket *qs = conn->quic;
     stream->upload_done = TRUE;
     (void)nghttp3_conn_resume_stream(qs->h3conn, stream->stream3_id);
@@ -1925,7 +1913,7 @@
   (void)premature;
   if(data->conn->handler == &Curl_handler_http3) {
     /* only for HTTP/3 transfers */
-    struct HTTP *stream = data->req.protop;
+    struct HTTP *stream = data->req.p.http;
     Curl_dyn_free(&stream->overflow);
   }
 }
@@ -1940,7 +1928,7 @@
      buffer and allocated an overflow buffer. Since it's possible that
      there's no more data coming on the socket, we need to keep reading
      until the overflow buffer is empty. */
-  const struct HTTP *stream = data->req.protop;
+  const struct HTTP *stream = data->req.p.http;
   return Curl_dyn_len(&stream->overflow) > 0;
 }
 
diff --git a/lib/vquic/ngtcp2.h b/lib/vquic/ngtcp2.h
index afdd01b..cbede45 100644
--- a/lib/vquic/ngtcp2.h
+++ b/lib/vquic/ngtcp2.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,6 +48,7 @@
   ngtcp2_cid scid;
   uint32_t version;
   ngtcp2_settings settings;
+  ngtcp2_transport_params transport_params;
 #ifdef USE_OPENSSL
   SSL_CTX *sslctx;
   SSL *ssl;
@@ -58,11 +59,11 @@
   struct quic_handshake crypto_data[3];
   /* the last TLS alert description generated by the local endpoint */
   uint8_t tls_alert;
-  struct sockaddr local_addr;
+  struct sockaddr_storage local_addr;
   socklen_t local_addrlen;
 
   nghttp3_conn *h3conn;
-  nghttp3_conn_settings h3settings;
+  nghttp3_settings h3settings;
   int qlogfd;
 };
 
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index f52e9da..f757760 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -53,21 +53,22 @@
 #define QUIC_MAX_DATA (1*1024*1024)
 #define QUIC_IDLE_TIMEOUT (60 * 1000) /* milliseconds */
 
-static CURLcode process_ingress(struct connectdata *conn,
+static CURLcode process_ingress(struct Curl_easy *data,
                                 curl_socket_t sockfd,
                                 struct quicsocket *qs);
 
-static CURLcode flush_egress(struct connectdata *conn, curl_socket_t sockfd,
+static CURLcode flush_egress(struct Curl_easy *data, curl_socket_t sockfd,
                              struct quicsocket *qs);
 
-static CURLcode http_request(struct connectdata *conn, const void *mem,
+static CURLcode http_request(struct Curl_easy *data, const void *mem,
                              size_t len);
 static Curl_recv h3_stream_recv;
 static Curl_send h3_stream_send;
 
-static int quiche_getsock(struct connectdata *conn, curl_socket_t *socks)
+static int quiche_getsock(struct Curl_easy *data,
+                          struct connectdata *conn, curl_socket_t *socks)
 {
-  struct SingleRequest *k = &conn->data->req;
+  struct SingleRequest *k = &data->req;
   int bitmap = GETSOCK_BLANK;
 
   socks[0] = conn->sock[FIRSTSOCKET];
@@ -83,14 +84,18 @@
   return bitmap;
 }
 
-static int quiche_perform_getsock(const struct connectdata *conn,
-                                  curl_socket_t *socks)
+static CURLcode qs_disconnect(struct Curl_easy *data,
+                              struct quicsocket *qs)
 {
-  return quiche_getsock((struct connectdata *)conn, socks);
-}
-
-static CURLcode qs_disconnect(struct quicsocket *qs)
-{
+  DEBUGASSERT(qs);
+  if(qs->conn) {
+    (void)quiche_conn_close(qs->conn, TRUE, 0, NULL, 0);
+    /* flushing the egress is not a failsafe way to deliver all the
+       outstanding packets, but we also don't want to get stuck here... */
+    (void)flush_egress(data, qs->sockfd, qs);
+    quiche_conn_free(qs->conn);
+    qs->conn = NULL;
+  }
   if(qs->h3config)
     quiche_h3_config_free(qs->h3config);
   if(qs->h3c)
@@ -99,41 +104,41 @@
     quiche_config_free(qs->cfg);
     qs->cfg = NULL;
   }
-  if(qs->conn) {
-    quiche_conn_free(qs->conn);
-    qs->conn = NULL;
-  }
   return CURLE_OK;
 }
 
-static CURLcode quiche_disconnect(struct connectdata *conn,
+static CURLcode quiche_disconnect(struct Curl_easy *data,
+                                  struct connectdata *conn,
                                   bool dead_connection)
 {
   struct quicsocket *qs = conn->quic;
   (void)dead_connection;
-  return qs_disconnect(qs);
+  return qs_disconnect(data, qs);
 }
 
-void Curl_quic_disconnect(struct connectdata *conn,
+void Curl_quic_disconnect(struct Curl_easy *data,
+                          struct connectdata *conn,
                           int tempindex)
 {
   if(conn->transport == TRNSPRT_QUIC)
-    qs_disconnect(&conn->hequic[tempindex]);
+    qs_disconnect(data, &conn->hequic[tempindex]);
 }
 
-static unsigned int quiche_conncheck(struct connectdata *conn,
+static unsigned int quiche_conncheck(struct Curl_easy *data,
+                                     struct connectdata *conn,
                                      unsigned int checks_to_perform)
 {
+  (void)data;
   (void)conn;
   (void)checks_to_perform;
   return CONNRESULT_NONE;
 }
 
-static CURLcode quiche_do(struct connectdata *conn, bool *done)
+static CURLcode quiche_do(struct Curl_easy *data, bool *done)
 {
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   stream->h3req = FALSE; /* not sent */
-  return Curl_http(conn, done);
+  return Curl_http(data, done);
 }
 
 static const struct Curl_handler Curl_handler_http3 = {
@@ -148,10 +153,11 @@
   quiche_getsock,                       /* proto_getsock */
   quiche_getsock,                       /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  quiche_perform_getsock,               /* perform_getsock */
+  quiche_getsock,                       /* perform_getsock */
   quiche_disconnect,                    /* disconnect */
   ZERO_NULL,                            /* readwrite */
   quiche_conncheck,                     /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_HTTP,                            /* defport */
   CURLPROTO_HTTPS,                      /* protocol */
   CURLPROTO_HTTP,                       /* family */
@@ -166,14 +172,16 @@
 }
 #endif
 
-CURLcode Curl_quic_connect(struct connectdata *conn, curl_socket_t sockfd,
+CURLcode Curl_quic_connect(struct Curl_easy *data,
+                           struct connectdata *conn, curl_socket_t sockfd,
                            int sockindex,
                            const struct sockaddr *addr, socklen_t addrlen)
 {
   CURLcode result;
   struct quicsocket *qs = &conn->hequic[sockindex];
-  struct Curl_easy *data = conn->data;
   char *keylog_file = NULL;
+  char ipbuf[40];
+  int port;
 
 #ifdef DEBUG_QUICHE
   /* initialize debug log callback only once */
@@ -187,6 +195,7 @@
   (void)addr;
   (void)addrlen;
 
+  qs->sockfd = sockfd;
   qs->cfg = quiche_config_new(QUICHE_PROTOCOL_VERSION);
   if(!qs->cfg) {
     failf(data, "can't create quiche config");
@@ -217,7 +226,7 @@
     quiche_config_log_keys(qs->cfg);
 
   qs->conn = quiche_connect(conn->host.name, (const uint8_t *) qs->scid,
-                            sizeof(qs->scid), qs->cfg);
+                            sizeof(qs->scid), addr, addrlen, qs->cfg);
   if(!qs->conn) {
     failf(data, "can't create quiche connection");
     return CURLE_OUT_OF_MEMORY;
@@ -237,20 +246,22 @@
   }
 #endif
 
-  result = flush_egress(conn, sockfd, qs);
+  result = flush_egress(data, sockfd, qs);
   if(result)
     return result;
 
-  /* store the used address as a string */
-  if(!Curl_addr2string((struct sockaddr*)addr, addrlen,
-                       conn->primary_ip, &conn->primary_port)) {
+  /* extract the used address as a string */
+  if(!Curl_addr2string((struct sockaddr*)addr, addrlen, ipbuf, &port)) {
     char buffer[STRERROR_LEN];
     failf(data, "ssrem inet_ntop() failed with errno %d: %s",
           SOCKERRNO, Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
     return CURLE_BAD_FUNCTION_ARGUMENT;
   }
-  memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
-  Curl_persistconninfo(conn);
+
+  infof(data, "Connect socket %d over QUIC to %s:%ld",
+        sockfd, ipbuf, port);
+
+  Curl_persistconninfo(data, conn, NULL, -1);
 
   /* for connection reuse purposes: */
   conn->ssl[FIRSTSOCKET].state = ssl_connection_complete;
@@ -266,7 +277,7 @@
       offset += 1 + alpn_len;
     }
 
-    infof(data, "Sent QUIC client Initial, ALPN: %s\n",
+    infof(data, "Sent QUIC client Initial, ALPN: %s",
           alpn_protocols + 1);
   }
 
@@ -314,61 +325,74 @@
 /*
  * This function gets polled to check if this QUIC connection has connected.
  */
-CURLcode Curl_quic_is_connected(struct connectdata *conn, int sockindex,
+CURLcode Curl_quic_is_connected(struct Curl_easy *data,
+                                struct connectdata *conn,
+                                int sockindex,
                                 bool *done)
 {
   CURLcode result;
   struct quicsocket *qs = &conn->hequic[sockindex];
   curl_socket_t sockfd = conn->tempsock[sockindex];
 
-  result = process_ingress(conn, sockfd, qs);
+  result = process_ingress(data, sockfd, qs);
   if(result)
     goto error;
 
-  result = flush_egress(conn, sockfd, qs);
+  result = flush_egress(data, sockfd, qs);
   if(result)
     goto error;
 
   if(quiche_conn_is_established(qs->conn)) {
     *done = TRUE;
     result = quiche_has_connected(conn, 0, sockindex);
-    DEBUGF(infof(conn->data, "quiche established connection!\n"));
+    DEBUGF(infof(data, "quiche established connection!"));
   }
 
   return result;
   error:
-  qs_disconnect(qs);
+  qs_disconnect(data, qs);
   return result;
 }
 
-static CURLcode process_ingress(struct connectdata *conn, int sockfd,
+static CURLcode process_ingress(struct Curl_easy *data, int sockfd,
                                 struct quicsocket *qs)
 {
   ssize_t recvd;
-  struct Curl_easy *data = conn->data;
   uint8_t *buf = (uint8_t *)data->state.buffer;
   size_t bufsize = data->set.buffer_size;
+  struct sockaddr_storage from;
+  socklen_t from_len;
+  quiche_recv_info recv_info;
+
+  DEBUGASSERT(qs->conn);
 
   /* in case the timeout expired */
   quiche_conn_on_timeout(qs->conn);
 
   do {
-    recvd = recv(sockfd, buf, bufsize, 0);
+    from_len = sizeof(from);
+
+    recvd = recvfrom(sockfd, buf, bufsize, 0,
+                     (struct sockaddr *)&from, &from_len);
+
     if((recvd < 0) && ((SOCKERRNO == EAGAIN) || (SOCKERRNO == EWOULDBLOCK)))
       break;
 
     if(recvd < 0) {
-      failf(conn->data, "quiche: recv() unexpectedly returned %d "
+      failf(data, "quiche: recvfrom() unexpectedly returned %zd "
             "(errno: %d, socket %d)", recvd, SOCKERRNO, sockfd);
       return CURLE_RECV_ERROR;
     }
 
-    recvd = quiche_conn_recv(qs->conn, buf, recvd);
+    recv_info.from = (struct sockaddr *) &from;
+    recv_info.from_len = from_len;
+
+    recvd = quiche_conn_recv(qs->conn, buf, recvd, &recv_info);
     if(recvd == QUICHE_ERR_DONE)
       break;
 
     if(recvd < 0) {
-      failf(conn->data, "quiche_conn_recv() == %d", recvd);
+      failf(data, "quiche_conn_recv() == %zd", recvd);
       return CURLE_RECV_ERROR;
     }
   } while(1);
@@ -380,27 +404,27 @@
  * flush_egress drains the buffers and sends off data.
  * Calls failf() on errors.
  */
-static CURLcode flush_egress(struct connectdata *conn, int sockfd,
+static CURLcode flush_egress(struct Curl_easy *data, int sockfd,
                              struct quicsocket *qs)
 {
   ssize_t sent;
-  static uint8_t out[1200];
+  uint8_t out[1200];
   int64_t timeout_ns;
+  quiche_send_info send_info;
 
   do {
-    sent = quiche_conn_send(qs->conn, out, sizeof(out));
+    sent = quiche_conn_send(qs->conn, out, sizeof(out), &send_info);
     if(sent == QUICHE_ERR_DONE)
       break;
 
     if(sent < 0) {
-      failf(conn->data, "quiche_conn_send returned %zd\n",
-            sent);
+      failf(data, "quiche_conn_send returned %zd", sent);
       return CURLE_SEND_ERROR;
     }
 
     sent = send(sockfd, out, sent, 0);
     if(sent < 0) {
-      failf(conn->data, "send() returned %zd\n", sent);
+      failf(data, "send() returned %zd", sent);
       return CURLE_SEND_ERROR;
     }
   } while(1);
@@ -409,7 +433,7 @@
   timeout_ns = quiche_conn_timeout_as_nanos(qs->conn);
   if(timeout_ns)
     /* expire uses milliseconds */
-    Curl_expire(conn->data, (timeout_ns + 999999) / 1000000, EXPIRE_QUIC);
+    Curl_expire(data, (timeout_ns + 999999) / 1000000, EXPIRE_QUIC);
 
   return CURLE_OK;
 }
@@ -447,7 +471,7 @@
   return 0;
 }
 
-static ssize_t h3_stream_recv(struct connectdata *conn,
+static ssize_t h3_stream_recv(struct Curl_easy *data,
                               int sockindex,
                               char *buf,
                               size_t buffersize,
@@ -455,19 +479,19 @@
 {
   ssize_t recvd = -1;
   ssize_t rcode;
+  struct connectdata *conn = data->conn;
   struct quicsocket *qs = conn->quic;
   curl_socket_t sockfd = conn->sock[sockindex];
   quiche_h3_event *ev;
   int rc;
   struct h3h1header headers;
-  struct Curl_easy *data = conn->data;
-  struct HTTP *stream = data->req.protop;
+  struct HTTP *stream = data->req.p.http;
   headers.dest = buf;
   headers.destlen = buffersize;
   headers.nlen = 0;
 
-  if(process_ingress(conn, sockfd, qs)) {
-    infof(data, "h3_stream_recv returns on ingress\n");
+  if(process_ingress(data, sockfd, qs)) {
+    infof(data, "h3_stream_recv returns on ingress");
     *curlcode = CURLE_RECV_ERROR;
     return -1;
   }
@@ -480,7 +504,7 @@
 
     if(s != stream->stream3_id) {
       /* another transfer, ignore for now */
-      infof(data, "Got h3 for stream %u, expects %u\n",
+      infof(data, "Got h3 for stream %u, expects %u",
             s, stream->stream3_id);
       continue;
     }
@@ -526,7 +550,7 @@
 
     quiche_h3_event_free(ev);
   }
-  if(flush_egress(conn, sockfd, qs)) {
+  if(flush_egress(data, sockfd, qs)) {
     *curlcode = CURLE_SEND_ERROR;
     return -1;
   }
@@ -540,19 +564,20 @@
   return recvd;
 }
 
-static ssize_t h3_stream_send(struct connectdata *conn,
+static ssize_t h3_stream_send(struct Curl_easy *data,
                               int sockindex,
                               const void *mem,
                               size_t len,
                               CURLcode *curlcode)
 {
   ssize_t sent;
+  struct connectdata *conn = data->conn;
   struct quicsocket *qs = conn->quic;
   curl_socket_t sockfd = conn->sock[sockindex];
-  struct HTTP *stream = conn->data->req.protop;
+  struct HTTP *stream = data->req.p.http;
 
   if(!stream->h3req) {
-    CURLcode result = http_request(conn, mem, len);
+    CURLcode result = http_request(data, mem, len);
     if(result) {
       *curlcode = CURLE_SEND_ERROR;
       return -1;
@@ -560,8 +585,7 @@
     sent = len;
   }
   else {
-    H3BUGF(infof(conn->data, "Pass on %zd body bytes to quiche\n",
-                 len));
+    H3BUGF(infof(data, "Pass on %zd body bytes to quiche", len));
     sent = quiche_h3_send_body(qs->h3c, qs->conn, stream->stream3_id,
                                (uint8_t *)mem, len, FALSE);
     if(sent < 0) {
@@ -570,7 +594,7 @@
     }
   }
 
-  if(flush_egress(conn, sockfd, qs)) {
+  if(flush_egress(data, sockfd, qs)) {
     *curlcode = CURLE_SEND_ERROR;
     return -1;
   }
@@ -580,24 +604,24 @@
 }
 
 /*
- * Store quiche version info in this buffer, Prefix with a space.  Return total
- * length written.
+ * Store quiche version info in this buffer.
  */
-int Curl_quic_ver(char *p, size_t len)
+void Curl_quic_ver(char *p, size_t len)
 {
-  return msnprintf(p, len, "quiche/%s", quiche_version());
+  (void)msnprintf(p, len, "quiche/%s", quiche_version());
 }
 
 /* Index where :authority header field will appear in request header
    field list. */
 #define AUTHORITY_DST_IDX 3
 
-static CURLcode http_request(struct connectdata *conn, const void *mem,
+static CURLcode http_request(struct Curl_easy *data, const void *mem,
                              size_t len)
 {
   /*
    */
-  struct HTTP *stream = conn->data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct HTTP *stream = data->req.p.http;
   size_t nheader;
   size_t i;
   size_t authority_idx;
@@ -607,7 +631,6 @@
   quiche_h3_header *nva = NULL;
   struct quicsocket *qs = conn->quic;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
 
   stream->h3req = TRUE; /* senf off! */
 
@@ -738,7 +761,7 @@
   }
 
   /* :authority must come before non-pseudo header fields */
-  if(authority_idx != 0 && authority_idx != AUTHORITY_DST_IDX) {
+  if(authority_idx && authority_idx != AUTHORITY_DST_IDX) {
     quiche_h3_header authority = nva[authority_idx];
     for(i = authority_idx; i > AUTHORITY_DST_IDX; --i) {
       nva[i] = nva[i - 1];
@@ -755,15 +778,15 @@
     for(i = 0; i < nheader; ++i) {
       acc += nva[i].name_len + nva[i].value_len;
 
-      H3BUGF(infof(data, "h3 [%.*s: %.*s]\n",
+      H3BUGF(infof(data, "h3 [%.*s: %.*s]",
                    nva[i].name_len, nva[i].name,
                    nva[i].value_len, nva[i].value));
     }
 
     if(acc > MAX_ACC) {
       infof(data, "http_request: Warning: The cumulative length of all "
-            "headers exceeds %zu bytes and that could cause the "
-            "stream to be rejected.\n", MAX_ACC);
+            "headers exceeds %d bytes and that could cause the "
+            "stream to be rejected.", MAX_ACC);
     }
   }
 
@@ -800,13 +823,13 @@
   Curl_safefree(nva);
 
   if(stream3_id < 0) {
-    H3BUGF(infof(data, "quiche_h3_send_request returned %d\n",
+    H3BUGF(infof(data, "quiche_h3_send_request returned %d",
                  stream3_id));
     result = CURLE_SEND_ERROR;
     goto fail;
   }
 
-  infof(data, "Using HTTP/3 Stream ID: %x (easy handle %p)\n",
+  infof(data, "Using HTTP/3 Stream ID: %x (easy handle %p)",
         stream3_id, (void *)data);
   stream->stream3_id = stream3_id;
 
@@ -820,14 +843,15 @@
 /*
  * Called from transfer.c:done_sending when we stop HTTP/3 uploading.
  */
-CURLcode Curl_quic_done_sending(struct connectdata *conn)
+CURLcode Curl_quic_done_sending(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
+  DEBUGASSERT(conn);
   if(conn->handler == &Curl_handler_http3) {
     /* only for HTTP/3 transfers */
     ssize_t sent;
-    struct HTTP *stream = conn->data->req.protop;
+    struct HTTP *stream = data->req.p.http;
     struct quicsocket *qs = conn->quic;
-    fprintf(stderr, "!!! Curl_quic_done_sending\n");
     stream->upload_done = TRUE;
     sent = quiche_h3_send_body(qs->h3c, qs->conn, stream->stream3_id,
                                NULL, 0, TRUE);
diff --git a/lib/vquic/quiche.h b/lib/vquic/quiche.h
index c8d1837..d311e99 100644
--- a/lib/vquic/quiche.h
+++ b/lib/vquic/quiche.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,6 +41,7 @@
   quiche_h3_conn *h3c;
   quiche_h3_config *h3config;
   uint8_t scid[QUICHE_MAX_CONN_ID_LEN];
+  curl_socket_t sockfd;
   uint32_t version;
 };
 
diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c
index aae8e09..7c0cc6d 100644
--- a/lib/vquic/vquic.c
+++ b/lib/vquic/vquic.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vquic/vquic.h b/lib/vquic/vquic.h
index ecff0ed..eb8a893 100644
--- a/lib/vquic/vquic.h
+++ b/lib/vquic/vquic.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index acdb4e7..c2ca8ef 100644
--- a/lib/vssh/libssh.c
+++ b/lib/vssh/libssh.c
@@ -5,14 +5,14 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2017 - 2020 Red Hat, Inc.
+ * Copyright (C) 2017 - 2021 Red Hat, Inc.
  *
  * Authors: Nikos Mavrogiannopoulos, Tomas Mraz, Stanislav Zidek,
  *          Robert Kolcun, Andreas Schneider
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -107,34 +107,37 @@
 #endif
 
 /* Local functions: */
-static CURLcode myssh_connect(struct connectdata *conn, bool *done);
-static CURLcode myssh_multi_statemach(struct connectdata *conn,
+static CURLcode myssh_connect(struct Curl_easy *data, bool *done);
+static CURLcode myssh_multi_statemach(struct Curl_easy *data,
                                       bool *done);
-static CURLcode myssh_do_it(struct connectdata *conn, bool *done);
+static CURLcode myssh_do_it(struct Curl_easy *data, bool *done);
 
-static CURLcode scp_done(struct connectdata *conn,
+static CURLcode scp_done(struct Curl_easy *data,
                          CURLcode, bool premature);
-static CURLcode scp_doing(struct connectdata *conn, bool *dophase_done);
-static CURLcode scp_disconnect(struct connectdata *conn,
+static CURLcode scp_doing(struct Curl_easy *data, bool *dophase_done);
+static CURLcode scp_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn,
                                bool dead_connection);
 
-static CURLcode sftp_done(struct connectdata *conn,
+static CURLcode sftp_done(struct Curl_easy *data,
                           CURLcode, bool premature);
-static CURLcode sftp_doing(struct connectdata *conn,
+static CURLcode sftp_doing(struct Curl_easy *data,
                            bool *dophase_done);
-static CURLcode sftp_disconnect(struct connectdata *conn, bool dead);
+static CURLcode sftp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
+                                bool dead);
 static
-CURLcode sftp_perform(struct connectdata *conn,
+CURLcode sftp_perform(struct Curl_easy *data,
                       bool *connected,
                       bool *dophase_done);
 
-static void sftp_quote(struct connectdata *conn);
-static void sftp_quote_stat(struct connectdata *conn);
-static int myssh_getsock(struct connectdata *conn, curl_socket_t *sock);
-static int myssh_perform_getsock(const struct connectdata *conn,
-                                 curl_socket_t *sock);
+static void sftp_quote(struct Curl_easy *data);
+static void sftp_quote_stat(struct Curl_easy *data);
+static int myssh_getsock(struct Curl_easy *data,
+                         struct connectdata *conn, curl_socket_t *sock);
 
-static CURLcode myssh_setup_connection(struct connectdata *conn);
+static CURLcode myssh_setup_connection(struct Curl_easy *data,
+                                       struct connectdata *conn);
 
 /*
  * SCP protocol handler.
@@ -152,10 +155,11 @@
   myssh_getsock,                /* proto_getsock */
   myssh_getsock,                /* doing_getsock */
   ZERO_NULL,                    /* domore_getsock */
-  myssh_perform_getsock,        /* perform_getsock */
+  myssh_getsock,                /* perform_getsock */
   scp_disconnect,               /* disconnect */
   ZERO_NULL,                    /* readwrite */
   ZERO_NULL,                    /* connection_check */
+  ZERO_NULL,                    /* attach connection */
   PORT_SSH,                     /* defport */
   CURLPROTO_SCP,                /* protocol */
   CURLPROTO_SCP,                /* family */
@@ -178,10 +182,11 @@
   myssh_getsock,                        /* proto_getsock */
   myssh_getsock,                        /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  myssh_perform_getsock,                /* perform_getsock */
+  myssh_getsock,                        /* perform_getsock */
   sftp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_SSH,                             /* defport */
   CURLPROTO_SFTP,                       /* protocol */
   CURLPROTO_SFTP,                       /* family */
@@ -223,12 +228,13 @@
  * SSH State machine related code
  */
 /* This is the ONLY way to change SSH state! */
-static void mystate(struct connectdata *conn, sshstate nowstate
+static void mystate(struct Curl_easy *data, sshstate nowstate
 #ifdef DEBUGBUILD
                     , int lineno
 #endif
   )
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
@@ -297,7 +303,7 @@
 
 
   if(sshc->state != nowstate) {
-    infof(conn->data, "SSH %p state change from %s to %s (line %d)\n",
+    infof(data, "SSH %p state change from %s to %s (line %d)",
           (void *) sshc, names[sshc->state], names[nowstate],
           lineno);
   }
@@ -316,10 +322,10 @@
  *
  * Returns SSH_OK or SSH_ERROR.
  */
-static int myssh_is_known(struct connectdata *conn)
+static int myssh_is_known(struct Curl_easy *data)
 {
   int rc;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   ssh_key pubkey;
   size_t hlen;
@@ -362,7 +368,7 @@
     for(i = 0; i < 16; i++)
       msnprintf(&md5buffer[i*2], 3, "%02x", (unsigned char)hash[i]);
 
-    infof(data, "SSH MD5 fingerprint: %s\n", md5buffer);
+    infof(data, "SSH MD5 fingerprint: %s", md5buffer);
 
     if(!strcasecompare(md5buffer, pubkey_md5)) {
       failf(data,
@@ -529,10 +535,10 @@
 
 cleanup:
   if(found_base64) {
-    free(found_base64);
+    (free)(found_base64);
   }
   if(known_base64) {
-    free(known_base64);
+    (free)(known_base64);
   }
   if(hash)
     ssh_clean_pubkey_hash(&hash);
@@ -545,49 +551,48 @@
   return rc;
 }
 
-#define MOVE_TO_ERROR_STATE(_r) { \
-  state(conn, SSH_SESSION_DISCONNECT); \
-  sshc->actualcode = _r; \
-  rc = SSH_ERROR; \
-  break; \
-}
+#define MOVE_TO_ERROR_STATE(_r) do {            \
+    state(data, SSH_SESSION_DISCONNECT);        \
+    sshc->actualcode = _r;                      \
+    rc = SSH_ERROR;                             \
+  } while(0)
 
-#define MOVE_TO_SFTP_CLOSE_STATE() { \
-  state(conn, SSH_SFTP_CLOSE); \
-  sshc->actualcode = sftp_error_to_CURLE(sftp_get_error(sshc->sftp_session)); \
-  rc = SSH_ERROR; \
-  break; \
-}
+#define MOVE_TO_SFTP_CLOSE_STATE() do {                         \
+    state(data, SSH_SFTP_CLOSE);                                \
+    sshc->actualcode =                                          \
+      sftp_error_to_CURLE(sftp_get_error(sshc->sftp_session));  \
+    rc = SSH_ERROR;                                             \
+  } while(0)
 
-#define MOVE_TO_LAST_AUTH \
-  if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) { \
-    rc = SSH_OK; \
-    state(conn, SSH_AUTH_PASS_INIT); \
-    break; \
-  } \
-  else { \
-    MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED); \
-  }
+#define MOVE_TO_LAST_AUTH do {                          \
+    if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) { \
+      rc = SSH_OK;                                      \
+      state(data, SSH_AUTH_PASS_INIT);                  \
+    }                                                   \
+    else {                                              \
+      MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);          \
+    }                                                   \
+  } while(0)
 
-#define MOVE_TO_TERTIARY_AUTH \
-  if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) { \
-    rc = SSH_OK; \
-    state(conn, SSH_AUTH_KEY_INIT); \
-    break; \
-  } \
-  else { \
-    MOVE_TO_LAST_AUTH; \
-  }
+#define MOVE_TO_TERTIARY_AUTH do {                              \
+    if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) {      \
+      rc = SSH_OK;                                              \
+      state(data, SSH_AUTH_KEY_INIT);                           \
+    }                                                           \
+    else {                                                      \
+      MOVE_TO_LAST_AUTH;                                        \
+    }                                                           \
+  } while(0)
 
-#define MOVE_TO_SECONDARY_AUTH \
-  if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) { \
-    rc = SSH_OK; \
-    state(conn, SSH_AUTH_GSSAPI); \
-    break; \
-  } \
-  else { \
-    MOVE_TO_TERTIARY_AUTH; \
-  }
+#define MOVE_TO_SECONDARY_AUTH do {                             \
+    if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) {       \
+      rc = SSH_OK;                                              \
+      state(data, SSH_AUTH_GSSAPI);                             \
+    }                                                           \
+    else {                                                      \
+      MOVE_TO_TERTIARY_AUTH;                                    \
+    }                                                           \
+  } while(0)
 
 static
 int myssh_auth_interactive(struct connectdata *conn)
@@ -625,7 +630,7 @@
         rc = SSH_OK;
       else if(rc == SSH_AUTH_INFO) {
         nprompts = ssh_userauth_kbdint_getnprompts(sshc->ssh_session);
-        if(nprompts != 0)
+        if(nprompts)
           return SSH_ERROR;
 
         sshc->kbd_state = 2;
@@ -660,11 +665,11 @@
  * to will be set to TRUE if the libssh function returns SSH_AGAIN
  * meaning it wants to be called again when the socket is ready
  */
-static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
+static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SSHPROTO *protop = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SSHPROTO *protop = data->req.p.ssh;
   struct ssh_conn *sshc = &conn->proto.sshc;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
   int rc = SSH_NO_ERROR, err;
@@ -689,7 +694,7 @@
          non-blocking */
       ssh_set_blocking(sshc->ssh_session, 0);
 
-      state(conn, SSH_S_STARTUP);
+      state(data, SSH_S_STARTUP);
       /* FALLTHROUGH */
 
     case SSH_S_STARTUP:
@@ -700,19 +705,21 @@
       if(rc != SSH_OK) {
         failf(data, "Failure establishing ssh session");
         MOVE_TO_ERROR_STATE(CURLE_FAILED_INIT);
+        break;
       }
 
-      state(conn, SSH_HOSTKEY);
+      state(data, SSH_HOSTKEY);
 
       /* FALLTHROUGH */
     case SSH_HOSTKEY:
 
-      rc = myssh_is_known(conn);
+      rc = myssh_is_known(data);
       if(rc != SSH_OK) {
         MOVE_TO_ERROR_STATE(CURLE_PEER_FAILED_VERIFICATION);
+        break;
       }
 
-      state(conn, SSH_AUTHLIST);
+      state(data, SSH_AUTHLIST);
       /* FALLTHROUGH */
     case SSH_AUTHLIST:{
         sshc->authed = FALSE;
@@ -725,30 +732,32 @@
 
         if(rc == SSH_AUTH_SUCCESS) {
           sshc->authed = TRUE;
-          infof(data, "Authenticated with none\n");
-          state(conn, SSH_AUTH_DONE);
+          infof(data, "Authenticated with none");
+          state(data, SSH_AUTH_DONE);
           break;
         }
         else if(rc == SSH_AUTH_ERROR) {
           MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
+          break;
         }
 
         sshc->auth_methods = ssh_userauth_list(sshc->ssh_session, NULL);
         if(sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {
-          state(conn, SSH_AUTH_PKEY_INIT);
-          infof(data, "Authentication using SSH public key file\n");
+          state(data, SSH_AUTH_PKEY_INIT);
+          infof(data, "Authentication using SSH public key file");
         }
         else if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) {
-          state(conn, SSH_AUTH_GSSAPI);
+          state(data, SSH_AUTH_GSSAPI);
         }
         else if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) {
-          state(conn, SSH_AUTH_KEY_INIT);
+          state(data, SSH_AUTH_KEY_INIT);
         }
         else if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) {
-          state(conn, SSH_AUTH_PASS_INIT);
+          state(data, SSH_AUTH_PASS_INIT);
         }
         else {                  /* unsupported authentication method */
           MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
+          break;
         }
 
         break;
@@ -756,6 +765,7 @@
     case SSH_AUTH_PKEY_INIT:
       if(!(data->set.ssh_auth_types & CURLSSH_AUTH_PUBLICKEY)) {
         MOVE_TO_SECONDARY_AUTH;
+        break;
       }
 
       /* Two choices, (1) private key was given on CMD,
@@ -771,6 +781,7 @@
 
           if(rc != SSH_OK) {
             MOVE_TO_SECONDARY_AUTH;
+            break;
           }
         }
 
@@ -785,7 +796,7 @@
           break;
         }
 
-        state(conn, SSH_AUTH_PKEY);
+        state(data, SSH_AUTH_PKEY);
         break;
 
       }
@@ -799,8 +810,8 @@
         if(rc == SSH_AUTH_SUCCESS) {
           rc = SSH_OK;
           sshc->authed = TRUE;
-          infof(data, "Completed public key authentication\n");
-          state(conn, SSH_AUTH_DONE);
+          infof(data, "Completed public key authentication");
+          state(data, SSH_AUTH_DONE);
           break;
         }
 
@@ -816,12 +827,12 @@
 
       if(rc == SSH_AUTH_SUCCESS) {
         sshc->authed = TRUE;
-        infof(data, "Completed public key authentication\n");
-        state(conn, SSH_AUTH_DONE);
+        infof(data, "Completed public key authentication");
+        state(data, SSH_AUTH_DONE);
         break;
       }
       else {
-        infof(data, "Failed public key authentication (rc: %d)\n", rc);
+        infof(data, "Failed public key authentication (rc: %d)", rc);
         MOVE_TO_SECONDARY_AUTH;
       }
       break;
@@ -829,6 +840,7 @@
     case SSH_AUTH_GSSAPI:
       if(!(data->set.ssh_auth_types & CURLSSH_AUTH_GSSAPI)) {
         MOVE_TO_TERTIARY_AUTH;
+        break;
       }
 
       rc = ssh_userauth_gssapi(sshc->ssh_session);
@@ -840,8 +852,8 @@
       if(rc == SSH_AUTH_SUCCESS) {
         rc = SSH_OK;
         sshc->authed = TRUE;
-        infof(data, "Completed gssapi authentication\n");
-        state(conn, SSH_AUTH_DONE);
+        infof(data, "Completed gssapi authentication");
+        state(data, SSH_AUTH_DONE);
         break;
       }
 
@@ -850,7 +862,7 @@
 
     case SSH_AUTH_KEY_INIT:
       if(data->set.ssh_auth_types & CURLSSH_AUTH_KEYBOARD) {
-        state(conn, SSH_AUTH_KEY);
+        state(data, SSH_AUTH_KEY);
       }
       else {
         MOVE_TO_LAST_AUTH;
@@ -866,17 +878,18 @@
       }
       if(rc == SSH_OK) {
         sshc->authed = TRUE;
-        infof(data, "completed keyboard interactive authentication\n");
+        infof(data, "completed keyboard interactive authentication");
       }
-      state(conn, SSH_AUTH_DONE);
+      state(data, SSH_AUTH_DONE);
       break;
 
     case SSH_AUTH_PASS_INIT:
       if(!(data->set.ssh_auth_types & CURLSSH_AUTH_PASSWORD)) {
         /* Host key authentication is intentionally not implemented */
         MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
+        break;
       }
-      state(conn, SSH_AUTH_PASS);
+      state(data, SSH_AUTH_PASS);
       /* FALLTHROUGH */
 
     case SSH_AUTH_PASS:
@@ -888,8 +901,8 @@
 
       if(rc == SSH_AUTH_SUCCESS) {
         sshc->authed = TRUE;
-        infof(data, "Completed password authentication\n");
-        state(conn, SSH_AUTH_DONE);
+        infof(data, "Completed password authentication");
+        state(data, SSH_AUTH_DONE);
       }
       else {
         MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
@@ -906,19 +919,19 @@
       /*
        * At this point we have an authenticated ssh session.
        */
-      infof(data, "Authentication complete\n");
+      infof(data, "Authentication complete");
 
-      Curl_pgrsTime(conn->data, TIMER_APPCONNECT);      /* SSH is connected */
+      Curl_pgrsTime(data, TIMER_APPCONNECT);      /* SSH is connected */
 
       conn->sockfd = sock;
       conn->writesockfd = CURL_SOCKET_BAD;
 
       if(conn->handler->protocol == CURLPROTO_SFTP) {
-        state(conn, SSH_SFTP_INIT);
+        state(data, SSH_SFTP_INIT);
         break;
       }
-      infof(data, "SSH CONNECT phase done\n");
-      state(conn, SSH_STOP);
+      infof(data, "SSH CONNECT phase done");
+      state(data, SSH_STOP);
       break;
 
     case SSH_SFTP_INIT:
@@ -940,59 +953,59 @@
         MOVE_TO_ERROR_STATE(sftp_error_to_CURLE(rc));
         break;
       }
-      state(conn, SSH_SFTP_REALPATH);
+      state(data, SSH_SFTP_REALPATH);
       /* FALLTHROUGH */
     case SSH_SFTP_REALPATH:
       /*
        * Get the "home" directory
        */
       sshc->homedir = sftp_canonicalize_path(sshc->sftp_session, ".");
-      if(sshc->homedir == NULL) {
+      if(!sshc->homedir) {
         MOVE_TO_ERROR_STATE(CURLE_COULDNT_CONNECT);
+        break;
       }
-      conn->data->state.most_recent_ftp_entrypath = sshc->homedir;
+      data->state.most_recent_ftp_entrypath = sshc->homedir;
 
       /* This is the last step in the SFTP connect phase. Do note that while
          we get the homedir here, we get the "workingpath" in the DO action
          since the homedir will remain the same between request but the
          working path will not. */
-      DEBUGF(infof(data, "SSH CONNECT phase done\n"));
-      state(conn, SSH_STOP);
+      DEBUGF(infof(data, "SSH CONNECT phase done"));
+      state(data, SSH_STOP);
       break;
 
     case SSH_SFTP_QUOTE_INIT:
-
-      result = Curl_getworkingpath(conn, sshc->homedir, &protop->path);
+      result = Curl_getworkingpath(data, sshc->homedir, &protop->path);
       if(result) {
         sshc->actualcode = result;
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
       if(data->set.quote) {
-        infof(data, "Sending quote commands\n");
+        infof(data, "Sending quote commands");
         sshc->quote_item = data->set.quote;
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
-        state(conn, SSH_SFTP_GETINFO);
+        state(data, SSH_SFTP_GETINFO);
       }
       break;
 
     case SSH_SFTP_POSTQUOTE_INIT:
       if(data->set.postquote) {
-        infof(data, "Sending quote commands\n");
+        infof(data, "Sending quote commands");
         sshc->quote_item = data->set.postquote;
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       break;
 
     case SSH_SFTP_QUOTE:
       /* Send any quote commands */
-      sftp_quote(conn);
+      sftp_quote(data);
       break;
 
     case SSH_SFTP_NEXT_QUOTE:
@@ -1002,32 +1015,32 @@
       sshc->quote_item = sshc->quote_item->next;
 
       if(sshc->quote_item) {
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
         if(sshc->nextstate != SSH_NO_STATE) {
-          state(conn, sshc->nextstate);
+          state(data, sshc->nextstate);
           sshc->nextstate = SSH_NO_STATE;
         }
         else {
-          state(conn, SSH_SFTP_GETINFO);
+          state(data, SSH_SFTP_GETINFO);
         }
       }
       break;
 
     case SSH_SFTP_QUOTE_STAT:
-      sftp_quote_stat(conn);
+      sftp_quote_stat(data);
       break;
 
     case SSH_SFTP_QUOTE_SETSTAT:
       rc = sftp_setstat(sshc->sftp_session, sshc->quote_path2,
                         sshc->quote_attrs);
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
         failf(data, "Attempt to set SFTP stats failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         /* sshc->actualcode = sftp_error_to_CURLE(err);
@@ -1035,82 +1048,82 @@
          * the error the libssh2 backend is returning */
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_SYMLINK:
       rc = sftp_symlink(sshc->sftp_session, sshc->quote_path2,
                         sshc->quote_path1);
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
         failf(data, "symlink command failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_MKDIR:
       rc = sftp_mkdir(sshc->sftp_session, sshc->quote_path1,
                       (mode_t)data->set.new_directory_perms);
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         failf(data, "mkdir command failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_RENAME:
       rc = sftp_rename(sshc->sftp_session, sshc->quote_path1,
                        sshc->quote_path2);
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
         failf(data, "rename command failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_RMDIR:
       rc = sftp_rmdir(sshc->sftp_session, sshc->quote_path1);
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         failf(data, "rmdir command failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_UNLINK:
       rc = sftp_unlink(sshc->sftp_session, sshc->quote_path1);
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         Curl_safefree(sshc->quote_path1);
         failf(data, "rm command failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_STATVFS:
@@ -1122,7 +1135,7 @@
         Curl_safefree(sshc->quote_path1);
         failf(data, "statvfs command failed: %s",
               ssh_get_error(sshc->ssh_session));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
@@ -1145,29 +1158,29 @@
 
         if(!tmp) {
           result = CURLE_OUT_OF_MEMORY;
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           break;
         }
 
-        result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp));
+        result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
         free(tmp);
         if(result) {
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = result;
         }
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
     }
 
     case SSH_SFTP_GETINFO:
       if(data->set.get_filetime) {
-        state(conn, SSH_SFTP_FILETIME);
+        state(data, SSH_SFTP_FILETIME);
       }
       else {
-        state(conn, SSH_SFTP_TRANS_INIT);
+        state(data, SSH_SFTP_TRANS_INIT);
       }
       break;
 
@@ -1176,23 +1189,23 @@
       sftp_attributes attrs;
 
       attrs = sftp_stat(sshc->sftp_session, protop->path);
-      if(attrs != 0) {
+      if(attrs) {
         data->info.filetime = attrs->mtime;
         sftp_attributes_free(attrs);
       }
 
-      state(conn, SSH_SFTP_TRANS_INIT);
+      state(data, SSH_SFTP_TRANS_INIT);
       break;
     }
 
     case SSH_SFTP_TRANS_INIT:
       if(data->set.upload)
-        state(conn, SSH_SFTP_UPLOAD_INIT);
+        state(data, SSH_SFTP_UPLOAD_INIT);
       else {
         if(protop->path[strlen(protop->path)-1] == '/')
-          state(conn, SSH_SFTP_READDIR_INIT);
+          state(data, SSH_SFTP_READDIR_INIT);
         else
-          state(conn, SSH_SFTP_DOWNLOAD_INIT);
+          state(data, SSH_SFTP_DOWNLOAD_INIT);
       }
       break;
 
@@ -1200,16 +1213,17 @@
     {
       int flags;
 
-      if(data->state.resume_from != 0) {
+      if(data->state.resume_from) {
         sftp_attributes attrs;
 
         if(data->state.resume_from < 0) {
           attrs = sftp_stat(sshc->sftp_session, protop->path);
-          if(attrs != 0) {
+          if(attrs) {
             curl_off_t size = attrs->size;
             if(size < 0) {
               failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
               MOVE_TO_ERROR_STATE(CURLE_BAD_DOWNLOAD_RESUME);
+              break;
             }
             data->state.resume_from = attrs->size;
 
@@ -1221,14 +1235,14 @@
         }
       }
 
-      if(data->set.ftp_append)
+      if(data->set.remote_append)
         /* Try to open for append, but create if nonexisting */
         flags = O_WRONLY|O_CREAT|O_APPEND;
       else if(data->state.resume_from > 0)
         /* If we have restart position then open for append */
         flags = O_WRONLY|O_APPEND;
       else
-        /* Clear file before writing (normal behaviour) */
+        /* Clear file before writing (normal behavior) */
         flags = O_WRONLY|O_CREAT|O_TRUNC;
 
       if(sshc->sftp_file)
@@ -1246,11 +1260,12 @@
                /* try to create the path remotely */
                rc = 0;
                sshc->secondCreateDirs = 1;
-               state(conn, SSH_SFTP_CREATE_DIRS_INIT);
+               state(data, SSH_SFTP_CREATE_DIRS_INIT);
                break;
         }
         else {
           MOVE_TO_SFTP_CLOSE_STATE();
+          break;
         }
       }
 
@@ -1289,8 +1304,11 @@
                  CURL_READFUNC_ABORT return code still aborts */
               failf(data, "Failed to read data");
               MOVE_TO_ERROR_STATE(CURLE_FTP_COULDNT_USE_REST);
+              break;
             }
           } while(passed < data->state.resume_from);
+          if(rc)
+            break;
         }
 
         /* now, decrease the size of the read */
@@ -1301,8 +1319,9 @@
         }
 
         rc = sftp_seek64(sshc->sftp_file, data->state.resume_from);
-        if(rc != 0) {
+        if(rc) {
           MOVE_TO_SFTP_CLOSE_STATE();
+          break;
         }
       }
       if(data->state.infilesize > 0) {
@@ -1329,17 +1348,17 @@
          timeout here */
       Curl_expire(data, 0, EXPIRE_RUN_NOW);
 
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
     }
 
     case SSH_SFTP_CREATE_DIRS_INIT:
       if(strlen(protop->path) > 1) {
         sshc->slash_pos = protop->path + 1; /* ignore the leading '/' */
-        state(conn, SSH_SFTP_CREATE_DIRS);
+        state(data, SSH_SFTP_CREATE_DIRS);
       }
       else {
-        state(conn, SSH_SFTP_UPLOAD_INIT);
+        state(data, SSH_SFTP_UPLOAD_INIT);
       }
       break;
 
@@ -1348,11 +1367,11 @@
       if(sshc->slash_pos) {
         *sshc->slash_pos = 0;
 
-        infof(data, "Creating directory '%s'\n", protop->path);
-        state(conn, SSH_SFTP_CREATE_DIRS_MKDIR);
+        infof(data, "Creating directory '%s'", protop->path);
+        state(data, SSH_SFTP_CREATE_DIRS_MKDIR);
         break;
       }
-      state(conn, SSH_SFTP_UPLOAD_INIT);
+      state(data, SSH_SFTP_UPLOAD_INIT);
       break;
 
     case SSH_SFTP_CREATE_DIRS_MKDIR:
@@ -1372,16 +1391,17 @@
            (err != SSH_FX_FAILURE) &&
            (err != SSH_FX_PERMISSION_DENIED)) {
           MOVE_TO_SFTP_CLOSE_STATE();
+          break;
         }
         rc = 0; /* clear rc and continue */
       }
-      state(conn, SSH_SFTP_CREATE_DIRS);
+      state(data, SSH_SFTP_CREATE_DIRS);
       break;
 
     case SSH_SFTP_READDIR_INIT:
       Curl_pgrsSetDownloadSize(data, -1);
       if(data->set.opt_no_body) {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
@@ -1395,8 +1415,9 @@
         failf(data, "Could not open directory for reading: %s",
               ssh_get_error(sshc->ssh_session));
         MOVE_TO_SFTP_CLOSE_STATE();
+        break;
       }
-      state(conn, SSH_SFTP_READDIR);
+      state(data, SSH_SFTP_READDIR);
       break;
 
     case SSH_SFTP_READDIR:
@@ -1410,21 +1431,21 @@
         sshc->readdir_longentry = sshc->readdir_attrs->longname;
         sshc->readdir_len = strlen(sshc->readdir_filename);
 
-        if(data->set.ftp_list_only) {
+        if(data->set.list_only) {
           char *tmpLine;
 
           tmpLine = aprintf("%s\n", sshc->readdir_filename);
-          if(tmpLine == NULL) {
-            state(conn, SSH_SFTP_CLOSE);
+          if(!tmpLine) {
+            state(data, SSH_SFTP_CLOSE);
             sshc->actualcode = CURLE_OUT_OF_MEMORY;
             break;
           }
-          result = Curl_client_write(conn, CLIENTWRITE_BODY,
+          result = Curl_client_write(data, CLIENTWRITE_BODY,
                                      tmpLine, sshc->readdir_len + 1);
           free(tmpLine);
 
           if(result) {
-            state(conn, SSH_STOP);
+            state(data, SSH_STOP);
             break;
           }
           /* since this counts what we send to the client, we include the
@@ -1432,18 +1453,15 @@
           data->req.bytecount += sshc->readdir_len + 1;
 
           /* output debug output if that is requested */
-          if(data->set.verbose) {
-            Curl_debug(data, CURLINFO_DATA_OUT,
-                       (char *)sshc->readdir_filename,
-                       sshc->readdir_len);
-          }
+          Curl_debug(data, CURLINFO_DATA_OUT, (char *)sshc->readdir_filename,
+                     sshc->readdir_len);
         }
         else {
           sshc->readdir_currLen = strlen(sshc->readdir_longentry);
           sshc->readdir_totalLen = 80 + sshc->readdir_currLen;
           sshc->readdir_line = calloc(sshc->readdir_totalLen, 1);
           if(!sshc->readdir_line) {
-            state(conn, SSH_SFTP_CLOSE);
+            state(data, SSH_SFTP_CLOSE);
             sshc->actualcode = CURLE_OUT_OF_MEMORY;
             break;
           }
@@ -1453,25 +1471,24 @@
           if((sshc->readdir_attrs->flags & SSH_FILEXFER_ATTR_PERMISSIONS) &&
              ((sshc->readdir_attrs->permissions & S_IFMT) ==
               S_IFLNK)) {
-            sshc->readdir_linkPath = malloc(PATH_MAX + 1);
-            if(sshc->readdir_linkPath == NULL) {
-              state(conn, SSH_SFTP_CLOSE);
+            sshc->readdir_linkPath = aprintf("%s%s", protop->path,
+                                             sshc->readdir_filename);
+
+            if(!sshc->readdir_linkPath) {
+              state(data, SSH_SFTP_CLOSE);
               sshc->actualcode = CURLE_OUT_OF_MEMORY;
               break;
             }
 
-            msnprintf(sshc->readdir_linkPath, PATH_MAX, "%s%s", protop->path,
-                      sshc->readdir_filename);
-
-            state(conn, SSH_SFTP_READDIR_LINK);
+            state(data, SSH_SFTP_READDIR_LINK);
             break;
           }
-          state(conn, SSH_SFTP_READDIR_BOTTOM);
+          state(data, SSH_SFTP_READDIR_BOTTOM);
           break;
         }
       }
       else if(sftp_dir_eof(sshc->sftp_dir)) {
-        state(conn, SSH_SFTP_READDIR_DONE);
+        state(data, SSH_SFTP_READDIR_DONE);
         break;
       }
       else {
@@ -1492,12 +1509,13 @@
         failf(data, "Could not read symlink for reading: %s",
               ssh_get_error(sshc->ssh_session));
         MOVE_TO_SFTP_CLOSE_STATE();
+        break;
       }
 
-      if(sshc->readdir_link_attrs->name == NULL) {
+      if(!sshc->readdir_link_attrs->name) {
         sshc->readdir_tmp = sftp_readlink(sshc->sftp_session,
                                           sshc->readdir_linkPath);
-        if(sshc->readdir_filename == NULL)
+        if(!sshc->readdir_filename)
           sshc->readdir_len = 0;
         else
           sshc->readdir_len = strlen(sshc->readdir_tmp);
@@ -1518,7 +1536,7 @@
                                           sshc->readdir_totalLen);
       if(!new_readdir_line) {
         sshc->readdir_line = NULL;
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = CURLE_OUT_OF_MEMORY;
         break;
       }
@@ -1536,24 +1554,21 @@
       sshc->readdir_filename = NULL;
       sshc->readdir_longentry = NULL;
 
-      state(conn, SSH_SFTP_READDIR_BOTTOM);
+      state(data, SSH_SFTP_READDIR_BOTTOM);
       /* FALLTHROUGH */
     case SSH_SFTP_READDIR_BOTTOM:
       sshc->readdir_currLen += msnprintf(sshc->readdir_line +
                                          sshc->readdir_currLen,
                                          sshc->readdir_totalLen -
                                          sshc->readdir_currLen, "\n");
-      result = Curl_client_write(conn, CLIENTWRITE_BODY,
+      result = Curl_client_write(data, CLIENTWRITE_BODY,
                                  sshc->readdir_line,
                                  sshc->readdir_currLen);
 
       if(!result) {
-
         /* output debug output if that is requested */
-        if(data->set.verbose) {
-          Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_line,
-                     sshc->readdir_currLen);
-        }
+        Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_line,
+                   sshc->readdir_currLen);
         data->req.bytecount += sshc->readdir_currLen;
       }
       Curl_safefree(sshc->readdir_line);
@@ -1561,10 +1576,10 @@
       sshc->readdir_tmp = NULL;
 
       if(result) {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       else
-        state(conn, SSH_SFTP_READDIR);
+        state(data, SSH_SFTP_READDIR);
       break;
 
     case SSH_SFTP_READDIR_DONE:
@@ -1573,7 +1588,7 @@
 
       /* no data to transfer */
       Curl_setup_transfer(data, -1, -1, FALSE, -1);
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
 
     case SSH_SFTP_DOWNLOAD_INIT:
@@ -1590,9 +1605,10 @@
               ssh_get_error(sshc->ssh_session));
 
         MOVE_TO_SFTP_CLOSE_STATE();
+        break;
       }
 
-      state(conn, SSH_SFTP_DOWNLOAD_STAT);
+      state(data, SSH_SFTP_DOWNLOAD_STAT);
       break;
 
     case SSH_SFTP_DOWNLOAD_STAT:
@@ -1624,14 +1640,14 @@
           failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
           return CURLE_BAD_DOWNLOAD_RESUME;
         }
-        if(conn->data->state.use_range) {
+        if(data->state.use_range) {
           curl_off_t from, to;
           char *ptr;
           char *ptr2;
           CURLofft to_t;
           CURLofft from_t;
 
-          from_t = curlx_strtoofft(conn->data->state.range, &ptr, 0, &from);
+          from_t = curlx_strtoofft(data->state.range, &ptr, 0, &from);
           if(from_t == CURL_OFFT_FLOW) {
             return CURLE_RANGE_ERROR;
           }
@@ -1665,8 +1681,9 @@
           }
 
           rc = sftp_seek64(sshc->sftp_file, from);
-          if(rc != 0) {
+          if(rc) {
             MOVE_TO_SFTP_CLOSE_STATE();
+            break;
           }
         }
         data->req.size = size;
@@ -1703,8 +1720,9 @@
                                  size - data->state.resume_from);
 
         rc = sftp_seek64(sshc->sftp_file, data->state.resume_from);
-        if(rc != 0) {
+        if(rc) {
           MOVE_TO_SFTP_CLOSE_STATE();
+          break;
         }
       }
     }
@@ -1713,8 +1731,8 @@
     if(data->req.size == 0) {
       /* no data to transfer */
       Curl_setup_transfer(data, -1, -1, FALSE, -1);
-      infof(data, "File already completely downloaded\n");
-      state(conn, SSH_STOP);
+      infof(data, "File already completely downloaded");
+      state(data, SSH_STOP);
       break;
     }
     Curl_setup_transfer(data, FIRSTSOCKET, data->req.size, FALSE, -1);
@@ -1730,12 +1748,12 @@
     if(result) {
       /* this should never occur; the close state should be entered
          at the time the error occurs */
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->actualcode = result;
     }
     else {
       sshc->sftp_recv_state = 0;
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
     }
     break;
 
@@ -1746,18 +1764,18 @@
       }
       Curl_safefree(protop->path);
 
-      DEBUGF(infof(data, "SFTP DONE done\n"));
+      DEBUGF(infof(data, "SFTP DONE done"));
 
       /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
          After nextstate is executed, the control should come back to
          SSH_SFTP_CLOSE to pass the correct result back  */
       if(sshc->nextstate != SSH_NO_STATE &&
          sshc->nextstate != SSH_SFTP_CLOSE) {
-        state(conn, sshc->nextstate);
+        state(data, sshc->nextstate);
         sshc->nextstate = SSH_SFTP_CLOSE;
       }
       else {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         result = sshc->actualcode;
       }
       break;
@@ -1778,17 +1796,16 @@
       }
 
       SSH_STRING_FREE_CHAR(sshc->homedir);
-      conn->data->state.most_recent_ftp_entrypath = NULL;
+      data->state.most_recent_ftp_entrypath = NULL;
 
-      state(conn, SSH_SESSION_DISCONNECT);
+      state(data, SSH_SESSION_DISCONNECT);
       break;
 
-
     case SSH_SCP_TRANS_INIT:
-      result = Curl_getworkingpath(conn, sshc->homedir, &protop->path);
+      result = Curl_getworkingpath(data, sshc->homedir, &protop->path);
       if(result) {
         sshc->actualcode = result;
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
@@ -1800,21 +1817,22 @@
           failf(data, "SCP requires a known file size for upload");
           sshc->actualcode = CURLE_UPLOAD_FAILED;
           MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED);
+          break;
         }
 
         sshc->scp_session =
           ssh_scp_new(sshc->ssh_session, SSH_SCP_WRITE, protop->path);
-        state(conn, SSH_SCP_UPLOAD_INIT);
+        state(data, SSH_SCP_UPLOAD_INIT);
       }
       else {
         sshc->scp_session =
           ssh_scp_new(sshc->ssh_session, SSH_SCP_READ, protop->path);
-        state(conn, SSH_SCP_DOWNLOAD_INIT);
+        state(data, SSH_SCP_DOWNLOAD_INIT);
       }
 
       if(!sshc->scp_session) {
         err_msg = ssh_get_error(sshc->ssh_session);
-        failf(conn->data, "%s", err_msg);
+        failf(data, "%s", err_msg);
         MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED);
       }
 
@@ -1825,8 +1843,9 @@
       rc = ssh_scp_init(sshc->scp_session);
       if(rc != SSH_OK) {
         err_msg = ssh_get_error(sshc->ssh_session);
-        failf(conn->data, "%s", err_msg);
+        failf(data, "%s", err_msg);
         MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED);
+        break;
       }
 
       rc = ssh_scp_push_file(sshc->scp_session, protop->path,
@@ -1834,8 +1853,9 @@
                              (int)data->set.new_file_perms);
       if(rc != SSH_OK) {
         err_msg = ssh_get_error(sshc->ssh_session);
-        failf(conn->data, "%s", err_msg);
+        failf(data, "%s", err_msg);
         MOVE_TO_ERROR_STATE(CURLE_UPLOAD_FAILED);
+        break;
       }
 
       /* upload data */
@@ -1853,7 +1873,7 @@
          with both accordingly */
       conn->cselect_bits = CURL_CSELECT_OUT;
 
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
 
       break;
 
@@ -1862,10 +1882,11 @@
       rc = ssh_scp_init(sshc->scp_session);
       if(rc != SSH_OK) {
         err_msg = ssh_get_error(sshc->ssh_session);
-        failf(conn->data, "%s", err_msg);
+        failf(data, "%s", err_msg);
         MOVE_TO_ERROR_STATE(CURLE_COULDNT_CONNECT);
+        break;
       }
-      state(conn, SSH_SCP_DOWNLOAD);
+      state(data, SSH_SCP_DOWNLOAD);
       /* FALLTHROUGH */
 
     case SSH_SCP_DOWNLOAD:{
@@ -1874,7 +1895,7 @@
         rc = ssh_scp_pull_request(sshc->scp_session);
         if(rc != SSH_SCP_REQUEST_NEWFILE) {
           err_msg = ssh_get_error(sshc->ssh_session);
-          failf(conn->data, "%s", err_msg);
+          failf(data, "%s", err_msg);
           MOVE_TO_ERROR_STATE(CURLE_REMOTE_FILE_NOT_FOUND);
           break;
         }
@@ -1892,14 +1913,14 @@
            with both accordingly */
         conn->cselect_bits = CURL_CSELECT_IN;
 
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
     case SSH_SCP_DONE:
       if(data->set.upload)
-        state(conn, SSH_SCP_SEND_EOF);
+        state(data, SSH_SCP_SEND_EOF);
       else
-        state(conn, SSH_SCP_CHANNEL_FREE);
+        state(data, SSH_SCP_CHANNEL_FREE);
       break;
 
     case SSH_SCP_SEND_EOF:
@@ -1912,12 +1933,12 @@
           break;
         }
         if(rc != SSH_OK) {
-          infof(data, "Failed to close libssh scp channel: %s\n",
+          infof(data, "Failed to close libssh scp channel: %s",
                 ssh_get_error(sshc->ssh_session));
         }
       }
 
-      state(conn, SSH_SCP_CHANNEL_FREE);
+      state(data, SSH_SCP_CHANNEL_FREE);
       break;
 
     case SSH_SCP_CHANNEL_FREE:
@@ -1925,11 +1946,11 @@
         ssh_scp_free(sshc->scp_session);
         sshc->scp_session = NULL;
       }
-      DEBUGF(infof(data, "SCP DONE phase complete\n"));
+      DEBUGF(infof(data, "SCP DONE phase complete"));
 
       ssh_set_blocking(sshc->ssh_session, 0);
 
-      state(conn, SSH_SESSION_DISCONNECT);
+      state(data, SSH_SESSION_DISCONNECT);
       /* FALLTHROUGH */
 
     case SSH_SESSION_DISCONNECT:
@@ -1944,9 +1965,9 @@
       ssh_disconnect(sshc->ssh_session);
 
       SSH_STRING_FREE_CHAR(sshc->homedir);
-      conn->data->state.most_recent_ftp_entrypath = NULL;
+      data->state.most_recent_ftp_entrypath = NULL;
 
-      state(conn, SSH_SESSION_FREE);
+      state(data, SSH_SESSION_FREE);
       /* FALLTHROUGH */
     case SSH_SESSION_FREE:
       if(sshc->ssh_session) {
@@ -1994,7 +2015,7 @@
       connclose(conn, "SSH session free");
       sshc->state = SSH_SESSION_FREE;   /* current */
       sshc->nextstate = SSH_NO_STATE;
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
 
     case SSH_QUIT:
@@ -2002,7 +2023,7 @@
     default:
       /* internal error */
       sshc->nextstate = SSH_NO_STATE;
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
 
     }
@@ -2021,10 +2042,12 @@
 
 /* called by the multi interface to figure out what socket(s) to wait for and
    for what actions in the DO_DONE, PERFORM and WAITPERFORM states */
-static int myssh_perform_getsock(const struct connectdata *conn,
-                                 curl_socket_t *sock)
+static int myssh_getsock(struct Curl_easy *data,
+                         struct connectdata *conn,
+                         curl_socket_t *sock)
 {
   int bitmap = GETSOCK_BLANK;
+  (void)data;
   sock[0] = conn->sock[FIRSTSOCKET];
 
   if(conn->waitfor & KEEP_RECV)
@@ -2036,16 +2059,6 @@
   return bitmap;
 }
 
-/* Generic function called by the multi interface to figure out what socket(s)
-   to wait for and for what actions during the DOING and PROTOCONNECT states*/
-static int myssh_getsock(struct connectdata *conn,
-                         curl_socket_t *sock)
-{
-  /* if we know the direction we can use the generic *_getsock() function even
-     for the protocol_connect and doing states */
-  return myssh_perform_getsock(conn, sock);
-}
-
 static void myssh_block2waitfor(struct connectdata *conn, bool block)
 {
   struct ssh_conn *sshc = &conn->proto.sshc;
@@ -2067,13 +2080,14 @@
 }
 
 /* called repeatedly until done from multi.c */
-static CURLcode myssh_multi_statemach(struct connectdata *conn,
+static CURLcode myssh_multi_statemach(struct Curl_easy *data,
                                       bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   bool block;    /* we store the status and use that to provide a ssh_getsock()
                     implementation */
-  CURLcode result = myssh_statemach_act(conn, &block);
+  CURLcode result = myssh_statemach_act(data, &block);
 
   *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
   myssh_block2waitfor(conn, block);
@@ -2081,24 +2095,24 @@
   return result;
 }
 
-static CURLcode myssh_block_statemach(struct connectdata *conn,
+static CURLcode myssh_block_statemach(struct Curl_easy *data,
                                       bool disconnect)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
 
   while((sshc->state != SSH_STOP) && !result) {
     bool block;
     timediff_t left = 1000;
     struct curltime now = Curl_now();
 
-    result = myssh_statemach_act(conn, &block);
+    result = myssh_statemach_act(data, &block);
     if(result)
       break;
 
     if(!disconnect) {
-      if(Curl_pgrsUpdate(conn))
+      if(Curl_pgrsUpdate(data))
         return CURLE_ABORTED_BY_CALLBACK;
 
       result = Curl_speedcheck(data, now);
@@ -2127,11 +2141,13 @@
 /*
  * SSH setup connection
  */
-static CURLcode myssh_setup_connection(struct connectdata *conn)
+static CURLcode myssh_setup_connection(struct Curl_easy *data,
+                                       struct connectdata *conn)
 {
   struct SSHPROTO *ssh;
+  (void)conn;
 
-  conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO));
+  data->req.p.ssh = ssh = calloc(1, sizeof(struct SSHPROTO));
   if(!ssh)
     return CURLE_OUT_OF_MEMORY;
 
@@ -2145,17 +2161,17 @@
  * Curl_ssh_connect() gets called from Curl_protocol_connect() to allow us to
  * do protocol-specific actions at connect-time.
  */
-static CURLcode myssh_connect(struct connectdata *conn, bool *done)
+static CURLcode myssh_connect(struct Curl_easy *data, bool *done)
 {
   struct ssh_conn *ssh;
   CURLcode result;
+  struct connectdata *conn = data->conn;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  struct Curl_easy *data = conn->data;
   int rc;
 
   /* initialize per-handle data if not already */
-  if(!data->req.protop)
-    myssh_setup_connection(conn);
+  if(!data->req.p.ssh)
+    myssh_setup_connection(data, conn);
 
   /* We default to persistent connections. We set this already in this connect
      function to make the re-use checks properly be able to check this bit. */
@@ -2173,7 +2189,7 @@
   ssh = &conn->proto.sshc;
 
   ssh->ssh_session = ssh_new();
-  if(ssh->ssh_session == NULL) {
+  if(!ssh->ssh_session) {
     failf(data, "Failure initialising ssh session");
     return CURLE_FAILED_INIT;
   }
@@ -2197,7 +2213,7 @@
   }
 
   if(conn->user && conn->user[0] != '\0') {
-    infof(data, "User: %s\n", conn->user);
+    infof(data, "User: %s", conn->user);
     rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_USER, conn->user);
     if(rc != SSH_OK) {
       failf(data, "Could not set user");
@@ -2206,7 +2222,7 @@
   }
 
   if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
-    infof(data, "Known hosts: %s\n", data->set.str[STRING_SSH_KNOWNHOSTS]);
+    infof(data, "Known hosts: %s", data->set.str[STRING_SSH_KNOWNHOSTS]);
     rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_KNOWNHOSTS,
                          data->set.str[STRING_SSH_KNOWNHOSTS]);
     if(rc != SSH_OK) {
@@ -2248,22 +2264,22 @@
   /* we do not verify here, we do it at the state machine,
    * after connection */
 
-  state(conn, SSH_INIT);
+  state(data, SSH_INIT);
 
-  result = myssh_multi_statemach(conn, done);
+  result = myssh_multi_statemach(data, done);
 
   return result;
 }
 
 /* called from multi.c while DOing */
-static CURLcode scp_doing(struct connectdata *conn, bool *dophase_done)
+static CURLcode scp_doing(struct Curl_easy *data, bool *dophase_done)
 {
   CURLcode result;
 
-  result = myssh_multi_statemach(conn, dophase_done);
+  result = myssh_multi_statemach(data, dophase_done);
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
   return result;
 }
@@ -2278,34 +2294,35 @@
  */
 
 static
-CURLcode scp_perform(struct connectdata *conn,
+CURLcode scp_perform(struct Curl_easy *data,
                      bool *connected, bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
   *dophase_done = FALSE;        /* not done yet */
 
   /* start the first command in the DO phase */
-  state(conn, SSH_SCP_TRANS_INIT);
+  state(data, SSH_SCP_TRANS_INIT);
 
-  result = myssh_multi_statemach(conn, dophase_done);
+  result = myssh_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
 }
 
-static CURLcode myssh_do_it(struct connectdata *conn, bool *done)
+static CURLcode myssh_do_it(struct Curl_easy *data, bool *done)
 {
   CURLcode result;
   bool connected = 0;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 
   *done = FALSE;                /* default to false */
@@ -2322,9 +2339,9 @@
   Curl_pgrsSetDownloadSize(data, -1);
 
   if(conn->handler->protocol & CURLPROTO_SCP)
-    result = scp_perform(conn, &connected, done);
+    result = scp_perform(data, &connected, done);
   else
-    result = sftp_perform(conn, &connected, done);
+    result = sftp_perform(data, &connected, done);
 
   return result;
 }
@@ -2332,7 +2349,8 @@
 /* BLOCKING, but the function is using the state machine so the only reason
    this is still blocking is that the multi interface code has no support for
    disconnecting operations that takes a while */
-static CURLcode scp_disconnect(struct connectdata *conn,
+static CURLcode scp_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn,
                                bool dead_connection)
 {
   CURLcode result = CURLE_OK;
@@ -2342,9 +2360,9 @@
   if(ssh->ssh_session) {
     /* only if there's a session still around to use! */
 
-    state(conn, SSH_SESSION_DISCONNECT);
+    state(data, SSH_SESSION_DISCONNECT);
 
-    result = myssh_block_statemach(conn, TRUE);
+    result = myssh_block_statemach(data, TRUE);
   }
 
   return result;
@@ -2352,44 +2370,45 @@
 
 /* generic done function for both SCP and SFTP called from their specific
    done functions */
-static CURLcode myssh_done(struct connectdata *conn, CURLcode status)
+static CURLcode myssh_done(struct Curl_easy *data, CURLcode status)
 {
   CURLcode result = CURLE_OK;
-  struct SSHPROTO *protop = conn->data->req.protop;
+  struct SSHPROTO *protop = data->req.p.ssh;
 
   if(!status) {
     /* run the state-machine */
-    result = myssh_block_statemach(conn, FALSE);
+    result = myssh_block_statemach(data, FALSE);
   }
   else
     result = status;
 
   if(protop)
     Curl_safefree(protop->path);
-  if(Curl_pgrsDone(conn))
+  if(Curl_pgrsDone(data))
     return CURLE_ABORTED_BY_CALLBACK;
 
-  conn->data->req.keepon = 0;   /* clear all bits */
+  data->req.keepon = 0;   /* clear all bits */
   return result;
 }
 
 
-static CURLcode scp_done(struct connectdata *conn, CURLcode status,
+static CURLcode scp_done(struct Curl_easy *data, CURLcode status,
                          bool premature)
 {
   (void) premature;             /* not used */
 
   if(!status)
-    state(conn, SSH_SCP_DONE);
+    state(data, SSH_SCP_DONE);
 
-  return myssh_done(conn, status);
+  return myssh_done(data, status);
 
 }
 
-static ssize_t scp_send(struct connectdata *conn, int sockindex,
+static ssize_t scp_send(struct Curl_easy *data, int sockindex,
                         const void *mem, size_t len, CURLcode *err)
 {
   int rc;
+  struct connectdata *conn = data->conn;
   (void) sockindex; /* we only support SCP on the fixed known primary socket */
   (void) err;
 
@@ -2415,10 +2434,11 @@
   return len;
 }
 
-static ssize_t scp_recv(struct connectdata *conn, int sockindex,
+static ssize_t scp_recv(struct Curl_easy *data, int sockindex,
                         char *mem, size_t len, CURLcode *err)
 {
   ssize_t nread;
+  struct connectdata *conn = data->conn;
   (void) err;
   (void) sockindex; /* we only support SCP on the fixed known primary socket */
 
@@ -2454,38 +2474,39 @@
  */
 
 static
-CURLcode sftp_perform(struct connectdata *conn,
+CURLcode sftp_perform(struct Curl_easy *data,
                       bool *connected,
                       bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
   *dophase_done = FALSE; /* not done yet */
 
   /* start the first command in the DO phase */
-  state(conn, SSH_SFTP_QUOTE_INIT);
+  state(data, SSH_SFTP_QUOTE_INIT);
 
   /* run the state-machine */
-  result = myssh_multi_statemach(conn, dophase_done);
+  result = myssh_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
 }
 
 /* called from multi.c while DOing */
-static CURLcode sftp_doing(struct connectdata *conn,
+static CURLcode sftp_doing(struct Curl_easy *data,
                            bool *dophase_done)
 {
-  CURLcode result = myssh_multi_statemach(conn, dophase_done);
+  CURLcode result = myssh_multi_statemach(data, dophase_done);
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
   return result;
 }
@@ -2493,46 +2514,50 @@
 /* BLOCKING, but the function is using the state machine so the only reason
    this is still blocking is that the multi interface code has no support for
    disconnecting operations that takes a while */
-static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode sftp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
+                                bool dead_connection)
 {
   CURLcode result = CURLE_OK;
   (void) dead_connection;
 
-  DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));
+  DEBUGF(infof(data, "SSH DISCONNECT starts now"));
 
   if(conn->proto.sshc.ssh_session) {
     /* only if there's a session still around to use! */
-    state(conn, SSH_SFTP_SHUTDOWN);
-    result = myssh_block_statemach(conn, TRUE);
+    state(data, SSH_SFTP_SHUTDOWN);
+    result = myssh_block_statemach(data, TRUE);
   }
 
-  DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n"));
+  DEBUGF(infof(data, "SSH DISCONNECT is done"));
 
   return result;
 
 }
 
-static CURLcode sftp_done(struct connectdata *conn, CURLcode status,
-                               bool premature)
+static CURLcode sftp_done(struct Curl_easy *data, CURLcode status,
+                          bool premature)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 
   if(!status) {
     /* Post quote commands are executed after the SFTP_CLOSE state to avoid
        errors that could happen due to open file handles during POSTQUOTE
        operation */
-    if(!premature && conn->data->set.postquote && !conn->bits.retry)
+    if(!premature && data->set.postquote && !conn->bits.retry)
       sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
-    state(conn, SSH_SFTP_CLOSE);
+    state(data, SSH_SFTP_CLOSE);
   }
-  return myssh_done(conn, status);
+  return myssh_done(data, status);
 }
 
 /* return number of sent bytes */
-static ssize_t sftp_send(struct connectdata *conn, int sockindex,
+static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
                          const void *mem, size_t len, CURLcode *err)
 {
   ssize_t nwrite;
+  struct connectdata *conn = data->conn;
   (void)sockindex;
 
   nwrite = sftp_write(conn->proto.sshc.sftp_file, mem, len);
@@ -2558,10 +2583,11 @@
  * Return number of received (decrypted) bytes
  * or <0 on error
  */
-static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
+static ssize_t sftp_recv(struct Curl_easy *data, int sockindex,
                          char *mem, size_t len, CURLcode *err)
 {
   ssize_t nread;
+  struct connectdata *conn = data->conn;
   (void)sockindex;
 
   DEBUGASSERT(len < CURL_MAX_READ_SIZE);
@@ -2569,8 +2595,8 @@
   switch(conn->proto.sshc.sftp_recv_state) {
     case 0:
       conn->proto.sshc.sftp_file_index =
-            sftp_async_read_begin(conn->proto.sshc.sftp_file,
-                                  (uint32_t)len);
+        sftp_async_read_begin(conn->proto.sshc.sftp_file,
+                              (uint32_t)len);
       if(conn->proto.sshc.sftp_file_index < 0) {
         *err = CURLE_RECV_ERROR;
         return -1;
@@ -2604,11 +2630,11 @@
   }
 }
 
-static void sftp_quote(struct connectdata *conn)
+static void sftp_quote(struct Curl_easy *data)
 {
   const char *cp;
-  struct Curl_easy *data = conn->data;
-  struct SSHPROTO *protop = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SSHPROTO *protop = data->req.p.ssh;
   struct ssh_conn *sshc = &conn->proto.sshc;
   CURLcode result;
 
@@ -2634,26 +2660,25 @@
                         protop->path);
     if(!tmp) {
       sshc->actualcode = CURLE_OUT_OF_MEMORY;
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       return;
     }
-    if(data->set.verbose) {
-      Curl_debug(data, CURLINFO_HEADER_OUT, (char *) "PWD\n", 4);
-      Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
-    }
+    Curl_debug(data, CURLINFO_HEADER_OUT, (char *) "PWD\n", 4);
+    Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
+
     /* this sends an FTP-like "header" to the header callback so that the
        current directory can be read very similar to how it is read when
        using ordinary FTP. */
-    result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp));
+    result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
     free(tmp);
     if(result) {
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = result;
     }
     else
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
     return;
   }
 
@@ -2662,9 +2687,9 @@
    * command with a space so we can check for it unconditionally
    */
   cp = strchr(cmd, ' ');
-  if(cp == NULL) {
+  if(!cp) {
     failf(data, "Syntax error in SFTP command. Supply parameter(s)!");
-    state(conn, SSH_SFTP_CLOSE);
+    state(data, SSH_SFTP_CLOSE);
     sshc->nextstate = SSH_NO_STATE;
     sshc->actualcode = CURLE_QUOTE_ERROR;
     return;
@@ -2680,7 +2705,7 @@
       failf(data, "Out of memory");
     else
       failf(data, "Syntax error: Bad first parameter");
-    state(conn, SSH_SFTP_CLOSE);
+    state(data, SSH_SFTP_CLOSE);
     sshc->nextstate = SSH_NO_STATE;
     sshc->actualcode = result;
     return;
@@ -2709,13 +2734,13 @@
         failf(data, "Syntax error in chgrp/chmod/chown/atime/mtime: "
               "Bad second parameter");
       Curl_safefree(sshc->quote_path1);
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = result;
       return;
     }
     sshc->quote_attrs = NULL;
-    state(conn, SSH_SFTP_QUOTE_STAT);
+    state(data, SSH_SFTP_QUOTE_STAT);
     return;
   }
   if(strncasecompare(cmd, "ln ", 3) ||
@@ -2730,17 +2755,17 @@
       else
         failf(data, "Syntax error in ln/symlink: Bad second parameter");
       Curl_safefree(sshc->quote_path1);
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = result;
       return;
     }
-    state(conn, SSH_SFTP_QUOTE_SYMLINK);
+    state(data, SSH_SFTP_QUOTE_SYMLINK);
     return;
   }
   else if(strncasecompare(cmd, "mkdir ", 6)) {
     /* create dir */
-    state(conn, SSH_SFTP_QUOTE_MKDIR);
+    state(data, SSH_SFTP_QUOTE_MKDIR);
     return;
   }
   else if(strncasecompare(cmd, "rename ", 7)) {
@@ -2754,26 +2779,26 @@
       else
         failf(data, "Syntax error in rename: Bad second parameter");
       Curl_safefree(sshc->quote_path1);
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = result;
       return;
     }
-    state(conn, SSH_SFTP_QUOTE_RENAME);
+    state(data, SSH_SFTP_QUOTE_RENAME);
     return;
   }
   else if(strncasecompare(cmd, "rmdir ", 6)) {
     /* delete dir */
-    state(conn, SSH_SFTP_QUOTE_RMDIR);
+    state(data, SSH_SFTP_QUOTE_RMDIR);
     return;
   }
   else if(strncasecompare(cmd, "rm ", 3)) {
-    state(conn, SSH_SFTP_QUOTE_UNLINK);
+    state(data, SSH_SFTP_QUOTE_UNLINK);
     return;
   }
 #ifdef HAS_STATVFS_SUPPORT
   else if(strncasecompare(cmd, "statvfs ", 8)) {
-    state(conn, SSH_SFTP_QUOTE_STATVFS);
+    state(data, SSH_SFTP_QUOTE_STATVFS);
     return;
   }
 #endif
@@ -2781,14 +2806,14 @@
   failf(data, "Unknown SFTP command");
   Curl_safefree(sshc->quote_path1);
   Curl_safefree(sshc->quote_path2);
-  state(conn, SSH_SFTP_CLOSE);
+  state(data, SSH_SFTP_CLOSE);
   sshc->nextstate = SSH_NO_STATE;
   sshc->actualcode = CURLE_QUOTE_ERROR;
 }
 
-static void sftp_quote_stat(struct connectdata *conn)
+static void sftp_quote_stat(struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   char *cmd = sshc->quote_item->data;
   sshc->acceptfail = FALSE;
@@ -2811,12 +2836,12 @@
   if(sshc->quote_attrs)
     sftp_attributes_free(sshc->quote_attrs);
   sshc->quote_attrs = sftp_stat(sshc->sftp_session, sshc->quote_path2);
-  if(sshc->quote_attrs == NULL) {
+  if(!sshc->quote_attrs) {
     Curl_safefree(sshc->quote_path1);
     Curl_safefree(sshc->quote_path2);
     failf(data, "Attempt to get SFTP stats failed: %d",
           sftp_get_error(sshc->sftp_session));
-    state(conn, SSH_SFTP_CLOSE);
+    state(data, SSH_SFTP_CLOSE);
     sshc->nextstate = SSH_NO_STATE;
     sshc->actualcode = CURLE_QUOTE_ERROR;
     return;
@@ -2830,7 +2855,7 @@
       Curl_safefree(sshc->quote_path1);
       Curl_safefree(sshc->quote_path2);
       failf(data, "Syntax error: chgrp gid not a number");
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = CURLE_QUOTE_ERROR;
       return;
@@ -2845,7 +2870,7 @@
       Curl_safefree(sshc->quote_path1);
       Curl_safefree(sshc->quote_path2);
       failf(data, "Syntax error: chmod permissions not a number");
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = CURLE_QUOTE_ERROR;
       return;
@@ -2860,7 +2885,7 @@
       Curl_safefree(sshc->quote_path1);
       Curl_safefree(sshc->quote_path2);
       failf(data, "Syntax error: chown uid not a number");
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = CURLE_QUOTE_ERROR;
       return;
@@ -2873,7 +2898,7 @@
       Curl_safefree(sshc->quote_path1);
       Curl_safefree(sshc->quote_path2);
       failf(data, "Syntax error: incorrect access date format");
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = CURLE_QUOTE_ERROR;
       return;
@@ -2887,7 +2912,7 @@
       Curl_safefree(sshc->quote_path1);
       Curl_safefree(sshc->quote_path2);
       failf(data, "Syntax error: incorrect modification date format");
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = CURLE_QUOTE_ERROR;
       return;
@@ -2897,7 +2922,7 @@
   }
 
   /* Now send the completed structure... */
-  state(conn, SSH_SFTP_QUOTE_SETSTAT);
+  state(data, SSH_SFTP_QUOTE_SETSTAT);
   return;
 }
 
@@ -2915,9 +2940,9 @@
   (void)ssh_finalize();
 }
 
-size_t Curl_ssh_version(char *buffer, size_t buflen)
+void Curl_ssh_version(char *buffer, size_t buflen)
 {
-  return msnprintf(buffer, buflen, "libssh/%s", CURL_LIBSSH_VERSION);
+  (void)msnprintf(buffer, buflen, "libssh/%s", CURL_LIBSSH_VERSION);
 }
 
 #endif                          /* USE_LIBSSH */
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index d983cc9..5cbff07 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -103,30 +103,25 @@
 static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc);
 static LIBSSH2_FREE_FUNC(my_libssh2_free);
 
-static CURLcode ssh_force_knownhost_key_type(struct connectdata *conn);
-static CURLcode ssh_connect(struct connectdata *conn, bool *done);
-static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done);
-static CURLcode ssh_do(struct connectdata *conn, bool *done);
-
-static CURLcode scp_done(struct connectdata *conn,
-                         CURLcode, bool premature);
-static CURLcode scp_doing(struct connectdata *conn,
-                          bool *dophase_done);
-static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection);
-
-static CURLcode sftp_done(struct connectdata *conn,
-                          CURLcode, bool premature);
-static CURLcode sftp_doing(struct connectdata *conn,
-                           bool *dophase_done);
-static CURLcode sftp_disconnect(struct connectdata *conn, bool dead);
-static
-CURLcode sftp_perform(struct connectdata *conn,
-                      bool *connected,
-                      bool *dophase_done);
-static int ssh_getsock(struct connectdata *conn, curl_socket_t *sock);
-static int ssh_perform_getsock(const struct connectdata *conn,
-                               curl_socket_t *sock);
-static CURLcode ssh_setup_connection(struct connectdata *conn);
+static CURLcode ssh_force_knownhost_key_type(struct Curl_easy *data);
+static CURLcode ssh_connect(struct Curl_easy *data, bool *done);
+static CURLcode ssh_multi_statemach(struct Curl_easy *data, bool *done);
+static CURLcode ssh_do(struct Curl_easy *data, bool *done);
+static CURLcode scp_done(struct Curl_easy *data, CURLcode c, bool premature);
+static CURLcode scp_doing(struct Curl_easy *data, bool *dophase_done);
+static CURLcode scp_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn, bool dead_connection);
+static CURLcode sftp_done(struct Curl_easy *data, CURLcode, bool premature);
+static CURLcode sftp_doing(struct Curl_easy *data, bool *dophase_done);
+static CURLcode sftp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead);
+static CURLcode sftp_perform(struct Curl_easy *data, bool *connected,
+                             bool *dophase_done);
+static int ssh_getsock(struct Curl_easy *data, struct connectdata *conn,
+                       curl_socket_t *sock);
+static CURLcode ssh_setup_connection(struct Curl_easy *data,
+                                     struct connectdata *conn);
+static void ssh_attach(struct Curl_easy *data, struct connectdata *conn);
 
 /*
  * SCP protocol handler.
@@ -144,10 +139,11 @@
   ssh_getsock,                          /* proto_getsock */
   ssh_getsock,                          /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  ssh_perform_getsock,                  /* perform_getsock */
+  ssh_getsock,                          /* perform_getsock */
   scp_disconnect,                       /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ssh_attach,
   PORT_SSH,                             /* defport */
   CURLPROTO_SCP,                        /* protocol */
   CURLPROTO_SCP,                        /* family */
@@ -172,10 +168,11 @@
   ssh_getsock,                          /* proto_getsock */
   ssh_getsock,                          /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  ssh_perform_getsock,                  /* perform_getsock */
+  ssh_getsock,                          /* perform_getsock */
   sftp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ssh_attach,
   PORT_SSH,                             /* defport */
   CURLPROTO_SFTP,                       /* protocol */
   CURLPROTO_SFTP,                       /* family */
@@ -190,7 +187,7 @@
              LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
              void **abstract)
 {
-  struct connectdata *conn = (struct connectdata *)*abstract;
+  struct Curl_easy *data = (struct Curl_easy *)*abstract;
 
 #ifdef CURL_LIBSSH2_DEBUG
   fprintf(stderr, "name=%s\n", name);
@@ -205,11 +202,11 @@
   (void)instruction_len;
 #endif  /* CURL_LIBSSH2_DEBUG */
   if(num_prompts == 1) {
+    struct connectdata *conn = data->conn;
     responses[0].text = strdup(conn->passwd);
     responses[0].length = curlx_uztoui(strlen(conn->passwd));
   }
   (void)prompts;
-  (void)abstract;
 } /* kbd_callback */
 
 static CURLcode sftp_libssh2_error_to_CURLE(unsigned long err)
@@ -308,8 +305,9 @@
  * SSH State machine related code
  */
 /* This is the ONLY way to change SSH state! */
-static void state(struct connectdata *conn, sshstate nowstate)
+static void state(struct Curl_easy *data, sshstate nowstate)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
@@ -380,7 +378,7 @@
   DEBUGASSERT(sizeof(names)/sizeof(names[0]) == SSH_LAST);
 
   if(sshc->state != nowstate) {
-    infof(conn->data, "SFTP %p state change from %s to %s\n",
+    infof(data, "SFTP %p state change from %s to %s",
           (void *)sshc, names[sshc->state], names[nowstate]);
   }
 #endif
@@ -434,15 +432,14 @@
 #define libssh2_session_startup(x,y) libssh2_session_handshake(x,y)
 #endif
 
-static CURLcode ssh_knownhost(struct connectdata *conn)
+static CURLcode ssh_knownhost(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
 
 #ifdef HAVE_LIBSSH2_KNOWNHOST_API
-  struct Curl_easy *data = conn->data;
-
   if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
     /* we're asked to verify the host against a file */
+    struct connectdata *conn = data->conn;
     struct ssh_conn *sshc = &conn->proto.sshc;
     struct libssh2_knownhost *host = NULL;
     int rc;
@@ -494,7 +491,7 @@
         break;
 #endif
       default:
-        infof(data, "unsupported key type, can't check knownhosts!\n");
+        infof(data, "unsupported key type, can't check knownhosts!");
         keybit = 0;
         break;
       }
@@ -522,7 +519,7 @@
                                            &host);
 #endif
 
-        infof(data, "SSH host check: %d, key: %s\n", keycheck,
+        infof(data, "SSH host check: %d, key: %s", keycheck,
               (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
               host->key:"<none>");
 
@@ -564,7 +561,7 @@
     default: /* unknown return codes will equal reject */
       /* FALLTHROUGH */
     case CURLKHSTAT_REJECT:
-      state(conn, SSH_SESSION_FREE);
+      state(data, SSH_SESSION_FREE);
       /* FALLTHROUGH */
     case CURLKHSTAT_DEFER:
       /* DEFER means bail out but keep the SSH_HOSTKEY state */
@@ -589,7 +586,7 @@
                                           LIBSSH2_KNOWNHOST_KEYENC_RAW|
                                           keybit, NULL);
         if(addrc)
-          infof(data, "Warning adding the known host %s failed!\n",
+          infof(data, "Warning adding the known host %s failed!",
                 conn->host.name);
         else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE ||
                 rc == CURLKHSTAT_FINE_REPLACE) {
@@ -600,7 +597,7 @@
                                         data->set.str[STRING_SSH_KNOWNHOSTS],
                                         LIBSSH2_KNOWNHOST_FILE_OPENSSH);
           if(wrc) {
-            infof(data, "Warning, writing %s failed!\n",
+            infof(data, "Warning, writing %s failed!",
                   data->set.str[STRING_SSH_KNOWNHOSTS]);
           }
         }
@@ -609,15 +606,15 @@
     }
   }
 #else /* HAVE_LIBSSH2_KNOWNHOST_API */
-  (void)conn;
+  (void)data;
 #endif
   return result;
 }
 
-static CURLcode ssh_check_fingerprint(struct connectdata *conn)
+static CURLcode ssh_check_fingerprint(struct Curl_easy *data)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
-  struct Curl_easy *data = conn->data;
   const char *pubkey_md5 = data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5];
   char md5buffer[33];
 
@@ -629,7 +626,7 @@
     int i;
     for(i = 0; i < 16; i++)
       msnprintf(&md5buffer[i*2], 3, "%02x", (unsigned char) fingerprint[i]);
-    infof(data, "SSH MD5 fingerprint: %s\n", md5buffer);
+    infof(data, "SSH MD5 fingerprint: %s", md5buffer);
   }
 
   /* Before we authenticate we check the hostkey's MD5 fingerprint
@@ -644,22 +641,22 @@
       else
         failf(data,
             "Denied establishing ssh session: md5 fingerprint not available");
-      state(conn, SSH_SESSION_FREE);
+      state(data, SSH_SESSION_FREE);
       sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
       return sshc->actualcode;
     }
-    infof(data, "MD5 checksum match!\n");
+    infof(data, "MD5 checksum match!");
     /* as we already matched, we skip the check for known hosts */
     return CURLE_OK;
   }
-  return ssh_knownhost(conn);
+  return ssh_knownhost(data);
 }
 
 /*
  * ssh_force_knownhost_key_type() will check the known hosts file and try to
  * force a specific public key type from the server if an entry is found.
  */
-static CURLcode ssh_force_knownhost_key_type(struct connectdata *conn)
+static CURLcode ssh_force_knownhost_key_type(struct Curl_easy *data)
 {
   CURLcode result = CURLE_OK;
 
@@ -687,8 +684,8 @@
     = "ssh-dss";
 
   const char *hostkey_method = NULL;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
-  struct Curl_easy *data = conn->data;
   struct libssh2_knownhost* store = NULL;
   const char *kh_name_end = NULL;
   size_t kh_name_size = 0;
@@ -705,7 +702,7 @@
           if(store->name[0] == '[') {
             kh_name_end = strstr(store->name, "]:");
             if(!kh_name_end) {
-              infof(data, "Invalid host pattern %s in %s\n",
+              infof(data, "Invalid host pattern %s in %s",
                     store->name, data->set.str[STRING_SSH_KNOWNHOSTS]);
               continue;
             }
@@ -732,7 +729,7 @@
     }
 
     if(found) {
-      infof(data, "Found host %s in %s\n",
+      infof(data, "Found host %s in %s",
             conn->host.name, data->set.str[STRING_SSH_KNOWNHOSTS]);
 
       switch(store->typemask & LIBSSH2_KNOWNHOST_KEY_MASK) {
@@ -763,21 +760,21 @@
         hostkey_method = hostkey_method_ssh_dss;
         break;
       case LIBSSH2_KNOWNHOST_KEY_RSA1:
-        failf(data, "Found host key type RSA1 which is not supported\n");
+        failf(data, "Found host key type RSA1 which is not supported");
         return CURLE_SSH;
       default:
-        failf(data, "Unknown host key type: %i\n",
+        failf(data, "Unknown host key type: %i",
               (store->typemask & LIBSSH2_KNOWNHOST_KEY_MASK));
         return CURLE_SSH;
       }
 
-      infof(data, "Set \"%s\" as SSH hostkey type\n", hostkey_method);
+      infof(data, "Set \"%s\" as SSH hostkey type", hostkey_method);
       result = libssh2_session_error_to_CURLE(
-          libssh2_session_method_pref(
-              sshc->ssh_session, LIBSSH2_METHOD_HOSTKEY, hostkey_method));
+        libssh2_session_method_pref(
+          sshc->ssh_session, LIBSSH2_METHOD_HOSTKEY, hostkey_method));
     }
     else {
-      infof(data, "Did not find host %s in %s\n",
+      infof(data, "Did not find host %s in %s",
             conn->host.name, data->set.str[STRING_SSH_KNOWNHOSTS]);
     }
   }
@@ -794,11 +791,11 @@
  * meaning it wants to be called again when the socket is ready
  */
 
-static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
+static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
-  struct SSHPROTO *sftp_scp = data->req.protop;
+  struct connectdata *conn = data->conn;
+  struct SSHPROTO *sshp = data->req.p.ssh;
   struct ssh_conn *sshc = &conn->proto.sshc;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
   int rc = LIBSSH2_ERROR_NONE;
@@ -809,7 +806,6 @@
   *block = 0; /* we're not blocking by default */
 
   do {
-
     switch(sshc->state) {
     case SSH_INIT:
       sshc->secondCreateDirs = 0;
@@ -820,14 +816,14 @@
          non-blocking */
       libssh2_session_set_blocking(sshc->ssh_session, 0);
 
-      result = ssh_force_knownhost_key_type(conn);
+      result = ssh_force_knownhost_key_type(data);
       if(result) {
-        state(conn, SSH_SESSION_FREE);
+        state(data, SSH_SESSION_FREE);
         sshc->actualcode = result;
         break;
       }
 
-      state(conn, SSH_S_STARTUP);
+      state(data, SSH_S_STARTUP);
       /* FALLTHROUGH */
 
     case SSH_S_STARTUP:
@@ -840,12 +836,12 @@
         (void)libssh2_session_last_error(sshc->ssh_session, &err_msg, NULL, 0);
         failf(data, "Failure establishing ssh session: %d, %s", rc, err_msg);
 
-        state(conn, SSH_SESSION_FREE);
+        state(data, SSH_SESSION_FREE);
         sshc->actualcode = CURLE_FAILED_INIT;
         break;
       }
 
-      state(conn, SSH_HOSTKEY);
+      state(data, SSH_HOSTKEY);
 
       /* FALLTHROUGH */
     case SSH_HOSTKEY:
@@ -854,9 +850,9 @@
        * against our known hosts. How that is handled (reading from file,
        * whatever) is up to us.
        */
-      result = ssh_check_fingerprint(conn);
+      result = ssh_check_fingerprint(data);
       if(!result)
-        state(conn, SSH_AUTHLIST);
+        state(data, SSH_AUTHLIST);
       /* ssh_check_fingerprint sets state appropriately on error */
       break;
 
@@ -878,23 +874,23 @@
       if(!sshc->authlist) {
         if(libssh2_userauth_authenticated(sshc->ssh_session)) {
           sshc->authed = TRUE;
-          infof(data, "SSH user accepted with no authentication\n");
-          state(conn, SSH_AUTH_DONE);
+          infof(data, "SSH user accepted with no authentication");
+          state(data, SSH_AUTH_DONE);
           break;
         }
         ssherr = libssh2_session_last_errno(sshc->ssh_session);
         if(ssherr == LIBSSH2_ERROR_EAGAIN)
           rc = LIBSSH2_ERROR_EAGAIN;
         else {
-          state(conn, SSH_SESSION_FREE);
+          state(data, SSH_SESSION_FREE);
           sshc->actualcode = libssh2_session_error_to_CURLE(ssherr);
         }
         break;
       }
-      infof(data, "SSH authentication methods available: %s\n",
+      infof(data, "SSH authentication methods available: %s",
             sshc->authlist);
 
-      state(conn, SSH_AUTH_PKEY_INIT);
+      state(data, SSH_AUTH_PKEY_INIT);
       break;
 
     case SSH_AUTH_PKEY_INIT:
@@ -963,10 +959,10 @@
             out_of_memory = TRUE;
         }
 
-        if(out_of_memory || sshc->rsa == NULL) {
+        if(out_of_memory || !sshc->rsa) {
           Curl_safefree(sshc->rsa);
           Curl_safefree(sshc->rsa_pub);
-          state(conn, SSH_SESSION_FREE);
+          state(data, SSH_SESSION_FREE);
           sshc->actualcode = CURLE_OUT_OF_MEMORY;
           break;
         }
@@ -976,13 +972,13 @@
           sshc->passphrase = "";
 
         if(sshc->rsa_pub)
-          infof(data, "Using SSH public key file '%s'\n", sshc->rsa_pub);
-        infof(data, "Using SSH private key file '%s'\n", sshc->rsa);
+          infof(data, "Using SSH public key file '%s'", sshc->rsa_pub);
+        infof(data, "Using SSH private key file '%s'", sshc->rsa);
 
-        state(conn, SSH_AUTH_PKEY);
+        state(data, SSH_AUTH_PKEY);
       }
       else {
-        state(conn, SSH_AUTH_PASS_INIT);
+        state(data, SSH_AUTH_PASS_INIT);
       }
       break;
 
@@ -1004,15 +1000,15 @@
 
       if(rc == 0) {
         sshc->authed = TRUE;
-        infof(data, "Initialized SSH public key authentication\n");
-        state(conn, SSH_AUTH_DONE);
+        infof(data, "Initialized SSH public key authentication");
+        state(data, SSH_AUTH_DONE);
       }
       else {
         char *err_msg = NULL;
         (void)libssh2_session_last_error(sshc->ssh_session,
                                          &err_msg, NULL, 0);
-        infof(data, "SSH public key authentication failed: %s\n", err_msg);
-        state(conn, SSH_AUTH_PASS_INIT);
+        infof(data, "SSH public key authentication failed: %s", err_msg);
+        state(data, SSH_AUTH_PASS_INIT);
         rc = 0; /* clear rc and continue */
       }
       break;
@@ -1020,10 +1016,10 @@
     case SSH_AUTH_PASS_INIT:
       if((data->set.ssh_auth_types & CURLSSH_AUTH_PASSWORD) &&
          (strstr(sshc->authlist, "password") != NULL)) {
-        state(conn, SSH_AUTH_PASS);
+        state(data, SSH_AUTH_PASS);
       }
       else {
-        state(conn, SSH_AUTH_HOST_INIT);
+        state(data, SSH_AUTH_HOST_INIT);
         rc = 0; /* clear rc and continue */
       }
       break;
@@ -1039,11 +1035,11 @@
       }
       if(rc == 0) {
         sshc->authed = TRUE;
-        infof(data, "Initialized password authentication\n");
-        state(conn, SSH_AUTH_DONE);
+        infof(data, "Initialized password authentication");
+        state(data, SSH_AUTH_DONE);
       }
       else {
-        state(conn, SSH_AUTH_HOST_INIT);
+        state(data, SSH_AUTH_HOST_INIT);
         rc = 0; /* clear rc and continue */
       }
       break;
@@ -1051,15 +1047,15 @@
     case SSH_AUTH_HOST_INIT:
       if((data->set.ssh_auth_types & CURLSSH_AUTH_HOST) &&
          (strstr(sshc->authlist, "hostbased") != NULL)) {
-        state(conn, SSH_AUTH_HOST);
+        state(data, SSH_AUTH_HOST);
       }
       else {
-        state(conn, SSH_AUTH_AGENT_INIT);
+        state(data, SSH_AUTH_AGENT_INIT);
       }
       break;
 
     case SSH_AUTH_HOST:
-      state(conn, SSH_AUTH_AGENT_INIT);
+      state(data, SSH_AUTH_AGENT_INIT);
       break;
 
     case SSH_AUTH_AGENT_INIT:
@@ -1073,9 +1069,9 @@
         if(!sshc->ssh_agent) {
           sshc->ssh_agent = libssh2_agent_init(sshc->ssh_session);
           if(!sshc->ssh_agent) {
-            infof(data, "Could not create agent object\n");
+            infof(data, "Could not create agent object");
 
-            state(conn, SSH_AUTH_KEY_INIT);
+            state(data, SSH_AUTH_KEY_INIT);
             break;
           }
         }
@@ -1084,17 +1080,17 @@
         if(rc == LIBSSH2_ERROR_EAGAIN)
           break;
         if(rc < 0) {
-          infof(data, "Failure connecting to agent\n");
-          state(conn, SSH_AUTH_KEY_INIT);
+          infof(data, "Failure connecting to agent");
+          state(data, SSH_AUTH_KEY_INIT);
           rc = 0; /* clear rc and continue */
         }
         else {
-          state(conn, SSH_AUTH_AGENT_LIST);
+          state(data, SSH_AUTH_AGENT_LIST);
         }
       }
       else
 #endif /* HAVE_LIBSSH2_AGENT_API */
-        state(conn, SSH_AUTH_KEY_INIT);
+        state(data, SSH_AUTH_KEY_INIT);
       break;
 
     case SSH_AUTH_AGENT_LIST:
@@ -1104,12 +1100,12 @@
       if(rc == LIBSSH2_ERROR_EAGAIN)
         break;
       if(rc < 0) {
-        infof(data, "Failure requesting identities to agent\n");
-        state(conn, SSH_AUTH_KEY_INIT);
+        infof(data, "Failure requesting identities to agent");
+        state(data, SSH_AUTH_KEY_INIT);
         rc = 0; /* clear rc and continue */
       }
       else {
-        state(conn, SSH_AUTH_AGENT);
+        state(data, SSH_AUTH_AGENT);
         sshc->sshagent_prev_identity = NULL;
       }
 #endif
@@ -1140,17 +1136,17 @@
       }
 
       if(rc < 0)
-        infof(data, "Failure requesting identities to agent\n");
+        infof(data, "Failure requesting identities to agent");
       else if(rc == 1)
-        infof(data, "No identity would match\n");
+        infof(data, "No identity would match");
 
       if(rc == LIBSSH2_ERROR_NONE) {
         sshc->authed = TRUE;
-        infof(data, "Agent based authentication successful\n");
-        state(conn, SSH_AUTH_DONE);
+        infof(data, "Agent based authentication successful");
+        state(data, SSH_AUTH_DONE);
       }
       else {
-        state(conn, SSH_AUTH_KEY_INIT);
+        state(data, SSH_AUTH_KEY_INIT);
         rc = 0; /* clear rc and continue */
       }
 #endif
@@ -1159,10 +1155,10 @@
     case SSH_AUTH_KEY_INIT:
       if((data->set.ssh_auth_types & CURLSSH_AUTH_KEYBOARD)
          && (strstr(sshc->authlist, "keyboard-interactive") != NULL)) {
-        state(conn, SSH_AUTH_KEY);
+        state(data, SSH_AUTH_KEY);
       }
       else {
-        state(conn, SSH_AUTH_DONE);
+        state(data, SSH_AUTH_DONE);
       }
       break;
 
@@ -1178,15 +1174,15 @@
       }
       if(rc == 0) {
         sshc->authed = TRUE;
-        infof(data, "Initialized keyboard interactive authentication\n");
+        infof(data, "Initialized keyboard interactive authentication");
       }
-      state(conn, SSH_AUTH_DONE);
+      state(data, SSH_AUTH_DONE);
       break;
 
     case SSH_AUTH_DONE:
       if(!sshc->authed) {
         failf(data, "Authentication failure");
-        state(conn, SSH_SESSION_FREE);
+        state(data, SSH_SESSION_FREE);
         sshc->actualcode = CURLE_LOGIN_DENIED;
         break;
       }
@@ -1194,19 +1190,19 @@
       /*
        * At this point we have an authenticated ssh session.
        */
-      infof(data, "Authentication complete\n");
+      infof(data, "Authentication complete");
 
-      Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSH is connected */
+      Curl_pgrsTime(data, TIMER_APPCONNECT); /* SSH is connected */
 
       conn->sockfd = sock;
       conn->writesockfd = CURL_SOCKET_BAD;
 
       if(conn->handler->protocol == CURLPROTO_SFTP) {
-        state(conn, SSH_SFTP_INIT);
+        state(data, SSH_SFTP_INIT);
         break;
       }
-      infof(data, "SSH CONNECT phase done\n");
-      state(conn, SSH_STOP);
+      infof(data, "SSH CONNECT phase done");
+      state(data, SSH_STOP);
       break;
 
     case SSH_SFTP_INIT:
@@ -1225,11 +1221,11 @@
         (void)libssh2_session_last_error(sshc->ssh_session,
                                          &err_msg, NULL, 0);
         failf(data, "Failure initializing sftp session: %s", err_msg);
-        state(conn, SSH_SESSION_FREE);
+        state(data, SSH_SESSION_FREE);
         sshc->actualcode = CURLE_FAILED_INIT;
         break;
       }
-      state(conn, SSH_SFTP_REALPATH);
+      state(data, SSH_SFTP_REALPATH);
       break;
 
     case SSH_SFTP_REALPATH:
@@ -1249,11 +1245,11 @@
         tempHome[rc] = '\0';
         sshc->homedir = strdup(tempHome);
         if(!sshc->homedir) {
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->actualcode = CURLE_OUT_OF_MEMORY;
           break;
         }
-        conn->data->state.most_recent_ftp_entrypath = sshc->homedir;
+        data->state.most_recent_ftp_entrypath = sshc->homedir;
       }
       else {
         /* Return the error type */
@@ -1265,9 +1261,9 @@
              a time-out or similar */
           result = CURLE_SSH;
         sshc->actualcode = result;
-        DEBUGF(infof(data, "error = %d makes libcurl = %d\n",
+        DEBUGF(infof(data, "error = %lu makes libcurl = %d",
                      sftperr, (int)result));
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
     }
@@ -1275,37 +1271,37 @@
        we get the homedir here, we get the "workingpath" in the DO action
        since the homedir will remain the same between request but the
        working path will not. */
-    DEBUGF(infof(data, "SSH CONNECT phase done\n"));
-    state(conn, SSH_STOP);
+    DEBUGF(infof(data, "SSH CONNECT phase done"));
+    state(data, SSH_STOP);
     break;
 
     case SSH_SFTP_QUOTE_INIT:
 
-      result = Curl_getworkingpath(conn, sshc->homedir, &sftp_scp->path);
+      result = Curl_getworkingpath(data, sshc->homedir, &sshp->path);
       if(result) {
         sshc->actualcode = result;
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
       if(data->set.quote) {
-        infof(data, "Sending quote commands\n");
+        infof(data, "Sending quote commands");
         sshc->quote_item = data->set.quote;
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
-        state(conn, SSH_SFTP_GETINFO);
+        state(data, SSH_SFTP_GETINFO);
       }
       break;
 
     case SSH_SFTP_POSTQUOTE_INIT:
       if(data->set.postquote) {
-        infof(data, "Sending quote commands\n");
+        infof(data, "Sending quote commands");
         sshc->quote_item = data->set.postquote;
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       break;
 
@@ -1336,29 +1332,28 @@
       if(strcasecompare("pwd", cmd)) {
         /* output debug output if that is requested */
         char *tmp = aprintf("257 \"%s\" is current directory.\n",
-                            sftp_scp->path);
+                            sshp->path);
         if(!tmp) {
           result = CURLE_OUT_OF_MEMORY;
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           break;
         }
-        if(data->set.verbose) {
-          Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"PWD\n", 4);
-          Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
-        }
+        Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"PWD\n", 4);
+        Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
+
         /* this sends an FTP-like "header" to the header callback so that the
            current directory can be read very similar to how it is read when
            using ordinary FTP. */
-        result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp));
+        result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
         free(tmp);
         if(result) {
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = result;
         }
         else
-          state(conn, SSH_SFTP_NEXT_QUOTE);
+          state(data, SSH_SFTP_NEXT_QUOTE);
         break;
       }
       {
@@ -1367,10 +1362,10 @@
          * command with a space so we can check for it unconditionally
          */
         cp = strchr(cmd, ' ');
-        if(cp == NULL) {
+        if(!cp) {
           failf(data, "Syntax error command '%s'. Missing parameter!",
                 cmd);
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
@@ -1386,7 +1381,7 @@
             failf(data, "Out of memory");
           else
             failf(data, "Syntax error: Bad first parameter to '%s'", cmd);
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = result;
           break;
@@ -1414,13 +1409,13 @@
             else
               failf(data, "Syntax error in %s: Bad second parameter", cmd);
             Curl_safefree(sshc->quote_path1);
-            state(conn, SSH_SFTP_CLOSE);
+            state(data, SSH_SFTP_CLOSE);
             sshc->nextstate = SSH_NO_STATE;
             sshc->actualcode = result;
             break;
           }
-          memset(&sshc->quote_attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES));
-          state(conn, SSH_SFTP_QUOTE_STAT);
+          memset(&sshp->quote_attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES));
+          state(data, SSH_SFTP_QUOTE_STAT);
           break;
         }
         if(strncasecompare(cmd, "ln ", 3) ||
@@ -1436,17 +1431,17 @@
               failf(data,
                     "Syntax error in ln/symlink: Bad second parameter");
             Curl_safefree(sshc->quote_path1);
-            state(conn, SSH_SFTP_CLOSE);
+            state(data, SSH_SFTP_CLOSE);
             sshc->nextstate = SSH_NO_STATE;
             sshc->actualcode = result;
             break;
           }
-          state(conn, SSH_SFTP_QUOTE_SYMLINK);
+          state(data, SSH_SFTP_QUOTE_SYMLINK);
           break;
         }
         else if(strncasecompare(cmd, "mkdir ", 6)) {
           /* create dir */
-          state(conn, SSH_SFTP_QUOTE_MKDIR);
+          state(data, SSH_SFTP_QUOTE_MKDIR);
           break;
         }
         else if(strncasecompare(cmd, "rename ", 7)) {
@@ -1460,26 +1455,26 @@
             else
               failf(data, "Syntax error in rename: Bad second parameter");
             Curl_safefree(sshc->quote_path1);
-            state(conn, SSH_SFTP_CLOSE);
+            state(data, SSH_SFTP_CLOSE);
             sshc->nextstate = SSH_NO_STATE;
             sshc->actualcode = result;
             break;
           }
-          state(conn, SSH_SFTP_QUOTE_RENAME);
+          state(data, SSH_SFTP_QUOTE_RENAME);
           break;
         }
         else if(strncasecompare(cmd, "rmdir ", 6)) {
           /* delete dir */
-          state(conn, SSH_SFTP_QUOTE_RMDIR);
+          state(data, SSH_SFTP_QUOTE_RMDIR);
           break;
         }
         else if(strncasecompare(cmd, "rm ", 3)) {
-          state(conn, SSH_SFTP_QUOTE_UNLINK);
+          state(data, SSH_SFTP_QUOTE_UNLINK);
           break;
         }
 #ifdef HAS_STATVFS_SUPPORT
         else if(strncasecompare(cmd, "statvfs ", 8)) {
-          state(conn, SSH_SFTP_QUOTE_STATVFS);
+          state(data, SSH_SFTP_QUOTE_STATVFS);
           break;
         }
 #endif
@@ -1487,7 +1482,7 @@
         failf(data, "Unknown SFTP command");
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
@@ -1502,15 +1497,15 @@
       sshc->quote_item = sshc->quote_item->next;
 
       if(sshc->quote_item) {
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
         if(sshc->nextstate != SSH_NO_STATE) {
-          state(conn, sshc->nextstate);
+          state(data, sshc->nextstate);
           sshc->nextstate = SSH_NO_STATE;
         }
         else {
-          state(conn, SSH_SFTP_GETINFO);
+          state(data, SSH_SFTP_GETINFO);
         }
       }
       break;
@@ -1538,17 +1533,17 @@
         rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2,
                                   curlx_uztoui(strlen(sshc->quote_path2)),
                                   LIBSSH2_SFTP_STAT,
-                                  &sshc->quote_attrs);
+                                  &sshp->quote_attrs);
         if(rc == LIBSSH2_ERROR_EAGAIN) {
           break;
         }
-        if(rc != 0 && !sshc->acceptfail) { /* get those attributes */
+        if(rc && !sshc->acceptfail) { /* get those attributes */
           sftperr = libssh2_sftp_last_error(sshc->sftp_session);
           Curl_safefree(sshc->quote_path1);
           Curl_safefree(sshc->quote_path2);
           failf(data, "Attempt to get SFTP stats failed: %s",
                 sftp_libssh2_strerror(sftperr));
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
@@ -1557,43 +1552,43 @@
 
       /* Now set the new attributes... */
       if(strncasecompare(cmd, "chgrp", 5)) {
-        sshc->quote_attrs.gid = strtoul(sshc->quote_path1, NULL, 10);
-        sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
-        if(sshc->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
+        sshp->quote_attrs.gid = strtoul(sshc->quote_path1, NULL, 10);
+        sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
+        if(sshp->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
            !sshc->acceptfail) {
           Curl_safefree(sshc->quote_path1);
           Curl_safefree(sshc->quote_path2);
           failf(data, "Syntax error: chgrp gid not a number");
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
       }
       else if(strncasecompare(cmd, "chmod", 5)) {
-        sshc->quote_attrs.permissions = strtoul(sshc->quote_path1, NULL, 8);
-        sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_PERMISSIONS;
+        sshp->quote_attrs.permissions = strtoul(sshc->quote_path1, NULL, 8);
+        sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_PERMISSIONS;
         /* permissions are octal */
-        if(sshc->quote_attrs.permissions == 0 &&
+        if(sshp->quote_attrs.permissions == 0 &&
            !ISDIGIT(sshc->quote_path1[0])) {
           Curl_safefree(sshc->quote_path1);
           Curl_safefree(sshc->quote_path2);
           failf(data, "Syntax error: chmod permissions not a number");
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
       }
       else if(strncasecompare(cmd, "chown", 5)) {
-        sshc->quote_attrs.uid = strtoul(sshc->quote_path1, NULL, 10);
-        sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
-        if(sshc->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
+        sshp->quote_attrs.uid = strtoul(sshc->quote_path1, NULL, 10);
+        sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
+        if(sshp->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
            !sshc->acceptfail) {
           Curl_safefree(sshc->quote_path1);
           Curl_safefree(sshc->quote_path2);
           failf(data, "Syntax error: chown uid not a number");
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
@@ -1605,13 +1600,13 @@
           Curl_safefree(sshc->quote_path1);
           Curl_safefree(sshc->quote_path2);
           failf(data, "Syntax error: incorrect access date format");
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
-        sshc->quote_attrs.atime = (unsigned long)date;
-        sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_ACMODTIME;
+        sshp->quote_attrs.atime = (unsigned long)date;
+        sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_ACMODTIME;
       }
       else if(strncasecompare(cmd, "mtime", 5)) {
         time_t date = Curl_getdate_capped(sshc->quote_path1);
@@ -1619,17 +1614,17 @@
           Curl_safefree(sshc->quote_path1);
           Curl_safefree(sshc->quote_path2);
           failf(data, "Syntax error: incorrect modification date format");
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
-        sshc->quote_attrs.mtime = (unsigned long)date;
-        sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_ACMODTIME;
+        sshp->quote_attrs.mtime = (unsigned long)date;
+        sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_ACMODTIME;
       }
 
       /* Now send the completed structure... */
-      state(conn, SSH_SFTP_QUOTE_SETSTAT);
+      state(data, SSH_SFTP_QUOTE_SETSTAT);
       break;
     }
 
@@ -1637,22 +1632,22 @@
       rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2,
                                 curlx_uztoui(strlen(sshc->quote_path2)),
                                 LIBSSH2_SFTP_SETSTAT,
-                                &sshc->quote_attrs);
+                                &sshp->quote_attrs);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
         failf(data, "Attempt to set SFTP stats failed: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_SYMLINK:
@@ -1664,18 +1659,18 @@
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
         failf(data, "symlink command failed: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_MKDIR:
@@ -1685,17 +1680,17 @@
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         failf(data, "mkdir command failed: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_RENAME:
@@ -1710,18 +1705,18 @@
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         Curl_safefree(sshc->quote_path2);
         failf(data, "rename command failed: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_RMDIR:
@@ -1730,17 +1725,17 @@
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         failf(data, "rmdir command failed: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
     case SSH_SFTP_QUOTE_UNLINK:
@@ -1749,16 +1744,16 @@
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         failf(data, "rm command failed: %s", sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
 
 #ifdef HAS_STATVFS_SUPPORT
@@ -1772,12 +1767,12 @@
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      if(rc != 0 && !sshc->acceptfail) {
+      if(rc && !sshc->acceptfail) {
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
         failf(data, "statvfs command failed: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
@@ -1798,30 +1793,30 @@
                             statvfs.f_namemax);
         if(!tmp) {
           result = CURLE_OUT_OF_MEMORY;
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           break;
         }
 
-        result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp));
+        result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
         free(tmp);
         if(result) {
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = result;
         }
       }
-      state(conn, SSH_SFTP_NEXT_QUOTE);
+      state(data, SSH_SFTP_NEXT_QUOTE);
       break;
     }
 #endif
     case SSH_SFTP_GETINFO:
     {
       if(data->set.get_filetime) {
-        state(conn, SSH_SFTP_FILETIME);
+        state(data, SSH_SFTP_FILETIME);
       }
       else {
-        state(conn, SSH_SFTP_TRANS_INIT);
+        state(data, SSH_SFTP_TRANS_INIT);
       }
       break;
     }
@@ -1830,8 +1825,8 @@
     {
       LIBSSH2_SFTP_ATTRIBUTES attrs;
 
-      rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
-                                curlx_uztoui(strlen(sftp_scp->path)),
+      rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path,
+                                curlx_uztoui(strlen(sshp->path)),
                                 LIBSSH2_SFTP_STAT, &attrs);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -1840,18 +1835,18 @@
         data->info.filetime = attrs.mtime;
       }
 
-      state(conn, SSH_SFTP_TRANS_INIT);
+      state(data, SSH_SFTP_TRANS_INIT);
       break;
     }
 
     case SSH_SFTP_TRANS_INIT:
       if(data->set.upload)
-        state(conn, SSH_SFTP_UPLOAD_INIT);
+        state(data, SSH_SFTP_UPLOAD_INIT);
       else {
-        if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/')
-          state(conn, SSH_SFTP_READDIR_INIT);
+        if(sshp->path[strlen(sshp->path)-1] == '/')
+          state(data, SSH_SFTP_READDIR_INIT);
         else
-          state(conn, SSH_SFTP_DOWNLOAD_INIT);
+          state(data, SSH_SFTP_DOWNLOAD_INIT);
       }
       break;
 
@@ -1865,11 +1860,11 @@
        *          same name as the last directory in the path.
        */
 
-      if(data->state.resume_from != 0) {
+      if(data->state.resume_from) {
         LIBSSH2_SFTP_ATTRIBUTES attrs;
         if(data->state.resume_from < 0) {
-          rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
-                                    curlx_uztoui(strlen(sftp_scp->path)),
+          rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path,
+                                    curlx_uztoui(strlen(sshp->path)),
                                     LIBSSH2_SFTP_STAT, &attrs);
           if(rc == LIBSSH2_ERROR_EAGAIN) {
             break;
@@ -1888,19 +1883,19 @@
         }
       }
 
-      if(data->set.ftp_append)
+      if(data->set.remote_append)
         /* Try to open for append, but create if nonexisting */
         flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_APPEND;
       else if(data->state.resume_from > 0)
         /* If we have restart position then open for append */
         flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_APPEND;
       else
-        /* Clear file before writing (normal behaviour) */
+        /* Clear file before writing (normal behavior) */
         flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_TRUNC;
 
       sshc->sftp_handle =
-        libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path,
-                             curlx_uztoui(strlen(sftp_scp->path)),
+        libssh2_sftp_open_ex(sshc->sftp_session, sshp->path,
+                             curlx_uztoui(strlen(sshp->path)),
                              flags, data->set.new_file_perms,
                              LIBSSH2_SFTP_OPENFILE);
 
@@ -1918,7 +1913,7 @@
           sftperr = LIBSSH2_FX_OK; /* not an sftp error at all */
 
         if(sshc->secondCreateDirs) {
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->actualcode = sftperr != LIBSSH2_FX_OK ?
             sftp_libssh2_error_to_CURLE(sftperr):CURLE_SSH;
           failf(data, "Creating the dir/file failed: %s",
@@ -1929,14 +1924,14 @@
             (sftperr == LIBSSH2_FX_FAILURE) ||
             (sftperr == LIBSSH2_FX_NO_SUCH_PATH)) &&
            (data->set.ftp_create_missing_dirs &&
-            (strlen(sftp_scp->path) > 1))) {
+            (strlen(sshp->path) > 1))) {
           /* try to create the path remotely */
           rc = 0; /* clear rc and continue */
           sshc->secondCreateDirs = 1;
-          state(conn, SSH_SFTP_CREATE_DIRS_INIT);
+          state(data, SSH_SFTP_CREATE_DIRS_INIT);
           break;
         }
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = sftperr != LIBSSH2_FX_OK ?
           sftp_libssh2_error_to_CURLE(sftperr):CURLE_SSH;
         if(!sshc->actualcode) {
@@ -1946,7 +1941,7 @@
           sshc->actualcode = CURLE_SSH;
           sftperr = LIBSSH2_FX_OK;
         }
-        failf(data, "Upload failed: %s (%d/%d)",
+        failf(data, "Upload failed: %s (%lu/%d)",
               sftperr != LIBSSH2_FX_OK ?
               sftp_libssh2_strerror(sftperr):"ssh error",
               sftperr, rc);
@@ -2015,7 +2010,7 @@
       conn->sockfd = conn->writesockfd;
 
       if(result) {
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = result;
       }
       else {
@@ -2033,18 +2028,18 @@
            timeout here */
         Curl_expire(data, 0, EXPIRE_RUN_NOW);
 
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       break;
     }
 
     case SSH_SFTP_CREATE_DIRS_INIT:
-      if(strlen(sftp_scp->path) > 1) {
-        sshc->slash_pos = sftp_scp->path + 1; /* ignore the leading '/' */
-        state(conn, SSH_SFTP_CREATE_DIRS);
+      if(strlen(sshp->path) > 1) {
+        sshc->slash_pos = sshp->path + 1; /* ignore the leading '/' */
+        state(data, SSH_SFTP_CREATE_DIRS);
       }
       else {
-        state(conn, SSH_SFTP_UPLOAD_INIT);
+        state(data, SSH_SFTP_UPLOAD_INIT);
       }
       break;
 
@@ -2053,17 +2048,17 @@
       if(sshc->slash_pos) {
         *sshc->slash_pos = 0;
 
-        infof(data, "Creating directory '%s'\n", sftp_scp->path);
-        state(conn, SSH_SFTP_CREATE_DIRS_MKDIR);
+        infof(data, "Creating directory '%s'", sshp->path);
+        state(data, SSH_SFTP_CREATE_DIRS_MKDIR);
         break;
       }
-      state(conn, SSH_SFTP_UPLOAD_INIT);
+      state(data, SSH_SFTP_UPLOAD_INIT);
       break;
 
     case SSH_SFTP_CREATE_DIRS_MKDIR:
       /* 'mode' - parameter is preliminary - default to 0644 */
-      rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sftp_scp->path,
-                                 curlx_uztoui(strlen(sftp_scp->path)),
+      rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshp->path,
+                                 curlx_uztoui(strlen(sshp->path)),
                                  data->set.new_directory_perms);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -2081,19 +2076,19 @@
            (sftperr != LIBSSH2_FX_FAILURE) &&
            (sftperr != LIBSSH2_FX_PERMISSION_DENIED)) {
           result = sftp_libssh2_error_to_CURLE(sftperr);
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           sshc->actualcode = result?result:CURLE_SSH;
           break;
         }
         rc = 0; /* clear rc and continue */
       }
-      state(conn, SSH_SFTP_CREATE_DIRS);
+      state(data, SSH_SFTP_CREATE_DIRS);
       break;
 
     case SSH_SFTP_READDIR_INIT:
       Curl_pgrsSetDownloadSize(data, -1);
       if(data->set.opt_no_body) {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
@@ -2102,9 +2097,9 @@
        * listing
        */
       sshc->sftp_handle = libssh2_sftp_open_ex(sshc->sftp_session,
-                                               sftp_scp->path,
+                                               sshp->path,
                                                curlx_uztoui(
-                                                 strlen(sftp_scp->path)),
+                                                 strlen(sshp->path)),
                                                0, 0, LIBSSH2_SFTP_OPENDIR);
       if(!sshc->sftp_handle) {
         if(libssh2_session_last_errno(sshc->ssh_session) ==
@@ -2115,51 +2110,51 @@
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         failf(data, "Could not open directory for reading: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         result = sftp_libssh2_error_to_CURLE(sftperr);
         sshc->actualcode = result?result:CURLE_SSH;
         break;
       }
-      sshc->readdir_filename = malloc(PATH_MAX + 1);
-      if(!sshc->readdir_filename) {
-        state(conn, SSH_SFTP_CLOSE);
+      sshp->readdir_filename = malloc(PATH_MAX + 1);
+      if(!sshp->readdir_filename) {
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = CURLE_OUT_OF_MEMORY;
         break;
       }
-      sshc->readdir_longentry = malloc(PATH_MAX + 1);
-      if(!sshc->readdir_longentry) {
-        Curl_safefree(sshc->readdir_filename);
-        state(conn, SSH_SFTP_CLOSE);
+      sshp->readdir_longentry = malloc(PATH_MAX + 1);
+      if(!sshp->readdir_longentry) {
+        Curl_safefree(sshp->readdir_filename);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = CURLE_OUT_OF_MEMORY;
         break;
       }
-      Curl_dyn_init(&sshc->readdir, PATH_MAX * 2);
-      state(conn, SSH_SFTP_READDIR);
+      Curl_dyn_init(&sshp->readdir, PATH_MAX * 2);
+      state(data, SSH_SFTP_READDIR);
       break;
 
     case SSH_SFTP_READDIR:
       rc = libssh2_sftp_readdir_ex(sshc->sftp_handle,
-                                   sshc->readdir_filename,
+                                   sshp->readdir_filename,
                                    PATH_MAX,
-                                   sshc->readdir_longentry,
+                                   sshp->readdir_longentry,
                                    PATH_MAX,
-                                   &sshc->readdir_attrs);
+                                   &sshp->readdir_attrs);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
       if(rc > 0) {
         readdir_len = (size_t) rc;
-        sshc->readdir_filename[readdir_len] = '\0';
+        sshp->readdir_filename[readdir_len] = '\0';
 
-        if(data->set.ftp_list_only) {
-          result = Curl_client_write(conn, CLIENTWRITE_BODY,
-                                     sshc->readdir_filename,
+        if(data->set.list_only) {
+          result = Curl_client_write(data, CLIENTWRITE_BODY,
+                                     sshp->readdir_filename,
                                      readdir_len);
           if(!result)
-            result = Curl_client_write(conn, CLIENTWRITE_BODY,
+            result = Curl_client_write(data, CLIENTWRITE_BODY,
                                        (char *)"\n", 1);
           if(result) {
-            state(conn, SSH_STOP);
+            state(data, SSH_STOP);
             break;
           }
           /* since this counts what we send to the client, we include the
@@ -2167,39 +2162,37 @@
           data->req.bytecount += readdir_len + 1;
 
           /* output debug output if that is requested */
-          if(data->set.verbose) {
-            Curl_debug(data, CURLINFO_DATA_IN, sshc->readdir_filename,
-                       readdir_len);
-            Curl_debug(data, CURLINFO_DATA_IN, (char *)"\n", 1);
-          }
+          Curl_debug(data, CURLINFO_DATA_IN, sshp->readdir_filename,
+                     readdir_len);
+          Curl_debug(data, CURLINFO_DATA_IN, (char *)"\n", 1);
         }
         else {
-          result = Curl_dyn_add(&sshc->readdir, sshc->readdir_longentry);
+          result = Curl_dyn_add(&sshp->readdir, sshp->readdir_longentry);
 
           if(!result) {
-            if((sshc->readdir_attrs.flags & LIBSSH2_SFTP_ATTR_PERMISSIONS) &&
-               ((sshc->readdir_attrs.permissions & LIBSSH2_SFTP_S_IFMT) ==
+            if((sshp->readdir_attrs.flags & LIBSSH2_SFTP_ATTR_PERMISSIONS) &&
+               ((sshp->readdir_attrs.permissions & LIBSSH2_SFTP_S_IFMT) ==
                 LIBSSH2_SFTP_S_IFLNK)) {
-              Curl_dyn_init(&sshc->readdir_link, PATH_MAX);
-              result = Curl_dyn_add(&sshc->readdir_link, sftp_scp->path);
-              state(conn, SSH_SFTP_READDIR_LINK);
+              Curl_dyn_init(&sshp->readdir_link, PATH_MAX);
+              result = Curl_dyn_add(&sshp->readdir_link, sshp->path);
+              state(data, SSH_SFTP_READDIR_LINK);
               if(!result)
                 break;
             }
             else {
-              state(conn, SSH_SFTP_READDIR_BOTTOM);
+              state(data, SSH_SFTP_READDIR_BOTTOM);
               break;
             }
           }
           sshc->actualcode = result;
-          state(conn, SSH_SFTP_CLOSE);
+          state(data, SSH_SFTP_CLOSE);
           break;
         }
       }
       else if(rc == 0) {
-        Curl_safefree(sshc->readdir_filename);
-        Curl_safefree(sshc->readdir_longentry);
-        state(conn, SSH_SFTP_READDIR_DONE);
+        Curl_safefree(sshp->readdir_filename);
+        Curl_safefree(sshp->readdir_longentry);
+        state(data, SSH_SFTP_READDIR_DONE);
         break;
       }
       else if(rc < 0) {
@@ -2209,9 +2202,9 @@
         failf(data, "Could not open remote file for reading: %s :: %d",
               sftp_libssh2_strerror(sftperr),
               libssh2_session_last_errno(sshc->ssh_session));
-        Curl_safefree(sshc->readdir_filename);
-        Curl_safefree(sshc->readdir_longentry);
-        state(conn, SSH_SFTP_CLOSE);
+        Curl_safefree(sshp->readdir_filename);
+        Curl_safefree(sshp->readdir_longentry);
+        state(data, SSH_SFTP_CLOSE);
         break;
       }
       break;
@@ -2219,55 +2212,51 @@
     case SSH_SFTP_READDIR_LINK:
       rc =
         libssh2_sftp_symlink_ex(sshc->sftp_session,
-                                Curl_dyn_ptr(&sshc->readdir_link),
-                                (int)Curl_dyn_len(&sshc->readdir_link),
-                                sshc->readdir_filename,
+                                Curl_dyn_ptr(&sshp->readdir_link),
+                                (int)Curl_dyn_len(&sshp->readdir_link),
+                                sshp->readdir_filename,
                                 PATH_MAX, LIBSSH2_SFTP_READLINK);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      readdir_len = (size_t) rc;
-      Curl_dyn_free(&sshc->readdir_link);
+      Curl_dyn_free(&sshp->readdir_link);
 
       /* append filename and extra output */
-      result = Curl_dyn_addf(&sshc->readdir, " -> %s", sshc->readdir_filename);
+      result = Curl_dyn_addf(&sshp->readdir, " -> %s", sshp->readdir_filename);
 
       if(result) {
         sshc->readdir_line = NULL;
-        Curl_safefree(sshc->readdir_filename);
-        Curl_safefree(sshc->readdir_longentry);
-        state(conn, SSH_SFTP_CLOSE);
+        Curl_safefree(sshp->readdir_filename);
+        Curl_safefree(sshp->readdir_longentry);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = result;
         break;
       }
 
-      state(conn, SSH_SFTP_READDIR_BOTTOM);
+      state(data, SSH_SFTP_READDIR_BOTTOM);
       break;
 
     case SSH_SFTP_READDIR_BOTTOM:
-      result = Curl_dyn_addn(&sshc->readdir, "\n", 1);
+      result = Curl_dyn_addn(&sshp->readdir, "\n", 1);
       if(!result)
-        result = Curl_client_write(conn, CLIENTWRITE_BODY,
-                                   Curl_dyn_ptr(&sshc->readdir),
-                                   Curl_dyn_len(&sshc->readdir));
+        result = Curl_client_write(data, CLIENTWRITE_BODY,
+                                   Curl_dyn_ptr(&sshp->readdir),
+                                   Curl_dyn_len(&sshp->readdir));
 
       if(!result) {
-
         /* output debug output if that is requested */
-        if(data->set.verbose) {
-          Curl_debug(data, CURLINFO_DATA_IN,
-                     Curl_dyn_ptr(&sshc->readdir),
-                     Curl_dyn_len(&sshc->readdir));
-        }
-        data->req.bytecount += Curl_dyn_len(&sshc->readdir);
+        Curl_debug(data, CURLINFO_DATA_IN,
+                   Curl_dyn_ptr(&sshp->readdir),
+                   Curl_dyn_len(&sshp->readdir));
+        data->req.bytecount += Curl_dyn_len(&sshp->readdir);
       }
       if(result) {
-        Curl_dyn_free(&sshc->readdir);
-        state(conn, SSH_STOP);
+        Curl_dyn_free(&sshp->readdir);
+        state(data, SSH_STOP);
       }
       else {
-        Curl_dyn_reset(&sshc->readdir);
-        state(conn, SSH_SFTP_READDIR);
+        Curl_dyn_reset(&sshp->readdir);
+        state(data, SSH_SFTP_READDIR);
       }
       break;
 
@@ -2278,12 +2267,12 @@
         break;
       }
       sshc->sftp_handle = NULL;
-      Curl_safefree(sshc->readdir_filename);
-      Curl_safefree(sshc->readdir_longentry);
+      Curl_safefree(sshp->readdir_filename);
+      Curl_safefree(sshp->readdir_longentry);
 
       /* no data to transfer */
       Curl_setup_transfer(data, -1, -1, FALSE, -1);
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
 
     case SSH_SFTP_DOWNLOAD_INIT:
@@ -2291,8 +2280,8 @@
        * Work on getting the specified file
        */
       sshc->sftp_handle =
-        libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path,
-                             curlx_uztoui(strlen(sftp_scp->path)),
+        libssh2_sftp_open_ex(sshc->sftp_session, sshp->path,
+                             curlx_uztoui(strlen(sshp->path)),
                              LIBSSH2_FXF_READ, data->set.new_file_perms,
                              LIBSSH2_SFTP_OPENFILE);
       if(!sshc->sftp_handle) {
@@ -2304,20 +2293,20 @@
         sftperr = libssh2_sftp_last_error(sshc->sftp_session);
         failf(data, "Could not open remote file for reading: %s",
               sftp_libssh2_strerror(sftperr));
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         result = sftp_libssh2_error_to_CURLE(sftperr);
         sshc->actualcode = result?result:CURLE_SSH;
         break;
       }
-      state(conn, SSH_SFTP_DOWNLOAD_STAT);
+      state(data, SSH_SFTP_DOWNLOAD_STAT);
       break;
 
     case SSH_SFTP_DOWNLOAD_STAT:
     {
       LIBSSH2_SFTP_ATTRIBUTES attrs;
 
-      rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
-                                curlx_uztoui(strlen(sftp_scp->path)),
+      rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path,
+                                curlx_uztoui(strlen(sshp->path)),
                                 LIBSSH2_SFTP_STAT, &attrs);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -2342,14 +2331,14 @@
           failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size);
           return CURLE_BAD_DOWNLOAD_RESUME;
         }
-        if(conn->data->state.use_range) {
+        if(data->state.use_range) {
           curl_off_t from, to;
           char *ptr;
           char *ptr2;
           CURLofft to_t;
           CURLofft from_t;
 
-          from_t = curlx_strtoofft(conn->data->state.range, &ptr, 0, &from);
+          from_t = curlx_strtoofft(data->state.range, &ptr, 0, &from);
           if(from_t == CURL_OFFT_FLOW)
             return CURLE_RANGE_ERROR;
           while(*ptr && (ISSPACE(*ptr) || (*ptr == '-')))
@@ -2380,7 +2369,7 @@
             size = to - from + 1;
           }
 
-          SFTP_SEEK(conn->proto.sshc.sftp_handle, from);
+          SFTP_SEEK(sshc->sftp_handle, from);
         }
         data->req.size = size;
         data->req.maxdownload = size;
@@ -2422,8 +2411,8 @@
     if(data->req.size == 0) {
       /* no data to transfer */
       Curl_setup_transfer(data, -1, -1, FALSE, -1);
-      infof(data, "File already completely downloaded\n");
-      state(conn, SSH_STOP);
+      infof(data, "File already completely downloaded");
+      state(data, SSH_STOP);
       break;
     }
     Curl_setup_transfer(data, FIRSTSOCKET, data->req.size, FALSE, -1);
@@ -2439,11 +2428,11 @@
     if(result) {
       /* this should never occur; the close state should be entered
          at the time the error occurs */
-      state(conn, SSH_SFTP_CLOSE);
+      state(data, SSH_SFTP_CLOSE);
       sshc->actualcode = result;
     }
     else {
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
     }
     break;
 
@@ -2457,25 +2446,25 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to close libssh2 file: %d %s\n", rc, err_msg);
+          infof(data, "Failed to close libssh2 file: %d %s", rc, err_msg);
         }
         sshc->sftp_handle = NULL;
       }
 
-      Curl_safefree(sftp_scp->path);
+      Curl_safefree(sshp->path);
 
-      DEBUGF(infof(data, "SFTP DONE done\n"));
+      DEBUGF(infof(data, "SFTP DONE done"));
 
       /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
          After nextstate is executed, the control should come back to
          SSH_SFTP_CLOSE to pass the correct result back  */
       if(sshc->nextstate != SSH_NO_STATE &&
          sshc->nextstate != SSH_SFTP_CLOSE) {
-        state(conn, sshc->nextstate);
+        state(data, sshc->nextstate);
         sshc->nextstate = SSH_SFTP_CLOSE;
       }
       else {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         result = sshc->actualcode;
       }
       break;
@@ -2494,7 +2483,7 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session, &err_msg,
                                            NULL, 0);
-          infof(data, "Failed to close libssh2 file: %d %s\n", rc, err_msg);
+          infof(data, "Failed to close libssh2 file: %d %s", rc, err_msg);
         }
         sshc->sftp_handle = NULL;
       }
@@ -2504,22 +2493,22 @@
           break;
         }
         if(rc < 0) {
-          infof(data, "Failed to stop libssh2 sftp subsystem\n");
+          infof(data, "Failed to stop libssh2 sftp subsystem");
         }
         sshc->sftp_session = NULL;
       }
 
       Curl_safefree(sshc->homedir);
-      conn->data->state.most_recent_ftp_entrypath = NULL;
+      data->state.most_recent_ftp_entrypath = NULL;
 
-      state(conn, SSH_SESSION_DISCONNECT);
+      state(data, SSH_SESSION_DISCONNECT);
       break;
 
     case SSH_SCP_TRANS_INIT:
-      result = Curl_getworkingpath(conn, sshc->homedir, &sftp_scp->path);
+      result = Curl_getworkingpath(data, sshc->homedir, &sshp->path);
       if(result) {
         sshc->actualcode = result;
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
@@ -2527,13 +2516,13 @@
         if(data->state.infilesize < 0) {
           failf(data, "SCP requires a known file size for upload");
           sshc->actualcode = CURLE_UPLOAD_FAILED;
-          state(conn, SSH_SCP_CHANNEL_FREE);
+          state(data, SSH_SCP_CHANNEL_FREE);
           break;
         }
-        state(conn, SSH_SCP_UPLOAD_INIT);
+        state(data, SSH_SCP_UPLOAD_INIT);
       }
       else {
-        state(conn, SSH_SCP_DOWNLOAD_INIT);
+        state(data, SSH_SCP_DOWNLOAD_INIT);
       }
       break;
 
@@ -2545,7 +2534,7 @@
        * directory in the path.
        */
       sshc->ssh_channel =
-        SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms,
+        SCP_SEND(sshc->ssh_session, sshp->path, data->set.new_file_perms,
                  data->state.infilesize);
       if(!sshc->ssh_channel) {
         int ssh_err;
@@ -2559,8 +2548,8 @@
 
         ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session,
                                                    &err_msg, NULL, 0));
-        failf(conn->data, "%s", err_msg);
-        state(conn, SSH_SCP_CHANNEL_FREE);
+        failf(data, "%s", err_msg);
+        state(data, SSH_SCP_CHANNEL_FREE);
         sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
         /* Map generic errors to upload failed */
         if(sshc->actualcode == CURLE_SSH ||
@@ -2578,7 +2567,7 @@
       conn->sockfd = conn->writesockfd;
 
       if(result) {
-        state(conn, SSH_SCP_CHANNEL_FREE);
+        state(data, SSH_SCP_CHANNEL_FREE);
         sshc->actualcode = result;
       }
       else {
@@ -2591,7 +2580,7 @@
            with both accordingly */
         conn->cselect_bits = CURL_CSELECT_OUT;
 
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       break;
 
@@ -2613,12 +2602,12 @@
       struct stat sb;
       memset(&sb, 0, sizeof(struct stat));
       sshc->ssh_channel = libssh2_scp_recv(sshc->ssh_session,
-                                           sftp_scp->path, &sb);
+                                           sshp->path, &sb);
 #else
       libssh2_struct_stat sb;
       memset(&sb, 0, sizeof(libssh2_struct_stat));
       sshc->ssh_channel = libssh2_scp_recv2(sshc->ssh_session,
-                                            sftp_scp->path, &sb);
+                                            sshp->path, &sb);
 #endif
 
       if(!sshc->ssh_channel) {
@@ -2634,8 +2623,8 @@
 
         ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session,
                                                    &err_msg, NULL, 0));
-        failf(conn->data, "%s", err_msg);
-        state(conn, SSH_SCP_CHANNEL_FREE);
+        failf(data, "%s", err_msg);
+        state(data, SSH_SCP_CHANNEL_FREE);
         sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
         break;
       }
@@ -2654,19 +2643,19 @@
       conn->cselect_bits = CURL_CSELECT_IN;
 
       if(result) {
-        state(conn, SSH_SCP_CHANNEL_FREE);
+        state(data, SSH_SCP_CHANNEL_FREE);
         sshc->actualcode = result;
       }
       else
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
     }
     break;
 
     case SSH_SCP_DONE:
       if(data->set.upload)
-        state(conn, SSH_SCP_SEND_EOF);
+        state(data, SSH_SCP_SEND_EOF);
       else
-        state(conn, SSH_SCP_CHANNEL_FREE);
+        state(data, SSH_SCP_CHANNEL_FREE);
       break;
 
     case SSH_SCP_SEND_EOF:
@@ -2679,11 +2668,11 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to send libssh2 channel EOF: %d %s\n",
+          infof(data, "Failed to send libssh2 channel EOF: %d %s",
                 rc, err_msg);
         }
       }
-      state(conn, SSH_SCP_WAIT_EOF);
+      state(data, SSH_SCP_WAIT_EOF);
       break;
 
     case SSH_SCP_WAIT_EOF:
@@ -2696,10 +2685,10 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to get channel EOF: %d %s\n", rc, err_msg);
+          infof(data, "Failed to get channel EOF: %d %s", rc, err_msg);
         }
       }
-      state(conn, SSH_SCP_WAIT_CLOSE);
+      state(data, SSH_SCP_WAIT_CLOSE);
       break;
 
     case SSH_SCP_WAIT_CLOSE:
@@ -2712,10 +2701,10 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Channel failed to close: %d %s\n", rc, err_msg);
+          infof(data, "Channel failed to close: %d %s", rc, err_msg);
         }
       }
-      state(conn, SSH_SCP_CHANNEL_FREE);
+      state(data, SSH_SCP_CHANNEL_FREE);
       break;
 
     case SSH_SCP_CHANNEL_FREE:
@@ -2728,16 +2717,16 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to free libssh2 scp subsystem: %d %s\n",
+          infof(data, "Failed to free libssh2 scp subsystem: %d %s",
                 rc, err_msg);
         }
         sshc->ssh_channel = NULL;
       }
-      DEBUGF(infof(data, "SCP DONE phase complete\n"));
+      DEBUGF(infof(data, "SCP DONE phase complete"));
 #if 0 /* PREV */
-      state(conn, SSH_SESSION_DISCONNECT);
+      state(data, SSH_SESSION_DISCONNECT);
 #endif
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       result = sshc->actualcode;
       break;
 
@@ -2754,7 +2743,7 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to free libssh2 scp subsystem: %d %s\n",
+          infof(data, "Failed to free libssh2 scp subsystem: %d %s",
                 rc, err_msg);
         }
         sshc->ssh_channel = NULL;
@@ -2769,15 +2758,15 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to disconnect libssh2 session: %d %s\n",
+          infof(data, "Failed to disconnect libssh2 session: %d %s",
                 rc, err_msg);
         }
       }
 
       Curl_safefree(sshc->homedir);
-      conn->data->state.most_recent_ftp_entrypath = NULL;
+      data->state.most_recent_ftp_entrypath = NULL;
 
-      state(conn, SSH_SESSION_FREE);
+      state(data, SSH_SESSION_FREE);
       break;
 
     case SSH_SESSION_FREE:
@@ -2798,7 +2787,7 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to disconnect from libssh2 agent: %d %s\n",
+          infof(data, "Failed to disconnect from libssh2 agent: %d %s",
                 rc, err_msg);
         }
         libssh2_agent_free(sshc->ssh_agent);
@@ -2820,7 +2809,7 @@
           char *err_msg = NULL;
           (void)libssh2_session_last_error(sshc->ssh_session,
                                            &err_msg, NULL, 0);
-          infof(data, "Failed to free libssh2 session: %d %s\n", rc, err_msg);
+          infof(data, "Failed to free libssh2 session: %d %s", rc, err_msg);
         }
         sshc->ssh_session = NULL;
       }
@@ -2845,11 +2834,7 @@
       Curl_safefree(sshc->quote_path2);
 
       Curl_safefree(sshc->homedir);
-
-      Curl_safefree(sshc->readdir_filename);
-      Curl_safefree(sshc->readdir_longentry);
       Curl_safefree(sshc->readdir_line);
-      Curl_dyn_free(&sshc->readdir);
 
       /* the code we are about to return */
       result = sshc->actualcode;
@@ -2859,7 +2844,7 @@
       connclose(conn, "SSH session free");
       sshc->state = SSH_SESSION_FREE; /* current */
       sshc->nextstate = SSH_NO_STATE;
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
 
     case SSH_QUIT:
@@ -2867,7 +2852,7 @@
     default:
       /* internal error */
       sshc->nextstate = SSH_NO_STATE;
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       break;
     }
 
@@ -2884,11 +2869,12 @@
 
 /* called by the multi interface to figure out what socket(s) to wait for and
    for what actions in the DO_DONE, PERFORM and WAITPERFORM states */
-static int ssh_perform_getsock(const struct connectdata *conn,
-                               curl_socket_t *sock)
+static int ssh_getsock(struct Curl_easy *data,
+                       struct connectdata *conn,
+                       curl_socket_t *sock)
 {
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
   int bitmap = GETSOCK_BLANK;
+  (void)data;
 
   sock[0] = conn->sock[FIRSTSOCKET];
 
@@ -2899,32 +2885,8 @@
     bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);
 
   return bitmap;
-#else
-  /* if we don't know the direction we can use the generic *_getsock()
-     function even for the protocol_connect and doing states */
-  return Curl_single_getsock(conn, sock);
-#endif
 }
 
-/* Generic function called by the multi interface to figure out what socket(s)
-   to wait for and for what actions during the DOING and PROTOCONNECT states*/
-static int ssh_getsock(struct connectdata *conn,
-                       curl_socket_t *sock)
-{
-#ifndef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
-  (void)conn;
-  (void)sock;
-  /* if we don't know any direction we can just play along as we used to and
-     not provide any sensible info */
-  return GETSOCK_BLANK;
-#else
-  /* if we know the direction we can use the generic *_getsock() function even
-     for the protocol_connect and doing states */
-  return ssh_perform_getsock(conn, sock);
-#endif
-}
-
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
 /*
  * When one of the libssh2 functions has returned LIBSSH2_ERROR_EAGAIN this
  * function is used to figure out in what direction and stores this info so
@@ -2932,8 +2894,9 @@
  * function in all cases so that when it _doesn't_ return EAGAIN we can
  * restore the default wait bits.
  */
-static void ssh_block2waitfor(struct connectdata *conn, bool block)
+static void ssh_block2waitfor(struct Curl_easy *data, bool block)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   int dir = 0;
   if(block) {
@@ -2949,59 +2912,64 @@
        the original set */
     conn->waitfor = sshc->orig_waitfor;
 }
-#else
-  /* no libssh2 directional support so we simply don't know */
-#define ssh_block2waitfor(x,y) Curl_nop_stmt
-#endif
 
 /* called repeatedly until done from multi.c */
-static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done)
+static CURLcode ssh_multi_statemach(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   CURLcode result = CURLE_OK;
   bool block; /* we store the status and use that to provide a ssh_getsock()
                  implementation */
   do {
-    result = ssh_statemach_act(conn, &block);
+    result = ssh_statemach_act(data, &block);
     *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
     /* if there's no error, it isn't done and it didn't EWOULDBLOCK, then
        try again */
   } while(!result && !*done && !block);
-  ssh_block2waitfor(conn, block);
+  ssh_block2waitfor(data, block);
 
   return result;
 }
 
-static CURLcode ssh_block_statemach(struct connectdata *conn,
-                                   bool duringconnect)
+static CURLcode ssh_block_statemach(struct Curl_easy *data,
+                                    struct connectdata *conn,
+                                    bool disconnect)
 {
   struct ssh_conn *sshc = &conn->proto.sshc;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
+  struct curltime dis = Curl_now();
 
   while((sshc->state != SSH_STOP) && !result) {
     bool block;
     timediff_t left = 1000;
     struct curltime now = Curl_now();
 
-    result = ssh_statemach_act(conn, &block);
+    result = ssh_statemach_act(data, &block);
     if(result)
       break;
 
-    if(Curl_pgrsUpdate(conn))
-      return CURLE_ABORTED_BY_CALLBACK;
+    if(!disconnect) {
+      if(Curl_pgrsUpdate(data))
+        return CURLE_ABORTED_BY_CALLBACK;
 
-    result = Curl_speedcheck(data, now);
-    if(result)
+      result = Curl_speedcheck(data, now);
+      if(result)
+        break;
+
+      left = Curl_timeleft(data, NULL, FALSE);
+      if(left < 0) {
+        failf(data, "Operation timed out");
+        return CURLE_OPERATION_TIMEDOUT;
+      }
+    }
+    else if(Curl_timediff(now, dis) > 1000) {
+      /* disconnect timeout */
+      failf(data, "Disconnect timed out");
+      result = CURLE_OK;
       break;
-
-    left = Curl_timeleft(data, NULL, duringconnect);
-    if(left < 0) {
-      failf(data, "Operation timed out");
-      return CURLE_OPERATION_TIMEDOUT;
     }
 
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
     if(block) {
       int dir = libssh2_session_block_directions(sshc->ssh_session);
       curl_socket_t sock = conn->sock[FIRSTSOCKET];
@@ -3015,8 +2983,6 @@
       (void)Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write,
                               left>1000?1000:left);
     }
-#endif
-
   }
 
   return result;
@@ -3025,11 +2991,13 @@
 /*
  * SSH setup and connection
  */
-static CURLcode ssh_setup_connection(struct connectdata *conn)
+static CURLcode ssh_setup_connection(struct Curl_easy *data,
+                                     struct connectdata *conn)
 {
   struct SSHPROTO *ssh;
+  (void)conn;
 
-  conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO));
+  data->req.p.ssh = ssh = calloc(1, sizeof(struct SSHPROTO));
   if(!ssh)
     return CURLE_OUT_OF_MEMORY;
 
@@ -3039,83 +3007,101 @@
 static Curl_recv scp_recv, sftp_recv;
 static Curl_send scp_send, sftp_send;
 
+#ifndef CURL_DISABLE_PROXY
 static ssize_t ssh_tls_recv(libssh2_socket_t sock, void *buffer,
                             size_t length, int flags, void **abstract)
 {
-  struct connectdata *conn = (struct connectdata *)*abstract;
+  struct Curl_easy *data = (struct Curl_easy *)*abstract;
   ssize_t nread;
   CURLcode result;
+  struct connectdata *conn = data->conn;
+  Curl_recv *backup = conn->recv[0];
+  struct ssh_conn *ssh = &conn->proto.sshc;
   (void)flags;
 
-  result = Curl_read(conn, sock, buffer, length, &nread);
+  /* swap in the TLS reader function for this call only, and then swap back
+     the SSH one again */
+  conn->recv[0] = ssh->tls_recv;
+  result = Curl_read(data, sock, buffer, length, &nread);
+  conn->recv[0] = backup;
   if(result == CURLE_AGAIN)
     return -EAGAIN; /* magic return code for libssh2 */
   else if(result)
     return -1; /* generic error */
-  if(conn->data->set.verbose)
-    Curl_debug(conn->data, CURLINFO_DATA_IN, (char *)buffer, (size_t)nread);
+  Curl_debug(data, CURLINFO_DATA_IN, (char *)buffer, (size_t)nread);
   return nread;
 }
 
 static ssize_t ssh_tls_send(libssh2_socket_t sock, const void *buffer,
                             size_t length, int flags, void **abstract)
 {
-  struct connectdata *conn = (struct connectdata *)*abstract;
+  struct Curl_easy *data = (struct Curl_easy *)*abstract;
   ssize_t nwrite;
   CURLcode result;
+  struct connectdata *conn = data->conn;
+  Curl_send *backup = conn->send[0];
+  struct ssh_conn *ssh = &conn->proto.sshc;
   (void)flags;
 
-  result = Curl_write(conn, sock, buffer, length, &nwrite);
+  /* swap in the TLS writer function for this call only, and then swap back
+     the SSH one again */
+  conn->send[0] = ssh->tls_send;
+  result = Curl_write(data, sock, buffer, length, &nwrite);
+  conn->send[0] = backup;
   if(result == CURLE_AGAIN)
     return -EAGAIN; /* magic return code for libssh2 */
   else if(result)
     return -1; /* error */
-  if(conn->data->set.verbose)
-    Curl_debug(conn->data, CURLINFO_DATA_OUT, (char *)buffer, (size_t)nwrite);
+  Curl_debug(data, CURLINFO_DATA_OUT, (char *)buffer, (size_t)nwrite);
   return nwrite;
 }
+#endif
 
 /*
  * Curl_ssh_connect() gets called from Curl_protocol_connect() to allow us to
  * do protocol-specific actions at connect-time.
  */
-static CURLcode ssh_connect(struct connectdata *conn, bool *done)
+static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
 {
 #ifdef CURL_LIBSSH2_DEBUG
   curl_socket_t sock;
 #endif
-  struct ssh_conn *ssh;
+  struct ssh_conn *sshc;
   CURLcode result;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
 
   /* initialize per-handle data if not already */
-  if(!data->req.protop)
-    ssh_setup_connection(conn);
+  if(!data->req.p.ssh) {
+    result = ssh_setup_connection(data, conn);
+    if(result)
+      return result;
+  }
 
   /* We default to persistent connections. We set this already in this connect
      function to make the re-use checks properly be able to check this bit. */
   connkeep(conn, "SSH default");
 
-  ssh = &conn->proto.sshc;
+  sshc = &conn->proto.sshc;
 
 #ifdef CURL_LIBSSH2_DEBUG
   if(conn->user) {
-    infof(data, "User: %s\n", conn->user);
+    infof(data, "User: %s", conn->user);
   }
   if(conn->passwd) {
-    infof(data, "Password: %s\n", conn->passwd);
+    infof(data, "Password: %s", conn->passwd);
   }
   sock = conn->sock[FIRSTSOCKET];
 #endif /* CURL_LIBSSH2_DEBUG */
 
-  ssh->ssh_session = libssh2_session_init_ex(my_libssh2_malloc,
-                                             my_libssh2_free,
-                                             my_libssh2_realloc, conn);
-  if(ssh->ssh_session == NULL) {
+  sshc->ssh_session = libssh2_session_init_ex(my_libssh2_malloc,
+                                              my_libssh2_free,
+                                              my_libssh2_realloc, data);
+  if(!sshc->ssh_session) {
     failf(data, "Failure initialising ssh session");
     return CURLE_FAILED_INIT;
   }
 
+#ifndef CURL_DISABLE_PROXY
   if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
     /*
      * This crazy union dance is here to avoid assigning a void pointer a
@@ -3136,7 +3122,7 @@
     sshrecv.recvptr = ssh_tls_recv;
     sshsend.sendptr = ssh_tls_send;
 
-    infof(data, "Uses HTTPS proxy!\n");
+    infof(data, "Uses HTTPS proxy!");
     /*
       Setup libssh2 callbacks to make it read/write TLS from the socket.
 
@@ -3149,12 +3135,19 @@
       int flags, void **abstract);
 
     */
-    libssh2_session_callback_set(ssh->ssh_session,
+    libssh2_session_callback_set(sshc->ssh_session,
                                  LIBSSH2_CALLBACK_RECV, sshrecv.recvp);
-    libssh2_session_callback_set(ssh->ssh_session,
+    libssh2_session_callback_set(sshc->ssh_session,
                                  LIBSSH2_CALLBACK_SEND, sshsend.sendp);
+
+    /* Store the underlying TLS recv/send function pointers to be used when
+       reading from the proxy */
+    sshc->tls_recv = conn->recv[FIRSTSOCKET];
+    sshc->tls_send = conn->send[FIRSTSOCKET];
   }
-  else if(conn->handler->protocol & CURLPROTO_SCP) {
+
+#endif /* CURL_DISABLE_PROXY */
+  if(conn->handler->protocol & CURLPROTO_SCP) {
     conn->recv[FIRSTSOCKET] = scp_recv;
     conn->send[FIRSTSOCKET] = scp_send;
   }
@@ -3165,38 +3158,39 @@
 
   if(data->set.ssh_compression) {
 #if LIBSSH2_VERSION_NUM >= 0x010208
-    if(libssh2_session_flag(ssh->ssh_session, LIBSSH2_FLAG_COMPRESS, 1) < 0)
+    if(libssh2_session_flag(sshc->ssh_session, LIBSSH2_FLAG_COMPRESS, 1) < 0)
 #endif
-      infof(data, "Failed to enable compression for ssh session\n");
+      infof(data, "Failed to enable compression for ssh session");
   }
 
 #ifdef HAVE_LIBSSH2_KNOWNHOST_API
   if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
     int rc;
-    ssh->kh = libssh2_knownhost_init(ssh->ssh_session);
-    if(!ssh->kh) {
-      libssh2_session_free(ssh->ssh_session);
+    sshc->kh = libssh2_knownhost_init(sshc->ssh_session);
+    if(!sshc->kh) {
+      libssh2_session_free(sshc->ssh_session);
+      sshc->ssh_session = NULL;
       return CURLE_FAILED_INIT;
     }
 
     /* read all known hosts from there */
-    rc = libssh2_knownhost_readfile(ssh->kh,
+    rc = libssh2_knownhost_readfile(sshc->kh,
                                     data->set.str[STRING_SSH_KNOWNHOSTS],
                                     LIBSSH2_KNOWNHOST_FILE_OPENSSH);
     if(rc < 0)
-      infof(data, "Failed to read known hosts from %s\n",
+      infof(data, "Failed to read known hosts from %s",
             data->set.str[STRING_SSH_KNOWNHOSTS]);
   }
 #endif /* HAVE_LIBSSH2_KNOWNHOST_API */
 
 #ifdef CURL_LIBSSH2_DEBUG
-  libssh2_trace(ssh->ssh_session, ~0);
-  infof(data, "SSH socket: %d\n", (int)sock);
+  libssh2_trace(sshc->ssh_session, ~0);
+  infof(data, "SSH socket: %d", (int)sock);
 #endif /* CURL_LIBSSH2_DEBUG */
 
-  state(conn, SSH_INIT);
+  state(data, SSH_INIT);
 
-  result = ssh_multi_statemach(conn, done);
+  result = ssh_multi_statemach(data, done);
 
   return result;
 }
@@ -3211,40 +3205,41 @@
  */
 
 static
-CURLcode scp_perform(struct connectdata *conn,
-                      bool *connected,
-                      bool *dophase_done)
+CURLcode scp_perform(struct Curl_easy *data,
+                     bool *connected,
+                     bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
   *dophase_done = FALSE; /* not done yet */
 
   /* start the first command in the DO phase */
-  state(conn, SSH_SCP_TRANS_INIT);
+  state(data, SSH_SCP_TRANS_INIT);
 
   /* run the state-machine */
-  result = ssh_multi_statemach(conn, dophase_done);
+  result = ssh_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
 }
 
 /* called from multi.c while DOing */
-static CURLcode scp_doing(struct connectdata *conn,
-                               bool *dophase_done)
+static CURLcode scp_doing(struct Curl_easy *data,
+                          bool *dophase_done)
 {
   CURLcode result;
-  result = ssh_multi_statemach(conn, dophase_done);
+  result = ssh_multi_statemach(data, dophase_done);
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
   return result;
 }
@@ -3254,11 +3249,11 @@
  * separate ones but this way means less duplicated code.
  */
 
-static CURLcode ssh_do(struct connectdata *conn, bool *done)
+static CURLcode ssh_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result;
   bool connected = 0;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 
   *done = FALSE; /* default to false */
@@ -3275,9 +3270,9 @@
   Curl_pgrsSetDownloadSize(data, -1);
 
   if(conn->handler->protocol & CURLPROTO_SCP)
-    result = scp_perform(conn, &connected,  done);
+    result = scp_perform(data, &connected,  done);
   else
-    result = sftp_perform(conn, &connected,  done);
+    result = sftp_perform(data, &connected,  done);
 
   return result;
 }
@@ -3285,18 +3280,18 @@
 /* BLOCKING, but the function is using the state machine so the only reason
    this is still blocking is that the multi interface code has no support for
    disconnecting operations that takes a while */
-static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode scp_disconnect(struct Curl_easy *data,
+                               struct connectdata *conn,
+                               bool dead_connection)
 {
   CURLcode result = CURLE_OK;
-  struct ssh_conn *ssh = &conn->proto.sshc;
+  struct ssh_conn *sshc = &conn->proto.sshc;
   (void) dead_connection;
 
-  if(ssh->ssh_session) {
+  if(sshc->ssh_session) {
     /* only if there's a session still around to use! */
-
-    state(conn, SSH_SESSION_DISCONNECT);
-
-    result = ssh_block_statemach(conn, FALSE);
+    state(data, SSH_SESSION_DISCONNECT);
+    result = ssh_block_statemach(data, conn, TRUE);
   }
 
   return result;
@@ -3304,51 +3299,55 @@
 
 /* generic done function for both SCP and SFTP called from their specific
    done functions */
-static CURLcode ssh_done(struct connectdata *conn, CURLcode status)
+static CURLcode ssh_done(struct Curl_easy *data, CURLcode status)
 {
   CURLcode result = CURLE_OK;
-  struct SSHPROTO *sftp_scp = conn->data->req.protop;
+  struct SSHPROTO *sshp = data->req.p.ssh;
+  struct connectdata *conn = data->conn;
 
-  if(!status) {
+  if(!status)
     /* run the state-machine */
-    result = ssh_block_statemach(conn, FALSE);
-  }
+    result = ssh_block_statemach(data, conn, FALSE);
   else
     result = status;
 
-  if(sftp_scp)
-    Curl_safefree(sftp_scp->path);
-  if(Curl_pgrsDone(conn))
+  Curl_safefree(sshp->path);
+  Curl_safefree(sshp->readdir_filename);
+  Curl_safefree(sshp->readdir_longentry);
+  Curl_dyn_free(&sshp->readdir);
+
+  if(Curl_pgrsDone(data))
     return CURLE_ABORTED_BY_CALLBACK;
 
-  conn->data->req.keepon = 0; /* clear all bits */
+  data->req.keepon = 0; /* clear all bits */
   return result;
 }
 
 
-static CURLcode scp_done(struct connectdata *conn, CURLcode status,
+static CURLcode scp_done(struct Curl_easy *data, CURLcode status,
                          bool premature)
 {
   (void)premature; /* not used */
 
   if(!status)
-    state(conn, SSH_SCP_DONE);
+    state(data, SSH_SCP_DONE);
 
-  return ssh_done(conn, status);
+  return ssh_done(data, status);
 
 }
 
-static ssize_t scp_send(struct connectdata *conn, int sockindex,
+static ssize_t scp_send(struct Curl_easy *data, int sockindex,
                         const void *mem, size_t len, CURLcode *err)
 {
   ssize_t nwrite;
+  struct connectdata *conn = data->conn;
+  struct ssh_conn *sshc = &conn->proto.sshc;
   (void)sockindex; /* we only support SCP on the fixed known primary socket */
 
   /* libssh2_channel_write() returns int! */
-  nwrite = (ssize_t)
-    libssh2_channel_write(conn->proto.sshc.ssh_channel, mem, len);
+  nwrite = (ssize_t) libssh2_channel_write(sshc->ssh_channel, mem, len);
 
-  ssh_block2waitfor(conn, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
+  ssh_block2waitfor(data, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
 
   if(nwrite == LIBSSH2_ERROR_EAGAIN) {
     *err = CURLE_AGAIN;
@@ -3362,17 +3361,18 @@
   return nwrite;
 }
 
-static ssize_t scp_recv(struct connectdata *conn, int sockindex,
+static ssize_t scp_recv(struct Curl_easy *data, int sockindex,
                         char *mem, size_t len, CURLcode *err)
 {
   ssize_t nread;
+  struct connectdata *conn = data->conn;
+  struct ssh_conn *sshc = &conn->proto.sshc;
   (void)sockindex; /* we only support SCP on the fixed known primary socket */
 
   /* libssh2_channel_read() returns int */
-  nread = (ssize_t)
-    libssh2_channel_read(conn->proto.sshc.ssh_channel, mem, len);
+  nread = (ssize_t) libssh2_channel_read(sshc->ssh_channel, mem, len);
 
-  ssh_block2waitfor(conn, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
+  ssh_block2waitfor(data, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
   if(nread == LIBSSH2_ERROR_EAGAIN) {
     *err = CURLE_AGAIN;
     nread = -1;
@@ -3395,39 +3395,39 @@
  */
 
 static
-CURLcode sftp_perform(struct connectdata *conn,
+CURLcode sftp_perform(struct Curl_easy *data,
                       bool *connected,
                       bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
   *dophase_done = FALSE; /* not done yet */
 
   /* start the first command in the DO phase */
-  state(conn, SSH_SFTP_QUOTE_INIT);
+  state(data, SSH_SFTP_QUOTE_INIT);
 
   /* run the state-machine */
-  result = ssh_multi_statemach(conn, dophase_done);
+  result = ssh_multi_statemach(data, dophase_done);
 
-  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
+  *connected = data->conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
 }
 
 /* called from multi.c while DOing */
-static CURLcode sftp_doing(struct connectdata *conn,
+static CURLcode sftp_doing(struct Curl_easy *data,
                            bool *dophase_done)
 {
-  CURLcode result = ssh_multi_statemach(conn, dophase_done);
+  CURLcode result = ssh_multi_statemach(data, dophase_done);
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
   return result;
 }
@@ -3435,53 +3435,56 @@
 /* BLOCKING, but the function is using the state machine so the only reason
    this is still blocking is that the multi interface code has no support for
    disconnecting operations that takes a while */
-static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode sftp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead_connection)
 {
   CURLcode result = CURLE_OK;
+  struct ssh_conn *sshc = &conn->proto.sshc;
   (void) dead_connection;
 
-  DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));
+  DEBUGF(infof(data, "SSH DISCONNECT starts now"));
 
-  if(conn->proto.sshc.ssh_session) {
+  if(sshc->ssh_session) {
     /* only if there's a session still around to use! */
-    state(conn, SSH_SFTP_SHUTDOWN);
-    result = ssh_block_statemach(conn, FALSE);
+    state(data, SSH_SFTP_SHUTDOWN);
+    result = ssh_block_statemach(data, conn, TRUE);
   }
 
-  DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n"));
+  DEBUGF(infof(data, "SSH DISCONNECT is done"));
 
   return result;
 
 }
 
-static CURLcode sftp_done(struct connectdata *conn, CURLcode status,
+static CURLcode sftp_done(struct Curl_easy *data, CURLcode status,
                                bool premature)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 
   if(!status) {
     /* Post quote commands are executed after the SFTP_CLOSE state to avoid
        errors that could happen due to open file handles during POSTQUOTE
        operation */
-    if(!premature && conn->data->set.postquote && !conn->bits.retry)
+    if(!premature && data->set.postquote && !conn->bits.retry)
       sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
-    state(conn, SSH_SFTP_CLOSE);
+    state(data, SSH_SFTP_CLOSE);
   }
-  return ssh_done(conn, status);
+  return ssh_done(data, status);
 }
 
 /* return number of sent bytes */
-static ssize_t sftp_send(struct connectdata *conn, int sockindex,
+static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
                          const void *mem, size_t len, CURLcode *err)
 {
-  ssize_t nwrite;   /* libssh2_sftp_write() used to return size_t in 0.14
-                       but is changed to ssize_t in 0.15. These days we don't
-                       support libssh2 0.15*/
+  ssize_t nwrite;
+  struct connectdata *conn = data->conn;
+  struct ssh_conn *sshc = &conn->proto.sshc;
   (void)sockindex;
 
-  nwrite = libssh2_sftp_write(conn->proto.sshc.sftp_handle, mem, len);
+  nwrite = libssh2_sftp_write(sshc->sftp_handle, mem, len);
 
-  ssh_block2waitfor(conn, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
+  ssh_block2waitfor(data, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
 
   if(nwrite == LIBSSH2_ERROR_EAGAIN) {
     *err = CURLE_AGAIN;
@@ -3499,15 +3502,17 @@
  * Return number of received (decrypted) bytes
  * or <0 on error
  */
-static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
+static ssize_t sftp_recv(struct Curl_easy *data, int sockindex,
                          char *mem, size_t len, CURLcode *err)
 {
   ssize_t nread;
+  struct connectdata *conn = data->conn;
+  struct ssh_conn *sshc = &conn->proto.sshc;
   (void)sockindex;
 
-  nread = libssh2_sftp_read(conn->proto.sshc.sftp_handle, mem, len);
+  nread = libssh2_sftp_read(sshc->sftp_handle, mem, len);
 
-  ssh_block2waitfor(conn, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
+  ssh_block2waitfor(data, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
 
   if(nread == LIBSSH2_ERROR_EAGAIN) {
     *err = CURLE_AGAIN;
@@ -3604,9 +3609,26 @@
 #endif
 }
 
-size_t Curl_ssh_version(char *buffer, size_t buflen)
+void Curl_ssh_version(char *buffer, size_t buflen)
 {
-  return msnprintf(buffer, buflen, "libssh2/%s", LIBSSH2_VERSION);
+  (void)msnprintf(buffer, buflen, "libssh2/%s", LIBSSH2_VERSION);
 }
 
+/* The SSH session is associated with the *CONNECTION* but the callback user
+ * pointer is an easy handle pointer. This function allows us to reassign the
+ * user pointer to the *CURRENT* (new) easy handle.
+ */
+static void ssh_attach(struct Curl_easy *data, struct connectdata *conn)
+{
+  DEBUGASSERT(data);
+  DEBUGASSERT(conn);
+  if(conn->handler->protocol & PROTO_FAMILY_SSH) {
+    struct ssh_conn *sshc = &conn->proto.sshc;
+    if(sshc->ssh_session) {
+      /* only re-attach if the session already exists */
+      void **abstract = libssh2_session_abstract(sshc->ssh_session);
+      *abstract = data;
+    }
+  }
+}
 #endif /* USE_LIBSSH2 */
diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h
index 9e49993..7972081 100644
--- a/lib/vssh/ssh.h
+++ b/lib/vssh/ssh.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -111,6 +111,17 @@
    struct. */
 struct SSHPROTO {
   char *path;                  /* the path we operate on */
+#ifdef USE_LIBSSH2
+  struct dynbuf readdir_link;
+  struct dynbuf readdir;
+  char *readdir_filename;
+  char *readdir_longentry;
+
+  LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */
+
+  /* Here's a set of struct members used by the SFTP_READDIR state */
+  LIBSSH2_SFTP_ATTRIBUTES readdir_attrs;
+#endif
 };
 
 /* ssh_conn is used for struct connection-oriented data in the connectdata
@@ -123,6 +134,8 @@
   char *rsa_pub;              /* path name */
   char *rsa;                  /* path name */
   bool authed;                /* the connection has been authenticated fine */
+  bool acceptfail;            /* used by the SFTP_QUOTE (continue if
+                                 quote command fails) */
   sshstate state;             /* always use ssh.c:state() to change state! */
   sshstate nextstate;         /* the state to goto after stopping */
   CURLcode actualcode;        /* the actual error code */
@@ -130,8 +143,6 @@
   char *quote_path1;          /* two generic pointers for the QUOTE stuff */
   char *quote_path2;
 
-  bool acceptfail;            /* used by the SFTP_QUOTE (continue if
-                                 quote command fails) */
   char *homedir;              /* when doing SFTP we figure out home dir in the
                                  connect phase */
   char *readdir_line;
@@ -140,9 +151,8 @@
   int secondCreateDirs;         /* counter use by the code to see if the
                                    second attempt has been made to change
                                    to/create a directory */
-  char *slash_pos;              /* used by the SFTP_CREATE_DIRS state */
-
   int orig_waitfor;             /* default READ/WRITE bits wait for */
+  char *slash_pos;              /* used by the SFTP_CREATE_DIRS state */
 
 #if defined(USE_LIBSSH)
   char *readdir_linkPath;
@@ -168,20 +178,17 @@
   const char *readdir_longentry;
   char *readdir_tmp;
 #elif defined(USE_LIBSSH2)
-  struct dynbuf readdir_link;
-  struct dynbuf readdir;
-  char *readdir_filename;
-  char *readdir_longentry;
-
-  LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */
-
-  /* Here's a set of struct members used by the SFTP_READDIR state */
-  LIBSSH2_SFTP_ATTRIBUTES readdir_attrs;
   LIBSSH2_SESSION *ssh_session; /* Secure Shell session */
   LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */
   LIBSSH2_SFTP *sftp_session;   /* SFTP handle */
   LIBSSH2_SFTP_HANDLE *sftp_handle;
 
+#ifndef CURL_DISABLE_PROXY
+  /* for HTTPS proxy storage */
+  Curl_recv *tls_recv;
+  Curl_send *tls_send;
+#endif
+
 #ifdef HAVE_LIBSSH2_AGENT_API
   LIBSSH2_AGENT *ssh_agent;     /* proxy to ssh-agent/pageant */
   struct libssh2_agent_publickey *sshagent_identity,
@@ -255,10 +262,13 @@
 /* generic SSH backend functions */
 CURLcode Curl_ssh_init(void);
 void Curl_ssh_cleanup(void);
-size_t Curl_ssh_version(char *buffer, size_t buflen);
+void Curl_ssh_version(char *buffer, size_t buflen);
+void Curl_ssh_attach(struct Curl_easy *data,
+                     struct connectdata *conn);
 #else
 /* for non-SSH builds */
 #define Curl_ssh_cleanup()
+#define Curl_ssh_attach(x,y)
 #endif
 
 #endif /* HEADER_CURL_SSH_H */
diff --git a/lib/vssh/wolfssh.c b/lib/vssh/wolfssh.c
index dcbbab6..4b1e2ec 100644
--- a/lib/vssh/wolfssh.c
+++ b/lib/vssh/wolfssh.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -45,27 +45,30 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
-static CURLcode wssh_connect(struct connectdata *conn, bool *done);
-static CURLcode wssh_multi_statemach(struct connectdata *conn, bool *done);
-static CURLcode wssh_do(struct connectdata *conn, bool *done);
+static CURLcode wssh_connect(struct Curl_easy *data, bool *done);
+static CURLcode wssh_multi_statemach(struct Curl_easy *data, bool *done);
+static CURLcode wssh_do(struct Curl_easy *data, bool *done);
 #if 0
-static CURLcode wscp_done(struct connectdata *conn,
+static CURLcode wscp_done(struct Curl_easy *data,
                           CURLcode, bool premature);
-static CURLcode wscp_doing(struct connectdata *conn,
+static CURLcode wscp_doing(struct Curl_easy *data,
                            bool *dophase_done);
-static CURLcode wscp_disconnect(struct connectdata *conn,
+static CURLcode wscp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn,
                                 bool dead_connection);
 #endif
-static CURLcode wsftp_done(struct connectdata *conn,
+static CURLcode wsftp_done(struct Curl_easy *data,
                            CURLcode, bool premature);
-static CURLcode wsftp_doing(struct connectdata *conn,
+static CURLcode wsftp_doing(struct Curl_easy *data,
                             bool *dophase_done);
-static CURLcode wsftp_disconnect(struct connectdata *conn, bool dead);
-static int wssh_getsock(struct connectdata *conn,
+static CURLcode wsftp_disconnect(struct Curl_easy *data,
+                                 struct connectdata *conn,
+                                 bool dead);
+static int wssh_getsock(struct Curl_easy *data,
+                        struct connectdata *conn,
                         curl_socket_t *sock);
-static int wssh_perform_getsock(const struct connectdata *conn,
-                                curl_socket_t *sock);
-static CURLcode wssh_setup_connection(struct connectdata *conn);
+static CURLcode wssh_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn);
 
 #if 0
 /*
@@ -84,10 +87,11 @@
   wssh_getsock,                         /* proto_getsock */
   wssh_getsock,                         /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  wssh_perform_getsock,                 /* perform_getsock */
+  wssh_getsock,                         /* perform_getsock */
   wscp_disconnect,                      /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_SSH,                             /* defport */
   CURLPROTO_SCP,                        /* protocol */
   PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
@@ -112,12 +116,14 @@
   wssh_getsock,                         /* proto_getsock */
   wssh_getsock,                         /* doing_getsock */
   ZERO_NULL,                            /* domore_getsock */
-  wssh_perform_getsock,                 /* perform_getsock */
+  wssh_getsock,                         /* perform_getsock */
   wsftp_disconnect,                     /* disconnect */
   ZERO_NULL,                            /* readwrite */
   ZERO_NULL,                            /* connection_check */
+  ZERO_NULL,                            /* attach connection */
   PORT_SSH,                             /* defport */
   CURLPROTO_SFTP,                       /* protocol */
+  CURLPROTO_SFTP,                       /* family */
   PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
   | PROTOPT_NOURLQUERY                  /* flags */
 };
@@ -126,8 +132,9 @@
  * SSH State machine related code
  */
 /* This is the ONLY way to change SSH state! */
-static void state(struct connectdata *conn, sshstate nowstate)
+static void state(struct Curl_easy *data, sshstate nowstate)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
@@ -198,7 +205,7 @@
   DEBUGASSERT(sizeof(names)/sizeof(names[0]) == SSH_LAST);
 
   if(sshc->state != nowstate) {
-    infof(conn->data, "wolfssh %p state change from %s to %s\n",
+    infof(data, "wolfssh %p state change from %s to %s",
           (void *)sshc, names[sshc->state], names[nowstate]);
   }
 #endif
@@ -206,11 +213,11 @@
   sshc->state = nowstate;
 }
 
-static ssize_t wscp_send(struct connectdata *conn, int sockindex,
+static ssize_t wscp_send(struct Curl_easy *data, int sockindex,
                          const void *mem, size_t len, CURLcode *err)
 {
   ssize_t nwrite = 0;
-  (void)conn;
+  (void)data;
   (void)sockindex; /* we only support SCP on the fixed known primary socket */
   (void)mem;
   (void)len;
@@ -219,11 +226,11 @@
   return nwrite;
 }
 
-static ssize_t wscp_recv(struct connectdata *conn, int sockindex,
+static ssize_t wscp_recv(struct Curl_easy *data, int sockindex,
                          char *mem, size_t len, CURLcode *err)
 {
   ssize_t nread = 0;
-  (void)conn;
+  (void)data;
   (void)sockindex; /* we only support SCP on the fixed known primary socket */
   (void)mem;
   (void)len;
@@ -233,9 +240,10 @@
 }
 
 /* return number of sent bytes */
-static ssize_t wsftp_send(struct connectdata *conn, int sockindex,
+static ssize_t wsftp_send(struct Curl_easy *data, int sockindex,
                           const void *mem, size_t len, CURLcode *err)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   word32 offset[2];
   int rc;
@@ -262,11 +270,11 @@
     return -1;
   }
   if(rc < 0) {
-    failf(conn->data, "wolfSSH_SFTP_SendWritePacket returned %d\n", rc);
+    failf(data, "wolfSSH_SFTP_SendWritePacket returned %d", rc);
     return -1;
   }
   DEBUGASSERT(rc == (int)len);
-  infof(conn->data, "sent %zd bytes SFTP from offset %zd\n",
+  infof(data, "sent %zd bytes SFTP from offset %zd",
         len, sshc->offset);
   sshc->offset += len;
   return (ssize_t)rc;
@@ -276,10 +284,11 @@
  * Return number of received (decrypted) bytes
  * or <0 on error
  */
-static ssize_t wsftp_recv(struct connectdata *conn, int sockindex,
+static ssize_t wsftp_recv(struct Curl_easy *data, int sockindex,
                           char *mem, size_t len, CURLcode *err)
 {
   int rc;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   word32 offset[2];
   (void)sockindex;
@@ -307,7 +316,7 @@
   DEBUGASSERT(rc <= (int)len);
 
   if(rc < 0) {
-    failf(conn->data, "wolfSSH_SFTP_SendReadPacket returned %d\n", rc);
+    failf(data, "wolfSSH_SFTP_SendReadPacket returned %d", rc);
     return -1;
   }
   sshc->offset += len;
@@ -318,11 +327,13 @@
 /*
  * SSH setup and connection
  */
-static CURLcode wssh_setup_connection(struct connectdata *conn)
+static CURLcode wssh_setup_connection(struct Curl_easy *data,
+                                      struct connectdata *conn)
 {
   struct SSHPROTO *ssh;
+  (void)conn;
 
-  conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO));
+  data->req.p.ssh = ssh = calloc(1, sizeof(struct SSHPROTO));
   if(!ssh)
     return CURLE_OUT_OF_MEMORY;
 
@@ -336,28 +347,28 @@
                     WS_UserAuthData* authdata,
                     void *ctx)
 {
-  struct connectdata *conn = ctx;
-  DEBUGF(infof(conn->data, "wolfssh callback: type %s\n",
+  struct Curl_easy *data = ctx;
+  DEBUGF(infof(data, "wolfssh callback: type %s",
                authtype == WOLFSSH_USERAUTH_PASSWORD ? "PASSWORD" :
                "PUBLICCKEY"));
   if(authtype == WOLFSSH_USERAUTH_PASSWORD) {
-    authdata->sf.password.password = (byte *)conn->passwd;
-    authdata->sf.password.passwordSz = (word32) strlen(conn->passwd);
+    authdata->sf.password.password = (byte *)data->conn->passwd;
+    authdata->sf.password.passwordSz = (word32) strlen(data->conn->passwd);
   }
 
   return 0;
 }
 
-static CURLcode wssh_connect(struct connectdata *conn, bool *done)
+static CURLcode wssh_connect(struct Curl_easy *data, bool *done)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
   int rc;
 
   /* initialize per-handle data if not already */
-  if(!data->req.protop)
-    wssh_setup_connection(conn);
+  if(!data->req.p.ssh)
+    wssh_setup_connection(data, conn);
 
   /* We default to persistent connections. We set this already in this connect
      function to make the re-use checks properly be able to check this bit. */
@@ -379,7 +390,7 @@
   }
 
   sshc->ssh_session = wolfSSH_new(sshc->ctx);
-  if(sshc->ssh_session == NULL) {
+  if(!sshc->ssh_session) {
     failf(data, "No wolfSSH session");
     goto error;
   }
@@ -392,7 +403,7 @@
 
   /* set callback for authentication */
   wolfSSH_SetUserAuth(sshc->ctx, userauth);
-  wolfSSH_SetUserAuthCtx(sshc->ssh_session, conn);
+  wolfSSH_SetUserAuthCtx(sshc->ssh_session, data);
 
   rc = wolfSSH_set_fd(sshc->ssh_session, (int)sock);
   if(rc) {
@@ -406,11 +417,11 @@
 
   *done = TRUE;
   if(conn->handler->protocol & CURLPROTO_SCP)
-    state(conn, SSH_INIT);
+    state(data, SSH_INIT);
   else
-    state(conn, SSH_SFTP_INIT);
+    state(data, SSH_SFTP_INIT);
 
-  return wssh_multi_statemach(conn, done);
+  return wssh_multi_statemach(data, done);
   error:
   wolfSSH_free(sshc->ssh_session);
   wolfSSH_CTX_free(sshc->ctx);
@@ -424,12 +435,12 @@
  * wants to be called again when the socket is ready
  */
 
-static CURLcode wssh_statemach_act(struct connectdata *conn, bool *block)
+static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
-  struct Curl_easy *data = conn->data;
-  struct SSHPROTO *sftp_scp = data->req.protop;
+  struct SSHPROTO *sftp_scp = data->req.p.ssh;
   WS_SFTPNAME *name;
   int rc = 0;
   *block = FALSE; /* we're not blocking by default */
@@ -437,7 +448,7 @@
   do {
     switch(sshc->state) {
     case SSH_INIT:
-      state(conn, SSH_S_STARTUP);
+      state(data, SSH_S_STARTUP);
       /* FALLTHROUGH */
     case SSH_S_STARTUP:
       rc = wolfSSH_connect(sshc->ssh_session);
@@ -454,11 +465,11 @@
         return CURLE_OK;
       }
       else if(rc != WS_SUCCESS) {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         return CURLE_SSH;
       }
-      infof(data, "wolfssh connected!\n");
-      state(conn, SSH_STOP);
+      infof(data, "wolfssh connected!");
+      state(data, SSH_STOP);
       break;
     case SSH_STOP:
       break;
@@ -478,8 +489,8 @@
         return CURLE_OK;
       }
       else if(rc == WS_SUCCESS) {
-        infof(data, "wolfssh SFTP connected!\n");
-        state(conn, SSH_SFTP_REALPATH);
+        infof(data, "wolfssh SFTP connected!");
+        state(data, SSH_SFTP_REALPATH);
       }
       else {
         failf(data, "wolfssh SFTP connect error %d", rc);
@@ -507,48 +518,48 @@
         else {
           memcpy(sshc->homedir, name->fName, name->fSz);
           sshc->homedir[name->fSz] = 0;
-          infof(data, "wolfssh SFTP realpath succeeded!\n");
+          infof(data, "wolfssh SFTP realpath succeeded!");
         }
         wolfSSH_SFTPNAME_list_free(name);
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         return CURLE_OK;
       }
       failf(data, "wolfssh SFTP realpath %d", rc);
       return CURLE_SSH;
 
     case SSH_SFTP_QUOTE_INIT:
-      result = Curl_getworkingpath(conn, sshc->homedir, &sftp_scp->path);
+      result = Curl_getworkingpath(data, sshc->homedir, &sftp_scp->path);
       if(result) {
         sshc->actualcode = result;
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
 
       if(data->set.quote) {
-        infof(data, "Sending quote commands\n");
+        infof(data, "Sending quote commands");
         sshc->quote_item = data->set.quote;
-        state(conn, SSH_SFTP_QUOTE);
+        state(data, SSH_SFTP_QUOTE);
       }
       else {
-        state(conn, SSH_SFTP_GETINFO);
+        state(data, SSH_SFTP_GETINFO);
       }
       break;
     case SSH_SFTP_GETINFO:
       if(data->set.get_filetime) {
-        state(conn, SSH_SFTP_FILETIME);
+        state(data, SSH_SFTP_FILETIME);
       }
       else {
-        state(conn, SSH_SFTP_TRANS_INIT);
+        state(data, SSH_SFTP_TRANS_INIT);
       }
       break;
     case SSH_SFTP_TRANS_INIT:
       if(data->set.upload)
-        state(conn, SSH_SFTP_UPLOAD_INIT);
+        state(data, SSH_SFTP_UPLOAD_INIT);
       else {
         if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/')
-          state(conn, SSH_SFTP_READDIR_INIT);
+          state(data, SSH_SFTP_READDIR_INIT);
         else
-          state(conn, SSH_SFTP_DOWNLOAD_INIT);
+          state(data, SSH_SFTP_DOWNLOAD_INIT);
       }
       break;
     case SSH_SFTP_UPLOAD_INIT: {
@@ -576,14 +587,14 @@
         }
       }
 
-      if(data->set.ftp_append)
+      if(data->set.remote_append)
         /* Try to open for append, but create if nonexisting */
         flags = WOLFSSH_FXF_WRITE|WOLFSSH_FXF_CREAT|WOLFSSH_FXF_APPEND;
       else if(data->state.resume_from > 0)
         /* If we have restart position then open for append */
         flags = WOLFSSH_FXF_WRITE|WOLFSSH_FXF_APPEND;
       else
-        /* Clear file before writing (normal behaviour) */
+        /* Clear file before writing (normal behavior) */
         flags = WOLFSSH_FXF_WRITE|WOLFSSH_FXF_CREAT|WOLFSSH_FXF_TRUNC;
 
       memset(&createattrs, 0, sizeof(createattrs));
@@ -605,13 +616,13 @@
         return CURLE_OK;
       }
       else if(rc == WS_SUCCESS) {
-        infof(data, "wolfssh SFTP open succeeded!\n");
+        infof(data, "wolfssh SFTP open succeeded!");
       }
       else {
         failf(data, "wolfssh SFTP upload open failed: %d", rc);
         return CURLE_SSH;
       }
-      state(conn, SSH_SFTP_DOWNLOAD_STAT);
+      state(data, SSH_SFTP_DOWNLOAD_STAT);
 
       /* If we have a restart point then we need to seek to the correct
          position. */
@@ -676,7 +687,7 @@
       conn->sockfd = conn->writesockfd;
 
       if(result) {
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = result;
       }
       else {
@@ -694,7 +705,7 @@
            timeout here */
         Curl_expire(data, 0, EXPIRE_RUN_NOW);
 
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       break;
     }
@@ -716,8 +727,8 @@
         return CURLE_OK;
       }
       else if(rc == WS_SUCCESS) {
-        infof(data, "wolfssh SFTP open succeeded!\n");
-        state(conn, SSH_SFTP_DOWNLOAD_STAT);
+        infof(data, "wolfssh SFTP open succeeded!");
+        state(data, SSH_SFTP_DOWNLOAD_STAT);
         return CURLE_OK;
       }
 
@@ -742,7 +753,7 @@
         return CURLE_OK;
       }
       else if(rc == WS_SUCCESS) {
-        infof(data, "wolfssh STAT succeeded!\n");
+        infof(data, "wolfssh STAT succeeded!");
       }
       else {
         failf(data, "wolfssh SFTP open failed: %d", rc);
@@ -758,12 +769,12 @@
       data->req.maxdownload = size;
       Curl_pgrsSetDownloadSize(data, size);
 
-      infof(data, "SFTP download %" CURL_FORMAT_CURL_OFF_T " bytes\n", size);
+      infof(data, "SFTP download %" CURL_FORMAT_CURL_OFF_T " bytes", size);
 
       /* We cannot seek with wolfSSH so resuming and range requests are not
          possible */
-      if(conn->data->state.use_range || data->state.resume_from) {
-        infof(data, "wolfSSH cannot do range/seek on SFTP\n");
+      if(data->state.use_range || data->state.resume_from) {
+        infof(data, "wolfSSH cannot do range/seek on SFTP");
         return CURLE_BAD_DOWNLOAD_RESUME;
       }
 
@@ -771,8 +782,8 @@
       if(data->req.size == 0) {
         /* no data to transfer */
         Curl_setup_transfer(data, -1, -1, FALSE, -1);
-        infof(data, "File already completely downloaded\n");
-        state(conn, SSH_STOP);
+        infof(data, "File already completely downloaded");
+        state(data, SSH_STOP);
         break;
       }
       Curl_setup_transfer(data, FIRSTSOCKET, data->req.size, FALSE, -1);
@@ -788,11 +799,11 @@
       if(result) {
         /* this should never occur; the close state should be entered
            at the time the error occurs */
-        state(conn, SSH_SFTP_CLOSE);
+        state(data, SSH_SFTP_CLOSE);
         sshc->actualcode = result;
       }
       else {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
       }
       break;
     }
@@ -813,7 +824,7 @@
         return CURLE_OK;
       }
       else if(rc == WS_SUCCESS) {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         return CURLE_OK;
       }
 
@@ -823,10 +834,10 @@
     case SSH_SFTP_READDIR_INIT:
       Curl_pgrsSetDownloadSize(data, -1);
       if(data->set.opt_no_body) {
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         break;
       }
-      state(conn, SSH_SFTP_READDIR);
+      state(data, SSH_SFTP_READDIR);
       /* FALLTHROUGH */
     case SSH_SFTP_READDIR:
       name = wolfSSH_SFTP_LS(sshc->ssh_session, sftp_scp->path);
@@ -850,14 +861,14 @@
         result = CURLE_OK;
         while(name) {
           char *line = aprintf("%s\n",
-                               data->set.ftp_list_only ?
+                               data->set.list_only ?
                                name->fName : name->lName);
-          if(line == NULL) {
-            state(conn, SSH_SFTP_CLOSE);
+          if(!line) {
+            state(data, SSH_SFTP_CLOSE);
             sshc->actualcode = CURLE_OUT_OF_MEMORY;
             break;
           }
-          result = Curl_client_write(conn, CLIENTWRITE_BODY,
+          result = Curl_client_write(data, CLIENTWRITE_BODY,
                                      line, strlen(line));
           free(line);
           if(result) {
@@ -867,7 +878,7 @@
           name = name->next;
         }
         wolfSSH_SFTPNAME_list_free(origname);
-        state(conn, SSH_STOP);
+        state(data, SSH_STOP);
         return result;
       }
       failf(data, "wolfssh SFTP ls failed: %d", rc);
@@ -877,7 +888,7 @@
       Curl_safefree(sshc->homedir);
       wolfSSH_free(sshc->ssh_session);
       wolfSSH_CTX_free(sshc->ctx);
-      state(conn, SSH_STOP);
+      state(data, SSH_STOP);
       return CURLE_OK;
     default:
       break;
@@ -887,19 +898,20 @@
 }
 
 /* called repeatedly until done from multi.c */
-static CURLcode wssh_multi_statemach(struct connectdata *conn, bool *done)
+static CURLcode wssh_multi_statemach(struct Curl_easy *data, bool *done)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   CURLcode result = CURLE_OK;
   bool block; /* we store the status and use that to provide a ssh_getsock()
                  implementation */
   do {
-    result = wssh_statemach_act(conn, &block);
+    result = wssh_statemach_act(data, &block);
     *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
     /* if there's no error, it isn't done and it didn't EWOULDBLOCK, then
        try again */
     if(*done) {
-      DEBUGF(infof(conn->data, "wssh_statemach_act says DONE\n"));
+      DEBUGF(infof(data, "wssh_statemach_act says DONE"));
     }
   } while(!result && !*done && !block);
 
@@ -907,37 +919,38 @@
 }
 
 static
-CURLcode wscp_perform(struct connectdata *conn,
+CURLcode wscp_perform(struct Curl_easy *data,
                       bool *connected,
                       bool *dophase_done)
 {
-  (void)conn;
+  (void)data;
   (void)connected;
   (void)dophase_done;
   return CURLE_OK;
 }
 
 static
-CURLcode wsftp_perform(struct connectdata *conn,
+CURLcode wsftp_perform(struct Curl_easy *data,
                        bool *connected,
                        bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
+  struct connectdata *conn = data->conn;
 
-  DEBUGF(infof(conn->data, "DO phase starts\n"));
+  DEBUGF(infof(data, "DO phase starts"));
 
   *dophase_done = FALSE; /* not done yet */
 
   /* start the first command in the DO phase */
-  state(conn, SSH_SFTP_QUOTE_INIT);
+  state(data, SSH_SFTP_QUOTE_INIT);
 
   /* run the state-machine */
-  result = wssh_multi_statemach(conn, dophase_done);
+  result = wssh_multi_statemach(data, dophase_done);
 
   *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
 
   return result;
@@ -946,11 +959,11 @@
 /*
  * The DO function is generic for both protocols.
  */
-static CURLcode wssh_do(struct connectdata *conn, bool *done)
+static CURLcode wssh_do(struct Curl_easy *data, bool *done)
 {
   CURLcode result;
   bool connected = 0;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
 
   *done = FALSE; /* default to false */
@@ -965,31 +978,31 @@
   Curl_pgrsSetDownloadSize(data, -1);
 
   if(conn->handler->protocol & CURLPROTO_SCP)
-    result = wscp_perform(conn, &connected,  done);
+    result = wscp_perform(data, &connected,  done);
   else
-    result = wsftp_perform(conn, &connected,  done);
+    result = wsftp_perform(data, &connected,  done);
 
   return result;
 }
 
-static CURLcode wssh_block_statemach(struct connectdata *conn,
+static CURLcode wssh_block_statemach(struct Curl_easy *data,
                                     bool disconnect)
 {
+  struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = &conn->proto.sshc;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
 
   while((sshc->state != SSH_STOP) && !result) {
     bool block;
     timediff_t left = 1000;
     struct curltime now = Curl_now();
 
-    result = wssh_statemach_act(conn, &block);
+    result = wssh_statemach_act(data, &block);
     if(result)
       break;
 
     if(!disconnect) {
-      if(Curl_pgrsUpdate(conn))
+      if(Curl_pgrsUpdate(data))
         return CURLE_ABORTED_BY_CALLBACK;
 
       result = Curl_speedcheck(data, now);
@@ -1024,29 +1037,29 @@
 
 /* generic done function for both SCP and SFTP called from their specific
    done functions */
-static CURLcode wssh_done(struct connectdata *conn, CURLcode status)
+static CURLcode wssh_done(struct Curl_easy *data, CURLcode status)
 {
   CURLcode result = CURLE_OK;
-  struct SSHPROTO *sftp_scp = conn->data->req.protop;
+  struct SSHPROTO *sftp_scp = data->req.p.ssh;
 
   if(!status) {
     /* run the state-machine */
-    result = wssh_block_statemach(conn, FALSE);
+    result = wssh_block_statemach(data, FALSE);
   }
   else
     result = status;
 
   if(sftp_scp)
     Curl_safefree(sftp_scp->path);
-  if(Curl_pgrsDone(conn))
+  if(Curl_pgrsDone(data))
     return CURLE_ABORTED_BY_CALLBACK;
 
-  conn->data->req.keepon = 0; /* clear all bits */
+  data->req.keepon = 0; /* clear all bits */
   return result;
 }
 
 #if 0
-static CURLcode wscp_done(struct connectdata *conn,
+static CURLcode wscp_done(struct Curl_easy *data,
                          CURLcode code, bool premature)
 {
   CURLcode result = CURLE_OK;
@@ -1057,7 +1070,7 @@
   return result;
 }
 
-static CURLcode wscp_doing(struct connectdata *conn,
+static CURLcode wscp_doing(struct Curl_easy *data,
                           bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
@@ -1067,9 +1080,11 @@
   return result;
 }
 
-static CURLcode wscp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode wscp_disconnect(struct Curl_easy *data,
+                                struct connectdata *conn, bool dead_connection)
 {
   CURLcode result = CURLE_OK;
+  (void)data;
   (void)conn;
   (void)dead_connection;
 
@@ -1077,54 +1092,52 @@
 }
 #endif
 
-static CURLcode wsftp_done(struct connectdata *conn,
+static CURLcode wsftp_done(struct Curl_easy *data,
                           CURLcode code, bool premature)
 {
   (void)premature;
-  state(conn, SSH_SFTP_CLOSE);
+  state(data, SSH_SFTP_CLOSE);
 
-  return wssh_done(conn, code);
+  return wssh_done(data, code);
 }
 
-static CURLcode wsftp_doing(struct connectdata *conn,
+static CURLcode wsftp_doing(struct Curl_easy *data,
                            bool *dophase_done)
 {
-  CURLcode result = wssh_multi_statemach(conn, dophase_done);
+  CURLcode result = wssh_multi_statemach(data, dophase_done);
 
   if(*dophase_done) {
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(data, "DO phase is complete"));
   }
   return result;
 }
 
-static CURLcode wsftp_disconnect(struct connectdata *conn, bool dead)
+static CURLcode wsftp_disconnect(struct Curl_easy *data,
+                                 struct connectdata *conn,
+                                 bool dead)
 {
   CURLcode result = CURLE_OK;
   (void)dead;
 
-  DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));
+  DEBUGF(infof(data, "SSH DISCONNECT starts now"));
 
   if(conn->proto.sshc.ssh_session) {
     /* only if there's a session still around to use! */
-    state(conn, SSH_SFTP_SHUTDOWN);
-    result = wssh_block_statemach(conn, TRUE);
+    state(data, SSH_SFTP_SHUTDOWN);
+    result = wssh_block_statemach(data, TRUE);
   }
 
-  DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n"));
+  DEBUGF(infof(data, "SSH DISCONNECT is done"));
   return result;
 }
 
-static int wssh_getsock(struct connectdata *conn,
+static int wssh_getsock(struct Curl_easy *data,
+                        struct connectdata *conn,
                         curl_socket_t *sock)
 {
-  return wssh_perform_getsock(conn, sock);
-}
-
-static int wssh_perform_getsock(const struct connectdata *conn,
-                                curl_socket_t *sock)
-{
   int bitmap = GETSOCK_BLANK;
   int dir = conn->waitfor;
+  (void)data;
   sock[0] = conn->sock[FIRSTSOCKET];
 
   if(dir == KEEP_RECV)
@@ -1135,9 +1148,9 @@
   return bitmap;
 }
 
-size_t Curl_ssh_version(char *buffer, size_t buflen)
+void Curl_ssh_version(char *buffer, size_t buflen)
 {
-  return msnprintf(buffer, buflen, "wolfssh/%s", LIBWOLFSSH_VERSION_STRING);
+  (void)msnprintf(buffer, buflen, "wolfssh/%s", LIBWOLFSSH_VERSION_STRING);
 }
 
 CURLcode Curl_ssh_init(void)
diff --git a/lib/vtls/bearssl.c b/lib/vtls/bearssl.c
index 44e7406..cbbb3b5 100644
--- a/lib/vtls/bearssl.c
+++ b/lib/vtls/bearssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019 - 2020, Michael Forney, <mforney@mforney.org>
+ * Copyright (C) 2019 - 2021, Michael Forney, <mforney@mforney.org>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -294,18 +294,13 @@
   x509_get_pkey
 };
 
-static CURLcode bearssl_connect_step1(struct connectdata *conn, int sockindex)
+static CURLcode bearssl_connect_step1(struct Curl_easy *data,
+                                      struct connectdata *conn, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile);
-#ifndef CURL_DISABLE_PROXY
-  const char *hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-#else
-  const char *hostname = conn->host.name;
-#endif
+  const char *hostname = SSL_HOST_NAME();
   const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
   const bool verifyhost = SSL_CONN_CONFIG(verifyhost);
   CURLcode ret;
@@ -349,12 +344,12 @@
     ret = load_cafile(ssl_cafile, &backend->anchors, &backend->anchors_len);
     if(ret != CURLE_OK) {
       if(verifypeer) {
-        failf(data, "error setting certificate verify locations:\n"
-              "  CAfile: %s\n", ssl_cafile);
+        failf(data, "error setting certificate verify locations."
+              " CAfile: %s", ssl_cafile);
         return ret;
       }
       infof(data, "error setting certificate verify locations,"
-            " continuing anyway:\n");
+            " continuing anyway:");
     }
   }
 
@@ -374,12 +369,13 @@
   if(SSL_SET_OPTION(primary.sessionid)) {
     void *session;
 
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &session, NULL, sockindex)) {
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn, SSL_IS_PROXY() ? TRUE : FALSE,
+                              &session, NULL, sockindex)) {
       br_ssl_engine_set_session_parameters(&backend->ctx.eng, session);
-      infof(data, "BearSSL: re-using session ID\n");
+      infof(data, "BearSSL: re-using session ID");
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   if(conn->bits.tls_enable_alpn) {
@@ -389,19 +385,19 @@
      * protocols array in `struct ssl_backend_data`.
      */
 
-#ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2
+#ifdef USE_HTTP2
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2
 #ifndef CURL_DISABLE_PROXY
       && (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)
 #endif
       ) {
-      backend->protocols[cur++] = NGHTTP2_PROTO_VERSION_ID;
-      infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+      backend->protocols[cur++] = ALPN_H2;
+      infof(data, "ALPN, offering %s", ALPN_H2);
     }
 #endif
 
     backend->protocols[cur++] = ALPN_HTTP_1_1;
-    infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+    infof(data, "ALPN, offering %s", ALPN_HTTP_1_1);
 
     br_ssl_engine_set_protocol_names(&backend->ctx.eng,
                                      backend->protocols, cur);
@@ -429,10 +425,10 @@
   return CURLE_OK;
 }
 
-static CURLcode bearssl_run_until(struct connectdata *conn, int sockindex,
+static CURLcode bearssl_run_until(struct Curl_easy *data,
+                                  struct connectdata *conn, int sockindex,
                                   unsigned target)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   curl_socket_t sockfd = conn->sock[sockindex];
@@ -507,14 +503,15 @@
   }
 }
 
-static CURLcode bearssl_connect_step2(struct connectdata *conn, int sockindex)
+static CURLcode bearssl_connect_step2(struct Curl_easy *data,
+                                      struct connectdata *conn, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   CURLcode ret;
 
-  ret = bearssl_run_until(conn, sockindex, BR_SSL_SENDAPP | BR_SSL_RECVAPP);
+  ret = bearssl_run_until(data, conn, sockindex,
+                          BR_SSL_SENDAPP | BR_SSL_RECVAPP);
   if(ret == CURLE_AGAIN)
     return CURLE_OK;
   if(ret == CURLE_OK) {
@@ -527,9 +524,9 @@
   return ret;
 }
 
-static CURLcode bearssl_connect_step3(struct connectdata *conn, int sockindex)
+static CURLcode bearssl_connect_step3(struct Curl_easy *data,
+                                      struct connectdata *conn, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   CURLcode ret;
@@ -541,22 +538,22 @@
 
     protocol = br_ssl_engine_get_selected_protocol(&backend->ctx.eng);
     if(protocol) {
-      infof(data, "ALPN, server accepted to use %s\n", protocol);
+      infof(data, "ALPN, server accepted to use %s", protocol);
 
-#ifdef USE_NGHTTP2
-      if(!strcmp(protocol, NGHTTP2_PROTO_VERSION_ID))
+#ifdef USE_HTTP2
+      if(!strcmp(protocol, ALPN_H2))
         conn->negnpn = CURL_HTTP_VERSION_2;
       else
 #endif
       if(!strcmp(protocol, ALPN_HTTP_1_1))
         conn->negnpn = CURL_HTTP_VERSION_1_1;
       else
-        infof(data, "ALPN, unrecognized protocol %s\n", protocol);
-      Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+        infof(data, "ALPN, unrecognized protocol %s", protocol);
+      Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                           BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
     }
     else
-      infof(data, "ALPN, server did not agree to a protocol\n");
+      infof(data, "ALPN, server did not agree to a protocol");
   }
 
   if(SSL_SET_OPTION(primary.sessionid)) {
@@ -568,12 +565,16 @@
     if(!session)
       return CURLE_OUT_OF_MEMORY;
     br_ssl_engine_get_session_parameters(&backend->ctx.eng, session);
-    Curl_ssl_sessionid_lock(conn);
-    incache = !(Curl_ssl_getsessionid(conn, &oldsession, NULL, sockindex));
+    Curl_ssl_sessionid_lock(data);
+    incache = !(Curl_ssl_getsessionid(data, conn,
+                                      SSL_IS_PROXY() ? TRUE : FALSE,
+                                      &oldsession, NULL, sockindex));
     if(incache)
-      Curl_ssl_delsessionid(conn, oldsession);
-    ret = Curl_ssl_addsessionid(conn, session, 0, sockindex);
-    Curl_ssl_sessionid_unlock(conn);
+      Curl_ssl_delsessionid(data, oldsession);
+    ret = Curl_ssl_addsessionid(data, conn,
+                                SSL_IS_PROXY() ? TRUE : FALSE,
+                                session, 0, sockindex);
+    Curl_ssl_sessionid_unlock(data);
     if(ret) {
       free(session);
       return CURLE_OUT_OF_MEMORY;
@@ -585,17 +586,17 @@
   return CURLE_OK;
 }
 
-static ssize_t bearssl_send(struct connectdata *conn, int sockindex,
+static ssize_t bearssl_send(struct Curl_easy *data, int sockindex,
                             const void *buf, size_t len, CURLcode *err)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   unsigned char *app;
   size_t applen;
 
   for(;;) {
-    *err = bearssl_run_until(conn, sockindex, BR_SSL_SENDAPP);
+    *err = bearssl_run_until(data, conn, sockindex, BR_SSL_SENDAPP);
     if (*err != CURLE_OK)
       return -1;
     app = br_ssl_engine_sendapp_buf(&backend->ctx.eng, &applen);
@@ -618,15 +619,16 @@
   }
 }
 
-static ssize_t bearssl_recv(struct connectdata *conn, int sockindex,
+static ssize_t bearssl_recv(struct Curl_easy *data, int sockindex,
                             char *buf, size_t len, CURLcode *err)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   unsigned char *app;
   size_t applen;
 
-  *err = bearssl_run_until(conn, sockindex, BR_SSL_RECVAPP);
+  *err = bearssl_run_until(data, conn, sockindex, BR_SSL_RECVAPP);
   if(*err != CURLE_OK)
     return -1;
   app = br_ssl_engine_recvapp_buf(&backend->ctx.eng, &applen);
@@ -640,13 +642,13 @@
   return applen;
 }
 
-static CURLcode bearssl_connect_common(struct connectdata *conn,
+static CURLcode bearssl_connect_common(struct Curl_easy *data,
+                                       struct connectdata *conn,
                                        int sockindex,
                                        bool nonblocking,
                                        bool *done)
 {
   CURLcode ret;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   timediff_t timeout_ms;
@@ -659,7 +661,7 @@
   }
 
   if(ssl_connect_1 == connssl->connecting_state) {
-    ret = bearssl_connect_step1(conn, sockindex);
+    ret = bearssl_connect_step1(data, conn, sockindex);
     if(ret)
       return ret;
   }
@@ -712,7 +714,7 @@
      * before step2 has completed while ensuring that a client using select()
      * or epoll() will always have a valid fdset to wait on.
      */
-    ret = bearssl_connect_step2(conn, sockindex);
+    ret = bearssl_connect_step2(data, conn, sockindex);
     if(ret || (nonblocking &&
                (ssl_connect_2 == connssl->connecting_state ||
                 ssl_connect_2_reading == connssl->connecting_state ||
@@ -721,7 +723,7 @@
   }
 
   if(ssl_connect_3 == connssl->connecting_state) {
-    ret = bearssl_connect_step3(conn, sockindex);
+    ret = bearssl_connect_step3(data, conn, sockindex);
     if(ret)
       return ret;
   }
@@ -741,21 +743,21 @@
   return CURLE_OK;
 }
 
-static size_t Curl_bearssl_version(char *buffer, size_t size)
+static size_t bearssl_version(char *buffer, size_t size)
 {
   return msnprintf(buffer, size, "BearSSL");
 }
 
-static bool Curl_bearssl_data_pending(const struct connectdata *conn,
-                                      int connindex)
+static bool bearssl_data_pending(const struct connectdata *conn,
+                                 int connindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[connindex];
   struct ssl_backend_data *backend = connssl->backend;
   return br_ssl_engine_current_state(&backend->ctx.eng) & BR_SSL_RECVAPP;
 }
 
-static CURLcode Curl_bearssl_random(struct Curl_easy *data UNUSED_PARAM,
-                                    unsigned char *entropy, size_t length)
+static CURLcode bearssl_random(struct Curl_easy *data UNUSED_PARAM,
+                               unsigned char *entropy, size_t length)
 {
   static br_hmac_drbg_context ctx;
   static bool seeded = FALSE;
@@ -774,12 +776,13 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_bearssl_connect(struct connectdata *conn, int sockindex)
+static CURLcode bearssl_connect(struct Curl_easy *data,
+                                struct connectdata *conn, int sockindex)
 {
   CURLcode ret;
   bool done = FALSE;
 
-  ret = bearssl_connect_common(conn, sockindex, FALSE, &done);
+  ret = bearssl_connect_common(data, conn, sockindex, FALSE, &done);
   if(ret)
     return ret;
 
@@ -788,20 +791,22 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_bearssl_connect_nonblocking(struct connectdata *conn,
-                                                 int sockindex, bool *done)
+static CURLcode bearssl_connect_nonblocking(struct Curl_easy *data,
+                                            struct connectdata *conn,
+                                            int sockindex, bool *done)
 {
-  return bearssl_connect_common(conn, sockindex, TRUE, done);
+  return bearssl_connect_common(data, conn, sockindex, TRUE, done);
 }
 
-static void *Curl_bearssl_get_internals(struct ssl_connect_data *connssl,
-                                        CURLINFO info UNUSED_PARAM)
+static void *bearssl_get_internals(struct ssl_connect_data *connssl,
+                                   CURLINFO info UNUSED_PARAM)
 {
   struct ssl_backend_data *backend = connssl->backend;
   return &backend->ctx;
 }
 
-static void Curl_bearssl_close(struct connectdata *conn, int sockindex)
+static void bearssl_close(struct Curl_easy *data,
+                          struct connectdata *conn, int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
@@ -809,35 +814,22 @@
 
   if(backend->active) {
     br_ssl_engine_close(&backend->ctx.eng);
-    (void)bearssl_run_until(conn, sockindex, BR_SSL_CLOSED);
+    (void)bearssl_run_until(data, conn, sockindex, BR_SSL_CLOSED);
   }
   for(i = 0; i < backend->anchors_len; ++i)
     free(backend->anchors[i].dn.data);
   free(backend->anchors);
 }
 
-static void Curl_bearssl_session_free(void *ptr)
+static void bearssl_session_free(void *ptr)
 {
   free(ptr);
 }
 
-static CURLcode Curl_bearssl_md5sum(unsigned char *input,
-                                    size_t inputlen,
-                                    unsigned char *md5sum,
-                                    size_t md5len UNUSED_PARAM)
-{
-  br_md5_context ctx;
-
-  br_md5_init(&ctx);
-  br_md5_update(&ctx, input, inputlen);
-  br_md5_out(&ctx, md5sum);
-  return CURLE_OK;
-}
-
-static CURLcode Curl_bearssl_sha256sum(const unsigned char *input,
-                                       size_t inputlen,
-                                       unsigned char *sha256sum,
-                                       size_t sha256len UNUSED_PARAM)
+static CURLcode bearssl_sha256sum(const unsigned char *input,
+                                  size_t inputlen,
+                                  unsigned char *sha256sum,
+                                  size_t sha256len UNUSED_PARAM)
 {
   br_sha256_context ctx;
 
@@ -848,30 +840,32 @@
 }
 
 const struct Curl_ssl Curl_ssl_bearssl = {
-  { CURLSSLBACKEND_BEARSSL, "bearssl" },
+  { CURLSSLBACKEND_BEARSSL, "bearssl" }, /* info */
   0,
   sizeof(struct ssl_backend_data),
 
-  Curl_none_init,
-  Curl_none_cleanup,
-  Curl_bearssl_version,
-  Curl_none_check_cxn,
-  Curl_none_shutdown,
-  Curl_bearssl_data_pending,
-  Curl_bearssl_random,
-  Curl_none_cert_status_request,
-  Curl_bearssl_connect,
-  Curl_bearssl_connect_nonblocking,
-  Curl_bearssl_get_internals,
-  Curl_bearssl_close,
-  Curl_none_close_all,
-  Curl_bearssl_session_free,
-  Curl_none_set_engine,
-  Curl_none_set_engine_default,
-  Curl_none_engines_list,
-  Curl_none_false_start,
-  Curl_bearssl_md5sum,
-  Curl_bearssl_sha256sum
+  Curl_none_init,                  /* init */
+  Curl_none_cleanup,               /* cleanup */
+  bearssl_version,                 /* version */
+  Curl_none_check_cxn,             /* check_cxn */
+  Curl_none_shutdown,              /* shutdown */
+  bearssl_data_pending,            /* data_pending */
+  bearssl_random,                  /* random */
+  Curl_none_cert_status_request,   /* cert_status_request */
+  bearssl_connect,                 /* connect */
+  bearssl_connect_nonblocking,     /* connect_nonblocking */
+  Curl_ssl_getsock,                /* getsock */
+  bearssl_get_internals,           /* get_internals */
+  bearssl_close,                   /* close_one */
+  Curl_none_close_all,             /* close_all */
+  bearssl_session_free,            /* session_free */
+  Curl_none_set_engine,            /* set_engine */
+  Curl_none_set_engine_default,    /* set_engine_default */
+  Curl_none_engines_list,          /* engines_list */
+  Curl_none_false_start,           /* false_start */
+  bearssl_sha256sum,               /* sha256sum */
+  NULL,                            /* associate_connection */
+  NULL                             /* disassociate_connection */
 };
 
 #endif /* USE_BEARSSL */
diff --git a/lib/vtls/bearssl.h b/lib/vtls/bearssl.h
index 5f94922..d72b7d0 100644
--- a/lib/vtls/bearssl.h
+++ b/lib/vtls/bearssl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019, Michael Forney, <mforney@mforney.org>
+ * Copyright (C) 2019 - 2020, Michael Forney, <mforney@mforney.org>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c
index dc79f48..af8fc92 100644
--- a/lib/vtls/gskit.c
+++ b/lib/vtls/gskit.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -101,8 +101,10 @@
 struct ssl_backend_data {
   gsk_handle handle;
   int iocport;
+#ifndef CURL_DISABLE_PROXY
   int localfd;
   int remotefd;
+#endif
 };
 
 #define BACKEND connssl->backend
@@ -301,10 +303,10 @@
 }
 
 
-static CURLcode set_ciphers(struct connectdata *conn,
-                                        gsk_handle h, unsigned int *protoflags)
+static CURLcode set_ciphers(struct Curl_easy *data,
+                            gsk_handle h, unsigned int *protoflags)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   const char *cipherlist = SSL_CONN_CONFIG(cipher_list);
   const char *clp;
   const struct gskit_cipher *ctp;
@@ -435,7 +437,7 @@
 }
 
 
-static int Curl_gskit_init(void)
+static int gskit_init(void)
 {
   /* No initialisation needed. */
 
@@ -443,7 +445,7 @@
 }
 
 
-static void Curl_gskit_cleanup(void)
+static void gskit_cleanup(void)
 {
   /* Nothing to do. */
 }
@@ -516,6 +518,7 @@
 static int pipe_ssloverssl(struct connectdata *conn, int sockindex,
                            int directions)
 {
+#ifndef CURL_DISABLE_PROXY
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_connect_data *connproxyssl = &conn->proxy_ssl[sockindex];
   fd_set fds_read;
@@ -584,19 +587,23 @@
   }
 
   return ret;  /* OK */
+#else
+  return 0;
+#endif
 }
 
 
-static void close_one(struct ssl_connect_data *connssl,
+static void close_one(struct ssl_connect_data *connssl, struct Curl_easy *data,
                       struct connectdata *conn, int sockindex)
 {
   if(BACKEND->handle) {
-    gskit_status(conn->data, gsk_secure_soc_close(&BACKEND->handle),
+    gskit_status(data, gsk_secure_soc_close(&BACKEND->handle),
               "gsk_secure_soc_close()", 0);
     /* Last chance to drain output. */
     while(pipe_ssloverssl(conn, sockindex, SOS_WRITE) > 0)
       ;
     BACKEND->handle = (gsk_handle) NULL;
+#ifndef CURL_DISABLE_PROXY
     if(BACKEND->localfd >= 0) {
       close(BACKEND->localfd);
       BACKEND->localfd = -1;
@@ -605,17 +612,18 @@
       close(BACKEND->remotefd);
       BACKEND->remotefd = -1;
     }
+#endif
   }
   if(BACKEND->iocport >= 0)
     close_async_handshake(connssl);
 }
 
 
-static ssize_t gskit_send(struct connectdata *conn, int sockindex,
-                           const void *mem, size_t len, CURLcode *curlcode)
+static ssize_t gskit_send(struct Curl_easy *data, int sockindex,
+                          const void *mem, size_t len, CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-  struct Curl_easy *data = conn->data;
   CURLcode cc = CURLE_SEND_ERROR;
   int written;
 
@@ -636,11 +644,11 @@
 }
 
 
-static ssize_t gskit_recv(struct connectdata *conn, int num, char *buf,
-                           size_t buffersize, CURLcode *curlcode)
+static ssize_t gskit_recv(struct Curl_easy *data, int num, char *buf,
+                               size_t buffersize, CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
-  struct Curl_easy *data = conn->data;
   int nread;
   CURLcode cc = CURLE_RECV_ERROR;
 
@@ -664,9 +672,9 @@
 }
 
 static CURLcode
-set_ssl_version_min_max(unsigned int *protoflags, struct connectdata *conn)
+set_ssl_version_min_max(unsigned int *protoflags, struct Curl_easy *data)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   long ssl_version = SSL_CONN_CONFIG(version);
   long ssl_version_max = SSL_CONN_CONFIG(version_max);
   long i = ssl_version;
@@ -696,32 +704,34 @@
   return CURLE_OK;
 }
 
-static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex)
+static CURLcode gskit_connect_step1(struct Curl_easy *data,
+                                    struct connectdata *conn, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   gsk_handle envir;
   CURLcode result;
-  int rc;
   const char * const keyringfile = SSL_CONN_CONFIG(CAfile);
   const char * const keyringpwd = SSL_SET_OPTION(key_passwd);
   const char * const keyringlabel = SSL_SET_OPTION(primary.clientcert);
   const long int ssl_version = SSL_CONN_CONFIG(version);
   const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
-  const char * const hostname = SSL_IS_PROXY()? conn->http_proxy.host.name:
-    conn->host.name;
+  const char * const hostname = SSL_HOST_NAME();
   const char *sni;
   unsigned int protoflags = 0;
   Qso_OverlappedIO_t commarea;
+#ifndef CURL_DISABLE_PROXY
   int sockpair[2];
   static const int sobufsize = CURL_MAX_WRITE_SIZE;
+#endif
 
   /* Create SSL environment, start (preferably asynchronous) handshake. */
 
   BACKEND->handle = (gsk_handle) NULL;
   BACKEND->iocport = -1;
+#ifndef CURL_DISABLE_PROXY
   BACKEND->localfd = -1;
   BACKEND->remotefd = -1;
+#endif
 
   /* GSKit supports two ways of specifying an SSL context: either by
    *  application identifier (that should have been defined at the system
@@ -760,6 +770,7 @@
   if(result)
     return result;
 
+#ifndef CURL_DISABLE_PROXY
   /* Establish a pipelining socket pair for SSL over SSL. */
   if(conn->proxy_ssl[sockindex].use) {
     if(Curl_socketpair(0, 0, 0, sockpair))
@@ -777,6 +788,7 @@
     curlx_nonblock(BACKEND->localfd, TRUE);
     curlx_nonblock(BACKEND->remotefd, TRUE);
   }
+#endif
 
   /* Determine which SSL/TLS version should be enabled. */
   sni = hostname;
@@ -798,7 +810,7 @@
   case CURL_SSLVERSION_TLSv1_1:
   case CURL_SSLVERSION_TLSv1_2:
   case CURL_SSLVERSION_TLSv1_3:
-    result = set_ssl_version_min_max(&protoflags, conn);
+    result = set_ssl_version_min_max(&protoflags, data);
     if(result != CURLE_OK)
       return result;
     break;
@@ -829,10 +841,15 @@
   if(!result)
     result = set_numeric(data, BACKEND->handle, GSK_OS400_READ_TIMEOUT, 1);
   if(!result)
+#ifndef CURL_DISABLE_PROXY
     result = set_numeric(data, BACKEND->handle, GSK_FD, BACKEND->localfd >= 0?
                          BACKEND->localfd: conn->sock[sockindex]);
+#else
+    result = set_numeric(data, BACKEND->handle, GSK_FD,
+                         conn->sock[sockindex]);
+#endif
   if(!result)
-    result = set_ciphers(conn, BACKEND->handle, &protoflags);
+    result = set_ciphers(data, BACKEND->handle, &protoflags);
   if(!protoflags) {
     failf(data, "No SSL protocol/cipher combination enabled");
     result = CURLE_SSL_CIPHER;
@@ -899,10 +916,12 @@
     else if(errno != ENOBUFS)
       result = gskit_status(data, GSK_ERROR_IO,
                             "QsoCreateIOCompletionPort()", 0);
+#ifndef CURL_DISABLE_PROXY
     else if(conn->proxy_ssl[sockindex].use) {
       /* Cannot pipeline while handshaking synchronously. */
       result = CURLE_SSL_CONNECT_ERROR;
     }
+#endif
     else {
       /* No more completion port available. Use synchronous IO. */
       result = gskit_status(data, gsk_secure_soc_init(BACKEND->handle),
@@ -915,15 +934,15 @@
   }
 
   /* Error: rollback. */
-  close_one(connssl, conn, sockindex);
+  close_one(connssl, data, conn, sockindex);
   return result;
 }
 
 
-static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex,
+static CURLcode gskit_connect_step2(struct Curl_easy *data,
+                                    struct connectdata *conn, int sockindex,
                                     bool nonblocking)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   Qso_OverlappedIO_t cstat;
   struct timeval stmv;
@@ -971,9 +990,9 @@
 }
 
 
-static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex)
+static CURLcode gskit_connect_step3(struct Curl_easy *data,
+                                    struct connectdata *conn, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   const gsk_cert_data_elem *cdev;
   int cdec;
@@ -992,7 +1011,7 @@
      CURLE_OK) {
     int i;
 
-    infof(data, "Server certificate:\n");
+    infof(data, "Server certificate:");
     p = cdev;
     for(i = 0; i++ < cdec; p++)
       switch(p->cert_data_id) {
@@ -1001,22 +1020,22 @@
         certend = cert + cdev->cert_data_l;
         break;
       case CERT_DN_PRINTABLE:
-        infof(data, "\t subject: %.*s\n", p->cert_data_l, p->cert_data_p);
+        infof(data, "\t subject: %.*s", p->cert_data_l, p->cert_data_p);
         break;
       case CERT_ISSUER_DN_PRINTABLE:
-        infof(data, "\t issuer: %.*s\n", p->cert_data_l, p->cert_data_p);
+        infof(data, "\t issuer: %.*s", p->cert_data_l, p->cert_data_p);
         break;
       case CERT_VALID_FROM:
-        infof(data, "\t start date: %.*s\n", p->cert_data_l, p->cert_data_p);
+        infof(data, "\t start date: %.*s", p->cert_data_l, p->cert_data_p);
         break;
       case CERT_VALID_TO:
-        infof(data, "\t expire date: %.*s\n", p->cert_data_l, p->cert_data_p);
+        infof(data, "\t expire date: %.*s", p->cert_data_l, p->cert_data_p);
         break;
     }
   }
 
   /* Verify host. */
-  result = Curl_verifyhost(conn, cert, certend);
+  result = Curl_verifyhost(data, conn, cert, certend);
   if(result)
     return result;
 
@@ -1031,15 +1050,14 @@
       return result;
 
     if(cert) {
-      result = Curl_extract_certinfo(conn, 0, cert, certend);
+      result = Curl_extract_certinfo(data, 0, cert, certend);
       if(result)
         return result;
     }
   }
 
   /* Check pinned public key. */
-  ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
-                         data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
+  ptr = SSL_PINNED_PUB_KEY();
   if(!result && ptr) {
     curl_X509certificate x509;
     curl_asn1Element *p;
@@ -1059,10 +1077,10 @@
 }
 
 
-static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex,
+static CURLcode gskit_connect_common(struct Curl_easy *data,
+                                     struct connectdata *conn, int sockindex,
                                      bool nonblocking, bool *done)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   timediff_t timeout_ms;
   CURLcode result = CURLE_OK;
@@ -1082,7 +1100,7 @@
       result = CURLE_OPERATION_TIMEDOUT;
     }
     else
-      result = gskit_connect_step1(conn, sockindex);
+      result = gskit_connect_step1(data, conn, sockindex);
   }
 
   /* Handle handshake pipelining. */
@@ -1101,7 +1119,7 @@
       result = CURLE_OPERATION_TIMEDOUT;
     }
     else
-      result = gskit_connect_step2(conn, sockindex, nonblocking);
+      result = gskit_connect_step2(data, conn, sockindex, nonblocking);
   }
 
   /* Handle handshake pipelining. */
@@ -1111,10 +1129,10 @@
 
   /* Step 3: gather certificate info, verify host. */
   if(!result && connssl->connecting_state == ssl_connect_3)
-    result = gskit_connect_step3(conn, sockindex);
+    result = gskit_connect_step3(data, conn, sockindex);
 
   if(result)
-    close_one(connssl, conn, sockindex);
+    close_one(connssl, data, conn, sockindex);
   else if(connssl->connecting_state == ssl_connect_done) {
     connssl->state = ssl_connection_complete;
     connssl->connecting_state = ssl_connect_1;
@@ -1127,25 +1145,27 @@
 }
 
 
-static CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn,
-                                               int sockindex, bool *done)
+static CURLcode gskit_connect_nonblocking(struct Curl_easy *data,
+                                          struct connectdata *conn,
+                                          int sockindex, bool *done)
 {
   CURLcode result;
 
-  result = gskit_connect_common(conn, sockindex, TRUE, done);
+  result = gskit_connect_common(data, conn, sockindex, TRUE, done);
   if(*done || result)
     conn->ssl[sockindex].connecting_state = ssl_connect_1;
   return result;
 }
 
 
-static CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex)
+static CURLcode gskit_connect(struct Curl_easy *data,
+                              struct connectdata *conn, int sockindex)
 {
   CURLcode result;
   bool done;
 
   conn->ssl[sockindex].connecting_state = ssl_connect_1;
-  result = gskit_connect_common(conn, sockindex, FALSE, &done);
+  result = gskit_connect_common(data, conn, sockindex, FALSE, &done);
   if(result)
     return result;
 
@@ -1155,20 +1175,24 @@
 }
 
 
-static void Curl_gskit_close(struct connectdata *conn, int sockindex)
+static void gskit_close(struct Curl_easy *data, struct connectdata *conn,
+                        int sockindex)
 {
-  close_one(&conn->ssl[sockindex], conn, sockindex);
-  close_one(&conn->proxy_ssl[sockindex], conn, sockindex);
+  close_one(&conn->ssl[sockindex], data, conn, sockindex);
+#ifndef CURL_DISABLE_PROXY
+  close_one(&conn->proxy_ssl[sockindex], data, conn, sockindex);
+#endif
 }
 
 
-static int Curl_gskit_shutdown(struct connectdata *conn, int sockindex)
+static int gskit_shutdown(struct Curl_easy *data,
+                          struct connectdata *conn, int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-  struct Curl_easy *data = conn->data;
   int what;
   int rc;
   char buf[120];
+  int loop = 10; /* don't get stuck */
 
   if(!BACKEND->handle)
     return 0;
@@ -1178,12 +1202,12 @@
     return 0;
 #endif
 
-  close_one(connssl, conn, sockindex);
+  close_one(connssl, data, conn, sockindex);
   rc = 0;
   what = SOCKET_READABLE(conn->sock[sockindex],
                          SSL_SHUTDOWN_TIMEOUT);
 
-  for(;;) {
+  while(loop--) {
     ssize_t nread;
 
     if(what < 0) {
@@ -1219,13 +1243,13 @@
 }
 
 
-static size_t Curl_gskit_version(char *buffer, size_t size)
+static size_t gskit_version(char *buffer, size_t size)
 {
   return msnprintf(buffer, size, "GSKit");
 }
 
 
-static int Curl_gskit_check_cxn(struct connectdata *cxn)
+static int gskit_check_cxn(struct connectdata *cxn)
 {
   struct ssl_connect_data *connssl = &cxn->ssl[FIRSTSOCKET];
   int err;
@@ -1247,8 +1271,8 @@
   return -1;  /* connection status unknown */
 }
 
-static void *Curl_gskit_get_internals(struct ssl_connect_data *connssl,
-                                      CURLINFO info UNUSED_PARAM)
+static void *gskit_get_internals(struct ssl_connect_data *connssl,
+                                 CURLINFO info UNUSED_PARAM)
 {
   (void)info;
   return BACKEND->handle;
@@ -1262,18 +1286,18 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_gskit_init,                /* init */
-  Curl_gskit_cleanup,             /* cleanup */
-  Curl_gskit_version,             /* version */
-  Curl_gskit_check_cxn,           /* check_cxn */
-  Curl_gskit_shutdown,            /* shutdown */
+  gskit_init,                     /* init */
+  gskit_cleanup,                  /* cleanup */
+  gskit_version,                  /* version */
+  gskit_check_cxn,                /* check_cxn */
+  gskit_shutdown,                 /* shutdown */
   Curl_none_data_pending,         /* data_pending */
   Curl_none_random,               /* random */
   Curl_none_cert_status_request,  /* cert_status_request */
-  Curl_gskit_connect,             /* connect */
-  Curl_gskit_connect_nonblocking, /* connect_nonblocking */
-  Curl_gskit_get_internals,       /* get_internals */
-  Curl_gskit_close,               /* close_one */
+  gskit_connect,                  /* connect */
+  gskit_connect_nonblocking,      /* connect_nonblocking */
+  gskit_get_internals,            /* get_internals */
+  gskit_close,                    /* close_one */
   Curl_none_close_all,            /* close_all */
   /* No session handling for GSKit */
   Curl_none_session_free,         /* session_free */
@@ -1281,8 +1305,9 @@
   Curl_none_set_engine_default,   /* set_engine_default */
   Curl_none_engines_list,         /* engines_list */
   Curl_none_false_start,          /* false_start */
-  Curl_none_md5sum,               /* md5sum */
-  NULL                            /* sha256sum */
+  NULL,                           /* sha256sum */
+  NULL,                           /* associate_connection */
+  NULL                            /* disassociate_connection */
 };
 
 #endif /* USE_GSKIT */
diff --git a/lib/vtls/gskit.h b/lib/vtls/gskit.h
index b06b5e1..202df7e 100644
--- a/lib/vtls/gskit.h
+++ b/lib/vtls/gskit.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
index ec3f859..1b145d8 100644
--- a/lib/vtls/gtls.c
+++ b/lib/vtls/gtls.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,14 +35,8 @@
 #include <gnutls/abstract.h>
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
-
-#ifdef USE_GNUTLS_NETTLE
 #include <gnutls/crypto.h>
-#include <nettle/md5.h>
 #include <nettle/sha2.h>
-#else
-#include <gcrypt.h>
-#endif
 
 #include "urldata.h"
 #include "sendf.h"
@@ -86,38 +80,38 @@
 #endif
 };
 
-static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
+static ssize_t gtls_push(void *s, const void *buf, size_t len)
 {
   curl_socket_t sock = *(curl_socket_t *)s;
   ssize_t ret = swrite(sock, buf, len);
   return ret;
 }
 
-static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len)
+static ssize_t gtls_pull(void *s, void *buf, size_t len)
 {
   curl_socket_t sock = *(curl_socket_t *)s;
   ssize_t ret = sread(sock, buf, len);
   return ret;
 }
 
-static ssize_t Curl_gtls_push_ssl(void *s, const void *buf, size_t len)
+static ssize_t gtls_push_ssl(void *s, const void *buf, size_t len)
 {
   return gnutls_record_send((gnutls_session_t) s, buf, len);
 }
 
-static ssize_t Curl_gtls_pull_ssl(void *s, void *buf, size_t len)
+static ssize_t gtls_pull_ssl(void *s, void *buf, size_t len)
 {
   return gnutls_record_recv((gnutls_session_t) s, buf, len);
 }
 
-/* Curl_gtls_init()
+/* gtls_init()
  *
  * Global GnuTLS init, called from Curl_ssl_init(). This calls functions that
  * are not thread-safe and thus this function itself is not thread-safe and
  * must only be called from within curl_global_init() to keep the thread
  * situation under control!
  */
-static int Curl_gtls_init(void)
+static int gtls_init(void)
 {
   int ret = 1;
   if(!gtls_inited) {
@@ -131,7 +125,7 @@
   return ret;
 }
 
-static void Curl_gtls_cleanup(void)
+static void gtls_cleanup(void)
 {
   if(gtls_inited) {
     gnutls_global_deinit();
@@ -153,7 +147,7 @@
 
   msnprintf(str,
             sizeof(str),
-            "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT",
+            "  %s: %s, %02d %s %4d %02d:%02d:%02d GMT",
             text,
             Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
             tm->tm_mday,
@@ -162,7 +156,7 @@
             tm->tm_hour,
             tm->tm_min,
             tm->tm_sec);
-  infof(data, "%s\n", str);
+  infof(data, "%s", str);
 }
 #endif
 
@@ -200,12 +194,12 @@
 
 
 /* this function does a SSL/TLS (re-)handshake */
-static CURLcode handshake(struct connectdata *conn,
+static CURLcode handshake(struct Curl_easy *data,
+                          struct connectdata *conn,
                           int sockindex,
                           bool duringconnect,
                           bool nonblocking)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   gnutls_session_t session = backend->session;
@@ -269,10 +263,10 @@
         strerr = gnutls_alert_get_name(alert);
       }
 
-      if(strerr == NULL)
+      if(!strerr)
         strerr = gnutls_strerror(rc);
 
-      infof(data, "gnutls_handshake() warning: %s\n", strerr);
+      infof(data, "gnutls_handshake() warning: %s", strerr);
       continue;
     }
     else if(rc < 0) {
@@ -283,7 +277,7 @@
         strerr = gnutls_alert_get_name(alert);
       }
 
-      if(strerr == NULL)
+      if(!strerr)
         strerr = gnutls_strerror(rc);
 
       failf(data, "gnutls_handshake() failed: %s", strerr);
@@ -314,15 +308,32 @@
 #define GNUTLS_SRP "+SRP"
 
 static CURLcode
-set_ssl_version_min_max(const char **prioritylist, struct connectdata *conn)
+set_ssl_version_min_max(struct Curl_easy *data,
+                        const char **prioritylist,
+                        const char *tls13support)
 {
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   long ssl_version = SSL_CONN_CONFIG(version);
   long ssl_version_max = SSL_CONN_CONFIG(version_max);
 
-  if(ssl_version_max == CURL_SSLVERSION_MAX_NONE) {
+  if((ssl_version == CURL_SSLVERSION_DEFAULT) ||
+     (ssl_version == CURL_SSLVERSION_TLSv1))
+    ssl_version = CURL_SSLVERSION_TLSv1_0;
+  if(ssl_version_max == CURL_SSLVERSION_MAX_NONE)
     ssl_version_max = CURL_SSLVERSION_MAX_DEFAULT;
+  if(!tls13support) {
+    /* If the running GnuTLS doesn't support TLS 1.3, we must not specify a
+       prioritylist involving that since it will make GnuTLS return an en
+       error back at us */
+    if((ssl_version_max == CURL_SSLVERSION_MAX_TLSv1_3) ||
+       (ssl_version_max == CURL_SSLVERSION_MAX_DEFAULT)) {
+      ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2;
+    }
   }
+  else if(ssl_version_max == CURL_SSLVERSION_MAX_DEFAULT) {
+    ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_3;
+  }
+
   switch(ssl_version | ssl_version_max) {
   case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_0:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
@@ -330,11 +341,11 @@
     return CURLE_OK;
   case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_1:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.0:+VERS-TLS1.1";
+      "+VERS-TLS1.1:+VERS-TLS1.0";
     return CURLE_OK;
   case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_2:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2";
+      "+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0";
     return CURLE_OK;
   case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_1:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
@@ -342,7 +353,7 @@
     return CURLE_OK;
   case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_2:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.1:+VERS-TLS1.2";
+      "+VERS-TLS1.2:+VERS-TLS1.1";
     return CURLE_OK;
   case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_TLSv1_2:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
@@ -352,25 +363,16 @@
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
       "+VERS-TLS1.3";
     return CURLE_OK;
-  case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_DEFAULT:
-    *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2"
-      ":+VERS-TLS1.3";
+  case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_3:
+    *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0";
     return CURLE_OK;
-  case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_DEFAULT:
+  case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_3:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.1:+VERS-TLS1.2"
-      ":+VERS-TLS1.3";
+      "+VERS-TLS1.3:+VERS-TLS1.2:+VERS-TLS1.1";
     return CURLE_OK;
-  case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_DEFAULT:
+  case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_TLSv1_3:
     *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.2"
-      ":+VERS-TLS1.3";
-    return CURLE_OK;
-  case CURL_SSLVERSION_TLSv1_3 | CURL_SSLVERSION_MAX_DEFAULT:
-    *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-      "+VERS-TLS1.2"
-      ":+VERS-TLS1.3";
+      "+VERS-TLS1.3:+VERS-TLS1.2";
     return CURLE_OK;
   }
 
@@ -379,10 +381,10 @@
 }
 
 static CURLcode
-gtls_connect_step1(struct connectdata *conn,
+gtls_connect_step1(struct Curl_easy *data,
+                   struct connectdata *conn,
                    int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   unsigned int init_flags;
@@ -401,6 +403,7 @@
   const char *err = NULL;
   const char * const hostname = SSL_HOST_NAME();
   long * const certverifyresult = &SSL_SET_OPTION_LVALUE(certverifyresult);
+  const char *tls13support;
 
   if(connssl->state == ssl_connection_complete)
     /* to make us tolerant against being called more than once for the
@@ -408,7 +411,7 @@
     return CURLE_OK;
 
   if(!gtls_inited)
-    Curl_gtls_init();
+    gtls_init();
 
   /* Initialize certverifyresult to OK */
   *certverifyresult = 0;
@@ -429,7 +432,7 @@
 
 #ifdef HAVE_GNUTLS_SRP
   if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP) {
-    infof(data, "Using TLS-SRP username: %s\n", SSL_SET_OPTION(username));
+    infof(data, "Using TLS-SRP username: %s", SSL_SET_OPTION(username));
 
     rc = gnutls_srp_allocate_client_credentials(
            &backend->srp_client_cred);
@@ -459,7 +462,7 @@
                                                 SSL_CONN_CONFIG(CAfile),
                                                 GNUTLS_X509_FMT_PEM);
     if(rc < 0) {
-      infof(data, "error reading ca cert file %s (%s)\n",
+      infof(data, "error reading ca cert file %s (%s)",
             SSL_CONN_CONFIG(CAfile), gnutls_strerror(rc));
       if(SSL_CONN_CONFIG(verifypeer)) {
         *certverifyresult = rc;
@@ -467,7 +470,7 @@
       }
     }
     else
-      infof(data, "found %d certificates in %s\n", rc,
+      infof(data, "found %d certificates in %s", rc,
             SSL_CONN_CONFIG(CAfile));
   }
 
@@ -477,7 +480,7 @@
                                                SSL_CONN_CONFIG(CApath),
                                                GNUTLS_X509_FMT_PEM);
     if(rc < 0) {
-      infof(data, "error reading ca cert file %s (%s)\n",
+      infof(data, "error reading ca cert file %s (%s)",
             SSL_CONN_CONFIG(CApath), gnutls_strerror(rc));
       if(SSL_CONN_CONFIG(verifypeer)) {
         *certverifyresult = rc;
@@ -485,7 +488,7 @@
       }
     }
     else
-      infof(data, "found %d certificates in %s\n",
+      infof(data, "found %d certificates in %s",
             rc, SSL_CONN_CONFIG(CApath));
   }
 
@@ -508,7 +511,7 @@
       return CURLE_SSL_CRL_BADFILE;
     }
     else
-      infof(data, "found %d CRL in %s\n",
+      infof(data, "found %d CRL in %s",
             rc, SSL_SET_OPTION(CRLfile));
   }
 
@@ -541,43 +544,41 @@
      (gnutls_server_name_set(session, GNUTLS_NAME_DNS, hostname,
                              strlen(hostname)) < 0))
     infof(data, "WARNING: failed to configure server name indication (SNI) "
-          "TLS extension\n");
+          "TLS extension");
 
   /* Use default priorities */
   rc = gnutls_set_default_priority(session);
   if(rc != GNUTLS_E_SUCCESS)
     return CURLE_SSL_CONNECT_ERROR;
 
+  /* "In GnuTLS 3.6.5, TLS 1.3 is enabled by default" */
+  tls13support = gnutls_check_version("3.6.5");
+
   /* Ensure +SRP comes at the *end* of all relevant strings so that it can be
    * removed if a run-time error indicates that SRP is not supported by this
    * GnuTLS version */
   switch(SSL_CONN_CONFIG(version)) {
-    case CURL_SSLVERSION_SSLv3:
-      prioritylist = GNUTLS_CIPHERS ":-VERS-TLS-ALL:+VERS-SSL3.0";
-      break;
+    case CURL_SSLVERSION_TLSv1_3:
+      if(!tls13support) {
+        failf(data, "This GnuTLS installation does not support TLS 1.3");
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      /* FALLTHROUGH */
     case CURL_SSLVERSION_DEFAULT:
     case CURL_SSLVERSION_TLSv1:
-      prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0"
-#ifdef HAS_TLS13
-                     ":+VERS-TLS1.3"
-#endif
-                     ;
-      break;
     case CURL_SSLVERSION_TLSv1_0:
     case CURL_SSLVERSION_TLSv1_1:
-    case CURL_SSLVERSION_TLSv1_2:
-    case CURL_SSLVERSION_TLSv1_3:
-      {
-        CURLcode result = set_ssl_version_min_max(&prioritylist, conn);
-        if(result != CURLE_OK)
-          return result;
-        break;
-      }
+    case CURL_SSLVERSION_TLSv1_2: {
+      CURLcode result = set_ssl_version_min_max(data, &prioritylist,
+                                                tls13support);
+      if(result)
+        return result;
+      break;
+    }
     case CURL_SSLVERSION_SSLv2:
-      failf(data, "GnuTLS does not support SSLv2");
-      return CURLE_SSL_CONNECT_ERROR;
+    case CURL_SSLVERSION_SSLv3:
     default:
-      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
+      failf(data, "GnuTLS does not support SSLv2 or SSLv3");
       return CURLE_SSL_CONNECT_ERROR;
   }
 
@@ -592,16 +593,16 @@
       return CURLE_OUT_OF_MEMORY;
     strcpy(prioritysrp, prioritylist);
     strcpy(prioritysrp + len, ":" GNUTLS_SRP);
-
     rc = gnutls_priority_set_direct(session, prioritysrp, &err);
     free(prioritysrp);
 
     if((rc == GNUTLS_E_INVALID_REQUEST) && err) {
-      infof(data, "This GnuTLS does not support SRP\n");
+      infof(data, "This GnuTLS does not support SRP");
     }
   }
   else {
 #endif
+    infof(data, "GnuTLS ciphers: %s", prioritylist);
     rc = gnutls_priority_set_direct(session, prioritylist, &err);
 #ifdef HAVE_GNUTLS_SRP
   }
@@ -617,23 +618,23 @@
     int cur = 0;
     gnutls_datum_t protocols[2];
 
-#ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2
+#ifdef USE_HTTP2
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2
 #ifndef CURL_DISABLE_PROXY
        && (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)
 #endif
        ) {
-      protocols[cur].data = (unsigned char *)NGHTTP2_PROTO_VERSION_ID;
-      protocols[cur].size = NGHTTP2_PROTO_VERSION_ID_LEN;
+      protocols[cur].data = (unsigned char *)ALPN_H2;
+      protocols[cur].size = ALPN_H2_LENGTH;
       cur++;
-      infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+      infof(data, "ALPN, offering %.*s", ALPN_H2_LENGTH, ALPN_H2);
     }
 #endif
 
     protocols[cur].data = (unsigned char *)ALPN_HTTP_1_1;
     protocols[cur].size = ALPN_HTTP_1_1_LENGTH;
     cur++;
-    infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+    infof(data, "ALPN, offering %s", ALPN_HTTP_1_1);
 
     gnutls_alpn_set_protocols(session, protocols, cur, 0);
   }
@@ -698,16 +699,16 @@
 #ifndef CURL_DISABLE_PROXY
   if(conn->proxy_ssl[sockindex].use) {
     transport_ptr = conn->proxy_ssl[sockindex].backend->session;
-    gnutls_transport_push = Curl_gtls_push_ssl;
-    gnutls_transport_pull = Curl_gtls_pull_ssl;
+    gnutls_transport_push = gtls_push_ssl;
+    gnutls_transport_pull = gtls_pull_ssl;
   }
   else
 #endif
   {
     /* file descriptor for the socket */
     transport_ptr = &conn->sock[sockindex];
-    gnutls_transport_push = Curl_gtls_push;
-    gnutls_transport_pull = Curl_gtls_pull;
+    gnutls_transport_push = gtls_push;
+    gnutls_transport_pull = gtls_pull;
   }
 
   /* set the connection handle */
@@ -731,15 +732,17 @@
     void *ssl_sessionid;
     size_t ssl_idsize;
 
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, &ssl_idsize, sockindex)) {
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn,
+                              SSL_IS_PROXY() ? TRUE : FALSE,
+                              &ssl_sessionid, &ssl_idsize, sockindex)) {
       /* we got a session id, use it! */
       gnutls_session_set_data(session, ssl_sessionid, ssl_idsize);
 
       /* Informational message */
-      infof(data, "SSL re-using session ID\n");
+      infof(data, "SSL re-using session ID");
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   return CURLE_OK;
@@ -807,7 +810,8 @@
 static Curl_send gtls_send;
 
 static CURLcode
-gtls_connect_step3(struct connectdata *conn,
+gtls_connect_step3(struct Curl_easy *data,
+                   struct connectdata *conn,
                    int sockindex)
 {
   unsigned int cert_list_size;
@@ -820,7 +824,6 @@
   size_t size;
   time_t certclock;
   const char *ptr;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   gnutls_session_t session = backend->session;
@@ -840,7 +843,7 @@
                                      gnutls_cipher_get(session),
                                      gnutls_mac_get(session));
 
-  infof(data, "SSL connection using %s / %s\n",
+  infof(data, "SSL connection using %s / %s",
         gnutls_protocol_get_name(version), ptr);
 
   /* This function will return the peer's raw certificate (chain) as sent by
@@ -853,7 +856,7 @@
   if(!chainp) {
     if(SSL_CONN_CONFIG(verifypeer) ||
        SSL_CONN_CONFIG(verifyhost) ||
-       SSL_SET_OPTION(issuercert)) {
+       SSL_CONN_CONFIG(issuercert)) {
 #ifdef HAVE_GNUTLS_SRP
       if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP
          && SSL_SET_OPTION(username) != NULL
@@ -871,7 +874,7 @@
       }
 #endif
     }
-    infof(data, "\t common name: WARNING couldn't obtain\n");
+    infof(data, " common name: WARNING couldn't obtain");
   }
 
   if(data->set.ssl.certinfo && chainp) {
@@ -885,7 +888,7 @@
       const char *beg = (const char *) chainp[i].data;
       const char *end = beg + chainp[i].size;
 
-      result = Curl_extract_certinfo(conn, i, beg, end);
+      result = Curl_extract_certinfo(data, i, beg, end);
       if(result)
         return result;
     }
@@ -918,13 +921,13 @@
         return CURLE_PEER_FAILED_VERIFICATION;
       }
       else
-        infof(data, "\t server certificate verification FAILED\n");
+        infof(data, "  server certificate verification FAILED");
     }
     else
-      infof(data, "\t server certificate verification OK\n");
+      infof(data, "  server certificate verification OK");
   }
   else
-    infof(data, "\t server certificate verification SKIPPED\n");
+    infof(data, "  server certificate verification SKIPPED");
 
   if(SSL_CONN_CONFIG(verifystatus)) {
     if(gnutls_ocsp_status_request_is_checked(session, 0) == 0) {
@@ -936,7 +939,7 @@
 
       rc = gnutls_ocsp_status_request_get(session, &status_request);
 
-      infof(data, "\t server certificate status verification FAILED\n");
+      infof(data, " server certificate status verification FAILED");
 
       if(rc == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
         failf(data, "No OCSP response received");
@@ -1024,10 +1027,10 @@
       return CURLE_SSL_INVALIDCERTSTATUS;
     }
     else
-      infof(data, "\t server certificate status verification OK\n");
+      infof(data, "  server certificate status verification OK");
   }
   else
-    infof(data, "\t server certificate status verification SKIPPED\n");
+    infof(data, "  server certificate status verification SKIPPED");
 
   /* initialize an X.509 certificate structure. */
   gnutls_x509_crt_init(&x509_cert);
@@ -1037,21 +1040,21 @@
        gnutls_x509_crt_t format */
     gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER);
 
-  if(SSL_SET_OPTION(issuercert)) {
+  if(SSL_CONN_CONFIG(issuercert)) {
     gnutls_x509_crt_init(&x509_issuer);
-    issuerp = load_file(SSL_SET_OPTION(issuercert));
+    issuerp = load_file(SSL_CONN_CONFIG(issuercert));
     gnutls_x509_crt_import(x509_issuer, &issuerp, GNUTLS_X509_FMT_PEM);
     rc = gnutls_x509_crt_check_issuer(x509_cert, x509_issuer);
     gnutls_x509_crt_deinit(x509_issuer);
     unload_file(issuerp);
     if(rc <= 0) {
       failf(data, "server certificate issuer check failed (IssuerCert: %s)",
-            SSL_SET_OPTION(issuercert)?SSL_SET_OPTION(issuercert):"none");
+            SSL_CONN_CONFIG(issuercert)?SSL_CONN_CONFIG(issuercert):"none");
       gnutls_x509_crt_deinit(x509_cert);
       return CURLE_SSL_ISSUER_ERROR;
     }
-    infof(data, "\t server certificate issuer check OK (Issuer Cert: %s)\n",
-          SSL_SET_OPTION(issuercert)?SSL_SET_OPTION(issuercert):"none");
+    infof(data, "  server certificate issuer check OK (Issuer Cert: %s)",
+          SSL_CONN_CONFIG(issuercert)?SSL_CONN_CONFIG(issuercert):"none");
   }
 
   size = sizeof(certname);
@@ -1061,7 +1064,7 @@
                                      certname,
                                      &size);
   if(rc) {
-    infof(data, "error fetching CN from cert:%s\n",
+    infof(data, "error fetching CN from cert:%s",
           gnutls_strerror(rc));
   }
 
@@ -1121,11 +1124,11 @@
       return CURLE_PEER_FAILED_VERIFICATION;
     }
     else
-      infof(data, "\t common name: %s (does not match '%s')\n",
+      infof(data, "  common name: %s (does not match '%s')",
             certname, SSL_HOST_DISPNAME());
   }
   else
-    infof(data, "\t common name: %s (matched)\n", certname);
+    infof(data, "  common name: %s (matched)", certname);
 
   /* Check for time-based validity */
   certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
@@ -1138,7 +1141,7 @@
       return CURLE_SSL_CONNECT_ERROR;
     }
     else
-      infof(data, "\t server certificate expiration date verify FAILED\n");
+      infof(data, "  server certificate expiration date verify FAILED");
   }
   else {
     if(certclock < time(NULL)) {
@@ -1149,10 +1152,10 @@
         return CURLE_PEER_FAILED_VERIFICATION;
       }
       else
-        infof(data, "\t server certificate expiration date FAILED\n");
+        infof(data, "  server certificate expiration date FAILED");
     }
     else
-      infof(data, "\t server certificate expiration date OK\n");
+      infof(data, "  server certificate expiration date OK");
   }
 
   certclock = gnutls_x509_crt_get_activation_time(x509_cert);
@@ -1165,7 +1168,7 @@
       return CURLE_SSL_CONNECT_ERROR;
     }
     else
-      infof(data, "\t server certificate activation date verify FAILED\n");
+      infof(data, "  server certificate activation date verify FAILED");
   }
   else {
     if(certclock > time(NULL)) {
@@ -1176,14 +1179,13 @@
         return CURLE_PEER_FAILED_VERIFICATION;
       }
       else
-        infof(data, "\t server certificate activation date FAILED\n");
+        infof(data, "  server certificate activation date FAILED");
     }
     else
-      infof(data, "\t server certificate activation date OK\n");
+      infof(data, "  server certificate activation date OK");
   }
 
-  ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
-        data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
+  ptr = SSL_PINNED_PUB_KEY();
   if(ptr) {
     result = pkp_pin_peer_pubkey(data, x509_cert, ptr);
     if(result != CURLE_OK) {
@@ -1206,32 +1208,37 @@
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
   /* public key algorithm's parameters */
   algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits);
-  infof(data, "\t certificate public key: %s\n",
+  infof(data, "  certificate public key: %s",
         gnutls_pk_algorithm_get_name(algo));
 
   /* version of the X.509 certificate. */
-  infof(data, "\t certificate version: #%d\n",
+  infof(data, "  certificate version: #%d",
         gnutls_x509_crt_get_version(x509_cert));
 
 
   rc = gnutls_x509_crt_get_dn2(x509_cert, &certfields);
   if(rc)
-    infof(data, "Failed to get certificate name\n");
+    infof(data, "Failed to get certificate name");
   else {
-    infof(data, "\t subject: %s\n", certfields.data);
+    infof(data, "  subject: %s", certfields.data);
 
     certclock = gnutls_x509_crt_get_activation_time(x509_cert);
     showtime(data, "start date", certclock);
 
     certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
     showtime(data, "expire date", certclock);
+
+    gnutls_free(certfields.data);
   }
 
   rc = gnutls_x509_crt_get_issuer_dn2(x509_cert, &certfields);
   if(rc)
-    infof(data, "Failed to get certificate issuer\n");
-  else
-    infof(data, "\t issuer: %s\n", certfields.data);
+    infof(data, "Failed to get certificate issuer");
+  else {
+    infof(data, "  issuer: %s", certfields.data);
+
+    gnutls_free(certfields.data);
+  }
 #endif
 
   gnutls_x509_crt_deinit(x509_cert);
@@ -1239,13 +1246,13 @@
   if(conn->bits.tls_enable_alpn) {
     rc = gnutls_alpn_get_selected_protocol(session, &proto);
     if(rc == 0) {
-      infof(data, "ALPN, server accepted to use %.*s\n", proto.size,
+      infof(data, "ALPN, server accepted to use %.*s", proto.size,
           proto.data);
 
-#ifdef USE_NGHTTP2
-      if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN &&
-         !memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data,
-                 NGHTTP2_PROTO_VERSION_ID_LEN)) {
+#ifdef USE_HTTP2
+      if(proto.size == ALPN_H2_LENGTH &&
+         !memcmp(ALPN_H2, proto.data,
+                 ALPN_H2_LENGTH)) {
         conn->negnpn = CURL_HTTP_VERSION_2;
       }
       else
@@ -1256,9 +1263,9 @@
       }
     }
     else
-      infof(data, "ALPN, server did not agree to a protocol\n");
+      infof(data, "ALPN, server did not agree to a protocol");
 
-    Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+    Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                         BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
   }
 
@@ -1285,19 +1292,22 @@
       /* extract session ID to the allocated buffer */
       gnutls_session_get_data(session, connect_sessionid, &connect_idsize);
 
-      Curl_ssl_sessionid_lock(conn);
-      incache = !(Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL,
-                                        sockindex));
+      Curl_ssl_sessionid_lock(data);
+      incache = !(Curl_ssl_getsessionid(data, conn,
+                                        SSL_IS_PROXY() ? TRUE : FALSE,
+                                        &ssl_sessionid, NULL, sockindex));
       if(incache) {
         /* there was one before in the cache, so instead of risking that the
            previous one was rejected, we just kill that and store the new */
-        Curl_ssl_delsessionid(conn, ssl_sessionid);
+        Curl_ssl_delsessionid(data, ssl_sessionid);
       }
 
       /* store this session id */
-      result = Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize,
+      result = Curl_ssl_addsessionid(data, conn,
+                                     SSL_IS_PROXY() ? TRUE : FALSE,
+                                     connect_sessionid, connect_idsize,
                                      sockindex);
-      Curl_ssl_sessionid_unlock(conn);
+      Curl_ssl_sessionid_unlock(data);
       if(result) {
         free(connect_sessionid);
         result = CURLE_OUT_OF_MEMORY;
@@ -1321,7 +1331,8 @@
    'ssl_connect_2_writing' (waiting to be able to write).
  */
 static CURLcode
-gtls_connect_common(struct connectdata *conn,
+gtls_connect_common(struct Curl_easy *data,
+                    struct connectdata *conn,
                     int sockindex,
                     bool nonblocking,
                     bool *done)
@@ -1331,19 +1342,19 @@
 
   /* Initiate the connection, if not already done */
   if(ssl_connect_1 == connssl->connecting_state) {
-    rc = gtls_connect_step1(conn, sockindex);
+    rc = gtls_connect_step1(data, conn, sockindex);
     if(rc)
       return rc;
   }
 
-  rc = handshake(conn, sockindex, TRUE, nonblocking);
+  rc = handshake(data, conn, sockindex, TRUE, nonblocking);
   if(rc)
     /* handshake() sets its own error message with failf() */
     return rc;
 
   /* Finish connecting once the handshake is done */
   if(ssl_connect_1 == connssl->connecting_state) {
-    rc = gtls_connect_step3(conn, sockindex);
+    rc = gtls_connect_step3(data, conn, sockindex);
     if(rc)
       return rc;
   }
@@ -1353,18 +1364,20 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn,
-                                              int sockindex, bool *done)
+static CURLcode gtls_connect_nonblocking(struct Curl_easy *data,
+                                         struct connectdata *conn,
+                                         int sockindex, bool *done)
 {
-  return gtls_connect_common(conn, sockindex, TRUE, done);
+  return gtls_connect_common(data, conn, sockindex, TRUE, done);
 }
 
-static CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex)
+static CURLcode gtls_connect(struct Curl_easy *data, struct connectdata *conn,
+                             int sockindex)
 {
   CURLcode result;
   bool done = FALSE;
 
-  result = gtls_connect_common(conn, sockindex, FALSE, &done);
+  result = gtls_connect_common(data, conn, sockindex, FALSE, &done);
   if(result)
     return result;
 
@@ -1373,8 +1386,8 @@
   return CURLE_OK;
 }
 
-static bool Curl_gtls_data_pending(const struct connectdata *conn,
-                                   int connindex)
+static bool gtls_data_pending(const struct connectdata *conn,
+                              int connindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[connindex];
   bool res = FALSE;
@@ -1394,12 +1407,13 @@
   return res;
 }
 
-static ssize_t gtls_send(struct connectdata *conn,
+static ssize_t gtls_send(struct Curl_easy *data,
                          int sockindex,
                          const void *mem,
                          size_t len,
                          CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   ssize_t rc = gnutls_record_send(backend->session, mem, len);
@@ -1419,6 +1433,10 @@
 {
   struct ssl_backend_data *backend = connssl->backend;
   if(backend->session) {
+    char buf[32];
+    /* Maybe the server has already sent a close notify alert.
+       Read it to avoid an RST on the TCP connection. */
+    (void)gnutls_record_recv(backend->session, buf, sizeof(buf));
     gnutls_bye(backend->session, GNUTLS_SHUT_WR);
     gnutls_deinit(backend->session);
     backend->session = NULL;
@@ -1435,8 +1453,10 @@
 #endif
 }
 
-static void Curl_gtls_close(struct connectdata *conn, int sockindex)
+static void gtls_close(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex)
 {
+  (void) data;
   close_one(&conn->ssl[sockindex]);
 #ifndef CURL_DISABLE_PROXY
   close_one(&conn->proxy_ssl[sockindex]);
@@ -1447,12 +1467,12 @@
  * This function is called to shut down the SSL layer but keep the
  * socket open (CCC - Clear Command Channel)
  */
-static int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
+static int gtls_shutdown(struct Curl_easy *data, struct connectdata *conn,
+                         int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   int retval = 0;
-  struct Curl_easy *data = conn->data;
 
 #ifndef CURL_DISABLE_FTP
   /* This has only been tested on the proftpd server, and the mod_tls code
@@ -1485,7 +1505,7 @@
           break;
         case GNUTLS_E_AGAIN:
         case GNUTLS_E_INTERRUPTED:
-          infof(data, "GNUTLS_E_AGAIN || GNUTLS_E_INTERRUPTED\n");
+          infof(data, "GNUTLS_E_AGAIN || GNUTLS_E_INTERRUPTED");
           break;
         default:
           retval = -1;
@@ -1521,12 +1541,13 @@
   return retval;
 }
 
-static ssize_t gtls_recv(struct connectdata *conn, /* connection data */
+static ssize_t gtls_recv(struct Curl_easy *data, /* connection data */
                          int num,                  /* socketindex */
                          char *buf,                /* store read data here */
                          size_t buffersize,        /* max amount to read */
                          CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
   struct ssl_backend_data *backend = connssl->backend;
   ssize_t ret;
@@ -1540,7 +1561,7 @@
   if(ret == GNUTLS_E_REHANDSHAKE) {
     /* BLOCKING call, this is bad but a work-around for now. Fixing this "the
        proper way" takes a whole lot of work. */
-    CURLcode result = handshake(conn, num, FALSE, FALSE);
+    CURLcode result = handshake(data, conn, num, FALSE, FALSE);
     if(result)
       /* handshake() writes error message on its own */
       *curlcode = result;
@@ -1550,7 +1571,7 @@
   }
 
   if(ret < 0) {
-    failf(conn->data, "GnuTLS recv error (%d): %s",
+    failf(data, "GnuTLS recv error (%d): %s",
 
           (int)ret, gnutls_strerror((int)ret));
     *curlcode = CURLE_RECV_ERROR;
@@ -1560,98 +1581,45 @@
   return ret;
 }
 
-static void Curl_gtls_session_free(void *ptr)
+static void gtls_session_free(void *ptr)
 {
   free(ptr);
 }
 
-static size_t Curl_gtls_version(char *buffer, size_t size)
+static size_t gtls_version(char *buffer, size_t size)
 {
   return msnprintf(buffer, size, "GnuTLS/%s", gnutls_check_version(NULL));
 }
 
-#ifndef USE_GNUTLS_NETTLE
-static int Curl_gtls_seed(struct Curl_easy *data)
-{
-  /* we have the "SSL is seeded" boolean static to prevent multiple
-     time-consuming seedings in vain */
-  static bool ssl_seeded = FALSE;
-
-  /* Quickly add a bit of entropy */
-  gcry_fast_random_poll();
-
-  if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] ||
-     data->set.str[STRING_SSL_EGDSOCKET]) {
-    ssl_seeded = TRUE;
-  }
-  return 0;
-}
-#endif
-
 /* data might be NULL! */
-static CURLcode Curl_gtls_random(struct Curl_easy *data,
-                                 unsigned char *entropy, size_t length)
+static CURLcode gtls_random(struct Curl_easy *data,
+                            unsigned char *entropy, size_t length)
 {
-#if defined(USE_GNUTLS_NETTLE)
   int rc;
   (void)data;
   rc = gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length);
   return rc?CURLE_FAILED_INIT:CURLE_OK;
-#elif defined(USE_GNUTLS)
-  if(data)
-    Curl_gtls_seed(data); /* Initiate the seed if not already done */
-  gcry_randomize(entropy, length, GCRY_STRONG_RANDOM);
-#endif
-  return CURLE_OK;
 }
 
-static CURLcode Curl_gtls_md5sum(unsigned char *tmp, /* input */
-                                 size_t tmplen,
-                                 unsigned char *md5sum, /* output */
-                                 size_t md5len)
+static CURLcode gtls_sha256sum(const unsigned char *tmp, /* input */
+                               size_t tmplen,
+                               unsigned char *sha256sum, /* output */
+                               size_t sha256len)
 {
-#if defined(USE_GNUTLS_NETTLE)
-  struct md5_ctx MD5pw;
-  md5_init(&MD5pw);
-  md5_update(&MD5pw, (unsigned int)tmplen, tmp);
-  md5_digest(&MD5pw, (unsigned int)md5len, md5sum);
-#elif defined(USE_GNUTLS)
-  gcry_md_hd_t MD5pw;
-  gcry_md_open(&MD5pw, GCRY_MD_MD5, 0);
-  gcry_md_write(MD5pw, tmp, tmplen);
-  memcpy(md5sum, gcry_md_read(MD5pw, 0), md5len);
-  gcry_md_close(MD5pw);
-#endif
-  return CURLE_OK;
-}
-
-static CURLcode Curl_gtls_sha256sum(const unsigned char *tmp, /* input */
-                                size_t tmplen,
-                                unsigned char *sha256sum, /* output */
-                                size_t sha256len)
-{
-#if defined(USE_GNUTLS_NETTLE)
   struct sha256_ctx SHA256pw;
   sha256_init(&SHA256pw);
   sha256_update(&SHA256pw, (unsigned int)tmplen, tmp);
   sha256_digest(&SHA256pw, (unsigned int)sha256len, sha256sum);
-#elif defined(USE_GNUTLS)
-  gcry_md_hd_t SHA256pw;
-  gcry_md_open(&SHA256pw, GCRY_MD_SHA256, 0);
-  gcry_md_write(SHA256pw, tmp, tmplen);
-  memcpy(sha256sum, gcry_md_read(SHA256pw, 0), sha256len);
-  gcry_md_close(SHA256pw);
-#endif
   return CURLE_OK;
 }
 
-static bool Curl_gtls_cert_status_request(void)
+static bool gtls_cert_status_request(void)
 {
   return TRUE;
 }
 
-static void *Curl_gtls_get_internals(struct ssl_connect_data *connssl,
-                                     CURLINFO info UNUSED_PARAM)
+static void *gtls_get_internals(struct ssl_connect_data *connssl,
+                                CURLINFO info UNUSED_PARAM)
 {
   struct ssl_backend_data *backend = connssl->backend;
   (void)info;
@@ -1668,26 +1636,28 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_gtls_init,                /* init */
-  Curl_gtls_cleanup,             /* cleanup */
-  Curl_gtls_version,             /* version */
+  gtls_init,                     /* init */
+  gtls_cleanup,                  /* cleanup */
+  gtls_version,                  /* version */
   Curl_none_check_cxn,           /* check_cxn */
-  Curl_gtls_shutdown,            /* shutdown */
-  Curl_gtls_data_pending,        /* data_pending */
-  Curl_gtls_random,              /* random */
-  Curl_gtls_cert_status_request, /* cert_status_request */
-  Curl_gtls_connect,             /* connect */
-  Curl_gtls_connect_nonblocking, /* connect_nonblocking */
-  Curl_gtls_get_internals,       /* get_internals */
-  Curl_gtls_close,               /* close_one */
+  gtls_shutdown,                 /* shutdown */
+  gtls_data_pending,             /* data_pending */
+  gtls_random,                   /* random */
+  gtls_cert_status_request,      /* cert_status_request */
+  gtls_connect,                  /* connect */
+  gtls_connect_nonblocking,      /* connect_nonblocking */
+  Curl_ssl_getsock,              /* getsock */
+  gtls_get_internals,            /* get_internals */
+  gtls_close,                    /* close_one */
   Curl_none_close_all,           /* close_all */
-  Curl_gtls_session_free,        /* session_free */
+  gtls_session_free,             /* session_free */
   Curl_none_set_engine,          /* set_engine */
   Curl_none_set_engine_default,  /* set_engine_default */
   Curl_none_engines_list,        /* engines_list */
   Curl_none_false_start,         /* false_start */
-  Curl_gtls_md5sum,              /* md5sum */
-  Curl_gtls_sha256sum            /* sha256sum */
+  gtls_sha256sum,                /* sha256sum */
+  NULL,                          /* associate_connection */
+  NULL                           /* disassociate_connection */
 };
 
 #endif /* USE_GNUTLS */
diff --git a/lib/vtls/gtls.h b/lib/vtls/gtls.h
index 780fc10..1a146a3 100644
--- a/lib/vtls/gtls.h
+++ b/lib/vtls/gtls.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/keylog.c b/lib/vtls/keylog.c
index 70d22ec..a45945f 100644
--- a/lib/vtls/keylog.c
+++ b/lib/vtls/keylog.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/keylog.h b/lib/vtls/keylog.h
index c6b99db..63626da 100644
--- a/lib/vtls/keylog.h
+++ b/lib/vtls/keylog.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index 4e5f657..e986bea 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -5,12 +5,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -89,6 +89,10 @@
 #define THREADING_SUPPORT
 #endif
 
+#ifndef MBEDTLS_ERROR_C
+#define mbedtls_strerror(a,b,c) b[0] = 0
+#endif
+
 #if defined(THREADING_SUPPORT)
 static mbedtls_entropy_context ts_entropy;
 
@@ -196,9 +200,9 @@
 }
 
 static CURLcode
-set_ssl_version_min_max(struct connectdata *conn, int sockindex)
+set_ssl_version_min_max(struct Curl_easy *data, struct connectdata *conn,
+                        int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   int mbedtls_ver_min = MBEDTLS_SSL_MINOR_VERSION_1;
@@ -241,33 +245,26 @@
 }
 
 static CURLcode
-mbed_connect_step1(struct connectdata *conn,
+mbed_connect_step1(struct Curl_easy *data, struct connectdata *conn,
                    int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile);
   const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
   const char * const ssl_capath = SSL_CONN_CONFIG(CApath);
   char * const ssl_cert = SSL_SET_OPTION(primary.clientcert);
+  const struct curl_blob *ssl_cert_blob = SSL_SET_OPTION(primary.cert_blob);
   const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile);
-#ifndef CURL_DISABLE_PROXY
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
-#else
-  const char * const hostname = conn->host.name;
-  const long int port = conn->remote_port;
-#endif
+  const char * const hostname = SSL_HOST_NAME();
+  const long int port = SSL_HOST_PORT();
   int ret = -1;
   char errorbuf[128];
-  errorbuf[0] = 0;
 
-  /* mbedTLS only supports SSLv3 and TLSv1 */
-  if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) {
-    failf(data, "mbedTLS does not support SSLv2");
-    return CURLE_SSL_CONNECT_ERROR;
+  if((SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) ||
+     (SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv3)) {
+    failf(data, "Not supported SSL version");
+    return CURLE_NOT_BUILT_IN;
   }
 
 #ifdef THREADING_SUPPORT
@@ -277,10 +274,8 @@
   ret = mbedtls_ctr_drbg_seed(&backend->ctr_drbg, entropy_func_mutex,
                               &ts_entropy, NULL, 0);
   if(ret) {
-#ifdef MBEDTLS_ERROR_C
     mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
-    failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n",
+    failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
           -ret, errorbuf);
   }
 #else
@@ -290,10 +285,8 @@
   ret = mbedtls_ctr_drbg_seed(&backend->ctr_drbg, mbedtls_entropy_func,
                               &backend->entropy, NULL, 0);
   if(ret) {
-#ifdef MBEDTLS_ERROR_C
     mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
-    failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n",
+    failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
           -ret, errorbuf);
   }
 #endif /* THREADING_SUPPORT */
@@ -305,9 +298,7 @@
     ret = mbedtls_x509_crt_parse_file(&backend->cacert, ssl_cafile);
 
     if(ret<0) {
-#ifdef MBEDTLS_ERROR_C
       mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
       failf(data, "Error reading ca cert file %s - mbedTLS: (-0x%04X) %s",
             ssl_cafile, -ret, errorbuf);
 
@@ -320,9 +311,7 @@
     ret = mbedtls_x509_crt_parse_path(&backend->cacert, ssl_capath);
 
     if(ret<0) {
-#ifdef MBEDTLS_ERROR_C
       mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
       failf(data, "Error reading ca cert path %s - mbedTLS: (-0x%04X) %s",
             ssl_capath, -ret, errorbuf);
 
@@ -338,9 +327,7 @@
     ret = mbedtls_x509_crt_parse_file(&backend->clicert, ssl_cert);
 
     if(ret) {
-#ifdef MBEDTLS_ERROR_C
       mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
       failf(data, "Error reading client cert file %s - mbedTLS: (-0x%04X) %s",
             ssl_cert, -ret, errorbuf);
 
@@ -348,25 +335,55 @@
     }
   }
 
+  if(ssl_cert_blob) {
+    const unsigned char *blob_data =
+      (const unsigned char *)ssl_cert_blob->data;
+    ret = mbedtls_x509_crt_parse(&backend->clicert, blob_data,
+                                 ssl_cert_blob->len);
+
+    if(ret) {
+      mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
+      failf(data, "Error reading private key %s - mbedTLS: (-0x%04X) %s",
+            SSL_SET_OPTION(key), -ret, errorbuf);
+      return CURLE_SSL_CERTPROBLEM;
+    }
+  }
+
   /* Load the client private key */
   mbedtls_pk_init(&backend->pk);
 
-  if(SSL_SET_OPTION(key)) {
-    ret = mbedtls_pk_parse_keyfile(&backend->pk, SSL_SET_OPTION(key),
-                                   SSL_SET_OPTION(key_passwd));
+  if(SSL_SET_OPTION(key) || SSL_SET_OPTION(key_blob)) {
+    if(SSL_SET_OPTION(key)) {
+      ret = mbedtls_pk_parse_keyfile(&backend->pk, SSL_SET_OPTION(key),
+                                     SSL_SET_OPTION(key_passwd));
+
+      if(ret) {
+        mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
+        failf(data, "Error reading private key %s - mbedTLS: (-0x%04X) %s",
+              SSL_SET_OPTION(key), -ret, errorbuf);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+    }
+    else {
+      const struct curl_blob *ssl_key_blob = SSL_SET_OPTION(key_blob);
+      const unsigned char *key_data =
+        (const unsigned char *)ssl_key_blob->data;
+      const char *passwd = SSL_SET_OPTION(key_passwd);
+      ret = mbedtls_pk_parse_key(&backend->pk, key_data, ssl_key_blob->len,
+                                 (const unsigned char *)passwd,
+                                 passwd ? strlen(passwd) : 0);
+
+      if(ret) {
+        mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
+        failf(data, "Error parsing private key - mbedTLS: (-0x%04X) %s",
+              -ret, errorbuf);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+    }
+
     if(ret == 0 && !(mbedtls_pk_can_do(&backend->pk, MBEDTLS_PK_RSA) ||
                      mbedtls_pk_can_do(&backend->pk, MBEDTLS_PK_ECKEY)))
       ret = MBEDTLS_ERR_PK_TYPE_MISMATCH;
-
-    if(ret) {
-#ifdef MBEDTLS_ERROR_C
-      mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
-      failf(data, "Error reading private key %s - mbedTLS: (-0x%04X) %s",
-            SSL_SET_OPTION(key), -ret, errorbuf);
-
-      return CURLE_SSL_CERTPROBLEM;
-    }
   }
 
   /* Load the CRL */
@@ -376,9 +393,7 @@
     ret = mbedtls_x509_crl_parse_file(&backend->crl, ssl_crlfile);
 
     if(ret) {
-#ifdef MBEDTLS_ERROR_C
       mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
       failf(data, "Error reading CRL file %s - mbedTLS: (-0x%04X) %s",
             ssl_crlfile, -ret, errorbuf);
 
@@ -386,7 +401,7 @@
     }
   }
 
-  infof(data, "mbedTLS: Connecting to %s:%ld\n", hostname, port);
+  infof(data, "mbedTLS: Connecting to %s:%ld", hostname, port);
 
   mbedtls_ssl_config_init(&backend->config);
 
@@ -413,21 +428,14 @@
   case CURL_SSLVERSION_TLSv1:
     mbedtls_ssl_conf_min_version(&backend->config, MBEDTLS_SSL_MAJOR_VERSION_3,
                                  MBEDTLS_SSL_MINOR_VERSION_1);
-    infof(data, "mbedTLS: Set min SSL version to TLS 1.0\n");
-    break;
-  case CURL_SSLVERSION_SSLv3:
-    mbedtls_ssl_conf_min_version(&backend->config, MBEDTLS_SSL_MAJOR_VERSION_3,
-                                 MBEDTLS_SSL_MINOR_VERSION_0);
-    mbedtls_ssl_conf_max_version(&backend->config, MBEDTLS_SSL_MAJOR_VERSION_3,
-                                 MBEDTLS_SSL_MINOR_VERSION_0);
-    infof(data, "mbedTLS: Set SSL version to SSLv3\n");
+    infof(data, "mbedTLS: Set min SSL version to TLS 1.0");
     break;
   case CURL_SSLVERSION_TLSv1_0:
   case CURL_SSLVERSION_TLSv1_1:
   case CURL_SSLVERSION_TLSv1_2:
   case CURL_SSLVERSION_TLSv1_3:
     {
-      CURLcode result = set_ssl_version_min_max(conn, sockindex);
+      CURLcode result = set_ssl_version_min_max(data, conn, sockindex);
       if(result != CURLE_OK)
         return result;
       break;
@@ -463,24 +471,26 @@
   if(SSL_SET_OPTION(primary.sessionid)) {
     void *old_session = NULL;
 
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &old_session, NULL, sockindex)) {
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn,
+                              SSL_IS_PROXY() ? TRUE : FALSE,
+                              &old_session, NULL, sockindex)) {
       ret = mbedtls_ssl_set_session(&backend->ssl, old_session);
       if(ret) {
-        Curl_ssl_sessionid_unlock(conn);
+        Curl_ssl_sessionid_unlock(data);
         failf(data, "mbedtls_ssl_set_session returned -0x%x", -ret);
         return CURLE_SSL_CONNECT_ERROR;
       }
-      infof(data, "mbedTLS re-using session\n");
+      infof(data, "mbedTLS re-using session");
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   mbedtls_ssl_conf_ca_chain(&backend->config,
                             &backend->cacert,
                             &backend->crl);
 
-  if(SSL_SET_OPTION(key)) {
+  if(SSL_SET_OPTION(key) || SSL_SET_OPTION(key_blob)) {
     mbedtls_ssl_conf_own_cert(&backend->config,
                               &backend->clicert, &backend->pk);
   }
@@ -496,7 +506,7 @@
   if(conn->bits.tls_enable_alpn) {
     const char **p = &backend->protocols[0];
 #ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2)
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2)
       *p++ = NGHTTP2_PROTO_VERSION_ID;
 #endif
     *p++ = ALPN_HTTP_1_1;
@@ -509,7 +519,7 @@
       return CURLE_SSL_CONNECT_ERROR;
     }
     for(p = &backend->protocols[0]; *p; ++p)
-      infof(data, "ALPN, offering %s\n", *p);
+      infof(data, "ALPN, offering %s", *p);
   }
 #endif
 
@@ -541,22 +551,14 @@
 }
 
 static CURLcode
-mbed_connect_step2(struct connectdata *conn,
+mbed_connect_step2(struct Curl_easy *data, struct connectdata *conn,
                    int sockindex)
 {
   int ret;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   const mbedtls_x509_crt *peercert;
-#ifndef CURL_DISABLE_PROXY
-  const char * const pinnedpubkey = SSL_IS_PROXY() ?
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
-#else
-  const char * const pinnedpubkey =
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
-#endif
+  const char * const pinnedpubkey = SSL_PINNED_PUB_KEY();
 
   conn->recv[sockindex] = mbed_recv;
   conn->send[sockindex] = mbed_send;
@@ -573,18 +575,14 @@
   }
   else if(ret) {
     char errorbuf[128];
-    errorbuf[0] = 0;
-#ifdef MBEDTLS_ERROR_C
     mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
     failf(data, "ssl_handshake returned - mbedTLS: (-0x%04X) %s",
           -ret, errorbuf);
     return CURLE_SSL_CONNECT_ERROR;
   }
 
-  infof(data, "mbedTLS: Handshake complete, cipher is %s\n",
-        mbedtls_ssl_get_ciphersuite(&backend->ssl)
-    );
+  infof(data, "mbedTLS: Handshake complete, cipher is %s",
+        mbedtls_ssl_get_ciphersuite(&backend->ssl));
 
   ret = mbedtls_ssl_get_verify_result(&backend->ssl);
 
@@ -621,9 +619,9 @@
       return CURLE_OUT_OF_MEMORY;
 
     if(mbedtls_x509_crt_info(buffer, bufsize, "* ", peercert) > 0)
-      infof(data, "Dumping cert info:\n%s\n", buffer);
+      infof(data, "Dumping cert info: %s", buffer);
     else
-      infof(data, "Unable to dump certificate information.\n");
+      infof(data, "Unable to dump certificate information");
 
     free(buffer);
   }
@@ -684,7 +682,7 @@
     const char *next_protocol = mbedtls_ssl_get_alpn_protocol(&backend->ssl);
 
     if(next_protocol) {
-      infof(data, "ALPN, server accepted to use %s\n", next_protocol);
+      infof(data, "ALPN, server accepted to use %s", next_protocol);
 #ifdef USE_NGHTTP2
       if(!strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID,
                   NGHTTP2_PROTO_VERSION_ID_LEN) &&
@@ -699,27 +697,26 @@
         }
     }
     else {
-      infof(data, "ALPN, server did not agree to a protocol\n");
+      infof(data, "ALPN, server did not agree to a protocol");
     }
-    Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+    Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                         BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
   }
 #endif
 
   connssl->connecting_state = ssl_connect_3;
-  infof(data, "SSL connected\n");
+  infof(data, "SSL connected");
 
   return CURLE_OK;
 }
 
 static CURLcode
-mbed_connect_step3(struct connectdata *conn,
+mbed_connect_step3(struct Curl_easy *data, struct connectdata *conn,
                    int sockindex)
 {
   CURLcode retcode = CURLE_OK;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
-  struct Curl_easy *data = conn->data;
 
   DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
 
@@ -727,6 +724,7 @@
     int ret;
     mbedtls_ssl_session *our_ssl_sessionid;
     void *old_ssl_sessionid = NULL;
+    bool isproxy = SSL_IS_PROXY() ? TRUE : FALSE;
 
     our_ssl_sessionid = malloc(sizeof(mbedtls_ssl_session));
     if(!our_ssl_sessionid)
@@ -744,12 +742,14 @@
     }
 
     /* If there's already a matching session in the cache, delete it */
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, sockindex))
-      Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn, isproxy, &old_ssl_sessionid, NULL,
+                              sockindex))
+      Curl_ssl_delsessionid(data, old_ssl_sessionid);
 
-    retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid, 0, sockindex);
-    Curl_ssl_sessionid_unlock(conn);
+    retcode = Curl_ssl_addsessionid(data, conn, isproxy, our_ssl_sessionid,
+                                    0, sockindex);
+    Curl_ssl_sessionid_unlock(data);
     if(retcode) {
       mbedtls_ssl_session_free(our_ssl_sessionid);
       free(our_ssl_sessionid);
@@ -763,16 +763,16 @@
   return CURLE_OK;
 }
 
-static ssize_t mbed_send(struct connectdata *conn, int sockindex,
+static ssize_t mbed_send(struct Curl_easy *data, int sockindex,
                          const void *mem, size_t len,
                          CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   int ret = -1;
 
-  ret = mbedtls_ssl_write(&backend->ssl,
-                          (unsigned char *)mem, len);
+  ret = mbedtls_ssl_write(&backend->ssl, (unsigned char *)mem, len);
 
   if(ret < 0) {
     *curlcode = (ret == MBEDTLS_ERR_SSL_WANT_WRITE) ?
@@ -783,15 +783,23 @@
   return ret;
 }
 
-static void Curl_mbedtls_close_all(struct Curl_easy *data)
+static void mbedtls_close_all(struct Curl_easy *data)
 {
   (void)data;
 }
 
-static void Curl_mbedtls_close(struct connectdata *conn, int sockindex)
+static void mbedtls_close(struct Curl_easy *data,
+                          struct connectdata *conn, int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
+  char buf[32];
+  (void) data;
+
+  /* Maybe the server has already sent a close notify alert.
+     Read it to avoid an RST on the TCP connection. */
+  (void)mbedtls_ssl_read(&backend->ssl, (unsigned char *)buf, sizeof(buf));
+
   mbedtls_pk_free(&backend->pk);
   mbedtls_x509_crt_free(&backend->clicert);
   mbedtls_x509_crt_free(&backend->cacert);
@@ -804,16 +812,16 @@
 #endif /* THREADING_SUPPORT */
 }
 
-static ssize_t mbed_recv(struct connectdata *conn, int num,
+static ssize_t mbed_recv(struct Curl_easy *data, int num,
                          char *buf, size_t buffersize,
                          CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
   struct ssl_backend_data *backend = connssl->backend;
   int ret = -1;
   ssize_t len = -1;
 
-  memset(buf, 0, buffersize);
   ret = mbedtls_ssl_read(&backend->ssl, (unsigned char *)buf,
                          buffersize);
 
@@ -831,13 +839,13 @@
   return len;
 }
 
-static void Curl_mbedtls_session_free(void *ptr)
+static void mbedtls_session_free(void *ptr)
 {
   mbedtls_ssl_session_free(ptr);
   free(ptr);
 }
 
-static size_t Curl_mbedtls_version(char *buffer, size_t size)
+static size_t mbedtls_version(char *buffer, size_t size)
 {
 #ifdef MBEDTLS_VERSION_C
   /* if mbedtls_version_get_number() is available it is better */
@@ -849,8 +857,8 @@
 #endif
 }
 
-static CURLcode Curl_mbedtls_random(struct Curl_easy *data,
-                                    unsigned char *entropy, size_t length)
+static CURLcode mbedtls_random(struct Curl_easy *data,
+                               unsigned char *entropy, size_t length)
 {
 #if defined(MBEDTLS_CTR_DRBG_C)
   int ret = -1;
@@ -859,26 +867,21 @@
   mbedtls_ctr_drbg_context ctr_drbg;
   mbedtls_entropy_init(&ctr_entropy);
   mbedtls_ctr_drbg_init(&ctr_drbg);
-  errorbuf[0] = 0;
 
   ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func,
                               &ctr_entropy, NULL, 0);
 
   if(ret) {
-#ifdef MBEDTLS_ERROR_C
     mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
-    failf(data, "Failed - mbedTLS: ctr_drbg_seed returned (-0x%04X) %s\n",
+    failf(data, "Failed - mbedTLS: ctr_drbg_seed returned (-0x%04X) %s",
           -ret, errorbuf);
   }
   else {
     ret = mbedtls_ctr_drbg_random(&ctr_drbg, entropy, length);
 
     if(ret) {
-#ifdef MBEDTLS_ERROR_C
       mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
-#endif /* MBEDTLS_ERROR_C */
-      failf(data, "mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n",
+      failf(data, "mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
             -ret, errorbuf);
     }
   }
@@ -899,13 +902,13 @@
 }
 
 static CURLcode
-mbed_connect_common(struct connectdata *conn,
+mbed_connect_common(struct Curl_easy *data,
+                    struct connectdata *conn,
                     int sockindex,
                     bool nonblocking,
                     bool *done)
 {
   CURLcode retcode;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   timediff_t timeout_ms;
@@ -926,7 +929,7 @@
       failf(data, "SSL connection timeout");
       return CURLE_OPERATION_TIMEDOUT;
     }
-    retcode = mbed_connect_step1(conn, sockindex);
+    retcode = mbed_connect_step1(data, conn, sockindex);
     if(retcode)
       return retcode;
   }
@@ -981,7 +984,7 @@
      * ensuring that a client using select() or epoll() will always
      * have a valid fdset to wait on.
      */
-    retcode = mbed_connect_step2(conn, sockindex);
+    retcode = mbed_connect_step2(data, conn, sockindex);
     if(retcode || (nonblocking &&
                    (ssl_connect_2 == connssl->connecting_state ||
                     ssl_connect_2_reading == connssl->connecting_state ||
@@ -991,7 +994,7 @@
   } /* repeat step2 until all transactions are done. */
 
   if(ssl_connect_3 == connssl->connecting_state) {
-    retcode = mbed_connect_step3(conn, sockindex);
+    retcode = mbed_connect_step3(data, conn, sockindex);
     if(retcode)
       return retcode;
   }
@@ -1011,19 +1014,21 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_mbedtls_connect_nonblocking(struct connectdata *conn,
-                                                 int sockindex, bool *done)
+static CURLcode mbedtls_connect_nonblocking(struct Curl_easy *data,
+                                            struct connectdata *conn,
+                                            int sockindex, bool *done)
 {
-  return mbed_connect_common(conn, sockindex, TRUE, done);
+  return mbed_connect_common(data, conn, sockindex, TRUE, done);
 }
 
 
-static CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex)
+static CURLcode mbedtls_connect(struct Curl_easy *data,
+                                struct connectdata *conn, int sockindex)
 {
   CURLcode retcode;
   bool done = FALSE;
 
-  retcode = mbed_connect_common(conn, sockindex, FALSE, &done);
+  retcode = mbed_connect_common(data, conn, sockindex, FALSE, &done);
   if(retcode)
     return retcode;
 
@@ -1036,28 +1041,28 @@
  * return 0 error initializing SSL
  * return 1 SSL initialized successfully
  */
-static int Curl_mbedtls_init(void)
+static int mbedtls_init(void)
 {
   return Curl_mbedtlsthreadlock_thread_setup();
 }
 
-static void Curl_mbedtls_cleanup(void)
+static void mbedtls_cleanup(void)
 {
   (void)Curl_mbedtlsthreadlock_thread_cleanup();
 }
 
-static bool Curl_mbedtls_data_pending(const struct connectdata *conn,
-                                      int sockindex)
+static bool mbedtls_data_pending(const struct connectdata *conn,
+                                 int sockindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   return mbedtls_ssl_get_bytes_avail(&backend->ssl) != 0;
 }
 
-static CURLcode Curl_mbedtls_sha256sum(const unsigned char *input,
-                                    size_t inputlen,
-                                    unsigned char *sha256sum,
-                                    size_t sha256len UNUSED_PARAM)
+static CURLcode mbedtls_sha256sum(const unsigned char *input,
+                                  size_t inputlen,
+                                  unsigned char *sha256sum,
+                                  size_t sha256len UNUSED_PARAM)
 {
   (void)sha256len;
 #if MBEDTLS_VERSION_NUMBER < 0x02070000
@@ -1070,8 +1075,8 @@
   return CURLE_OK;
 }
 
-static void *Curl_mbedtls_get_internals(struct ssl_connect_data *connssl,
-                                        CURLINFO info UNUSED_PARAM)
+static void *mbedtls_get_internals(struct ssl_connect_data *connssl,
+                                   CURLINFO info UNUSED_PARAM)
 {
   struct ssl_backend_data *backend = connssl->backend;
   (void)info;
@@ -1087,26 +1092,28 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_mbedtls_init,                /* init */
-  Curl_mbedtls_cleanup,             /* cleanup */
-  Curl_mbedtls_version,             /* version */
+  mbedtls_init,                     /* init */
+  mbedtls_cleanup,                  /* cleanup */
+  mbedtls_version,                  /* version */
   Curl_none_check_cxn,              /* check_cxn */
   Curl_none_shutdown,               /* shutdown */
-  Curl_mbedtls_data_pending,        /* data_pending */
-  Curl_mbedtls_random,              /* random */
+  mbedtls_data_pending,             /* data_pending */
+  mbedtls_random,                   /* random */
   Curl_none_cert_status_request,    /* cert_status_request */
-  Curl_mbedtls_connect,             /* connect */
-  Curl_mbedtls_connect_nonblocking, /* connect_nonblocking */
-  Curl_mbedtls_get_internals,       /* get_internals */
-  Curl_mbedtls_close,               /* close_one */
-  Curl_mbedtls_close_all,           /* close_all */
-  Curl_mbedtls_session_free,        /* session_free */
+  mbedtls_connect,                  /* connect */
+  mbedtls_connect_nonblocking,      /* connect_nonblocking */
+  Curl_ssl_getsock,                 /* getsock */
+  mbedtls_get_internals,            /* get_internals */
+  mbedtls_close,                    /* close_one */
+  mbedtls_close_all,                /* close_all */
+  mbedtls_session_free,             /* session_free */
   Curl_none_set_engine,             /* set_engine */
   Curl_none_set_engine_default,     /* set_engine_default */
   Curl_none_engines_list,           /* engines_list */
   Curl_none_false_start,            /* false_start */
-  Curl_none_md5sum,                 /* md5sum */
-  Curl_mbedtls_sha256sum            /* sha256sum */
+  mbedtls_sha256sum,                /* sha256sum */
+  NULL,                             /* associate_connection */
+  NULL                              /* disassociate_connection */
 };
 
 #endif /* USE_MBEDTLS */
diff --git a/lib/vtls/mbedtls.h b/lib/vtls/mbedtls.h
index 0cc64b3..1abd331 100644
--- a/lib/vtls/mbedtls.h
+++ b/lib/vtls/mbedtls.h
@@ -7,12 +7,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/mbedtls_threadlock.c b/lib/vtls/mbedtls_threadlock.c
index 4d672f1..473f517 100644
--- a/lib/vtls/mbedtls_threadlock.c
+++ b/lib/vtls/mbedtls_threadlock.c
@@ -10,7 +10,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/mbedtls_threadlock.h b/lib/vtls/mbedtls_threadlock.h
index 96a787d..e40dfc8 100644
--- a/lib/vtls/mbedtls_threadlock.h
+++ b/lib/vtls/mbedtls_threadlock.h
@@ -12,7 +12,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/mesalink.c b/lib/vtls/mesalink.c
index 7346a75..3db9184 100644
--- a/lib/vtls/mesalink.c
+++ b/lib/vtls/mesalink.c
@@ -6,11 +6,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2017 - 2018, Yiming Jing, <jingyiming@baidu.com>
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -89,17 +89,16 @@
  * layer and do all necessary magic.
  */
 static CURLcode
-mesalink_connect_step1(struct connectdata *conn, int sockindex)
+mesalink_connect_step1(struct Curl_easy *data,
+                       struct connectdata *conn, int sockindex)
 {
   char *ciphers;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct in_addr addr4;
 #ifdef ENABLE_IPV6
   struct in6_addr addr6;
 #endif
-  const char *const hostname =
-    SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name;
+  const char * const hostname = SSL_HOST_NAME();
   size_t hostname_len = strlen(hostname);
 
   SSL_METHOD *req_method = NULL;
@@ -168,14 +167,14 @@
       }
       infof(data,
           "error setting certificate verify locations,"
-          " continuing anyway:\n");
+          " continuing anyway:");
     }
     else {
-      infof(data, "successfully set certificate verify locations:\n");
+      infof(data, "successfully set certificate verify locations:");
     }
-    infof(data, " CAfile: %s\n",
+    infof(data, " CAfile: %s",
           SSL_CONN_CONFIG(CAfile) ? SSL_CONN_CONFIG(CAfile): "none");
-    infof(data, " CApath: %s\n",
+    infof(data, " CApath: %s",
           SSL_CONN_CONFIG(CApath) ? SSL_CONN_CONFIG(CApath): "none");
   }
 
@@ -197,7 +196,7 @@
       return CURLE_SSL_CONNECT_ERROR;
     }
     infof(data,
-          "client cert: %s\n",
+          "client cert: %s",
           SSL_CONN_CONFIG(clientcert)?
           SSL_CONN_CONFIG(clientcert): "none");
   }
@@ -210,7 +209,7 @@
       return CURLE_SSL_CIPHER;
     }
 #endif
-    infof(data, "Cipher selection: %s\n", ciphers);
+    infof(data, "Cipher selection: %s", ciphers);
   }
 
   if(BACKEND->handle)
@@ -260,11 +259,13 @@
   if(SSL_SET_OPTION(primary.sessionid)) {
     void *ssl_sessionid = NULL;
 
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) {
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn,
+                              SSL_IS_PROXY() ? TRUE : FALSE,
+                              &ssl_sessionid, NULL, sockindex)) {
       /* we got a session id, use it! */
       if(!SSL_set_session(BACKEND->handle, ssl_sessionid)) {
-        Curl_ssl_sessionid_unlock(conn);
+        Curl_ssl_sessionid_unlock(data);
         failf(
           data,
           "SSL: SSL_set_session failed: %s",
@@ -272,9 +273,9 @@
         return CURLE_SSL_CONNECT_ERROR;
       }
       /* Informational message */
-      infof(data, "SSL re-using session ID\n");
+      infof(data, "SSL re-using session ID");
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 #endif /* MESALINK_HAVE_SESSION */
 
@@ -288,10 +289,10 @@
 }
 
 static CURLcode
-mesalink_connect_step2(struct connectdata *conn, int sockindex)
+mesalink_connect_step2(struct Curl_easy *data,
+                       struct connectdata *conn, int sockindex)
 {
   int ret = -1;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 
   conn->recv[sockindex] = mesalink_recv;
@@ -325,7 +326,7 @@
 
   connssl->connecting_state = ssl_connect_3;
   infof(data,
-        "SSL connection using %s / %s\n",
+        "SSL connection using %s / %s",
         SSL_get_version(BACKEND->handle),
         SSL_get_cipher_name(BACKEND->handle));
 
@@ -345,30 +346,33 @@
     bool incache;
     SSL_SESSION *our_ssl_sessionid;
     void *old_ssl_sessionid = NULL;
+    bool isproxy = SSL_IS_PROXY() ? TRUE : FALSE;
 
     our_ssl_sessionid = SSL_get_session(BACKEND->handle);
 
-    Curl_ssl_sessionid_lock(conn);
+    Curl_ssl_sessionid_lock(data);
     incache =
-      !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, sockindex));
+      !(Curl_ssl_getsessionid(data, conn, isproxy, &old_ssl_sessionid, NULL,
+                              sockindex));
     if(incache) {
       if(old_ssl_sessionid != our_ssl_sessionid) {
-        infof(data, "old SSL session ID is stale, removing\n");
-        Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+        infof(data, "old SSL session ID is stale, removing");
+        Curl_ssl_delsessionid(data, old_ssl_sessionid);
         incache = FALSE;
       }
     }
 
     if(!incache) {
-      result = Curl_ssl_addsessionid(
-        conn, our_ssl_sessionid, 0 /* unknown size */, sockindex);
+      result =
+        Curl_ssl_addsessionid(data, conn, isproxy, our_ssl_sessionid, 0,
+                              sockindex);
       if(result) {
-        Curl_ssl_sessionid_unlock(conn);
+        Curl_ssl_sessionid_unlock(data);
         failf(data, "failed to store ssl session");
         return result;
       }
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 #endif /* MESALINK_HAVE_SESSION */
 
@@ -378,9 +382,10 @@
 }
 
 static ssize_t
-mesalink_send(struct connectdata *conn, int sockindex, const void *mem,
+mesalink_send(struct Curl_easy *data, int sockindex, const void *mem,
               size_t len, CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   char error_buffer[MESALINK_MAX_ERROR_SZ];
   int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
@@ -395,7 +400,7 @@
       *curlcode = CURLE_AGAIN;
       return -1;
     default:
-      failf(conn->data,
+      failf(data,
             "SSL write: %s, errno %d",
             ERR_error_string_n(err, error_buffer, sizeof(error_buffer)),
             SOCKERRNO);
@@ -407,10 +412,12 @@
 }
 
 static void
-Curl_mesalink_close(struct connectdata *conn, int sockindex)
+mesalink_close(struct Curl_easy *data, struct connectdata *conn, int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 
+  (void) data;
+
   if(BACKEND->handle) {
     (void)SSL_shutdown(BACKEND->handle);
     SSL_free(BACKEND->handle);
@@ -423,9 +430,10 @@
 }
 
 static ssize_t
-mesalink_recv(struct connectdata *conn, int num, char *buf, size_t buffersize,
+mesalink_recv(struct Curl_easy *data, int num, char *buf, size_t buffersize,
               CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
   char error_buffer[MESALINK_MAX_ERROR_SZ];
   int buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
@@ -444,7 +452,7 @@
       *curlcode = CURLE_AGAIN;
       return -1;
     default:
-      failf(conn->data,
+      failf(data,
             "SSL read: %s, errno %d",
             ERR_error_string_n(err, error_buffer, sizeof(error_buffer)),
             SOCKERRNO);
@@ -456,13 +464,13 @@
 }
 
 static size_t
-Curl_mesalink_version(char *buffer, size_t size)
+mesalink_version(char *buffer, size_t size)
 {
   return msnprintf(buffer, size, "MesaLink/%s", MESALINK_VERSION_STRING);
 }
 
 static int
-Curl_mesalink_init(void)
+mesalink_init(void)
 {
   return (SSL_library_init() == SSL_SUCCESS);
 }
@@ -472,11 +480,14 @@
  * socket open (CCC - Clear Command Channel)
  */
 static int
-Curl_mesalink_shutdown(struct connectdata *conn, int sockindex)
+mesalink_shutdown(struct Curl_easy *data,
+                  struct connectdata *conn, int sockindex)
 {
   int retval = 0;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 
+  (void) data;
+
   if(BACKEND->handle) {
     SSL_free(BACKEND->handle);
     BACKEND->handle = NULL;
@@ -485,11 +496,10 @@
 }
 
 static CURLcode
-mesalink_connect_common(struct connectdata *conn, int sockindex,
-                        bool nonblocking, bool *done)
+mesalink_connect_common(struct Curl_easy *data, struct connectdata *conn,
+                        int sockindex, bool nonblocking, bool *done)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   timediff_t timeout_ms;
@@ -511,7 +521,7 @@
       return CURLE_OPERATION_TIMEDOUT;
     }
 
-    result = mesalink_connect_step1(conn, sockindex);
+    result = mesalink_connect_step1(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -568,7 +578,7 @@
      * ensuring that a client using select() or epoll() will always
      * have a valid fdset to wait on.
      */
-    result = mesalink_connect_step2(conn, sockindex);
+    result = mesalink_connect_step2(data, conn, sockindex);
 
     if(result ||
        (nonblocking && (ssl_connect_2 == connssl->connecting_state ||
@@ -600,19 +610,20 @@
 }
 
 static CURLcode
-Curl_mesalink_connect_nonblocking(struct connectdata *conn, int sockindex,
-                                  bool *done)
+mesalink_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn,
+                             int sockindex, bool *done)
 {
-  return mesalink_connect_common(conn, sockindex, TRUE, done);
+  return mesalink_connect_common(data, conn, sockindex, TRUE, done);
 }
 
 static CURLcode
-Curl_mesalink_connect(struct connectdata *conn, int sockindex)
+mesalink_connect(struct Curl_easy *data, struct connectdata *conn,
+                 int sockindex)
 {
   CURLcode result;
   bool done = FALSE;
 
-  result = mesalink_connect_common(conn, sockindex, FALSE, &done);
+  result = mesalink_connect_common(data, conn, sockindex, FALSE, &done);
   if(result)
     return result;
 
@@ -622,8 +633,8 @@
 }
 
 static void *
-Curl_mesalink_get_internals(struct ssl_connect_data *connssl,
-                            CURLINFO info UNUSED_PARAM)
+mesalink_get_internals(struct ssl_connect_data *connssl,
+                       CURLINFO info UNUSED_PARAM)
 {
   (void)info;
   return BACKEND->handle;
@@ -636,26 +647,28 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_mesalink_init, /* init */
-  Curl_none_cleanup, /* cleanup */
-  Curl_mesalink_version, /* version */
-  Curl_none_check_cxn, /* check_cxn */
-  Curl_mesalink_shutdown, /* shutdown */
-  Curl_none_data_pending, /* data_pending */
-  Curl_none_random, /* random */
+  mesalink_init,                 /* init */
+  Curl_none_cleanup,             /* cleanup */
+  mesalink_version,              /* version */
+  Curl_none_check_cxn,           /* check_cxn */
+  mesalink_shutdown,             /* shutdown */
+  Curl_none_data_pending,        /* data_pending */
+  Curl_none_random,              /* random */
   Curl_none_cert_status_request, /* cert_status_request */
-  Curl_mesalink_connect, /* connect */
-  Curl_mesalink_connect_nonblocking, /* connect_nonblocking */
-  Curl_mesalink_get_internals, /* get_internals */
-  Curl_mesalink_close, /* close_one */
-  Curl_none_close_all, /* close_all */
-  Curl_none_session_free, /* session_free */
-  Curl_none_set_engine, /* set_engine */
-  Curl_none_set_engine_default, /* set_engine_default */
-  Curl_none_engines_list, /* engines_list */
-  Curl_none_false_start, /* false_start */
-  Curl_none_md5sum, /* md5sum */
-  NULL /* sha256sum */
+  mesalink_connect,              /* connect */
+  mesalink_connect_nonblocking,  /* connect_nonblocking */
+  Curl_ssl_getsock,              /* getsock */
+  mesalink_get_internals,        /* get_internals */
+  mesalink_close,                /* close_one */
+  Curl_none_close_all,           /* close_all */
+  Curl_none_session_free,        /* session_free */
+  Curl_none_set_engine,          /* set_engine */
+  Curl_none_set_engine_default,  /* set_engine_default */
+  Curl_none_engines_list,        /* engines_list */
+  Curl_none_false_start,         /* false_start */
+  NULL,                          /* sha256sum */
+  NULL,                          /* associate_connection */
+  NULL                           /* disassociate_connection */
 };
 
 #endif
diff --git a/lib/vtls/mesalink.h b/lib/vtls/mesalink.h
index 54cb94a..03f520c 100644
--- a/lib/vtls/mesalink.h
+++ b/lib/vtls/mesalink.h
@@ -7,12 +7,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2017-2018, Yiming Jing, <jingyiming@baidu.com>
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2017 - 2018, Yiming Jing, <jingyiming@baidu.com>
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index d098854..cf65789 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -139,9 +139,15 @@
   {"fortezza",                   SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA},
   {"fortezza_rc4_128_sha",       SSL_FORTEZZA_DMS_WITH_RC4_128_SHA},
   {"fortezza_null",              SSL_FORTEZZA_DMS_WITH_NULL_SHA},
+  {"dhe_rsa_3des_sha",           SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA},
+  {"dhe_dss_3des_sha",           SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA},
+  {"dhe_rsa_des_sha",            SSL_DHE_RSA_WITH_DES_CBC_SHA},
+  {"dhe_dss_des_sha",            SSL_DHE_DSS_WITH_DES_CBC_SHA},
   /* TLS 1.0: Exportable 56-bit Cipher Suites. */
   {"rsa_des_56_sha",             TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA},
   {"rsa_rc4_56_sha",             TLS_RSA_EXPORT1024_WITH_RC4_56_SHA},
+  /* Ephemeral DH with RC4 bulk encryption */
+  {"dhe_dss_rc4_128_sha",    TLS_DHE_DSS_WITH_RC4_128_SHA},
   /* AES ciphers. */
   {"dhe_dss_aes_128_cbc_sha",    TLS_DHE_DSS_WITH_AES_128_CBC_SHA},
   {"dhe_dss_aes_256_cbc_sha",    TLS_DHE_DSS_WITH_AES_256_CBC_SHA},
@@ -219,6 +225,25 @@
  {"aes_256_gcm_sha_384",              TLS_AES_256_GCM_SHA384},
  {"chacha20_poly1305_sha_256",        TLS_CHACHA20_POLY1305_SHA256},
 #endif
+#ifdef TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
+  /* AES CBC cipher suites in RFC 5246. Introduced in NSS release 3.20 */
+  {"dhe_dss_aes_128_sha_256",         TLS_DHE_DSS_WITH_AES_128_CBC_SHA256},
+  {"dhe_dss_aes_256_sha_256",         TLS_DHE_DSS_WITH_AES_256_CBC_SHA256},
+#endif
+#ifdef TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
+  /* Camellia cipher suites in RFC 4132/5932.
+     Introduced in NSS release 3.12 */
+  {"dhe_rsa_camellia_128_sha",        TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA},
+  {"dhe_dss_camellia_128_sha",        TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA},
+  {"dhe_rsa_camellia_256_sha",        TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA},
+  {"dhe_dss_camellia_256_sha",        TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA},
+  {"rsa_camellia_128_sha",            TLS_RSA_WITH_CAMELLIA_128_CBC_SHA},
+  {"rsa_camellia_256_sha",            TLS_RSA_WITH_CAMELLIA_256_CBC_SHA},
+#endif
+#ifdef TLS_RSA_WITH_SEED_CBC_SHA
+  /* SEED cipher suite in RFC 4162. Introduced in NSS release 3.12.3 */
+  {"rsa_seed_sha",                    TLS_RSA_WITH_SEED_CBC_SHA},
+#endif
 };
 
 #if defined(WIN32)
@@ -312,7 +337,7 @@
     while((*cipher) && (ISSPACE(*cipher)))
       ++cipher;
 
-    cipher_list = strchr(cipher, ',');
+    cipher_list = strpbrk(cipher, ":, ");
     if(cipher_list) {
       *cipher_list++ = '\0';
     }
@@ -380,7 +405,7 @@
 {
   struct_stat st;
 
-  if(filename == NULL)
+  if(!filename)
     return 0;
 
   if(stat(filename, &st) == 0)
@@ -408,7 +433,7 @@
   n = strchr(str, '/');
   if(!n) {
     infof(data, "warning: certificate file name \"%s\" handled as nickname; "
-          "please use \"./%s\" to force file name\n", str, str);
+          "please use \"./%s\" to force file name", str, str);
     return strdup(str);
   }
 
@@ -443,7 +468,7 @@
 
 /* Call PK11_CreateGenericObject() with the given obj_class and filename.  If
  * the call succeeds, append the object handle to the list of objects so that
- * the object can be destroyed in Curl_nss_close(). */
+ * the object can be destroyed in nss_close(). */
 static CURLcode nss_create_object(struct ssl_connect_data *connssl,
                                   CK_OBJECT_CLASS obj_class,
                                   const char *filename, bool cacert)
@@ -508,7 +533,7 @@
 
 /* Destroy the NSS object whose handle is given by ptr.  This function is
  * a callback of Curl_llist_alloc() used by Curl_llist_destroy() to destroy
- * NSS objects in Curl_nss_close() */
+ * NSS objects in nss_close() */
 static void nss_destroy_object(void *user, void *ptr)
 {
   struct ptr_list_wrap *wrap = (struct ptr_list_wrap *) ptr;
@@ -542,7 +567,6 @@
 
   if(!result && !cacert) {
     /* we have successfully loaded a client certificate */
-    CERTCertificate *cert;
     char *nickname = NULL;
     char *n = strrchr(filename, '/');
     if(n)
@@ -554,7 +578,7 @@
      * <https://bugzilla.redhat.com/733685>. */
     nickname = aprintf("PEM Token #1:%s", n);
     if(nickname) {
-      cert = PK11_FindCertFromNickname(nickname, NULL);
+      CERTCertificate *cert = PK11_FindCertFromNickname(nickname, NULL);
       if(cert)
         CERT_DestroyCertificate(cert);
 
@@ -587,7 +611,7 @@
     return CURLE_SSL_CRL_BADFILE;
   }
 
-  /* store the CRL item so that we can free it in Curl_nss_cleanup() */
+  /* store the CRL item so that we can free it in nss_cleanup() */
   if(insert_wrapped_ptr(&nss_crl_list, crl_der) != CURLE_OK) {
     if(SECSuccess == CERT_UncacheCRL(db, crl_der))
       SECITEM_FreeItem(crl_der, PR_TRUE);
@@ -665,14 +689,13 @@
   return CURLE_SSL_CRL_BADFILE;
 }
 
-static CURLcode nss_load_key(struct connectdata *conn, int sockindex,
-                             char *key_file)
+static CURLcode nss_load_key(struct Curl_easy *data, struct connectdata *conn,
+                             int sockindex, char *key_file)
 {
   PK11SlotInfo *slot, *tmp;
   SECStatus status;
   CURLcode result;
   struct ssl_connect_data *ssl = conn->ssl;
-  struct Curl_easy *data = conn->data;
 
   (void)sockindex; /* unused */
 
@@ -701,15 +724,15 @@
   return (SECSuccess == status) ? CURLE_OK : CURLE_SSL_CERTPROBLEM;
 }
 
-static int display_error(struct connectdata *conn, PRInt32 err,
+static int display_error(struct Curl_easy *data, PRInt32 err,
                          const char *filename)
 {
   switch(err) {
   case SEC_ERROR_BAD_PASSWORD:
-    failf(conn->data, "Unable to load client key: Incorrect password");
+    failf(data, "Unable to load client key: Incorrect password");
     return 1;
   case SEC_ERROR_UNKNOWN_CERT:
-    failf(conn->data, "Unable to load certificate %s", filename);
+    failf(data, "Unable to load certificate %s", filename);
     return 1;
   default:
     break;
@@ -717,17 +740,16 @@
   return 0; /* The caller will print a generic error */
 }
 
-static CURLcode cert_stuff(struct connectdata *conn, int sockindex,
-                           char *cert_file, char *key_file)
+static CURLcode cert_stuff(struct Curl_easy *data, struct connectdata *conn,
+                           int sockindex, char *cert_file, char *key_file)
 {
-  struct Curl_easy *data = conn->data;
   CURLcode result;
 
   if(cert_file) {
     result = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE);
     if(result) {
       const PRErrorCode err = PR_GetError();
-      if(!display_error(conn, err, cert_file)) {
+      if(!display_error(data, err, cert_file)) {
         const char *err_name = nss_error_to_name(err);
         failf(data, "unable to load client cert: %d (%s)", err, err_name);
       }
@@ -738,13 +760,13 @@
 
   if(key_file || (is_file(cert_file))) {
     if(key_file)
-      result = nss_load_key(conn, sockindex, key_file);
+      result = nss_load_key(data, conn, sockindex, key_file);
     else
       /* In case the cert file also has the key */
-      result = nss_load_key(conn, sockindex, cert_file);
+      result = nss_load_key(data, conn, sockindex, cert_file);
     if(result) {
       const PRErrorCode err = PR_GetError();
-      if(!display_error(conn, err, key_file)) {
+      if(!display_error(data, err, key_file)) {
         const char *err_name = nss_error_to_name(err);
         failf(data, "unable to load client key: %d (%s)", err, err_name);
       }
@@ -771,7 +793,8 @@
 static SECStatus nss_auth_cert_hook(void *arg, PRFileDesc *fd, PRBool checksig,
                                     PRBool isServer)
 {
-  struct connectdata *conn = (struct connectdata *)arg;
+  struct Curl_easy *data = (struct Curl_easy *)arg;
+  struct connectdata *conn = data->conn;
 
 #ifdef SSL_ENABLE_OCSP_STAPLING
   if(SSL_CONN_CONFIG(verifystatus)) {
@@ -779,12 +802,12 @@
 
     const SECItemArray *csa = SSL_PeerStapledOCSPResponses(fd);
     if(!csa) {
-      failf(conn->data, "Invalid OCSP response");
+      failf(data, "Invalid OCSP response");
       return SECFailure;
     }
 
     if(csa->len == 0) {
-      failf(conn->data, "No OCSP response received");
+      failf(data, "No OCSP response received");
       return SECFailure;
     }
 
@@ -794,14 +817,14 @@
     );
 
     if(cacheResult != SECSuccess) {
-      failf(conn->data, "Invalid OCSP response");
+      failf(data, "Invalid OCSP response");
       return cacheResult;
     }
   }
 #endif
 
   if(!SSL_CONN_CONFIG(verifypeer)) {
-    infof(conn->data, "skipping SSL peer certificate verification\n");
+    infof(data, "skipping SSL peer certificate verification");
     return SECSuccess;
   }
 
@@ -813,7 +836,8 @@
  */
 static void HandshakeCallback(PRFileDesc *sock, void *arg)
 {
-  struct connectdata *conn = (struct connectdata*) arg;
+  struct Curl_easy *data = (struct Curl_easy *)arg;
+  struct connectdata *conn = data->conn;
   unsigned int buflenmax = 50;
   unsigned char buf[50];
   unsigned int buflen;
@@ -833,21 +857,21 @@
 #endif
     case SSL_NEXT_PROTO_NO_SUPPORT:
     case SSL_NEXT_PROTO_NO_OVERLAP:
-      infof(conn->data, "ALPN/NPN, server did not agree to a protocol\n");
+      infof(data, "ALPN/NPN, server did not agree to a protocol");
       return;
 #ifdef SSL_ENABLE_ALPN
     case SSL_NEXT_PROTO_SELECTED:
-      infof(conn->data, "ALPN, server accepted to use %.*s\n", buflen, buf);
+      infof(data, "ALPN, server accepted to use %.*s", buflen, buf);
       break;
 #endif
     case SSL_NEXT_PROTO_NEGOTIATED:
-      infof(conn->data, "NPN, server accepted to use %.*s\n", buflen, buf);
+      infof(data, "NPN, server accepted to use %.*s", buflen, buf);
       break;
     }
 
 #ifdef USE_NGHTTP2
-    if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN &&
-       !memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)) {
+    if(buflen == ALPN_H2_LENGTH &&
+       !memcmp(ALPN_H2, buf, ALPN_H2_LENGTH)) {
       conn->negnpn = CURL_HTTP_VERSION_2;
     }
     else
@@ -856,7 +880,7 @@
        !memcmp(ALPN_HTTP_1_1, buf, ALPN_HTTP_1_1_LENGTH)) {
       conn->negnpn = CURL_HTTP_VERSION_1_1;
     }
-    Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+    Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                         BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
   }
 }
@@ -865,8 +889,7 @@
 static SECStatus CanFalseStartCallback(PRFileDesc *sock, void *client_data,
                                        PRBool *canFalseStart)
 {
-  struct connectdata *conn = client_data;
-  struct Curl_easy *data = conn->data;
+  struct Curl_easy *data = (struct Curl_easy *)client_data;
 
   SSLChannelInfo channelInfo;
   SSLCipherSuiteInfo cipherInfo;
@@ -914,7 +937,7 @@
 
   *canFalseStart = PR_TRUE;
 
-  infof(data, "Trying TLS False Start\n");
+  infof(data, "Trying TLS False Start");
 
 end:
   return SECSuccess;
@@ -932,24 +955,24 @@
   subject = CERT_NameToAscii(&cert->subject);
   issuer = CERT_NameToAscii(&cert->issuer);
   common_name = CERT_GetCommonName(&cert->subject);
-  infof(data, "\tsubject: %s\n", subject);
+  infof(data, "subject: %s\n", subject);
 
   CERT_GetCertTimes(cert, &notBefore, &notAfter);
   PR_ExplodeTime(notBefore, PR_GMTParameters, &printableTime);
   PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime);
-  infof(data, "\tstart date: %s\n", timeString);
+  infof(data, " start date: %s", timeString);
   PR_ExplodeTime(notAfter, PR_GMTParameters, &printableTime);
   PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime);
-  infof(data, "\texpire date: %s\n", timeString);
-  infof(data, "\tcommon name: %s\n", common_name);
-  infof(data, "\tissuer: %s\n", issuer);
+  infof(data, " expire date: %s", timeString);
+  infof(data, " common name: %s", common_name);
+  infof(data, " issuer: %s", issuer);
 
   PR_Free(subject);
   PR_Free(issuer);
   PR_Free(common_name);
 }
 
-static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock)
+static CURLcode display_conn_info(struct Curl_easy *data, PRFileDesc *sock)
 {
   CURLcode result = CURLE_OK;
   SSLChannelInfo channel;
@@ -958,29 +981,28 @@
   CERTCertificate *cert2;
   CERTCertificate *cert3;
   PRTime now;
-  int i;
 
   if(SSL_GetChannelInfo(sock, &channel, sizeof(channel)) ==
      SECSuccess && channel.length == sizeof(channel) &&
      channel.cipherSuite) {
     if(SSL_GetCipherSuiteInfo(channel.cipherSuite,
                               &suite, sizeof(suite)) == SECSuccess) {
-      infof(conn->data, "SSL connection using %s\n", suite.cipherSuiteName);
+      infof(data, "SSL connection using %s", suite.cipherSuiteName);
     }
   }
 
   cert = SSL_PeerCertificate(sock);
   if(cert) {
-    infof(conn->data, "Server certificate:\n");
+    infof(data, "Server certificate:");
 
-    if(!conn->data->set.ssl.certinfo) {
-      display_cert_info(conn->data, cert);
+    if(!data->set.ssl.certinfo) {
+      display_cert_info(data, cert);
       CERT_DestroyCertificate(cert);
     }
     else {
       /* Count certificates in chain. */
+      int i = 1;
       now = PR_Now();
-      i = 1;
       if(!cert->isRoot) {
         cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA);
         while(cert2) {
@@ -995,10 +1017,10 @@
         }
       }
 
-      result = Curl_ssl_init_certinfo(conn->data, i);
+      result = Curl_ssl_init_certinfo(data, i);
       if(!result) {
         for(i = 0; cert; cert = cert2) {
-          result = Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data,
+          result = Curl_extract_certinfo(data, i++, (char *)cert->derCert.data,
                                          (char *)cert->derCert.data +
                                                  cert->derCert.len);
           if(result)
@@ -1021,8 +1043,8 @@
 
 static SECStatus BadCertHandler(void *arg, PRFileDesc *sock)
 {
-  struct connectdata *conn = (struct connectdata *)arg;
-  struct Curl_easy *data = conn->data;
+  struct Curl_easy *data = (struct Curl_easy *)arg;
+  struct connectdata *conn = data->conn;
   PRErrorCode err = PR_GetError();
   CERTCertificate *cert;
 
@@ -1036,7 +1058,7 @@
   /* print only info about the cert, the error is printed off the callback */
   cert = SSL_PeerCertificate(sock);
   if(cert) {
-    infof(data, "Server certificate:\n");
+    infof(data, "Server certificate:");
     display_cert_info(data, cert);
     CERT_DestroyCertificate(cert);
   }
@@ -1110,7 +1132,7 @@
   /* report the resulting status */
   switch(result) {
   case CURLE_OK:
-    infof(data, "pinned public key verified successfully!\n");
+    infof(data, "pinned public key verified successfully!");
     break;
   case CURLE_SSL_PINNEDPUBKEYNOTMATCH:
     failf(data, "failed to verify pinned public key");
@@ -1174,7 +1196,7 @@
       return SECFailure;
     }
 
-    infof(data, "NSS: client certificate from file\n");
+    infof(data, "NSS: client certificate from file");
     display_cert_info(data, cert);
 
     *pRetCert = cert;
@@ -1212,7 +1234,7 @@
     return SECFailure;
   }
 
-  infof(data, "NSS: using client certificate: %s\n", nickname);
+  infof(data, "NSS: using client certificate: %s", nickname);
   display_cert_info(data, *pRetCert);
   return SECSuccess;
 }
@@ -1333,9 +1355,9 @@
     if(!certpath)
       return CURLE_OUT_OF_MEMORY;
 
-    infof(data, "Initializing NSS with certpath: %s\n", certpath);
+    infof(data, "Initializing NSS with certpath: %s", certpath);
     nss_context = NSS_InitContext(certpath, "", "", "", &initparams,
-            NSS_INIT_READONLY | NSS_INIT_PK11RELOAD);
+                                  NSS_INIT_READONLY | NSS_INIT_PK11RELOAD);
     free(certpath);
 
     if(nss_context != NULL)
@@ -1343,10 +1365,10 @@
 
     err = PR_GetError();
     err_name = nss_error_to_name(err);
-    infof(data, "Unable to initialize NSS database: %d (%s)\n", err, err_name);
+    infof(data, "Unable to initialize NSS database: %d (%s)", err, err_name);
   }
 
-  infof(data, "Initializing NSS with certpath: none\n");
+  infof(data, "Initializing NSS with certpath: none");
   nss_context = NSS_InitContext("", "", "", "", &initparams, NSS_INIT_READONLY
          | NSS_INIT_NOCERTDB   | NSS_INIT_NOMODDB       | NSS_INIT_FORCEOPEN
          | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
@@ -1360,7 +1382,7 @@
 }
 
 /* data might be NULL */
-static CURLcode nss_init(struct Curl_easy *data)
+static CURLcode nss_setup(struct Curl_easy *data)
 {
   char *cert_dir;
   struct_stat st;
@@ -1369,7 +1391,7 @@
   if(initialized)
     return CURLE_OK;
 
-  /* list of all CRL items we need to destroy in Curl_nss_cleanup() */
+  /* list of all CRL items we need to destroy in nss_cleanup() */
   Curl_llist_init(&nss_crl_list, nss_destroy_crl_item);
 
   /* First we check if $SSL_DIR points to a valid dir */
@@ -1423,10 +1445,10 @@
  * @retval 0 error initializing SSL
  * @retval 1 SSL initialized successfully
  */
-static int Curl_nss_init(void)
+static int nss_init(void)
 {
   /* curl_global_init() is not thread-safe so this test is ok */
-  if(nss_initlock == NULL) {
+  if(!nss_initlock) {
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     nss_initlock = PR_NewLock();
     nss_crllock = PR_NewLock();
@@ -1451,14 +1473,14 @@
   }
 
   PR_Lock(nss_initlock);
-  result = nss_init(data);
+  result = nss_setup(data);
   PR_Unlock(nss_initlock);
 
   return result;
 }
 
 /* Global cleanup */
-static void Curl_nss_cleanup(void)
+static void nss_cleanup(void)
 {
   /* This function isn't required to be threadsafe and this is only done
    * as a safety feature.
@@ -1498,7 +1520,7 @@
  *     0 means the connection has been closed
  *    -1 means the connection status is unknown
  */
-static int Curl_nss_check_cxn(struct connectdata *conn)
+static int nss_check_cxn(struct connectdata *conn)
 {
   struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
   struct ssl_backend_data *backend = connssl->backend;
@@ -1517,13 +1539,21 @@
   return -1;  /* connection status unknown */
 }
 
-static void nss_close(struct ssl_connect_data *connssl)
+static void close_one(struct ssl_connect_data *connssl)
 {
   /* before the cleanup, check whether we are using a client certificate */
   struct ssl_backend_data *backend = connssl->backend;
   const bool client_cert = (backend->client_nickname != NULL)
     || (backend->obj_clicert != NULL);
 
+  if(backend->handle) {
+    char buf[32];
+    /* Maybe the server has already sent a close notify alert.
+       Read it to avoid an RST on the TCP connection. */
+    (void)PR_Recv(backend->handle, buf, (int)sizeof(buf), 0,
+                  PR_INTERVAL_NO_WAIT);
+  }
+
   free(backend->client_nickname);
   backend->client_nickname = NULL;
 
@@ -1547,7 +1577,8 @@
 /*
  * This function is called when an SSL connection is closed.
  */
-static void Curl_nss_close(struct connectdata *conn, int sockindex)
+static void nss_close(struct Curl_easy *data, struct connectdata *conn,
+                      int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 #ifndef CURL_DISABLE_PROXY
@@ -1555,6 +1586,7 @@
 #endif
   struct ssl_backend_data *backend = connssl->backend;
 
+  (void)data;
   if(backend->handle
 #ifndef CURL_DISABLE_PROXY
     || connssl_proxy->backend->handle
@@ -1573,9 +1605,9 @@
        a double close leading to crash. */
     connssl_proxy->backend->handle = NULL;
 
-  nss_close(connssl_proxy);
+  close_one(connssl_proxy);
 #endif
-  nss_close(connssl);
+  close_one(connssl);
 }
 
 /* return true if NSS can provide error code (and possibly msg) for the
@@ -1611,10 +1643,10 @@
 static Curl_recv nss_recv;
 static Curl_send nss_send;
 
-static CURLcode nss_load_ca_certificates(struct connectdata *conn,
+static CURLcode nss_load_ca_certificates(struct Curl_easy *data,
+                                         struct connectdata *conn,
                                          int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   const char *cafile = SSL_CONN_CONFIG(CAfile);
   const char *capath = SSL_CONN_CONFIG(CApath);
   bool use_trust_module;
@@ -1626,8 +1658,8 @@
   if(capath && !capath[0])
     capath = NULL;
 
-  infof(data, " CAfile: %s\n", cafile ? cafile : "none");
-  infof(data, " CApath: %s\n", capath ? capath : "none");
+  infof(data, " CAfile: %s", cafile ? cafile : "none");
+  infof(data, " CApath: %s", capath ? capath : "none");
 
   /* load libnssckbi.so if no other trust roots were specified */
   use_trust_module = !cafile && !capath;
@@ -1636,7 +1668,7 @@
   if(use_trust_module && !trust_module) {
     /* libnssckbi.so needed but not yet loaded --> load it! */
     result = nss_load_module(&trust_module, trust_library, "trust");
-    infof(data, "%s %s\n", (result) ? "failed to load" : "loaded",
+    infof(data, "%s %s", (result) ? "failed to load" : "loaded",
           trust_library);
     if(result == CURLE_FAILED_INIT)
       /* If libnssckbi.so is not available (or fails to load), one can still
@@ -1645,7 +1677,7 @@
   }
   else if(!use_trust_module && trust_module) {
     /* libnssckbi.so not needed but already loaded --> unload it! */
-    infof(data, "unloading %s\n", trust_library);
+    infof(data, "unloading %s", trust_library);
     nss_unload_module(&trust_module);
   }
   PR_Unlock(nss_trustload_lock);
@@ -1678,7 +1710,7 @@
         if(CURLE_OK != nss_load_cert(&conn->ssl[sockindex], fullpath, PR_TRUE))
           /* This is purposefully tolerant of errors so non-PEM files can
            * be in the same directory */
-          infof(data, "failed to load '%s' from CURLOPT_CAPATH\n", fullpath);
+          infof(data, "failed to load '%s' from CURLOPT_CAPATH", fullpath);
 
         free(fullpath);
       }
@@ -1686,7 +1718,7 @@
       PR_CloseDir(dir);
     }
     else
-      infof(data, "warning: CURLOPT_CAPATH not a directory (%s)\n", capath);
+      infof(data, "warning: CURLOPT_CAPATH not a directory (%s)", capath);
   }
 
   return CURLE_OK;
@@ -1700,8 +1732,7 @@
     return CURLE_OK;
 
   case CURL_SSLVERSION_SSLv3:
-    *nssver = SSL_LIBRARY_VERSION_3_0;
-    return CURLE_OK;
+    return CURLE_NOT_BUILT_IN;
 
   case CURL_SSLVERSION_TLSv1_0:
     *nssver = SSL_LIBRARY_VERSION_TLS_1_0;
@@ -1781,17 +1812,16 @@
                                  struct Curl_easy *data,
                                  CURLcode curlerr)
 {
-  PRErrorCode err = 0;
   struct ssl_backend_data *backend = connssl->backend;
 
   if(is_nss_error(curlerr)) {
     /* read NSPR error code */
-    err = PR_GetError();
+    PRErrorCode err = PR_GetError();
     if(is_cc_error(err))
       curlerr = CURLE_SSL_CERTPROBLEM;
 
     /* print the error number and error string */
-    infof(data, "NSS error %d (%s)\n", err, nss_error_to_name(err));
+    infof(data, "NSS error %d (%s)", err, nss_error_to_name(err));
 
     /* print a human-readable message describing the error if available */
     nss_print_error_message(data, err);
@@ -1808,7 +1838,7 @@
                                  struct Curl_easy *data,
                                  bool blocking)
 {
-  static PRSocketOptionData sock_opt;
+  PRSocketOptionData sock_opt;
   struct ssl_backend_data *backend = connssl->backend;
   sock_opt.option = PR_SockOpt_Nonblocking;
   sock_opt.value.non_blocking = !blocking;
@@ -1819,14 +1849,14 @@
   return CURLE_OK;
 }
 
-static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
+static CURLcode nss_setup_connect(struct Curl_easy *data,
+                                  struct connectdata *conn, int sockindex)
 {
   PRFileDesc *model = NULL;
   PRFileDesc *nspr_io = NULL;
   PRFileDesc *nspr_io_stub = NULL;
   PRBool ssl_no_cache;
   PRBool ssl_cbc_random_iv;
-  struct Curl_easy *data = conn->data;
   curl_socket_t sockfd = conn->sock[sockindex];
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
@@ -1849,11 +1879,11 @@
 
   backend->data = data;
 
-  /* list of all NSS objects we need to destroy in Curl_nss_close() */
+  /* list of all NSS objects we need to destroy in nss_do_close() */
   Curl_llist_init(&backend->obj_list, nss_destroy_object);
 
   PR_Lock(nss_initlock);
-  result = nss_init(conn->data);
+  result = nss_setup(data);
   if(result) {
     PR_Unlock(nss_initlock);
     goto error;
@@ -1865,7 +1895,7 @@
   PR_Unlock(nss_initlock);
   if(result == CURLE_FAILED_INIT)
     infof(data, "WARNING: failed to load NSS PEM library %s. Using "
-                "OpenSSL PEM certificates will not work.\n", pem_library);
+                "OpenSSL PEM certificates will not work.", pem_library);
   else if(result)
     goto error;
 
@@ -1900,8 +1930,8 @@
     sslver_req_str = nss_sslver_to_name(sslver.max);
     sslver_supp_str = nss_sslver_to_name(sslver_supported.max);
     if(sslver_req_str && sslver_supp_str)
-      infof(data, "Falling back from %s to max supported SSL version (%s)\n",
-                  sslver_req_str, sslver_supp_str);
+      infof(data, "Falling back from %s to max supported SSL version (%s)",
+            sslver_req_str, sslver_supp_str);
     free(sslver_req_str);
     free(sslver_supp_str);
     sslver.max = sslver_supported.max;
@@ -1914,11 +1944,11 @@
   /* unless the user explicitly asks to allow the protocol vulnerability, we
      use the work-around */
   if(SSL_OptionSet(model, SSL_CBC_RANDOM_IV, ssl_cbc_random_iv) != SECSuccess)
-    infof(data, "warning: failed to set SSL_CBC_RANDOM_IV = %d\n",
+    infof(data, "warning: failed to set SSL_CBC_RANDOM_IV = %d",
           ssl_cbc_random_iv);
 #else
   if(ssl_cbc_random_iv)
-    infof(data, "warning: support for SSL_CBC_RANDOM_IV not compiled in\n");
+    infof(data, "warning: support for SSL_CBC_RANDOM_IV not compiled in");
 #endif
 
   if(SSL_CONN_CONFIG(cipher_list)) {
@@ -1929,27 +1959,27 @@
   }
 
   if(!SSL_CONN_CONFIG(verifypeer) && SSL_CONN_CONFIG(verifyhost))
-    infof(data, "warning: ignoring value of ssl.verifyhost\n");
+    infof(data, "warning: ignoring value of ssl.verifyhost");
 
   /* bypass the default SSL_AuthCertificate() hook in case we do not want to
    * verify peer */
-  if(SSL_AuthCertificateHook(model, nss_auth_cert_hook, conn) != SECSuccess)
+  if(SSL_AuthCertificateHook(model, nss_auth_cert_hook, data) != SECSuccess)
     goto error;
 
   /* not checked yet */
   SSL_SET_OPTION_LVALUE(certverifyresult) = 0;
 
-  if(SSL_BadCertHook(model, BadCertHandler, conn) != SECSuccess)
+  if(SSL_BadCertHook(model, BadCertHandler, data) != SECSuccess)
     goto error;
 
-  if(SSL_HandshakeCallback(model, HandshakeCallback, conn) != SECSuccess)
+  if(SSL_HandshakeCallback(model, HandshakeCallback, data) != SECSuccess)
     goto error;
 
   {
-    const CURLcode rv = nss_load_ca_certificates(conn, sockindex);
+    const CURLcode rv = nss_load_ca_certificates(data, conn, sockindex);
     if((rv == CURLE_SSL_CACERT_BADFILE) && !SSL_CONN_CONFIG(verifypeer))
       /* not a fatal error because we are not going to verify the peer */
-      infof(data, "warning: CA certificates failed to load\n");
+      infof(data, "warning: CA certificates failed to load");
     else if(rv) {
       result = rv;
       goto error;
@@ -1962,7 +1992,7 @@
       result = rv;
       goto error;
     }
-    infof(data, "  CRLfile: %s\n", SSL_SET_OPTION(CRLfile));
+    infof(data, "  CRLfile: %s", SSL_SET_OPTION(CRLfile));
   }
 
   if(SSL_SET_OPTION(primary.clientcert)) {
@@ -1972,7 +2002,7 @@
       backend->obj_clicert = NULL;
     }
     else {
-      CURLcode rv = cert_stuff(conn, sockindex,
+      CURLcode rv = cert_stuff(data, conn, sockindex,
                                SSL_SET_OPTION(primary.clientcert),
                                SSL_SET_OPTION(key));
       if(rv) {
@@ -2071,7 +2101,7 @@
       goto error;
 
     if(SSL_SetCanFalseStartCallback(backend->handle, CanFalseStartCallback,
-        conn) != SECSuccess)
+        data) != SECSuccess)
       goto error;
   }
 #endif
@@ -2081,16 +2111,15 @@
     int cur = 0;
     unsigned char protocols[128];
 
-#ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2
+#ifdef USE_HTTP2
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2
 #ifndef CURL_DISABLE_PROXY
       && (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)
 #endif
       ) {
-      protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
-      memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
-          NGHTTP2_PROTO_VERSION_ID_LEN);
-      cur += NGHTTP2_PROTO_VERSION_ID_LEN;
+      protocols[cur++] = ALPN_H2_LENGTH;
+      memcpy(&protocols[cur], ALPN_H2, ALPN_H2_LENGTH);
+      cur += ALPN_H2_LENGTH;
     }
 #endif
     protocols[cur++] = ALPN_HTTP_1_1_LENGTH;
@@ -2125,11 +2154,11 @@
   return nss_fail_connect(connssl, data, result);
 }
 
-static CURLcode nss_do_connect(struct connectdata *conn, int sockindex)
+static CURLcode nss_do_connect(struct Curl_easy *data,
+                               struct connectdata *conn, int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
-  struct Curl_easy *data = conn->data;
   CURLcode result = CURLE_SSL_CONNECT_ERROR;
   PRUint32 timeout;
 
@@ -2154,13 +2183,13 @@
     goto error;
   }
 
-  result = display_conn_info(conn, backend->handle);
+  result = display_conn_info(data, backend->handle);
   if(result)
     goto error;
 
-  if(SSL_SET_OPTION(issuercert)) {
+  if(SSL_CONN_CONFIG(issuercert)) {
     SECStatus ret = SECFailure;
-    char *nickname = dup_nickname(data, SSL_SET_OPTION(issuercert));
+    char *nickname = dup_nickname(data, SSL_CONN_CONFIG(issuercert));
     if(nickname) {
       /* we support only nicknames in case of issuercert for now */
       ret = check_issuer_cert(backend->handle, nickname);
@@ -2168,12 +2197,12 @@
     }
 
     if(SECFailure == ret) {
-      infof(data, "SSL certificate issuer check failed\n");
+      infof(data, "SSL certificate issuer check failed");
       result = CURLE_SSL_ISSUER_ERROR;
       goto error;
     }
     else {
-      infof(data, "SSL certificate issuer check ok\n");
+      infof(data, "SSL certificate issuer check ok");
     }
   }
 
@@ -2188,11 +2217,11 @@
   return nss_fail_connect(connssl, data, result);
 }
 
-static CURLcode nss_connect_common(struct connectdata *conn, int sockindex,
+static CURLcode nss_connect_common(struct Curl_easy *data,
+                                   struct connectdata *conn, int sockindex,
                                    bool *done)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-  struct Curl_easy *data = conn->data;
   const bool blocking = (done == NULL);
   CURLcode result;
 
@@ -2203,7 +2232,7 @@
   }
 
   if(connssl->connecting_state == ssl_connect_1) {
-    result = nss_setup_connect(conn, sockindex);
+    result = nss_setup_connect(data, conn, sockindex);
     if(result)
       /* we do not expect CURLE_AGAIN from nss_setup_connect() */
       return result;
@@ -2216,7 +2245,7 @@
   if(result)
     return result;
 
-  result = nss_do_connect(conn, sockindex);
+  result = nss_do_connect(data, conn, sockindex);
   switch(result) {
   case CURLE_OK:
     break;
@@ -2249,30 +2278,33 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
+static CURLcode nss_connect(struct Curl_easy *data, struct connectdata *conn,
+                            int sockindex)
 {
-  return nss_connect_common(conn, sockindex, /* blocking */ NULL);
+  return nss_connect_common(data, conn, sockindex, /* blocking */ NULL);
 }
 
-static CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
-                                             int sockindex, bool *done)
+static CURLcode nss_connect_nonblocking(struct Curl_easy *data,
+                                        struct connectdata *conn,
+                                        int sockindex, bool *done)
 {
-  return nss_connect_common(conn, sockindex, done);
+  return nss_connect_common(data, conn, sockindex, done);
 }
 
-static ssize_t nss_send(struct connectdata *conn,  /* connection data */
+static ssize_t nss_send(struct Curl_easy *data,    /* transfer */
                         int sockindex,             /* socketindex */
                         const void *mem,           /* send this data */
                         size_t len,                /* amount to write */
                         CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   ssize_t rc;
 
   /* The SelectClientCert() hook uses this for infof() and failf() but the
      handle stored in nss_setup_connect() could have already been freed. */
-  backend->data = conn->data;
+  backend->data = data;
 
   rc = PR_Send(backend->handle, mem, (int)len, 0, PR_INTERVAL_NO_WAIT);
   if(rc < 0) {
@@ -2282,10 +2314,10 @@
     else {
       /* print the error number and error string */
       const char *err_name = nss_error_to_name(err);
-      infof(conn->data, "SSL write: error %d (%s)\n", err, err_name);
+      infof(data, "SSL write: error %d (%s)", err, err_name);
 
       /* print a human-readable message describing the error if available */
-      nss_print_error_message(conn->data, err);
+      nss_print_error_message(data, err);
 
       *curlcode = (is_cc_error(err))
         ? CURLE_SSL_CERTPROBLEM
@@ -2298,19 +2330,20 @@
   return rc; /* number of bytes */
 }
 
-static ssize_t nss_recv(struct connectdata *conn,  /* connection data */
+static ssize_t nss_recv(struct Curl_easy *data,    /* transfer */
                         int sockindex,             /* socketindex */
-                        char *buf,                 /* store read data here */
-                        size_t buffersize,         /* max amount to read */
+                        char *buf,             /* store read data here */
+                        size_t buffersize,     /* max amount to read */
                         CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   ssize_t nread;
 
   /* The SelectClientCert() hook uses this for infof() and failf() but the
      handle stored in nss_setup_connect() could have already been freed. */
-  backend->data = conn->data;
+  backend->data = data;
 
   nread = PR_Recv(backend->handle, buf, (int)buffersize, 0,
                   PR_INTERVAL_NO_WAIT);
@@ -2323,10 +2356,10 @@
     else {
       /* print the error number and error string */
       const char *err_name = nss_error_to_name(err);
-      infof(conn->data, "SSL read: errno %d (%s)\n", err, err_name);
+      infof(data, "SSL read: errno %d (%s)", err, err_name);
 
       /* print a human-readable message describing the error if available */
-      nss_print_error_message(conn->data, err);
+      nss_print_error_message(data, err);
 
       *curlcode = (is_cc_error(err))
         ? CURLE_SSL_CERTPROBLEM
@@ -2339,9 +2372,9 @@
   return nread;
 }
 
-static size_t Curl_nss_version(char *buffer, size_t size)
+static size_t nss_version(char *buffer, size_t size)
 {
-  return msnprintf(buffer, size, "NSS/%s", NSS_VERSION);
+  return msnprintf(buffer, size, "NSS/%s", NSS_GetVersion());
 }
 
 /* data might be NULL */
@@ -2352,9 +2385,9 @@
 }
 
 /* data might be NULL */
-static CURLcode Curl_nss_random(struct Curl_easy *data,
-                                unsigned char *entropy,
-                                size_t length)
+static CURLcode nss_random(struct Curl_easy *data,
+                           unsigned char *entropy,
+                           size_t length)
 {
   Curl_nss_seed(data);  /* Initiate the seed if not already done */
 
@@ -2365,28 +2398,10 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_nss_md5sum(unsigned char *tmp, /* input */
-                                size_t tmplen,
-                                unsigned char *md5sum, /* output */
-                                size_t md5len)
-{
-  PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
-  unsigned int MD5out;
-
-  if(!MD5pw)
-    return CURLE_NOT_BUILT_IN;
-
-  PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen));
-  PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len));
-  PK11_DestroyContext(MD5pw, PR_TRUE);
-
-  return CURLE_OK;
-}
-
-static CURLcode Curl_nss_sha256sum(const unsigned char *tmp, /* input */
-                               size_t tmplen,
-                               unsigned char *sha256sum, /* output */
-                               size_t sha256len)
+static CURLcode nss_sha256sum(const unsigned char *tmp, /* input */
+                              size_t tmplen,
+                              unsigned char *sha256sum, /* output */
+                              size_t sha256len)
 {
   PK11Context *SHA256pw = PK11_CreateDigestContext(SEC_OID_SHA256);
   unsigned int SHA256out;
@@ -2401,7 +2416,7 @@
   return CURLE_OK;
 }
 
-static bool Curl_nss_cert_status_request(void)
+static bool nss_cert_status_request(void)
 {
 #ifdef SSL_ENABLE_OCSP_STAPLING
   return TRUE;
@@ -2410,7 +2425,7 @@
 #endif
 }
 
-static bool Curl_nss_false_start(void)
+static bool nss_false_start(void)
 {
 #if NSSVERNUM >= 0x030f04 /* 3.15.4 */
   return TRUE;
@@ -2419,8 +2434,8 @@
 #endif
 }
 
-static void *Curl_nss_get_internals(struct ssl_connect_data *connssl,
-                                    CURLINFO info UNUSED_PARAM)
+static void *nss_get_internals(struct ssl_connect_data *connssl,
+                               CURLINFO info UNUSED_PARAM)
 {
   struct ssl_backend_data *backend = connssl->backend;
   (void)info;
@@ -2437,28 +2452,30 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_nss_init,                /* init */
-  Curl_nss_cleanup,             /* cleanup */
-  Curl_nss_version,             /* version */
-  Curl_nss_check_cxn,           /* check_cxn */
+  nss_init,                     /* init */
+  nss_cleanup,                  /* cleanup */
+  nss_version,                  /* version */
+  nss_check_cxn,                /* check_cxn */
   /* NSS has no shutdown function provided and thus always fail */
   Curl_none_shutdown,           /* shutdown */
   Curl_none_data_pending,       /* data_pending */
-  Curl_nss_random,              /* random */
-  Curl_nss_cert_status_request, /* cert_status_request */
-  Curl_nss_connect,             /* connect */
-  Curl_nss_connect_nonblocking, /* connect_nonblocking */
-  Curl_nss_get_internals,       /* get_internals */
-  Curl_nss_close,               /* close_one */
+  nss_random,                   /* random */
+  nss_cert_status_request,      /* cert_status_request */
+  nss_connect,                  /* connect */
+  nss_connect_nonblocking,      /* connect_nonblocking */
+  Curl_ssl_getsock,             /* getsock */
+  nss_get_internals,            /* get_internals */
+  nss_close,                    /* close_one */
   Curl_none_close_all,          /* close_all */
   /* NSS has its own session ID cache */
   Curl_none_session_free,       /* session_free */
   Curl_none_set_engine,         /* set_engine */
   Curl_none_set_engine_default, /* set_engine_default */
   Curl_none_engines_list,       /* engines_list */
-  Curl_nss_false_start,         /* false_start */
-  Curl_nss_md5sum,              /* md5sum */
-  Curl_nss_sha256sum            /* sha256sum */
+  nss_false_start,              /* false_start */
+  nss_sha256sum,                /* sha256sum */
+  NULL,                         /* associate_connection */
+  NULL                          /* disassociate_connection */
 };
 
 #endif /* USE_NSS */
diff --git a/lib/vtls/nssg.h b/lib/vtls/nssg.h
index 41e51b0..37b3646 100644
--- a/lib/vtls/nssg.h
+++ b/lib/vtls/nssg.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 28a1ae6..8af23b7 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -122,12 +122,6 @@
 #define HAVE_ERR_REMOVE_THREAD_STATE 1
 #endif
 
-#if !defined(HAVE_SSLV2_CLIENT_METHOD) || \
-  OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no SSLv2 */
-#undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */
-#define OPENSSL_NO_SSL2
-#endif
-
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && /* OpenSSL 1.1.0+ */ \
     !(defined(LIBRESSL_VERSION_NUMBER) && \
       LIBRESSL_VERSION_NUMBER < 0x20700000L)
@@ -225,7 +219,17 @@
   "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
 #endif
 
+#ifdef HAVE_OPENSSL_SRP
+/* the function exists */
+#ifdef USE_TLS_SRP
+/* the functionality is not disabled */
+#define USE_OPENSSL_SRP
+#endif
+#endif
+
 struct ssl_backend_data {
+  struct Curl_easy *logger; /* transfer handle to pass trace logs to, only
+                               using sockindex 0 */
   /* these ones requires specific SSL-types */
   SSL_CTX* ctx;
   SSL*     handle;
@@ -236,6 +240,10 @@
 #endif
 };
 
+static void ossl_associate_connection(struct Curl_easy *data,
+                                      struct connectdata *conn,
+                                      int sockindex);
+
 /*
  * Number of bytes to read from the random number seed file. This must be
  * a finite value (because some entropy "files" like /dev/urandom have
@@ -354,6 +362,18 @@
   return buf;
 }
 
+/* Return an extra data index for the transfer data.
+ * This index can be used with SSL_get_ex_data() and SSL_set_ex_data().
+ */
+static int ossl_get_ssl_data_index(void)
+{
+  static int ssl_ex_data_data_index = -1;
+  if(ssl_ex_data_data_index < 0) {
+    ssl_ex_data_data_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
+  }
+  return ssl_ex_data_data_index;
+}
+
 /* Return an extra data index for the connection data.
  * This index can be used with SSL_get_ex_data() and SSL_set_ex_data().
  */
@@ -371,12 +391,23 @@
  */
 static int ossl_get_ssl_sockindex_index(void)
 {
-  static int ssl_ex_data_sockindex_index = -1;
-  if(ssl_ex_data_sockindex_index < 0) {
-    ssl_ex_data_sockindex_index = SSL_get_ex_new_index(0, NULL, NULL, NULL,
-        NULL);
+  static int sockindex_index = -1;
+  if(sockindex_index < 0) {
+    sockindex_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
   }
-  return ssl_ex_data_sockindex_index;
+  return sockindex_index;
+}
+
+/* Return an extra data index for proxy boolean.
+ * This index can be used with SSL_get_ex_data() and SSL_set_ex_data().
+ */
+static int ossl_get_proxy_index(void)
+{
+  static int proxy_index = -1;
+  if(proxy_index < 0) {
+    proxy_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
+  }
+  return proxy_index;
 }
 
 static int passwd_callback(char *buf, int num, int encrypting,
@@ -402,19 +433,18 @@
   return (0 != RAND_status()) ? TRUE : FALSE;
 }
 
-static CURLcode Curl_ossl_seed(struct Curl_easy *data)
+static CURLcode ossl_seed(struct Curl_easy *data)
 {
-  /* we have the "SSL is seeded" boolean static to prevent multiple
-     time-consuming seedings in vain */
-  static bool ssl_seeded = FALSE;
   char fname[256];
 
-  if(ssl_seeded)
+  /* This might get called before it has been added to a multi handle */
+  if(data->multi && data->multi->ssl_seeded)
     return CURLE_OK;
 
   if(rand_enough()) {
     /* OpenSSL 1.1.0+ will return here */
-    ssl_seeded = TRUE;
+    if(data->multi)
+      data->multi->ssl_seeded = TRUE;
     return CURLE_OK;
   }
 
@@ -487,7 +517,7 @@
       return CURLE_OK;
   }
 
-  infof(data, "libcurl is now using a weak random seed!\n");
+  infof(data, "libcurl is now using a weak random seed!");
   return (rand_enough() ? CURLE_OK :
     CURLE_SSL_CONNECT_ERROR /* confusing error code */);
 }
@@ -564,15 +594,19 @@
 
 #endif
 
-static CURLcode Curl_ossl_set_engine(struct Curl_easy *data,
-                                     const char *engine);
+static CURLcode ossl_set_engine(struct Curl_easy *data, const char *engine);
 
 static int
-SSL_CTX_use_certificate_bio(SSL_CTX *ctx, BIO *in, int type,
-                            const char *key_passwd)
+SSL_CTX_use_certificate_blob(SSL_CTX *ctx, const struct curl_blob *blob,
+                             int type, const char *key_passwd)
 {
   int ret = 0;
   X509 *x = NULL;
+  /* the typecast of blob->len is fine since it is guaranteed to never be
+     larger than CURL_MAX_INPUT_LENGTH */
+  BIO *in = BIO_new_mem_buf(blob->data, (int)(blob->len));
+  if(!in)
+    return CURLE_OUT_OF_MEMORY;
 
   if(type == SSL_FILETYPE_ASN1) {
     /* j = ERR_R_ASN1_LIB; */
@@ -588,7 +622,7 @@
     goto end;
   }
 
-  if(x == NULL) {
+  if(!x) {
     ret = 0;
     goto end;
   }
@@ -596,15 +630,19 @@
   ret = SSL_CTX_use_certificate(ctx, x);
  end:
   X509_free(x);
+  BIO_free(in);
   return ret;
 }
 
 static int
-SSL_CTX_use_PrivateKey_bio(SSL_CTX *ctx, BIO* in, int type,
-                           const char *key_passwd)
+SSL_CTX_use_PrivateKey_blob(SSL_CTX *ctx, const struct curl_blob *blob,
+                           int type, const char *key_passwd)
 {
   int ret = 0;
   EVP_PKEY *pkey = NULL;
+  BIO *in = BIO_new_mem_buf(blob->data, (int)(blob->len));
+  if(!in)
+    return CURLE_OUT_OF_MEMORY;
 
   if(type == SSL_FILETYPE_PEM)
     pkey = PEM_read_bio_PrivateKey(in, NULL, passwd_callback,
@@ -615,19 +653,20 @@
     ret = 0;
     goto end;
   }
-  if(pkey == NULL) {
+  if(!pkey) {
     ret = 0;
     goto end;
   }
   ret = SSL_CTX_use_PrivateKey(ctx, pkey);
   EVP_PKEY_free(pkey);
   end:
+  BIO_free(in);
   return ret;
 }
 
 static int
-SSL_CTX_use_certificate_chain_bio(SSL_CTX *ctx, BIO* in,
-                                  const char *key_passwd)
+SSL_CTX_use_certificate_chain_blob(SSL_CTX *ctx, const struct curl_blob *blob,
+                                   const char *key_passwd)
 {
 /* SSL_CTX_add1_chain_cert introduced in OpenSSL 1.0.2 */
 #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* OpenSSL 1.0.2 or later */ \
@@ -636,13 +675,16 @@
   int ret = 0;
   X509 *x = NULL;
   void *passwd_callback_userdata = (void *)key_passwd;
+  BIO *in = BIO_new_mem_buf(blob->data, (int)(blob->len));
+  if(!in)
+    return CURLE_OUT_OF_MEMORY;
 
   ERR_clear_error();
 
   x = PEM_read_bio_X509_AUX(in, NULL,
                             passwd_callback, (void *)key_passwd);
 
-  if(x == NULL) {
+  if(!x) {
     ret = 0;
     goto end;
   }
@@ -650,7 +692,7 @@
   ret = SSL_CTX_use_certificate(ctx, x);
 
   if(ERR_peek_error() != 0)
-      ret = 0;
+    ret = 0;
 
   if(ret) {
     X509 *ca;
@@ -682,33 +724,33 @@
 
  end:
   X509_free(x);
+  BIO_free(in);
   return ret;
 #else
   (void)ctx; /* unused */
-  (void)in; /* unused */
+  (void)blob; /* unused */
   (void)key_passwd; /* unused */
   return 0;
 #endif
 }
 
 static
-int cert_stuff(struct connectdata *conn,
+int cert_stuff(struct Curl_easy *data,
                SSL_CTX* ctx,
                char *cert_file,
-               BIO *cert_bio,
+               const struct curl_blob *cert_blob,
                const char *cert_type,
                char *key_file,
-               BIO* key_bio,
+               const struct curl_blob *key_blob,
                const char *key_type,
                char *key_passwd)
 {
-  struct Curl_easy *data = conn->data;
   char error_buffer[256];
   bool check_privkey = TRUE;
 
   int file_type = do_file_type(cert_type);
 
-  if(cert_file || cert_bio || (file_type == SSL_FILETYPE_ENGINE)) {
+  if(cert_file || cert_blob || (file_type == SSL_FILETYPE_ENGINE)) {
     SSL *ssl;
     X509 *x509;
     int cert_done = 0;
@@ -725,9 +767,9 @@
     switch(file_type) {
     case SSL_FILETYPE_PEM:
       /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
-      cert_use_result = cert_bio ?
-          SSL_CTX_use_certificate_chain_bio(ctx, cert_bio, key_passwd) :
-          SSL_CTX_use_certificate_chain_file(ctx, cert_file);
+      cert_use_result = cert_blob ?
+        SSL_CTX_use_certificate_chain_blob(ctx, cert_blob, key_passwd) :
+        SSL_CTX_use_certificate_chain_file(ctx, cert_file);
       if(cert_use_result != 1) {
         failf(data,
               "could not load PEM client certificate, " OSSL_PACKAGE
@@ -744,10 +786,10 @@
          we use the case above for PEM so this can only be performed with
          ASN1 files. */
 
-      cert_use_result = cert_bio ?
-          SSL_CTX_use_certificate_bio(ctx, cert_bio,
-                                      file_type, key_passwd) :
-          SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
+      cert_use_result = cert_blob ?
+        SSL_CTX_use_certificate_blob(ctx, cert_blob,
+                                     file_type, key_passwd) :
+        SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
       if(cert_use_result != 1) {
         failf(data,
               "could not load ASN1 client certificate, " OSSL_PACKAGE
@@ -765,7 +807,7 @@
          * cert_file is a PKCS#11 URI */
         if(!data->state.engine) {
           if(is_pkcs11_uri(cert_file)) {
-            if(Curl_ossl_set_engine(data, "pkcs11") != CURLE_OK) {
+            if(ossl_set_engine(data, "pkcs11") != CURLE_OK) {
               return 0;
             }
           }
@@ -824,13 +866,24 @@
 
     case SSL_FILETYPE_PKCS12:
     {
-      BIO *fp = NULL;
+      BIO *cert_bio = NULL;
       PKCS12 *p12 = NULL;
       EVP_PKEY *pri;
       STACK_OF(X509) *ca = NULL;
-      if(!cert_bio) {
-        fp = BIO_new(BIO_s_file());
-        if(fp == NULL) {
+      if(cert_blob) {
+        cert_bio = BIO_new_mem_buf(cert_blob->data, (int)(cert_blob->len));
+        if(!cert_bio) {
+          failf(data,
+                "BIO_new_mem_buf NULL, " OSSL_PACKAGE
+                " error %s",
+                ossl_strerror(ERR_get_error(), error_buffer,
+                              sizeof(error_buffer)) );
+          return 0;
+        }
+      }
+      else {
+        cert_bio = BIO_new(BIO_s_file());
+        if(!cert_bio) {
           failf(data,
                 "BIO_new return NULL, " OSSL_PACKAGE
                 " error %s",
@@ -839,20 +892,19 @@
           return 0;
         }
 
-        if(BIO_read_filename(fp, cert_file) <= 0) {
+        if(BIO_read_filename(cert_bio, cert_file) <= 0) {
           failf(data, "could not open PKCS12 file '%s'", cert_file);
-          BIO_free(fp);
+          BIO_free(cert_bio);
           return 0;
         }
       }
 
-      p12 = d2i_PKCS12_bio(cert_bio ? cert_bio : fp, NULL);
-      if(fp)
-        BIO_free(fp);
+      p12 = d2i_PKCS12_bio(cert_bio, NULL);
+      BIO_free(cert_bio);
 
       if(!p12) {
         failf(data, "error reading PKCS12 file '%s'",
-              cert_bio ? "(memory blob)" : cert_file);
+              cert_blob ? "(memory blob)" : cert_file);
         return 0;
       }
 
@@ -933,9 +985,9 @@
       return 0;
     }
 
-    if((!key_file) && (!key_bio)) {
+    if((!key_file) && (!key_blob)) {
       key_file = cert_file;
-      key_bio = cert_bio;
+      key_blob = cert_blob;
     }
     else
       file_type = do_file_type(key_type);
@@ -946,8 +998,8 @@
         break;
       /* FALLTHROUGH */
     case SSL_FILETYPE_ASN1:
-      cert_use_result = key_bio ?
-        SSL_CTX_use_PrivateKey_bio(ctx, key_bio, file_type, key_passwd) :
+      cert_use_result = key_blob ?
+        SSL_CTX_use_PrivateKey_blob(ctx, key_blob, file_type, key_passwd) :
         SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type);
       if(cert_use_result != 1) {
         failf(data, "unable to set private key file: '%s' type %s",
@@ -964,7 +1016,7 @@
          * key_file is a PKCS#11 URI */
         if(!data->state.engine) {
           if(is_pkcs11_uri(key_file)) {
-            if(Curl_ossl_set_engine(data, "pkcs11") != CURLE_OK) {
+            if(ossl_set_engine(data, "pkcs11") != CURLE_OK) {
               return 0;
             }
           }
@@ -1076,9 +1128,6 @@
 /* returns non-zero on failure */
 static int x509_name_oneline(X509_NAME *a, char *buf, size_t size)
 {
-#if 0
-  return X509_NAME_oneline(a, buf, size);
-#else
   BIO *bio_out = BIO_new(BIO_s_mem());
   BUF_MEM *biomem;
   int rc;
@@ -1100,7 +1149,6 @@
   BIO_free(bio_out);
 
   return !rc;
-#endif
 }
 
 /**
@@ -1109,8 +1157,23 @@
  * @retval 0 error initializing SSL
  * @retval 1 SSL initialized successfully
  */
-static int Curl_ossl_init(void)
+static int ossl_init(void)
 {
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) &&  \
+  !defined(LIBRESSL_VERSION_NUMBER)
+  const uint64_t flags =
+#ifdef OPENSSL_INIT_ENGINE_ALL_BUILTIN
+    /* not present in BoringSSL */
+    OPENSSL_INIT_ENGINE_ALL_BUILTIN |
+#endif
+#ifdef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
+    OPENSSL_INIT_NO_LOAD_CONFIG |
+#else
+    OPENSSL_INIT_LOAD_CONFIG |
+#endif
+    0;
+  OPENSSL_init_ssl(flags, NULL);
+#else
   OPENSSL_load_builtin_modules();
 
 #ifdef USE_OPENSSL_ENGINE
@@ -1129,10 +1192,6 @@
                          CONF_MFLAGS_IGNORE_MISSING_FILE);
 #endif
 
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
-    !defined(LIBRESSL_VERSION_NUMBER)
-  /* OpenSSL 1.1.0+ takes care of initialization itself */
-#else
   /* Lets get nice error messages */
   SSL_load_error_strings();
 
@@ -1146,14 +1205,15 @@
   Curl_tls_keylog_open();
 
   /* Initialize the extra data indexes */
-  if(ossl_get_ssl_conn_index() < 0 || ossl_get_ssl_sockindex_index() < 0)
+  if(ossl_get_ssl_data_index() < 0 || ossl_get_ssl_conn_index() < 0 ||
+     ossl_get_ssl_sockindex_index() < 0 || ossl_get_proxy_index() < 0)
     return 0;
 
   return 1;
 }
 
 /* Global cleanup */
-static void Curl_ossl_cleanup(void)
+static void ossl_cleanup(void)
 {
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
     !defined(LIBRESSL_VERSION_NUMBER)
@@ -1197,7 +1257,7 @@
  *     0 means the connection has been closed
  *    -1 means the connection status is unknown
  */
-static int Curl_ossl_check_cxn(struct connectdata *conn)
+static int ossl_check_cxn(struct connectdata *conn)
 {
   /* SSL_peek takes data out of the raw recv buffer without peeking so we use
      recv MSG_PEEK instead. Bug #795 */
@@ -1243,8 +1303,7 @@
 
 /* Selects an OpenSSL crypto engine
  */
-static CURLcode Curl_ossl_set_engine(struct Curl_easy *data,
-                                     const char *engine)
+static CURLcode ossl_set_engine(struct Curl_easy *data, const char *engine)
 {
 #ifdef USE_OPENSSL_ENGINE
   ENGINE *e;
@@ -1274,7 +1333,7 @@
     char buf[256];
 
     ENGINE_free(e);
-    failf(data, "Failed to initialise SSL Engine '%s':\n%s",
+    failf(data, "Failed to initialise SSL Engine '%s': %s",
           engine, ossl_strerror(ERR_get_error(), buf, sizeof(buf)));
     return CURLE_SSL_ENGINE_INITFAILED;
   }
@@ -1289,12 +1348,12 @@
 
 /* Sets engine as default for all SSL operations
  */
-static CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data)
+static CURLcode ossl_set_engine_default(struct Curl_easy *data)
 {
 #ifdef USE_OPENSSL_ENGINE
   if(data->state.engine) {
     if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
-      infof(data, "set default crypto engine '%s'\n",
+      infof(data, "set default crypto engine '%s'",
             ENGINE_get_id(data->state.engine));
     }
     else {
@@ -1311,7 +1370,7 @@
 
 /* Return list of OpenSSL crypto engine names.
  */
-static struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data)
+static struct curl_slist *ossl_engines_list(struct Curl_easy *data)
 {
   struct curl_slist *list = NULL;
 #ifdef USE_OPENSSL_ENGINE
@@ -1331,10 +1390,22 @@
   return list;
 }
 
-static void ossl_close(struct ssl_connect_data *connssl)
+#define set_logger(conn, data)                  \
+  conn->ssl[0].backend->logger = data
+
+static void ossl_closeone(struct Curl_easy *data,
+                          struct connectdata *conn,
+                          struct ssl_connect_data *connssl)
 {
   struct ssl_backend_data *backend = connssl->backend;
   if(backend->handle) {
+    char buf[32];
+    set_logger(conn, data);
+
+    /* Maybe the server has already sent a close notify alert.
+       Read it to avoid an RST on the TCP connection. */
+    (void)SSL_read(backend->handle, buf, (int)sizeof(buf));
+
     (void)SSL_shutdown(backend->handle);
     SSL_set_connect_state(backend->handle);
 
@@ -1350,11 +1421,12 @@
 /*
  * This function is called when an SSL connection is closed.
  */
-static void Curl_ossl_close(struct connectdata *conn, int sockindex)
+static void ossl_close(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex)
 {
-  ossl_close(&conn->ssl[sockindex]);
+  ossl_closeone(data, conn, &conn->ssl[sockindex]);
 #ifndef CURL_DISABLE_PROXY
-  ossl_close(&conn->proxy_ssl[sockindex]);
+  ossl_closeone(data, conn, &conn->proxy_ssl[sockindex]);
 #endif
 }
 
@@ -1362,11 +1434,11 @@
  * This function is called to shut down the SSL layer but keep the
  * socket open (CCC - Clear Command Channel)
  */
-static int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
+static int ossl_shutdown(struct Curl_easy *data,
+                         struct connectdata *conn, int sockindex)
 {
   int retval = 0;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-  struct Curl_easy *data = conn->data;
   char buf[256]; /* We will use this for the OpenSSL error buffer, so it has
                     to be at least 256 bytes long. */
   unsigned long sslerror;
@@ -1375,6 +1447,7 @@
   int err;
   bool done = FALSE;
   struct ssl_backend_data *backend = connssl->backend;
+  int loop = 10;
 
 #ifndef CURL_DISABLE_FTP
   /* This has only been tested on the proftpd server, and the mod_tls code
@@ -1388,7 +1461,7 @@
 
   if(backend->handle) {
     buffsize = (int)sizeof(buf);
-    while(!done) {
+    while(!done && loop--) {
       int what = SOCKET_READABLE(conn->sock[sockindex],
                                  SSL_SHUTDOWN_TIMEOUT);
       if(what > 0) {
@@ -1408,17 +1481,17 @@
           break;
         case SSL_ERROR_WANT_READ:
           /* there's data pending, re-invoke SSL_read() */
-          infof(data, "SSL_ERROR_WANT_READ\n");
+          infof(data, "SSL_ERROR_WANT_READ");
           break;
         case SSL_ERROR_WANT_WRITE:
           /* SSL wants a write. Really odd. Let's bail out. */
-          infof(data, "SSL_ERROR_WANT_WRITE\n");
+          infof(data, "SSL_ERROR_WANT_WRITE");
           done = TRUE;
           break;
         default:
           /* openssl/ssl.h says "look at error stack/return value/errno" */
           sslerror = ERR_get_error();
-          failf(conn->data, OSSL_PACKAGE " SSL_read on shutdown: %s, errno %d",
+          failf(data, OSSL_PACKAGE " SSL_read on shutdown: %s, errno %d",
                 (sslerror ?
                  ossl_strerror(sslerror, buf, sizeof(buf)) :
                  SSL_ERROR_to_str(err)),
@@ -1444,14 +1517,14 @@
 #ifdef HAVE_SSL_GET_SHUTDOWN
       switch(SSL_get_shutdown(backend->handle)) {
       case SSL_SENT_SHUTDOWN:
-        infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN\n");
+        infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN");
         break;
       case SSL_RECEIVED_SHUTDOWN:
-        infof(data, "SSL_get_shutdown() returned SSL_RECEIVED_SHUTDOWN\n");
+        infof(data, "SSL_get_shutdown() returned SSL_RECEIVED_SHUTDOWN");
         break;
       case SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN:
         infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN|"
-              "SSL_RECEIVED__SHUTDOWN\n");
+              "SSL_RECEIVED__SHUTDOWN");
         break;
       }
 #endif
@@ -1463,7 +1536,7 @@
   return retval;
 }
 
-static void Curl_ossl_session_free(void *ptr)
+static void ossl_session_free(void *ptr)
 {
   /* free the ID */
   SSL_SESSION_free(ptr);
@@ -1473,7 +1546,7 @@
  * This function is called when the 'data' struct is going away. Close
  * down everything and free all resources!
  */
-static void Curl_ossl_close_all(struct Curl_easy *data)
+static void ossl_close_all(struct Curl_easy *data)
 {
 #ifdef USE_OPENSSL_ENGINE
   if(data->state.engine) {
@@ -1518,7 +1591,7 @@
       if(Curl_cert_hostcheck(match_pattern2, hostname)) {
         res = TRUE;
         infof(data,
-                " subjectAltName: host \"%s\" matched cert's \"%s\"\n",
+                " subjectAltName: host \"%s\" matched cert's \"%s\"",
                 dispname, match_pattern2);
       }
     }
@@ -1537,7 +1610,7 @@
   (void)data;
 #endif
   if(Curl_cert_hostcheck(match_pattern, hostname)) {
-    infof(data, " subjectAltName: host \"%s\" matched cert's \"%s\"\n",
+    infof(data, " subjectAltName: host \"%s\" matched cert's \"%s\"",
                   dispname, match_pattern);
     return TRUE;
   }
@@ -1567,12 +1640,12 @@
    in the certificate and must exactly match the IP in the URI.
 
 */
-static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert)
+static CURLcode verifyhost(struct Curl_easy *data, struct connectdata *conn,
+                           X509 *server_cert)
 {
   bool matched = FALSE;
   int target = GEN_DNS; /* target type, GEN_DNS or GEN_IPADD */
   size_t addrlen = 0;
-  struct Curl_easy *data = conn->data;
   STACK_OF(GENERAL_NAME) *altnames;
 #ifdef ENABLE_IPV6
   struct in6_addr addr;
@@ -1657,7 +1730,7 @@
           if((altlen == addrlen) && !memcmp(altptr, &addr, altlen)) {
             ipmatched = TRUE;
             infof(data,
-                  " subjectAltName: host \"%s\" matched cert's IP address!\n",
+                  " subjectAltName: host \"%s\" matched cert's IP address!",
                   dispname);
           }
           break;
@@ -1674,7 +1747,7 @@
     /* an alternative name matched */
     ;
   else if(dNSName || iPAddress) {
-    infof(data, " subjectAltName does not match %s\n", dispname);
+    infof(data, " subjectAltName does not match %s", dispname);
     failf(data, "SSL: no alternative certificate subject name matches "
           "target host name '%s'", dispname);
     result = CURLE_PEER_FAILED_VERIFICATION;
@@ -1756,7 +1829,7 @@
       result = CURLE_PEER_FAILED_VERIFICATION;
     }
     else {
-      infof(data, " common name: %s (matched)\n", peer_CN);
+      infof(data, " common name: %s (matched)", peer_CN);
     }
     if(peer_CN)
       OPENSSL_free(peer_CN);
@@ -1767,19 +1840,23 @@
 
 #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
     !defined(OPENSSL_NO_OCSP)
-static CURLcode verifystatus(struct connectdata *conn,
+static CURLcode verifystatus(struct Curl_easy *data,
                              struct ssl_connect_data *connssl)
 {
   int i, ocsp_status;
   unsigned char *status;
   const unsigned char *p;
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   OCSP_RESPONSE *rsp = NULL;
   OCSP_BASICRESP *br = NULL;
   X509_STORE     *st = NULL;
   STACK_OF(X509) *ch = NULL;
   struct ssl_backend_data *backend = connssl->backend;
+  X509 *cert;
+  OCSP_CERTID *id = NULL;
+  int cert_status, crl_reason;
+  ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
+  int ret;
 
   long len = SSL_get_tlsext_status_ocsp_resp(backend->handle, &status);
 
@@ -1848,43 +1925,63 @@
     goto end;
   }
 
-  for(i = 0; i < OCSP_resp_count(br); i++) {
-    int cert_status, crl_reason;
-    OCSP_SINGLERESP *single = NULL;
+  /* Compute the certificate's ID */
+  cert = SSL_get_peer_certificate(backend->handle);
+  if(!cert) {
+    failf(data, "Error getting peer certificate");
+    result = CURLE_SSL_INVALIDCERTSTATUS;
+    goto end;
+  }
 
-    ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
-
-    single = OCSP_resp_get0(br, i);
-    if(!single)
-      continue;
-
-    cert_status = OCSP_single_get0_status(single, &crl_reason, &rev,
-                                          &thisupd, &nextupd);
-
-    if(!OCSP_check_validity(thisupd, nextupd, 300L, -1L)) {
-      failf(data, "OCSP response has expired");
-      result = CURLE_SSL_INVALIDCERTSTATUS;
-      goto end;
+  for(i = 0; i < sk_X509_num(ch); i++) {
+    X509 *issuer = sk_X509_value(ch, i);
+    if(X509_check_issued(issuer, cert) == X509_V_OK) {
+      id = OCSP_cert_to_id(EVP_sha1(), cert, issuer);
+      break;
     }
+  }
+  X509_free(cert);
 
-    infof(data, "SSL certificate status: %s (%d)\n",
-          OCSP_cert_status_str(cert_status), cert_status);
+  if(!id) {
+    failf(data, "Error computing OCSP ID");
+    result = CURLE_SSL_INVALIDCERTSTATUS;
+    goto end;
+  }
 
-    switch(cert_status) {
-      case V_OCSP_CERTSTATUS_GOOD:
-        break;
+  /* Find the single OCSP response corresponding to the certificate ID */
+  ret = OCSP_resp_find_status(br, id, &cert_status, &crl_reason, &rev,
+                              &thisupd, &nextupd);
+  OCSP_CERTID_free(id);
+  if(ret != 1) {
+    failf(data, "Could not find certificate ID in OCSP response");
+    result = CURLE_SSL_INVALIDCERTSTATUS;
+    goto end;
+  }
 
-      case V_OCSP_CERTSTATUS_REVOKED:
-        result = CURLE_SSL_INVALIDCERTSTATUS;
+  /* Validate the corresponding single OCSP response */
+  if(!OCSP_check_validity(thisupd, nextupd, 300L, -1L)) {
+    failf(data, "OCSP response has expired");
+    result = CURLE_SSL_INVALIDCERTSTATUS;
+    goto end;
+  }
 
-        failf(data, "SSL certificate revocation reason: %s (%d)",
-              OCSP_crl_reason_str(crl_reason), crl_reason);
-        goto end;
+  infof(data, "SSL certificate status: %s (%d)",
+        OCSP_cert_status_str(cert_status), cert_status);
 
-      case V_OCSP_CERTSTATUS_UNKNOWN:
-        result = CURLE_SSL_INVALIDCERTSTATUS;
-        goto end;
-    }
+  switch(cert_status) {
+  case V_OCSP_CERTSTATUS_GOOD:
+    break;
+
+  case V_OCSP_CERTSTATUS_REVOKED:
+    result = CURLE_SSL_INVALIDCERTSTATUS;
+    failf(data, "SSL certificate revocation reason: %s (%d)",
+          OCSP_crl_reason_str(crl_reason), crl_reason);
+    goto end;
+
+  case V_OCSP_CERTSTATUS_UNKNOWN:
+  default:
+    result = CURLE_SSL_INVALIDCERTSTATUS;
+    goto end;
   }
 
 end:
@@ -2004,25 +2101,24 @@
   }
 }
 
-
 /*
  * Our callback from the SSL/TLS layers.
  */
-static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
-                          const void *buf, size_t len, SSL *ssl,
-                          void *userp)
+static void ossl_trace(int direction, int ssl_ver, int content_type,
+                       const void *buf, size_t len, SSL *ssl,
+                       void *userp)
 {
-  struct Curl_easy *data;
   char unknown[32];
   const char *verstr = NULL;
   struct connectdata *conn = userp;
+  struct ssl_connect_data *connssl = &conn->ssl[0];
+  struct ssl_backend_data *backend = connssl->backend;
+  struct Curl_easy *data = backend->logger;
 
-  if(!conn || !conn->data || !conn->data->set.fdebug ||
+  if(!conn || !data || !data->set.fdebug ||
      (direction != 0 && direction != 1))
     return;
 
-  data = conn->data;
-
   switch(ssl_ver) {
 #ifdef SSL2_VERSION /* removed in recent versions */
   case SSL2_VERSION:
@@ -2166,16 +2262,14 @@
                      const unsigned char *in, unsigned int inlen,
                      void *arg)
 {
-  struct connectdata *conn = (struct connectdata*) arg;
-
+  struct Curl_easy *data = (struct Curl_easy *)arg;
+  struct connectdata *conn = data->conn;
   (void)ssl;
 
-#ifdef USE_NGHTTP2
-  if(conn->data->set.httpversion >= CURL_HTTP_VERSION_2 &&
-     !select_next_protocol(out, outlen, in, inlen, NGHTTP2_PROTO_VERSION_ID,
-                           NGHTTP2_PROTO_VERSION_ID_LEN)) {
-    infof(conn->data, "NPN, negotiated HTTP2 (%s)\n",
-          NGHTTP2_PROTO_VERSION_ID);
+#ifdef USE_HTTP2
+  if(data->state.httpwant >= CURL_HTTP_VERSION_2 &&
+     !select_next_protocol(out, outlen, in, inlen, ALPN_H2, ALPN_H2_LENGTH)) {
+    infof(data, "NPN, negotiated HTTP2 (%s)", ALPN_H2);
     conn->negnpn = CURL_HTTP_VERSION_2;
     return SSL_TLSEXT_ERR_OK;
   }
@@ -2183,12 +2277,12 @@
 
   if(!select_next_protocol(out, outlen, in, inlen, ALPN_HTTP_1_1,
                            ALPN_HTTP_1_1_LENGTH)) {
-    infof(conn->data, "NPN, negotiated HTTP1.1\n");
+    infof(data, "NPN, negotiated HTTP1.1");
     conn->negnpn = CURL_HTTP_VERSION_1_1;
     return SSL_TLSEXT_ERR_OK;
   }
 
-  infof(conn->data, "NPN, no overlap, use HTTP1.1\n");
+  infof(data, "NPN, no overlap, use HTTP1.1");
   *out = (unsigned char *)ALPN_HTTP_1_1;
   *outlen = ALPN_HTTP_1_1_LENGTH;
   conn->negnpn = CURL_HTTP_VERSION_1_1;
@@ -2197,35 +2291,6 @@
 }
 #endif /* HAS_NPN */
 
-#ifndef CURL_DISABLE_VERBOSE_STRINGS
-static const char *
-get_ssl_version_txt(SSL *ssl)
-{
-  if(!ssl)
-    return "";
-
-  switch(SSL_version(ssl)) {
-#ifdef TLS1_3_VERSION
-  case TLS1_3_VERSION:
-    return "TLSv1.3";
-#endif
-#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
-  case TLS1_2_VERSION:
-    return "TLSv1.2";
-  case TLS1_1_VERSION:
-    return "TLSv1.1";
-#endif
-  case TLS1_VERSION:
-    return "TLSv1.0";
-  case SSL3_VERSION:
-    return "SSLv3";
-  case SSL2_VERSION:
-    return "SSLv2";
-  }
-  return "unknown";
-}
-#endif
-
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) /* 1.1.0 */
 static CURLcode
 set_ssl_version_min_max(SSL_CTX *ctx, struct connectdata *conn)
@@ -2319,16 +2384,14 @@
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L) /* 1.1.0 */
 static CURLcode
 set_ssl_version_min_max_legacy(ctx_option_t *ctx_options,
-                              struct connectdata *conn, int sockindex)
+                               struct Curl_easy *data,
+                               struct connectdata *conn, int sockindex)
 {
-#if (OPENSSL_VERSION_NUMBER < 0x1000100FL) || !defined(TLS1_3_VERSION)
-  /* convoluted #if condition just to avoid compiler warnings on unused
-     variable */
-  struct Curl_easy *data = conn->data;
-#endif
   long ssl_version = SSL_CONN_CONFIG(version);
   long ssl_version_max = SSL_CONN_CONFIG(version_max);
 
+  (void) data; /* In case it's unused. */
+
   switch(ssl_version) {
     case CURL_SSLVERSION_TLSv1_3:
 #ifdef TLS1_3_VERSION
@@ -2403,62 +2466,132 @@
   struct Curl_easy *data;
   int sockindex;
   curl_socket_t *sockindex_ptr;
+  int data_idx = ossl_get_ssl_data_index();
   int connectdata_idx = ossl_get_ssl_conn_index();
   int sockindex_idx = ossl_get_ssl_sockindex_index();
+  int proxy_idx = ossl_get_proxy_index();
+  bool isproxy;
 
-  if(connectdata_idx < 0 || sockindex_idx < 0)
+  if(data_idx < 0 || connectdata_idx < 0 || sockindex_idx < 0 || proxy_idx < 0)
     return 0;
 
   conn = (struct connectdata*) SSL_get_ex_data(ssl, connectdata_idx);
   if(!conn)
     return 0;
 
-  data = conn->data;
+  data = (struct Curl_easy *) SSL_get_ex_data(ssl, data_idx);
 
   /* The sockindex has been stored as a pointer to an array element */
   sockindex_ptr = (curl_socket_t*) SSL_get_ex_data(ssl, sockindex_idx);
   sockindex = (int)(sockindex_ptr - conn->sock);
 
+  isproxy = SSL_get_ex_data(ssl, proxy_idx) ? TRUE : FALSE;
+
   if(SSL_SET_OPTION(primary.sessionid)) {
     bool incache;
     void *old_ssl_sessionid = NULL;
 
-    Curl_ssl_sessionid_lock(conn);
-    incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL,
-                                      sockindex));
+    Curl_ssl_sessionid_lock(data);
+    if(isproxy)
+      incache = FALSE;
+    else
+      incache = !(Curl_ssl_getsessionid(data, conn, isproxy,
+                                        &old_ssl_sessionid, NULL, sockindex));
     if(incache) {
       if(old_ssl_sessionid != ssl_sessionid) {
-        infof(data, "old SSL session ID is stale, removing\n");
-        Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+        infof(data, "old SSL session ID is stale, removing");
+        Curl_ssl_delsessionid(data, old_ssl_sessionid);
         incache = FALSE;
       }
     }
 
     if(!incache) {
-      if(!Curl_ssl_addsessionid(conn, ssl_sessionid,
-                                      0 /* unknown size */, sockindex)) {
+      if(!Curl_ssl_addsessionid(data, conn, isproxy, ssl_sessionid,
+                                0 /* unknown size */, sockindex)) {
         /* the session has been put into the session cache */
         res = 1;
       }
       else
         failf(data, "failed to store ssl session");
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   return res;
 }
 
-static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
+static CURLcode load_cacert_from_memory(SSL_CTX *ctx,
+                                        const struct curl_blob *ca_info_blob)
+{
+  /* these need freed at the end */
+  BIO *cbio = NULL;
+  STACK_OF(X509_INFO) *inf = NULL;
+
+  /* everything else is just a reference */
+  int i, count = 0;
+  X509_STORE *cts = NULL;
+  X509_INFO *itmp = NULL;
+
+  if(ca_info_blob->len > (size_t)INT_MAX)
+    return CURLE_SSL_CACERT_BADFILE;
+
+  cts = SSL_CTX_get_cert_store(ctx);
+  if(!cts)
+    return CURLE_OUT_OF_MEMORY;
+
+  cbio = BIO_new_mem_buf(ca_info_blob->data, (int)ca_info_blob->len);
+  if(!cbio)
+    return CURLE_OUT_OF_MEMORY;
+
+  inf = PEM_X509_INFO_read_bio(cbio, NULL, NULL, NULL);
+  if(!inf) {
+    BIO_free(cbio);
+    return CURLE_SSL_CACERT_BADFILE;
+  }
+
+  /* add each entry from PEM file to x509_store */
+  for(i = 0; i < (int)sk_X509_INFO_num(inf); ++i) {
+    itmp = sk_X509_INFO_value(inf, i);
+    if(itmp->x509) {
+      if(X509_STORE_add_cert(cts, itmp->x509)) {
+        ++count;
+      }
+      else {
+        /* set count to 0 to return an error */
+        count = 0;
+        break;
+      }
+    }
+    if(itmp->crl) {
+      if(X509_STORE_add_crl(cts, itmp->crl)) {
+        ++count;
+      }
+      else {
+        /* set count to 0 to return an error */
+        count = 0;
+        break;
+      }
+    }
+  }
+
+  sk_X509_INFO_pop_free(inf, X509_INFO_free);
+  BIO_free(cbio);
+
+  /* if we didn't end up importing anything, treat that as an error */
+  return (count > 0 ? CURLE_OK : CURLE_SSL_CACERT_BADFILE);
+}
+
+static CURLcode ossl_connect_step1(struct Curl_easy *data,
+                                   struct connectdata *conn, int sockindex)
 {
   CURLcode result = CURLE_OK;
   char *ciphers;
-  struct Curl_easy *data = conn->data;
   SSL_METHOD_QUAL SSL_METHOD *req_method = NULL;
   X509_LOOKUP *lookup = NULL;
   curl_socket_t sockfd = conn->sock[sockindex];
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   ctx_option_t ctx_options = 0;
+  void *ssl_sessionid = NULL;
 
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
   bool sni;
@@ -2471,13 +2604,16 @@
 #endif
 #endif
   const long int ssl_version = SSL_CONN_CONFIG(version);
-#ifdef HAVE_OPENSSL_SRP
+#ifdef USE_OPENSSL_SRP
   const enum CURL_TLSAUTH ssl_authtype = SSL_SET_OPTION(authtype);
 #endif
   char * const ssl_cert = SSL_SET_OPTION(primary.clientcert);
   const struct curl_blob *ssl_cert_blob = SSL_SET_OPTION(primary.cert_blob);
+  const struct curl_blob *ca_info_blob = SSL_CONN_CONFIG(ca_info_blob);
   const char * const ssl_cert_type = SSL_SET_OPTION(cert_type);
-  const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile);
+  const char * const ssl_cafile =
+    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
+    (ca_info_blob ? NULL : SSL_CONN_CONFIG(CAfile));
   const char * const ssl_capath = SSL_CONN_CONFIG(CApath);
   const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
   const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile);
@@ -2488,7 +2624,7 @@
   DEBUGASSERT(ssl_connect_1 == connssl->connecting_state);
 
   /* Make funny stuff to get random input */
-  result = Curl_ossl_seed(data);
+  result = ossl_seed(data);
   if(result)
     return result;
 
@@ -2512,31 +2648,11 @@
     use_sni(TRUE);
     break;
   case CURL_SSLVERSION_SSLv2:
-#ifdef OPENSSL_NO_SSL2
-    failf(data, OSSL_PACKAGE " was built without SSLv2 support");
+    failf(data, "No SSLv2 support");
     return CURLE_NOT_BUILT_IN;
-#else
-#ifdef HAVE_OPENSSL_SRP
-    if(ssl_authtype == CURL_TLSAUTH_SRP)
-      return CURLE_SSL_CONNECT_ERROR;
-#endif
-    req_method = SSLv2_client_method();
-    use_sni(FALSE);
-    break;
-#endif
   case CURL_SSLVERSION_SSLv3:
-#ifdef OPENSSL_NO_SSL3_METHOD
-    failf(data, OSSL_PACKAGE " was built without SSLv3 support");
+    failf(data, "No SSLv3 support");
     return CURLE_NOT_BUILT_IN;
-#else
-#ifdef HAVE_OPENSSL_SRP
-    if(ssl_authtype == CURL_TLSAUTH_SRP)
-      return CURLE_SSL_CONNECT_ERROR;
-#endif
-    req_method = SSLv3_client_method();
-    use_sni(FALSE);
-    break;
-#endif
   default:
     failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
     return CURLE_SSL_CONNECT_ERROR;
@@ -2559,8 +2675,9 @@
 #ifdef SSL_CTRL_SET_MSG_CALLBACK
   if(data->set.fdebug && data->set.verbose) {
     /* the SSL trace callback is only used for verbose logging */
-    SSL_CTX_set_msg_callback(backend->ctx, ssl_tls_trace);
+    SSL_CTX_set_msg_callback(backend->ctx, ossl_trace);
     SSL_CTX_set_msg_callback_arg(backend->ctx, conn);
+    set_logger(conn, data);
   }
 #endif
 
@@ -2623,41 +2740,9 @@
 #endif
 
   switch(ssl_version) {
-    /* "--sslv2" option means SSLv2 only, disable all others */
     case CURL_SSLVERSION_SSLv2:
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 */
-      SSL_CTX_set_min_proto_version(backend->ctx, SSL2_VERSION);
-      SSL_CTX_set_max_proto_version(backend->ctx, SSL2_VERSION);
-#else
-      ctx_options |= SSL_OP_NO_SSLv3;
-      ctx_options |= SSL_OP_NO_TLSv1;
-#  if OPENSSL_VERSION_NUMBER >= 0x1000100FL
-      ctx_options |= SSL_OP_NO_TLSv1_1;
-      ctx_options |= SSL_OP_NO_TLSv1_2;
-#    ifdef TLS1_3_VERSION
-      ctx_options |= SSL_OP_NO_TLSv1_3;
-#    endif
-#  endif
-#endif
-      break;
-
-    /* "--sslv3" option means SSLv3 only, disable all others */
     case CURL_SSLVERSION_SSLv3:
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 */
-      SSL_CTX_set_min_proto_version(backend->ctx, SSL3_VERSION);
-      SSL_CTX_set_max_proto_version(backend->ctx, SSL3_VERSION);
-#else
-      ctx_options |= SSL_OP_NO_SSLv2;
-      ctx_options |= SSL_OP_NO_TLSv1;
-#  if OPENSSL_VERSION_NUMBER >= 0x1000100FL
-      ctx_options |= SSL_OP_NO_TLSv1_1;
-      ctx_options |= SSL_OP_NO_TLSv1_2;
-#    ifdef TLS1_3_VERSION
-      ctx_options |= SSL_OP_NO_TLSv1_3;
-#    endif
-#  endif
-#endif
-      break;
+      return CURLE_NOT_BUILT_IN;
 
     /* "--tlsv<x.y>" options mean TLS >= version <x.y> */
     case CURL_SSLVERSION_DEFAULT:
@@ -2674,7 +2759,8 @@
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) /* 1.1.0 */
       result = set_ssl_version_min_max(backend->ctx, conn);
 #else
-      result = set_ssl_version_min_max_legacy(&ctx_options, conn, sockindex);
+      result = set_ssl_version_min_max_legacy(&ctx_options, data, conn,
+                                              sockindex);
 #endif
       if(result != CURLE_OK)
         return result;
@@ -2689,7 +2775,7 @@
 
 #ifdef HAS_NPN
   if(conn->bits.tls_enable_npn)
-    SSL_CTX_set_next_proto_select_cb(backend->ctx, select_next_proto_cb, conn);
+    SSL_CTX_set_next_proto_select_cb(backend->ctx, select_next_proto_cb, data);
 #endif
 
 #ifdef HAS_ALPN
@@ -2697,63 +2783,45 @@
     int cur = 0;
     unsigned char protocols[128];
 
-#ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2
+#ifdef USE_HTTP2
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2
 #ifndef CURL_DISABLE_PROXY
        && (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)
 #endif
       ) {
-      protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
+      protocols[cur++] = ALPN_H2_LENGTH;
 
-      memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
-          NGHTTP2_PROTO_VERSION_ID_LEN);
-      cur += NGHTTP2_PROTO_VERSION_ID_LEN;
-      infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+      memcpy(&protocols[cur], ALPN_H2, ALPN_H2_LENGTH);
+      cur += ALPN_H2_LENGTH;
+      infof(data, "ALPN, offering %s", ALPN_H2);
     }
 #endif
 
     protocols[cur++] = ALPN_HTTP_1_1_LENGTH;
     memcpy(&protocols[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH);
     cur += ALPN_HTTP_1_1_LENGTH;
-    infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+    infof(data, "ALPN, offering %s", ALPN_HTTP_1_1);
 
     /* expects length prefixed preference ordered list of protocols in wire
      * format
      */
-    SSL_CTX_set_alpn_protos(backend->ctx, protocols, cur);
+    if(SSL_CTX_set_alpn_protos(backend->ctx, protocols, cur)) {
+      failf(data, "Error setting ALPN");
+      return CURLE_SSL_CONNECT_ERROR;
+    }
   }
 #endif
 
   if(ssl_cert || ssl_cert_blob || ssl_cert_type) {
-    BIO *ssl_cert_bio = NULL;
-    BIO *ssl_key_bio = NULL;
-    int result_cert_stuff;
-    if(ssl_cert_blob) {
-      /* the typecast of blob->len is fine since it is guaranteed to never be
-         larger than CURL_MAX_INPUT_LENGTH */
-      ssl_cert_bio = BIO_new_mem_buf(ssl_cert_blob->data,
-                                     (int)ssl_cert_blob->len);
-      if(!ssl_cert_bio)
-        return CURLE_SSL_CERTPROBLEM;
-    }
-    if(SSL_SET_OPTION(key_blob)) {
-      ssl_key_bio = BIO_new_mem_buf(SSL_SET_OPTION(key_blob)->data,
-                                    (int)SSL_SET_OPTION(key_blob)->len);
-      if(!ssl_key_bio)
-        return CURLE_SSL_CERTPROBLEM;
-    }
-    result_cert_stuff = cert_stuff(conn, backend->ctx,
-                   ssl_cert, ssl_cert_bio, ssl_cert_type,
-                   SSL_SET_OPTION(key), ssl_key_bio,
-                   SSL_SET_OPTION(key_type), SSL_SET_OPTION(key_passwd));
-    if(ssl_cert_bio)
-      BIO_free(ssl_cert_bio);
-    if(ssl_key_bio)
-      BIO_free(ssl_key_bio);
-    if(!result_cert_stuff) {
+    if(!result &&
+       !cert_stuff(data, backend->ctx,
+                   ssl_cert, ssl_cert_blob, ssl_cert_type,
+                   SSL_SET_OPTION(key), SSL_SET_OPTION(key_blob),
+                   SSL_SET_OPTION(key_type), SSL_SET_OPTION(key_passwd)))
+      result = CURLE_SSL_CERTPROBLEM;
+    if(result)
       /* failf() is already done in cert_stuff() */
-      return CURLE_SSL_CERTPROBLEM;
-    }
+      return result;
   }
 
   ciphers = SSL_CONN_CONFIG(cipher_list);
@@ -2764,7 +2832,7 @@
       failf(data, "failed setting cipher list: %s", ciphers);
       return CURLE_SSL_CIPHER;
     }
-    infof(data, "Cipher selection: %s\n", ciphers);
+    infof(data, "Cipher selection: %s", ciphers);
   }
 
 #ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
@@ -2775,7 +2843,7 @@
         failf(data, "failed setting TLS 1.3 cipher suite: %s", ciphers13);
         return CURLE_SSL_CIPHER;
       }
-      infof(data, "TLS 1.3 cipher selection: %s\n", ciphers13);
+      infof(data, "TLS 1.3 cipher selection: %s", ciphers13);
     }
   }
 #endif
@@ -2797,11 +2865,11 @@
   }
 #endif
 
-#ifdef HAVE_OPENSSL_SRP
+#ifdef USE_OPENSSL_SRP
   if(ssl_authtype == CURL_TLSAUTH_SRP) {
     char * const ssl_username = SSL_SET_OPTION(username);
 
-    infof(data, "Using TLS-SRP username: %s\n", ssl_username);
+    infof(data, "Using TLS-SRP username: %s", ssl_username);
 
     if(!SSL_CTX_set_srp_username(backend->ctx, ssl_username)) {
       failf(data, "Unable to set SRP user name");
@@ -2812,7 +2880,7 @@
       return CURLE_BAD_FUNCTION_ARGUMENT;
     }
     if(!SSL_CONN_CONFIG(cipher_list)) {
-      infof(data, "Setting cipher list SRP\n");
+      infof(data, "Setting cipher list SRP");
 
       if(!SSL_CTX_set_cipher_list(backend->ctx, "SRP")) {
         failf(data, "failed setting SRP cipher list");
@@ -2831,8 +2899,7 @@
   if((SSL_CONN_CONFIG(verifypeer) || SSL_CONN_CONFIG(verifyhost)) &&
      (SSL_SET_OPTION(native_ca_store))) {
     X509_STORE *store = SSL_CTX_get_cert_store(backend->ctx);
-    HCERTSTORE hStore = CertOpenSystemStore((HCRYPTPROV_LEGACY)NULL,
-                                            TEXT("ROOT"));
+    HCERTSTORE hStore = CertOpenSystemStore(0, TEXT("ROOT"));
 
     if(hStore) {
       PCCERT_CONTEXT pContext = NULL;
@@ -2866,7 +2933,7 @@
                                NULL, cert_name, sizeof(cert_name))) {
           strcpy(cert_name, "Unknown");
         }
-        infof(data, "SSL: Checking cert \"%s\"\n", cert_name);
+        infof(data, "SSL: Checking cert %s\"\n", cert_name);
 #endif
 
         encoded_cert = (const unsigned char *)pContext->pbCertEncoded;
@@ -2948,7 +3015,7 @@
            OpenSSL. */
         if(X509_STORE_add_cert(store, x509) == 1) {
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
-          infof(data, "SSL: Imported cert \"%s\"\n", cert_name);
+          infof(data, "SSL: Imported cert \"%s\"", cert_name);
 #endif
           imported_native_ca = true;
         }
@@ -2963,12 +3030,25 @@
         return result;
     }
     if(imported_native_ca)
-      infof(data, "successfully imported windows ca store\n");
+      infof(data, "successfully imported windows ca store");
     else
-      infof(data, "error importing windows ca store, continuing anyway\n");
+      infof(data, "error importing windows ca store, continuing anyway");
   }
 #endif
 
+  if(ca_info_blob) {
+    result = load_cacert_from_memory(backend->ctx, ca_info_blob);
+    if(result) {
+      if(result == CURLE_OUT_OF_MEMORY ||
+         (verifypeer && !imported_native_ca)) {
+        failf(data, "error importing CA certificate blob");
+        return result;
+      }
+      /* Only warning if no certificate verification is required. */
+      infof(data, "error importing CA certificate blob, continuing anyway");
+    }
+  }
+
 #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
   /* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
   {
@@ -2980,9 +3060,9 @@
           return CURLE_SSL_CACERT_BADFILE;
         }
         /* Continue with a warning if no certificate verif is required. */
-        infof(data, "error setting certificate file, continuing anyway\n");
+        infof(data, "error setting certificate file, continuing anyway");
       }
-      infof(data, " CAfile: %s\n", ssl_cafile);
+      infof(data, " CAfile: %s", ssl_cafile);
     }
     if(ssl_capath) {
       if(!SSL_CTX_load_verify_dir(backend->ctx, ssl_capath)) {
@@ -2992,9 +3072,9 @@
           return CURLE_SSL_CACERT_BADFILE;
         }
         /* Continue with a warning if no certificate verif is required. */
-        infof(data, "error setting certificate path, continuing anyway\n");
+        infof(data, "error setting certificate path, continuing anyway");
       }
-      infof(data, " CApath: %s\n", ssl_capath);
+      infof(data, " CApath: %s", ssl_capath);
     }
   }
 #else
@@ -3013,19 +3093,20 @@
       /* Just continue with a warning if no strict certificate verification
          is required. */
       infof(data, "error setting certificate verify locations,"
-            " continuing anyway:\n");
+            " continuing anyway:");
     }
     else {
       /* Everything is fine. */
-      infof(data, "successfully set certificate verify locations:\n");
+      infof(data, "successfully set certificate verify locations:");
     }
-    infof(data, " CAfile: %s\n", ssl_cafile ? ssl_cafile : "none");
-    infof(data, " CApath: %s\n", ssl_capath ? ssl_capath : "none");
+    infof(data, " CAfile: %s", ssl_cafile ? ssl_cafile : "none");
+    infof(data, " CApath: %s", ssl_capath ? ssl_capath : "none");
   }
 #endif
 
 #ifdef CURL_CA_FALLBACK
-  if(verifypeer && !ssl_cafile && !ssl_capath && !imported_native_ca) {
+  if(verifypeer &&
+     !ca_info_blob && !ssl_cafile && !ssl_capath && !imported_native_ca) {
     /* verifying the peer without any CA certificates won't
        work so use openssl's built in default as fallback */
     SSL_CTX_set_default_verify_paths(backend->ctx);
@@ -3043,11 +3124,11 @@
       return CURLE_SSL_CRL_BADFILE;
     }
     /* Everything is fine. */
-    infof(data, "successfully load CRL file:\n");
+    infof(data, "successfully load CRL file:");
     X509_STORE_set_flags(SSL_CTX_get_cert_store(backend->ctx),
                          X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
 
-    infof(data, "  CRLfile: %s\n", ssl_crlfile);
+    infof(data, "  CRLfile: %s", ssl_crlfile);
   }
 
   if(verifypeer) {
@@ -3138,40 +3219,40 @@
 #ifdef ENABLE_IPV6
      (0 == Curl_inet_pton(AF_INET6, hostname, &addr)) &&
 #endif
-     sni &&
-     !SSL_set_tlsext_host_name(backend->handle, hostname))
-    infof(data, "WARNING: failed to configure server name indication (SNI) "
-          "TLS extension\n");
+     sni) {
+    size_t nlen = strlen(hostname);
+    if((long)nlen >= data->set.buffer_size)
+      /* this is seriously messed up */
+      return CURLE_SSL_CONNECT_ERROR;
+
+    /* RFC 6066 section 3 says the SNI field is case insensitive, but browsers
+       send the data lowercase and subsequently there are now numerous servers
+       out there that don't work unless the name is lowercased */
+    Curl_strntolower(data->state.buffer, hostname, nlen);
+    data->state.buffer[nlen] = 0;
+    if(!SSL_set_tlsext_host_name(backend->handle, data->state.buffer))
+      infof(data, "WARNING: failed to configure server name indication (SNI) "
+            "TLS extension");
+  }
 #endif
 
-  /* Check if there's a cached ID we can/should use here! */
-  if(SSL_SET_OPTION(primary.sessionid)) {
-    void *ssl_sessionid = NULL;
-    int connectdata_idx = ossl_get_ssl_conn_index();
-    int sockindex_idx = ossl_get_ssl_sockindex_index();
+  ossl_associate_connection(data, conn, sockindex);
 
-    if(connectdata_idx >= 0 && sockindex_idx >= 0) {
-      /* Store the data needed for the "new session" callback.
-       * The sockindex is stored as a pointer to an array element. */
-      SSL_set_ex_data(backend->handle, connectdata_idx, conn);
-      SSL_set_ex_data(backend->handle, sockindex_idx, conn->sock + sockindex);
+  Curl_ssl_sessionid_lock(data);
+  if(!Curl_ssl_getsessionid(data, conn, SSL_IS_PROXY() ? TRUE : FALSE,
+                            &ssl_sessionid, NULL, sockindex)) {
+    /* we got a session id, use it! */
+    if(!SSL_set_session(backend->handle, ssl_sessionid)) {
+      Curl_ssl_sessionid_unlock(data);
+      failf(data, "SSL: SSL_set_session failed: %s",
+            ossl_strerror(ERR_get_error(), error_buffer,
+                          sizeof(error_buffer)));
+      return CURLE_SSL_CONNECT_ERROR;
     }
-
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) {
-      /* we got a session id, use it! */
-      if(!SSL_set_session(backend->handle, ssl_sessionid)) {
-        Curl_ssl_sessionid_unlock(conn);
-        failf(data, "SSL: SSL_set_session failed: %s",
-              ossl_strerror(ERR_get_error(), error_buffer,
-                            sizeof(error_buffer)));
-        return CURLE_SSL_CONNECT_ERROR;
-      }
-      /* Informational message */
-      infof(data, "SSL re-using session ID\n");
-    }
-    Curl_ssl_sessionid_unlock(conn);
+    /* Informational message */
+    infof(data, "SSL re-using session ID");
   }
+  Curl_ssl_sessionid_unlock(data);
 
 #ifndef CURL_DISABLE_PROXY
   if(conn->proxy_ssl[sockindex].use) {
@@ -3197,9 +3278,9 @@
   return CURLE_OK;
 }
 
-static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)
+static CURLcode ossl_connect_step2(struct Curl_easy *data,
+                                   struct connectdata *conn, int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   int err;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
@@ -3276,6 +3357,19 @@
              error_buffer */
           strcpy(error_buffer, "SSL certificate verification failed");
       }
+#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && \
+    !defined(LIBRESSL_VERSION_NUMBER) && \
+    !defined(OPENSSL_IS_BORINGSSL))
+      /* SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED is only available on
+         OpenSSL version above v1.1.1, not Libre SSL nor BoringSSL */
+      else if((lib == ERR_LIB_SSL) &&
+              (reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
+          /* If client certificate is required, communicate the
+             error to client */
+          result = CURLE_SSL_CLIENTCERT;
+          ossl_strerror(errdetail, error_buffer, sizeof(error_buffer));
+      }
+#endif
       else {
         result = CURLE_SSL_CONNECT_ERROR;
         ossl_strerror(errdetail, error_buffer, sizeof(error_buffer));
@@ -3289,11 +3383,7 @@
        */
       if(CURLE_SSL_CONNECT_ERROR == result && errdetail == 0) {
         const char * const hostname = SSL_HOST_NAME();
-#ifndef CURL_DISABLE_PROXY
-        const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
-#else
-        const long int port = conn->remote_port;
-#endif
+        const long int port = SSL_HOST_PORT();
         char extramsg[80]="";
         int sockerr = SOCKERRNO;
         if(sockerr && detail == SSL_ERROR_SYSCALL)
@@ -3315,8 +3405,8 @@
     connssl->connecting_state = ssl_connect_3;
 
     /* Informational message */
-    infof(data, "SSL connection using %s / %s\n",
-          get_ssl_version_txt(backend->handle),
+    infof(data, "SSL connection using %s / %s",
+          SSL_get_version(backend->handle),
           SSL_get_cipher(backend->handle));
 
 #ifdef HAS_ALPN
@@ -3327,12 +3417,12 @@
       const unsigned char *neg_protocol;
       unsigned int len;
       SSL_get0_alpn_selected(backend->handle, &neg_protocol, &len);
-      if(len != 0) {
-        infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol);
+      if(len) {
+        infof(data, "ALPN, server accepted to use %.*s", len, neg_protocol);
 
-#ifdef USE_NGHTTP2
-        if(len == NGHTTP2_PROTO_VERSION_ID_LEN &&
-           !memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len)) {
+#ifdef USE_HTTP2
+        if(len == ALPN_H2_LENGTH &&
+           !memcmp(ALPN_H2, neg_protocol, len)) {
           conn->negnpn = CURL_HTTP_VERSION_2;
         }
         else
@@ -3343,9 +3433,9 @@
         }
       }
       else
-        infof(data, "ALPN, server did not agree to a protocol\n");
+        infof(data, "ALPN, server did not agree to a protocol");
 
-      Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+      Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                           BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
     }
 #endif
@@ -3451,14 +3541,18 @@
 typedef int numcert_t;
 #endif
 
-static CURLcode get_cert_chain(struct connectdata *conn,
-                               struct ssl_connect_data *connssl)
+#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
+#define OSSL3_CONST const
+#else
+#define OSSL3_CONST
+#endif
 
+static CURLcode get_cert_chain(struct Curl_easy *data,
+                               struct ssl_connect_data *connssl)
 {
   CURLcode result;
   STACK_OF(X509) *sk;
   int i;
-  struct Curl_easy *data = conn->data;
   numcert_t numcerts;
   BIO *mem;
   struct ssl_backend_data *backend = connssl->backend;
@@ -3549,7 +3643,7 @@
 
     pubkey = X509_get_pubkey(x);
     if(!pubkey)
-      infof(data, "   Unable to load public key\n");
+      infof(data, "   Unable to load public key");
     else {
       int pktype;
 #ifdef HAVE_OPAQUE_EVP_PKEY
@@ -3560,7 +3654,7 @@
       switch(pktype) {
       case EVP_PKEY_RSA:
       {
-        RSA *rsa;
+        OSSL3_CONST RSA *rsa;
 #ifdef HAVE_OPAQUE_EVP_PKEY
         rsa = EVP_PKEY_get0_RSA(pubkey);
 #else
@@ -3590,7 +3684,7 @@
       case EVP_PKEY_DSA:
       {
 #ifndef OPENSSL_NO_DSA
-        DSA *dsa;
+        OSSL3_CONST DSA *dsa;
 #ifdef HAVE_OPAQUE_EVP_PKEY
         dsa = EVP_PKEY_get0_DSA(pubkey);
 #else
@@ -3622,7 +3716,7 @@
       }
       case EVP_PKEY_DH:
       {
-        DH *dh;
+        OSSL3_CONST DH *dh;
 #ifdef HAVE_OPAQUE_EVP_PKEY
         dh = EVP_PKEY_get0_DH(pubkey);
 #else
@@ -3733,14 +3827,14 @@
  * We check certificates to authenticate the server; otherwise we risk
  * man-in-the-middle attack.
  */
-static CURLcode servercert(struct connectdata *conn,
+static CURLcode servercert(struct Curl_easy *data,
+                           struct connectdata *conn,
                            struct ssl_connect_data *connssl,
                            bool strict)
 {
   CURLcode result = CURLE_OK;
   int rc;
   long lerr;
-  struct Curl_easy *data = conn->data;
   X509 *issuer;
   BIO *fp = NULL;
   char error_buffer[256]="";
@@ -3751,7 +3845,7 @@
 
   if(data->set.ssl.certinfo)
     /* we've been asked to gather certificate info! */
-    (void)get_cert_chain(conn, connssl);
+    (void)get_cert_chain(data, connssl);
 
   backend->server_cert = SSL_get_peer_certificate(backend->handle);
   if(!backend->server_cert) {
@@ -3763,23 +3857,23 @@
     return CURLE_PEER_FAILED_VERIFICATION;
   }
 
-  infof(data, "%s certificate:\n", SSL_IS_PROXY() ? "Proxy" : "Server");
+  infof(data, "%s certificate:", SSL_IS_PROXY() ? "Proxy" : "Server");
 
   rc = x509_name_oneline(X509_get_subject_name(backend->server_cert),
                          buffer, sizeof(buffer));
-  infof(data, " subject: %s\n", rc?"[NONE]":buffer);
+  infof(data, " subject: %s", rc?"[NONE]":buffer);
 
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
   {
     long len;
     ASN1_TIME_print(mem, X509_get0_notBefore(backend->server_cert));
     len = BIO_get_mem_data(mem, (char **) &ptr);
-    infof(data, " start date: %.*s\n", len, ptr);
+    infof(data, " start date: %.*s", (int)len, ptr);
     (void)BIO_reset(mem);
 
     ASN1_TIME_print(mem, X509_get0_notAfter(backend->server_cert));
     len = BIO_get_mem_data(mem, (char **) &ptr);
-    infof(data, " expire date: %.*s\n", len, ptr);
+    infof(data, " expire date: %.*s", (int)len, ptr);
     (void)BIO_reset(mem);
   }
 #endif
@@ -3787,7 +3881,7 @@
   BIO_free(mem);
 
   if(SSL_CONN_CONFIG(verifyhost)) {
-    result = verifyhost(conn, backend->server_cert);
+    result = verifyhost(data, conn, backend->server_cert);
     if(result) {
       X509_free(backend->server_cert);
       backend->server_cert = NULL;
@@ -3803,19 +3897,19 @@
     result = CURLE_PEER_FAILED_VERIFICATION;
   }
   else {
-    infof(data, " issuer: %s\n", buffer);
+    infof(data, " issuer: %s", buffer);
 
     /* We could do all sorts of certificate verification stuff here before
        deallocating the certificate. */
 
     /* e.g. match issuer name with provided issuer certificate */
-    if(SSL_SET_OPTION(issuercert) || SSL_SET_OPTION(issuercert_blob)) {
-      if(SSL_SET_OPTION(issuercert_blob))
-        fp = BIO_new_mem_buf(SSL_SET_OPTION(issuercert_blob)->data,
-                             (int)SSL_SET_OPTION(issuercert_blob)->len);
+    if(SSL_CONN_CONFIG(issuercert) || SSL_CONN_CONFIG(issuercert_blob)) {
+      if(SSL_CONN_CONFIG(issuercert_blob))
+        fp = BIO_new_mem_buf(SSL_CONN_CONFIG(issuercert_blob)->data,
+                             (int)SSL_CONN_CONFIG(issuercert_blob)->len);
       else {
         fp = BIO_new(BIO_s_file());
-        if(fp == NULL) {
+        if(!fp) {
           failf(data,
                 "BIO_new return NULL, " OSSL_PACKAGE
                 " error %s",
@@ -3826,10 +3920,10 @@
           return CURLE_OUT_OF_MEMORY;
         }
 
-        if(BIO_read_filename(fp, SSL_SET_OPTION(issuercert)) <= 0) {
+        if(BIO_read_filename(fp, SSL_CONN_CONFIG(issuercert)) <= 0) {
           if(strict)
             failf(data, "SSL: Unable to open issuer cert (%s)",
-                  SSL_SET_OPTION(issuercert));
+                  SSL_CONN_CONFIG(issuercert));
           BIO_free(fp);
           X509_free(backend->server_cert);
           backend->server_cert = NULL;
@@ -3841,7 +3935,7 @@
       if(!issuer) {
         if(strict)
           failf(data, "SSL: Unable to read issuer cert (%s)",
-                SSL_SET_OPTION(issuercert));
+                SSL_CONN_CONFIG(issuercert));
         BIO_free(fp);
         X509_free(issuer);
         X509_free(backend->server_cert);
@@ -3852,7 +3946,7 @@
       if(X509_check_issued(issuer, backend->server_cert) != X509_V_OK) {
         if(strict)
           failf(data, "SSL: Certificate issuer check failed (%s)",
-                SSL_SET_OPTION(issuercert));
+                SSL_CONN_CONFIG(issuercert));
         BIO_free(fp);
         X509_free(issuer);
         X509_free(backend->server_cert);
@@ -3860,8 +3954,8 @@
         return CURLE_SSL_ISSUER_ERROR;
       }
 
-      infof(data, " SSL certificate issuer check ok (%s)\n",
-            SSL_SET_OPTION(issuercert));
+      infof(data, " SSL certificate issuer check ok (%s)",
+            SSL_CONN_CONFIG(issuercert));
       BIO_free(fp);
       X509_free(issuer);
     }
@@ -3879,17 +3973,17 @@
       }
       else
         infof(data, " SSL certificate verify result: %s (%ld),"
-              " continuing anyway.\n",
+              " continuing anyway.",
               X509_verify_cert_error_string(lerr), lerr);
     }
     else
-      infof(data, " SSL certificate verify ok.\n");
+      infof(data, " SSL certificate verify ok.");
   }
 
 #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
     !defined(OPENSSL_NO_OCSP)
   if(SSL_CONN_CONFIG(verifystatus)) {
-    result = verifystatus(conn, connssl);
+    result = verifystatus(data, connssl);
     if(result) {
       X509_free(backend->server_cert);
       backend->server_cert = NULL;
@@ -3902,8 +3996,7 @@
     /* when not strict, we don't bother about the verify cert problems */
     result = CURLE_OK;
 
-  ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
-                         data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
+  ptr = SSL_PINNED_PUB_KEY();
   if(!result && ptr) {
     result = pkp_pin_peer_pubkey(data, backend->server_cert, ptr);
     if(result)
@@ -3917,7 +4010,8 @@
   return result;
 }
 
-static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex)
+static CURLcode ossl_connect_step3(struct Curl_easy *data,
+                                   struct connectdata *conn, int sockindex)
 {
   CURLcode result = CURLE_OK;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
@@ -3931,8 +4025,8 @@
    * operations.
    */
 
-  result = servercert(conn, connssl, (SSL_CONN_CONFIG(verifypeer) ||
-                                      SSL_CONN_CONFIG(verifyhost)));
+  result = servercert(data, conn, connssl, (SSL_CONN_CONFIG(verifypeer) ||
+                                            SSL_CONN_CONFIG(verifyhost)));
 
   if(!result)
     connssl->connecting_state = ssl_connect_done;
@@ -3943,13 +4037,13 @@
 static Curl_recv ossl_recv;
 static Curl_send ossl_send;
 
-static CURLcode ossl_connect_common(struct connectdata *conn,
+static CURLcode ossl_connect_common(struct Curl_easy *data,
+                                    struct connectdata *conn,
                                     int sockindex,
                                     bool nonblocking,
                                     bool *done)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   int what;
@@ -3970,7 +4064,7 @@
       return CURLE_OPERATION_TIMEDOUT;
     }
 
-    result = ossl_connect_step1(conn, sockindex);
+    result = ossl_connect_step1(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -4022,7 +4116,7 @@
      * before step2 has completed while ensuring that a client using select()
      * or epoll() will always have a valid fdset to wait on.
      */
-    result = ossl_connect_step2(conn, sockindex);
+    result = ossl_connect_step2(data, conn, sockindex);
     if(result || (nonblocking &&
                   (ssl_connect_2 == connssl->connecting_state ||
                    ssl_connect_2_reading == connssl->connecting_state ||
@@ -4032,7 +4126,7 @@
   } /* repeat step2 until all transactions are done. */
 
   if(ssl_connect_3 == connssl->connecting_state) {
-    result = ossl_connect_step3(conn, sockindex);
+    result = ossl_connect_step3(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -4052,19 +4146,21 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
-                                              int sockindex,
-                                              bool *done)
+static CURLcode ossl_connect_nonblocking(struct Curl_easy *data,
+                                         struct connectdata *conn,
+                                         int sockindex,
+                                         bool *done)
 {
-  return ossl_connect_common(conn, sockindex, TRUE, done);
+  return ossl_connect_common(data, conn, sockindex, TRUE, done);
 }
 
-static CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex)
+static CURLcode ossl_connect(struct Curl_easy *data, struct connectdata *conn,
+                             int sockindex)
 {
   CURLcode result;
   bool done = FALSE;
 
-  result = ossl_connect_common(conn, sockindex, FALSE, &done);
+  result = ossl_connect_common(data, conn, sockindex, FALSE, &done);
   if(result)
     return result;
 
@@ -4073,8 +4169,8 @@
   return CURLE_OK;
 }
 
-static bool Curl_ossl_data_pending(const struct connectdata *conn,
-                                   int connindex)
+static bool ossl_data_pending(const struct connectdata *conn,
+                              int connindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[connindex];
   if(connssl->backend->handle && SSL_pending(connssl->backend->handle))
@@ -4089,9 +4185,9 @@
   return FALSE;
 }
 
-static size_t Curl_ossl_version(char *buffer, size_t size);
+static size_t ossl_version(char *buffer, size_t size);
 
-static ssize_t ossl_send(struct connectdata *conn,
+static ssize_t ossl_send(struct Curl_easy *data,
                          int sockindex,
                          const void *mem,
                          size_t len,
@@ -4104,12 +4200,14 @@
   unsigned long sslerror;
   int memlen;
   int rc;
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
 
   ERR_clear_error();
 
   memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
+  set_logger(conn, data);
   rc = SSL_write(backend->handle, mem, memlen);
 
   if(rc <= 0) {
@@ -4135,7 +4233,7 @@
           strncpy(error_buffer, SSL_ERROR_to_str(err), sizeof(error_buffer));
           error_buffer[sizeof(error_buffer) - 1] = '\0';
         }
-        failf(conn->data, OSSL_PACKAGE " SSL_write: %s, errno %d",
+        failf(data, OSSL_PACKAGE " SSL_write: %s, errno %d",
               error_buffer, sockerr);
         *curlcode = CURLE_SEND_ERROR;
         return -1;
@@ -4152,18 +4250,17 @@
 #endif
         ) {
         char ver[120];
-        Curl_ossl_version(ver, 120);
-        failf(conn->data, "Error: %s does not support double SSL tunneling.",
-              ver);
+        (void)ossl_version(ver, sizeof(ver));
+        failf(data, "Error: %s does not support double SSL tunneling.", ver);
       }
       else
-        failf(conn->data, "SSL_write() error: %s",
+        failf(data, "SSL_write() error: %s",
               ossl_strerror(sslerror, error_buffer, sizeof(error_buffer)));
       *curlcode = CURLE_SEND_ERROR;
       return -1;
     }
     /* a true error */
-    failf(conn->data, OSSL_PACKAGE " SSL_write: %s, errno %d",
+    failf(data, OSSL_PACKAGE " SSL_write: %s, errno %d",
           SSL_ERROR_to_str(err), SOCKERRNO);
     *curlcode = CURLE_SEND_ERROR;
     return -1;
@@ -4172,7 +4269,7 @@
   return (ssize_t)rc; /* number of bytes */
 }
 
-static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
+static ssize_t ossl_recv(struct Curl_easy *data,   /* transfer */
                          int num,                  /* socketindex */
                          char *buf,                /* store read data here */
                          size_t buffersize,        /* max amount to read */
@@ -4182,12 +4279,14 @@
   unsigned long sslerror;
   ssize_t nread;
   int buffsize;
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
   struct ssl_backend_data *backend = connssl->backend;
 
   ERR_clear_error();
 
   buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
+  set_logger(conn, data);
   nread = (ssize_t)SSL_read(backend->handle, buf, buffsize);
   if(nread <= 0) {
     /* failed SSL_read */
@@ -4225,7 +4324,7 @@
           strncpy(error_buffer, SSL_ERROR_to_str(err), sizeof(error_buffer));
           error_buffer[sizeof(error_buffer) - 1] = '\0';
         }
-        failf(conn->data, OSSL_PACKAGE " SSL_read: %s, errno %d",
+        failf(data, OSSL_PACKAGE " SSL_read: %s, errno %d",
               error_buffer, sockerr);
         *curlcode = CURLE_RECV_ERROR;
         return -1;
@@ -4247,7 +4346,7 @@
           msnprintf(error_buffer, sizeof(error_buffer),
                     "Connection closed abruptly");
         }
-        failf(conn->data, OSSL_PACKAGE " SSL_read: %s, errno %d"
+        failf(data, OSSL_PACKAGE " SSL_read: %s, errno %d"
               " (Fatal because this is a curl debug build)",
               error_buffer, sockerr);
         *curlcode = CURLE_RECV_ERROR;
@@ -4259,7 +4358,7 @@
   return nread;
 }
 
-static size_t Curl_ossl_version(char *buffer, size_t size)
+static size_t ossl_version(char *buffer, size_t size)
 {
 #ifdef LIBRESSL_VERSION_NUMBER
 #if LIBRESSL_VERSION_NUMBER < 0x2070100fL
@@ -4330,12 +4429,12 @@
 }
 
 /* can be called with data == NULL */
-static CURLcode Curl_ossl_random(struct Curl_easy *data,
-                                 unsigned char *entropy, size_t length)
+static CURLcode ossl_random(struct Curl_easy *data,
+                            unsigned char *entropy, size_t length)
 {
   int rc;
   if(data) {
-    if(Curl_ossl_seed(data)) /* Initiate the seed if not already done */
+    if(ossl_seed(data)) /* Initiate the seed if not already done */
       return CURLE_FAILED_INIT; /* couldn't seed for some reason */
   }
   else {
@@ -4347,35 +4446,20 @@
   return (rc == 1 ? CURLE_OK : CURLE_FAILED_INIT);
 }
 
-static CURLcode Curl_ossl_md5sum(unsigned char *tmp, /* input */
-                                 size_t tmplen,
-                                 unsigned char *md5sum /* output */,
-                                 size_t unused)
-{
-  EVP_MD_CTX *mdctx;
-  unsigned int len = 0;
-  (void) unused;
-
-  mdctx = EVP_MD_CTX_create();
-  EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
-  EVP_DigestUpdate(mdctx, tmp, tmplen);
-  EVP_DigestFinal_ex(mdctx, md5sum, &len);
-  EVP_MD_CTX_destroy(mdctx);
-  return CURLE_OK;
-}
-
 #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
-static CURLcode Curl_ossl_sha256sum(const unsigned char *tmp, /* input */
-                                size_t tmplen,
-                                unsigned char *sha256sum /* output */,
-                                size_t unused)
+static CURLcode ossl_sha256sum(const unsigned char *tmp, /* input */
+                               size_t tmplen,
+                               unsigned char *sha256sum /* output */,
+                               size_t unused)
 {
   EVP_MD_CTX *mdctx;
   unsigned int len = 0;
   (void) unused;
 
   mdctx = EVP_MD_CTX_create();
-  EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL);
+  if(!mdctx)
+    return CURLE_OUT_OF_MEMORY;
+  EVP_DigestInit(mdctx, EVP_sha256());
   EVP_DigestUpdate(mdctx, tmp, tmplen);
   EVP_DigestFinal_ex(mdctx, sha256sum, &len);
   EVP_MD_CTX_destroy(mdctx);
@@ -4383,7 +4467,7 @@
 }
 #endif
 
-static bool Curl_ossl_cert_status_request(void)
+static bool ossl_cert_status_request(void)
 {
 #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
     !defined(OPENSSL_NO_OCSP)
@@ -4393,8 +4477,8 @@
 #endif
 }
 
-static void *Curl_ossl_get_internals(struct ssl_connect_data *connssl,
-                                     CURLINFO info)
+static void *ossl_get_internals(struct ssl_connect_data *connssl,
+                                CURLINFO info)
 {
   /* Legacy: CURLINFO_TLS_SESSION must return an SSL_CTX pointer. */
   struct ssl_backend_data *backend = connssl->backend;
@@ -4402,10 +4486,82 @@
          (void *)backend->ctx : (void *)backend->handle;
 }
 
+static void ossl_associate_connection(struct Curl_easy *data,
+                                      struct connectdata *conn,
+                                      int sockindex)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct ssl_backend_data *backend = connssl->backend;
+
+  /* If we don't have SSL context, do nothing. */
+  if(!backend->handle)
+    return;
+
+  if(SSL_SET_OPTION(primary.sessionid)) {
+    int data_idx = ossl_get_ssl_data_index();
+    int connectdata_idx = ossl_get_ssl_conn_index();
+    int sockindex_idx = ossl_get_ssl_sockindex_index();
+    int proxy_idx = ossl_get_proxy_index();
+
+    if(data_idx >= 0 && connectdata_idx >= 0 && sockindex_idx >= 0 &&
+       proxy_idx >= 0) {
+      /* Store the data needed for the "new session" callback.
+       * The sockindex is stored as a pointer to an array element. */
+      SSL_set_ex_data(backend->handle, data_idx, data);
+      SSL_set_ex_data(backend->handle, connectdata_idx, conn);
+      SSL_set_ex_data(backend->handle, sockindex_idx, conn->sock + sockindex);
+#ifndef CURL_DISABLE_PROXY
+      SSL_set_ex_data(backend->handle, proxy_idx, SSL_IS_PROXY() ? (void *) 1:
+                      NULL);
+#else
+      SSL_set_ex_data(backend->handle, proxy_idx, NULL);
+#endif
+    }
+  }
+}
+
+/*
+ * Starting with TLS 1.3, the ossl_new_session_cb callback gets called after
+ * the handshake. If the transfer that sets up the callback gets killed before
+ * this callback arrives, we must make sure to properly clear the data to
+ * avoid UAF problems. A future optimization could be to instead store another
+ * transfer that might still be using the same connection.
+ */
+
+static void ossl_disassociate_connection(struct Curl_easy *data,
+                                         int sockindex)
+{
+  struct connectdata *conn = data->conn;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct ssl_backend_data *backend = connssl->backend;
+
+  /* If we don't have SSL context, do nothing. */
+  if(!backend->handle)
+    return;
+
+  if(SSL_SET_OPTION(primary.sessionid)) {
+    int data_idx = ossl_get_ssl_data_index();
+    int connectdata_idx = ossl_get_ssl_conn_index();
+    int sockindex_idx = ossl_get_ssl_sockindex_index();
+    int proxy_idx = ossl_get_proxy_index();
+
+    if(data_idx >= 0 && connectdata_idx >= 0 && sockindex_idx >= 0 &&
+       proxy_idx >= 0) {
+      /* Disable references to data in "new session" callback to avoid
+       * accessing a stale pointer. */
+      SSL_set_ex_data(backend->handle, data_idx, NULL);
+      SSL_set_ex_data(backend->handle, connectdata_idx, NULL);
+      SSL_set_ex_data(backend->handle, sockindex_idx, NULL);
+      SSL_set_ex_data(backend->handle, proxy_idx, NULL);
+    }
+  }
+}
+
 const struct Curl_ssl Curl_ssl_openssl = {
   { CURLSSLBACKEND_OPENSSL, "openssl" }, /* info */
 
   SSLSUPP_CA_PATH |
+  SSLSUPP_CAINFO_BLOB |
   SSLSUPP_CERTINFO |
   SSLSUPP_PINNEDPUBKEY |
   SSLSUPP_SSL_CTX |
@@ -4416,30 +4572,32 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_ossl_init,                /* init */
-  Curl_ossl_cleanup,             /* cleanup */
-  Curl_ossl_version,             /* version */
-  Curl_ossl_check_cxn,           /* check_cxn */
-  Curl_ossl_shutdown,            /* shutdown */
-  Curl_ossl_data_pending,        /* data_pending */
-  Curl_ossl_random,              /* random */
-  Curl_ossl_cert_status_request, /* cert_status_request */
-  Curl_ossl_connect,             /* connect */
-  Curl_ossl_connect_nonblocking, /* connect_nonblocking */
-  Curl_ossl_get_internals,       /* get_internals */
-  Curl_ossl_close,               /* close_one */
-  Curl_ossl_close_all,           /* close_all */
-  Curl_ossl_session_free,        /* session_free */
-  Curl_ossl_set_engine,          /* set_engine */
-  Curl_ossl_set_engine_default,  /* set_engine_default */
-  Curl_ossl_engines_list,        /* engines_list */
-  Curl_none_false_start,         /* false_start */
-  Curl_ossl_md5sum,              /* md5sum */
+  ossl_init,                /* init */
+  ossl_cleanup,             /* cleanup */
+  ossl_version,             /* version */
+  ossl_check_cxn,           /* check_cxn */
+  ossl_shutdown,            /* shutdown */
+  ossl_data_pending,        /* data_pending */
+  ossl_random,              /* random */
+  ossl_cert_status_request, /* cert_status_request */
+  ossl_connect,             /* connect */
+  ossl_connect_nonblocking, /* connect_nonblocking */
+  Curl_ssl_getsock,         /* getsock */
+  ossl_get_internals,       /* get_internals */
+  ossl_close,               /* close_one */
+  ossl_close_all,           /* close_all */
+  ossl_session_free,        /* session_free */
+  ossl_set_engine,          /* set_engine */
+  ossl_set_engine_default,  /* set_engine_default */
+  ossl_engines_list,        /* engines_list */
+  Curl_none_false_start,    /* false_start */
 #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
-  Curl_ossl_sha256sum            /* sha256sum */
+  ossl_sha256sum,           /* sha256sum */
 #else
-  NULL                           /* sha256sum */
+  NULL,                     /* sha256sum */
 #endif
+  ossl_associate_connection, /* associate_connection */
+  ossl_disassociate_connection /* disassociate_connection */
 };
 
 #endif /* USE_OPENSSL */
diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h
index 114dc4b..2f6e1b2 100644
--- a/lib/vtls/openssl.h
+++ b/lib/vtls/openssl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/rustls.c b/lib/vtls/rustls.c
new file mode 100644
index 0000000..94a1ca8
--- /dev/null
+++ b/lib/vtls/rustls.c
@@ -0,0 +1,571 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020 - 2021, Jacob Hoffman-Andrews,
+ * <github@hoffman-andrews.com>
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curl_setup.h"
+
+#ifdef USE_RUSTLS
+
+#include "curl_printf.h"
+
+#include <errno.h>
+#include <crustls.h>
+
+#include "inet_pton.h"
+#include "urldata.h"
+#include "sendf.h"
+#include "vtls.h"
+#include "select.h"
+
+#include "multiif.h"
+
+struct ssl_backend_data
+{
+  const struct rustls_client_config *config;
+  struct rustls_connection *conn;
+  bool data_pending;
+};
+
+/* For a given rustls_result error code, return the best-matching CURLcode. */
+static CURLcode map_error(rustls_result r)
+{
+  if(rustls_result_is_cert_error(r)) {
+    return CURLE_PEER_FAILED_VERIFICATION;
+  }
+  switch(r) {
+    case RUSTLS_RESULT_OK:
+      return CURLE_OK;
+    case RUSTLS_RESULT_NULL_PARAMETER:
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+    default:
+      return CURLE_READ_ERROR;
+  }
+}
+
+static bool
+cr_data_pending(const struct connectdata *conn, int sockindex)
+{
+  const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct ssl_backend_data *backend = connssl->backend;
+  return backend->data_pending;
+}
+
+static CURLcode
+cr_connect(struct Curl_easy *data UNUSED_PARAM,
+                    struct connectdata *conn UNUSED_PARAM,
+                    int sockindex UNUSED_PARAM)
+{
+  infof(data, "rustls_connect: unimplemented");
+  return CURLE_SSL_CONNECT_ERROR;
+}
+
+static int
+read_cb(void *userdata, uint8_t *buf, uintptr_t len, uintptr_t *out_n)
+{
+  ssize_t n = sread(*(int *)userdata, buf, len);
+  if(n < 0) {
+    return SOCKERRNO;
+  }
+  *out_n = n;
+  return 0;
+}
+
+static int
+write_cb(void *userdata, const uint8_t *buf, uintptr_t len, uintptr_t *out_n)
+{
+  ssize_t n = swrite(*(int *)userdata, buf, len);
+  if(n < 0) {
+    return SOCKERRNO;
+  }
+  *out_n = n;
+  return 0;
+}
+
+/*
+ * On each run:
+ *  - Read a chunk of bytes from the socket into rustls' TLS input buffer.
+ *  - Tell rustls to process any new packets.
+ *  - Read out as many plaintext bytes from rustls as possible, until hitting
+ *    error, EOF, or EAGAIN/EWOULDBLOCK, or plainbuf/plainlen is filled up.
+ *
+ * It's okay to call this function with plainbuf == NULL and plainlen == 0.
+ * In that case, it will copy bytes from the socket into rustls' TLS input
+ * buffer, and process packets, but won't consume bytes from rustls' plaintext
+ * output buffer.
+ */
+static ssize_t
+cr_recv(struct Curl_easy *data, int sockindex,
+            char *plainbuf, size_t plainlen, CURLcode *err)
+{
+  struct connectdata *conn = data->conn;
+  struct ssl_connect_data *const connssl = &conn->ssl[sockindex];
+  struct ssl_backend_data *const backend = connssl->backend;
+  struct rustls_connection *const rconn = backend->conn;
+  size_t n = 0;
+  size_t tls_bytes_read = 0;
+  size_t plain_bytes_copied = 0;
+  rustls_result rresult = 0;
+  char errorbuf[255];
+  rustls_io_result io_error;
+
+  io_error = rustls_connection_read_tls(rconn, read_cb,
+    &conn->sock[sockindex], &tls_bytes_read);
+  if(io_error == EAGAIN || io_error == EWOULDBLOCK) {
+    infof(data, "sread: EAGAIN or EWOULDBLOCK");
+  }
+  else if(io_error) {
+    failf(data, "reading from socket: %s", strerror(io_error));
+    *err = CURLE_READ_ERROR;
+    return -1;
+  }
+  else if(tls_bytes_read == 0) {
+    failf(data, "connection closed without TLS close_notify alert");
+    *err = CURLE_READ_ERROR;
+    return -1;
+  }
+
+  infof(data, "cr_recv read %ld bytes from the network", tls_bytes_read);
+
+  rresult = rustls_connection_process_new_packets(rconn);
+  if(rresult != RUSTLS_RESULT_OK) {
+    rustls_error(rresult, errorbuf, sizeof(errorbuf), &n);
+    failf(data, "%.*s", n, errorbuf);
+    *err = map_error(rresult);
+    return -1;
+  }
+
+  backend->data_pending = TRUE;
+
+  while(plain_bytes_copied < plainlen) {
+    rresult = rustls_connection_read(rconn,
+      (uint8_t *)plainbuf + plain_bytes_copied,
+      plainlen - plain_bytes_copied,
+      &n);
+    if(rresult == RUSTLS_RESULT_ALERT_CLOSE_NOTIFY) {
+      *err = CURLE_OK;
+      return 0;
+    }
+    else if(rresult != RUSTLS_RESULT_OK) {
+      failf(data, "error in rustls_connection_read");
+      *err = CURLE_READ_ERROR;
+      return -1;
+    }
+    else if(n == 0) {
+      /* rustls returns 0 from connection_read to mean "all currently
+        available data has been read." If we bring in more ciphertext with
+        read_tls, more plaintext will become available. So don't tell curl
+        this is an EOF. Instead, say "come back later." */
+      infof(data, "cr_recv got 0 bytes of plaintext");
+      backend->data_pending = FALSE;
+      break;
+    }
+    else {
+      infof(data, "cr_recv copied out %ld bytes of plaintext", n);
+      plain_bytes_copied += n;
+    }
+  }
+
+  /* If we wrote out 0 plaintext bytes, it might just mean we haven't yet
+     read a full TLS record. Return CURLE_AGAIN so curl doesn't treat this
+     as EOF. */
+  if(plain_bytes_copied == 0) {
+    *err = CURLE_AGAIN;
+    return -1;
+  }
+
+  return plain_bytes_copied;
+}
+
+/*
+ * On each call:
+ *  - Copy `plainlen` bytes into rustls' plaintext input buffer (if > 0).
+ *  - Fully drain rustls' plaintext output buffer into the socket until
+ *    we get either an error or EAGAIN/EWOULDBLOCK.
+ *
+ * It's okay to call this function with plainbuf == NULL and plainlen == 0.
+ * In that case, it won't read anything into rustls' plaintext input buffer.
+ * It will only drain rustls' plaintext output buffer into the socket.
+ */
+static ssize_t
+cr_send(struct Curl_easy *data, int sockindex,
+        const void *plainbuf, size_t plainlen, CURLcode *err)
+{
+  struct connectdata *conn = data->conn;
+  struct ssl_connect_data *const connssl = &conn->ssl[sockindex];
+  struct ssl_backend_data *const backend = connssl->backend;
+  struct rustls_connection *const rconn = backend->conn;
+  size_t plainwritten = 0;
+  size_t tlswritten = 0;
+  size_t tlswritten_total = 0;
+  rustls_result rresult;
+  rustls_io_result io_error;
+
+  infof(data, "cr_send %ld bytes of plaintext", plainlen);
+
+  if(plainlen > 0) {
+    rresult = rustls_connection_write(rconn, plainbuf, plainlen,
+                                      &plainwritten);
+    if(rresult != RUSTLS_RESULT_OK) {
+      failf(data, "error in rustls_connection_write");
+      *err = CURLE_WRITE_ERROR;
+      return -1;
+    }
+    else if(plainwritten == 0) {
+      failf(data, "EOF in rustls_connection_write");
+      *err = CURLE_WRITE_ERROR;
+      return -1;
+    }
+  }
+
+  while(rustls_connection_wants_write(rconn)) {
+    io_error = rustls_connection_write_tls(rconn, write_cb,
+      &conn->sock[sockindex], &tlswritten);
+    if(io_error == EAGAIN || io_error == EWOULDBLOCK) {
+      infof(data, "swrite: EAGAIN after %ld bytes", tlswritten_total);
+      *err = CURLE_AGAIN;
+      return -1;
+    }
+    else if(io_error) {
+      failf(data, "writing to socket: %s", strerror(io_error));
+      *err = CURLE_WRITE_ERROR;
+      return -1;
+    }
+    if(tlswritten == 0) {
+      failf(data, "EOF in swrite");
+      *err = CURLE_WRITE_ERROR;
+      return -1;
+    }
+    infof(data, "cr_send wrote %ld bytes to network", tlswritten);
+    tlswritten_total += tlswritten;
+  }
+
+  return plainwritten;
+}
+
+/* A server certificate verify callback for rustls that always returns
+   RUSTLS_RESULT_OK, or in other words disable certificate verification. */
+static enum rustls_result
+cr_verify_none(void *userdata UNUSED_PARAM,
+               const rustls_verify_server_cert_params *params UNUSED_PARAM)
+{
+  return RUSTLS_RESULT_OK;
+}
+
+static bool
+cr_hostname_is_ip(const char *hostname)
+{
+  struct in_addr in;
+#ifdef ENABLE_IPV6
+  struct in6_addr in6;
+  if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0) {
+    return true;
+  }
+#endif /* ENABLE_IPV6 */
+  if(Curl_inet_pton(AF_INET, hostname, &in) > 0) {
+    return true;
+  }
+  return false;
+}
+
+static CURLcode
+cr_init_backend(struct Curl_easy *data, struct connectdata *conn,
+                struct ssl_backend_data *const backend)
+{
+  struct rustls_connection *rconn = backend->conn;
+  struct rustls_client_config_builder *config_builder = NULL;
+  const char *const ssl_cafile = SSL_CONN_CONFIG(CAfile);
+  const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
+  const char *hostname = conn->host.name;
+  char errorbuf[256];
+  size_t errorlen;
+  int result;
+  rustls_slice_bytes alpn[2] = {
+    { (const uint8_t *)ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH },
+    { (const uint8_t *)ALPN_H2, ALPN_H2_LENGTH },
+  };
+
+  config_builder = rustls_client_config_builder_new();
+#ifdef USE_HTTP2
+  infof(data, "offering ALPN for HTTP/1.1 and HTTP/2");
+  rustls_client_config_builder_set_protocols(config_builder, alpn, 2);
+#else
+  infof(data, "offering ALPN for HTTP/1.1 only");
+  rustls_client_config_builder_set_protocols(config_builder, alpn, 1);
+#endif
+  if(!verifypeer) {
+    rustls_client_config_builder_dangerous_set_certificate_verifier(
+      config_builder, cr_verify_none);
+    /* rustls doesn't support IP addresses (as of 0.19.0), and will reject
+     * connections created with an IP address, even when certificate
+     * verification is turned off. Set a placeholder hostname and disable
+     * SNI. */
+    if(cr_hostname_is_ip(hostname)) {
+      rustls_client_config_builder_set_enable_sni(config_builder, false);
+      hostname = "example.invalid";
+    }
+  }
+  else if(ssl_cafile) {
+    result = rustls_client_config_builder_load_roots_from_file(
+      config_builder, ssl_cafile);
+    if(result != RUSTLS_RESULT_OK) {
+      failf(data, "failed to load trusted certificates");
+      rustls_client_config_free(
+        rustls_client_config_builder_build(config_builder));
+      return CURLE_SSL_CACERT_BADFILE;
+    }
+  }
+
+  backend->config = rustls_client_config_builder_build(config_builder);
+  DEBUGASSERT(rconn == NULL);
+  result = rustls_client_connection_new(backend->config, hostname, &rconn);
+  if(result != RUSTLS_RESULT_OK) {
+    rustls_error(result, errorbuf, sizeof(errorbuf), &errorlen);
+    failf(data, "rustls_client_connection_new: %.*s", errorlen, errorbuf);
+    return CURLE_COULDNT_CONNECT;
+  }
+  rustls_connection_set_userdata(rconn, backend);
+  backend->conn = rconn;
+  return CURLE_OK;
+}
+
+static void
+cr_set_negotiated_alpn(struct Curl_easy *data, struct connectdata *conn,
+  const struct rustls_connection *rconn)
+{
+  const uint8_t *protocol = NULL;
+  size_t len = 0;
+
+  rustls_connection_get_alpn_protocol(rconn, &protocol, &len);
+  if(NULL == protocol) {
+    infof(data, "ALPN, server did not agree to a protocol");
+    return;
+  }
+
+#ifdef USE_HTTP2
+  if(len == ALPN_H2_LENGTH && 0 == memcmp(ALPN_H2, protocol, len)) {
+    infof(data, "ALPN, negotiated h2");
+    conn->negnpn = CURL_HTTP_VERSION_2;
+  }
+  else
+#endif
+  if(len == ALPN_HTTP_1_1_LENGTH &&
+      0 == memcmp(ALPN_HTTP_1_1, protocol, len)) {
+    infof(data, "ALPN, negotiated http/1.1");
+    conn->negnpn = CURL_HTTP_VERSION_1_1;
+  }
+  else {
+    infof(data, "ALPN, negotiated an unrecognized protocol");
+  }
+
+  Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
+                      BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
+}
+
+static CURLcode
+cr_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex, bool *done)
+{
+  struct ssl_connect_data *const connssl = &conn->ssl[sockindex];
+  curl_socket_t sockfd = conn->sock[sockindex];
+  struct ssl_backend_data *const backend = connssl->backend;
+  struct rustls_connection *rconn = NULL;
+  CURLcode tmperr = CURLE_OK;
+  int result;
+  int what;
+  bool wants_read;
+  bool wants_write;
+  curl_socket_t writefd;
+  curl_socket_t readfd;
+
+  if(ssl_connection_none == connssl->state) {
+    result = cr_init_backend(data, conn, connssl->backend);
+    if(result != CURLE_OK) {
+      return result;
+    }
+    connssl->state = ssl_connection_negotiating;
+  }
+
+  rconn = backend->conn;
+
+  /* Read/write data until the handshake is done or the socket would block. */
+  for(;;) {
+    /*
+    * Connection has been established according to rustls. Set send/recv
+    * handlers, and update the state machine.
+    * This check has to come last because is_handshaking starts out false,
+    * then becomes true when we first write data, then becomes false again
+    * once the handshake is done.
+    */
+    if(!rustls_connection_is_handshaking(rconn)) {
+      infof(data, "Done handshaking");
+      /* Done with the handshake. Set up callbacks to send/receive data. */
+      connssl->state = ssl_connection_complete;
+
+      cr_set_negotiated_alpn(data, conn, rconn);
+
+      conn->recv[sockindex] = cr_recv;
+      conn->send[sockindex] = cr_send;
+      *done = TRUE;
+      return CURLE_OK;
+    }
+
+    wants_read = rustls_connection_wants_read(rconn);
+    wants_write = rustls_connection_wants_write(rconn);
+    DEBUGASSERT(wants_read || wants_write);
+    writefd = wants_write?sockfd:CURL_SOCKET_BAD;
+    readfd = wants_read?sockfd:CURL_SOCKET_BAD;
+
+    what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, 0);
+    if(what < 0) {
+      /* fatal error */
+      failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+    if(0 == what) {
+      infof(data, "Curl_socket_check: %s would block",
+            wants_read&&wants_write ? "writing and reading" :
+            wants_write ? "writing" : "reading");
+      *done = FALSE;
+      return CURLE_OK;
+    }
+    /* socket is readable or writable */
+
+    if(wants_write) {
+      infof(data, "rustls_connection wants us to write_tls.");
+      cr_send(data, sockindex, NULL, 0, &tmperr);
+      if(tmperr == CURLE_AGAIN) {
+        infof(data, "writing would block");
+        /* fall through */
+      }
+      else if(tmperr != CURLE_OK) {
+        return tmperr;
+      }
+    }
+
+    if(wants_read) {
+      infof(data, "rustls_connection wants us to read_tls.");
+
+      cr_recv(data, sockindex, NULL, 0, &tmperr);
+      if(tmperr == CURLE_AGAIN) {
+        infof(data, "reading would block");
+        /* fall through */
+      }
+      else if(tmperr != CURLE_OK) {
+        if(tmperr == CURLE_READ_ERROR) {
+          return CURLE_SSL_CONNECT_ERROR;
+        }
+        else {
+          return tmperr;
+        }
+      }
+    }
+  }
+
+  /* We should never fall through the loop. We should return either because
+     the handshake is done or because we can't read/write without blocking. */
+  DEBUGASSERT(false);
+}
+
+/* returns a bitmap of flags for this connection's first socket indicating
+   whether we want to read or write */
+static int
+cr_getsock(struct connectdata *conn, curl_socket_t *socks)
+{
+  struct ssl_connect_data *const connssl = &conn->ssl[FIRSTSOCKET];
+  curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
+  struct ssl_backend_data *const backend = connssl->backend;
+  struct rustls_connection *rconn = backend->conn;
+
+  if(rustls_connection_wants_write(rconn)) {
+    socks[0] = sockfd;
+    return GETSOCK_WRITESOCK(0);
+  }
+  if(rustls_connection_wants_read(rconn)) {
+    socks[0] = sockfd;
+    return GETSOCK_READSOCK(0);
+  }
+
+  return GETSOCK_BLANK;
+}
+
+static void *
+cr_get_internals(struct ssl_connect_data *connssl,
+                 CURLINFO info UNUSED_PARAM)
+{
+  struct ssl_backend_data *backend = connssl->backend;
+  return &backend->conn;
+}
+
+static void
+cr_close(struct Curl_easy *data, struct connectdata *conn,
+         int sockindex)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct ssl_backend_data *backend = connssl->backend;
+  CURLcode tmperr = CURLE_OK;
+  ssize_t n = 0;
+
+  if(backend->conn) {
+    rustls_connection_send_close_notify(backend->conn);
+    n = cr_send(data, sockindex, NULL, 0, &tmperr);
+    if(n < 0) {
+      failf(data, "error sending close notify: %d", tmperr);
+    }
+
+    rustls_connection_free(backend->conn);
+    backend->conn = NULL;
+  }
+  if(backend->config) {
+    rustls_client_config_free(backend->config);
+    backend->config = NULL;
+  }
+}
+
+const struct Curl_ssl Curl_ssl_rustls = {
+  { CURLSSLBACKEND_RUSTLS, "rustls" },
+  SSLSUPP_TLS13_CIPHERSUITES,      /* supports */
+  sizeof(struct ssl_backend_data),
+
+  Curl_none_init,                  /* init */
+  Curl_none_cleanup,               /* cleanup */
+  rustls_version,                  /* version */
+  Curl_none_check_cxn,             /* check_cxn */
+  Curl_none_shutdown,              /* shutdown */
+  cr_data_pending,                 /* data_pending */
+  Curl_none_random,                /* random */
+  Curl_none_cert_status_request,   /* cert_status_request */
+  cr_connect,                      /* connect */
+  cr_connect_nonblocking,          /* connect_nonblocking */
+  cr_getsock,                      /* cr_getsock */
+  cr_get_internals,                /* get_internals */
+  cr_close,                        /* close_one */
+  Curl_none_close_all,             /* close_all */
+  Curl_none_session_free,          /* session_free */
+  Curl_none_set_engine,            /* set_engine */
+  Curl_none_set_engine_default,    /* set_engine_default */
+  Curl_none_engines_list,          /* engines_list */
+  Curl_none_false_start,           /* false_start */
+  NULL,                            /* sha256sum */
+  NULL,                            /* associate_connection */
+  NULL                             /* disassociate_connection */
+};
+
+#endif /* USE_RUSTLS */
diff --git a/lib/vtls/rustls.h b/lib/vtls/rustls.h
new file mode 100644
index 0000000..056211d
--- /dev/null
+++ b/lib/vtls/rustls.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020 - 2021, Jacob Hoffman-Andrews,
+ * <github@hoffman-andrews.com>
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#ifndef HEADER_CURL_RUSTLS_H
+#define HEADER_CURL_RUSTLS_H
+
+#include "curl_setup.h"
+
+#ifdef USE_RUSTLS
+
+extern const struct Curl_ssl Curl_ssl_rustls;
+
+#endif /* USE_RUSTLS */
+#endif /* HEADER_CURL_RUSTLS_H */
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index c7e4e79..7ffba6c 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -5,13 +5,13 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2012 - 2016, Marc Hoersken, <info@marc-hoersken.de>
  * Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -117,6 +117,10 @@
 #define SP_PROT_TLS1_2_CLIENT           0x00000800
 #endif
 
+#ifndef SCH_USE_STRONG_CRYPTO
+#define SCH_USE_STRONG_CRYPTO           0x00400000
+#endif
+
 #ifndef SECBUFFER_ALERT
 #define SECBUFFER_ALERT                 17
 #endif
@@ -142,7 +146,8 @@
 static Curl_recv schannel_recv;
 static Curl_send schannel_send;
 
-static CURLcode pkp_pin_peer_pubkey(struct connectdata *conn, int sockindex,
+static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
+                                    struct connectdata *conn, int sockindex,
                                     const char *pinnedpubkey);
 
 static void InitSecBuffer(SecBuffer *buffer, unsigned long BufType,
@@ -162,9 +167,9 @@
 }
 
 static CURLcode
-set_ssl_version_min_max(SCHANNEL_CRED *schannel_cred, struct connectdata *conn)
+set_ssl_version_min_max(SCHANNEL_CRED *schannel_cred, struct Curl_easy *data,
+                        struct connectdata *conn)
 {
-  struct Curl_easy *data = conn->data;
   long ssl_version = SSL_CONN_CONFIG(version);
   long ssl_version_max = SSL_CONN_CONFIG(version_max);
   long i = ssl_version;
@@ -323,17 +328,22 @@
 }
 
 static CURLcode
-set_ssl_ciphers(SCHANNEL_CRED *schannel_cred, char *ciphers)
+set_ssl_ciphers(SCHANNEL_CRED *schannel_cred, char *ciphers,
+                ALG_ID *algIds)
 {
   char *startCur = ciphers;
   int algCount = 0;
-  static ALG_ID algIds[45]; /*There are 45 listed in the MS headers*/
-  while(startCur && (0 != *startCur) && (algCount < 45)) {
+  while(startCur && (0 != *startCur) && (algCount < NUMOF_CIPHERS)) {
     long alg = strtol(startCur, 0, 0);
     if(!alg)
       alg = get_alg_id_by_name(startCur);
     if(alg)
       algIds[algCount++] = alg;
+    else if(!strncmp(startCur, "USE_STRONG_CRYPTO",
+                     sizeof("USE_STRONG_CRYPTO") - 1) ||
+            !strncmp(startCur, "SCH_USE_STRONG_CRYPTO",
+                     sizeof("SCH_USE_STRONG_CRYPTO") - 1))
+      schannel_cred->dwFlags |= SCH_USE_STRONG_CRYPTO;
     else
       return CURLE_SSL_CIPHER;
     startCur = strchr(startCur, ':');
@@ -357,28 +367,28 @@
   size_t store_name_len;
 
   sep = _tcschr(path, TEXT('\\'));
-  if(sep == NULL)
+  if(!sep)
     return CURLE_SSL_CERTPROBLEM;
 
   store_name_len = sep - path;
 
-  if(_tcsnccmp(path, TEXT("CurrentUser"), store_name_len) == 0)
+  if(_tcsncmp(path, TEXT("CurrentUser"), store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_CURRENT_USER;
-  else if(_tcsnccmp(path, TEXT("LocalMachine"), store_name_len) == 0)
+  else if(_tcsncmp(path, TEXT("LocalMachine"), store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_LOCAL_MACHINE;
-  else if(_tcsnccmp(path, TEXT("CurrentService"), store_name_len) == 0)
+  else if(_tcsncmp(path, TEXT("CurrentService"), store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_CURRENT_SERVICE;
-  else if(_tcsnccmp(path, TEXT("Services"), store_name_len) == 0)
+  else if(_tcsncmp(path, TEXT("Services"), store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_SERVICES;
-  else if(_tcsnccmp(path, TEXT("Users"), store_name_len) == 0)
+  else if(_tcsncmp(path, TEXT("Users"), store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_USERS;
-  else if(_tcsnccmp(path, TEXT("CurrentUserGroupPolicy"),
+  else if(_tcsncmp(path, TEXT("CurrentUserGroupPolicy"),
                     store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY;
-  else if(_tcsnccmp(path, TEXT("LocalMachineGroupPolicy"),
+  else if(_tcsncmp(path, TEXT("LocalMachineGroupPolicy"),
                     store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY;
-  else if(_tcsnccmp(path, TEXT("LocalMachineEnterprise"),
+  else if(_tcsncmp(path, TEXT("LocalMachineEnterprise"),
                     store_name_len) == 0)
     *store_name = CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE;
   else
@@ -387,7 +397,7 @@
   store_path_start = sep + 1;
 
   sep = _tcschr(store_path_start, TEXT('\\'));
-  if(sep == NULL)
+  if(!sep)
     return CURLE_SSL_CERTPROBLEM;
 
   *thumbprint = sep + 1;
@@ -397,18 +407,353 @@
   *sep = TEXT('\0');
   *store_path = _tcsdup(store_path_start);
   *sep = TEXT('\\');
-  if(*store_path == NULL)
+  if(!*store_path)
     return CURLE_OUT_OF_MEMORY;
 
   return CURLE_OK;
 }
 #endif
+static CURLcode
+schannel_acquire_credential_handle(struct Curl_easy *data,
+                                   struct connectdata *conn,
+                                   int sockindex)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  SCHANNEL_CRED schannel_cred;
+  PCCERT_CONTEXT client_certs[1] = { NULL };
+  SECURITY_STATUS sspi_status = SEC_E_OK;
+  CURLcode result;
+
+  /* setup Schannel API options */
+  memset(&schannel_cred, 0, sizeof(schannel_cred));
+  schannel_cred.dwVersion = SCHANNEL_CRED_VERSION;
+
+  if(conn->ssl_config.verifypeer) {
+#ifdef HAS_MANUAL_VERIFY_API
+    if(BACKEND->use_manual_cred_validation)
+      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION;
+    else
+#endif
+      schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION;
+
+    if(SSL_SET_OPTION(no_revoke)) {
+      schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+        SCH_CRED_IGNORE_REVOCATION_OFFLINE;
+
+      DEBUGF(infof(data, "schannel: disabled server certificate revocation "
+                   "checks"));
+    }
+    else if(SSL_SET_OPTION(revoke_best_effort)) {
+      schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+        SCH_CRED_IGNORE_REVOCATION_OFFLINE | SCH_CRED_REVOCATION_CHECK_CHAIN;
+
+      DEBUGF(infof(data, "schannel: ignore revocation offline errors"));
+    }
+    else {
+      schannel_cred.dwFlags |= SCH_CRED_REVOCATION_CHECK_CHAIN;
+
+      DEBUGF(infof(data,
+                   "schannel: checking server certificate revocation"));
+    }
+  }
+  else {
+    schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
+      SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+      SCH_CRED_IGNORE_REVOCATION_OFFLINE;
+    DEBUGF(infof(data,
+                 "schannel: disabled server cert revocation checks"));
+  }
+
+  if(!conn->ssl_config.verifyhost) {
+    schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
+    DEBUGF(infof(data, "schannel: verifyhost setting prevents Schannel from "
+                 "comparing the supplied target name with the subject "
+                 "names in server certificates."));
+  }
+
+  if(!SSL_SET_OPTION(auto_client_cert)) {
+    schannel_cred.dwFlags &= ~SCH_CRED_USE_DEFAULT_CREDS;
+    schannel_cred.dwFlags |= SCH_CRED_NO_DEFAULT_CREDS;
+    infof(data, "schannel: disabled automatic use of client certificate");
+  }
+  else
+    infof(data, "schannel: enabled automatic use of client certificate");
+
+  switch(conn->ssl_config.version) {
+  case CURL_SSLVERSION_DEFAULT:
+  case CURL_SSLVERSION_TLSv1:
+  case CURL_SSLVERSION_TLSv1_0:
+  case CURL_SSLVERSION_TLSv1_1:
+  case CURL_SSLVERSION_TLSv1_2:
+  case CURL_SSLVERSION_TLSv1_3:
+  {
+    result = set_ssl_version_min_max(&schannel_cred, data, conn);
+    if(result != CURLE_OK)
+      return result;
+    break;
+  }
+  case CURL_SSLVERSION_SSLv3:
+  case CURL_SSLVERSION_SSLv2:
+    failf(data, "SSL versions not supported");
+    return CURLE_NOT_BUILT_IN;
+  default:
+    failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  if(SSL_CONN_CONFIG(cipher_list)) {
+    result = set_ssl_ciphers(&schannel_cred, SSL_CONN_CONFIG(cipher_list),
+                             BACKEND->algIds);
+    if(CURLE_OK != result) {
+      failf(data, "Unable to set ciphers to passed via SSL_CONN_CONFIG");
+      return result;
+    }
+  }
+
+
+#ifdef HAS_CLIENT_CERT_PATH
+  /* client certificate */
+  if(data->set.ssl.primary.clientcert || data->set.ssl.primary.cert_blob) {
+    DWORD cert_store_name = 0;
+    TCHAR *cert_store_path = NULL;
+    TCHAR *cert_thumbprint_str = NULL;
+    CRYPT_HASH_BLOB cert_thumbprint;
+    BYTE cert_thumbprint_data[CERT_THUMBPRINT_DATA_LEN];
+    HCERTSTORE cert_store = NULL;
+    FILE *fInCert = NULL;
+    void *certdata = NULL;
+    size_t certsize = 0;
+    bool blob = data->set.ssl.primary.cert_blob != NULL;
+    TCHAR *cert_path = NULL;
+    if(blob) {
+      certdata = data->set.ssl.primary.cert_blob->data;
+      certsize = data->set.ssl.primary.cert_blob->len;
+    }
+    else {
+      cert_path = curlx_convert_UTF8_to_tchar(
+        data->set.ssl.primary.clientcert);
+      if(!cert_path)
+        return CURLE_OUT_OF_MEMORY;
+
+      result = get_cert_location(cert_path, &cert_store_name,
+        &cert_store_path, &cert_thumbprint_str);
+
+      if(result && (data->set.ssl.primary.clientcert[0]!='\0'))
+        fInCert = fopen(data->set.ssl.primary.clientcert, "rb");
+
+      if(result && !fInCert) {
+        failf(data, "schannel: Failed to get certificate location"
+              " or file for %s",
+              data->set.ssl.primary.clientcert);
+        curlx_unicodefree(cert_path);
+        return result;
+      }
+    }
+
+    if((fInCert || blob) && (data->set.ssl.cert_type) &&
+        (!strcasecompare(data->set.ssl.cert_type, "P12"))) {
+      failf(data, "schannel: certificate format compatibility error "
+              " for %s",
+              blob ? "(memory blob)" : data->set.ssl.primary.clientcert);
+      curlx_unicodefree(cert_path);
+      return CURLE_SSL_CERTPROBLEM;
+    }
+
+    if(fInCert || blob) {
+      /* Reading a .P12 or .pfx file, like the example at bottom of
+           https://social.msdn.microsoft.com/Forums/windowsdesktop/
+                          en-US/3e7bc95f-b21a-4bcd-bd2c-7f996718cae5
+      */
+      CRYPT_DATA_BLOB datablob;
+      WCHAR* pszPassword;
+      size_t pwd_len = 0;
+      int str_w_len = 0;
+      const char *cert_showfilename_error = blob ?
+        "(memory blob)" : data->set.ssl.primary.clientcert;
+      curlx_unicodefree(cert_path);
+      if(fInCert) {
+        long cert_tell = 0;
+        bool continue_reading = fseek(fInCert, 0, SEEK_END) == 0;
+        if(continue_reading)
+          cert_tell = ftell(fInCert);
+        if(cert_tell < 0)
+          continue_reading = FALSE;
+        else
+          certsize = (size_t)cert_tell;
+        if(continue_reading)
+          continue_reading = fseek(fInCert, 0, SEEK_SET) == 0;
+        if(continue_reading)
+          certdata = malloc(certsize + 1);
+        if((!certdata) ||
+           ((int) fread(certdata, certsize, 1, fInCert) != 1))
+          continue_reading = FALSE;
+        fclose(fInCert);
+        if(!continue_reading) {
+          failf(data, "schannel: Failed to read cert file %s",
+              data->set.ssl.primary.clientcert);
+          free(certdata);
+          return CURLE_SSL_CERTPROBLEM;
+        }
+      }
+
+      /* Convert key-pair data to the in-memory certificate store */
+      datablob.pbData = (BYTE*)certdata;
+      datablob.cbData = (DWORD)certsize;
+
+      if(data->set.ssl.key_passwd != NULL)
+        pwd_len = strlen(data->set.ssl.key_passwd);
+      pszPassword = (WCHAR*)malloc(sizeof(WCHAR)*(pwd_len + 1));
+      if(pszPassword) {
+        if(pwd_len > 0)
+          str_w_len = MultiByteToWideChar(CP_UTF8,
+             MB_ERR_INVALID_CHARS,
+             data->set.ssl.key_passwd, (int)pwd_len,
+             pszPassword, (int)(pwd_len + 1));
+
+        if((str_w_len >= 0) && (str_w_len <= (int)pwd_len))
+          pszPassword[str_w_len] = 0;
+        else
+          pszPassword[0] = 0;
+
+        cert_store = PFXImportCertStore(&datablob, pszPassword, 0);
+        free(pszPassword);
+      }
+      if(!blob)
+        free(certdata);
+      if(!cert_store) {
+        DWORD errorcode = GetLastError();
+        if(errorcode == ERROR_INVALID_PASSWORD)
+          failf(data, "schannel: Failed to import cert file %s, "
+                "password is bad",
+                cert_showfilename_error);
+        else
+          failf(data, "schannel: Failed to import cert file %s, "
+                "last error is 0x%x",
+                cert_showfilename_error, errorcode);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+
+      client_certs[0] = CertFindCertificateInStore(
+        cert_store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0,
+        CERT_FIND_ANY, NULL, NULL);
+
+      if(!client_certs[0]) {
+        failf(data, "schannel: Failed to get certificate from file %s"
+              ", last error is 0x%x",
+              cert_showfilename_error, GetLastError());
+        CertCloseStore(cert_store, 0);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+
+      schannel_cred.cCreds = 1;
+      schannel_cred.paCred = client_certs;
+    }
+    else {
+      cert_store =
+        CertOpenStore(CURL_CERT_STORE_PROV_SYSTEM, 0,
+                      (HCRYPTPROV)NULL,
+                      CERT_STORE_OPEN_EXISTING_FLAG | cert_store_name,
+                      cert_store_path);
+      if(!cert_store) {
+        failf(data, "schannel: Failed to open cert store %x %s, "
+              "last error is 0x%x",
+              cert_store_name, cert_store_path, GetLastError());
+        free(cert_store_path);
+        curlx_unicodefree(cert_path);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+      free(cert_store_path);
+
+      cert_thumbprint.pbData = cert_thumbprint_data;
+      cert_thumbprint.cbData = CERT_THUMBPRINT_DATA_LEN;
+
+      if(!CryptStringToBinary(cert_thumbprint_str,
+                              CERT_THUMBPRINT_STR_LEN,
+                              CRYPT_STRING_HEX,
+                              cert_thumbprint_data,
+                              &cert_thumbprint.cbData,
+                              NULL, NULL)) {
+        curlx_unicodefree(cert_path);
+        CertCloseStore(cert_store, 0);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+
+      client_certs[0] = CertFindCertificateInStore(
+        cert_store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0,
+        CERT_FIND_HASH, &cert_thumbprint, NULL);
+
+      curlx_unicodefree(cert_path);
+
+      if(client_certs[0]) {
+        schannel_cred.cCreds = 1;
+        schannel_cred.paCred = client_certs;
+      }
+      else {
+        /* CRYPT_E_NOT_FOUND / E_INVALIDARG */
+        CertCloseStore(cert_store, 0);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+    }
+    CertCloseStore(cert_store, 0);
+  }
+#else
+  if(data->set.ssl.primary.clientcert || data->set.ssl.primary.cert_blob) {
+    failf(data, "schannel: client cert support not built in");
+    return CURLE_NOT_BUILT_IN;
+  }
+#endif
+
+  /* allocate memory for the re-usable credential handle */
+  BACKEND->cred = (struct Curl_schannel_cred *)
+    calloc(1, sizeof(struct Curl_schannel_cred));
+  if(!BACKEND->cred) {
+    failf(data, "schannel: unable to allocate memory");
+
+    if(client_certs[0])
+      CertFreeCertificateContext(client_certs[0]);
+
+    return CURLE_OUT_OF_MEMORY;
+  }
+  BACKEND->cred->refcount = 1;
+
+  /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx
+   */
+  sspi_status =
+    s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
+                                       SECPKG_CRED_OUTBOUND, NULL,
+                                       &schannel_cred, NULL, NULL,
+                                       &BACKEND->cred->cred_handle,
+                                       &BACKEND->cred->time_stamp);
+
+  if(client_certs[0])
+    CertFreeCertificateContext(client_certs[0]);
+
+  if(sspi_status != SEC_E_OK) {
+    char buffer[STRERROR_LEN];
+    failf(data, "schannel: AcquireCredentialsHandle failed: %s",
+          Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
+    Curl_safefree(BACKEND->cred);
+    switch(sspi_status) {
+    case SEC_E_INSUFFICIENT_MEMORY:
+      return CURLE_OUT_OF_MEMORY;
+    case SEC_E_NO_CREDENTIALS:
+    case SEC_E_SECPKG_NOT_FOUND:
+    case SEC_E_NOT_OWNER:
+    case SEC_E_UNKNOWN_CREDENTIALS:
+    case SEC_E_INTERNAL_ERROR:
+    default:
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+
+  return CURLE_OK;
+}
 
 static CURLcode
-schannel_connect_step1(struct connectdata *conn, int sockindex)
+schannel_connect_step1(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex)
 {
   ssize_t written = -1;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   SecBuffer outbuf;
   SecBufferDesc outbuf_desc;
@@ -417,8 +762,6 @@
 #ifdef HAS_ALPN
   unsigned char alpn_buffer[128];
 #endif
-  SCHANNEL_CRED schannel_cred;
-  PCCERT_CONTEXT client_certs[1] = { NULL };
   SECURITY_STATUS sspi_status = SEC_E_OK;
   struct Curl_schannel_cred *old_cred = NULL;
   struct in_addr addr;
@@ -427,15 +770,10 @@
 #endif
   TCHAR *host_name;
   CURLcode result;
-#ifndef CURL_DISABLE_PROXY
-  char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-#else
-  char * const hostname = conn->host.name;
-#endif
+  char * const hostname = SSL_HOST_NAME();
 
   DEBUGF(infof(data,
-               "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
+               "schannel: SSL/TLS connection with %s port %hu (step 1/3)",
                hostname, conn->remote_port));
 
   if(curlx_verify_windows_version(5, 1, PLATFORM_WINNT,
@@ -443,7 +781,7 @@
     /* Schannel in Windows XP (OS version 5.1) uses legacy handshakes and
        algorithms that may not be supported by all servers. */
     infof(data, "schannel: Windows version is old and may not be able to "
-          "connect to some servers due to lack of SNI, algorithms, etc.\n");
+          "connect to some servers due to lack of SNI, algorithms, etc.");
   }
 
 #ifdef HAS_ALPN
@@ -468,7 +806,7 @@
 #endif
 #else
 #ifdef HAS_MANUAL_VERIFY_API
-  if(SSL_CONN_CONFIG(CAfile)) {
+  if(SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(ca_info_blob)) {
     if(curlx_verify_windows_version(6, 1, PLATFORM_WINNT,
                                     VERSION_GREATER_THAN_EQUAL)) {
       BACKEND->use_manual_cred_validation = true;
@@ -482,7 +820,7 @@
   else
     BACKEND->use_manual_cred_validation = false;
 #else
-  if(SSL_CONN_CONFIG(CAfile)) {
+  if(SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(ca_info_blob)) {
     failf(data, "schannel: CA cert support not built in");
     return CURLE_NOT_BUILT_IN;
   }
@@ -493,334 +831,26 @@
 
   /* check for an existing re-usable credential handle */
   if(SSL_SET_OPTION(primary.sessionid)) {
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) {
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn,
+                              SSL_IS_PROXY() ? TRUE : FALSE,
+                              (void **)&old_cred, NULL, sockindex)) {
       BACKEND->cred = old_cred;
-      DEBUGF(infof(data, "schannel: re-using existing credential handle\n"));
+      DEBUGF(infof(data, "schannel: re-using existing credential handle"));
 
       /* increment the reference counter of the credential/session handle */
       BACKEND->cred->refcount++;
       DEBUGF(infof(data,
-                   "schannel: incremented credential handle refcount = %d\n",
+                   "schannel: incremented credential handle refcount = %d",
                    BACKEND->cred->refcount));
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   if(!BACKEND->cred) {
-    /* setup Schannel API options */
-    memset(&schannel_cred, 0, sizeof(schannel_cred));
-    schannel_cred.dwVersion = SCHANNEL_CRED_VERSION;
-
-    if(conn->ssl_config.verifypeer) {
-#ifdef HAS_MANUAL_VERIFY_API
-      if(BACKEND->use_manual_cred_validation)
-        schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION;
-      else
-#endif
-        schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION;
-
-      if(data->set.ssl.no_revoke) {
-        schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
-          SCH_CRED_IGNORE_REVOCATION_OFFLINE;
-
-        DEBUGF(infof(data, "schannel: disabled server certificate revocation "
-                     "checks\n"));
-      }
-      else if(data->set.ssl.revoke_best_effort) {
-        schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
-          SCH_CRED_IGNORE_REVOCATION_OFFLINE | SCH_CRED_REVOCATION_CHECK_CHAIN;
-
-        DEBUGF(infof(data, "schannel: ignore revocation offline errors"));
-      }
-      else {
-        schannel_cred.dwFlags |= SCH_CRED_REVOCATION_CHECK_CHAIN;
-
-        DEBUGF(infof(data,
-                     "schannel: checking server certificate revocation\n"));
-      }
-    }
-    else {
-      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
-        SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
-        SCH_CRED_IGNORE_REVOCATION_OFFLINE;
-      DEBUGF(infof(data,
-                   "schannel: disabled server cert revocation checks\n"));
-    }
-
-    if(!conn->ssl_config.verifyhost) {
-      schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
-      DEBUGF(infof(data, "schannel: verifyhost setting prevents Schannel from "
-                   "comparing the supplied target name with the subject "
-                   "names in server certificates.\n"));
-    }
-
-    switch(conn->ssl_config.version) {
-    case CURL_SSLVERSION_DEFAULT:
-    case CURL_SSLVERSION_TLSv1:
-    case CURL_SSLVERSION_TLSv1_0:
-    case CURL_SSLVERSION_TLSv1_1:
-    case CURL_SSLVERSION_TLSv1_2:
-    case CURL_SSLVERSION_TLSv1_3:
-    {
-      result = set_ssl_version_min_max(&schannel_cred, conn);
-      if(result != CURLE_OK)
-        return result;
-      break;
-    }
-    case CURL_SSLVERSION_SSLv3:
-      schannel_cred.grbitEnabledProtocols = SP_PROT_SSL3_CLIENT;
-      break;
-    case CURL_SSLVERSION_SSLv2:
-      schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT;
-      break;
-    default:
-      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
-      return CURLE_SSL_CONNECT_ERROR;
-    }
-
-    if(SSL_CONN_CONFIG(cipher_list)) {
-      result = set_ssl_ciphers(&schannel_cred, SSL_CONN_CONFIG(cipher_list));
-      if(CURLE_OK != result) {
-        failf(data, "Unable to set ciphers to passed via SSL_CONN_CONFIG");
-        return result;
-      }
-    }
-
-
-#ifdef HAS_CLIENT_CERT_PATH
-    /* client certificate */
-    if(data->set.ssl.primary.clientcert || data->set.ssl.primary.cert_blob) {
-      DWORD cert_store_name = 0;
-      TCHAR *cert_store_path = NULL;
-      TCHAR *cert_thumbprint_str = NULL;
-      CRYPT_HASH_BLOB cert_thumbprint;
-      BYTE cert_thumbprint_data[CERT_THUMBPRINT_DATA_LEN];
-      HCERTSTORE cert_store = NULL;
-      FILE *fInCert = NULL;
-      void *certdata = NULL;
-      size_t certsize = 0;
-      bool blob = data->set.ssl.primary.cert_blob != NULL;
-      TCHAR *cert_path = NULL;
-      if(blob) {
-        certdata = data->set.ssl.primary.cert_blob->data;
-        certsize = data->set.ssl.primary.cert_blob->len;
-      }
-      else {
-        cert_path = curlx_convert_UTF8_to_tchar(
-          data->set.ssl.primary.clientcert);
-        if(!cert_path)
-          return CURLE_OUT_OF_MEMORY;
-
-        result = get_cert_location(cert_path, &cert_store_name,
-          &cert_store_path, &cert_thumbprint_str);
-
-        if(result && (data->set.ssl.primary.clientcert[0]!='\0'))
-          fInCert = fopen(data->set.ssl.primary.clientcert, "rb");
-
-        if(result && !fInCert) {
-          failf(data, "schannel: Failed to get certificate location"
-                " or file for %s",
-                data->set.ssl.primary.clientcert);
-          curlx_unicodefree(cert_path);
-          return result;
-        }
-      }
-
-      if((fInCert || blob) && (data->set.ssl.cert_type) &&
-          (!strcasecompare(data->set.ssl.cert_type, "P12"))) {
-        failf(data, "schannel: certificate format compatibility error "
-                " for %s",
-                blob ? "(memory blob)" : data->set.ssl.primary.clientcert);
-        curlx_unicodefree(cert_path);
-        return CURLE_SSL_CERTPROBLEM;
-      }
-
-      if(fInCert || blob) {
-        /* Reading a .P12 or .pfx file, like the example at bottom of
-             https://social.msdn.microsoft.com/Forums/windowsdesktop/
-                            en-US/3e7bc95f-b21a-4bcd-bd2c-7f996718cae5
-        */
-        CRYPT_DATA_BLOB datablob;
-        WCHAR* pszPassword;
-        size_t pwd_len = 0;
-        int str_w_len = 0;
-        const char *cert_showfilename_error = blob ?
-          "(memory blob)" : data->set.ssl.primary.clientcert;
-        curlx_unicodefree(cert_path);
-        if(fInCert) {
-          long cert_tell = 0;
-          bool continue_reading = fseek(fInCert, 0, SEEK_END) == 0;
-          if(continue_reading)
-            cert_tell = ftell(fInCert);
-          if(cert_tell < 0)
-            continue_reading = FALSE;
-          else
-            certsize = (size_t)cert_tell;
-          if(continue_reading)
-            continue_reading = fseek(fInCert, 0, SEEK_SET) == 0;
-          if(continue_reading)
-            certdata = malloc(certsize + 1);
-          if((!certdata) ||
-             ((int) fread(certdata, certsize, 1, fInCert) != 1))
-            continue_reading = FALSE;
-          fclose(fInCert);
-          if(!continue_reading) {
-            failf(data, "schannel: Failed to read cert file %s",
-                data->set.ssl.primary.clientcert);
-            free(certdata);
-            return CURLE_SSL_CERTPROBLEM;
-          }
-        }
-
-        /* Convert key-pair data to the in-memory certificate store */
-        datablob.pbData = (BYTE*)certdata;
-        datablob.cbData = (DWORD)certsize;
-
-        if(data->set.ssl.key_passwd != NULL)
-          pwd_len = strlen(data->set.ssl.key_passwd);
-        pszPassword = (WCHAR*)malloc(sizeof(WCHAR)*(pwd_len + 1));
-        if(pszPassword) {
-          if(pwd_len > 0)
-            str_w_len = MultiByteToWideChar(CP_UTF8,
-               MB_ERR_INVALID_CHARS,
-               data->set.ssl.key_passwd, (int)pwd_len,
-               pszPassword, (int)(pwd_len + 1));
-
-          if((str_w_len >= 0) && (str_w_len <= (int)pwd_len))
-            pszPassword[str_w_len] = 0;
-          else
-            pszPassword[0] = 0;
-
-          cert_store = PFXImportCertStore(&datablob, pszPassword, 0);
-          free(pszPassword);
-        }
-        if(!blob)
-          free(certdata);
-        if(cert_store == NULL) {
-          DWORD errorcode = GetLastError();
-          if(errorcode == ERROR_INVALID_PASSWORD)
-            failf(data, "schannel: Failed to import cert file %s, "
-                  "password is bad",
-                  cert_showfilename_error);
-          else
-            failf(data, "schannel: Failed to import cert file %s, "
-                  "last error is 0x%x",
-                  cert_showfilename_error, errorcode);
-          return CURLE_SSL_CERTPROBLEM;
-        }
-
-        client_certs[0] = CertFindCertificateInStore(
-          cert_store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0,
-          CERT_FIND_ANY, NULL, NULL);
-
-        if(client_certs[0] == NULL) {
-          failf(data, "schannel: Failed to get certificate from file %s"
-                ", last error is 0x%x",
-                cert_showfilename_error, GetLastError());
-          CertCloseStore(cert_store, 0);
-          return CURLE_SSL_CERTPROBLEM;
-        }
-
-        schannel_cred.cCreds = 1;
-        schannel_cred.paCred = client_certs;
-      }
-      else {
-        cert_store =
-          CertOpenStore(CURL_CERT_STORE_PROV_SYSTEM, 0,
-                        (HCRYPTPROV)NULL,
-                        CERT_STORE_OPEN_EXISTING_FLAG | cert_store_name,
-                        cert_store_path);
-        if(!cert_store) {
-          failf(data, "schannel: Failed to open cert store %x %s, "
-                "last error is 0x%x",
-                cert_store_name, cert_store_path, GetLastError());
-          free(cert_store_path);
-          curlx_unicodefree(cert_path);
-          return CURLE_SSL_CERTPROBLEM;
-        }
-        free(cert_store_path);
-
-        cert_thumbprint.pbData = cert_thumbprint_data;
-        cert_thumbprint.cbData = CERT_THUMBPRINT_DATA_LEN;
-
-        if(!CryptStringToBinary(cert_thumbprint_str,
-                                CERT_THUMBPRINT_STR_LEN,
-                                CRYPT_STRING_HEX,
-                                cert_thumbprint_data,
-                                &cert_thumbprint.cbData,
-                                NULL, NULL)) {
-          curlx_unicodefree(cert_path);
-          CertCloseStore(cert_store, 0);
-          return CURLE_SSL_CERTPROBLEM;
-        }
-
-        client_certs[0] = CertFindCertificateInStore(
-          cert_store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0,
-          CERT_FIND_HASH, &cert_thumbprint, NULL);
-
-        curlx_unicodefree(cert_path);
-
-        if(client_certs[0]) {
-          schannel_cred.cCreds = 1;
-          schannel_cred.paCred = client_certs;
-        }
-        else {
-          /* CRYPT_E_NOT_FOUND / E_INVALIDARG */
-          CertCloseStore(cert_store, 0);
-          return CURLE_SSL_CERTPROBLEM;
-        }
-      }
-      CertCloseStore(cert_store, 0);
-    }
-#else
-    if(data->set.ssl.primary.clientcert || data->set.ssl.primary.cert_blob) {
-      failf(data, "schannel: client cert support not built in");
-      return CURLE_NOT_BUILT_IN;
-    }
-#endif
-
-    /* allocate memory for the re-usable credential handle */
-    BACKEND->cred = (struct Curl_schannel_cred *)
-      calloc(1, sizeof(struct Curl_schannel_cred));
-    if(!BACKEND->cred) {
-      failf(data, "schannel: unable to allocate memory");
-
-      if(client_certs[0])
-        CertFreeCertificateContext(client_certs[0]);
-
-      return CURLE_OUT_OF_MEMORY;
-    }
-    BACKEND->cred->refcount = 1;
-
-    /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx
-     */
-    sspi_status =
-      s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
-                                         SECPKG_CRED_OUTBOUND, NULL,
-                                         &schannel_cred, NULL, NULL,
-                                         &BACKEND->cred->cred_handle,
-                                         &BACKEND->cred->time_stamp);
-
-    if(client_certs[0])
-      CertFreeCertificateContext(client_certs[0]);
-
-    if(sspi_status != SEC_E_OK) {
-      char buffer[STRERROR_LEN];
-      failf(data, "schannel: AcquireCredentialsHandle failed: %s",
-            Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
-      Curl_safefree(BACKEND->cred);
-      switch(sspi_status) {
-      case SEC_E_INSUFFICIENT_MEMORY:
-        return CURLE_OUT_OF_MEMORY;
-      case SEC_E_NO_CREDENTIALS:
-      case SEC_E_SECPKG_NOT_FOUND:
-      case SEC_E_NOT_OWNER:
-      case SEC_E_UNKNOWN_CREDENTIALS:
-      case SEC_E_INTERNAL_ERROR:
-      default:
-        return CURLE_SSL_CONNECT_ERROR;
-      }
+    result = schannel_acquire_credential_handle(data, conn, sockindex);
+    if(result != CURLE_OK) {
+      return result;
     }
   }
 
@@ -830,7 +860,7 @@
      || Curl_inet_pton(AF_INET6, hostname, &addr6)
 #endif
     ) {
-    infof(data, "schannel: using IP address, SNI is not supported by OS.\n");
+    infof(data, "schannel: using IP address, SNI is not supported by OS.");
   }
 
 #ifdef HAS_ALPN
@@ -858,18 +888,19 @@
 
     list_start_index = cur;
 
-#ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
-      memcpy(&alpn_buffer[cur], NGHTTP2_PROTO_ALPN, NGHTTP2_PROTO_ALPN_LEN);
-      cur += NGHTTP2_PROTO_ALPN_LEN;
-      infof(data, "schannel: ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+#ifdef USE_HTTP2
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2) {
+      alpn_buffer[cur++] = ALPN_H2_LENGTH;
+      memcpy(&alpn_buffer[cur], ALPN_H2, ALPN_H2_LENGTH);
+      cur += ALPN_H2_LENGTH;
+      infof(data, "schannel: ALPN, offering %s", ALPN_H2);
     }
 #endif
 
     alpn_buffer[cur++] = ALPN_HTTP_1_1_LENGTH;
     memcpy(&alpn_buffer[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH);
     cur += ALPN_HTTP_1_1_LENGTH;
-    infof(data, "schannel: ALPN, offering %s\n", ALPN_HTTP_1_1);
+    infof(data, "schannel: ALPN, offering %s", ALPN_HTTP_1_1);
 
     *list_len = curlx_uitous(cur - list_start_index);
     *extension_len = *list_len + sizeof(unsigned int) + sizeof(unsigned short);
@@ -890,11 +921,15 @@
   InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
   InitSecBufferDesc(&outbuf_desc, &outbuf, 1);
 
-  /* setup request flags */
+  /* security request flags */
   BACKEND->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT |
     ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY |
     ISC_REQ_STREAM;
 
+  if(!SSL_SET_OPTION(auto_client_cert)) {
+    BACKEND->req_flags |= ISC_REQ_USE_SUPPLIED_CREDS;
+  }
+
   /* allocate memory for the security context handle */
   BACKEND->ctxt = (struct Curl_schannel_ctxt *)
     calloc(1, sizeof(struct Curl_schannel_ctxt));
@@ -953,10 +988,10 @@
   }
 
   DEBUGF(infof(data, "schannel: sending initial handshake data: "
-               "sending %lu bytes...\n", outbuf.cbBuffer));
+               "sending %lu bytes.", outbuf.cbBuffer));
 
   /* send initial handshake data which is now stored in output buffer */
-  result = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer,
+  result = Curl_write_plain(data, conn->sock[sockindex], outbuf.pvBuffer,
                             outbuf.cbBuffer, &written);
   s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
   if((result != CURLE_OK) || (outbuf.cbBuffer != (size_t) written)) {
@@ -966,7 +1001,7 @@
   }
 
   DEBUGF(infof(data, "schannel: sent initial handshake data: "
-               "sent %zd bytes\n", written));
+               "sent %zd bytes", written));
 
   BACKEND->recv_unrecoverable_err = CURLE_OK;
   BACKEND->recv_sspi_close_notify = false;
@@ -980,11 +1015,11 @@
 }
 
 static CURLcode
-schannel_connect_step2(struct connectdata *conn, int sockindex)
+schannel_connect_step2(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex)
 {
   int i;
   ssize_t nread = -1, written = -1;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   unsigned char *reallocated_buffer;
   SecBuffer outbuf[3];
@@ -994,41 +1029,36 @@
   SECURITY_STATUS sspi_status = SEC_E_OK;
   CURLcode result;
   bool doread;
-#ifndef CURL_DISABLE_PROXY
-  char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-#else
-  char * const hostname = conn->host.name;
-#endif
+  char * const hostname = SSL_HOST_NAME();
   const char *pubkey_ptr;
 
   doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE;
 
   DEBUGF(infof(data,
-               "schannel: SSL/TLS connection with %s port %hu (step 2/3)\n",
+               "schannel: SSL/TLS connection with %s port %hu (step 2/3)",
                hostname, conn->remote_port));
 
   if(!BACKEND->cred || !BACKEND->ctxt)
     return CURLE_SSL_CONNECT_ERROR;
 
   /* buffer to store previously received and decrypted data */
-  if(BACKEND->decdata_buffer == NULL) {
+  if(!BACKEND->decdata_buffer) {
     BACKEND->decdata_offset = 0;
     BACKEND->decdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
     BACKEND->decdata_buffer = malloc(BACKEND->decdata_length);
-    if(BACKEND->decdata_buffer == NULL) {
+    if(!BACKEND->decdata_buffer) {
       failf(data, "schannel: unable to allocate memory");
       return CURLE_OUT_OF_MEMORY;
     }
   }
 
   /* buffer to store previously received and encrypted data */
-  if(BACKEND->encdata_buffer == NULL) {
+  if(!BACKEND->encdata_buffer) {
     BACKEND->encdata_is_incomplete = false;
     BACKEND->encdata_offset = 0;
     BACKEND->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
     BACKEND->encdata_buffer = malloc(BACKEND->encdata_length);
-    if(BACKEND->encdata_buffer == NULL) {
+    if(!BACKEND->encdata_buffer) {
       failf(data, "schannel: unable to allocate memory");
       return CURLE_OUT_OF_MEMORY;
     }
@@ -1043,7 +1073,7 @@
     reallocated_buffer = realloc(BACKEND->encdata_buffer,
                                  reallocated_length);
 
-    if(reallocated_buffer == NULL) {
+    if(!reallocated_buffer) {
       failf(data, "schannel: unable to re-allocate memory");
       return CURLE_OUT_OF_MEMORY;
     }
@@ -1067,7 +1097,7 @@
         if(connssl->connecting_state != ssl_connect_2_writing)
           connssl->connecting_state = ssl_connect_2_reading;
         DEBUGF(infof(data, "schannel: failed to receive handshake, "
-                     "need more data\n"));
+                     "need more data"));
         return CURLE_OK;
       }
       else if((result != CURLE_OK) || (nread == 0)) {
@@ -1079,11 +1109,11 @@
       /* increase encrypted data buffer offset */
       BACKEND->encdata_offset += nread;
       BACKEND->encdata_is_incomplete = false;
-      DEBUGF(infof(data, "schannel: encrypted data got %zd\n", nread));
+      DEBUGF(infof(data, "schannel: encrypted data got %zd", nread));
     }
 
     DEBUGF(infof(data,
-                 "schannel: encrypted data buffer: offset %zu length %zu\n",
+                 "schannel: encrypted data buffer: offset %zu length %zu",
                  BACKEND->encdata_offset, BACKEND->encdata_length));
 
     /* setup input buffers */
@@ -1098,7 +1128,7 @@
     InitSecBuffer(&outbuf[2], SECBUFFER_EMPTY, NULL, 0);
     InitSecBufferDesc(&outbuf_desc, outbuf, 3);
 
-    if(inbuf[0].pvBuffer == NULL) {
+    if(!inbuf[0].pvBuffer) {
       failf(data, "schannel: unable to allocate memory");
       return CURLE_OUT_OF_MEMORY;
     }
@@ -1128,7 +1158,7 @@
       BACKEND->encdata_is_incomplete = true;
       connssl->connecting_state = ssl_connect_2_reading;
       DEBUGF(infof(data,
-                   "schannel: received incomplete message, need more data\n"));
+                   "schannel: received incomplete message, need more data"));
       return CURLE_OK;
     }
 
@@ -1140,7 +1170,7 @@
       BACKEND->req_flags |= ISC_REQ_USE_SUPPLIED_CREDS;
       connssl->connecting_state = ssl_connect_2_writing;
       DEBUGF(infof(data,
-                   "schannel: a client certificate has been requested\n"));
+                   "schannel: a client certificate has been requested"));
       return CURLE_OK;
     }
 
@@ -1150,10 +1180,10 @@
         /* search for handshake tokens that need to be send */
         if(outbuf[i].BufferType == SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) {
           DEBUGF(infof(data, "schannel: sending next handshake data: "
-                       "sending %lu bytes...\n", outbuf[i].cbBuffer));
+                       "sending %lu bytes.", outbuf[i].cbBuffer));
 
           /* send handshake token to server */
-          result = Curl_write_plain(conn, conn->sock[sockindex],
+          result = Curl_write_plain(data, conn->sock[sockindex],
                                     outbuf[i].pvBuffer, outbuf[i].cbBuffer,
                                     &written);
           if((result != CURLE_OK) ||
@@ -1205,7 +1235,7 @@
 
     /* check if there was additional remaining encrypted data */
     if(inbuf[1].BufferType == SECBUFFER_EXTRA && inbuf[1].cbBuffer > 0) {
-      DEBUGF(infof(data, "schannel: encrypted data length: %lu\n",
+      DEBUGF(infof(data, "schannel: encrypted data length: %lu",
                    inbuf[1].cbBuffer));
       /*
         There are two cases where we could be getting extra data here:
@@ -1245,14 +1275,12 @@
   /* check if the handshake is complete */
   if(sspi_status == SEC_E_OK) {
     connssl->connecting_state = ssl_connect_3;
-    DEBUGF(infof(data, "schannel: SSL/TLS handshake complete\n"));
+    DEBUGF(infof(data, "schannel: SSL/TLS handshake complete"));
   }
 
-  pubkey_ptr = SSL_IS_PROXY() ?
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
+  pubkey_ptr = SSL_PINNED_PUB_KEY();
   if(pubkey_ptr) {
-    result = pkp_pin_peer_pubkey(conn, sockindex, pubkey_ptr);
+    result = pkp_pin_peer_pubkey(data, conn, sockindex, pubkey_ptr);
     if(result) {
       failf(data, "SSL: public key does not match pinned public key!");
       return result;
@@ -1261,7 +1289,7 @@
 
 #ifdef HAS_MANUAL_VERIFY_API
   if(conn->ssl_config.verifypeer && BACKEND->use_manual_cred_validation) {
-    return Curl_verify_certificate(conn, sockindex);
+    return Curl_verify_certificate(data, conn, sockindex);
   }
 #endif
 
@@ -1305,7 +1333,7 @@
 
 struct Adder_args
 {
-  struct connectdata *conn;
+  struct Curl_easy *data;
   CURLcode result;
   int idx;
   int certs_count;
@@ -1320,23 +1348,24 @@
     const char *beg = (const char *) ccert_context->pbCertEncoded;
     const char *end = beg + ccert_context->cbCertEncoded;
     int insert_index = (args->certs_count - 1) - args->idx;
-    args->result = Curl_extract_certinfo(args->conn, insert_index, beg, end);
+    args->result = Curl_extract_certinfo(args->data, insert_index,
+                                         beg, end);
     args->idx++;
   }
   return args->result == CURLE_OK;
 }
 
 static CURLcode
-schannel_connect_step3(struct connectdata *conn, int sockindex)
+schannel_connect_step3(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   SECURITY_STATUS sspi_status = SEC_E_OK;
   CERT_CONTEXT *ccert_context = NULL;
+  bool isproxy = SSL_IS_PROXY();
 #ifdef DEBUGBUILD
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
+  const char * const hostname = SSL_HOST_NAME();
 #endif
 #ifdef HAS_ALPN
   SecPkgContext_ApplicationProtocol alpn_result;
@@ -1345,7 +1374,7 @@
   DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
 
   DEBUGF(infof(data,
-               "schannel: SSL/TLS connection with %s port %hu (step 3/3)\n",
+               "schannel: SSL/TLS connection with %s port %hu (step 3/3)",
                hostname, conn->remote_port));
 
   if(!BACKEND->cred)
@@ -1381,13 +1410,12 @@
     if(alpn_result.ProtoNegoStatus ==
        SecApplicationProtocolNegotiationStatus_Success) {
 
-      infof(data, "schannel: ALPN, server accepted to use %.*s\n",
+      infof(data, "schannel: ALPN, server accepted to use %.*s",
             alpn_result.ProtocolIdSize, alpn_result.ProtocolId);
 
-#ifdef USE_NGHTTP2
-      if(alpn_result.ProtocolIdSize == NGHTTP2_PROTO_VERSION_ID_LEN &&
-         !memcmp(NGHTTP2_PROTO_VERSION_ID, alpn_result.ProtocolId,
-                 NGHTTP2_PROTO_VERSION_ID_LEN)) {
+#ifdef USE_HTTP2
+      if(alpn_result.ProtocolIdSize == ALPN_H2_LENGTH &&
+         !memcmp(ALPN_H2, alpn_result.ProtocolId, ALPN_H2_LENGTH)) {
         conn->negnpn = CURL_HTTP_VERSION_2;
       }
       else
@@ -1399,8 +1427,8 @@
         }
     }
     else
-      infof(data, "ALPN, server did not agree to a protocol\n");
-    Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+      infof(data, "ALPN, server did not agree to a protocol");
+    Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                         BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
   }
 #endif
@@ -1410,24 +1438,24 @@
     bool incache;
     struct Curl_schannel_cred *old_cred = NULL;
 
-    Curl_ssl_sessionid_lock(conn);
-    incache = !(Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL,
-                                      sockindex));
+    Curl_ssl_sessionid_lock(data);
+    incache = !(Curl_ssl_getsessionid(data, conn, isproxy, (void **)&old_cred,
+                                      NULL, sockindex));
     if(incache) {
       if(old_cred != BACKEND->cred) {
         DEBUGF(infof(data,
-                     "schannel: old credential handle is stale, removing\n"));
+                     "schannel: old credential handle is stale, removing"));
         /* we're not taking old_cred ownership here, no refcount++ is needed */
-        Curl_ssl_delsessionid(conn, (void *)old_cred);
+        Curl_ssl_delsessionid(data, (void *)old_cred);
         incache = FALSE;
       }
     }
     if(!incache) {
-      result = Curl_ssl_addsessionid(conn, (void *)BACKEND->cred,
+      result = Curl_ssl_addsessionid(data, conn, isproxy, BACKEND->cred,
                                      sizeof(struct Curl_schannel_cred),
                                      sockindex);
       if(result) {
-        Curl_ssl_sessionid_unlock(conn);
+        Curl_ssl_sessionid_unlock(data);
         failf(data, "schannel: failed to store credential handle");
         return result;
       }
@@ -1435,10 +1463,10 @@
         /* this cred session is now also referenced by sessionid cache */
         BACKEND->cred->refcount++;
         DEBUGF(infof(data,
-                     "schannel: stored credential handle in session cache\n"));
+                     "schannel: stored credential handle in session cache"));
       }
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   if(data->set.ssl.certinfo) {
@@ -1448,7 +1476,7 @@
                                        SECPKG_ATTR_REMOTE_CERT_CONTEXT,
                                        &ccert_context);
 
-    if((sspi_status != SEC_E_OK) || (ccert_context == NULL)) {
+    if((sspi_status != SEC_E_OK) || !ccert_context) {
       failf(data, "schannel: failed to retrieve remote cert context");
       return CURLE_PEER_FAILED_VERIFICATION;
     }
@@ -1458,7 +1486,7 @@
     result = Curl_ssl_init_certinfo(data, certs_count);
     if(!result) {
       struct Adder_args args;
-      args.conn = conn;
+      args.data = data;
       args.idx = 0;
       args.certs_count = certs_count;
       traverse_cert_store(ccert_context, add_cert_to_certinfo, &args);
@@ -1475,11 +1503,10 @@
 }
 
 static CURLcode
-schannel_connect_common(struct connectdata *conn, int sockindex,
-                        bool nonblocking, bool *done)
+schannel_connect_common(struct Curl_easy *data, struct connectdata *conn,
+                        int sockindex, bool nonblocking, bool *done)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   timediff_t timeout_ms;
@@ -1501,7 +1528,7 @@
       return CURLE_OPERATION_TIMEDOUT;
     }
 
-    result = schannel_connect_step1(conn, sockindex);
+    result = schannel_connect_step1(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -1556,7 +1583,7 @@
      * ensuring that a client using select() or epoll() will always
      * have a valid fdset to wait on.
      */
-    result = schannel_connect_step2(conn, sockindex);
+    result = schannel_connect_step2(data, conn, sockindex);
     if(result || (nonblocking &&
                   (ssl_connect_2 == connssl->connecting_state ||
                    ssl_connect_2_reading == connssl->connecting_state ||
@@ -1566,7 +1593,7 @@
   } /* repeat step2 until all transactions are done. */
 
   if(ssl_connect_3 == connssl->connecting_state) {
-    result = schannel_connect_step3(conn, sockindex);
+    result = schannel_connect_step3(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -1597,12 +1624,13 @@
 }
 
 static ssize_t
-schannel_send(struct connectdata *conn, int sockindex,
+schannel_send(struct Curl_easy *data, int sockindex,
               const void *buf, size_t len, CURLcode *err)
 {
   ssize_t written = -1;
   size_t data_len = 0;
-  unsigned char *data = NULL;
+  unsigned char *ptr = NULL;
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   SecBuffer outbuf[4];
   SecBufferDesc outbuf_desc;
@@ -1629,19 +1657,19 @@
   /* calculate the complete message length and allocate a buffer for it */
   data_len = BACKEND->stream_sizes.cbHeader + len +
     BACKEND->stream_sizes.cbTrailer;
-  data = (unsigned char *) malloc(data_len);
-  if(data == NULL) {
+  ptr = (unsigned char *) malloc(data_len);
+  if(!ptr) {
     *err = CURLE_OUT_OF_MEMORY;
     return -1;
   }
 
   /* setup output buffers (header, data, trailer, empty) */
   InitSecBuffer(&outbuf[0], SECBUFFER_STREAM_HEADER,
-                data, BACKEND->stream_sizes.cbHeader);
+                ptr, BACKEND->stream_sizes.cbHeader);
   InitSecBuffer(&outbuf[1], SECBUFFER_DATA,
-                data + BACKEND->stream_sizes.cbHeader, curlx_uztoul(len));
+                ptr + BACKEND->stream_sizes.cbHeader, curlx_uztoul(len));
   InitSecBuffer(&outbuf[2], SECBUFFER_STREAM_TRAILER,
-                data + BACKEND->stream_sizes.cbHeader + len,
+                ptr + BACKEND->stream_sizes.cbHeader + len,
                 BACKEND->stream_sizes.cbTrailer);
   InitSecBuffer(&outbuf[3], SECBUFFER_EMPTY, NULL, 0);
   InitSecBufferDesc(&outbuf_desc, outbuf, 4);
@@ -1680,10 +1708,10 @@
     while(len > (size_t)written) {
       ssize_t this_write = 0;
       int what;
-      timediff_t timeout_ms = Curl_timeleft(conn->data, NULL, FALSE);
+      timediff_t timeout_ms = Curl_timeleft(data, NULL, FALSE);
       if(timeout_ms < 0) {
         /* we already got the timeout */
-        failf(conn->data, "schannel: timed out sending data "
+        failf(data, "schannel: timed out sending data "
               "(bytes sent: %zd)", written);
         *err = CURLE_OPERATION_TIMEDOUT;
         written = -1;
@@ -1694,13 +1722,13 @@
       what = SOCKET_WRITABLE(conn->sock[sockindex], timeout_ms);
       if(what < 0) {
         /* fatal error */
-        failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+        failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
         *err = CURLE_SEND_ERROR;
         written = -1;
         break;
       }
       else if(0 == what) {
-        failf(conn->data, "schannel: timed out sending data "
+        failf(data, "schannel: timed out sending data "
               "(bytes sent: %zd)", written);
         *err = CURLE_OPERATION_TIMEDOUT;
         written = -1;
@@ -1708,7 +1736,7 @@
       }
       /* socket is writable */
 
-      result = Curl_write_plain(conn, conn->sock[sockindex], data + written,
+      result = Curl_write_plain(data, conn->sock[sockindex], ptr + written,
                                 len - written, &this_write);
       if(result == CURLE_AGAIN)
         continue;
@@ -1728,7 +1756,7 @@
     *err = CURLE_SEND_ERROR;
   }
 
-  Curl_safefree(data);
+  Curl_safefree(ptr);
 
   if(len == (size_t)written)
     /* Encrypted message including header, data and trailer entirely sent.
@@ -1739,12 +1767,12 @@
 }
 
 static ssize_t
-schannel_recv(struct connectdata *conn, int sockindex,
+schannel_recv(struct Curl_easy *data, int sockindex,
               char *buf, size_t len, CURLcode *err)
 {
   size_t size = 0;
   ssize_t nread = -1;
-  struct Curl_easy *data = conn->data;
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   unsigned char *reallocated_buffer;
   size_t reallocated_length;
@@ -1766,31 +1794,29 @@
    * handled in the cleanup.
    */
 
-  DEBUGF(infof(data, "schannel: client wants to read %zu bytes\n", len));
+  DEBUGF(infof(data, "schannel: client wants to read %zu bytes", len));
   *err = CURLE_OK;
 
   if(len && len <= BACKEND->decdata_offset) {
-    infof(data, "schannel: enough decrypted data is already available\n");
+    infof(data, "schannel: enough decrypted data is already available");
     goto cleanup;
   }
   else if(BACKEND->recv_unrecoverable_err) {
     *err = BACKEND->recv_unrecoverable_err;
-    infof(data, "schannel: an unrecoverable error occurred in a prior call\n");
+    infof(data, "schannel: an unrecoverable error occurred in a prior call");
     goto cleanup;
   }
   else if(BACKEND->recv_sspi_close_notify) {
     /* once a server has indicated shutdown there is no more encrypted data */
-    infof(data, "schannel: server indicated shutdown in a prior call\n");
+    infof(data, "schannel: server indicated shutdown in a prior call");
     goto cleanup;
   }
-  else if(!len) {
-    /* It's debatable what to return when !len. Regardless we can't return
-       immediately because there may be data to decrypt (in the case we want to
-       decrypt all encrypted cached data) so handle !len later in cleanup.
-    */
-    ; /* do nothing */
-  }
-  else if(!BACKEND->recv_connection_closed) {
+
+  /* It's debatable what to return when !len. Regardless we can't return
+     immediately because there may be data to decrypt (in the case we want to
+     decrypt all encrypted cached data) so handle !len later in cleanup.
+  */
+  else if(len && !BACKEND->recv_connection_closed) {
     /* increase enc buffer in order to fit the requested amount of data */
     size = BACKEND->encdata_length - BACKEND->encdata_offset;
     if(size < CURL_SCHANNEL_BUFFER_FREE_SIZE ||
@@ -1802,7 +1828,7 @@
       }
       reallocated_buffer = realloc(BACKEND->encdata_buffer,
                                    reallocated_length);
-      if(reallocated_buffer == NULL) {
+      if(!reallocated_buffer) {
         *err = CURLE_OUT_OF_MEMORY;
         failf(data, "schannel: unable to re-allocate memory");
         goto cleanup;
@@ -1811,12 +1837,12 @@
       BACKEND->encdata_buffer = reallocated_buffer;
       BACKEND->encdata_length = reallocated_length;
       size = BACKEND->encdata_length - BACKEND->encdata_offset;
-      DEBUGF(infof(data, "schannel: encdata_buffer resized %zu\n",
+      DEBUGF(infof(data, "schannel: encdata_buffer resized %zu",
                    BACKEND->encdata_length));
     }
 
     DEBUGF(infof(data,
-                 "schannel: encrypted data buffer: offset %zu length %zu\n",
+                 "schannel: encrypted data buffer: offset %zu length %zu",
                  BACKEND->encdata_offset, BACKEND->encdata_length));
 
     /* read encrypted data from socket */
@@ -1828,25 +1854,25 @@
       nread = -1;
       if(*err == CURLE_AGAIN)
         DEBUGF(infof(data,
-                     "schannel: Curl_read_plain returned CURLE_AGAIN\n"));
+                     "schannel: Curl_read_plain returned CURLE_AGAIN"));
       else if(*err == CURLE_RECV_ERROR)
-        infof(data, "schannel: Curl_read_plain returned CURLE_RECV_ERROR\n");
+        infof(data, "schannel: Curl_read_plain returned CURLE_RECV_ERROR");
       else
-        infof(data, "schannel: Curl_read_plain returned error %d\n", *err);
+        infof(data, "schannel: Curl_read_plain returned error %d", *err);
     }
     else if(nread == 0) {
       BACKEND->recv_connection_closed = true;
-      DEBUGF(infof(data, "schannel: server closed the connection\n"));
+      DEBUGF(infof(data, "schannel: server closed the connection"));
     }
     else if(nread > 0) {
       BACKEND->encdata_offset += (size_t)nread;
       BACKEND->encdata_is_incomplete = false;
-      DEBUGF(infof(data, "schannel: encrypted data got %zd\n", nread));
+      DEBUGF(infof(data, "schannel: encrypted data got %zd", nread));
     }
   }
 
   DEBUGF(infof(data,
-               "schannel: encrypted data buffer: offset %zu length %zu\n",
+               "schannel: encrypted data buffer: offset %zu length %zu",
                BACKEND->encdata_offset, BACKEND->encdata_length));
 
   /* decrypt loop */
@@ -1875,7 +1901,7 @@
       /* check for successfully decrypted data, even before actual
          renegotiation or shutdown of the connection context */
       if(inbuf[1].BufferType == SECBUFFER_DATA) {
-        DEBUGF(infof(data, "schannel: decrypted data length: %lu\n",
+        DEBUGF(infof(data, "schannel: decrypted data length: %lu",
                      inbuf[1].cbBuffer));
 
         /* increase buffer in order to fit the received amount of data */
@@ -1891,7 +1917,7 @@
           }
           reallocated_buffer = realloc(BACKEND->decdata_buffer,
                                        reallocated_length);
-          if(reallocated_buffer == NULL) {
+          if(!reallocated_buffer) {
             *err = CURLE_OUT_OF_MEMORY;
             failf(data, "schannel: unable to re-allocate memory");
             goto cleanup;
@@ -1908,15 +1934,15 @@
           BACKEND->decdata_offset += size;
         }
 
-        DEBUGF(infof(data, "schannel: decrypted data added: %zu\n", size));
+        DEBUGF(infof(data, "schannel: decrypted data added: %zu", size));
         DEBUGF(infof(data,
-                     "schannel: decrypted cached: offset %zu length %zu\n",
+                     "schannel: decrypted cached: offset %zu length %zu",
                      BACKEND->decdata_offset, BACKEND->decdata_length));
       }
 
       /* check for remaining encrypted data */
       if(inbuf[3].BufferType == SECBUFFER_EXTRA && inbuf[3].cbBuffer > 0) {
-        DEBUGF(infof(data, "schannel: encrypted data length: %lu\n",
+        DEBUGF(infof(data, "schannel: encrypted data length: %lu",
                      inbuf[3].cbBuffer));
 
         /* check if the remaining data is less than the total amount
@@ -1932,7 +1958,7 @@
         }
 
         DEBUGF(infof(data,
-                     "schannel: encrypted cached: offset %zu length %zu\n",
+                     "schannel: encrypted cached: offset %zu length %zu",
                      BACKEND->encdata_offset, BACKEND->encdata_length));
       }
       else {
@@ -1942,29 +1968,29 @@
 
       /* check if server wants to renegotiate the connection context */
       if(sspi_status == SEC_I_RENEGOTIATE) {
-        infof(data, "schannel: remote party requests renegotiation\n");
+        infof(data, "schannel: remote party requests renegotiation");
         if(*err && *err != CURLE_AGAIN) {
-          infof(data, "schannel: can't renogotiate, an error is pending\n");
+          infof(data, "schannel: can't renogotiate, an error is pending");
           goto cleanup;
         }
         if(BACKEND->encdata_offset) {
           *err = CURLE_RECV_ERROR;
           infof(data, "schannel: can't renogotiate, "
-                "encrypted data available\n");
+                "encrypted data available");
           goto cleanup;
         }
         /* begin renegotiation */
-        infof(data, "schannel: renegotiating SSL/TLS connection\n");
+        infof(data, "schannel: renegotiating SSL/TLS connection");
         connssl->state = ssl_connection_negotiating;
         connssl->connecting_state = ssl_connect_2_writing;
-        *err = schannel_connect_common(conn, sockindex, FALSE, &done);
+        *err = schannel_connect_common(data, conn, sockindex, FALSE, &done);
         if(*err) {
-          infof(data, "schannel: renegotiation failed\n");
+          infof(data, "schannel: renegotiation failed");
           goto cleanup;
         }
         /* now retry receiving data */
         sspi_status = SEC_E_OK;
-        infof(data, "schannel: SSL/TLS connection renegotiated\n");
+        infof(data, "schannel: SSL/TLS connection renegotiated");
         continue;
       }
       /* check if the server closed the connection */
@@ -1974,7 +2000,7 @@
         BACKEND->recv_sspi_close_notify = true;
         if(!BACKEND->recv_connection_closed) {
           BACKEND->recv_connection_closed = true;
-          infof(data, "schannel: server closed the connection\n");
+          infof(data, "schannel: server closed the connection");
         }
         goto cleanup;
       }
@@ -1983,7 +2009,7 @@
       BACKEND->encdata_is_incomplete = true;
       if(!*err)
         *err = CURLE_AGAIN;
-      infof(data, "schannel: failed to decrypt data, need more data\n");
+      infof(data, "schannel: failed to decrypt data, need more data");
       goto cleanup;
     }
     else {
@@ -1991,23 +2017,23 @@
       char buffer[STRERROR_LEN];
 #endif
       *err = CURLE_RECV_ERROR;
-      infof(data, "schannel: failed to read data from server: %s\n",
+      infof(data, "schannel: failed to read data from server: %s",
             Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
       goto cleanup;
     }
   }
 
   DEBUGF(infof(data,
-               "schannel: encrypted data buffer: offset %zu length %zu\n",
+               "schannel: encrypted data buffer: offset %zu length %zu",
                BACKEND->encdata_offset, BACKEND->encdata_length));
 
   DEBUGF(infof(data,
-               "schannel: decrypted data buffer: offset %zu length %zu\n",
+               "schannel: decrypted data buffer: offset %zu length %zu",
                BACKEND->decdata_offset, BACKEND->decdata_length));
 
   cleanup:
   /* Warning- there is no guarantee the encdata state is valid at this point */
-  DEBUGF(infof(data, "schannel: schannel_recv cleanup\n"));
+  DEBUGF(infof(data, "schannel: schannel_recv cleanup"));
 
   /* Error if the connection has closed without a close_notify.
 
@@ -2029,7 +2055,7 @@
       BACKEND->recv_sspi_close_notify = true;
     else {
       *err = CURLE_RECV_ERROR;
-      infof(data, "schannel: server closed abruptly (missing close_notify)\n");
+      infof(data, "schannel: server closed abruptly (missing close_notify)");
     }
   }
 
@@ -2043,9 +2069,9 @@
     memmove(BACKEND->decdata_buffer, BACKEND->decdata_buffer + size,
             BACKEND->decdata_offset - size);
     BACKEND->decdata_offset -= size;
-    DEBUGF(infof(data, "schannel: decrypted data returned %zu\n", size));
+    DEBUGF(infof(data, "schannel: decrypted data returned %zu", size));
     DEBUGF(infof(data,
-                 "schannel: decrypted data buffer: offset %zu length %zu\n",
+                 "schannel: decrypted data buffer: offset %zu length %zu",
                  BACKEND->decdata_offset, BACKEND->decdata_length));
     *err = CURLE_OK;
     return (ssize_t)size;
@@ -2064,18 +2090,20 @@
   return *err ? -1 : 0;
 }
 
-static CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn,
-                                                  int sockindex, bool *done)
+static CURLcode schannel_connect_nonblocking(struct Curl_easy *data,
+                                             struct connectdata *conn,
+                                             int sockindex, bool *done)
 {
-  return schannel_connect_common(conn, sockindex, TRUE, done);
+  return schannel_connect_common(data, conn, sockindex, TRUE, done);
 }
 
-static CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex)
+static CURLcode schannel_connect(struct Curl_easy *data,
+                                 struct connectdata *conn, int sockindex)
 {
   CURLcode result;
   bool done = FALSE;
 
-  result = schannel_connect_common(conn, sockindex, FALSE, &done);
+  result = schannel_connect_common(data, conn, sockindex, FALSE, &done);
   if(result)
     return result;
 
@@ -2084,8 +2112,8 @@
   return CURLE_OK;
 }
 
-static bool Curl_schannel_data_pending(const struct connectdata *conn,
-                                       int sockindex)
+static bool schannel_data_pending(const struct connectdata *conn,
+                                  int sockindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 
@@ -2096,14 +2124,15 @@
     return FALSE;
 }
 
-static void Curl_schannel_close(struct connectdata *conn, int sockindex)
+static void schannel_close(struct Curl_easy *data, struct connectdata *conn,
+                           int sockindex)
 {
   if(conn->ssl[sockindex].use)
     /* if the SSL/TLS channel hasn't been shut down yet, do that now. */
-    Curl_ssl_shutdown(conn, sockindex);
+    Curl_ssl_shutdown(data, conn, sockindex);
 }
 
-static void Curl_schannel_session_free(void *ptr)
+static void schannel_session_free(void *ptr)
 {
   /* this is expected to be called under sessionid lock */
   struct Curl_schannel_cred *cred = ptr;
@@ -2115,23 +2144,18 @@
   }
 }
 
-static int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
+static int schannel_shutdown(struct Curl_easy *data, struct connectdata *conn,
+                             int sockindex)
 {
   /* See https://msdn.microsoft.com/en-us/library/windows/desktop/aa380138.aspx
    * Shutting Down an Schannel Connection
    */
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-#ifndef CURL_DISABLE_PROXY
-  char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-#else
-  char * const hostname = conn->host.name;
-#endif
+  char * const hostname = SSL_HOST_NAME();
 
   DEBUGASSERT(data);
 
-  infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n",
+  infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu",
         hostname, conn->remote_port);
 
   if(BACKEND->cred && BACKEND->ctxt) {
@@ -2183,34 +2207,29 @@
     if((sspi_status == SEC_E_OK) || (sspi_status == SEC_I_CONTEXT_EXPIRED)) {
       /* send close message which is in output buffer */
       ssize_t written;
-      result = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer,
+      result = Curl_write_plain(data, conn->sock[sockindex], outbuf.pvBuffer,
                                 outbuf.cbBuffer, &written);
 
       s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
       if((result != CURLE_OK) || (outbuf.cbBuffer != (size_t) written)) {
         infof(data, "schannel: failed to send close msg: %s"
-              " (bytes written: %zd)\n", curl_easy_strerror(result), written);
+              " (bytes written: %zd)", curl_easy_strerror(result), written);
       }
     }
   }
 
   /* free SSPI Schannel API security context handle */
   if(BACKEND->ctxt) {
-    DEBUGF(infof(data, "schannel: clear security context handle\n"));
+    DEBUGF(infof(data, "schannel: clear security context handle"));
     s_pSecFn->DeleteSecurityContext(&BACKEND->ctxt->ctxt_handle);
     Curl_safefree(BACKEND->ctxt);
   }
 
   /* free SSPI Schannel API credential handle */
   if(BACKEND->cred) {
-    /*
-     * When this function is called from Curl_schannel_close() the connection
-     * might not have an associated transfer so the check for conn->data is
-     * necessary.
-     */
-    Curl_ssl_sessionid_lock(conn);
-    Curl_schannel_session_free(BACKEND->cred);
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_lock(data);
+    schannel_session_free(BACKEND->cred);
+    Curl_ssl_sessionid_unlock(data);
     BACKEND->cred = NULL;
   }
 
@@ -2232,25 +2251,25 @@
   return CURLE_OK;
 }
 
-static int Curl_schannel_init(void)
+static int schannel_init(void)
 {
   return (Curl_sspi_global_init() == CURLE_OK ? 1 : 0);
 }
 
-static void Curl_schannel_cleanup(void)
+static void schannel_cleanup(void)
 {
   Curl_sspi_global_cleanup();
 }
 
-static size_t Curl_schannel_version(char *buffer, size_t size)
+static size_t schannel_version(char *buffer, size_t size)
 {
   size = msnprintf(buffer, size, "Schannel");
 
   return size;
 }
 
-static CURLcode Curl_schannel_random(struct Curl_easy *data UNUSED_PARAM,
-                                     unsigned char *entropy, size_t length)
+static CURLcode schannel_random(struct Curl_easy *data UNUSED_PARAM,
+                                unsigned char *entropy, size_t length)
 {
   HCRYPTPROV hCryptProv = 0;
 
@@ -2269,10 +2288,10 @@
   return CURLE_OK;
 }
 
-static CURLcode pkp_pin_peer_pubkey(struct connectdata *conn, int sockindex,
+static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
+                                    struct connectdata *conn, int sockindex,
                                     const char *pinnedpubkey)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   CERT_CONTEXT *pCertContextServer = NULL;
 
@@ -2295,7 +2314,7 @@
                                        SECPKG_ATTR_REMOTE_CERT_CONTEXT,
                                        &pCertContextServer);
 
-    if((sspi_status != SEC_E_OK) || (pCertContextServer == NULL)) {
+    if((sspi_status != SEC_E_OK) || !pCertContextServer) {
       char buffer[STRERROR_LEN];
       failf(data, "schannel: Failed to read remote certificate context: %s",
             Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
@@ -2334,12 +2353,12 @@
   return result;
 }
 
-static void Curl_schannel_checksum(const unsigned char *input,
-                                   size_t inputlen,
-                                   unsigned char *checksum,
-                                   size_t checksumlen,
-                                   DWORD provType,
-                                   const unsigned int algId)
+static void schannel_checksum(const unsigned char *input,
+                              size_t inputlen,
+                              unsigned char *checksum,
+                              size_t checksumlen,
+                              DWORD provType,
+                              const unsigned int algId)
 {
   HCRYPTPROV hProv = 0;
   HCRYPTHASH hHash = 0;
@@ -2384,28 +2403,18 @@
     CryptReleaseContext(hProv, 0);
 }
 
-static CURLcode Curl_schannel_md5sum(unsigned char *input,
-                                     size_t inputlen,
-                                     unsigned char *md5sum,
-                                     size_t md5len)
+static CURLcode schannel_sha256sum(const unsigned char *input,
+                                   size_t inputlen,
+                                   unsigned char *sha256sum,
+                                   size_t sha256len)
 {
-  Curl_schannel_checksum(input, inputlen, md5sum, md5len,
-                         PROV_RSA_FULL, CALG_MD5);
+  schannel_checksum(input, inputlen, sha256sum, sha256len,
+                    PROV_RSA_AES, CALG_SHA_256);
   return CURLE_OK;
 }
 
-static CURLcode Curl_schannel_sha256sum(const unsigned char *input,
-                                        size_t inputlen,
-                                        unsigned char *sha256sum,
-                                        size_t sha256len)
-{
-  Curl_schannel_checksum(input, inputlen, sha256sum, sha256len,
-                         PROV_RSA_AES, CALG_SHA_256);
-  return CURLE_OK;
-}
-
-static void *Curl_schannel_get_internals(struct ssl_connect_data *connssl,
-                                         CURLINFO info UNUSED_PARAM)
+static void *schannel_get_internals(struct ssl_connect_data *connssl,
+                                    CURLINFO info UNUSED_PARAM)
 {
   (void)info;
   return &BACKEND->ctxt->ctxt_handle;
@@ -2415,30 +2424,35 @@
   { CURLSSLBACKEND_SCHANNEL, "schannel" }, /* info */
 
   SSLSUPP_CERTINFO |
+#ifdef HAS_MANUAL_VERIFY_API
+  SSLSUPP_CAINFO_BLOB |
+#endif
   SSLSUPP_PINNEDPUBKEY,
 
   sizeof(struct ssl_backend_data),
 
-  Curl_schannel_init,                /* init */
-  Curl_schannel_cleanup,             /* cleanup */
-  Curl_schannel_version,             /* version */
+  schannel_init,                     /* init */
+  schannel_cleanup,                  /* cleanup */
+  schannel_version,                  /* version */
   Curl_none_check_cxn,               /* check_cxn */
-  Curl_schannel_shutdown,            /* shutdown */
-  Curl_schannel_data_pending,        /* data_pending */
-  Curl_schannel_random,              /* random */
+  schannel_shutdown,                 /* shutdown */
+  schannel_data_pending,             /* data_pending */
+  schannel_random,                   /* random */
   Curl_none_cert_status_request,     /* cert_status_request */
-  Curl_schannel_connect,             /* connect */
-  Curl_schannel_connect_nonblocking, /* connect_nonblocking */
-  Curl_schannel_get_internals,       /* get_internals */
-  Curl_schannel_close,               /* close_one */
+  schannel_connect,                  /* connect */
+  schannel_connect_nonblocking,      /* connect_nonblocking */
+  Curl_ssl_getsock,                  /* getsock */
+  schannel_get_internals,            /* get_internals */
+  schannel_close,                    /* close_one */
   Curl_none_close_all,               /* close_all */
-  Curl_schannel_session_free,        /* session_free */
+  schannel_session_free,             /* session_free */
   Curl_none_set_engine,              /* set_engine */
   Curl_none_set_engine_default,      /* set_engine_default */
   Curl_none_engines_list,            /* engines_list */
   Curl_none_false_start,             /* false_start */
-  Curl_schannel_md5sum,              /* md5sum */
-  Curl_schannel_sha256sum            /* sha256sum */
+  schannel_sha256sum,                /* sha256sum */
+  NULL,                              /* associate_connection */
+  NULL                               /* disassociate_connection */
 };
 
 #endif /* USE_SCHANNEL */
diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h
index f87bae8..77853aa 100644
--- a/lib/vtls/schannel.h
+++ b/lib/vtls/schannel.h
@@ -8,11 +8,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2012, Marc Hoersken, <info@marc-hoersken.de>, et al.
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -53,7 +53,8 @@
 
 extern const struct Curl_ssl Curl_ssl_schannel;
 
-CURLcode Curl_verify_certificate(struct connectdata *conn, int sockindex);
+CURLcode Curl_verify_certificate(struct Curl_easy *data,
+                                 struct connectdata *conn, int sockindex);
 
 /* structs to expose only in schannel.c and schannel_verify.c */
 #ifdef EXPOSE_SCHANNEL_INTERNAL_STRUCTS
@@ -70,6 +71,8 @@
 #endif
 #endif
 
+#define NUMOF_CIPHERS 45 /* There are 45 listed in the MS headers */
+
 struct Curl_schannel_cred {
   CredHandle cred_handle;
   TimeStamp time_stamp;
@@ -101,6 +104,7 @@
 #ifdef HAS_MANUAL_VERIFY_API
   bool use_manual_cred_validation; /* true if manual cred validation is used */
 #endif
+  ALG_ID algIds[NUMOF_CIPHERS];
 };
 #endif /* EXPOSE_SCHANNEL_INTERNAL_STRUCTS */
 
diff --git a/lib/vtls/schannel_verify.c b/lib/vtls/schannel_verify.c
index ab7be39..12fccaa 100644
--- a/lib/vtls/schannel_verify.c
+++ b/lib/vtls/schannel_verify.c
@@ -7,11 +7,11 @@
  *
  * Copyright (C) 2012 - 2016, Marc Hoersken, <info@marc-hoersken.de>
  * Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -77,22 +77,156 @@
   return c == '\r' || c == '\n';
 }
 
-static CURLcode add_certs_to_store(HCERTSTORE trust_store,
-                                   const char *ca_file,
-                                   struct connectdata *conn)
+/* Search the substring needle,needlelen into string haystack,haystacklen
+ * Strings don't need to be terminated by a '\0'.
+ * Similar of OSX/Linux memmem (not available on Visual Studio).
+ * Return position of beginning of first occurence or NULL if not found
+ */
+static const char *c_memmem(const void *haystack, size_t haystacklen,
+                            const void *needle, size_t needlelen)
+{
+  const char *p;
+  char first;
+  const char *str_limit = (const char *)haystack + haystacklen;
+  if(!needlelen || needlelen > haystacklen)
+    return NULL;
+  first = *(const char *)needle;
+  for(p = (const char *)haystack; p <= (str_limit - needlelen); p++)
+    if(((*p) == first) && (memcmp(p, needle, needlelen) == 0))
+      return p;
+
+  return NULL;
+}
+
+static CURLcode add_certs_data_to_store(HCERTSTORE trust_store,
+                                        const char *ca_buffer,
+                                        size_t ca_buffer_size,
+                                        const char *ca_file_text,
+                                        struct Curl_easy *data)
+{
+  const size_t begin_cert_len = strlen(BEGIN_CERT);
+  const size_t end_cert_len = strlen(END_CERT);
+  CURLcode result = CURLE_OK;
+  int num_certs = 0;
+  bool more_certs = 1;
+  const char *current_ca_file_ptr = ca_buffer;
+  const char *ca_buffer_limit = ca_buffer + ca_buffer_size;
+
+  while(more_certs && (current_ca_file_ptr<ca_buffer_limit)) {
+    const char *begin_cert_ptr = c_memmem(current_ca_file_ptr,
+                                          ca_buffer_limit-current_ca_file_ptr,
+                                          BEGIN_CERT,
+                                          begin_cert_len);
+    if(!begin_cert_ptr || !is_cr_or_lf(begin_cert_ptr[begin_cert_len])) {
+      more_certs = 0;
+    }
+    else {
+      const char *end_cert_ptr = c_memmem(begin_cert_ptr,
+                                          ca_buffer_limit-begin_cert_ptr,
+                                          END_CERT,
+                                          end_cert_len);
+      if(!end_cert_ptr) {
+        failf(data,
+              "schannel: CA file '%s' is not correctly formatted",
+              ca_file_text);
+        result = CURLE_SSL_CACERT_BADFILE;
+        more_certs = 0;
+      }
+      else {
+        CERT_BLOB cert_blob;
+        CERT_CONTEXT *cert_context = NULL;
+        BOOL add_cert_result = FALSE;
+        DWORD actual_content_type = 0;
+        DWORD cert_size = (DWORD)
+          ((end_cert_ptr + end_cert_len) - begin_cert_ptr);
+
+        cert_blob.pbData = (BYTE *)begin_cert_ptr;
+        cert_blob.cbData = cert_size;
+        if(!CryptQueryObject(CERT_QUERY_OBJECT_BLOB,
+                             &cert_blob,
+                             CERT_QUERY_CONTENT_FLAG_CERT,
+                             CERT_QUERY_FORMAT_FLAG_ALL,
+                             0,
+                             NULL,
+                             &actual_content_type,
+                             NULL,
+                             NULL,
+                             NULL,
+                             (const void **)&cert_context)) {
+          char buffer[STRERROR_LEN];
+          failf(data,
+                "schannel: failed to extract certificate from CA file "
+                "'%s': %s",
+                ca_file_text,
+                Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer)));
+          result = CURLE_SSL_CACERT_BADFILE;
+          more_certs = 0;
+        }
+        else {
+          current_ca_file_ptr = begin_cert_ptr + cert_size;
+
+          /* Sanity check that the cert_context object is the right type */
+          if(CERT_QUERY_CONTENT_CERT != actual_content_type) {
+            failf(data,
+                  "schannel: unexpected content type '%d' when extracting "
+                  "certificate from CA file '%s'",
+                  actual_content_type, ca_file_text);
+            result = CURLE_SSL_CACERT_BADFILE;
+            more_certs = 0;
+          }
+          else {
+            add_cert_result =
+              CertAddCertificateContextToStore(trust_store,
+                                               cert_context,
+                                               CERT_STORE_ADD_ALWAYS,
+                                               NULL);
+            CertFreeCertificateContext(cert_context);
+            if(!add_cert_result) {
+              char buffer[STRERROR_LEN];
+              failf(data,
+                    "schannel: failed to add certificate from CA file '%s' "
+                    "to certificate store: %s",
+                    ca_file_text,
+                    Curl_winapi_strerror(GetLastError(), buffer,
+                                         sizeof(buffer)));
+              result = CURLE_SSL_CACERT_BADFILE;
+              more_certs = 0;
+            }
+            else {
+              num_certs++;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  if(result == CURLE_OK) {
+    if(!num_certs) {
+      infof(data,
+            "schannel: did not add any certificates from CA file '%s'",
+            ca_file_text);
+    }
+    else {
+      infof(data,
+            "schannel: added %d certificate(s) from CA file '%s'",
+            num_certs, ca_file_text);
+    }
+  }
+  return result;
+}
+
+static CURLcode add_certs_file_to_store(HCERTSTORE trust_store,
+                                        const char *ca_file,
+                                        struct Curl_easy *data)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   HANDLE ca_file_handle = INVALID_HANDLE_VALUE;
   LARGE_INTEGER file_size;
   char *ca_file_buffer = NULL;
-  char *current_ca_file_ptr = NULL;
   TCHAR *ca_file_tstr = NULL;
   size_t ca_file_bufsize = 0;
   DWORD total_bytes_read = 0;
-  bool more_certs = 0;
-  int num_certs = 0;
-  size_t END_CERT_LEN;
 
   ca_file_tstr = curlx_convert_UTF8_to_tchar((char *)ca_file);
   if(!ca_file_tstr) {
@@ -182,106 +316,10 @@
   if(result != CURLE_OK) {
     goto cleanup;
   }
-
-  END_CERT_LEN = strlen(END_CERT);
-
-  more_certs = 1;
-  current_ca_file_ptr = ca_file_buffer;
-  while(more_certs && *current_ca_file_ptr != '\0') {
-    char *begin_cert_ptr = strstr(current_ca_file_ptr, BEGIN_CERT);
-    if(!begin_cert_ptr || !is_cr_or_lf(begin_cert_ptr[strlen(BEGIN_CERT)])) {
-      more_certs = 0;
-    }
-    else {
-      char *end_cert_ptr = strstr(begin_cert_ptr, END_CERT);
-      if(!end_cert_ptr) {
-        failf(data,
-              "schannel: CA file '%s' is not correctly formatted",
-              ca_file);
-        result = CURLE_SSL_CACERT_BADFILE;
-        more_certs = 0;
-      }
-      else {
-        CERT_BLOB cert_blob;
-        CERT_CONTEXT *cert_context = NULL;
-        BOOL add_cert_result = FALSE;
-        DWORD actual_content_type = 0;
-        DWORD cert_size = (DWORD)
-          ((end_cert_ptr + END_CERT_LEN) - begin_cert_ptr);
-
-        cert_blob.pbData = (BYTE *)begin_cert_ptr;
-        cert_blob.cbData = cert_size;
-        if(!CryptQueryObject(CERT_QUERY_OBJECT_BLOB,
-                             &cert_blob,
-                             CERT_QUERY_CONTENT_FLAG_CERT,
-                             CERT_QUERY_FORMAT_FLAG_ALL,
-                             0,
-                             NULL,
-                             &actual_content_type,
-                             NULL,
-                             NULL,
-                             NULL,
-                             (const void **)&cert_context)) {
-          char buffer[STRERROR_LEN];
-          failf(data,
-                "schannel: failed to extract certificate from CA file "
-                "'%s': %s",
-                ca_file,
-                Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer)));
-          result = CURLE_SSL_CACERT_BADFILE;
-          more_certs = 0;
-        }
-        else {
-          current_ca_file_ptr = begin_cert_ptr + cert_size;
-
-          /* Sanity check that the cert_context object is the right type */
-          if(CERT_QUERY_CONTENT_CERT != actual_content_type) {
-            failf(data,
-                  "schannel: unexpected content type '%d' when extracting "
-                  "certificate from CA file '%s'",
-                  actual_content_type, ca_file);
-            result = CURLE_SSL_CACERT_BADFILE;
-            more_certs = 0;
-          }
-          else {
-            add_cert_result =
-              CertAddCertificateContextToStore(trust_store,
-                                               cert_context,
-                                               CERT_STORE_ADD_ALWAYS,
-                                               NULL);
-            CertFreeCertificateContext(cert_context);
-            if(!add_cert_result) {
-              char buffer[STRERROR_LEN];
-              failf(data,
-                    "schannel: failed to add certificate from CA file '%s' "
-                    "to certificate store: %s",
-                    ca_file,
-                    Curl_winapi_strerror(GetLastError(), buffer,
-                                         sizeof(buffer)));
-              result = CURLE_SSL_CACERT_BADFILE;
-              more_certs = 0;
-            }
-            else {
-              num_certs++;
-            }
-          }
-        }
-      }
-    }
-  }
-
-  if(result == CURLE_OK) {
-    if(!num_certs) {
-      infof(data,
-            "schannel: did not add any certificates from CA file '%s'\n",
-            ca_file);
-    }
-    else {
-      infof(data,
-            "schannel: added %d certificate(s) from CA file '%s'\n",
-            num_certs, ca_file);
-    }
-  }
+  result = add_certs_data_to_store(trust_store,
+                                   ca_file_buffer, ca_file_bufsize,
+                                   ca_file,
+                                   data);
 
 cleanup:
   if(ca_file_handle != INVALID_HANDLE_VALUE) {
@@ -390,7 +428,7 @@
     if(entry->dwAltNameChoice != CERT_ALT_NAME_DNS_NAME) {
       continue;
     }
-    if(entry->pwszDNSName == NULL) {
+    if(!entry->pwszDNSName) {
       infof(data, "schannel: Empty DNS name.");
       continue;
     }
@@ -477,7 +515,7 @@
      * (or some equivalent) encoding
      */
     cert_hostname = curlx_convert_tchar_to_UTF8(
-        &cert_hostname_buff[cert_hostname_buff_index]);
+      &cert_hostname_buff[cert_hostname_buff_index]);
     if(!cert_hostname) {
       result = CURLE_OUT_OF_MEMORY;
     }
@@ -488,7 +526,7 @@
       if(match_result == CURL_HOST_MATCH) {
         infof(data,
               "schannel: connection hostname (%s) validated "
-              "against certificate name (%s)\n",
+              "against certificate name (%s)",
               conn_hostname, cert_hostname);
         result = CURLE_OK;
       }
@@ -497,11 +535,11 @@
 
         infof(data,
               "schannel: connection hostname (%s) did not match "
-              "against certificate name (%s)\n",
+              "against certificate name (%s)",
               conn_hostname, cert_hostname);
 
-        cert_hostname_len = _tcslen(
-            &cert_hostname_buff[cert_hostname_buff_index]);
+        cert_hostname_len =
+          _tcslen(&cert_hostname_buff[cert_hostname_buff_index]);
 
         /* Move on to next cert name */
         cert_hostname_buff_index += cert_hostname_len + 1;
@@ -522,42 +560,37 @@
     failf(data, "schannel: server certificate name verification failed");
 
 cleanup:
-  curlx_unicodefree(cert_hostname_buff);
+  Curl_safefree(cert_hostname_buff);
 
   return result;
 }
 
-CURLcode Curl_verify_certificate(struct connectdata *conn, int sockindex)
+CURLcode Curl_verify_certificate(struct Curl_easy *data,
+                                 struct connectdata *conn, int sockindex)
 {
   SECURITY_STATUS sspi_status;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   CURLcode result = CURLE_OK;
   CERT_CONTEXT *pCertContextServer = NULL;
   const CERT_CHAIN_CONTEXT *pChainContext = NULL;
   HCERTCHAINENGINE cert_chain_engine = NULL;
   HCERTSTORE trust_store = NULL;
-#ifndef CURL_DISABLE_PROXY
-  const char * const conn_hostname = SSL_IS_PROXY() ?
-    conn->http_proxy.host.name :
-    conn->host.name;
-#else
-  const char * const conn_hostname = conn->host.name;
-#endif
+  const char * const conn_hostname = SSL_HOST_NAME();
 
   sspi_status =
     s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle,
                                      SECPKG_ATTR_REMOTE_CERT_CONTEXT,
                                      &pCertContextServer);
 
-  if((sspi_status != SEC_E_OK) || (pCertContextServer == NULL)) {
+  if((sspi_status != SEC_E_OK) || !pCertContextServer) {
     char buffer[STRERROR_LEN];
     failf(data, "schannel: Failed to read remote certificate context: %s",
           Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
     result = CURLE_PEER_FAILED_VERIFICATION;
   }
 
-  if(result == CURLE_OK && SSL_CONN_CONFIG(CAfile) &&
+  if(result == CURLE_OK &&
+      (SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(ca_info_blob)) &&
       BACKEND->use_manual_cred_validation) {
     /*
      * Create a chain engine that uses the certificates in the CA file as
@@ -583,8 +616,19 @@
         result = CURLE_SSL_CACERT_BADFILE;
       }
       else {
-        result = add_certs_to_store(trust_store, SSL_CONN_CONFIG(CAfile),
-                                    conn);
+        const struct curl_blob *ca_info_blob = SSL_CONN_CONFIG(ca_info_blob);
+        if(ca_info_blob) {
+          result = add_certs_data_to_store(trust_store,
+                                           (const char *)ca_info_blob->data,
+                                           ca_info_blob->len,
+                                           "(memory blob)",
+                                           data);
+        }
+        else {
+          result = add_certs_file_to_store(trust_store,
+                                           SSL_CONN_CONFIG(CAfile),
+                                           data);
+        }
       }
     }
 
@@ -625,7 +669,7 @@
                                 NULL,
                                 pCertContextServer->hCertStore,
                                 &ChainPara,
-                                (data->set.ssl.no_revoke ? 0 :
+                                (SSL_SET_OPTION(no_revoke) ? 0 :
                                  CERT_CHAIN_REVOCATION_CHECK_CHAIN),
                                 NULL,
                                 &pChainContext)) {
@@ -675,7 +719,7 @@
 
   if(result == CURLE_OK) {
     if(SSL_CONN_CONFIG(verifyhost)) {
-      result = verify_host(conn->data, pCertContextServer, conn_hostname);
+      result = verify_host(data, pCertContextServer, conn_hostname);
     }
   }
 
diff --git a/lib/vtls/sectransp.c b/lib/vtls/sectransp.c
index af63df4..26b833d 100644
--- a/lib/vtls/sectransp.c
+++ b/lib/vtls/sectransp.c
@@ -5,12 +5,12 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 2012 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  * Copyright (C) 2012 - 2017, Nick Zitzmann, <nickzman@gmail.com>.
- * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,6 +32,7 @@
 #include "curl_base64.h"
 #include "strtok.h"
 #include "multiif.h"
+#include "strcase.h"
 
 #ifdef USE_SECTRANSP
 
@@ -67,6 +68,7 @@
 #define CURL_BUILD_IOS_7 0
 #define CURL_BUILD_IOS_9 0
 #define CURL_BUILD_IOS_11 0
+#define CURL_BUILD_IOS_13 0
 #define CURL_BUILD_MAC 1
 /* This is the maximum API level we are allowed to use when building: */
 #define CURL_BUILD_MAC_10_5 MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
@@ -76,6 +78,7 @@
 #define CURL_BUILD_MAC_10_9 MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
 #define CURL_BUILD_MAC_10_11 MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
 #define CURL_BUILD_MAC_10_13 MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
+#define CURL_BUILD_MAC_10_15 MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
 /* These macros mean "the following code is present to allow runtime backward
    compatibility with at least this cat or earlier":
    (You set this at build-time using the compiler command line option
@@ -91,6 +94,7 @@
 #define CURL_BUILD_IOS_7 __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
 #define CURL_BUILD_IOS_9 __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
 #define CURL_BUILD_IOS_11 __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
+#define CURL_BUILD_IOS_13 __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
 #define CURL_BUILD_MAC 0
 #define CURL_BUILD_MAC_10_5 0
 #define CURL_BUILD_MAC_10_6 0
@@ -99,6 +103,7 @@
 #define CURL_BUILD_MAC_10_9 0
 #define CURL_BUILD_MAC_10_11 0
 #define CURL_BUILD_MAC_10_13 0
+#define CURL_BUILD_MAC_10_15 0
 #define CURL_SUPPORT_MAC_10_5 0
 #define CURL_SUPPORT_MAC_10_6 0
 #define CURL_SUPPORT_MAC_10_7 0
@@ -138,6 +143,636 @@
   size_t ssl_write_buffered_length;
 };
 
+struct st_cipher {
+  const char *name; /* Cipher suite IANA name. It starts with "TLS_" prefix */
+  const char *alias_name; /* Alias name is the same as OpenSSL cipher name */
+  SSLCipherSuite num; /* Cipher suite code/number defined in IANA registry */
+  bool weak; /* Flag to mark cipher as weak based on previous implementation
+                of Secure Transport back-end by CURL */
+};
+
+/* Macro to initialize st_cipher data structure: stringify id to name, cipher
+   number/id, 'weak' suite flag
+ */
+#define CIPHER_DEF(num, alias, weak) \
+  { #num, alias, num, weak }
+
+/*
+ Macro to initialize st_cipher data structure with name, code (IANA cipher
+ number/id value), and 'weak' suite flag. The first 28 cipher suite numbers
+ have the same IANA code for both SSL and TLS standards: numbers 0x0000 to
+ 0x001B. They have different names though. The first 4 letters of the cipher
+ suite name are the protocol name: "SSL_" or "TLS_", rest of the IANA name is
+ the same for both SSL and TLS cipher suite name.
+ The second part of the problem is that macOS/iOS SDKs don't define all TLS
+ codes but only 12 of them. The SDK defines all SSL codes though, i.e. SSL_NUM
+ constant is always defined for those 28 ciphers while TLS_NUM is defined only
+ for 12 of the first 28 ciphers. Those 12 TLS cipher codes match to
+ corresponding SSL enum value and represent the same cipher suite. Therefore
+ we'll use the SSL enum value for those cipher suites because it is defined
+ for all 28 of them.
+ We make internal data consistent and based on TLS names, i.e. all st_cipher
+ item names start with the "TLS_" prefix.
+ Summarizing all the above, those 28 first ciphers are presented in our table
+ with both TLS and SSL names. Their cipher numbers are assigned based on the
+ SDK enum value for the SSL cipher, which matches to IANA TLS number.
+ */
+#define CIPHER_DEF_SSLTLS(num_wo_prefix, alias, weak) \
+  { "TLS_" #num_wo_prefix, alias, SSL_##num_wo_prefix, weak }
+
+/*
+ Cipher suites were marked as weak based on the following:
+ RC4 encryption - rfc7465, the document contains a list of deprecated ciphers.
+     Marked in the code below as weak.
+ RC2 encryption - many mentions, was found vulnerable to a relatively easy
+     attack https://link.springer.com/chapter/10.1007%2F3-540-69710-1_14
+     Marked in the code below as weak.
+ DES and IDEA encryption - rfc5469, has a list of deprecated ciphers.
+     Marked in the code below as weak.
+ Anonymous Diffie-Hellman authentication and anonymous elliptic curve
+     Diffie-Hellman - vulnerable to a man-in-the-middle attack. Deprecated by
+     RFC 4346 aka TLS 1.1 (section A.5, page 60)
+ Null bulk encryption suites - not encrypted communication
+ Export ciphers, i.e. ciphers with restrictions to be used outside the US for
+     software exported to some countries, they were excluded from TLS 1.1
+     version. More precisely, they were noted as ciphers which MUST NOT be
+     negotiated in RFC 4346 aka TLS 1.1 (section A.5, pages 60 and 61).
+     All of those filters were considered weak because they contain a weak
+     algorithm like DES, RC2 or RC4, and already considered weak by other
+     criteria.
+ 3DES - NIST deprecated it and is going to retire it by 2023
+ https://csrc.nist.gov/News/2017/Update-to-Current-Use-and-Deprecation-of-TDEA
+     OpenSSL https://www.openssl.org/blog/blog/2016/08/24/sweet32/ also
+     deprecated those ciphers. Some other libraries also consider it
+     vulnerable or at least not strong enough.
+
+ CBC ciphers are vulnerable with SSL3.0 and TLS1.0:
+ https://www.cisco.com/c/en/us/support/docs/security/email-security-appliance
+ /118518-technote-esa-00.html
+     We don't take care of this issue because it is resolved by later TLS
+     versions and for us, it requires more complicated checks, we need to
+     check a protocol version also. Vulnerability doesn't look very critical
+     and we do not filter out those cipher suites.
+ */
+
+#define CIPHER_WEAK_NOT_ENCRYPTED   TRUE
+#define CIPHER_WEAK_RC_ENCRYPTION   TRUE
+#define CIPHER_WEAK_DES_ENCRYPTION  TRUE
+#define CIPHER_WEAK_IDEA_ENCRYPTION TRUE
+#define CIPHER_WEAK_ANON_AUTH       TRUE
+#define CIPHER_WEAK_3DES_ENCRYPTION TRUE
+#define CIPHER_STRONG_ENOUGH        FALSE
+
+/* Please do not change the order of the first ciphers available for SSL.
+   Do not insert and do not delete any of them. Code below
+   depends on their order and continuity.
+   If you add a new cipher, please maintain order by number, i.e.
+   insert in between existing items to appropriate place based on
+   cipher suite IANA number
+*/
+const static struct st_cipher ciphertable[] = {
+  /* SSL version 3.0 and initial TLS 1.0 cipher suites.
+     Defined since SDK 10.2.8 */
+  CIPHER_DEF_SSLTLS(NULL_WITH_NULL_NULL,                           /* 0x0000 */
+                    NULL,
+                    CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF_SSLTLS(RSA_WITH_NULL_MD5,                             /* 0x0001 */
+                    "NULL-MD5",
+                    CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF_SSLTLS(RSA_WITH_NULL_SHA,                             /* 0x0002 */
+                    "NULL-SHA",
+                    CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF_SSLTLS(RSA_EXPORT_WITH_RC4_40_MD5,                    /* 0x0003 */
+                    "EXP-RC4-MD5",
+                    CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_WITH_RC4_128_MD5,                          /* 0x0004 */
+                    "RC4-MD5",
+                    CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_WITH_RC4_128_SHA,                          /* 0x0005 */
+                    "RC4-SHA",
+                    CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_EXPORT_WITH_RC2_CBC_40_MD5,                /* 0x0006 */
+                    "EXP-RC2-CBC-MD5",
+                    CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_WITH_IDEA_CBC_SHA,                         /* 0x0007 */
+                    "IDEA-CBC-SHA",
+                    CIPHER_WEAK_IDEA_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_EXPORT_WITH_DES40_CBC_SHA,                 /* 0x0008 */
+                    "EXP-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_WITH_DES_CBC_SHA,                          /* 0x0009 */
+                    "DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(RSA_WITH_3DES_EDE_CBC_SHA,                     /* 0x000A */
+                    "DES-CBC3-SHA",
+                    CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_DSS_EXPORT_WITH_DES40_CBC_SHA,              /* 0x000B */
+                    "EXP-DH-DSS-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_DSS_WITH_DES_CBC_SHA,                       /* 0x000C */
+                    "DH-DSS-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_DSS_WITH_3DES_EDE_CBC_SHA,                  /* 0x000D */
+                    "DH-DSS-DES-CBC3-SHA",
+                    CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_RSA_EXPORT_WITH_DES40_CBC_SHA,              /* 0x000E */
+                    "EXP-DH-RSA-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_RSA_WITH_DES_CBC_SHA,                       /* 0x000F */
+                    "DH-RSA-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_RSA_WITH_3DES_EDE_CBC_SHA,                  /* 0x0010 */
+                    "DH-RSA-DES-CBC3-SHA",
+                    CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,             /* 0x0011 */
+                    "EXP-EDH-DSS-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DHE_DSS_WITH_DES_CBC_SHA,                      /* 0x0012 */
+                    "EDH-DSS-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DHE_DSS_WITH_3DES_EDE_CBC_SHA,                 /* 0x0013 */
+                    "DHE-DSS-DES-CBC3-SHA",
+                    CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,             /* 0x0014 */
+                    "EXP-EDH-RSA-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DHE_RSA_WITH_DES_CBC_SHA,                      /* 0x0015 */
+                    "EDH-RSA-DES-CBC-SHA",
+                    CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DHE_RSA_WITH_3DES_EDE_CBC_SHA,                 /* 0x0016 */
+                    "DHE-RSA-DES-CBC3-SHA",
+                    CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF_SSLTLS(DH_anon_EXPORT_WITH_RC4_40_MD5,                /* 0x0017 */
+                    "EXP-ADH-RC4-MD5",
+                    CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF_SSLTLS(DH_anon_WITH_RC4_128_MD5,                      /* 0x0018 */
+                    "ADH-RC4-MD5",
+                    CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF_SSLTLS(DH_anon_EXPORT_WITH_DES40_CBC_SHA,             /* 0x0019 */
+                    "EXP-ADH-DES-CBC-SHA",
+                    CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF_SSLTLS(DH_anon_WITH_DES_CBC_SHA,                      /* 0x001A */
+                    "ADH-DES-CBC-SHA",
+                    CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF_SSLTLS(DH_anon_WITH_3DES_EDE_CBC_SHA,                 /* 0x001B */
+                    "ADH-DES-CBC3-SHA",
+                    CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(SSL_FORTEZZA_DMS_WITH_NULL_SHA,                       /* 0x001C */
+             NULL,
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA,               /* 0x001D */
+             NULL,
+             CIPHER_STRONG_ENOUGH),
+
+#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
+  /* RFC 4785 - Pre-Shared Key (PSK) Ciphersuites with NULL Encryption */
+  CIPHER_DEF(TLS_PSK_WITH_NULL_SHA,                                /* 0x002C */
+             "PSK-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_NULL_SHA,                            /* 0x002D */
+             "DHE-PSK-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_NULL_SHA,                            /* 0x002E */
+             "RSA-PSK-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */
+
+  /* TLS addenda using AES, per RFC 3268. Defined since SDK 10.4u */
+  CIPHER_DEF(TLS_RSA_WITH_AES_128_CBC_SHA,                         /* 0x002F */
+             "AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_DSS_WITH_AES_128_CBC_SHA,                      /* 0x0030 */
+             "DH-DSS-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_RSA_WITH_AES_128_CBC_SHA,                      /* 0x0031 */
+             "DH-RSA-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_DSS_WITH_AES_128_CBC_SHA,                     /* 0x0032 */
+             "DHE-DSS-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_RSA_WITH_AES_128_CBC_SHA,                     /* 0x0033 */
+             "DHE-RSA-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_anon_WITH_AES_128_CBC_SHA,                     /* 0x0034 */
+             "ADH-AES128-SHA",
+             CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF(TLS_RSA_WITH_AES_256_CBC_SHA,                         /* 0x0035 */
+             "AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_DSS_WITH_AES_256_CBC_SHA,                      /* 0x0036 */
+             "DH-DSS-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_RSA_WITH_AES_256_CBC_SHA,                      /* 0x0037 */
+             "DH-RSA-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_DSS_WITH_AES_256_CBC_SHA,                     /* 0x0038 */
+             "DHE-DSS-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_RSA_WITH_AES_256_CBC_SHA,                     /* 0x0039 */
+             "DHE-RSA-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_anon_WITH_AES_256_CBC_SHA,                     /* 0x003A */
+             "ADH-AES256-SHA",
+             CIPHER_WEAK_ANON_AUTH),
+
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+  /* TLS 1.2 addenda, RFC 5246 */
+  /* Server provided RSA certificate for key exchange. */
+  CIPHER_DEF(TLS_RSA_WITH_NULL_SHA256,                             /* 0x003B */
+             "NULL-SHA256",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_RSA_WITH_AES_128_CBC_SHA256,                      /* 0x003C */
+             "AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_WITH_AES_256_CBC_SHA256,                      /* 0x003D */
+             "AES256-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  /* Server-authenticated (and optionally client-authenticated)
+     Diffie-Hellman. */
+  CIPHER_DEF(TLS_DH_DSS_WITH_AES_128_CBC_SHA256,                   /* 0x003E */
+             "DH-DSS-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_RSA_WITH_AES_128_CBC_SHA256,                   /* 0x003F */
+             "DH-RSA-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,                  /* 0x0040 */
+             "DHE-DSS-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+
+  /* TLS 1.2 addenda, RFC 5246 */
+  CIPHER_DEF(TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,                  /* 0x0067 */
+             "DHE-RSA-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_DSS_WITH_AES_256_CBC_SHA256,                   /* 0x0068 */
+             "DH-DSS-AES256-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_RSA_WITH_AES_256_CBC_SHA256,                   /* 0x0069 */
+             "DH-RSA-AES256-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,                  /* 0x006A */
+             "DHE-DSS-AES256-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,                  /* 0x006B */
+             "DHE-RSA-AES256-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_anon_WITH_AES_128_CBC_SHA256,                  /* 0x006C */
+             "ADH-AES128-SHA256",
+             CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF(TLS_DH_anon_WITH_AES_256_CBC_SHA256,                  /* 0x006D */
+             "ADH-AES256-SHA256",
+             CIPHER_WEAK_ANON_AUTH),
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+
+#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
+  /* Addendum from RFC 4279, TLS PSK */
+  CIPHER_DEF(TLS_PSK_WITH_RC4_128_SHA,                             /* 0x008A */
+             "PSK-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_PSK_WITH_3DES_EDE_CBC_SHA,                        /* 0x008B */
+             "PSK-3DES-EDE-CBC-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_PSK_WITH_AES_128_CBC_SHA,                         /* 0x008C */
+             "PSK-AES128-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_PSK_WITH_AES_256_CBC_SHA,                         /* 0x008D */
+             "PSK-AES256-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_RC4_128_SHA,                         /* 0x008E */
+             "DHE-PSK-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,                    /* 0x008F */
+             "DHE-PSK-3DES-EDE-CBC-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_AES_128_CBC_SHA,                     /* 0x0090 */
+             "DHE-PSK-AES128-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_AES_256_CBC_SHA,                     /* 0x0091 */
+             "DHE-PSK-AES256-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_RC4_128_SHA,                         /* 0x0092 */
+             "RSA-PSK-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,                    /* 0x0093 */
+             "RSA-PSK-3DES-EDE-CBC-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_AES_128_CBC_SHA,                     /* 0x0094 */
+             "RSA-PSK-AES128-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_AES_256_CBC_SHA,                     /* 0x0095 */
+             "RSA-PSK-AES256-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */
+
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+  /* Addenda from rfc 5288 AES Galois Counter Mode (GCM) Cipher Suites
+     for TLS. */
+  CIPHER_DEF(TLS_RSA_WITH_AES_128_GCM_SHA256,                      /* 0x009C */
+             "AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_WITH_AES_256_GCM_SHA384,                      /* 0x009D */
+             "AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,                  /* 0x009E */
+             "DHE-RSA-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,                  /* 0x009F */
+             "DHE-RSA-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_RSA_WITH_AES_128_GCM_SHA256,                   /* 0x00A0 */
+             "DH-RSA-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_RSA_WITH_AES_256_GCM_SHA384,                   /* 0x00A1 */
+             "DH-RSA-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,                  /* 0x00A2 */
+             "DHE-DSS-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_DSS_WITH_AES_256_GCM_SHA384,                  /* 0x00A3 */
+             "DHE-DSS-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_DSS_WITH_AES_128_GCM_SHA256,                   /* 0x00A4 */
+             "DH-DSS-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_DSS_WITH_AES_256_GCM_SHA384,                   /* 0x00A5 */
+             "DH-DSS-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DH_anon_WITH_AES_128_GCM_SHA256,                  /* 0x00A6 */
+             "ADH-AES128-GCM-SHA256",
+             CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF(TLS_DH_anon_WITH_AES_256_GCM_SHA384,                  /* 0x00A7 */
+             "ADH-AES256-GCM-SHA384",
+             CIPHER_WEAK_ANON_AUTH),
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+
+#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
+  /* RFC 5487 - PSK with SHA-256/384 and AES GCM */
+  CIPHER_DEF(TLS_PSK_WITH_AES_128_GCM_SHA256,                      /* 0x00A8 */
+             "PSK-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_PSK_WITH_AES_256_GCM_SHA384,                      /* 0x00A9 */
+             "PSK-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,                  /* 0x00AA */
+             "DHE-PSK-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,                  /* 0x00AB */
+             "DHE-PSK-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,                  /* 0x00AC */
+             "RSA-PSK-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,                  /* 0x00AD */
+             "RSA-PSK-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_PSK_WITH_AES_128_CBC_SHA256,                      /* 0x00AE */
+             "PSK-AES128-CBC-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_PSK_WITH_AES_256_CBC_SHA384,                      /* 0x00AF */
+             "PSK-AES256-CBC-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_PSK_WITH_NULL_SHA256,                             /* 0x00B0 */
+             "PSK-NULL-SHA256",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_PSK_WITH_NULL_SHA384,                             /* 0x00B1 */
+             "PSK-NULL-SHA384",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,                  /* 0x00B2 */
+             "DHE-PSK-AES128-CBC-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,                  /* 0x00B3 */
+             "DHE-PSK-AES256-CBC-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_NULL_SHA256,                         /* 0x00B4 */
+             "DHE-PSK-NULL-SHA256",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_DHE_PSK_WITH_NULL_SHA384,                         /* 0x00B5 */
+             "DHE-PSK-NULL-SHA384",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,                  /* 0x00B6 */
+             "RSA-PSK-AES128-CBC-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,                  /* 0x00B7 */
+             "RSA-PSK-AES256-CBC-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_NULL_SHA256,                         /* 0x00B8 */
+             "RSA-PSK-NULL-SHA256",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_RSA_PSK_WITH_NULL_SHA384,                         /* 0x00B9 */
+             "RSA-PSK-NULL-SHA384",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */
+
+  /* RFC 5746 - Secure Renegotiation. This is not a real suite,
+     it is a response to initiate negotiation again */
+  CIPHER_DEF(TLS_EMPTY_RENEGOTIATION_INFO_SCSV,                    /* 0x00FF */
+             NULL,
+             CIPHER_STRONG_ENOUGH),
+
+#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
+  /* TLS 1.3 standard cipher suites for ChaCha20+Poly1305.
+     Note: TLS 1.3 ciphersuites do not specify the key exchange
+     algorithm -- they only specify the symmetric ciphers.
+     Cipher alias name matches to OpenSSL cipher name, and for
+     TLS 1.3 ciphers */
+  CIPHER_DEF(TLS_AES_128_GCM_SHA256,                               /* 0x1301 */
+             NULL,  /* The OpenSSL cipher name matches to the IANA name */
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_AES_256_GCM_SHA384,                               /* 0x1302 */
+             NULL,  /* The OpenSSL cipher name matches to the IANA name */
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_CHACHA20_POLY1305_SHA256,                         /* 0x1303 */
+             NULL,  /* The OpenSSL cipher name matches to the IANA name */
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_AES_128_CCM_SHA256,                               /* 0x1304 */
+             NULL,  /* The OpenSSL cipher name matches to the IANA name */
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_AES_128_CCM_8_SHA256,                             /* 0x1305 */
+             NULL,  /* The OpenSSL cipher name matches to the IANA name */
+             CIPHER_STRONG_ENOUGH),
+#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
+
+#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
+  /* ECDSA addenda, RFC 4492 */
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_NULL_SHA,                         /* 0xC001 */
+             "ECDH-ECDSA-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_RC4_128_SHA,                      /* 0xC002 */
+             "ECDH-ECDSA-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,                 /* 0xC003 */
+             "ECDH-ECDSA-DES-CBC3-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,                  /* 0xC004 */
+             "ECDH-ECDSA-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,                  /* 0xC005 */
+             "ECDH-ECDSA-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_NULL_SHA,                        /* 0xC006 */
+             "ECDHE-ECDSA-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,                     /* 0xC007 */
+             "ECDHE-ECDSA-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,                /* 0xC008 */
+             "ECDHE-ECDSA-DES-CBC3-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,                 /* 0xC009 */
+             "ECDHE-ECDSA-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,                 /* 0xC00A */
+             "ECDHE-ECDSA-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_NULL_SHA,                           /* 0xC00B */
+             "ECDH-RSA-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_RC4_128_SHA,                        /* 0xC00C */
+             "ECDH-RSA-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,                   /* 0xC00D */
+             "ECDH-RSA-DES-CBC3-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,                    /* 0xC00E */
+             "ECDH-RSA-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,                    /* 0xC00F */
+             "ECDH-RSA-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_NULL_SHA,                          /* 0xC010 */
+             "ECDHE-RSA-NULL-SHA",
+             CIPHER_WEAK_NOT_ENCRYPTED),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_RC4_128_SHA,                       /* 0xC011 */
+             "ECDHE-RSA-RC4-SHA",
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,                  /* 0xC012 */
+             "ECDHE-RSA-DES-CBC3-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,                   /* 0xC013 */
+             "ECDHE-RSA-AES128-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,                   /* 0xC014 */
+             "ECDHE-RSA-AES256-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_anon_WITH_NULL_SHA,                          /* 0xC015 */
+             "AECDH-NULL-SHA",
+             CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF(TLS_ECDH_anon_WITH_RC4_128_SHA,                       /* 0xC016 */
+             "AECDH-RC4-SHA",
+             CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF(TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,                  /* 0xC017 */
+             "AECDH-DES-CBC3-SHA",
+             CIPHER_WEAK_3DES_ENCRYPTION),
+  CIPHER_DEF(TLS_ECDH_anon_WITH_AES_128_CBC_SHA,                   /* 0xC018 */
+             "AECDH-AES128-SHA",
+             CIPHER_WEAK_ANON_AUTH),
+  CIPHER_DEF(TLS_ECDH_anon_WITH_AES_256_CBC_SHA,                   /* 0xC019 */
+             "AECDH-AES256-SHA",
+             CIPHER_WEAK_ANON_AUTH),
+#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
+
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+  /* Addenda from rfc 5289  Elliptic Curve Cipher Suites with
+     HMAC SHA-256/384. */
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,              /* 0xC023 */
+             "ECDHE-ECDSA-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,              /* 0xC024 */
+             "ECDHE-ECDSA-AES256-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,               /* 0xC025 */
+             "ECDH-ECDSA-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,               /* 0xC026 */
+             "ECDH-ECDSA-AES256-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,                /* 0xC027 */
+             "ECDHE-RSA-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,                /* 0xC028 */
+             "ECDHE-RSA-AES256-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,                 /* 0xC029 */
+             "ECDH-RSA-AES128-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,                 /* 0xC02A */
+             "ECDH-RSA-AES256-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  /* Addenda from rfc 5289  Elliptic Curve Cipher Suites with
+     SHA-256/384 and AES Galois Counter Mode (GCM) */
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,              /* 0xC02B */
+             "ECDHE-ECDSA-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,              /* 0xC02C */
+             "ECDHE-ECDSA-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,               /* 0xC02D */
+             "ECDH-ECDSA-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,               /* 0xC02E */
+             "ECDH-ECDSA-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,                /* 0xC02F */
+             "ECDHE-RSA-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,                /* 0xC030 */
+             "ECDHE-RSA-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,                 /* 0xC031 */
+             "ECDH-RSA-AES128-GCM-SHA256",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,                 /* 0xC032 */
+             "ECDH-RSA-AES256-GCM-SHA384",
+             CIPHER_STRONG_ENOUGH),
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+
+#if CURL_BUILD_MAC_10_15 || CURL_BUILD_IOS_13
+  /* ECDHE_PSK Cipher Suites for Transport Layer Security (TLS), RFC 5489 */
+  CIPHER_DEF(TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,                   /* 0xC035 */
+             "ECDHE-PSK-AES128-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,                   /* 0xC036 */
+             "ECDHE-PSK-AES256-CBC-SHA",
+             CIPHER_STRONG_ENOUGH),
+#endif /* CURL_BUILD_MAC_10_15 || CURL_BUILD_IOS_13 */
+
+#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
+  /* Addenda from rfc 7905  ChaCha20-Poly1305 Cipher Suites for
+     Transport Layer Security (TLS). */
+  CIPHER_DEF(TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,          /* 0xCCA8 */
+             "ECDHE-RSA-CHACHA20-POLY1305",
+             CIPHER_STRONG_ENOUGH),
+  CIPHER_DEF(TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,        /* 0xCCA9 */
+             "ECDHE-ECDSA-CHACHA20-POLY1305",
+             CIPHER_STRONG_ENOUGH),
+#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
+
+#if CURL_BUILD_MAC_10_15 || CURL_BUILD_IOS_13
+  /* ChaCha20-Poly1305 Cipher Suites for Transport Layer Security (TLS),
+     RFC 7905 */
+  CIPHER_DEF(TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,                /* 0xCCAB */
+             "PSK-CHACHA20-POLY1305",
+             CIPHER_STRONG_ENOUGH),
+#endif /* CURL_BUILD_MAC_10_15 || CURL_BUILD_IOS_13 */
+
+  /* Tags for SSL 2 cipher kinds which are not specified for SSL 3.
+     Defined since SDK 10.2.8 */
+  CIPHER_DEF(SSL_RSA_WITH_RC2_CBC_MD5,                             /* 0xFF80 */
+             NULL,
+             CIPHER_WEAK_RC_ENCRYPTION),
+  CIPHER_DEF(SSL_RSA_WITH_IDEA_CBC_MD5,                            /* 0xFF81 */
+             NULL,
+             CIPHER_WEAK_IDEA_ENCRYPTION),
+  CIPHER_DEF(SSL_RSA_WITH_DES_CBC_MD5,                             /* 0xFF82 */
+             NULL,
+             CIPHER_WEAK_DES_ENCRYPTION),
+  CIPHER_DEF(SSL_RSA_WITH_3DES_EDE_CBC_MD5,                        /* 0xFF83 */
+             NULL,
+             CIPHER_WEAK_3DES_ENCRYPTION),
+};
+
+#define NUM_OF_CIPHERS sizeof(ciphertable)/sizeof(ciphertable[0])
+
+
 /* pinned public key support tests */
 
 /* version 1 supports macOS 10.12+ and iOS 10+ */
@@ -295,586 +930,23 @@
 }
 
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
-CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher)
-{
-  switch(cipher) {
-    /* SSL version 3.0 */
-    case SSL_RSA_WITH_NULL_MD5:
-      return "SSL_RSA_WITH_NULL_MD5";
-      break;
-    case SSL_RSA_WITH_NULL_SHA:
-      return "SSL_RSA_WITH_NULL_SHA";
-      break;
-    case SSL_RSA_EXPORT_WITH_RC4_40_MD5:
-      return "SSL_RSA_EXPORT_WITH_RC4_40_MD5";
-      break;
-    case SSL_RSA_WITH_RC4_128_MD5:
-      return "SSL_RSA_WITH_RC4_128_MD5";
-      break;
-    case SSL_RSA_WITH_RC4_128_SHA:
-      return "SSL_RSA_WITH_RC4_128_SHA";
-      break;
-    case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5:
-      return "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5";
-      break;
-    case SSL_RSA_WITH_IDEA_CBC_SHA:
-      return "SSL_RSA_WITH_IDEA_CBC_SHA";
-      break;
-    case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA:
-      return "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA";
-      break;
-    case SSL_RSA_WITH_DES_CBC_SHA:
-      return "SSL_RSA_WITH_DES_CBC_SHA";
-      break;
-    case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "SSL_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA:
-      return "SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA";
-      break;
-    case SSL_DH_DSS_WITH_DES_CBC_SHA:
-      return "SSL_DH_DSS_WITH_DES_CBC_SHA";
-      break;
-    case SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA:
-      return "SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA:
-      return "SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA";
-      break;
-    case SSL_DH_RSA_WITH_DES_CBC_SHA:
-      return "SSL_DH_RSA_WITH_DES_CBC_SHA";
-      break;
-    case SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:
-      return "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA";
-      break;
-    case SSL_DHE_DSS_WITH_DES_CBC_SHA:
-      return "SSL_DHE_DSS_WITH_DES_CBC_SHA";
-      break;
-    case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
-      return "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:
-      return "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA";
-      break;
-    case SSL_DHE_RSA_WITH_DES_CBC_SHA:
-      return "SSL_DHE_RSA_WITH_DES_CBC_SHA";
-      break;
-    case SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5:
-      return "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5";
-      break;
-    case SSL_DH_anon_WITH_RC4_128_MD5:
-      return "SSL_DH_anon_WITH_RC4_128_MD5";
-      break;
-    case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA:
-      return "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA";
-      break;
-    case SSL_DH_anon_WITH_DES_CBC_SHA:
-      return "SSL_DH_anon_WITH_DES_CBC_SHA";
-      break;
-    case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
-      return "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
-      return "SSL_FORTEZZA_DMS_WITH_NULL_SHA";
-      break;
-    case SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA:
-      return "SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA";
-      break;
-    /* TLS 1.0 with AES (RFC 3268)
-       (Apparently these are used in SSLv3 implementations as well.) */
-    case TLS_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
-      return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
-      return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DH_anon_WITH_AES_128_CBC_SHA:
-      return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
-      return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
-      return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DH_anon_WITH_AES_256_CBC_SHA:
-      return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
-      break;
-    /* SSL version 2.0 */
-    case SSL_RSA_WITH_RC2_CBC_MD5:
-      return "SSL_RSA_WITH_RC2_CBC_MD5";
-      break;
-    case SSL_RSA_WITH_IDEA_CBC_MD5:
-      return "SSL_RSA_WITH_IDEA_CBC_MD5";
-      break;
-    case SSL_RSA_WITH_DES_CBC_MD5:
-      return "SSL_RSA_WITH_DES_CBC_MD5";
-      break;
-    case SSL_RSA_WITH_3DES_EDE_CBC_MD5:
-      return "SSL_RSA_WITH_3DES_EDE_CBC_MD5";
-      break;
-  }
-  return "SSL_NULL_WITH_NULL_NULL";
-}
-
 CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher)
 {
-  switch(cipher) {
-    /* TLS 1.0 with AES (RFC 3268) */
-    case TLS_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
-      return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
-      return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DH_anon_WITH_AES_128_CBC_SHA:
-      return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
-      return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
-      return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DH_anon_WITH_AES_256_CBC_SHA:
-      return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
-      break;
-#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
-    /* TLS 1.0 with ECDSA (RFC 4492) */
-    case TLS_ECDH_ECDSA_WITH_NULL_SHA:
-      return "TLS_ECDH_ECDSA_WITH_NULL_SHA";
-      break;
-    case TLS_ECDH_ECDSA_WITH_RC4_128_SHA:
-      return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA";
-      break;
-    case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA:
-      return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA:
-      return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_NULL_SHA:
-      return "TLS_ECDHE_ECDSA_WITH_NULL_SHA";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:
-      return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
-      return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
-      return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_ECDH_RSA_WITH_NULL_SHA:
-      return "TLS_ECDH_RSA_WITH_NULL_SHA";
-      break;
-    case TLS_ECDH_RSA_WITH_RC4_128_SHA:
-      return "TLS_ECDH_RSA_WITH_RC4_128_SHA";
-      break;
-    case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_ECDHE_RSA_WITH_NULL_SHA:
-      return "TLS_ECDHE_RSA_WITH_NULL_SHA";
-      break;
-    case TLS_ECDHE_RSA_WITH_RC4_128_SHA:
-      return "TLS_ECDHE_RSA_WITH_RC4_128_SHA";
-      break;
-    case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
-      return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
-      return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_ECDH_anon_WITH_NULL_SHA:
-      return "TLS_ECDH_anon_WITH_NULL_SHA";
-      break;
-    case TLS_ECDH_anon_WITH_RC4_128_SHA:
-      return "TLS_ECDH_anon_WITH_RC4_128_SHA";
-      break;
-    case TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_ECDH_anon_WITH_AES_128_CBC_SHA:
-      return "TLS_ECDH_anon_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_ECDH_anon_WITH_AES_256_CBC_SHA:
-      return "TLS_ECDH_anon_WITH_AES_256_CBC_SHA";
-      break;
-#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
-#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
-    /* TLS 1.2 (RFC 5246) */
-    case TLS_RSA_WITH_NULL_MD5:
-      return "TLS_RSA_WITH_NULL_MD5";
-      break;
-    case TLS_RSA_WITH_NULL_SHA:
-      return "TLS_RSA_WITH_NULL_SHA";
-      break;
-    case TLS_RSA_WITH_RC4_128_MD5:
-      return "TLS_RSA_WITH_RC4_128_MD5";
-      break;
-    case TLS_RSA_WITH_RC4_128_SHA:
-      return "TLS_RSA_WITH_RC4_128_SHA";
-      break;
-    case TLS_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_RSA_WITH_NULL_SHA256:
-      return "TLS_RSA_WITH_NULL_SHA256";
-      break;
-    case TLS_RSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_RSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_RSA_WITH_AES_256_CBC_SHA256:
-      return "TLS_RSA_WITH_AES_256_CBC_SHA256";
-      break;
-    case TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_DH_DSS_WITH_AES_128_CBC_SHA256:
-      return "TLS_DH_DSS_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_DH_RSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_DH_RSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:
-      return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_DH_DSS_WITH_AES_256_CBC_SHA256:
-      return "TLS_DH_DSS_WITH_AES_256_CBC_SHA256";
-      break;
-    case TLS_DH_RSA_WITH_AES_256_CBC_SHA256:
-      return "TLS_DH_RSA_WITH_AES_256_CBC_SHA256";
-      break;
-    case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:
-      return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256";
-      break;
-    case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:
-      return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256";
-      break;
-    case TLS_DH_anon_WITH_RC4_128_MD5:
-      return "TLS_DH_anon_WITH_RC4_128_MD5";
-      break;
-    case TLS_DH_anon_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_DH_anon_WITH_AES_128_CBC_SHA256:
-      return "TLS_DH_anon_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_DH_anon_WITH_AES_256_CBC_SHA256:
-      return "TLS_DH_anon_WITH_AES_256_CBC_SHA256";
-      break;
-    /* TLS 1.2 with AES GCM (RFC 5288) */
-    case TLS_RSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_RSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_RSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_RSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_DH_RSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_DH_RSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_DH_RSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_DH_RSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256:
-      return "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384:
-      return "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_DH_DSS_WITH_AES_128_GCM_SHA256:
-      return "TLS_DH_DSS_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_DH_DSS_WITH_AES_256_GCM_SHA384:
-      return "TLS_DH_DSS_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_DH_anon_WITH_AES_128_GCM_SHA256:
-      return "TLS_DH_anon_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_DH_anon_WITH_AES_256_GCM_SHA384:
-      return "TLS_DH_anon_WITH_AES_256_GCM_SHA384";
-      break;
-    /* TLS 1.2 with elliptic curve ciphers (RFC 5289) */
-    case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:
-      return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384:
-      return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:
-      return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256:
-      return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384:
-      return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256:
-      return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384:
-      return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_EMPTY_RENEGOTIATION_INFO_SCSV:
-      return "TLS_EMPTY_RENEGOTIATION_INFO_SCSV";
-      break;
-#else
-    case SSL_RSA_WITH_NULL_MD5:
-      return "TLS_RSA_WITH_NULL_MD5";
-      break;
-    case SSL_RSA_WITH_NULL_SHA:
-      return "TLS_RSA_WITH_NULL_SHA";
-      break;
-    case SSL_RSA_WITH_RC4_128_MD5:
-      return "TLS_RSA_WITH_RC4_128_MD5";
-      break;
-    case SSL_RSA_WITH_RC4_128_SHA:
-      return "TLS_RSA_WITH_RC4_128_SHA";
-      break;
-    case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case SSL_DH_anon_WITH_RC4_128_MD5:
-      return "TLS_DH_anon_WITH_RC4_128_MD5";
-      break;
-    case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
-      break;
-#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
-#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
-    /* TLS PSK (RFC 4279): */
-    case TLS_PSK_WITH_RC4_128_SHA:
-      return "TLS_PSK_WITH_RC4_128_SHA";
-      break;
-    case TLS_PSK_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_PSK_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_PSK_WITH_AES_128_CBC_SHA:
-      return "TLS_PSK_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_PSK_WITH_AES_256_CBC_SHA:
-      return "TLS_PSK_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_DHE_PSK_WITH_RC4_128_SHA:
-      return "TLS_DHE_PSK_WITH_RC4_128_SHA";
-      break;
-    case TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_DHE_PSK_WITH_AES_128_CBC_SHA:
-      return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_DHE_PSK_WITH_AES_256_CBC_SHA:
-      return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA";
-      break;
-    case TLS_RSA_PSK_WITH_RC4_128_SHA:
-      return "TLS_RSA_PSK_WITH_RC4_128_SHA";
-      break;
-    case TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA:
-      return "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA";
-      break;
-    case TLS_RSA_PSK_WITH_AES_128_CBC_SHA:
-      return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA";
-      break;
-    case TLS_RSA_PSK_WITH_AES_256_CBC_SHA:
-      return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA";
-      break;
-    /* More TLS PSK (RFC 4785): */
-    case TLS_PSK_WITH_NULL_SHA:
-      return "TLS_PSK_WITH_NULL_SHA";
-      break;
-    case TLS_DHE_PSK_WITH_NULL_SHA:
-      return "TLS_DHE_PSK_WITH_NULL_SHA";
-      break;
-    case TLS_RSA_PSK_WITH_NULL_SHA:
-      return "TLS_RSA_PSK_WITH_NULL_SHA";
-      break;
-    /* Even more TLS PSK (RFC 5487): */
-    case TLS_PSK_WITH_AES_128_GCM_SHA256:
-      return "TLS_PSK_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_PSK_WITH_AES_256_GCM_SHA384:
-      return "TLS_PSK_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256:
-      return "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384:
-      return "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_RSA_PSK_WITH_AES_128_GCM_SHA256:
-      return "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256";
-      break;
-    case TLS_RSA_PSK_WITH_AES_256_GCM_SHA384:
-      return "TLS_PSK_WITH_AES_256_GCM_SHA384";
-      break;
-    case TLS_PSK_WITH_AES_128_CBC_SHA256:
-      return "TLS_PSK_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_PSK_WITH_AES_256_CBC_SHA384:
-      return "TLS_PSK_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_PSK_WITH_NULL_SHA256:
-      return "TLS_PSK_WITH_NULL_SHA256";
-      break;
-    case TLS_PSK_WITH_NULL_SHA384:
-      return "TLS_PSK_WITH_NULL_SHA384";
-      break;
-    case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256:
-      return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384:
-      return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_DHE_PSK_WITH_NULL_SHA256:
-      return "TLS_DHE_PSK_WITH_NULL_SHA256";
-      break;
-    case TLS_DHE_PSK_WITH_NULL_SHA384:
-      return "TLS_RSA_PSK_WITH_NULL_SHA384";
-      break;
-    case TLS_RSA_PSK_WITH_AES_128_CBC_SHA256:
-      return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256";
-      break;
-    case TLS_RSA_PSK_WITH_AES_256_CBC_SHA384:
-      return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384";
-      break;
-    case TLS_RSA_PSK_WITH_NULL_SHA256:
-      return "TLS_RSA_PSK_WITH_NULL_SHA256";
-      break;
-    case TLS_RSA_PSK_WITH_NULL_SHA384:
-      return "TLS_RSA_PSK_WITH_NULL_SHA384";
-      break;
-#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */
-#if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
-    /* New ChaCha20+Poly1305 cipher-suites used by TLS 1.3: */
-    case TLS_AES_128_GCM_SHA256:
-      return "TLS_AES_128_GCM_SHA256";
-      break;
-    case TLS_AES_256_GCM_SHA384:
-      return "TLS_AES_256_GCM_SHA384";
-      break;
-    case TLS_CHACHA20_POLY1305_SHA256:
-      return "TLS_CHACHA20_POLY1305_SHA256";
-      break;
-    case TLS_AES_128_CCM_SHA256:
-      return "TLS_AES_128_CCM_SHA256";
-      break;
-    case TLS_AES_128_CCM_8_SHA256:
-      return "TLS_AES_128_CCM_8_SHA256";
-      break;
-    case TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:
-      return "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256";
-      break;
-    case TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:
-      return "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256";
-      break;
-#endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
+  /* The first ciphers in the ciphertable are continuos. Here we do small
+     optimization and instead of loop directly get SSL name by cipher number.
+   */
+  if(cipher <= SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA) {
+    return ciphertable[cipher].name;
   }
-  return "TLS_NULL_WITH_NULL_NULL";
+  /* Iterate through the rest of the ciphers */
+  for(size_t i = SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA + 1;
+      i < NUM_OF_CIPHERS;
+      ++i) {
+    if(ciphertable[i].num == cipher) {
+      return ciphertable[i].name;
+    }
+  }
+  return ciphertable[SSL_NULL_WITH_NULL_NULL].name;
 }
 #endif /* !CURL_DISABLE_VERBOSE_STRINGS */
 
@@ -1087,12 +1159,14 @@
           (SecIdentityRef) CFArrayGetValueAtIndex(keys_list, i);
         err = SecIdentityCopyCertificate(identity, &cert);
         if(err == noErr) {
+          OSStatus copy_status = noErr;
 #if CURL_BUILD_IOS
           common_name = SecCertificateCopySubjectSummary(cert);
 #elif CURL_BUILD_MAC_10_7
-          SecCertificateCopyCommonName(cert, &common_name);
+          copy_status = SecCertificateCopyCommonName(cert, &common_name);
 #endif
-          if(CFStringCompare(common_name, label_cf, 0) == kCFCompareEqualTo) {
+          if(copy_status == noErr &&
+            CFStringCompare(common_name, label_cf, 0) == kCFCompareEqualTo) {
             CFRelease(cert);
             CFRelease(common_name);
             CFRetain(identity);
@@ -1253,7 +1327,7 @@
 {
   struct_stat st;
 
-  if(filename == NULL)
+  if(!filename)
     return false;
 
   if(stat(filename, &st) == 0)
@@ -1291,9 +1365,9 @@
 #endif
 
 static CURLcode
-set_ssl_version_min_max(struct connectdata *conn, int sockindex)
+set_ssl_version_min_max(struct Curl_easy *data, struct connectdata *conn,
+                        int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   long ssl_version = SSL_CONN_CONFIG(version);
@@ -1386,34 +1460,224 @@
   return CURLE_SSL_CONNECT_ERROR;
 }
 
+static bool is_cipher_suite_strong(SSLCipherSuite suite_num)
+{
+  for(size_t i = 0; i < NUM_OF_CIPHERS; ++i) {
+    if(ciphertable[i].num == suite_num) {
+      return !ciphertable[i].weak;
+    }
+  }
+  /* If the cipher is not in our list, assume it is a new one
+     and therefore strong. Previous implementation was the same,
+     if cipher suite is not in the list, it was considered strong enough */
+  return true;
+}
 
-static CURLcode sectransp_connect_step1(struct connectdata *conn,
+static bool is_separator(char c)
+{
+  /* Return whether character is a cipher list separator. */
+  switch(c) {
+  case ' ':
+  case '\t':
+  case ':':
+  case ',':
+  case ';':
+    return true;
+  }
+  return false;
+}
+
+static CURLcode sectransp_set_default_ciphers(struct Curl_easy *data,
+                                              SSLContextRef ssl_ctx)
+{
+  size_t all_ciphers_count = 0UL, allowed_ciphers_count = 0UL, i;
+  SSLCipherSuite *all_ciphers = NULL, *allowed_ciphers = NULL;
+  OSStatus err = noErr;
+
+#if CURL_BUILD_MAC
+  int darwinver_maj = 0, darwinver_min = 0;
+
+  GetDarwinVersionNumber(&darwinver_maj, &darwinver_min);
+#endif /* CURL_BUILD_MAC */
+
+  /* Disable cipher suites that ST supports but are not safe. These ciphers
+     are unlikely to be used in any case since ST gives other ciphers a much
+     higher priority, but it's probably better that we not connect at all than
+     to give the user a false sense of security if the server only supports
+     insecure ciphers. (Note: We don't care about SSLv2-only ciphers.) */
+  err = SSLGetNumberSupportedCiphers(ssl_ctx, &all_ciphers_count);
+  if(err != noErr) {
+    failf(data, "SSL: SSLGetNumberSupportedCiphers() failed: OSStatus %d",
+          err);
+    return CURLE_SSL_CIPHER;
+  }
+  all_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
+  if(!all_ciphers) {
+    failf(data, "SSL: Failed to allocate memory for all ciphers");
+    return CURLE_OUT_OF_MEMORY;
+  }
+  allowed_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
+  if(!allowed_ciphers) {
+    Curl_safefree(all_ciphers);
+    failf(data, "SSL: Failed to allocate memory for allowed ciphers");
+    return CURLE_OUT_OF_MEMORY;
+  }
+  err = SSLGetSupportedCiphers(ssl_ctx, all_ciphers,
+                               &all_ciphers_count);
+  if(err != noErr) {
+    Curl_safefree(all_ciphers);
+    Curl_safefree(allowed_ciphers);
+    return CURLE_SSL_CIPHER;
+  }
+  for(i = 0UL ; i < all_ciphers_count ; i++) {
+#if CURL_BUILD_MAC
+   /* There's a known bug in early versions of Mountain Lion where ST's ECC
+      ciphers (cipher suite 0xC001 through 0xC032) simply do not work.
+      Work around the problem here by disabling those ciphers if we are
+      running in an affected version of OS X. */
+    if(darwinver_maj == 12 && darwinver_min <= 3 &&
+       all_ciphers[i] >= 0xC001 && all_ciphers[i] <= 0xC032) {
+      continue;
+    }
+#endif /* CURL_BUILD_MAC */
+    if(is_cipher_suite_strong(all_ciphers[i])) {
+      allowed_ciphers[allowed_ciphers_count++] = all_ciphers[i];
+    }
+  }
+  err = SSLSetEnabledCiphers(ssl_ctx, allowed_ciphers,
+                             allowed_ciphers_count);
+  Curl_safefree(all_ciphers);
+  Curl_safefree(allowed_ciphers);
+  if(err != noErr) {
+    failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err);
+    return CURLE_SSL_CIPHER;
+  }
+  return CURLE_OK;
+}
+
+static CURLcode sectransp_set_selected_ciphers(struct Curl_easy *data,
+                                               SSLContextRef ssl_ctx,
+                                               const char *ciphers)
+{
+  size_t ciphers_count = 0;
+  const char *cipher_start = ciphers;
+  OSStatus err = noErr;
+  SSLCipherSuite selected_ciphers[NUM_OF_CIPHERS];
+
+  if(!ciphers)
+    return CURLE_OK;
+
+  while(is_separator(*ciphers))     /* Skip initial separators. */
+    ciphers++;
+  if(!*ciphers)
+    return CURLE_OK;
+
+  cipher_start = ciphers;
+  while(*cipher_start && ciphers_count < NUM_OF_CIPHERS) {
+    bool cipher_found = FALSE;
+    size_t cipher_len = 0;
+    const char *cipher_end = NULL;
+    bool tls_name = FALSE;
+
+    /* Skip separators */
+    while(is_separator(*cipher_start))
+       cipher_start++;
+    if(*cipher_start == '\0') {
+      break;
+    }
+    /* Find last position of a cipher in the ciphers string */
+    cipher_end = cipher_start;
+    while (*cipher_end != '\0' && !is_separator(*cipher_end)) {
+      ++cipher_end;
+    }
+
+    /* IANA cipher names start with the TLS_ or SSL_ prefix.
+       If the 4th symbol of the cipher is '_' we look for a cipher in the
+       table by its (TLS) name.
+       Otherwise, we try to match cipher by an alias. */
+    if(cipher_start[3] == '_') {
+      tls_name = TRUE;
+    }
+    /* Iterate through the cipher table and look for the cipher, starting
+       the cipher number 0x01 because the 0x00 is not the real cipher */
+    cipher_len = cipher_end - cipher_start;
+    for(size_t i = 1; i < NUM_OF_CIPHERS; ++i) {
+      const char *table_cipher_name = NULL;
+      if(tls_name) {
+        table_cipher_name = ciphertable[i].name;
+      }
+      else if(ciphertable[i].alias_name != NULL) {
+        table_cipher_name = ciphertable[i].alias_name;
+      }
+      else {
+        continue;
+      }
+      /* Compare a part of the string between separators with a cipher name
+         in the table and make sure we matched the whole cipher name */
+      if(strncmp(cipher_start, table_cipher_name, cipher_len) == 0
+          && table_cipher_name[cipher_len] == '\0') {
+        selected_ciphers[ciphers_count] = ciphertable[i].num;
+        ++ciphers_count;
+        cipher_found = TRUE;
+        break;
+      }
+    }
+    if(!cipher_found) {
+      /* It would be more human-readable if we print the wrong cipher name
+         but we don't want to allocate any additional memory and copy the name
+         into it, then add it into logs.
+         Also, we do not modify an original cipher list string. We just point
+         to positions where cipher starts and ends in the cipher list string.
+         The message is a bit cryptic and longer than necessary but can be
+         understood by humans. */
+      failf(data, "SSL: cipher string \"%s\" contains unsupported cipher name"
+            " starting position %d and ending position %d",
+            ciphers,
+            cipher_start - ciphers,
+            cipher_end - ciphers);
+      return CURLE_SSL_CIPHER;
+    }
+    if(*cipher_end) {
+      cipher_start = cipher_end + 1;
+    }
+    else {
+      break;
+    }
+  }
+  /* All cipher suites in the list are found. Report to logs as-is */
+  infof(data, "SSL: Setting cipher suites list \"%s\"", ciphers);
+
+  err = SSLSetEnabledCiphers(ssl_ctx, selected_ciphers, ciphers_count);
+  if(err != noErr) {
+    failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err);
+    return CURLE_SSL_CIPHER;
+  }
+  return CURLE_OK;
+}
+
+static CURLcode sectransp_connect_step1(struct Curl_easy *data,
+                                        struct connectdata *conn,
                                         int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   curl_socket_t sockfd = conn->sock[sockindex];
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
-  const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile);
-  const struct curl_blob *ssl_cablob = NULL;
+  const struct curl_blob *ssl_cablob = SSL_CONN_CONFIG(ca_info_blob);
+  const char * const ssl_cafile =
+    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
+    (ssl_cablob ? NULL : SSL_CONN_CONFIG(CAfile));
   const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
   char * const ssl_cert = SSL_SET_OPTION(primary.clientcert);
   const struct curl_blob *ssl_cert_blob = SSL_SET_OPTION(primary.cert_blob);
-#ifndef CURL_DISABLE_PROXY
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
-#else
-  const char * const hostname = conn->host.name;
-  const long int port = conn->remote_port;
-#endif
+  bool isproxy = SSL_IS_PROXY();
+  const char * const hostname = SSL_HOST_NAME();
+  const long int port = SSL_HOST_PORT();
 #ifdef ENABLE_IPV6
   struct in6_addr addr;
 #else
   struct in_addr addr;
 #endif /* ENABLE_IPV6 */
-  size_t all_ciphers_count = 0UL, allowed_ciphers_count = 0UL, i;
-  SSLCipherSuite *all_ciphers = NULL, *allowed_ciphers = NULL;
+  char *ciphers;
   OSStatus err = noErr;
 #if CURL_BUILD_MAC
   int darwinver_maj = 0, darwinver_min = 0;
@@ -1478,27 +1742,15 @@
     case CURL_SSLVERSION_TLSv1_2:
     case CURL_SSLVERSION_TLSv1_3:
       {
-        CURLcode result = set_ssl_version_min_max(conn, sockindex);
+        CURLcode result = set_ssl_version_min_max(data, conn, sockindex);
         if(result != CURLE_OK)
           return result;
         break;
       }
     case CURL_SSLVERSION_SSLv3:
-      err = SSLSetProtocolVersionMin(backend->ssl_ctx, kSSLProtocol3);
-      if(err != noErr) {
-        failf(data, "Your version of the OS does not support SSLv3");
-        return CURLE_SSL_CONNECT_ERROR;
-      }
-      (void)SSLSetProtocolVersionMax(backend->ssl_ctx, kSSLProtocol3);
-      break;
     case CURL_SSLVERSION_SSLv2:
-      err = SSLSetProtocolVersionMin(backend->ssl_ctx, kSSLProtocol2);
-      if(err != noErr) {
-        failf(data, "Your version of the OS does not support SSLv2");
-        return CURLE_SSL_CONNECT_ERROR;
-      }
-      (void)SSLSetProtocolVersionMax(backend->ssl_ctx, kSSLProtocol2);
-      break;
+      failf(data, "SSL versions not supported");
+      return CURLE_NOT_BUILT_IN;
     default:
       failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
       return CURLE_SSL_CONNECT_ERROR;
@@ -1527,29 +1779,15 @@
     case CURL_SSLVERSION_TLSv1_2:
     case CURL_SSLVERSION_TLSv1_3:
       {
-        CURLcode result = set_ssl_version_min_max(conn, sockindex);
+        CURLcode result = set_ssl_version_min_max(data, conn, sockindex);
         if(result != CURLE_OK)
           return result;
         break;
       }
     case CURL_SSLVERSION_SSLv3:
-      err = SSLSetProtocolVersionEnabled(backend->ssl_ctx,
-                                         kSSLProtocol3,
-                                         true);
-      if(err != noErr) {
-        failf(data, "Your version of the OS does not support SSLv3");
-        return CURLE_SSL_CONNECT_ERROR;
-      }
-      break;
     case CURL_SSLVERSION_SSLv2:
-      err = SSLSetProtocolVersionEnabled(backend->ssl_ctx,
-                                         kSSLProtocol2,
-                                         true);
-      if(err != noErr) {
-        failf(data, "Your version of the OS does not support SSLv2");
-        return CURLE_SSL_CONNECT_ERROR;
-      }
-      break;
+      failf(data, "SSL versions not supported");
+      return CURLE_NOT_BUILT_IN;
     default:
       failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
       return CURLE_SSL_CONNECT_ERROR;
@@ -1581,23 +1819,9 @@
     failf(data, "Your version of the OS does not support TLSv1.3");
     return CURLE_SSL_CONNECT_ERROR;
   case CURL_SSLVERSION_SSLv2:
-    err = SSLSetProtocolVersionEnabled(backend->ssl_ctx,
-                                       kSSLProtocol2,
-                                       true);
-    if(err != noErr) {
-      failf(data, "Your version of the OS does not support SSLv2");
-      return CURLE_SSL_CONNECT_ERROR;
-    }
-    break;
   case CURL_SSLVERSION_SSLv3:
-    err = SSLSetProtocolVersionEnabled(backend->ssl_ctx,
-                                       kSSLProtocol3,
-                                       true);
-    if(err != noErr) {
-      failf(data, "Your version of the OS does not support SSLv3");
-      return CURLE_SSL_CONNECT_ERROR;
-    }
-    break;
+    failf(data, "SSL versions not supported");
+    return CURLE_NOT_BUILT_IN;
   default:
     failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
     return CURLE_SSL_CONNECT_ERROR;
@@ -1610,26 +1834,26 @@
       CFMutableArrayRef alpnArr = CFArrayCreateMutable(NULL, 0,
                                                        &kCFTypeArrayCallBacks);
 
-#ifdef USE_NGHTTP2
-      if(data->set.httpversion >= CURL_HTTP_VERSION_2
+#ifdef USE_HTTP2
+      if(data->state.httpwant >= CURL_HTTP_VERSION_2
 #ifndef CURL_DISABLE_PROXY
-         && (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)
+         && (!isproxy || !conn->bits.tunnel_proxy)
 #endif
         ) {
-        CFArrayAppendValue(alpnArr, CFSTR(NGHTTP2_PROTO_VERSION_ID));
-        infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+        CFArrayAppendValue(alpnArr, CFSTR(ALPN_H2));
+        infof(data, "ALPN, offering %s", ALPN_H2);
       }
 #endif
 
       CFArrayAppendValue(alpnArr, CFSTR(ALPN_HTTP_1_1));
-      infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+      infof(data, "ALPN, offering %s", ALPN_HTTP_1_1);
 
       /* expects length prefixed preference ordered list of protocols in wire
        * format
        */
       err = SSLSetALPNProtocols(backend->ssl_ctx, alpnArr);
       if(err != noErr)
-        infof(data, "WARNING: failed to set ALPN protocols; OSStatus %d\n",
+        infof(data, "WARNING: failed to set ALPN protocols; OSStatus %d",
               err);
       CFRelease(alpnArr);
     }
@@ -1638,7 +1862,7 @@
 
   if(SSL_SET_OPTION(key)) {
     infof(data, "WARNING: SSL: CURLOPT_SSLKEY is ignored by Secure "
-          "Transport. The private key must be in the Keychain.\n");
+          "Transport. The private key must be in the Keychain.");
   }
 
   if(ssl_cert || ssl_cert_blob) {
@@ -1646,24 +1870,28 @@
     bool is_cert_file = (!is_cert_data) && is_file(ssl_cert);
     SecIdentityRef cert_and_key = NULL;
 
-    /* User wants to authenticate with a client cert. Look for it:
-       If we detect that this is a file on disk, then let's load it.
-       Otherwise, assume that the user wants to use an identity loaded
-       from the Keychain. */
-    if(is_cert_file || is_cert_data) {
+    /* User wants to authenticate with a client cert. Look for it. Assume that
+       the user wants to use an identity loaded from the Keychain. If not, try
+       it as a file on disk */
+
+    if(!is_cert_data)
+      err = CopyIdentityWithLabel(ssl_cert, &cert_and_key);
+    else
+      err = !noErr;
+    if((err != noErr) && (is_cert_file || is_cert_data)) {
       if(!SSL_SET_OPTION(cert_type))
-        infof(data, "WARNING: SSL: Certificate type not set, assuming "
-                    "PKCS#12 format.\n");
-      else if(strncmp(SSL_SET_OPTION(cert_type), "P12",
-        strlen(SSL_SET_OPTION(cert_type))) != 0)
-        infof(data, "WARNING: SSL: The Security framework only supports "
-                    "loading identities that are in PKCS#12 format.\n");
+        infof(data, "SSL: Certificate type not set, assuming "
+              "PKCS#12 format.");
+      else if(!strcasecompare(SSL_SET_OPTION(cert_type), "P12")) {
+        failf(data, "SSL: The Security framework only supports "
+              "loading identities that are in PKCS#12 format.");
+        return CURLE_SSL_CERTPROBLEM;
+      }
 
       err = CopyIdentityFromPKCS12File(ssl_cert, ssl_cert_blob,
-        SSL_SET_OPTION(key_passwd), &cert_and_key);
+                                       SSL_SET_OPTION(key_passwd),
+                                       &cert_and_key);
     }
-    else
-      err = CopyIdentityWithLabel(ssl_cert, &cert_and_key);
 
     if(err == noErr && cert_and_key) {
       SecCertificateRef cert = NULL;
@@ -1676,7 +1904,7 @@
         char *certp;
         CURLcode result = CopyCertSubject(data, cert, &certp);
         if(!result) {
-          infof(data, "Client certificate: %s\n", certp);
+          infof(data, "Client certificate: %s", certp);
           free(certp);
         }
 
@@ -1788,7 +2016,8 @@
     bool is_cert_file = (!is_cert_data) && is_file(ssl_cafile);
 
     if(!(is_cert_file || is_cert_data)) {
-      failf(data, "SSL: can't load CA certificate file %s", ssl_cafile);
+      failf(data, "SSL: can't load CA certificate file %s",
+            ssl_cafile ? ssl_cafile : "(blob memory)");
       return CURLE_SSL_CACERT_BADFILE;
     }
   }
@@ -1801,7 +2030,7 @@
     strlen(hostname));
 
     if(err != noErr) {
-      infof(data, "WARNING: SSL: SSLSetPeerDomainName() failed: OSStatus %d\n",
+      infof(data, "WARNING: SSL: SSLSetPeerDomainName() failed: OSStatus %d",
             err);
     }
 
@@ -1811,128 +2040,23 @@
   #endif
        ) {
       infof(data, "WARNING: using IP address, SNI is being disabled by "
-            "the OS.\n");
+            "the OS.");
     }
   }
   else {
-    infof(data, "WARNING: disabling hostname validation also disables SNI.\n");
+    infof(data, "WARNING: disabling hostname validation also disables SNI.");
   }
 
-  /* Disable cipher suites that ST supports but are not safe. These ciphers
-     are unlikely to be used in any case since ST gives other ciphers a much
-     higher priority, but it's probably better that we not connect at all than
-     to give the user a false sense of security if the server only supports
-     insecure ciphers. (Note: We don't care about SSLv2-only ciphers.) */
-  err = SSLGetNumberSupportedCiphers(backend->ssl_ctx, &all_ciphers_count);
+  ciphers = SSL_CONN_CONFIG(cipher_list);
+  if(ciphers) {
+    err = sectransp_set_selected_ciphers(data, backend->ssl_ctx, ciphers);
+  }
+  else {
+    err = sectransp_set_default_ciphers(data, backend->ssl_ctx);
+  }
   if(err != noErr) {
-    failf(data, "SSL: SSLGetNumberSupportedCiphers() failed: OSStatus %d",
-          err);
-    return CURLE_SSL_CIPHER;
-  }
-  all_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
-  if(!all_ciphers) {
-    failf(data, "SSL: Failed to allocate memory for all ciphers");
-    return CURLE_OUT_OF_MEMORY;
-  }
-  allowed_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
-  if(!allowed_ciphers) {
-    Curl_safefree(all_ciphers);
-    failf(data, "SSL: Failed to allocate memory for allowed ciphers");
-    return CURLE_OUT_OF_MEMORY;
-  }
-  err = SSLGetSupportedCiphers(backend->ssl_ctx, all_ciphers,
-                               &all_ciphers_count);
-  if(err != noErr) {
-    Curl_safefree(all_ciphers);
-    Curl_safefree(allowed_ciphers);
-    return CURLE_SSL_CIPHER;
-  }
-  for(i = 0UL ; i < all_ciphers_count ; i++) {
-#if CURL_BUILD_MAC
-   /* There's a known bug in early versions of Mountain Lion where ST's ECC
-      ciphers (cipher suite 0xC001 through 0xC032) simply do not work.
-      Work around the problem here by disabling those ciphers if we are
-      running in an affected version of OS X. */
-    if(darwinver_maj == 12 && darwinver_min <= 3 &&
-       all_ciphers[i] >= 0xC001 && all_ciphers[i] <= 0xC032) {
-      continue;
-    }
-#endif /* CURL_BUILD_MAC */
-    switch(all_ciphers[i]) {
-      /* Disable NULL ciphersuites: */
-      case SSL_NULL_WITH_NULL_NULL:
-      case SSL_RSA_WITH_NULL_MD5:
-      case SSL_RSA_WITH_NULL_SHA:
-      case 0x003B: /* TLS_RSA_WITH_NULL_SHA256 */
-      case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
-      case 0xC001: /* TLS_ECDH_ECDSA_WITH_NULL_SHA */
-      case 0xC006: /* TLS_ECDHE_ECDSA_WITH_NULL_SHA */
-      case 0xC00B: /* TLS_ECDH_RSA_WITH_NULL_SHA */
-      case 0xC010: /* TLS_ECDHE_RSA_WITH_NULL_SHA */
-      case 0x002C: /* TLS_PSK_WITH_NULL_SHA */
-      case 0x002D: /* TLS_DHE_PSK_WITH_NULL_SHA */
-      case 0x002E: /* TLS_RSA_PSK_WITH_NULL_SHA */
-      case 0x00B0: /* TLS_PSK_WITH_NULL_SHA256 */
-      case 0x00B1: /* TLS_PSK_WITH_NULL_SHA384 */
-      case 0x00B4: /* TLS_DHE_PSK_WITH_NULL_SHA256 */
-      case 0x00B5: /* TLS_DHE_PSK_WITH_NULL_SHA384 */
-      case 0x00B8: /* TLS_RSA_PSK_WITH_NULL_SHA256 */
-      case 0x00B9: /* TLS_RSA_PSK_WITH_NULL_SHA384 */
-      /* Disable anonymous ciphersuites: */
-      case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5:
-      case SSL_DH_anon_WITH_RC4_128_MD5:
-      case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA:
-      case SSL_DH_anon_WITH_DES_CBC_SHA:
-      case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
-      case TLS_DH_anon_WITH_AES_128_CBC_SHA:
-      case TLS_DH_anon_WITH_AES_256_CBC_SHA:
-      case 0xC015: /* TLS_ECDH_anon_WITH_NULL_SHA */
-      case 0xC016: /* TLS_ECDH_anon_WITH_RC4_128_SHA */
-      case 0xC017: /* TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA */
-      case 0xC018: /* TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
-      case 0xC019: /* TLS_ECDH_anon_WITH_AES_256_CBC_SHA */
-      case 0x006C: /* TLS_DH_anon_WITH_AES_128_CBC_SHA256 */
-      case 0x006D: /* TLS_DH_anon_WITH_AES_256_CBC_SHA256 */
-      case 0x00A6: /* TLS_DH_anon_WITH_AES_128_GCM_SHA256 */
-      case 0x00A7: /* TLS_DH_anon_WITH_AES_256_GCM_SHA384 */
-      /* Disable weak key ciphersuites: */
-      case SSL_RSA_EXPORT_WITH_RC4_40_MD5:
-      case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5:
-      case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA:
-      case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA:
-      case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA:
-      case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:
-      case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:
-      case SSL_RSA_WITH_DES_CBC_SHA:
-      case SSL_DH_DSS_WITH_DES_CBC_SHA:
-      case SSL_DH_RSA_WITH_DES_CBC_SHA:
-      case SSL_DHE_DSS_WITH_DES_CBC_SHA:
-      case SSL_DHE_RSA_WITH_DES_CBC_SHA:
-      /* Disable IDEA: */
-      case SSL_RSA_WITH_IDEA_CBC_SHA:
-      case SSL_RSA_WITH_IDEA_CBC_MD5:
-      /* Disable RC4: */
-      case SSL_RSA_WITH_RC4_128_MD5:
-      case SSL_RSA_WITH_RC4_128_SHA:
-      case 0xC002: /* TLS_ECDH_ECDSA_WITH_RC4_128_SHA */
-      case 0xC007: /* TLS_ECDHE_ECDSA_WITH_RC4_128_SHA*/
-      case 0xC00C: /* TLS_ECDH_RSA_WITH_RC4_128_SHA */
-      case 0xC011: /* TLS_ECDHE_RSA_WITH_RC4_128_SHA */
-      case 0x008A: /* TLS_PSK_WITH_RC4_128_SHA */
-      case 0x008E: /* TLS_DHE_PSK_WITH_RC4_128_SHA */
-      case 0x0092: /* TLS_RSA_PSK_WITH_RC4_128_SHA */
-        break;
-      default: /* enable everything else */
-        allowed_ciphers[allowed_ciphers_count++] = all_ciphers[i];
-        break;
-    }
-  }
-  err = SSLSetEnabledCiphers(backend->ssl_ctx, allowed_ciphers,
-                             allowed_ciphers_count);
-  Curl_safefree(all_ciphers);
-  Curl_safefree(allowed_ciphers);
-  if(err != noErr) {
-    failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err);
+    failf(data, "SSL: Unable to set ciphers for SSL/TLS handshake. "
+          "Error code: %d", err);
     return CURLE_SSL_CIPHER;
   }
 
@@ -1941,7 +2065,7 @@
      specifically doesn't want us doing that: */
   if(SSLSetSessionOption != NULL) {
     SSLSetSessionOption(backend->ssl_ctx, kSSLSessionOptionSendOneByteRecord,
-                      !data->set.ssl.enable_beast);
+                        !SSL_SET_OPTION(enable_beast));
     SSLSetSessionOption(backend->ssl_ctx, kSSLSessionOptionFalseStart,
                       data->set.ssl.falsestart); /* false start support */
   }
@@ -1952,38 +2076,39 @@
     char *ssl_sessionid;
     size_t ssl_sessionid_len;
 
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid,
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn, isproxy, (void **)&ssl_sessionid,
                               &ssl_sessionid_len, sockindex)) {
       /* we got a session id, use it! */
       err = SSLSetPeerID(backend->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
-      Curl_ssl_sessionid_unlock(conn);
+      Curl_ssl_sessionid_unlock(data);
       if(err != noErr) {
         failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err);
         return CURLE_SSL_CONNECT_ERROR;
       }
       /* Informational message */
-      infof(data, "SSL re-using session ID\n");
+      infof(data, "SSL re-using session ID");
     }
     /* If there isn't one, then let's make one up! This has to be done prior
        to starting the handshake. */
     else {
       CURLcode result;
       ssl_sessionid =
-        aprintf("%s:%d:%d:%s:%hu", ssl_cafile,
+        aprintf("%s:%d:%d:%s:%ld",
+                ssl_cafile ? ssl_cafile : "(blob memory)",
                 verifypeer, SSL_CONN_CONFIG(verifyhost), hostname, port);
       ssl_sessionid_len = strlen(ssl_sessionid);
 
       err = SSLSetPeerID(backend->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
       if(err != noErr) {
-        Curl_ssl_sessionid_unlock(conn);
+        Curl_ssl_sessionid_unlock(data);
         failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err);
         return CURLE_SSL_CONNECT_ERROR;
       }
 
-      result = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len,
-                                     sockindex);
-      Curl_ssl_sessionid_unlock(conn);
+      result = Curl_ssl_addsessionid(data, conn, isproxy, ssl_sessionid,
+                                     ssl_sessionid_len, sockindex);
+      Curl_ssl_sessionid_unlock(data);
       if(result) {
         failf(data, "failed to store ssl session");
         return result;
@@ -2021,21 +2146,21 @@
 
   /* Jump through the separators at the beginning of the certificate. */
   sep_start = strstr(in, "-----");
-  if(sep_start == NULL)
+  if(!sep_start)
     return 0;
   cert_start = strstr(sep_start + 1, "-----");
-  if(cert_start == NULL)
+  if(!cert_start)
     return -1;
 
   cert_start += 5;
 
   /* Find separator after the end of the certificate. */
   cert_end = strstr(cert_start, "-----");
-  if(cert_end == NULL)
+  if(!cert_end)
     return -1;
 
   sep_end = strstr(cert_end + 1, "-----");
-  if(sep_end == NULL)
+  if(!sep_end)
     return -1;
   sep_end += 5;
 
@@ -2110,7 +2235,7 @@
 }
 
 static int append_cert_to_array(struct Curl_easy *data,
-                                unsigned char *buf, size_t buflen,
+                                const unsigned char *buf, size_t buflen,
                                 CFMutableArrayRef array)
 {
     CFDataRef certdata = CFDataCreate(kCFAllocatorDefault, buf, buflen);
@@ -2148,18 +2273,14 @@
     return CURLE_OK;
 }
 
-static CURLcode verify_cert(const char *cafile, struct Curl_easy *data,
-                            SSLContextRef ctx)
+static CURLcode verify_cert_buf(struct Curl_easy *data,
+                                const unsigned char *certbuf, size_t buflen,
+                                SSLContextRef ctx)
 {
   int n = 0, rc;
   long res;
-  unsigned char *certbuf, *der;
-  size_t buflen, derlen, offset = 0;
-
-  if(read_cert(cafile, &certbuf, &buflen) < 0) {
-    failf(data, "SSL: failed to read or invalid CA certificate");
-    return CURLE_SSL_CACERT_BADFILE;
-  }
+  unsigned char *der;
+  size_t derlen, offset = 0;
 
   /*
    * Certbuf now contains the contents of the certificate file, which can be
@@ -2172,8 +2293,7 @@
    */
   CFMutableArrayRef array = CFArrayCreateMutable(kCFAllocatorDefault, 0,
                                                  &kCFTypeArrayCallBacks);
-  if(array == NULL) {
-    free(certbuf);
+  if(!array) {
     failf(data, "SSL: out of memory creating CA certificate array");
     return CURLE_OUT_OF_MEMORY;
   }
@@ -2187,9 +2307,8 @@
      */
     res = pem_to_der((const char *)certbuf + offset, &der, &derlen);
     if(res < 0) {
-      free(certbuf);
       CFRelease(array);
-      failf(data, "SSL: invalid CA certificate #%d (offset %d) in bundle",
+      failf(data, "SSL: invalid CA certificate #%d (offset %zu) in bundle",
             n, offset);
       return CURLE_SSL_CACERT_BADFILE;
     }
@@ -2198,7 +2317,6 @@
     if(res == 0 && offset == 0) {
       /* This is not a PEM file, probably a certificate in DER format. */
       rc = append_cert_to_array(data, certbuf, buflen, array);
-      free(certbuf);
       if(rc != CURLE_OK) {
         CFRelease(array);
         return rc;
@@ -2207,14 +2325,12 @@
     }
     else if(res == 0) {
       /* No more certificates in the bundle. */
-      free(certbuf);
       break;
     }
 
     rc = append_cert_to_array(data, der, derlen, array);
     free(der);
     if(rc != CURLE_OK) {
-      free(certbuf);
       CFRelease(array);
       return rc;
     }
@@ -2222,7 +2338,7 @@
 
   SecTrustRef trust;
   OSStatus ret = SSLCopyPeerTrust(ctx, &trust);
-  if(trust == NULL) {
+  if(!trust) {
     failf(data, "SSL: error getting certificate chain");
     CFRelease(array);
     return CURLE_PEER_FAILED_VERIFICATION;
@@ -2271,6 +2387,38 @@
   }
 }
 
+static CURLcode verify_cert(struct Curl_easy *data, const char *cafile,
+                            const struct curl_blob *ca_info_blob,
+                            SSLContextRef ctx)
+{
+  int result;
+  unsigned char *certbuf;
+  size_t buflen;
+
+  if(ca_info_blob) {
+    certbuf = (unsigned char *)malloc(ca_info_blob->len + 1);
+    if(!certbuf) {
+      return CURLE_OUT_OF_MEMORY;
+    }
+    buflen = ca_info_blob->len;
+    memcpy(certbuf, ca_info_blob->data, ca_info_blob->len);
+    certbuf[ca_info_blob->len]='\0';
+  }
+  else if(cafile) {
+    if(read_cert(cafile, &certbuf, &buflen) < 0) {
+      failf(data, "SSL: failed to read or invalid CA certificate");
+      return CURLE_SSL_CACERT_BADFILE;
+    }
+  }
+  else
+    return CURLE_SSL_CACERT_BADFILE;
+
+  result = verify_cert_buf(data, certbuf, buflen, ctx);
+  free(certbuf);
+  return result;
+}
+
+
 #ifdef SECTRANSP_PINNEDPUBKEY
 static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data,
                                     SSLContextRef ctx,
@@ -2295,19 +2443,19 @@
   do {
     SecTrustRef trust;
     OSStatus ret = SSLCopyPeerTrust(ctx, &trust);
-    if(ret != noErr || trust == NULL)
+    if(ret != noErr || !trust)
       break;
 
     SecKeyRef keyRef = SecTrustCopyPublicKey(trust);
     CFRelease(trust);
-    if(keyRef == NULL)
+    if(!keyRef)
       break;
 
 #ifdef SECTRANSP_PINNEDPUBKEY_V1
 
     publicKeyBits = SecKeyCopyExternalRepresentation(keyRef, NULL);
     CFRelease(keyRef);
-    if(publicKeyBits == NULL)
+    if(!publicKeyBits)
       break;
 
 #elif SECTRANSP_PINNEDPUBKEY_V2
@@ -2315,7 +2463,7 @@
     OSStatus success = SecItemExport(keyRef, kSecFormatOpenSSL, 0, NULL,
                                      &publicKeyBits);
     CFRelease(keyRef);
-    if(success != errSecSuccess || publicKeyBits == NULL)
+    if(success != errSecSuccess || !publicKeyBits)
       break;
 
 #endif /* SECTRANSP_PINNEDPUBKEY_V2 */
@@ -2344,7 +2492,7 @@
         spkiHeaderLength = 23;
         break;
       default:
-        infof(data, "SSL: unhandled public key length: %d\n", pubkeylen);
+        infof(data, "SSL: unhandled public key length: %d", pubkeylen);
 #elif SECTRANSP_PINNEDPUBKEY_V2
       default:
         /* ecDSA secp256r1 pubkeylen == 91 header already included?
@@ -2379,20 +2527,15 @@
 #endif /* SECTRANSP_PINNEDPUBKEY */
 
 static CURLcode
-sectransp_connect_step2(struct connectdata *conn, int sockindex)
+sectransp_connect_step2(struct Curl_easy *data, struct connectdata *conn,
+                        int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   OSStatus err;
   SSLCipherSuite cipher;
   SSLProtocol protocol = 0;
-#ifndef CURL_DISABLE_PROXY
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-#else
-  const char * const hostname = conn->host.name;
-#endif
+  const char * const hostname = SSL_HOST_NAME();
 
   DEBUGASSERT(ssl_connect_2 == connssl->connecting_state
               || ssl_connect_2_reading == connssl->connecting_state
@@ -2411,14 +2554,16 @@
       /* The below is errSSLServerAuthCompleted; it's not defined in
         Leopard's headers */
       case -9841:
-        if(SSL_CONN_CONFIG(CAfile) && SSL_CONN_CONFIG(verifypeer)) {
-          CURLcode result = verify_cert(SSL_CONN_CONFIG(CAfile), data,
+        if((SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(ca_info_blob)) &&
+           SSL_CONN_CONFIG(verifypeer)) {
+          CURLcode result = verify_cert(data, SSL_CONN_CONFIG(CAfile),
+                                        SSL_CONN_CONFIG(ca_info_blob),
                                         backend->ssl_ctx);
           if(result)
             return result;
         }
         /* the documentation says we need to call SSLHandshake() again */
-        return sectransp_connect_step2(conn, sockindex);
+        return sectransp_connect_step2(data, conn, sockindex);
 
       /* Problem with encrypt / decrypt */
       case errSSLPeerDecodeError:
@@ -2599,8 +2744,9 @@
 #if CURL_BUILD_MAC_10_6
       /* Only returned when kSSLSessionOptionBreakOnCertRequested is set */
       case errSSLClientCertRequested:
-        failf(data, "The server has requested a client certificate");
-        break;
+        failf(data, "Server requested a client certificate during the "
+              "handshake");
+        return CURLE_SSL_CLIENTCERT;
 #endif
 #if CURL_BUILD_MAC_10_9
       /* Alias for errSSLLast, end of error range */
@@ -2621,9 +2767,10 @@
     connssl->connecting_state = ssl_connect_3;
 
 #ifdef SECTRANSP_PINNEDPUBKEY
-    if(data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]) {
-      CURLcode result = pkp_pin_peer_pubkey(data, backend->ssl_ctx,
-                            data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]);
+    if(data->set.str[STRING_SSL_PINNEDPUBLICKEY]) {
+      CURLcode result =
+        pkp_pin_peer_pubkey(data, backend->ssl_ctx,
+                            data->set.str[STRING_SSL_PINNEDPUBLICKEY]);
       if(result) {
         failf(data, "SSL: public key does not match pinned public key!");
         return result;
@@ -2636,35 +2783,35 @@
     (void)SSLGetNegotiatedProtocolVersion(backend->ssl_ctx, &protocol);
     switch(protocol) {
       case kSSLProtocol2:
-        infof(data, "SSL 2.0 connection using %s\n",
-              SSLCipherNameForNumber(cipher));
+        infof(data, "SSL 2.0 connection using %s",
+              TLSCipherNameForNumber(cipher));
         break;
       case kSSLProtocol3:
-        infof(data, "SSL 3.0 connection using %s\n",
-              SSLCipherNameForNumber(cipher));
+        infof(data, "SSL 3.0 connection using %s",
+              TLSCipherNameForNumber(cipher));
         break;
       case kTLSProtocol1:
-        infof(data, "TLS 1.0 connection using %s\n",
+        infof(data, "TLS 1.0 connection using %s",
               TLSCipherNameForNumber(cipher));
         break;
 #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
       case kTLSProtocol11:
-        infof(data, "TLS 1.1 connection using %s\n",
+        infof(data, "TLS 1.1 connection using %s",
               TLSCipherNameForNumber(cipher));
         break;
       case kTLSProtocol12:
-        infof(data, "TLS 1.2 connection using %s\n",
+        infof(data, "TLS 1.2 connection using %s",
               TLSCipherNameForNumber(cipher));
         break;
 #endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
 #if CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11
       case kTLSProtocol13:
-        infof(data, "TLS 1.3 connection using %s\n",
+        infof(data, "TLS 1.3 connection using %s",
               TLSCipherNameForNumber(cipher));
         break;
 #endif /* CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11 */
       default:
-        infof(data, "Unknown protocol connection\n");
+        infof(data, "Unknown protocol connection");
         break;
     }
 
@@ -2678,10 +2825,9 @@
         if(err == noErr && alpnArr && CFArrayGetCount(alpnArr) >= 1)
           chosenProtocol = CFArrayGetValueAtIndex(alpnArr, 0);
 
-#ifdef USE_NGHTTP2
+#ifdef USE_HTTP2
         if(chosenProtocol &&
-           !CFStringCompare(chosenProtocol, CFSTR(NGHTTP2_PROTO_VERSION_ID),
-                            0)) {
+           !CFStringCompare(chosenProtocol, CFSTR(ALPN_H2), 0)) {
           conn->negnpn = CURL_HTTP_VERSION_2;
         }
         else
@@ -2691,9 +2837,9 @@
           conn->negnpn = CURL_HTTP_VERSION_1_1;
         }
         else
-          infof(data, "ALPN, server did not agree to a protocol\n");
+          infof(data, "ALPN, server did not agree to a protocol");
 
-        Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+        Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                             BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
 
         /* chosenProtocol is a reference to the string within alpnArr
@@ -2711,10 +2857,10 @@
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
 /* This should be called during step3 of the connection at the earliest */
 static void
-show_verbose_server_cert(struct connectdata *conn,
+show_verbose_server_cert(struct Curl_easy *data,
+                         struct connectdata *conn,
                          int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   CFArrayRef server_certs = NULL;
@@ -2740,7 +2886,7 @@
       server_cert = SecTrustGetCertificateAtIndex(trust, i);
       result = CopyCertSubject(data, server_cert, &certp);
       if(!result) {
-        infof(data, "Server certificate: %s\n", certp);
+        infof(data, "Server certificate: %s", certp);
         free(certp);
       }
     }
@@ -2766,7 +2912,7 @@
         server_cert = SecTrustGetCertificateAtIndex(trust, i);
         result = CopyCertSubject(data, server_cert, &certp);
         if(!result) {
-          infof(data, "Server certificate: %s\n", certp);
+          infof(data, "Server certificate: %s", certp);
           free(certp);
         }
       }
@@ -2786,7 +2932,7 @@
                                                                 i);
         result = CopyCertSubject(data, server_cert, &certp);
         if(!result) {
-          infof(data, "Server certificate: %s\n", certp);
+          infof(data, "Server certificate: %s", certp);
           free(certp);
         }
       }
@@ -2806,7 +2952,7 @@
       server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, i);
       result = CopyCertSubject(data, server_cert, &certp);
       if(!result) {
-        infof(data, "Server certificate: %s\n", certp);
+        infof(data, "Server certificate: %s", certp);
         free(certp);
       }
     }
@@ -2817,10 +2963,9 @@
 #endif /* !CURL_DISABLE_VERBOSE_STRINGS */
 
 static CURLcode
-sectransp_connect_step3(struct connectdata *conn,
+sectransp_connect_step3(struct Curl_easy *data, struct connectdata *conn,
                         int sockindex)
 {
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 
   /* There is no step 3!
@@ -2828,7 +2973,7 @@
    * server certificates. */
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
   if(data->set.verbose)
-    show_verbose_server_cert(conn, sockindex);
+    show_verbose_server_cert(data, conn, sockindex);
 #endif
 
   connssl->connecting_state = ssl_connect_done;
@@ -2839,13 +2984,13 @@
 static Curl_send sectransp_send;
 
 static CURLcode
-sectransp_connect_common(struct connectdata *conn,
+sectransp_connect_common(struct Curl_easy *data,
+                         struct connectdata *conn,
                          int sockindex,
                          bool nonblocking,
                          bool *done)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   int what;
@@ -2866,7 +3011,7 @@
       return CURLE_OPERATION_TIMEDOUT;
     }
 
-    result = sectransp_connect_step1(conn, sockindex);
+    result = sectransp_connect_step1(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -2920,7 +3065,7 @@
      * before step2 has completed while ensuring that a client using select()
      * or epoll() will always have a valid fdset to wait on.
      */
-    result = sectransp_connect_step2(conn, sockindex);
+    result = sectransp_connect_step2(data, conn, sockindex);
     if(result || (nonblocking &&
                   (ssl_connect_2 == connssl->connecting_state ||
                    ssl_connect_2_reading == connssl->connecting_state ||
@@ -2931,7 +3076,7 @@
 
 
   if(ssl_connect_3 == connssl->connecting_state) {
-    result = sectransp_connect_step3(conn, sockindex);
+    result = sectransp_connect_step3(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -2951,18 +3096,20 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_sectransp_connect_nonblocking(struct connectdata *conn,
-                                                   int sockindex, bool *done)
+static CURLcode sectransp_connect_nonblocking(struct Curl_easy *data,
+                                              struct connectdata *conn,
+                                              int sockindex, bool *done)
 {
-  return sectransp_connect_common(conn, sockindex, TRUE, done);
+  return sectransp_connect_common(data, conn, sockindex, TRUE, done);
 }
 
-static CURLcode Curl_sectransp_connect(struct connectdata *conn, int sockindex)
+static CURLcode sectransp_connect(struct Curl_easy *data,
+                                  struct connectdata *conn, int sockindex)
 {
   CURLcode result;
   bool done = FALSE;
 
-  result = sectransp_connect_common(conn, sockindex, FALSE, &done);
+  result = sectransp_connect_common(data, conn, sockindex, FALSE, &done);
 
   if(result)
     return result;
@@ -2972,11 +3119,14 @@
   return CURLE_OK;
 }
 
-static void Curl_sectransp_close(struct connectdata *conn, int sockindex)
+static void sectransp_close(struct Curl_easy *data, struct connectdata *conn,
+                            int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
 
+  (void) data;
+
   if(backend->ssl_ctx) {
     (void)SSLClose(backend->ssl_ctx);
 #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
@@ -2994,15 +3144,16 @@
   backend->ssl_sockfd = 0;
 }
 
-static int Curl_sectransp_shutdown(struct connectdata *conn, int sockindex)
+static int sectransp_shutdown(struct Curl_easy *data,
+                              struct connectdata *conn, int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
-  struct Curl_easy *data = conn->data;
   ssize_t nread;
   int what;
   int rc;
   char buf[120];
+  int loop = 10; /* avoid getting stuck */
 
   if(!backend->ssl_ctx)
     return 0;
@@ -3012,13 +3163,13 @@
     return 0;
 #endif
 
-  Curl_sectransp_close(conn, sockindex);
+  sectransp_close(data, conn, sockindex);
 
   rc = 0;
 
   what = SOCKET_READABLE(conn->sock[sockindex], SSL_SHUTDOWN_TIMEOUT);
 
-  for(;;) {
+  while(loop--) {
     if(what < 0) {
       /* anything that gets here is fatally bad */
       failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
@@ -3050,7 +3201,7 @@
   return rc;
 }
 
-static void Curl_sectransp_session_free(void *ptr)
+static void sectransp_session_free(void *ptr)
 {
   /* ST, as of iOS 5 and Mountain Lion, has no public method of deleting a
      cached session ID inside the Security framework. There is a private
@@ -3061,7 +3212,7 @@
   Curl_safefree(ptr);
 }
 
-static size_t Curl_sectransp_version(char *buffer, size_t size)
+static size_t sectransp_version(char *buffer, size_t size)
 {
   return msnprintf(buffer, size, "SecureTransport");
 }
@@ -3074,7 +3225,7 @@
  *     0 means the connection has been closed
  *    -1 means the connection status is unknown
  */
-static int Curl_sectransp_check_cxn(struct connectdata *conn)
+static int sectransp_check_cxn(struct connectdata *conn)
 {
   struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
   struct ssl_backend_data *backend = connssl->backend;
@@ -3090,8 +3241,8 @@
   return 0;
 }
 
-static bool Curl_sectransp_data_pending(const struct connectdata *conn,
-                                        int connindex)
+static bool sectransp_data_pending(const struct connectdata *conn,
+                                   int connindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[connindex];
   struct ssl_backend_data *backend = connssl->backend;
@@ -3108,8 +3259,8 @@
     return false;
 }
 
-static CURLcode Curl_sectransp_random(struct Curl_easy *data UNUSED_PARAM,
-                                      unsigned char *entropy, size_t length)
+static CURLcode sectransp_random(struct Curl_easy *data UNUSED_PARAM,
+                                 unsigned char *entropy, size_t length)
 {
   /* arc4random_buf() isn't available on cats older than Lion, so let's
      do this manually for the benefit of the older cats. */
@@ -3128,27 +3279,17 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_sectransp_md5sum(unsigned char *tmp, /* input */
-                                      size_t tmplen,
-                                      unsigned char *md5sum, /* output */
-                                      size_t md5len)
-{
-  (void)md5len;
-  (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum);
-  return CURLE_OK;
-}
-
-static CURLcode Curl_sectransp_sha256sum(const unsigned char *tmp, /* input */
-                                     size_t tmplen,
-                                     unsigned char *sha256sum, /* output */
-                                     size_t sha256len)
+static CURLcode sectransp_sha256sum(const unsigned char *tmp, /* input */
+                                    size_t tmplen,
+                                    unsigned char *sha256sum, /* output */
+                                    size_t sha256len)
 {
   assert(sha256len >= CURL_SHA256_DIGEST_LENGTH);
   (void)CC_SHA256(tmp, (CC_LONG)tmplen, sha256sum);
   return CURLE_OK;
 }
 
-static bool Curl_sectransp_false_start(void)
+static bool sectransp_false_start(void)
 {
 #if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
   if(SSLSetSessionOption != NULL)
@@ -3157,13 +3298,13 @@
   return FALSE;
 }
 
-static ssize_t sectransp_send(struct connectdata *conn,
+static ssize_t sectransp_send(struct Curl_easy *data,
                               int sockindex,
                               const void *mem,
                               size_t len,
                               CURLcode *curlcode)
 {
-  /*struct Curl_easy *data = conn->data;*/
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   size_t processed = 0UL;
@@ -3198,7 +3339,7 @@
         *curlcode = CURLE_AGAIN;
         return -1L;
       default:
-        failf(conn->data, "SSLWrite() returned error %d", err);
+        failf(data, "SSLWrite() returned error %d", err);
         *curlcode = CURLE_SEND_ERROR;
         return -1L;
     }
@@ -3215,7 +3356,7 @@
           *curlcode = CURLE_AGAIN;
           return -1L;
         default:
-          failf(conn->data, "SSLWrite() returned error %d", err);
+          failf(data, "SSLWrite() returned error %d", err);
           *curlcode = CURLE_SEND_ERROR;
           return -1L;
       }
@@ -3224,13 +3365,13 @@
   return (ssize_t)processed;
 }
 
-static ssize_t sectransp_recv(struct connectdata *conn,
+static ssize_t sectransp_recv(struct Curl_easy *data,
                               int num,
                               char *buf,
                               size_t buffersize,
                               CURLcode *curlcode)
 {
-  /*struct Curl_easy *data = conn->data;*/
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
   struct ssl_backend_data *backend = connssl->backend;
   size_t processed = 0UL;
@@ -3261,15 +3402,17 @@
         /* The below is errSSLPeerAuthCompleted; it's not defined in
            Leopard's headers */
       case -9841:
-        if(SSL_CONN_CONFIG(CAfile) && SSL_CONN_CONFIG(verifypeer)) {
-          CURLcode result = verify_cert(SSL_CONN_CONFIG(CAfile), conn->data,
+        if((SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(ca_info_blob)) &&
+           SSL_CONN_CONFIG(verifypeer)) {
+          CURLcode result = verify_cert(data, SSL_CONN_CONFIG(CAfile),
+                                        SSL_CONN_CONFIG(ca_info_blob),
                                         backend->ssl_ctx);
           if(result)
             return result;
         }
         goto again;
       default:
-        failf(conn->data, "SSLRead() return error %d", err);
+        failf(data, "SSLRead() return error %d", err);
         *curlcode = CURLE_RECV_ERROR;
         return -1L;
         break;
@@ -3278,8 +3421,8 @@
   return (ssize_t)processed;
 }
 
-static void *Curl_sectransp_get_internals(struct ssl_connect_data *connssl,
-                                          CURLINFO info UNUSED_PARAM)
+static void *sectransp_get_internals(struct ssl_connect_data *connssl,
+                                     CURLINFO info UNUSED_PARAM)
 {
   struct ssl_backend_data *backend = connssl->backend;
   (void)info;
@@ -3289,6 +3432,7 @@
 const struct Curl_ssl Curl_ssl_sectransp = {
   { CURLSSLBACKEND_SECURETRANSPORT, "secure-transport" }, /* info */
 
+  SSLSUPP_CAINFO_BLOB |
 #ifdef SECTRANSP_PINNEDPUBKEY
   SSLSUPP_PINNEDPUBKEY,
 #else
@@ -3299,24 +3443,26 @@
 
   Curl_none_init,                     /* init */
   Curl_none_cleanup,                  /* cleanup */
-  Curl_sectransp_version,             /* version */
-  Curl_sectransp_check_cxn,           /* check_cxn */
-  Curl_sectransp_shutdown,            /* shutdown */
-  Curl_sectransp_data_pending,        /* data_pending */
-  Curl_sectransp_random,              /* random */
+  sectransp_version,                  /* version */
+  sectransp_check_cxn,                /* check_cxn */
+  sectransp_shutdown,                 /* shutdown */
+  sectransp_data_pending,             /* data_pending */
+  sectransp_random,                   /* random */
   Curl_none_cert_status_request,      /* cert_status_request */
-  Curl_sectransp_connect,             /* connect */
-  Curl_sectransp_connect_nonblocking, /* connect_nonblocking */
-  Curl_sectransp_get_internals,       /* get_internals */
-  Curl_sectransp_close,               /* close_one */
+  sectransp_connect,                  /* connect */
+  sectransp_connect_nonblocking,      /* connect_nonblocking */
+  Curl_ssl_getsock,                   /* getsock */
+  sectransp_get_internals,            /* get_internals */
+  sectransp_close,                    /* close_one */
   Curl_none_close_all,                /* close_all */
-  Curl_sectransp_session_free,        /* session_free */
+  sectransp_session_free,             /* session_free */
   Curl_none_set_engine,               /* set_engine */
   Curl_none_set_engine_default,       /* set_engine_default */
   Curl_none_engines_list,             /* engines_list */
-  Curl_sectransp_false_start,         /* false_start */
-  Curl_sectransp_md5sum,              /* md5sum */
-  Curl_sectransp_sha256sum            /* sha256sum */
+  sectransp_false_start,              /* false_start */
+  sectransp_sha256sum,                /* sha256sum */
+  NULL,                               /* associate_connection */
+  NULL                                /* disassociate_connection */
 };
 
 #ifdef __clang__
diff --git a/lib/vtls/sectransp.h b/lib/vtls/sectransp.h
index 5cec797..0febd66 100644
--- a/lib/vtls/sectransp.h
+++ b/lib/vtls/sectransp.h
@@ -8,11 +8,11 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2012 - 2014, Nick Zitzmann, <nickzman@gmail.com>.
- * Copyright (C) 2012 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index e65fb4f..e5bbe1f 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -75,17 +75,21 @@
                                   (1<<CURL_LOCK_DATA_SSL_SESSION)))
 
 #define CLONE_STRING(var)                    \
-  if(source->var) {                          \
-    dest->var = strdup(source->var);         \
-    if(!dest->var)                           \
-      return FALSE;                          \
-  }                                          \
-  else                                       \
-    dest->var = NULL;
+  do {                                       \
+    if(source->var) {                        \
+      dest->var = strdup(source->var);       \
+      if(!dest->var)                         \
+        return FALSE;                        \
+    }                                        \
+    else                                     \
+      dest->var = NULL;                      \
+  } while(0)
 
-#define CLONE_BLOB(var)                         \
-  if(blobdup(&dest->var, source->var))         \
-    return FALSE;
+#define CLONE_BLOB(var)                        \
+  do {                                         \
+    if(blobdup(&dest->var, source->var))       \
+      return FALSE;                            \
+  } while(0)
 
 static CURLcode blobdup(struct curl_blob **dest,
                         struct curl_blob *src)
@@ -121,6 +125,16 @@
   return !memcmp(first->data, second->data, first->len); /* same data */
 }
 
+static bool safecmp(char *a, char *b)
+{
+  if(a && b)
+    return !strcmp(a, b);
+  else if(!a && !b)
+    return TRUE; /* match */
+  return FALSE; /* no match */
+}
+
+
 bool
 Curl_ssl_config_matches(struct ssl_primary_config *data,
                         struct ssl_primary_config *needle)
@@ -131,11 +145,14 @@
      (data->verifyhost == needle->verifyhost) &&
      (data->verifystatus == needle->verifystatus) &&
      blobcmp(data->cert_blob, needle->cert_blob) &&
-     Curl_safe_strcasecompare(data->CApath, needle->CApath) &&
-     Curl_safe_strcasecompare(data->CAfile, needle->CAfile) &&
-     Curl_safe_strcasecompare(data->clientcert, needle->clientcert) &&
-     Curl_safe_strcasecompare(data->random_file, needle->random_file) &&
-     Curl_safe_strcasecompare(data->egdsocket, needle->egdsocket) &&
+     blobcmp(data->ca_info_blob, needle->ca_info_blob) &&
+     blobcmp(data->issuercert_blob, needle->issuercert_blob) &&
+     safecmp(data->CApath, needle->CApath) &&
+     safecmp(data->CAfile, needle->CAfile) &&
+     safecmp(data->issuercert, needle->issuercert) &&
+     safecmp(data->clientcert, needle->clientcert) &&
+     safecmp(data->random_file, needle->random_file) &&
+     safecmp(data->egdsocket, needle->egdsocket) &&
      Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list) &&
      Curl_safe_strcasecompare(data->cipher_list13, needle->cipher_list13) &&
      Curl_safe_strcasecompare(data->curves, needle->curves) &&
@@ -157,8 +174,11 @@
   dest->sessionid = source->sessionid;
 
   CLONE_BLOB(cert_blob);
+  CLONE_BLOB(ca_info_blob);
+  CLONE_BLOB(issuercert_blob);
   CLONE_STRING(CApath);
   CLONE_STRING(CAfile);
+  CLONE_STRING(issuercert);
   CLONE_STRING(clientcert);
   CLONE_STRING(random_file);
   CLONE_STRING(egdsocket);
@@ -174,6 +194,7 @@
 {
   Curl_safefree(sslc->CApath);
   Curl_safefree(sslc->CAfile);
+  Curl_safefree(sslc->issuercert);
   Curl_safefree(sslc->clientcert);
   Curl_safefree(sslc->random_file);
   Curl_safefree(sslc->egdsocket);
@@ -181,17 +202,19 @@
   Curl_safefree(sslc->cipher_list13);
   Curl_safefree(sslc->pinned_key);
   Curl_safefree(sslc->cert_blob);
+  Curl_safefree(sslc->ca_info_blob);
+  Curl_safefree(sslc->issuercert_blob);
   Curl_safefree(sslc->curves);
 }
 
 #ifdef USE_SSL
-static int multissl_init(const struct Curl_ssl *backend);
+static int multissl_setup(const struct Curl_ssl *backend);
 #endif
 
 int Curl_ssl_backend(void)
 {
 #ifdef USE_SSL
-  multissl_init(NULL);
+  multissl_setup(NULL);
   return Curl_ssl->info.id;
 #else
   return (int)CURLSSLBACKEND_NONE;
@@ -287,7 +310,8 @@
 #endif
 
 CURLcode
-Curl_ssl_connect(struct connectdata *conn, int sockindex)
+Curl_ssl_connect(struct Curl_easy *data, struct connectdata *conn,
+                 int sockindex)
 {
   CURLcode result;
 
@@ -299,26 +323,29 @@
   }
 #endif
 
-  if(!ssl_prefs_check(conn->data))
+  if(!ssl_prefs_check(data))
     return CURLE_SSL_CONNECT_ERROR;
 
   /* mark this is being ssl-enabled from here on. */
   conn->ssl[sockindex].use = TRUE;
   conn->ssl[sockindex].state = ssl_connection_negotiating;
 
-  result = Curl_ssl->connect_blocking(conn, sockindex);
+  result = Curl_ssl->connect_blocking(data, conn, sockindex);
 
   if(!result)
-    Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+    Curl_pgrsTime(data, TIMER_APPCONNECT); /* SSL is connected */
+  else
+    conn->ssl[sockindex].use = FALSE;
 
   return result;
 }
 
 CURLcode
-Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
-                             bool *done)
+Curl_ssl_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn,
+                             bool isproxy, int sockindex, bool *done)
 {
   CURLcode result;
+
 #ifndef CURL_DISABLE_PROXY
   if(conn->bits.proxy_ssl_connected[sockindex]) {
     result = ssl_connect_init_proxy(conn, sockindex);
@@ -326,53 +353,54 @@
       return result;
   }
 #endif
-  if(!ssl_prefs_check(conn->data))
+  if(!ssl_prefs_check(data))
     return CURLE_SSL_CONNECT_ERROR;
 
   /* mark this is being ssl requested from here on. */
   conn->ssl[sockindex].use = TRUE;
-  result = Curl_ssl->connect_nonblocking(conn, sockindex, done);
-  if(!result && *done)
-    Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+  result = Curl_ssl->connect_nonblocking(data, conn, sockindex, done);
+  if(result)
+    conn->ssl[sockindex].use = FALSE;
+  else if(*done && !isproxy)
+    Curl_pgrsTime(data, TIMER_APPCONNECT); /* SSL is connected */
   return result;
 }
 
 /*
  * Lock shared SSL session data
  */
-void Curl_ssl_sessionid_lock(struct connectdata *conn)
+void Curl_ssl_sessionid_lock(struct Curl_easy *data)
 {
-  if(SSLSESSION_SHARED(conn->data))
-    Curl_share_lock(conn->data,
-                    CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+  if(SSLSESSION_SHARED(data))
+    Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
 }
 
 /*
  * Unlock shared SSL session data
  */
-void Curl_ssl_sessionid_unlock(struct connectdata *conn)
+void Curl_ssl_sessionid_unlock(struct Curl_easy *data)
 {
-  if(SSLSESSION_SHARED(conn->data))
-    Curl_share_unlock(conn->data, CURL_LOCK_DATA_SSL_SESSION);
+  if(SSLSESSION_SHARED(data))
+    Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
 }
 
 /*
  * Check if there's a session ID for the given connection in the cache, and if
  * there's one suitable, it is provided. Returns TRUE when no entry matched.
  */
-bool Curl_ssl_getsessionid(struct connectdata *conn,
+bool Curl_ssl_getsessionid(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           const bool isProxy,
                            void **ssl_sessionid,
                            size_t *idsize, /* set 0 if unknown */
                            int sockindex)
 {
   struct Curl_ssl_session *check;
-  struct Curl_easy *data = conn->data;
   size_t i;
   long *general_age;
   bool no_match = TRUE;
 
 #ifndef CURL_DISABLE_PROXY
-  const bool isProxy = CONNECT_PROXY_SSL();
   struct ssl_primary_config * const ssl_config = isProxy ?
     &conn->proxy_ssl_config :
     &conn->ssl_config;
@@ -384,14 +412,20 @@
   struct ssl_primary_config * const ssl_config = &conn->ssl_config;
   const char * const name = conn->host.name;
   int port = conn->remote_port;
-  (void)sockindex;
 #endif
+  (void)sockindex;
   *ssl_sessionid = NULL;
 
+#ifdef CURL_DISABLE_PROXY
+  if(isProxy)
+    return TRUE;
+#endif
+
   DEBUGASSERT(SSL_SET_OPTION(primary.sessionid));
 
-  if(!SSL_SET_OPTION(primary.sessionid))
-    /* session ID re-use is disabled */
+  if(!SSL_SET_OPTION(primary.sessionid) || !data->state.session)
+    /* session ID re-use is disabled or the session cache has not been
+       setup */
     return TRUE;
 
   /* Lock if shared */
@@ -426,6 +460,10 @@
     }
   }
 
+  DEBUGF(infof(data, "%s Session ID in cache for %s %s://%s:%d",
+               no_match? "Didn't find": "Found",
+               isProxy ? "proxy" : "host",
+               conn->handler->scheme, name, port));
   return no_match;
 }
 
@@ -453,10 +491,9 @@
 /*
  * Delete the given session ID from the cache.
  */
-void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid)
+void Curl_ssl_delsessionid(struct Curl_easy *data, void *ssl_sessionid)
 {
   size_t i;
-  struct Curl_easy *data = conn->data;
 
   for(i = 0; i < data->set.general_ssl.max_ssl_sessions; i++) {
     struct Curl_ssl_session *check = &data->state.session[i];
@@ -474,33 +511,36 @@
  * layer. Curl_XXXX_session_free() will be called to free/kill the session ID
  * later on.
  */
-CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
+CURLcode Curl_ssl_addsessionid(struct Curl_easy *data,
+                               struct connectdata *conn,
+                               const bool isProxy,
                                void *ssl_sessionid,
                                size_t idsize,
                                int sockindex)
 {
   size_t i;
-  struct Curl_easy *data = conn->data; /* the mother of all structs */
-  struct Curl_ssl_session *store = &data->state.session[0];
-  long oldest_age = data->state.session[0].age; /* zero if unused */
+  struct Curl_ssl_session *store;
+  long oldest_age;
   char *clone_host;
   char *clone_conn_to_host;
   int conn_to_port;
   long *general_age;
 #ifndef CURL_DISABLE_PROXY
-  const bool isProxy = CONNECT_PROXY_SSL();
   struct ssl_primary_config * const ssl_config = isProxy ?
     &conn->proxy_ssl_config :
     &conn->ssl_config;
   const char *hostname = isProxy ? conn->http_proxy.host.name :
     conn->host.name;
 #else
-  /* proxy support disabled */
-  const bool isProxy = FALSE;
   struct ssl_primary_config * const ssl_config = &conn->ssl_config;
   const char *hostname = conn->host.name;
-  (void)sockindex;
 #endif
+  (void)sockindex;
+  if(!data->state.session)
+    return CURLE_OK;
+
+  store = &data->state.session[0];
+  oldest_age = data->state.session[0].age; /* zero if unused */
   DEBUGASSERT(SSL_SET_OPTION(primary.sessionid));
 
   clone_host = strdup(hostname);
@@ -569,9 +609,31 @@
     return CURLE_OUT_OF_MEMORY;
   }
 
+  DEBUGF(infof(data, "Added Session ID to cache for %s://%s:%d [%s]",
+               store->scheme, store->name, store->remote_port,
+               isProxy ? "PROXY" : "server"));
   return CURLE_OK;
 }
 
+void Curl_ssl_associate_conn(struct Curl_easy *data,
+                             struct connectdata *conn)
+{
+  if(Curl_ssl->associate_connection) {
+    Curl_ssl->associate_connection(data, conn, FIRSTSOCKET);
+    if(conn->sock[SECONDARYSOCKET] && conn->bits.sock_accepted)
+      Curl_ssl->associate_connection(data, conn, SECONDARYSOCKET);
+  }
+}
+
+void Curl_ssl_detach_conn(struct Curl_easy *data,
+                          struct connectdata *conn)
+{
+  if(Curl_ssl->disassociate_connection) {
+    Curl_ssl->disassociate_connection(data, FIRSTSOCKET);
+    if(conn->sock[SECONDARYSOCKET] && conn->bits.sock_accepted)
+      Curl_ssl->disassociate_connection(data, SECONDARYSOCKET);
+  }
+}
 
 void Curl_ssl_close_all(struct Curl_easy *data)
 {
@@ -589,9 +651,6 @@
   Curl_ssl->close_all(data);
 }
 
-#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
-  defined(USE_SECTRANSP) || defined(USE_NSS) || \
-  defined(USE_MBEDTLS) || defined(USE_WOLFSSL) || defined(USE_BEARSSL)
 int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks)
 {
   struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
@@ -609,27 +668,19 @@
 
   return GETSOCK_BLANK;
 }
-#else
-int Curl_ssl_getsock(struct connectdata *conn,
-                     curl_socket_t *socks)
-{
-  (void)conn;
-  (void)socks;
-  return GETSOCK_BLANK;
-}
-/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_SECTRANSP || USE_NSS */
-#endif
 
-void Curl_ssl_close(struct connectdata *conn, int sockindex)
+void Curl_ssl_close(struct Curl_easy *data, struct connectdata *conn,
+                    int sockindex)
 {
   DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
-  Curl_ssl->close_one(conn, sockindex);
+  Curl_ssl->close_one(data, conn, sockindex);
   conn->ssl[sockindex].state = ssl_connection_none;
 }
 
-CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
+CURLcode Curl_ssl_shutdown(struct Curl_easy *data, struct connectdata *conn,
+                           int sockindex)
 {
-  if(Curl_ssl->shut_down(conn, sockindex))
+  if(Curl_ssl->shut_down(data, conn, sockindex))
     return CURLE_SSL_SHUTDOWN_FAILED;
 
   conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */
@@ -684,14 +735,14 @@
   return CURLE_OK;
 }
 
-static size_t Curl_multissl_version(char *buffer, size_t size);
+static size_t multissl_version(char *buffer, size_t size);
 
-size_t Curl_ssl_version(char *buffer, size_t size)
+void Curl_ssl_version(char *buffer, size_t size)
 {
 #ifdef CURL_WITH_MULTI_SSL
-  return Curl_multissl_version(buffer, size);
+  (void)multissl_version(buffer, size);
 #else
-  return Curl_ssl->version(buffer, size);
+  (void)Curl_ssl->version(buffer, size);
 #endif
 }
 
@@ -918,7 +969,7 @@
     if(encode)
       return encode;
 
-    infof(data, "\t public key hash: sha256//%s\n", encoded);
+    infof(data, " public key hash: sha256//%s", encoded);
 
     /* it starts with sha256//, copy so we can modify it */
     pinkeylen = strlen(pinnedpubkey) + 1;
@@ -1030,16 +1081,6 @@
   return result;
 }
 
-#ifndef CURL_DISABLE_CRYPTO_AUTH
-CURLcode Curl_ssl_md5sum(unsigned char *tmp, /* input */
-                         size_t tmplen,
-                         unsigned char *md5sum, /* output */
-                         size_t md5len)
-{
-  return Curl_ssl->md5sum(tmp, tmplen, md5sum, md5len);
-}
-#endif
-
 /*
  * Check whether the SSL backend supports the status_request extension.
  */
@@ -1076,9 +1117,11 @@
 void Curl_none_cleanup(void)
 { }
 
-int Curl_none_shutdown(struct connectdata *conn UNUSED_PARAM,
+int Curl_none_shutdown(struct Curl_easy *data UNUSED_PARAM,
+                       struct connectdata *conn UNUSED_PARAM,
                        int sockindex UNUSED_PARAM)
 {
+  (void)data;
   (void)conn;
   (void)sockindex;
   return 0;
@@ -1148,70 +1191,51 @@
   return FALSE;
 }
 
-#ifndef CURL_DISABLE_CRYPTO_AUTH
-CURLcode Curl_none_md5sum(unsigned char *input, size_t inputlen,
-                          unsigned char *md5sum, size_t md5len UNUSED_PARAM)
+static int multissl_init(void)
 {
-  struct MD5_context *MD5pw;
-
-  (void)md5len;
-
-  MD5pw = Curl_MD5_init(Curl_DIGEST_MD5);
-  if(!MD5pw)
-    return CURLE_OUT_OF_MEMORY;
-  Curl_MD5_update(MD5pw, input, curlx_uztoui(inputlen));
-  Curl_MD5_final(MD5pw, md5sum);
-  return CURLE_OK;
-}
-#else
-CURLcode Curl_none_md5sum(unsigned char *input UNUSED_PARAM,
-                          size_t inputlen UNUSED_PARAM,
-                          unsigned char *md5sum UNUSED_PARAM,
-                          size_t md5len UNUSED_PARAM)
-{
-  (void)input;
-  (void)inputlen;
-  (void)md5sum;
-  (void)md5len;
-  return CURLE_NOT_BUILT_IN;
-}
-#endif
-
-static int Curl_multissl_init(void)
-{
-  if(multissl_init(NULL))
+  if(multissl_setup(NULL))
     return 1;
   return Curl_ssl->init();
 }
 
-static CURLcode Curl_multissl_connect(struct connectdata *conn, int sockindex)
+static CURLcode multissl_connect(struct Curl_easy *data,
+                                 struct connectdata *conn, int sockindex)
 {
-  if(multissl_init(NULL))
+  if(multissl_setup(NULL))
     return CURLE_FAILED_INIT;
-  return Curl_ssl->connect_blocking(conn, sockindex);
+  return Curl_ssl->connect_blocking(data, conn, sockindex);
 }
 
-static CURLcode Curl_multissl_connect_nonblocking(struct connectdata *conn,
-                                                  int sockindex, bool *done)
+static CURLcode multissl_connect_nonblocking(struct Curl_easy *data,
+                                             struct connectdata *conn,
+                                             int sockindex, bool *done)
 {
-  if(multissl_init(NULL))
+  if(multissl_setup(NULL))
     return CURLE_FAILED_INIT;
-  return Curl_ssl->connect_nonblocking(conn, sockindex, done);
+  return Curl_ssl->connect_nonblocking(data, conn, sockindex, done);
 }
 
-static void *Curl_multissl_get_internals(struct ssl_connect_data *connssl,
-                                         CURLINFO info)
+static int multissl_getsock(struct connectdata *conn, curl_socket_t *socks)
 {
-  if(multissl_init(NULL))
+  if(multissl_setup(NULL))
+    return 0;
+  return Curl_ssl->getsock(conn, socks);
+}
+
+static void *multissl_get_internals(struct ssl_connect_data *connssl,
+                                    CURLINFO info)
+{
+  if(multissl_setup(NULL))
     return NULL;
   return Curl_ssl->get_internals(connssl, info);
 }
 
-static void Curl_multissl_close(struct connectdata *conn, int sockindex)
+static void multissl_close(struct Curl_easy *data, struct connectdata *conn,
+                           int sockindex)
 {
-  if(multissl_init(NULL))
+  if(multissl_setup(NULL))
     return;
-  Curl_ssl->close_one(conn, sockindex);
+  Curl_ssl->close_one(data, conn, sockindex);
 }
 
 static const struct Curl_ssl Curl_ssl_multi = {
@@ -1219,26 +1243,28 @@
   0, /* supports nothing */
   (size_t)-1, /* something insanely large to be on the safe side */
 
-  Curl_multissl_init,                /* init */
+  multissl_init,                     /* init */
   Curl_none_cleanup,                 /* cleanup */
-  Curl_multissl_version,             /* version */
+  multissl_version,                  /* version */
   Curl_none_check_cxn,               /* check_cxn */
   Curl_none_shutdown,                /* shutdown */
   Curl_none_data_pending,            /* data_pending */
   Curl_none_random,                  /* random */
   Curl_none_cert_status_request,     /* cert_status_request */
-  Curl_multissl_connect,             /* connect */
-  Curl_multissl_connect_nonblocking, /* connect_nonblocking */
-  Curl_multissl_get_internals,       /* get_internals */
-  Curl_multissl_close,               /* close_one */
+  multissl_connect,                  /* connect */
+  multissl_connect_nonblocking,      /* connect_nonblocking */
+  multissl_getsock,                  /* getsock */
+  multissl_get_internals,            /* get_internals */
+  multissl_close,                    /* close_one */
   Curl_none_close_all,               /* close_all */
   Curl_none_session_free,            /* session_free */
   Curl_none_set_engine,              /* set_engine */
   Curl_none_set_engine_default,      /* set_engine_default */
   Curl_none_engines_list,            /* engines_list */
   Curl_none_false_start,             /* false_start */
-  Curl_none_md5sum,                  /* md5sum */
-  NULL                               /* sha256sum */
+  NULL,                              /* sha256sum */
+  NULL,                              /* associate_connection */
+  NULL                               /* disassociate_connection */
 };
 
 const struct Curl_ssl *Curl_ssl =
@@ -1256,6 +1282,8 @@
   &Curl_ssl_mbedtls;
 #elif defined(USE_NSS)
   &Curl_ssl_nss;
+#elif defined(USE_RUSTLS)
+  &Curl_ssl_rustls;
 #elif defined(USE_OPENSSL)
   &Curl_ssl_openssl;
 #elif defined(USE_SCHANNEL)
@@ -1299,10 +1327,13 @@
 #if defined(USE_BEARSSL)
   &Curl_ssl_bearssl,
 #endif
+#if defined(USE_RUSTLS)
+  &Curl_ssl_rustls,
+#endif
   NULL
 };
 
-static size_t Curl_multissl_version(char *buffer, size_t size)
+static size_t multissl_version(char *buffer, size_t size)
 {
   static const struct Curl_ssl *selected;
   static char backends[200];
@@ -1346,7 +1377,7 @@
   return backends_len;
 }
 
-static int multissl_init(const struct Curl_ssl *backend)
+static int multissl_setup(const struct Curl_ssl *backend)
 {
   const char *env;
   char *env_tmp;
@@ -1372,7 +1403,7 @@
     for(i = 0; available_backends[i]; i++) {
       if(strcasecompare(env, available_backends[i]->info.name)) {
         Curl_ssl = available_backends[i];
-        curl_free(env_tmp);
+        free(env_tmp);
         return 0;
       }
     }
@@ -1380,7 +1411,7 @@
 
   /* Fall back to first available backend */
   Curl_ssl = available_backends[0];
-  curl_free(env_tmp);
+  free(env_tmp);
   return 0;
 }
 
@@ -1405,7 +1436,7 @@
   for(i = 0; available_backends[i]; i++) {
     if(available_backends[i]->info.id == id ||
        (name && strcasecompare(available_backends[i]->info.name, name))) {
-      multissl_init(available_backends[i]);
+      multissl_setup(available_backends[i]);
       return CURLSSLSET_OK;
     }
   }
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
index b86bdbc..beaa83d 100644
--- a/lib/vtls/vtls.h
+++ b/lib/vtls/vtls.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,6 +32,7 @@
 #define SSLSUPP_SSL_CTX      (1<<3) /* supports CURLOPT_SSL_CTX */
 #define SSLSUPP_HTTPS_PROXY  (1<<4) /* supports access via HTTPS proxies */
 #define SSLSUPP_TLS13_CIPHERSUITES (1<<5) /* supports TLS 1.3 ciphersuites */
+#define SSLSUPP_CAINFO_BLOB  (1<<6)
 
 struct Curl_ssl {
   /*
@@ -47,7 +48,8 @@
 
   size_t (*version)(char *buffer, size_t size);
   int (*check_cxn)(struct connectdata *cxn);
-  int (*shut_down)(struct connectdata *conn, int sockindex);
+  int (*shut_down)(struct Curl_easy *data, struct connectdata *conn,
+                   int sockindex);
   bool (*data_pending)(const struct connectdata *conn,
                        int connindex);
 
@@ -56,11 +58,22 @@
                      size_t length);
   bool (*cert_status_request)(void);
 
-  CURLcode (*connect_blocking)(struct connectdata *conn, int sockindex);
-  CURLcode (*connect_nonblocking)(struct connectdata *conn, int sockindex,
+  CURLcode (*connect_blocking)(struct Curl_easy *data,
+                               struct connectdata *conn, int sockindex);
+  CURLcode (*connect_nonblocking)(struct Curl_easy *data,
+                                  struct connectdata *conn, int sockindex,
                                   bool *done);
+
+  /* If the SSL backend wants to read or write on this connection during a
+     handshake, set socks[0] to the connection's FIRSTSOCKET, and return
+     a bitmap indicating read or write with GETSOCK_WRITESOCK(0) or
+     GETSOCK_READSOCK(0). Otherwise return GETSOCK_BLANK.
+     Mandatory. */
+  int (*getsock)(struct connectdata *conn, curl_socket_t *socks);
+
   void *(*get_internals)(struct ssl_connect_data *connssl, CURLINFO info);
-  void (*close_one)(struct connectdata *conn, int sockindex);
+  void (*close_one)(struct Curl_easy *data, struct connectdata *conn,
+                    int sockindex);
   void (*close_all)(struct Curl_easy *data);
   void (*session_free)(void *ptr);
 
@@ -69,11 +82,13 @@
   struct curl_slist *(*engines_list)(struct Curl_easy *data);
 
   bool (*false_start)(void);
-
-  CURLcode (*md5sum)(unsigned char *input, size_t inputlen,
-                     unsigned char *md5sum, size_t md5sumlen);
   CURLcode (*sha256sum)(const unsigned char *input, size_t inputlen,
                     unsigned char *sha256sum, size_t sha256sumlen);
+
+  void (*associate_connection)(struct Curl_easy *data,
+                               struct connectdata *conn,
+                               int sockindex);
+  void (*disassociate_connection)(struct Curl_easy *data, int sockindex);
 };
 
 #ifdef USE_SSL
@@ -82,7 +97,8 @@
 
 int Curl_none_init(void);
 void Curl_none_cleanup(void);
-int Curl_none_shutdown(struct connectdata *conn, int sockindex);
+int Curl_none_shutdown(struct Curl_easy *data, struct connectdata *conn,
+                       int sockindex);
 int Curl_none_check_cxn(struct connectdata *conn);
 CURLcode Curl_none_random(struct Curl_easy *data, unsigned char *entropy,
                           size_t length);
@@ -95,8 +111,6 @@
 struct curl_slist *Curl_none_engines_list(struct Curl_easy *data);
 bool Curl_none_false_start(void);
 bool Curl_ssl_tls13_ciphersuites(void);
-CURLcode Curl_none_md5sum(unsigned char *input, size_t inputlen,
-                          unsigned char *md5sum, size_t md5len);
 
 #include "openssl.h"        /* OpenSSL versions */
 #include "gtls.h"           /* GnuTLS versions */
@@ -108,6 +122,7 @@
 #include "mbedtls.h"        /* mbedTLS versions */
 #include "mesalink.h"       /* MesaLink versions */
 #include "bearssl.h"        /* BearSSL versions */
+#include "rustls.h"         /* rustls versions */
 
 #ifndef MAX_PINNED_PUBKEY_SIZE
 #define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */
@@ -117,9 +132,11 @@
 #define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
 #endif
 
-/* see https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */
+/* see https://www.iana.org/assignments/tls-extensiontype-values/ */
 #define ALPN_HTTP_1_1_LENGTH 8
 #define ALPN_HTTP_1_1 "http/1.1"
+#define ALPN_H2_LENGTH 2
+#define ALPN_H2 "h2"
 
 /* set of helper macros for the backends to access the correct fields. For the
    proxy or for the remote host - to properly support HTTPS proxy */
@@ -139,9 +156,11 @@
   (SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name)
 #define SSL_HOST_DISPNAME()                                             \
   (SSL_IS_PROXY() ? conn->http_proxy.host.dispname : conn->host.dispname)
+#define SSL_HOST_PORT()                                                 \
+  (SSL_IS_PROXY() ? conn->port : conn->remote_port)
 #define SSL_PINNED_PUB_KEY() (SSL_IS_PROXY()                            \
   ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY]                     \
-  : data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG])
+  : data->set.str[STRING_SSL_PINNEDPUBLICKEY])
 #else
 #define SSL_IS_PROXY() FALSE
 #define SSL_SET_OPTION(var) data->set.ssl.var
@@ -149,8 +168,9 @@
 #define SSL_CONN_CONFIG(var) conn->ssl_config.var
 #define SSL_HOST_NAME() conn->host.name
 #define SSL_HOST_DISPNAME() conn->host.dispname
+#define SSL_HOST_PORT() conn->remote_port
 #define SSL_PINNED_PUB_KEY()                                            \
-  data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]
+  data->set.str[STRING_SSL_PINNEDPUBLICKEY]
 #endif
 
 bool Curl_ssl_config_matches(struct ssl_primary_config *data,
@@ -158,6 +178,10 @@
 bool Curl_clone_primary_ssl_config(struct ssl_primary_config *source,
                                    struct ssl_primary_config *dest);
 void Curl_free_primary_ssl_config(struct ssl_primary_config *sslc);
+/* An implementation of the getsock field of Curl_ssl that relies
+   on the ssl_connect_state enum. Asks for read or write depending
+   on whether conn->state is ssl_connect_2_reading or
+   ssl_connect_2_writing. */
 int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks);
 
 int Curl_ssl_backend(void);
@@ -165,15 +189,20 @@
 #ifdef USE_SSL
 int Curl_ssl_init(void);
 void Curl_ssl_cleanup(void);
-CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex);
-CURLcode Curl_ssl_connect_nonblocking(struct connectdata *conn,
+CURLcode Curl_ssl_connect(struct Curl_easy *data, struct connectdata *conn,
+                          int sockindex);
+CURLcode Curl_ssl_connect_nonblocking(struct Curl_easy *data,
+                                      struct connectdata *conn,
+                                      bool isproxy,
                                       int sockindex,
                                       bool *done);
 /* tell the SSL stuff to close down all open information regarding
    connections (and thus session ID caching etc) */
 void Curl_ssl_close_all(struct Curl_easy *data);
-void Curl_ssl_close(struct connectdata *conn, int sockindex);
-CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex);
+void Curl_ssl_close(struct Curl_easy *data, struct connectdata *conn,
+                    int sockindex);
+CURLcode Curl_ssl_shutdown(struct Curl_easy *data, struct connectdata *conn,
+                           int sockindex);
 CURLcode Curl_ssl_set_engine(struct Curl_easy *data, const char *engine);
 /* Sets engine as default for all SSL operations */
 CURLcode Curl_ssl_set_engine_default(struct Curl_easy *data);
@@ -181,7 +210,7 @@
 
 /* init the SSL session ID cache */
 CURLcode Curl_ssl_initsessions(struct Curl_easy *, size_t);
-size_t Curl_ssl_version(char *buffer, size_t size);
+void Curl_ssl_version(char *buffer, size_t size);
 bool Curl_ssl_data_pending(const struct connectdata *conn,
                            int connindex);
 int Curl_ssl_check_cxn(struct connectdata *conn);
@@ -205,10 +234,10 @@
  * The purpose of explicitly locking SSL session cache data is to allow
  * individual SSL engines to manage session lifetime in their specific way.
  */
-void Curl_ssl_sessionid_lock(struct connectdata *conn);
+void Curl_ssl_sessionid_lock(struct Curl_easy *data);
 
 /* Unlock session cache mutex */
-void Curl_ssl_sessionid_unlock(struct connectdata *conn);
+void Curl_ssl_sessionid_unlock(struct Curl_easy *data);
 
 /* extract a session ID
  * Sessionid mutex must be locked (see Curl_ssl_sessionid_lock).
@@ -216,7 +245,9 @@
  * is properly taken (e.g. its refcount is incremented
  * under sessionid mutex).
  */
-bool Curl_ssl_getsessionid(struct connectdata *conn,
+bool Curl_ssl_getsessionid(struct Curl_easy *data,
+                           struct connectdata *conn,
+                           const bool isProxy,
                            void **ssl_sessionid,
                            size_t *idsize, /* set 0 if unknown */
                            int sockindex);
@@ -225,7 +256,9 @@
  * Caller must ensure that it has properly shared ownership of this sessionid
  * object with cache (e.g. incrementing refcount on success)
  */
-CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
+CURLcode Curl_ssl_addsessionid(struct Curl_easy *data,
+                               struct connectdata *conn,
+                               const bool isProxy,
                                void *ssl_sessionid,
                                size_t idsize,
                                int sockindex);
@@ -242,15 +275,11 @@
  * take sessionid object ownership from sessionid cache
  * (e.g. decrement refcount).
  */
-void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid);
+void Curl_ssl_delsessionid(struct Curl_easy *data, void *ssl_sessionid);
 
 /* get N random bytes into the buffer */
 CURLcode Curl_ssl_random(struct Curl_easy *data, unsigned char *buffer,
                          size_t length);
-CURLcode Curl_ssl_md5sum(unsigned char *tmp, /* input */
-                         size_t tmplen,
-                         unsigned char *md5sum, /* output */
-                         size_t md5len);
 /* Check pinned public key. */
 CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data,
                               const char *pinnedpubkey,
@@ -260,6 +289,11 @@
 
 bool Curl_ssl_false_start(void);
 
+void Curl_ssl_associate_conn(struct Curl_easy *data,
+                             struct connectdata *conn);
+void Curl_ssl_detach_conn(struct Curl_easy *data,
+                          struct connectdata *conn);
+
 #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
 
 #else /* if not USE_SSL */
@@ -267,10 +301,10 @@
 /* When SSL support is not present, just define away these function calls */
 #define Curl_ssl_init() 1
 #define Curl_ssl_cleanup() Curl_nop_stmt
-#define Curl_ssl_connect(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_connect(x,y,z) CURLE_NOT_BUILT_IN
 #define Curl_ssl_close_all(x) Curl_nop_stmt
-#define Curl_ssl_close(x,y) Curl_nop_stmt
-#define Curl_ssl_shutdown(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_close(x,y,z) Curl_nop_stmt
+#define Curl_ssl_shutdown(x,y,z) CURLE_NOT_BUILT_IN
 #define Curl_ssl_set_engine(x,y) CURLE_NOT_BUILT_IN
 #define Curl_ssl_set_engine_default(x) CURLE_NOT_BUILT_IN
 #define Curl_ssl_engines_list(x) NULL
@@ -280,12 +314,14 @@
 #define Curl_ssl_data_pending(x,y) 0
 #define Curl_ssl_check_cxn(x) 0
 #define Curl_ssl_free_certinfo(x) Curl_nop_stmt
-#define Curl_ssl_connect_nonblocking(x,y,z) CURLE_NOT_BUILT_IN
+#define Curl_ssl_connect_nonblocking(x,y,z,w,a) CURLE_NOT_BUILT_IN
 #define Curl_ssl_kill_session(x) Curl_nop_stmt
 #define Curl_ssl_random(x,y,z) ((void)x, CURLE_NOT_BUILT_IN)
 #define Curl_ssl_cert_status_request() FALSE
 #define Curl_ssl_false_start() FALSE
 #define Curl_ssl_tls13_ciphersuites() FALSE
+#define Curl_ssl_associate_conn(a,b) Curl_nop_stmt
+#define Curl_ssl_detach_conn(a,b) Curl_nop_stmt
 #endif
 
 #endif /* HEADER_CURL_VTLS_H */
diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c
index a299b99..7cab17f 100644
--- a/lib/vtls/wolfssl.c
+++ b/lib/vtls/wolfssl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -47,16 +47,6 @@
 #endif
 #endif
 
-/* WOLFSSL_ALLOW_SSLV3 is wolfSSL's build time symbol for enabling SSLv3 in
-   options.h, but is only seen in >= 3.6.6 since that's when they started
-   disabling SSLv3 by default. */
-#ifndef WOLFSSL_ALLOW_SSLV3
-#if (LIBWOLFSSL_VERSION_HEX < 0x03006006) || \
-  defined(HAVE_WOLFSSLV3_CLIENT_METHOD)
-#define WOLFSSL_ALLOW_SSLV3
-#endif
-#endif
-
 #include <limits.h>
 
 #include "urldata.h"
@@ -217,11 +207,10 @@
  * layer and do all necessary magic.
  */
 static CURLcode
-wolfssl_connect_step1(struct connectdata *conn,
+wolfssl_connect_step1(struct Curl_easy *data, struct connectdata *conn,
                      int sockindex)
 {
   char *ciphers;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   SSL_METHOD* req_method = NULL;
@@ -250,13 +239,13 @@
     req_method = SSLv23_client_method();
 #else
     infof(data, "wolfSSL <3.3.0 cannot be configured to use TLS 1.0-1.2, "
-          "TLS 1.0 is used exclusively\n");
+          "TLS 1.0 is used exclusively");
     req_method = TLSv1_client_method();
 #endif
     use_sni(TRUE);
     break;
   case CURL_SSLVERSION_TLSv1_0:
-#ifdef WOLFSSL_ALLOW_TLSV10
+#if defined(WOLFSSL_ALLOW_TLSV10) && !defined(NO_OLD_TLS)
     req_method = TLSv1_client_method();
     use_sni(TRUE);
 #else
@@ -265,8 +254,13 @@
 #endif
     break;
   case CURL_SSLVERSION_TLSv1_1:
+#ifndef NO_OLD_TLS
     req_method = TLSv1_1_client_method();
     use_sni(TRUE);
+#else
+    failf(data, "wolfSSL does not support TLS 1.1");
+    return CURLE_NOT_BUILT_IN;
+#endif
     break;
   case CURL_SSLVERSION_TLSv1_2:
     req_method = TLSv1_2_client_method();
@@ -281,18 +275,6 @@
     failf(data, "wolfSSL: TLS 1.3 is not yet supported");
     return CURLE_SSL_CONNECT_ERROR;
 #endif
-  case CURL_SSLVERSION_SSLv3:
-#ifdef WOLFSSL_ALLOW_SSLV3
-    req_method = SSLv3_client_method();
-    use_sni(FALSE);
-#else
-    failf(data, "wolfSSL does not support SSLv3");
-    return CURLE_NOT_BUILT_IN;
-#endif
-    break;
-  case CURL_SSLVERSION_SSLv2:
-    failf(data, "wolfSSL does not support SSLv2");
-    return CURLE_SSL_CONNECT_ERROR;
   default:
     failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
     return CURLE_SSL_CONNECT_ERROR;
@@ -342,7 +324,7 @@
       failf(data, "failed setting cipher list: %s", ciphers);
       return CURLE_SSL_CIPHER;
     }
-    infof(data, "Cipher selection: %s\n", ciphers);
+    infof(data, "Cipher selection: %s", ciphers);
   }
 
 #ifndef NO_FILESYSTEM
@@ -365,16 +347,16 @@
         /* Just continue with a warning if no strict certificate
            verification is required. */
         infof(data, "error setting certificate verify locations,"
-              " continuing anyway:\n");
+              " continuing anyway:");
       }
     }
     else {
       /* Everything is fine. */
-      infof(data, "successfully set certificate verify locations:\n");
+      infof(data, "successfully set certificate verify locations:");
     }
-    infof(data, " CAfile: %s\n",
+    infof(data, " CAfile: %s",
           SSL_CONN_CONFIG(CAfile) ? SSL_CONN_CONFIG(CAfile) : "none");
-    infof(data, " CApath: %s\n",
+    infof(data, " CApath: %s",
           SSL_CONN_CONFIG(CApath) ? SSL_CONN_CONFIG(CApath) : "none");
   }
 
@@ -414,12 +396,7 @@
 #ifdef ENABLE_IPV6
     struct in6_addr addr6;
 #endif
-#ifndef CURL_DISABLE_PROXY
-    const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-      conn->host.name;
-#else
-    const char * const hostname = conn->host.name;
-#endif
+    const char * const hostname = SSL_HOST_NAME();
     size_t hostname_len = strlen(hostname);
     if((hostname_len < USHRT_MAX) &&
        (0 == Curl_inet_pton(AF_INET, hostname, &addr4)) &&
@@ -429,7 +406,7 @@
        (wolfSSL_CTX_UseSNI(backend->ctx, WOLFSSL_SNI_HOST_NAME, hostname,
                           (unsigned short)hostname_len) != 1)) {
       infof(data, "WARNING: failed to configure server name indication (SNI) "
-            "TLS extension\n");
+            "TLS extension");
     }
   }
 #endif
@@ -470,15 +447,15 @@
     /* wolfSSL's ALPN protocol name list format is a comma separated string of
        protocols in descending order of preference, eg: "h2,http/1.1" */
 
-#ifdef USE_NGHTTP2
-    if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
-      strcpy(protocols + strlen(protocols), NGHTTP2_PROTO_VERSION_ID ",");
-      infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
+#ifdef USE_HTTP2
+    if(data->state.httpwant >= CURL_HTTP_VERSION_2) {
+      strcpy(protocols + strlen(protocols), ALPN_H2 ",");
+      infof(data, "ALPN, offering %s", ALPN_H2);
     }
 #endif
 
     strcpy(protocols + strlen(protocols), ALPN_HTTP_1_1);
-    infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1);
+    infof(data, "ALPN, offering %s", ALPN_HTTP_1_1);
 
     if(wolfSSL_UseALPN(backend->handle, protocols,
                        (unsigned)strlen(protocols),
@@ -500,25 +477,30 @@
   }
 #endif /* OPENSSL_EXTRA */
 
+#ifdef HAVE_SECURE_RENEGOTIATION
+  if(wolfSSL_UseSecureRenegotiation(backend->handle) != SSL_SUCCESS) {
+    failf(data, "SSL: failed setting secure renegotiation");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+#endif /* HAVE_SECURE_RENEGOTIATION */
+
   /* Check if there's a cached ID we can/should use here! */
   if(SSL_SET_OPTION(primary.sessionid)) {
     void *ssl_sessionid = NULL;
 
-    Curl_ssl_sessionid_lock(conn);
-    if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) {
+    Curl_ssl_sessionid_lock(data);
+    if(!Curl_ssl_getsessionid(data, conn,
+                              SSL_IS_PROXY() ? TRUE : FALSE,
+                              &ssl_sessionid, NULL, sockindex)) {
       /* we got a session id, use it! */
       if(!SSL_set_session(backend->handle, ssl_sessionid)) {
-        char error_buffer[WOLFSSL_MAX_ERROR_SZ];
-        Curl_ssl_sessionid_unlock(conn);
-        failf(data, "SSL: SSL_set_session failed: %s",
-              ERR_error_string(SSL_get_error(backend->handle, 0),
-                               error_buffer));
-        return CURLE_SSL_CONNECT_ERROR;
+        Curl_ssl_delsessionid(data, ssl_sessionid);
+        infof(data, "Can't use session ID, going on without\n");
       }
-      /* Informational message */
-      infof(data, "SSL re-using session ID\n");
+      else
+        infof(data, "SSL re-using session ID");
     }
-    Curl_ssl_sessionid_unlock(conn);
+    Curl_ssl_sessionid_unlock(data);
   }
 
   /* pass the raw socket into the SSL layer */
@@ -533,27 +515,15 @@
 
 
 static CURLcode
-wolfssl_connect_step2(struct connectdata *conn,
+wolfssl_connect_step2(struct Curl_easy *data, struct connectdata *conn,
                      int sockindex)
 {
   int ret = -1;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
-#ifndef CURL_DISABLE_PROXY
-  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
-    conn->host.name;
-  const char * const dispname = SSL_IS_PROXY() ?
-    conn->http_proxy.host.dispname : conn->host.dispname;
-  const char * const pinnedpubkey = SSL_IS_PROXY() ?
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
-#else
-  const char * const hostname = conn->host.name;
-  const char * const dispname = conn->host.dispname;
-  const char * const pinnedpubkey =
-    data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
-#endif
+  const char * const hostname = SSL_HOST_NAME();
+  const char * const dispname = SSL_HOST_DISPNAME();
+  const char * const pinnedpubkey = SSL_PINNED_PUB_KEY();
 
   conn->recv[sockindex] = wolfssl_recv;
   conn->send[sockindex] = wolfssl_send;
@@ -608,7 +578,7 @@
      * as also mismatching CN fields */
     else if(DOMAIN_NAME_MISMATCH == detail) {
 #if 1
-      failf(data, "\tsubject alt name(s) or common name do not match \"%s\"\n",
+      failf(data, " subject alt name(s) or common name do not match \"%s\"",
             dispname);
       return CURLE_PEER_FAILED_VERIFICATION;
 #else
@@ -620,13 +590,13 @@
        * 'conn->ssl_config.verifyhost' value. */
       if(SSL_CONN_CONFIG(verifyhost)) {
         failf(data,
-              "\tsubject alt name(s) or common name do not match \"%s\"\n",
+              " subject alt name(s) or common name do not match \"%s\"\n",
               dispname);
         return CURLE_PEER_FAILED_VERIFICATION;
       }
       else {
         infof(data,
-              "\tsubject alt name(s) and/or common name do not match \"%s\"\n",
+              " subject alt name(s) and/or common name do not match \"%s\"",
               dispname);
         return CURLE_OK;
       }
@@ -635,14 +605,14 @@
 #if LIBWOLFSSL_VERSION_HEX >= 0x02007000 /* 2.7.0 */
     else if(ASN_NO_SIGNER_E == detail) {
       if(SSL_CONN_CONFIG(verifypeer)) {
-        failf(data, "\tCA signer not available for verification\n");
+        failf(data, " CA signer not available for verification");
         return CURLE_SSL_CACERT_BADFILE;
       }
       else {
         /* Just continue with a warning if no strict certificate
            verification is required. */
         infof(data, "CA signer not available for verification, "
-                    "continuing anyway\n");
+                    "continuing anyway");
       }
     }
 #endif
@@ -707,27 +677,26 @@
     rc = wolfSSL_ALPN_GetProtocol(backend->handle, &protocol, &protocol_len);
 
     if(rc == SSL_SUCCESS) {
-      infof(data, "ALPN, server accepted to use %.*s\n", protocol_len,
+      infof(data, "ALPN, server accepted to use %.*s", protocol_len,
             protocol);
 
       if(protocol_len == ALPN_HTTP_1_1_LENGTH &&
          !memcmp(protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH))
         conn->negnpn = CURL_HTTP_VERSION_1_1;
-#ifdef USE_NGHTTP2
-      else if(data->set.httpversion >= CURL_HTTP_VERSION_2 &&
-              protocol_len == NGHTTP2_PROTO_VERSION_ID_LEN &&
-              !memcmp(protocol, NGHTTP2_PROTO_VERSION_ID,
-                      NGHTTP2_PROTO_VERSION_ID_LEN))
+#ifdef USE_HTTP2
+      else if(data->state.httpwant >= CURL_HTTP_VERSION_2 &&
+              protocol_len == ALPN_H2_LENGTH &&
+              !memcmp(protocol, ALPN_H2, ALPN_H2_LENGTH))
         conn->negnpn = CURL_HTTP_VERSION_2;
 #endif
       else
-        infof(data, "ALPN, unrecognized protocol %.*s\n", protocol_len,
+        infof(data, "ALPN, unrecognized protocol %.*s", protocol_len,
               protocol);
-      Curl_multiuse_state(conn, conn->negnpn == CURL_HTTP_VERSION_2 ?
+      Curl_multiuse_state(data, conn->negnpn == CURL_HTTP_VERSION_2 ?
                           BUNDLE_MULTIPLEX : BUNDLE_NO_MULTIUSE);
     }
     else if(rc == SSL_ALPN_NOT_FOUND)
-      infof(data, "ALPN, server did not agree to a protocol\n");
+      infof(data, "ALPN, server did not agree to a protocol");
     else {
       failf(data, "ALPN, failure getting protocol, error %d", rc);
       return CURLE_SSL_CONNECT_ERROR;
@@ -737,11 +706,11 @@
 
   connssl->connecting_state = ssl_connect_3;
 #if (LIBWOLFSSL_VERSION_HEX >= 0x03009010)
-  infof(data, "SSL connection using %s / %s\n",
+  infof(data, "SSL connection using %s / %s",
         wolfSSL_get_version(backend->handle),
         wolfSSL_get_cipher_name(backend->handle));
 #else
-  infof(data, "SSL connected\n");
+  infof(data, "SSL connected");
 #endif
 
   return CURLE_OK;
@@ -749,11 +718,10 @@
 
 
 static CURLcode
-wolfssl_connect_step3(struct connectdata *conn,
+wolfssl_connect_step3(struct Curl_easy *data, struct connectdata *conn,
                      int sockindex)
 {
   CURLcode result = CURLE_OK;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
 
@@ -761,32 +729,33 @@
 
   if(SSL_SET_OPTION(primary.sessionid)) {
     bool incache;
-    SSL_SESSION *our_ssl_sessionid;
     void *old_ssl_sessionid = NULL;
+    SSL_SESSION *our_ssl_sessionid = SSL_get_session(backend->handle);
+    bool isproxy = SSL_IS_PROXY() ? TRUE : FALSE;
 
-    our_ssl_sessionid = SSL_get_session(backend->handle);
-
-    Curl_ssl_sessionid_lock(conn);
-    incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL,
-                                      sockindex));
-    if(incache) {
-      if(old_ssl_sessionid != our_ssl_sessionid) {
-        infof(data, "old SSL session ID is stale, removing\n");
-        Curl_ssl_delsessionid(conn, old_ssl_sessionid);
-        incache = FALSE;
+    if(our_ssl_sessionid) {
+      Curl_ssl_sessionid_lock(data);
+      incache = !(Curl_ssl_getsessionid(data, conn, isproxy,
+                                        &old_ssl_sessionid, NULL, sockindex));
+      if(incache) {
+        if(old_ssl_sessionid != our_ssl_sessionid) {
+          infof(data, "old SSL session ID is stale, removing");
+          Curl_ssl_delsessionid(data, old_ssl_sessionid);
+          incache = FALSE;
+        }
       }
-    }
 
-    if(!incache) {
-      result = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
-                                     0 /* unknown size */, sockindex);
-      if(result) {
-        Curl_ssl_sessionid_unlock(conn);
-        failf(data, "failed to store ssl session");
-        return result;
+      if(!incache) {
+        result = Curl_ssl_addsessionid(data, conn, isproxy, our_ssl_sessionid,
+                                       0, sockindex);
+        if(result) {
+          Curl_ssl_sessionid_unlock(data);
+          failf(data, "failed to store ssl session");
+          return result;
+        }
       }
+      Curl_ssl_sessionid_unlock(data);
     }
-    Curl_ssl_sessionid_unlock(conn);
   }
 
   connssl->connecting_state = ssl_connect_done;
@@ -795,19 +764,20 @@
 }
 
 
-static ssize_t wolfssl_send(struct connectdata *conn,
-                           int sockindex,
-                           const void *mem,
-                           size_t len,
-                           CURLcode *curlcode)
+static ssize_t wolfssl_send(struct Curl_easy *data,
+                            int sockindex,
+                            const void *mem,
+                            size_t len,
+                            CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
   char error_buffer[WOLFSSL_MAX_ERROR_SZ];
   int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
   int rc = SSL_write(backend->handle, mem, memlen);
 
-  if(rc < 0) {
+  if(rc <= 0) {
     int err = SSL_get_error(backend->handle, rc);
 
     switch(err) {
@@ -817,7 +787,7 @@
       *curlcode = CURLE_AGAIN;
       return -1;
     default:
-      failf(conn->data, "SSL write: %s, errno %d",
+      failf(data, "SSL write: %s, errno %d",
             ERR_error_string(err, error_buffer),
             SOCKERRNO);
       *curlcode = CURLE_SEND_ERROR;
@@ -827,12 +797,19 @@
   return rc;
 }
 
-static void Curl_wolfssl_close(struct connectdata *conn, int sockindex)
+static void wolfssl_close(struct Curl_easy *data, struct connectdata *conn,
+                          int sockindex)
 {
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
 
+  (void) data;
+
   if(backend->handle) {
+    char buf[32];
+    /* Maybe the server has already sent a close notify alert.
+       Read it to avoid an RST on the TCP connection. */
+    (void)SSL_read(backend->handle, buf, (int)sizeof(buf));
     (void)SSL_shutdown(backend->handle);
     SSL_free(backend->handle);
     backend->handle = NULL;
@@ -843,12 +820,13 @@
   }
 }
 
-static ssize_t wolfssl_recv(struct connectdata *conn,
+static ssize_t wolfssl_recv(struct Curl_easy *data,
                             int num,
                             char *buf,
                             size_t buffersize,
                             CURLcode *curlcode)
 {
+  struct connectdata *conn = data->conn;
   struct ssl_connect_data *connssl = &conn->ssl[num];
   struct ssl_backend_data *backend = connssl->backend;
   char error_buffer[WOLFSSL_MAX_ERROR_SZ];
@@ -867,9 +845,8 @@
       *curlcode = CURLE_AGAIN;
       return -1;
     default:
-      failf(conn->data, "SSL read: %s, errno %d",
-            ERR_error_string(err, error_buffer),
-            SOCKERRNO);
+      failf(data, "SSL read: %s, errno %d",
+            ERR_error_string(err, error_buffer), SOCKERRNO);
       *curlcode = CURLE_RECV_ERROR;
       return -1;
     }
@@ -878,14 +855,14 @@
 }
 
 
-static void Curl_wolfssl_session_free(void *ptr)
+static void wolfssl_session_free(void *ptr)
 {
   (void)ptr;
   /* wolfSSL reuses sessions on own, no free */
 }
 
 
-static size_t Curl_wolfssl_version(char *buffer, size_t size)
+static size_t wolfssl_version(char *buffer, size_t size)
 {
 #if LIBWOLFSSL_VERSION_HEX >= 0x03006000
   return msnprintf(buffer, size, "wolfSSL/%s", wolfSSL_lib_version());
@@ -895,7 +872,7 @@
 }
 
 
-static int Curl_wolfssl_init(void)
+static int wolfssl_init(void)
 {
 #ifdef OPENSSL_EXTRA
   Curl_tls_keylog_open();
@@ -904,7 +881,7 @@
 }
 
 
-static void Curl_wolfssl_cleanup(void)
+static void wolfssl_cleanup(void)
 {
   wolfSSL_Cleanup();
 #ifdef OPENSSL_EXTRA
@@ -913,8 +890,8 @@
 }
 
 
-static bool Curl_wolfssl_data_pending(const struct connectdata *conn,
-                                      int connindex)
+static bool wolfssl_data_pending(const struct connectdata *conn,
+                                 int connindex)
 {
   const struct ssl_connect_data *connssl = &conn->ssl[connindex];
   struct ssl_backend_data *backend = connssl->backend;
@@ -929,12 +906,15 @@
  * This function is called to shut down the SSL layer but keep the
  * socket open (CCC - Clear Command Channel)
  */
-static int Curl_wolfssl_shutdown(struct connectdata *conn, int sockindex)
+static int wolfssl_shutdown(struct Curl_easy *data, struct connectdata *conn,
+                            int sockindex)
 {
   int retval = 0;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   struct ssl_backend_data *backend = connssl->backend;
 
+  (void) data;
+
   if(backend->handle) {
     SSL_free(backend->handle);
     backend->handle = NULL;
@@ -944,13 +924,13 @@
 
 
 static CURLcode
-wolfssl_connect_common(struct connectdata *conn,
+wolfssl_connect_common(struct Curl_easy *data,
+                      struct connectdata *conn,
                       int sockindex,
                       bool nonblocking,
                       bool *done)
 {
   CURLcode result;
-  struct Curl_easy *data = conn->data;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
   curl_socket_t sockfd = conn->sock[sockindex];
   int what;
@@ -971,7 +951,7 @@
       return CURLE_OPERATION_TIMEDOUT;
     }
 
-    result = wolfssl_connect_step1(conn, sockindex);
+    result = wolfssl_connect_step1(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -1026,7 +1006,7 @@
      * ensuring that a client using select() or epoll() will always
      * have a valid fdset to wait on.
      */
-    result = wolfssl_connect_step2(conn, sockindex);
+    result = wolfssl_connect_step2(data, conn, sockindex);
     if(result || (nonblocking &&
                   (ssl_connect_2 == connssl->connecting_state ||
                    ssl_connect_2_reading == connssl->connecting_state ||
@@ -1035,7 +1015,7 @@
   } /* repeat step2 until all transactions are done. */
 
   if(ssl_connect_3 == connssl->connecting_state) {
-    result = wolfssl_connect_step3(conn, sockindex);
+    result = wolfssl_connect_step3(data, conn, sockindex);
     if(result)
       return result;
   }
@@ -1056,19 +1036,21 @@
 }
 
 
-static CURLcode Curl_wolfssl_connect_nonblocking(struct connectdata *conn,
-                                                int sockindex, bool *done)
+static CURLcode wolfssl_connect_nonblocking(struct Curl_easy *data,
+                                            struct connectdata *conn,
+                                            int sockindex, bool *done)
 {
-  return wolfssl_connect_common(conn, sockindex, TRUE, done);
+  return wolfssl_connect_common(data, conn, sockindex, TRUE, done);
 }
 
 
-static CURLcode Curl_wolfssl_connect(struct connectdata *conn, int sockindex)
+static CURLcode wolfssl_connect(struct Curl_easy *data,
+                                struct connectdata *conn, int sockindex)
 {
   CURLcode result;
   bool done = FALSE;
 
-  result = wolfssl_connect_common(conn, sockindex, FALSE, &done);
+  result = wolfssl_connect_common(data, conn, sockindex, FALSE, &done);
   if(result)
     return result;
 
@@ -1077,8 +1059,8 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_wolfssl_random(struct Curl_easy *data,
-                                   unsigned char *entropy, size_t length)
+static CURLcode wolfssl_random(struct Curl_easy *data,
+                               unsigned char *entropy, size_t length)
 {
   WC_RNG rng;
   (void)data;
@@ -1093,10 +1075,10 @@
   return CURLE_OK;
 }
 
-static CURLcode Curl_wolfssl_sha256sum(const unsigned char *tmp, /* input */
-                                       size_t tmplen,
-                                       unsigned char *sha256sum /* output */,
-                                       size_t unused)
+static CURLcode wolfssl_sha256sum(const unsigned char *tmp, /* input */
+                                  size_t tmplen,
+                                  unsigned char *sha256sum /* output */,
+                                  size_t unused)
 {
   wc_Sha256 SHA256pw;
   (void)unused;
@@ -1106,8 +1088,8 @@
   return CURLE_OK;
 }
 
-static void *Curl_wolfssl_get_internals(struct ssl_connect_data *connssl,
-                                        CURLINFO info UNUSED_PARAM)
+static void *wolfssl_get_internals(struct ssl_connect_data *connssl,
+                                   CURLINFO info UNUSED_PARAM)
 {
   struct ssl_backend_data *backend = connssl->backend;
   (void)info;
@@ -1124,26 +1106,28 @@
 
   sizeof(struct ssl_backend_data),
 
-  Curl_wolfssl_init,                /* init */
-  Curl_wolfssl_cleanup,             /* cleanup */
-  Curl_wolfssl_version,             /* version */
+  wolfssl_init,                    /* init */
+  wolfssl_cleanup,                 /* cleanup */
+  wolfssl_version,                 /* version */
   Curl_none_check_cxn,             /* check_cxn */
-  Curl_wolfssl_shutdown,            /* shutdown */
-  Curl_wolfssl_data_pending,        /* data_pending */
-  Curl_wolfssl_random,              /* random */
+  wolfssl_shutdown,                /* shutdown */
+  wolfssl_data_pending,            /* data_pending */
+  wolfssl_random,                  /* random */
   Curl_none_cert_status_request,   /* cert_status_request */
-  Curl_wolfssl_connect,             /* connect */
-  Curl_wolfssl_connect_nonblocking, /* connect_nonblocking */
-  Curl_wolfssl_get_internals,       /* get_internals */
-  Curl_wolfssl_close,               /* close_one */
+  wolfssl_connect,                 /* connect */
+  wolfssl_connect_nonblocking,     /* connect_nonblocking */
+  Curl_ssl_getsock,                /* getsock */
+  wolfssl_get_internals,           /* get_internals */
+  wolfssl_close,                   /* close_one */
   Curl_none_close_all,             /* close_all */
-  Curl_wolfssl_session_free,        /* session_free */
+  wolfssl_session_free,            /* session_free */
   Curl_none_set_engine,            /* set_engine */
   Curl_none_set_engine_default,    /* set_engine_default */
   Curl_none_engines_list,          /* engines_list */
   Curl_none_false_start,           /* false_start */
-  Curl_none_md5sum,                /* md5sum */
-  Curl_wolfssl_sha256sum            /* sha256sum */
+  wolfssl_sha256sum,               /* sha256sum */
+  NULL,                            /* associate_connection */
+  NULL                             /* disassociate_connection */
 };
 
 #endif
diff --git a/lib/vtls/wolfssl.h b/lib/vtls/wolfssl.h
index 2b9673c..d411e69 100644
--- a/lib/vtls/wolfssl.h
+++ b/lib/vtls/wolfssl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/warnless.c b/lib/warnless.c
index cfd5e8e..15c8156 100644
--- a/lib/warnless.c
+++ b/lib/warnless.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -37,85 +37,23 @@
 
 #include "warnless.h"
 
-#define CURL_MASK_SCHAR  0x7F
-#define CURL_MASK_UCHAR  0xFF
+#define CURL_MASK_UCHAR   ((unsigned char)~0)
+#define CURL_MASK_SCHAR   (CURL_MASK_UCHAR >> 1)
 
-#if (SIZEOF_SHORT == 2)
-#  define CURL_MASK_SSHORT  0x7FFF
-#  define CURL_MASK_USHORT  0xFFFF
-#elif (SIZEOF_SHORT == 4)
-#  define CURL_MASK_SSHORT  0x7FFFFFFF
-#  define CURL_MASK_USHORT  0xFFFFFFFF
-#elif (SIZEOF_SHORT == 8)
-#  define CURL_MASK_SSHORT  0x7FFFFFFFFFFFFFFF
-#  define CURL_MASK_USHORT  0xFFFFFFFFFFFFFFFF
-#else
-#  error "SIZEOF_SHORT not defined"
-#endif
+#define CURL_MASK_USHORT  ((unsigned short)~0)
+#define CURL_MASK_SSHORT  (CURL_MASK_USHORT >> 1)
 
-#if (SIZEOF_INT == 2)
-#  define CURL_MASK_SINT  0x7FFF
-#  define CURL_MASK_UINT  0xFFFF
-#elif (SIZEOF_INT == 4)
-#  define CURL_MASK_SINT  0x7FFFFFFF
-#  define CURL_MASK_UINT  0xFFFFFFFF
-#elif (SIZEOF_INT == 8)
-#  define CURL_MASK_SINT  0x7FFFFFFFFFFFFFFF
-#  define CURL_MASK_UINT  0xFFFFFFFFFFFFFFFF
-#elif (SIZEOF_INT == 16)
-#  define CURL_MASK_SINT  0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-#  define CURL_MASK_UINT  0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-#else
-#  error "SIZEOF_INT not defined"
-#endif
+#define CURL_MASK_UINT    ((unsigned int)~0)
+#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
 
-#if (SIZEOF_LONG == 2)
-#  define CURL_MASK_SLONG  0x7FFFL
-#  define CURL_MASK_ULONG  0xFFFFUL
-#elif (SIZEOF_LONG == 4)
-#  define CURL_MASK_SLONG  0x7FFFFFFFL
-#  define CURL_MASK_ULONG  0xFFFFFFFFUL
-#elif (SIZEOF_LONG == 8)
-#  define CURL_MASK_SLONG  0x7FFFFFFFFFFFFFFFL
-#  define CURL_MASK_ULONG  0xFFFFFFFFFFFFFFFFUL
-#elif (SIZEOF_LONG == 16)
-#  define CURL_MASK_SLONG  0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFL
-#  define CURL_MASK_ULONG  0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUL
-#else
-#  error "SIZEOF_LONG not defined"
-#endif
+#define CURL_MASK_ULONG   ((unsigned long)~0)
+#define CURL_MASK_SLONG   (CURL_MASK_ULONG >> 1)
 
-#if (SIZEOF_CURL_OFF_T == 2)
-#  define CURL_MASK_SCOFFT  CURL_OFF_T_C(0x7FFF)
-#  define CURL_MASK_UCOFFT  CURL_OFF_TU_C(0xFFFF)
-#elif (SIZEOF_CURL_OFF_T == 4)
-#  define CURL_MASK_SCOFFT  CURL_OFF_T_C(0x7FFFFFFF)
-#  define CURL_MASK_UCOFFT  CURL_OFF_TU_C(0xFFFFFFFF)
-#elif (SIZEOF_CURL_OFF_T == 8)
-#  define CURL_MASK_SCOFFT  CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
-#  define CURL_MASK_UCOFFT  CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFF)
-#elif (SIZEOF_CURL_OFF_T == 16)
-#  define CURL_MASK_SCOFFT  CURL_OFF_T_C(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
-#  define CURL_MASK_UCOFFT  CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
-#else
-#  error "SIZEOF_CURL_OFF_T not defined"
-#endif
+#define CURL_MASK_UCOFFT  ((unsigned CURL_TYPEOF_CURL_OFF_T)~0)
+#define CURL_MASK_SCOFFT  (CURL_MASK_UCOFFT >> 1)
 
-#if (SIZEOF_SIZE_T == SIZEOF_SHORT)
-#  define CURL_MASK_SSIZE_T  CURL_MASK_SSHORT
-#  define CURL_MASK_USIZE_T  CURL_MASK_USHORT
-#elif (SIZEOF_SIZE_T == SIZEOF_INT)
-#  define CURL_MASK_SSIZE_T  CURL_MASK_SINT
-#  define CURL_MASK_USIZE_T  CURL_MASK_UINT
-#elif (SIZEOF_SIZE_T == SIZEOF_LONG)
-#  define CURL_MASK_SSIZE_T  CURL_MASK_SLONG
-#  define CURL_MASK_USIZE_T  CURL_MASK_ULONG
-#elif (SIZEOF_SIZE_T == SIZEOF_CURL_OFF_T)
-#  define CURL_MASK_SSIZE_T  CURL_MASK_SCOFFT
-#  define CURL_MASK_USIZE_T  CURL_MASK_UCOFFT
-#else
-#  error "SIZEOF_SIZE_T not defined"
-#endif
+#define CURL_MASK_USIZE_T ((size_t)~0)
+#define CURL_MASK_SSIZE_T (CURL_MASK_USIZE_T >> 1)
 
 /*
 ** unsigned long to unsigned short
@@ -156,25 +94,6 @@
 }
 
 /*
-** unsigned long to signed int
-*/
-
-int curlx_ultosi(unsigned long ulnum)
-{
-#ifdef __INTEL_COMPILER
-#  pragma warning(push)
-#  pragma warning(disable:810) /* conversion may lose significant bits */
-#endif
-
-  DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_SINT);
-  return (int)(ulnum & (unsigned long) CURL_MASK_SINT);
-
-#ifdef __INTEL_COMPILER
-#  pragma warning(pop)
-#endif
-}
-
-/*
 ** unsigned size_t to signed curl_off_t
 */
 
@@ -226,7 +145,7 @@
 # pragma warning(disable:810) /* conversion may lose significant bits */
 #endif
 
-#if (SIZEOF_LONG < SIZEOF_SIZE_T)
+#if ULONG_MAX < SIZE_T_MAX
   DEBUGASSERT(uznum <= (size_t) CURL_MASK_ULONG);
 #endif
   return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG);
@@ -247,7 +166,7 @@
 # pragma warning(disable:810) /* conversion may lose significant bits */
 #endif
 
-#if (SIZEOF_INT < SIZEOF_SIZE_T)
+#if UINT_MAX < SIZE_T_MAX
   DEBUGASSERT(uznum <= (size_t) CURL_MASK_UINT);
 #endif
   return (unsigned int)(uznum & (size_t) CURL_MASK_UINT);
@@ -269,7 +188,7 @@
 #endif
 
   DEBUGASSERT(slnum >= 0);
-#if (SIZEOF_INT < SIZEOF_LONG)
+#if INT_MAX < LONG_MAX
   DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_SINT);
 #endif
   return (int)(slnum & (long) CURL_MASK_SINT);
@@ -291,7 +210,7 @@
 #endif
 
   DEBUGASSERT(slnum >= 0);
-#if (SIZEOF_INT < SIZEOF_LONG)
+#if UINT_MAX < LONG_MAX
   DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_UINT);
 #endif
   return (unsigned int)(slnum & (long) CURL_MASK_UINT);
@@ -371,7 +290,7 @@
 #endif
 
   DEBUGASSERT(sznum >= 0);
-#if (SIZEOF_INT < SIZEOF_SIZE_T)
+#if INT_MAX < SSIZE_T_MAX
   DEBUGASSERT((size_t) sznum <= (size_t) CURL_MASK_SINT);
 #endif
   return (int)(sznum & (ssize_t) CURL_MASK_SINT);
diff --git a/lib/warnless.h b/lib/warnless.h
index ab78f94..2c619bf 100644
--- a/lib/warnless.h
+++ b/lib/warnless.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,8 +33,6 @@
 
 unsigned char curlx_ultouc(unsigned long ulnum);
 
-int curlx_ultosi(unsigned long ulnum);
-
 int curlx_uztosi(size_t uznum);
 
 curl_off_t curlx_uztoso(size_t uznum);
diff --git a/lib/wildcard.c b/lib/wildcard.c
index e94d3c5..105bcce 100644
--- a/lib/wildcard.c
+++ b/lib/wildcard.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/wildcard.h b/lib/wildcard.h
index f090826..081be9e 100644
--- a/lib/wildcard.h
+++ b/lib/wildcard.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/lib/x509asn1.c b/lib/x509asn1.c
index 52747d5..c70378d 100644
--- a/lib/x509asn1.c
+++ b/lib/x509asn1.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -517,8 +517,8 @@
   return curl_maprintf("%.4s-%.2s-%.2s %.2s:%.2s:%c%c%s%.*s%s%.*s",
                        beg, beg + 4, beg + 6,
                        beg + 8, beg + 10, sec1, sec2,
-                       fracl? ".": "", fracl, fracp,
-                       sep, tzl, tzp);
+                       fracl? ".": "", (int)fracl, fracp,
+                       sep, (int)tzl, tzp);
 }
 
 /*
@@ -558,7 +558,7 @@
   return curl_maprintf("%u%.2s-%.2s-%.2s %.2s:%.2s:%.2s %.*s",
                        20 - (*beg >= '5'), beg, beg + 2, beg + 4,
                        beg + 6, beg + 8, sec,
-                       tzl, tzp);
+                       (int)tzl, tzp);
 }
 
 /*
@@ -866,7 +866,7 @@
     if(data->set.ssl.certinfo)
       Curl_ssl_push_certinfo(data, certnum, label, output);
     if(!certnum)
-      infof(data, "   %s: %s\n", label, output);
+      infof(data, "   %s: %s", label, output);
     free((char *) output);
   }
 }
@@ -905,7 +905,7 @@
     if(len > 32)
       elem.beg = q;     /* Strip leading zero bytes. */
     if(!certnum)
-      infof(data, "   RSA Public Key (%lu bits)\n", len);
+      infof(data, "   RSA Public Key (%lu bits)", len);
     if(data->set.ssl.certinfo) {
       q = curl_maprintf("%lu", len);
       if(q) {
@@ -945,13 +945,12 @@
   }
 }
 
-CURLcode Curl_extract_certinfo(struct connectdata *conn,
+CURLcode Curl_extract_certinfo(struct Curl_easy *data,
                                int certnum,
                                const char *beg,
                                const char *end)
 {
   struct Curl_X509certificate cert;
-  struct Curl_easy *data = conn->data;
   struct Curl_asn1Element param;
   const char *ccp;
   char *cp1;
@@ -979,7 +978,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Subject", ccp);
   if(!certnum)
-    infof(data, "%2d Subject: %s\n", certnum, ccp);
+    infof(data, "%2d Subject: %s", certnum, ccp);
   free((char *) ccp);
 
   /* Issuer. */
@@ -989,7 +988,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Issuer", ccp);
   if(!certnum)
-    infof(data, "   Issuer: %s\n", ccp);
+    infof(data, "   Issuer: %s", ccp);
   free((char *) ccp);
 
   /* Version (always fits in less than 32 bits). */
@@ -1004,7 +1003,7 @@
     free((char *) ccp);
   }
   if(!certnum)
-    infof(data, "   Version: %lu (0x%lx)\n", version + 1, version);
+    infof(data, "   Version: %lu (0x%lx)", version + 1, version);
 
   /* Serial number. */
   ccp = ASN1tostr(&cert.serialNumber, 0);
@@ -1013,7 +1012,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Serial Number", ccp);
   if(!certnum)
-    infof(data, "   Serial Number: %s\n", ccp);
+    infof(data, "   Serial Number: %s", ccp);
   free((char *) ccp);
 
   /* Signature algorithm .*/
@@ -1024,7 +1023,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Signature Algorithm", ccp);
   if(!certnum)
-    infof(data, "   Signature Algorithm: %s\n", ccp);
+    infof(data, "   Signature Algorithm: %s", ccp);
   free((char *) ccp);
 
   /* Start Date. */
@@ -1034,7 +1033,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Start Date", ccp);
   if(!certnum)
-    infof(data, "   Start Date: %s\n", ccp);
+    infof(data, "   Start Date: %s", ccp);
   free((char *) ccp);
 
   /* Expire Date. */
@@ -1044,7 +1043,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Expire Date", ccp);
   if(!certnum)
-    infof(data, "   Expire Date: %s\n", ccp);
+    infof(data, "   Expire Date: %s", ccp);
   free((char *) ccp);
 
   /* Public Key Algorithm. */
@@ -1055,7 +1054,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Public Key Algorithm", ccp);
   if(!certnum)
-    infof(data, "   Public Key Algorithm: %s\n", ccp);
+    infof(data, "   Public Key Algorithm: %s", ccp);
   do_pubkey(data, certnum, ccp, &param, &cert.subjectPublicKey);
   free((char *) ccp);
 
@@ -1066,7 +1065,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Signature", ccp);
   if(!certnum)
-    infof(data, "   Signature: %s\n", ccp);
+    infof(data, "   Signature: %s", ccp);
   free((char *) ccp);
 
   /* Generate PEM certificate. */
@@ -1099,7 +1098,7 @@
   if(data->set.ssl.certinfo)
     Curl_ssl_push_certinfo(data, certnum, "Cert", cp2);
   if(!certnum)
-    infof(data, "%s\n", cp2);
+    infof(data, "%s", cp2);
   free(cp2);
   return CURLE_OK;
 }
@@ -1132,10 +1131,9 @@
   return matched? ccp: NULL;
 }
 
-CURLcode Curl_verifyhost(struct connectdata *conn,
+CURLcode Curl_verifyhost(struct Curl_easy *data, struct connectdata *conn,
                          const char *beg, const char *end)
 {
-  struct Curl_easy *data = conn->data;
   struct Curl_X509certificate cert;
   struct Curl_asn1Element dn;
   struct Curl_asn1Element elem;
@@ -1147,10 +1145,8 @@
   int matched = -1;
   size_t addrlen = (size_t) -1;
   ssize_t len;
-  const char *const hostname = SSL_IS_PROXY()?
-    conn->http_proxy.host.name : conn->host.name;
-  const char *const dispname = SSL_IS_PROXY()?
-    conn->http_proxy.host.dispname : conn->host.dispname;
+  const char * const hostname = SSL_HOST_NAME();
+  const char * const dispname = SSL_HOST_DISPNAME();
 #ifdef ENABLE_IPV6
   struct in6_addr addr;
 #else
@@ -1224,12 +1220,12 @@
   switch(matched) {
   case 1:
     /* an alternative name matched the server hostname */
-    infof(data, "\t subjectAltName: %s matched\n", dispname);
+    infof(data, "  subjectAltName: %s matched", dispname);
     return CURLE_OK;
   case 0:
     /* an alternative name field existed, but didn't match and then
        we MUST fail */
-    infof(data, "\t subjectAltName does not match %s\n", dispname);
+    infof(data, "  subjectAltName does not match %s", dispname);
     return CURLE_PEER_FAILED_VERIFICATION;
   }
 
@@ -1266,7 +1262,7 @@
     if(strlen(dnsname) != (size_t) len)         /* Nul byte in string ? */
       failf(data, "SSL: illegal cert name field");
     else if(Curl_cert_hostcheck((const char *) dnsname, hostname)) {
-      infof(data, "\t common name: %s (matched)\n", dnsname);
+      infof(data, "  common name: %s (matched)", dnsname);
       free(dnsname);
       return CURLE_OK;
     }
diff --git a/lib/x509asn1.h b/lib/x509asn1.h
index 0b7fb88..326e32d 100644
--- a/lib/x509asn1.h
+++ b/lib/x509asn1.h
@@ -8,11 +8,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -125,9 +125,9 @@
 const char *Curl_DNtostr(struct Curl_asn1Element *dn);
 int Curl_parseX509(struct Curl_X509certificate *cert,
                    const char *beg, const char *end);
-CURLcode Curl_extract_certinfo(struct connectdata *conn, int certnum,
+CURLcode Curl_extract_certinfo(struct Curl_easy *data, int certnum,
                                const char *beg, const char *end);
-CURLcode Curl_verifyhost(struct connectdata *conn,
+CURLcode Curl_verifyhost(struct Curl_easy *data, struct connectdata *conn,
                          const char *beg, const char *end);
 #endif /* USE_GSKIT or USE_NSS or USE_GNUTLS or USE_WOLFSSL or USE_SCHANNEL */
 #endif /* HEADER_CURL_X509ASN1_H */
diff --git a/libcurl.pc.in b/libcurl.pc.in
index fd1ce22..8ac15d4 100644
--- a/libcurl.pc.in
+++ b/libcurl.pc.in
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,7 @@
 supported_features="@SUPPORT_FEATURES@"
 
 Name: libcurl
-URL: https://curl.haxx.se/
+URL: https://curl.se/
 Description: Library to transfer files with ftp, http, etc.
 Version: @CURLVERSION@
 Libs: -L${libdir} -lcurl @LIBCURL_NO_SHARED@
diff --git a/ltmain.sh b/ltmain.sh
old mode 100644
new mode 100755
index 0cb7f90..21e5e07
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -31,7 +31,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-14"
+VERSION="2.4.6 Debian-2.4.6-15"
 package_revision=2.4.6
 
 
@@ -2141,7 +2141,7 @@
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname $scriptversion Debian-2.4.6-14
+       version:        $progname $scriptversion Debian-2.4.6-15
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
diff --git a/m4/curl-amissl.m4 b/m4/curl-amissl.m4
new file mode 100644
index 0000000..60fe34f
--- /dev/null
+++ b/m4/curl-amissl.m4
@@ -0,0 +1,47 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_AMISSL], [
+AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL)])
+if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
+  if test "x$OPT_AMISSL" != xno; then
+    ssl_msg=
+    if test "x$OPT_AMISSL" != "xno"; then
+      AC_MSG_RESULT(yes)
+      ssl_msg="AmiSSL"
+      test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+      AMISSL_ENABLED=1
+      LIBS="-lamisslauto $LIBS"
+      AC_DEFINE(USE_AMISSL, 1, [if AmiSSL is in use])
+      AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])
+    else
+      AC_MSG_RESULT(no)
+    fi
+    test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+  else
+    AC_MSG_RESULT(no)
+  fi
+else
+  AC_MSG_RESULT(no)
+fi
+
+])
diff --git a/m4/curl-bearssl.m4 b/m4/curl-bearssl.m4
new file mode 100644
index 0000000..86677e4
--- /dev/null
+++ b/m4/curl-bearssl.m4
@@ -0,0 +1,108 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_BEARSSL], [
+dnl ----------------------------------------------------
+dnl check for BearSSL
+dnl ----------------------------------------------------
+
+if test "x$OPT_BEARSSL" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+  ssl_msg=
+
+  if test X"$OPT_BEARSSL" != Xno; then
+
+    if test "$OPT_BEARSSL" = "yes"; then
+      OPT_BEARSSL=""
+    fi
+
+    if test -z "$OPT_BEARSSL" ; then
+      dnl check for lib first without setting any new path
+
+      AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
+      dnl libbearssl found, set the variable
+       [
+         AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
+         AC_SUBST(USE_BEARSSL, [1])
+         BEARSSL_ENABLED=1
+         USE_BEARSSL="yes"
+         ssl_msg="BearSSL"
+	 test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ], [], -lbearssl)
+    fi
+
+    addld=""
+    addlib=""
+    addcflags=""
+    bearssllib=""
+
+    if test "x$USE_BEARSSL" != "xyes"; then
+      dnl add the path and test again
+      addld=-L$OPT_BEARSSL/lib$libsuff
+      addcflags=-I$OPT_BEARSSL/include
+      bearssllib=$OPT_BEARSSL/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
+       [
+       AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
+       AC_SUBST(USE_BEARSSL, [1])
+       BEARSSL_ENABLED=1
+       USE_BEARSSL="yes"
+       ssl_msg="BearSSL"
+       test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+       ],
+       [
+         CPPFLAGS=$_cppflags
+         LDFLAGS=$_ldflags
+       ], -lbearssl)
+    fi
+
+    if test "x$USE_BEARSSL" = "xyes"; then
+      AC_MSG_NOTICE([detected BearSSL])
+      check_for_ca_bundle=1
+
+      LIBS="-lbearssl $LIBS"
+
+      if test -n "$bearssllib"; then
+        dnl when shared libs were found in a path that the run-time
+        dnl linker doesn't search through, we need to add it to
+        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
+        dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$bearssllib"
+          export CURL_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $bearssllib to CURL_LIBRARY_PATH])
+        fi
+      fi
+    fi
+
+  fi dnl BearSSL not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+])
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 7d59f06..6d17a9f 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -33,9 +33,7 @@
   compiler_id="unknown"
   compiler_num="0"
   #
-  flags_dbg_all="unknown"
   flags_dbg_yes="unknown"
-  flags_dbg_off="unknown"
   flags_opt_all="unknown"
   flags_opt_yes="unknown"
   flags_opt_off="unknown"
@@ -106,16 +104,7 @@
     clangvhi=`echo $clangver | cut -d . -f1`
     clangvlo=`echo $clangver | cut -d . -f2`
     compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
-    flags_dbg_all="$flags_dbg_all -ggdb"
-    flags_dbg_all="$flags_dbg_all -gstabs"
-    flags_dbg_all="$flags_dbg_all -gstabs+"
-    flags_dbg_all="$flags_dbg_all -gcoff"
-    flags_dbg_all="$flags_dbg_all -gxcoff"
-    flags_dbg_all="$flags_dbg_all -gdwarf-2"
-    flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
     flags_opt_yes="-Os"
     flags_opt_off="-O0"
@@ -137,9 +126,7 @@
     test "$curl_cv_have_def___DECC_VER" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="DEC_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g2"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
     flags_opt_yes="-O1"
     flags_opt_off="-O0"
@@ -175,16 +162,7 @@
     gccvhi=`echo $gccver | cut -d . -f1`
     gccvlo=`echo $gccver | cut -d . -f2`
     compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
-    flags_dbg_all="$flags_dbg_all -ggdb"
-    flags_dbg_all="$flags_dbg_all -gstabs"
-    flags_dbg_all="$flags_dbg_all -gstabs+"
-    flags_dbg_all="$flags_dbg_all -gcoff"
-    flags_dbg_all="$flags_dbg_all -gxcoff"
-    flags_dbg_all="$flags_dbg_all -gdwarf-2"
-    flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -205,9 +183,7 @@
   if test "$curl_cv_have_def___HP_cc" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="HP_UX_C"
-    flags_dbg_all="-g -s"
     flags_dbg_yes="-g"
-    flags_dbg_off="-s"
     flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
     flags_opt_yes="+O2"
     flags_opt_off="+O0"
@@ -227,9 +203,7 @@
   if test "$curl_cv_have_def___IBMC__" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="IBM_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
     flags_opt_all="$flags_opt_all -qnooptimize"
     flags_opt_all="$flags_opt_all -qoptimize=0"
@@ -261,24 +235,13 @@
     CURL_CHECK_DEF([__unix__], [], [silent])
     if test "$curl_cv_have_def___unix__" = "yes"; then
       compiler_id="INTEL_UNIX_C"
-      flags_dbg_all="-g -g0"
       flags_dbg_yes="-g"
-      flags_dbg_off=""
       flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
       flags_opt_yes="-O2"
       flags_opt_off="-O0"
     else
       compiler_id="INTEL_WINDOWS_C"
-      flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
-      flags_dbg_all="$flags_dbg_all /debug"
-      flags_dbg_all="$flags_dbg_all /debug:none"
-      flags_dbg_all="$flags_dbg_all /debug:minimal"
-      flags_dbg_all="$flags_dbg_all /debug:partial"
-      flags_dbg_all="$flags_dbg_all /debug:full"
-      flags_dbg_all="$flags_dbg_all /debug:semantic_stepping"
-      flags_dbg_all="$flags_dbg_all /debug:extended"
       flags_dbg_yes="/Zi /Oy-"
-      flags_dbg_off="/debug:none /Oy-"
       flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
       flags_opt_yes="/O2"
       flags_opt_off="/Od"
@@ -299,9 +262,7 @@
   if test "$curl_cv_have_def___LCC__" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="LCC"
-    flags_dbg_all="-g"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all=""
     flags_opt_yes=""
     flags_opt_off=""
@@ -325,9 +286,7 @@
     test "$compiler_id" = "unknown"; then
     AC_MSG_RESULT([yes])
     compiler_id="SGI_MIPS_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -352,9 +311,7 @@
      test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then
     AC_MSG_RESULT([yes])
     compiler_id="SGI_MIPSPRO_C"
-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -374,9 +331,7 @@
   if test "$curl_cv_have_def___SUNPRO_C" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="SUNPRO_C"
-    flags_dbg_all="-g -s"
     flags_dbg_yes="-g"
-    flags_dbg_off="-s"
     flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
     flags_opt_yes="-xO2"
     flags_opt_off=""
@@ -396,9 +351,7 @@
   if test "$curl_cv_have_def___TINYC__" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="TINY_C"
-    flags_dbg_all="-g -b"
     flags_dbg_yes="-g"
-    flags_dbg_off=""
     flags_opt_all=""
     flags_opt_yes=""
     flags_opt_off=""
@@ -420,17 +373,13 @@
     CURL_CHECK_DEF([__UNIX__], [], [silent])
     if test "$curl_cv_have_def___UNIX__" = "yes"; then
       compiler_id="WATCOM_UNIX_C"
-      flags_dbg_all="-g1 -g1+ -g2 -g3"
       flags_dbg_yes="-g2"
-      flags_dbg_off=""
       flags_opt_all="-O0 -O1 -O2 -O3"
       flags_opt_yes="-O2"
       flags_opt_off="-O0"
     else
       compiler_id="WATCOM_WINDOWS_C"
-      flags_dbg_all=""
       flags_dbg_yes=""
-      flags_dbg_off=""
       flags_opt_all=""
       flags_opt_yes=""
       flags_opt_off=""
@@ -745,17 +694,11 @@
     tmp_options=""
     tmp_CFLAGS="$CFLAGS"
     tmp_CPPFLAGS="$CPPFLAGS"
-    CURL_VAR_STRIP([tmp_CFLAGS],[$flags_dbg_all])
-    CURL_VAR_STRIP([tmp_CPPFLAGS],[$flags_dbg_all])
     #
     if test "$want_debug" = "yes"; then
       AC_MSG_CHECKING([if compiler accepts debug enabling options])
       tmp_options="$flags_dbg_yes"
     fi
-    if test "$want_debug" = "no"; then
-      AC_MSG_CHECKING([if compiler accepts debug disabling options])
-      tmp_options="$flags_dbg_off"
-    fi
     #
     if test "$flags_prefer_cppflags" = "yes"; then
       CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
@@ -766,17 +709,6 @@
     fi
     squeeze CPPFLAGS
     squeeze CFLAGS
-    CURL_COMPILER_WORKS_IFELSE([
-      AC_MSG_RESULT([yes])
-      AC_MSG_NOTICE([compiler options added: $tmp_options])
-    ],[
-      AC_MSG_RESULT([no])
-      AC_MSG_WARN([compiler options rejected: $tmp_options])
-      dnl restore initial settings
-      CPPFLAGS="$tmp_save_CPPFLAGS"
-      CFLAGS="$tmp_save_CFLAGS"
-    ])
-    #
   fi
 ])
 
@@ -948,6 +880,7 @@
           dnl clang 7 or later
           if test "$compiler_num" -ge "700"; then
             CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [assign-enum])
+            CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [extra-semi-stmt])
           fi
         fi
         ;;
@@ -1100,7 +1033,10 @@
             CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [alloc-zero])
             tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
             tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
-            tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            if test "$compiler_num" -lt "1200"; then
+              dnl gcc 12 doesn't acknowledge our comment markups
+              tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            fi
           fi
           #
         fi
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index 5f87713..75fa649 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -33,8 +33,8 @@
   AC_MSG_CHECKING([whether to enable the threaded resolver])
   OPT_THRES="default"
   AC_ARG_ENABLE(threaded_resolver,
-AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver])
-AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]),
+AS_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver])
+AS_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]),
   OPT_THRES=$enableval)
   case "$OPT_THRES" in
     no)
@@ -61,8 +61,8 @@
   AC_MSG_CHECKING([whether to enable c-ares for DNS lookups])
   OPT_ARES="default"
   AC_ARG_ENABLE(ares,
-AC_HELP_STRING([--enable-ares@<:@=PATH@:>@],[Enable c-ares for DNS lookups])
-AC_HELP_STRING([--disable-ares],[Disable c-ares for DNS lookups]),
+AS_HELP_STRING([--enable-ares@<:@=PATH@:>@],[Enable c-ares for DNS lookups])
+AS_HELP_STRING([--disable-ares],[Disable c-ares for DNS lookups]),
   OPT_ARES=$enableval)
   case "$OPT_ARES" in
     no)
@@ -96,8 +96,8 @@
   AC_MSG_CHECKING([whether to enable curl debug memory tracking])
   OPT_CURLDEBUG_BUILD="default"
   AC_ARG_ENABLE(curldebug,
-AC_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking])
-AC_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]),
+AS_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking])
+AS_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]),
   OPT_CURLDEBUG_BUILD=$enableval)
   case "$OPT_CURLDEBUG_BUILD" in
     no)
@@ -151,8 +151,8 @@
   AC_MSG_CHECKING([whether to enable debug build options])
   OPT_DEBUG_BUILD="default"
   AC_ARG_ENABLE(debug,
-AC_HELP_STRING([--enable-debug],[Enable debug build options])
-AC_HELP_STRING([--disable-debug],[Disable debug build options]),
+AS_HELP_STRING([--enable-debug],[Enable debug build options])
+AS_HELP_STRING([--disable-debug],[Disable debug build options]),
   OPT_DEBUG_BUILD=$enableval)
   case "$OPT_DEBUG_BUILD" in
     no)
@@ -184,8 +184,8 @@
   AC_MSG_CHECKING([whether to enable compiler optimizer])
   OPT_COMPILER_OPTIMIZE="default"
   AC_ARG_ENABLE(optimize,
-AC_HELP_STRING([--enable-optimize],[Enable compiler optimizations])
-AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
+AS_HELP_STRING([--enable-optimize],[Enable compiler optimizations])
+AS_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
   OPT_COMPILER_OPTIMIZE=$enableval)
   case "$OPT_COMPILER_OPTIMIZE" in
     no)
@@ -239,12 +239,12 @@
   AC_MSG_CHECKING([whether to enable hiding of library internal symbols])
   OPT_SYMBOL_HIDING="default"
   AC_ARG_ENABLE(symbol-hiding,
-AC_HELP_STRING([--enable-symbol-hiding],[Enable hiding of library internal symbols])
-AC_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal symbols]),
+AS_HELP_STRING([--enable-symbol-hiding],[Enable hiding of library internal symbols])
+AS_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal symbols]),
   OPT_SYMBOL_HIDING=$enableval)
   AC_ARG_ENABLE(hidden-symbols,
-AC_HELP_STRING([--enable-hidden-symbols],[To be deprecated, use --enable-symbol-hiding])
-AC_HELP_STRING([--disable-hidden-symbols],[To be deprecated, use --disable-symbol-hiding]),
+AS_HELP_STRING([--enable-hidden-symbols],[To be deprecated, use --enable-symbol-hiding])
+AS_HELP_STRING([--disable-hidden-symbols],[To be deprecated, use --disable-symbol-hiding]),
   OPT_SYMBOL_HIDING=$enableval)
   case "$OPT_SYMBOL_HIDING" in
     no)
@@ -283,8 +283,8 @@
 dnl   AC_MSG_CHECKING([whether to enable threads for DNS lookups])
 dnl   OPT_THREADS="default"
 dnl   AC_ARG_ENABLE(threads,
-dnl AC_HELP_STRING([--enable-threads@<:@=PATH@:>@],[Enable threads for DNS lookups])
-dnl AC_HELP_STRING([--disable-threads],[Disable threads for DNS lookups]),
+dnl AS_HELP_STRING([--enable-threads@<:@=PATH@:>@],[Enable threads for DNS lookups])
+dnl AS_HELP_STRING([--disable-threads],[Disable threads for DNS lookups]),
 dnl   OPT_THREADS=$enableval)
 dnl   case "$OPT_THREADS" in
 dnl     no)
@@ -330,7 +330,7 @@
   AC_MSG_CHECKING([whether to disable dependency on -lrt])
   OPT_RT="default"
   AC_ARG_ENABLE(rt,
- AC_HELP_STRING([--disable-rt],[disable dependency on -lrt]),
+ AS_HELP_STRING([--disable-rt],[disable dependency on -lrt]),
   OPT_RT=$enableval)
   case "$OPT_RT" in
     no)
@@ -364,8 +364,8 @@
   AC_MSG_CHECKING([whether to enable strict compiler warnings])
   OPT_COMPILER_WARNINGS="default"
   AC_ARG_ENABLE(warnings,
-AC_HELP_STRING([--enable-warnings],[Enable strict compiler warnings])
-AC_HELP_STRING([--disable-warnings],[Disable strict compiler warnings]),
+AS_HELP_STRING([--enable-warnings],[Enable strict compiler warnings])
+AS_HELP_STRING([--disable-warnings],[Disable strict compiler warnings]),
   OPT_COMPILER_WARNINGS=$enableval)
   case "$OPT_COMPILER_WARNINGS" in
     no)
@@ -396,8 +396,8 @@
   AC_MSG_CHECKING([whether to enable compiler warnings as errors])
   OPT_COMPILER_WERROR="default"
   AC_ARG_ENABLE(werror,
-AC_HELP_STRING([--enable-werror],[Enable compiler warnings as errors])
-AC_HELP_STRING([--disable-werror],[Disable compiler warnings as errors]),
+AS_HELP_STRING([--enable-werror],[Enable compiler warnings as errors])
+AS_HELP_STRING([--disable-werror],[Disable compiler warnings as errors]),
   OPT_COMPILER_WERROR=$enableval)
   case "$OPT_COMPILER_WERROR" in
     no)
@@ -600,8 +600,8 @@
   AC_BEFORE([$0],[CURL_CHECK_NTLM_WB])dnl
   OPT_NTLM_WB="default"
   AC_ARG_ENABLE(ntlm-wb,
-AC_HELP_STRING([--enable-ntlm-wb@<:@=FILE@:>@],[Enable NTLM delegation to winbind's ntlm_auth helper, where FILE is ntlm_auth's absolute filename (default: /usr/bin/ntlm_auth)])
-AC_HELP_STRING([--disable-ntlm-wb],[Disable NTLM delegation to winbind's ntlm_auth helper]),
+AS_HELP_STRING([--enable-ntlm-wb@<:@=FILE@:>@],[Enable NTLM delegation to winbind's ntlm_auth helper, where FILE is ntlm_auth's absolute filename (default: /usr/bin/ntlm_auth)])
+AS_HELP_STRING([--disable-ntlm-wb],[Disable NTLM delegation to winbind's ntlm_auth helper]),
   OPT_NTLM_WB=$enableval)
   want_ntlm_wb_file="/usr/bin/ntlm_auth"
   case "$OPT_NTLM_WB" in
@@ -659,8 +659,8 @@
   AC_MSG_CHECKING([whether to enable ECH support])
   OPT_ECH="default"
   AC_ARG_ENABLE(ech,
-AC_HELP_STRING([--enable-ech],[Enable ECH support])
-AC_HELP_STRING([--disable-ech],[Disable ECH support]),
+AS_HELP_STRING([--enable-ech],[Enable ECH support])
+AS_HELP_STRING([--disable-ech],[Disable ECH support]),
   OPT_ECH=$enableval)
   case "$OPT_ECH" in
     no)
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index b4e64cf..d3ffaea 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -446,7 +446,6 @@
 dnl included when time.h is to be included.
 
 AC_DEFUN([CURL_INCLUDES_TIME], [
-AC_REQUIRE([AC_HEADER_TIME])dnl
 curl_includes_time="\
 /* includes start */
 #ifdef HAVE_SYS_TYPES_H
@@ -454,17 +453,11 @@
 #endif
 #ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>
-#  ifdef TIME_WITH_SYS_TIME
-#    include <time.h>
-#  endif
-#else
-#  ifdef HAVE_TIME_H
-#    include <time.h>
-#  endif
 #endif
+#include <time.h>
 /* includes end */"
   AC_CHECK_HEADERS(
-    sys/types.h sys/time.h time.h,
+    sys/types.h sys/time.h,
     [], [], [$curl_includes_time])
 ])
 
@@ -1550,90 +1543,6 @@
 ])
 
 
-dnl CURL_CHECK_FUNC_FREEIFADDRS
-dnl -------------------------------------------------
-dnl Verify if freeifaddrs is available, prototyped, and
-dnl can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_freeifaddrs, then
-dnl HAVE_FREEIFADDRS will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_FREEIFADDRS], [
-  AC_REQUIRE([CURL_INCLUDES_IFADDRS])dnl
-  #
-  tst_links_freeifaddrs="unknown"
-  tst_proto_freeifaddrs="unknown"
-  tst_compi_freeifaddrs="unknown"
-  tst_allow_freeifaddrs="unknown"
-  #
-  AC_MSG_CHECKING([if freeifaddrs can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([freeifaddrs])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_freeifaddrs="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_freeifaddrs="no"
-  ])
-  #
-  if test "$tst_links_freeifaddrs" = "yes"; then
-    AC_MSG_CHECKING([if freeifaddrs is prototyped])
-    AC_EGREP_CPP([freeifaddrs],[
-      $curl_includes_ifaddrs
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_freeifaddrs="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_freeifaddrs="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_freeifaddrs" = "yes"; then
-    AC_MSG_CHECKING([if freeifaddrs is compilable])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-        $curl_includes_ifaddrs
-      ]],[[
-        freeifaddrs(0);
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_compi_freeifaddrs="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_compi_freeifaddrs="no"
-    ])
-  fi
-  #
-  if test "$tst_compi_freeifaddrs" = "yes"; then
-    AC_MSG_CHECKING([if freeifaddrs usage allowed])
-    if test "x$curl_disallow_freeifaddrs" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_freeifaddrs="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_freeifaddrs="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if freeifaddrs might be used])
-  if test "$tst_links_freeifaddrs" = "yes" &&
-     test "$tst_proto_freeifaddrs" = "yes" &&
-     test "$tst_compi_freeifaddrs" = "yes" &&
-     test "$tst_allow_freeifaddrs" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_FREEIFADDRS, 1,
-      [Define to 1 if you have the freeifaddrs function.])
-    curl_cv_func_freeifaddrs="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_freeifaddrs="no"
-  fi
-])
-
-
 dnl CURL_CHECK_FUNC_FREMOVEXATTR
 dnl -------------------------------------------------
 dnl Verify if fremovexattr is available, prototyped, and
@@ -2227,341 +2136,6 @@
 ])
 
 
-dnl CURL_CHECK_FUNC_GETHOSTBYADDR
-dnl -------------------------------------------------
-dnl Verify if gethostbyaddr is available, prototyped,
-dnl and can be compiled. If all of these are true,
-dnl and usage has not been previously disallowed with
-dnl shell variable curl_disallow_gethostbyaddr, then
-dnl HAVE_GETHOSTBYADDR will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYADDR], [
-  AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
-  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
-  #
-  tst_links_gethostbyaddr="unknown"
-  tst_proto_gethostbyaddr="unknown"
-  tst_compi_gethostbyaddr="unknown"
-  tst_allow_gethostbyaddr="unknown"
-  #
-  AC_MSG_CHECKING([if gethostbyaddr can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-    ]],[[
-      if(0 != gethostbyaddr(0, 0, 0))
-        return 1;
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_gethostbyaddr="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_gethostbyaddr="no"
-  ])
-  #
-  if test "$tst_links_gethostbyaddr" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr is prototyped])
-    AC_EGREP_CPP([gethostbyaddr],[
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_gethostbyaddr="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_gethostbyaddr="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_gethostbyaddr" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr is compilable])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_netdb
-      ]],[[
-        if(0 != gethostbyaddr(0, 0, 0))
-          return 1;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_compi_gethostbyaddr="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_compi_gethostbyaddr="no"
-    ])
-  fi
-  #
-  if test "$tst_compi_gethostbyaddr" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr usage allowed])
-    if test "x$curl_disallow_gethostbyaddr" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_gethostbyaddr="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_gethostbyaddr="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if gethostbyaddr might be used])
-  if test "$tst_links_gethostbyaddr" = "yes" &&
-     test "$tst_proto_gethostbyaddr" = "yes" &&
-     test "$tst_compi_gethostbyaddr" = "yes" &&
-     test "$tst_allow_gethostbyaddr" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR, 1,
-      [Define to 1 if you have the gethostbyaddr function.])
-    curl_cv_func_gethostbyaddr="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_gethostbyaddr="no"
-  fi
-])
-
-dnl CURL_CHECK_FUNC_GAI_STRERROR
-dnl -------------------------------------------------
-dnl Verify if gai_strerror is available, prototyped,
-dnl and can be compiled. If all of these are true,
-dnl and usage has not been previously disallowed with
-dnl shell variable curl_disallow_gai_strerror, then
-dnl HAVE_GAI_STRERROR will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GAI_STRERROR], [
-  AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
-  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
-  #
-  tst_links_gai_strerror="unknown"
-  tst_proto_gai_strerror="unknown"
-  tst_compi_gai_strerror="unknown"
-  tst_allow_gai_strerror="unknown"
-  #
-  AC_MSG_CHECKING([if gai_strerror can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-    ]],[[
-      if(0 != gai_strerror(0))
-        return 1;
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_gai_strerror="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_gai_strerror="no"
-  ])
-  #
-  if test "$tst_links_gai_strerror" = "yes"; then
-    AC_MSG_CHECKING([if gai_strerror is prototyped])
-    AC_EGREP_CPP([gai_strerror],[
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_gai_strerror="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_gai_strerror="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_gai_strerror" = "yes"; then
-    AC_MSG_CHECKING([if gai_strerror is compilable])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_netdb
-      ]],[[
-        if(0 != gai_strerror(0))
-          return 1;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_compi_gai_strerror="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_compi_gai_strerror="no"
-    ])
-  fi
-  #
-  if test "$tst_compi_gai_strerror" = "yes"; then
-    AC_MSG_CHECKING([if gai_strerror usage allowed])
-    if test "x$curl_disallow_gai_strerror" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_gai_strerror="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_gai_strerror="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if gai_strerror might be used])
-  if test "$tst_links_gai_strerror" = "yes" &&
-     test "$tst_proto_gai_strerror" = "yes" &&
-     test "$tst_compi_gai_strerror" = "yes" &&
-     test "$tst_allow_gai_strerror" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_GAI_STRERROR, 1,
-      [Define to 1 if you have the gai_strerror function.])
-    curl_cv_func_gai_strerror="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_gai_strerror="no"
-  fi
-])
-
-
-dnl CURL_CHECK_FUNC_GETHOSTBYADDR_R
-dnl -------------------------------------------------
-dnl Verify if gethostbyaddr_r is available, prototyped,
-dnl and can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_gethostbyaddr_r, then
-dnl HAVE_GETHOSTBYADDR_R will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYADDR_R], [
-  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
-  #
-  tst_links_gethostbyaddr_r="unknown"
-  tst_proto_gethostbyaddr_r="unknown"
-  tst_compi_gethostbyaddr_r="unknown"
-  tst_allow_gethostbyaddr_r="unknown"
-  tst_nargs_gethostbyaddr_r="unknown"
-  #
-  AC_MSG_CHECKING([if gethostbyaddr_r can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_gethostbyaddr_r="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_gethostbyaddr_r="no"
-  ])
-  #
-  if test "$tst_links_gethostbyaddr_r" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr_r is prototyped])
-    AC_EGREP_CPP([gethostbyaddr_r],[
-      $curl_includes_netdb
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_gethostbyaddr_r="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_gethostbyaddr_r="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_gethostbyaddr_r" = "yes"; then
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      AC_MSG_CHECKING([if gethostbyaddr_r takes 5 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="5"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_gethostbyaddr_r="no"
-      ])
-    fi
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      AC_MSG_CHECKING([if gethostbyaddr_r takes 7 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="7"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_gethostbyaddr_r="no"
-      ])
-    fi
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      AC_MSG_CHECKING([if gethostbyaddr_r takes 8 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="8"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_gethostbyaddr_r="no"
-      ])
-    fi
-    AC_MSG_CHECKING([if gethostbyaddr_r is compilable])
-    if test "$tst_compi_gethostbyaddr_r" = "yes"; then
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  #
-  if test "$tst_compi_gethostbyaddr_r" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr_r usage allowed])
-    if test "x$curl_disallow_gethostbyaddr_r" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_gethostbyaddr_r="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_gethostbyaddr_r="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if gethostbyaddr_r might be used])
-  if test "$tst_links_gethostbyaddr_r" = "yes" &&
-     test "$tst_proto_gethostbyaddr_r" = "yes" &&
-     test "$tst_compi_gethostbyaddr_r" = "yes" &&
-     test "$tst_allow_gethostbyaddr_r" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR_R, 1,
-      [Define to 1 if you have the gethostbyaddr_r function.])
-    dnl AC_DEFINE_UNQUOTED(GETHOSTBYADDR_R_ARGS, $tst_nargs_gethostbyaddr_r,
-    dnl   [Specifies the number of arguments to gethostbyaddr_r])
-    #
-    if test "$tst_nargs_gethostbyaddr_r" -eq "5"; then
-      AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
-    elif test "$tst_nargs_gethostbyaddr_r" -eq "7"; then
-      AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args])
-    elif test "$tst_nargs_gethostbyaddr_r" -eq "8"; then
-      AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args])
-    fi
-    #
-    curl_cv_func_gethostbyaddr_r="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_gethostbyaddr_r="no"
-  fi
-])
-
-
 dnl CURL_CHECK_FUNC_GETHOSTBYNAME
 dnl -------------------------------------------------
 dnl Verify if gethostbyname is available, prototyped,
@@ -3337,146 +2911,6 @@
 ])
 
 
-dnl CURL_CHECK_FUNC_GETSERVBYPORT_R
-dnl -------------------------------------------------
-dnl Verify if getservbyport_r is available, prototyped,
-dnl and can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_getservbyport_r, then
-dnl HAVE_GETSERVBYPORT_R will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETSERVBYPORT_R], [
-  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
-  #
-  tst_links_getservbyport_r="unknown"
-  tst_proto_getservbyport_r="unknown"
-  tst_compi_getservbyport_r="unknown"
-  tst_allow_getservbyport_r="unknown"
-  tst_nargs_getservbyport_r="unknown"
-  #
-  AC_MSG_CHECKING([if getservbyport_r can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([getservbyport_r])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_getservbyport_r="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_getservbyport_r="no"
-  ])
-  #
-  if test "$tst_links_getservbyport_r" = "yes"; then
-    AC_MSG_CHECKING([if getservbyport_r is prototyped])
-    AC_EGREP_CPP([getservbyport_r],[
-      $curl_includes_netdb
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_getservbyport_r="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_getservbyport_r="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_getservbyport_r" = "yes"; then
-    if test "$tst_nargs_getservbyport_r" = "unknown"; then
-      AC_MSG_CHECKING([if getservbyport_r takes 4 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != getservbyport_r(0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_getservbyport_r="yes"
-        tst_nargs_getservbyport_r="4"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_getservbyport_r="no"
-      ])
-    fi
-    if test "$tst_nargs_getservbyport_r" = "unknown"; then
-      AC_MSG_CHECKING([if getservbyport_r takes 5 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != getservbyport_r(0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_getservbyport_r="yes"
-        tst_nargs_getservbyport_r="5"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_getservbyport_r="no"
-      ])
-    fi
-    if test "$tst_nargs_getservbyport_r" = "unknown"; then
-      AC_MSG_CHECKING([if getservbyport_r takes 6 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != getservbyport_r(0, 0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_getservbyport_r="yes"
-        tst_nargs_getservbyport_r="6"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_getservbyport_r="no"
-      ])
-    fi
-    AC_MSG_CHECKING([if getservbyport_r is compilable])
-    if test "$tst_compi_getservbyport_r" = "yes"; then
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  #
-  if test "$tst_compi_getservbyport_r" = "yes"; then
-    AC_MSG_CHECKING([if getservbyport_r usage allowed])
-    if test "x$curl_disallow_getservbyport_r" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_getservbyport_r="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_getservbyport_r="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if getservbyport_r might be used])
-  if test "$tst_links_getservbyport_r" = "yes" &&
-     test "$tst_proto_getservbyport_r" = "yes" &&
-     test "$tst_compi_getservbyport_r" = "yes" &&
-     test "$tst_allow_getservbyport_r" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_GETSERVBYPORT_R, 1,
-      [Define to 1 if you have the getservbyport_r function.])
-    AC_DEFINE_UNQUOTED(GETSERVBYPORT_R_ARGS, $tst_nargs_getservbyport_r,
-      [Specifies the number of arguments to getservbyport_r])
-    if test "$tst_nargs_getservbyport_r" -eq "4"; then
-      AC_DEFINE(GETSERVBYPORT_R_BUFSIZE, sizeof(struct servent_data),
-        [Specifies the size of the buffer to pass to getservbyport_r])
-    else
-      AC_DEFINE(GETSERVBYPORT_R_BUFSIZE, 4096,
-        [Specifies the size of the buffer to pass to getservbyport_r])
-    fi
-    curl_cv_func_getservbyport_r="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_getservbyport_r="no"
-  fi
-])
-
-
 dnl CURL_CHECK_FUNC_GETXATTR
 dnl -------------------------------------------------
 dnl Verify if getxattr is available, prototyped, and
@@ -3715,130 +3149,6 @@
 ])
 
 
-dnl CURL_CHECK_FUNC_INET_NTOA_R
-dnl -------------------------------------------------
-dnl Verify if inet_ntoa_r is available, prototyped,
-dnl and can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_inet_ntoa_r, then
-dnl HAVE_INET_NTOA_R will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_INET_NTOA_R], [
-  AC_REQUIRE([CURL_INCLUDES_ARPA_INET])dnl
-  #
-  tst_links_inet_ntoa_r="unknown"
-  tst_proto_inet_ntoa_r="unknown"
-  tst_compi_inet_ntoa_r="unknown"
-  tst_allow_inet_ntoa_r="unknown"
-  tst_nargs_inet_ntoa_r="unknown"
-  #
-  AC_MSG_CHECKING([if inet_ntoa_r can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([inet_ntoa_r])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_inet_ntoa_r="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_inet_ntoa_r="no"
-  ])
-  #
-  if test "$tst_links_inet_ntoa_r" = "yes"; then
-    AC_MSG_CHECKING([if inet_ntoa_r is prototyped])
-    AC_EGREP_CPP([inet_ntoa_r],[
-      $curl_includes_arpa_inet
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_inet_ntoa_r="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_inet_ntoa_r="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_inet_ntoa_r" = "yes"; then
-    if test "$tst_nargs_inet_ntoa_r" = "unknown"; then
-      AC_MSG_CHECKING([if inet_ntoa_r takes 2 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_arpa_inet
-        ]],[[
-          struct in_addr addr;
-          if(0 != inet_ntoa_r(addr, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_inet_ntoa_r="yes"
-        tst_nargs_inet_ntoa_r="2"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_inet_ntoa_r="no"
-      ])
-    fi
-    if test "$tst_nargs_inet_ntoa_r" = "unknown"; then
-      AC_MSG_CHECKING([if inet_ntoa_r takes 3 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_arpa_inet
-        ]],[[
-          struct in_addr addr;
-          if(0 != inet_ntoa_r(addr, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_inet_ntoa_r="yes"
-        tst_nargs_inet_ntoa_r="3"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_inet_ntoa_r="no"
-      ])
-    fi
-    AC_MSG_CHECKING([if inet_ntoa_r is compilable])
-    if test "$tst_compi_inet_ntoa_r" = "yes"; then
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  #
-  if test "$tst_compi_inet_ntoa_r" = "yes"; then
-    AC_MSG_CHECKING([if inet_ntoa_r usage allowed])
-    if test "x$curl_disallow_inet_ntoa_r" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_inet_ntoa_r="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_inet_ntoa_r="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if inet_ntoa_r might be used])
-  if test "$tst_links_inet_ntoa_r" = "yes" &&
-     test "$tst_proto_inet_ntoa_r" = "yes" &&
-     test "$tst_compi_inet_ntoa_r" = "yes" &&
-     test "$tst_allow_inet_ntoa_r" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_INET_NTOA_R, 1,
-      [Define to 1 if you have the inet_ntoa_r function.])
-    dnl AC_DEFINE_UNQUOTED(INET_NTOA_R_ARGS, $tst_nargs_inet_ntoa_r,
-    dnl   [Specifies the number of arguments to inet_ntoa_r])
-    #
-    if test "$tst_nargs_inet_ntoa_r" -eq "2"; then
-      AC_DEFINE(HAVE_INET_NTOA_R_2, 1, [inet_ntoa_r() takes 2 args])
-    elif test "$tst_nargs_inet_ntoa_r" -eq "3"; then
-      AC_DEFINE(HAVE_INET_NTOA_R_3, 1, [inet_ntoa_r() takes 3 args])
-    fi
-    #
-    curl_cv_func_inet_ntoa_r="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_inet_ntoa_r="no"
-  fi
-])
-
-
 dnl CURL_CHECK_FUNC_INET_NTOP
 dnl -------------------------------------------------
 dnl Verify if inet_ntop is available, prototyped, can
@@ -4605,7 +3915,7 @@
         $curl_includes_stropts
       ]],[[
         long flags = 0;
-        if(0 != ioctlsocket(0, FIONBIO, &flags))
+        if(0 != IoctlSocket(0, FIONBIO, &flags))
           return 1;
       ]])
     ],[
@@ -6687,90 +5997,6 @@
   fi
 ])
 
-dnl CURL_CHECK_FUNC_STRNCASECMP
-dnl -------------------------------------------------
-dnl Verify if strncasecmp is available, prototyped, and
-dnl can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strncasecmp, then
-dnl HAVE_STRNCASECMP will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_STRNCASECMP], [
-  AC_REQUIRE([CURL_INCLUDES_STRING])dnl
-  #
-  tst_links_strncasecmp="unknown"
-  tst_proto_strncasecmp="unknown"
-  tst_compi_strncasecmp="unknown"
-  tst_allow_strncasecmp="unknown"
-  #
-  AC_MSG_CHECKING([if strncasecmp can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([strncasecmp])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_strncasecmp="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_strncasecmp="no"
-  ])
-  #
-  if test "$tst_links_strncasecmp" = "yes"; then
-    AC_MSG_CHECKING([if strncasecmp is prototyped])
-    AC_EGREP_CPP([strncasecmp],[
-      $curl_includes_string
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_strncasecmp="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_strncasecmp="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_strncasecmp" = "yes"; then
-    AC_MSG_CHECKING([if strncasecmp is compilable])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-        $curl_includes_string
-      ]],[[
-        if(0 != strncasecmp(0, 0, 0))
-          return 1;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_compi_strncasecmp="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_compi_strncasecmp="no"
-    ])
-  fi
-  #
-  if test "$tst_compi_strncasecmp" = "yes"; then
-    AC_MSG_CHECKING([if strncasecmp usage allowed])
-    if test "x$curl_disallow_strncasecmp" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_strncasecmp="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_strncasecmp="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if strncasecmp might be used])
-  if test "$tst_links_strncasecmp" = "yes" &&
-     test "$tst_proto_strncasecmp" = "yes" &&
-     test "$tst_compi_strncasecmp" = "yes" &&
-     test "$tst_allow_strncasecmp" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_STRNCASECMP, 1,
-      [Define to 1 if you have the strncasecmp function.])
-    curl_cv_func_strncasecmp="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_strncasecmp="no"
-  fi
-])
-
 
 dnl CURL_CHECK_FUNC_STRNCMPI
 dnl -------------------------------------------------
@@ -7310,7 +6536,7 @@
 
   dnl check if enabled by argument
   AC_ARG_ENABLE(code-coverage,
-     AC_HELP_STRING([--enable-code-coverage], [Provide code coverage]),
+     AS_HELP_STRING([--enable-code-coverage], [Provide code coverage]),
      coverage="$enableval")
 
   dnl if not gcc switch off again
diff --git a/m4/curl-gnutls.m4 b/m4/curl-gnutls.m4
new file mode 100644
index 0000000..f0b80ab
--- /dev/null
+++ b/m4/curl-gnutls.m4
@@ -0,0 +1,165 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+dnl ----------------------------------------------------
+dnl check for GnuTLS
+dnl ----------------------------------------------------
+
+AC_DEFUN([CURL_WITH_GNUTLS], [
+if test "x$OPT_GNUTLS" != xno; then
+  ssl_msg=
+
+  if test X"$OPT_GNUTLS" != Xno; then
+
+    addld=""
+    addlib=""
+    gtlslib=""
+    version=""
+    addcflags=""
+
+    if test "x$OPT_GNUTLS" = "xyes"; then
+      dnl this is with no partiular path given
+      CURL_CHECK_PKGCONFIG(gnutls)
+
+      if test "$PKGCONFIG" != "no" ; then
+        addlib=`$PKGCONFIG --libs-only-l gnutls`
+        addld=`$PKGCONFIG --libs-only-L gnutls`
+        addcflags=`$PKGCONFIG --cflags-only-I gnutls`
+        version=`$PKGCONFIG --modversion gnutls`
+        gtlslib=`echo $addld | $SED -e 's/^-L//'`
+      else
+        dnl without pkg-config, we try libgnutls-config as that was how it
+        dnl used to be done
+        check=`libgnutls-config --version 2>/dev/null`
+        if test -n "$check"; then
+          addlib=`libgnutls-config --libs`
+          addcflags=`libgnutls-config --cflags`
+          version=`libgnutls-config --version`
+          gtlslib=`libgnutls-config --prefix`/lib$libsuff
+        fi
+      fi
+    else
+      dnl this is with a given path, first check if there's a libgnutls-config
+      dnl there and if not, make an educated guess
+      cfg=$OPT_GNUTLS/bin/libgnutls-config
+      check=`$cfg --version 2>/dev/null`
+      if test -n "$check"; then
+        addlib=`$cfg --libs`
+        addcflags=`$cfg --cflags`
+        version=`$cfg --version`
+        gtlslib=`$cfg --prefix`/lib$libsuff
+      else
+        dnl without pkg-config and libgnutls-config, we guess a lot!
+        addlib=-lgnutls
+        addld=-L$OPT_GNUTLS/lib$libsuff
+        addcflags=-I$OPT_GNUTLS/include
+        version="" # we just don't know
+        gtlslib=$OPT_GNUTLS/lib$libsuff
+      fi
+    fi
+
+    if test -z "$version"; then
+      dnl lots of efforts, still no go
+      version="unknown"
+    fi
+
+    if test -n "$addlib"; then
+
+      CLEANLIBS="$LIBS"
+      CLEANCPPFLAGS="$CPPFLAGS"
+      CLEANLDFLAGS="$LDFLAGS"
+
+      LIBS="$addlib $LIBS"
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      dnl this function is selected since it was introduced in 3.1.10
+      AC_CHECK_LIB(gnutls, gnutls_x509_crt_get_dn2,
+       [
+       AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
+       AC_SUBST(USE_GNUTLS, [1])
+       GNUTLS_ENABLED=1
+       USE_GNUTLS="yes"
+       ssl_msg="GnuTLS"
+       test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+       ],
+       [
+         LIBS="$CLEANLIBS"
+         CPPFLAGS="$CLEANCPPFLAGS"
+       ])
+
+      if test "x$USE_GNUTLS" = "xyes"; then
+        AC_MSG_NOTICE([detected GnuTLS version $version])
+        check_for_ca_bundle=1
+        if test -n "$gtlslib"; then
+          dnl when shared libs were found in a path that the run-time
+          dnl linker doesn't search through, we need to add it to
+          dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
+          dnl due to this
+          if test "x$cross_compiling" != "xyes"; then
+            CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
+            export CURL_LIBRARY_PATH
+            AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
+          fi
+        fi
+      fi
+
+    fi
+
+  fi dnl GNUTLS not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+
+dnl ---
+dnl Check which crypto backend GnuTLS uses
+dnl ---
+
+if test "$GNUTLS_ENABLED" = "1"; then
+  USE_GNUTLS_NETTLE=
+  # First check if we can detect either crypto library via transitive linking
+  AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+
+  # If not, try linking directly to both of them to see if they are available
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+  fi
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    AC_MSG_ERROR([GnuTLS found, but nettle was not found])
+  fi
+  LIBS="-lnettle $LIBS"
+fi
+
+dnl ---
+dnl We require GnuTLS with SRP support.
+dnl ---
+if test "$GNUTLS_ENABLED" = "1"; then
+  AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
+   [
+     AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
+     AC_SUBST(HAVE_GNUTLS_SRP, [1])
+   ])
+fi
+
+])
diff --git a/m4/curl-mbedtls.m4 b/m4/curl-mbedtls.m4
new file mode 100644
index 0000000..4c91cba
--- /dev/null
+++ b/m4/curl-mbedtls.m4
@@ -0,0 +1,109 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+dnl ----------------------------------------------------
+dnl check for mbedTLS
+dnl ----------------------------------------------------
+AC_DEFUN([CURL_WITH_MBEDTLS], [
+
+if test "x$OPT_MBEDTLS" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+  ssl_msg=
+
+  if test X"$OPT_MBEDTLS" != Xno; then
+
+    if test "$OPT_MBEDTLS" = "yes"; then
+      OPT_MBEDTLS=""
+    fi
+
+    if test -z "$OPT_MBEDTLS" ; then
+      dnl check for lib first without setting any new path
+
+      AC_CHECK_LIB(mbedtls, mbedtls_havege_init,
+      dnl libmbedtls found, set the variable
+       [
+         AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
+         AC_SUBST(USE_MBEDTLS, [1])
+         MBEDTLS_ENABLED=1
+         USE_MBEDTLS="yes"
+         ssl_msg="mbedTLS"
+	 test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ], [], -lmbedx509 -lmbedcrypto)
+    fi
+
+    addld=""
+    addlib=""
+    addcflags=""
+    mbedtlslib=""
+
+    if test "x$USE_MBEDTLS" != "xyes"; then
+      dnl add the path and test again
+      addld=-L$OPT_MBEDTLS/lib$libsuff
+      addcflags=-I$OPT_MBEDTLS/include
+      mbedtlslib=$OPT_MBEDTLS/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      AC_CHECK_LIB(mbedtls, mbedtls_ssl_init,
+       [
+       AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
+       AC_SUBST(USE_MBEDTLS, [1])
+       MBEDTLS_ENABLED=1
+       USE_MBEDTLS="yes"
+       ssl_msg="mbedTLS"
+       test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+       ],
+       [
+         CPPFLAGS=$_cppflags
+         LDFLAGS=$_ldflags
+       ], -lmbedx509 -lmbedcrypto)
+    fi
+
+    if test "x$USE_MBEDTLS" = "xyes"; then
+      AC_MSG_NOTICE([detected mbedTLS])
+      check_for_ca_bundle=1
+
+      LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
+
+      if test -n "$mbedtlslib"; then
+        dnl when shared libs were found in a path that the run-time
+        dnl linker doesn't search through, we need to add it to
+        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
+        dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
+          export CURL_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH])
+        fi
+      fi
+    fi
+
+  fi dnl mbedTLS not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+
+])
diff --git a/m4/curl-mesalink.m4 b/m4/curl-mesalink.m4
new file mode 100644
index 0000000..0f588a9
--- /dev/null
+++ b/m4/curl-mesalink.m4
@@ -0,0 +1,107 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_MESALINK], [
+dnl ----------------------------------------------------
+dnl check for MesaLink
+dnl ----------------------------------------------------
+
+if test "x$OPT_MESALINK" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+  ssl_msg=
+
+  if test X"$OPT_MESALINK" != Xno; then
+
+    if test "$OPT_MESALINK" = "yes"; then
+      OPT_MESALINK=""
+    fi
+
+    if test -z "$OPT_MESALINK" ; then
+      dnl check for lib first without setting any new path
+
+      AC_CHECK_LIB(mesalink, mesalink_library_init,
+      dnl libmesalink found, set the variable
+       [
+         AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled])
+         AC_SUBST(USE_MESALINK, [1])
+         MESALINK_ENABLED=1
+         USE_MESALINK="yes"
+         ssl_msg="MesaLink"
+	 test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ])
+    fi
+
+    addld=""
+    addlib=""
+    addcflags=""
+    mesalinklib=""
+
+    if test "x$USE_MESALINK" != "xyes"; then
+      dnl add the path and test again
+      addld=-L$OPT_MESALINK/lib$libsuff
+      addcflags=-I$OPT_MESALINK/include
+      mesalinklib=$OPT_MESALINK/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      AC_CHECK_LIB(mesalink, mesalink_library_init,
+       [
+       AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled])
+       AC_SUBST(USE_MESALINK, [1])
+       MESALINK_ENABLED=1
+       USE_MESALINK="yes"
+       ssl_msg="MesaLink"
+       test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+       ],
+       [
+         CPPFLAGS=$_cppflags
+         LDFLAGS=$_ldflags
+       ])
+    fi
+
+    if test "x$USE_MESALINK" = "xyes"; then
+      AC_MSG_NOTICE([detected MesaLink])
+
+      LIBS="-lmesalink $LIBS"
+
+      if test -n "$mesalinklib"; then
+        dnl when shared libs were found in a path that the run-time
+        dnl linker doesn't search through, we need to add it to
+        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
+        dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib"
+          export LD_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $mesalinklib to LD_LIBRARY_PATH])
+        fi
+      fi
+    fi
+
+  fi dnl MesaLink not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+])
diff --git a/m4/curl-nss.m4 b/m4/curl-nss.m4
new file mode 100644
index 0000000..397ba71
--- /dev/null
+++ b/m4/curl-nss.m4
@@ -0,0 +1,142 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_NSS], [
+if test "x$OPT_NSS" != xno; then
+  ssl_msg=
+
+  if test X"$OPT_NSS" != Xno; then
+
+    addld=""
+    addlib=""
+    addcflags=""
+    nssprefix=""
+    version=""
+
+    if test "x$OPT_NSS" = "xyes"; then
+
+      CURL_CHECK_PKGCONFIG(nss)
+
+      if test "$PKGCONFIG" != "no" ; then
+        addlib=`$PKGCONFIG --libs nss`
+        addcflags=`$PKGCONFIG --cflags nss`
+        version=`$PKGCONFIG --modversion nss`
+        nssprefix=`$PKGCONFIG --variable=prefix nss`
+      else
+        dnl Without pkg-config, we check for nss-config
+
+        check=`nss-config --version 2>/dev/null`
+        if test -n "$check"; then
+          addlib=`nss-config --libs`
+          addcflags=`nss-config --cflags`
+          version=`nss-config --version`
+          nssprefix=`nss-config --prefix`
+        else
+          addlib="-lnss3"
+          addcflags=""
+          version="unknown"
+        fi
+      fi
+    else
+      NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
+      if test -f "$NSS_PCDIR/nss.pc"; then
+        CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR])
+        if test "$PKGCONFIG" != "no" ; then
+          addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss`
+          addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss`
+          addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss`
+          version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss`
+          nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss`
+        fi
+      fi
+    fi
+
+    if test -z "$addlib"; then
+      # Without pkg-config, we'll kludge in some defaults
+      AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.])
+      addld="-L$OPT_NSS/lib"
+      addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
+      addcflags="-I$OPT_NSS/include"
+      version="unknown"
+      nssprefix=$OPT_NSS
+    fi
+
+    CLEANLDFLAGS="$LDFLAGS"
+    CLEANLIBS="$LIBS"
+    CLEANCPPFLAGS="$CPPFLAGS"
+
+    LDFLAGS="$addld $LDFLAGS"
+    LIBS="$addlib $LIBS"
+    if test "$addcflags" != "-I/usr/include"; then
+       CPPFLAGS="$CPPFLAGS $addcflags"
+    fi
+
+    dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
+    AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
+     [
+     AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
+     AC_SUBST(USE_NSS, [1])
+     USE_NSS="yes"
+     NSS_ENABLED=1
+     ssl_msg="NSS"
+     test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+     ],
+     [
+       LDFLAGS="$CLEANLDFLAGS"
+       LIBS="$CLEANLIBS"
+       CPPFLAGS="$CLEANCPPFLAGS"
+     ])
+
+    if test "x$USE_NSS" = "xyes"; then
+      AC_MSG_NOTICE([detected NSS version $version])
+
+      dnl PK11_CreateManagedGenericObject() was introduced in NSS 3.34 because
+      dnl PK11_DestroyGenericObject() does not release resources allocated by
+      dnl PK11_CreateGenericObject() early enough.
+      AC_CHECK_FUNC(PK11_CreateManagedGenericObject,
+        [
+          AC_DEFINE(HAVE_PK11_CREATEMANAGEDGENERICOBJECT, 1,
+                    [if you have the PK11_CreateManagedGenericObject function])
+        ])
+
+      dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
+      NSS_LIBS=$addlib
+      AC_SUBST([NSS_LIBS])
+
+      dnl when shared libs were found in a path that the run-time
+      dnl linker doesn't search through, we need to add it to
+      dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
+      dnl due to this
+      if test "x$cross_compiling" != "xyes"; then
+        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
+        export CURL_LIBRARY_PATH
+        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH])
+      fi
+
+    fi dnl NSS found
+
+  fi dnl NSS not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+
+])
diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4
index 24f33aa..835768e 100644
--- a/m4/curl-openssl.m4
+++ b/m4/curl-openssl.m4
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -276,3 +276,378 @@
     AC_MSG_WARN([$tst_warns])
   fi
 ])
+
+dnl **********************************************************************
+dnl Check for OpenSSL libraries and headers
+dnl **********************************************************************
+
+AC_DEFUN([CURL_WITH_OPENSSL], [
+if test "x$OPT_OPENSSL" != xno; then
+  ssl_msg=
+
+  dnl backup the pre-ssl variables
+  CLEANLDFLAGS="$LDFLAGS"
+  CLEANCPPFLAGS="$CPPFLAGS"
+  CLEANLIBS="$LIBS"
+
+  dnl This is for Msys/Mingw
+  case $host in
+    *-*-msys* | *-*-mingw*)
+      AC_MSG_CHECKING([for gdi32])
+      my_ac_save_LIBS=$LIBS
+      LIBS="-lgdi32 $LIBS"
+      AC_LINK_IFELSE([ AC_LANG_PROGRAM([[
+        #include <windef.h>
+        #include <wingdi.h>
+        ]],
+        [[
+          GdiFlush();
+        ]])],
+        [ dnl worked!
+        AC_MSG_RESULT([yes])],
+        [ dnl failed, restore LIBS
+        LIBS=$my_ac_save_LIBS
+        AC_MSG_RESULT(no)]
+        )
+      ;;
+  esac
+
+  case "$OPT_OPENSSL" in
+  yes)
+    dnl --with-openssl (without path) used
+    PKGTEST="yes"
+    PREFIX_OPENSSL=
+    ;;
+  *)
+    dnl check the given --with-openssl spot
+    PKGTEST="no"
+    PREFIX_OPENSSL=$OPT_OPENSSL
+
+    dnl Try pkg-config even when cross-compiling.  Since we
+    dnl specify PKG_CONFIG_LIBDIR we're only looking where
+    dnl the user told us to look
+    OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
+    if test -f "$OPENSSL_PCDIR/openssl.pc"; then
+      AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
+      PKGTEST="yes"
+    elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
+      AC_MSG_ERROR([$PREFIX_OPENSSL is a bad --with-openssl prefix!])
+    fi
+
+    dnl in case pkg-config comes up empty, use what we got
+    dnl via --with-openssl
+    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
+    if test "$PREFIX_OPENSSL" != "/usr" ; then
+      SSL_LDFLAGS="-L$LIB_OPENSSL"
+      SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
+    fi
+    SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
+    ;;
+  esac
+
+  if test "$PKGTEST" = "yes"; then
+
+    CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
+
+    if test "$PKGCONFIG" != "no" ; then
+      SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
+        $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
+
+      SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
+        $PKGCONFIG --libs-only-L openssl 2>/dev/null`
+
+      SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
+        $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
+
+      AC_SUBST(SSL_LIBS)
+      AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
+      AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
+      AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
+
+      LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'`
+
+      dnl use the values pkg-config reported.  This is here
+      dnl instead of below with CPPFLAGS and LDFLAGS because we only
+      dnl learn about this via pkg-config.  If we only have
+      dnl the argument to --with-openssl we don't know what
+      dnl additional libs may be necessary.  Hope that we
+      dnl don't need any.
+      LIBS="$SSL_LIBS $LIBS"
+    fi
+  fi
+
+  dnl finally, set flags to use SSL
+  CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
+  LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
+
+  AC_CHECK_LIB(crypto, HMAC_Update,[
+     HAVECRYPTO="yes"
+     LIBS="-lcrypto $LIBS"
+     ],[
+     if test -n "$LIB_OPENSSL" ; then
+       LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
+     fi
+     if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
+       # only set this if pkg-config wasn't used
+       CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
+     fi
+     # Linking previously failed, try extra paths from --with-openssl or
+     # pkg-config.  Use a different function name to avoid reusing the earlier
+     # cached result.
+     AC_CHECK_LIB(crypto, HMAC_Init_ex,[
+       HAVECRYPTO="yes"
+       LIBS="-lcrypto $LIBS"], [
+
+       dnl still no, but what about with -ldl?
+       AC_MSG_CHECKING([OpenSSL linking with -ldl])
+       LIBS="$CLEANLIBS -lcrypto -ldl"
+       AC_LINK_IFELSE([ AC_LANG_PROGRAM([[
+         #include <openssl/err.h>
+       ]], [[
+         ERR_clear_error();
+       ]]) ],
+       [
+         AC_MSG_RESULT(yes)
+         HAVECRYPTO="yes"
+       ],
+       [
+         AC_MSG_RESULT(no)
+         dnl ok, so what about both -ldl and -lpthread?
+         dnl This may be necessary for static libraries.
+
+         AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
+         LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"
+         AC_LINK_IFELSE([
+           AC_LANG_PROGRAM([[
+           #include <openssl/err.h>
+         ]], [[
+           ERR_clear_error();
+         ]])],
+         [
+           AC_MSG_RESULT(yes)
+           HAVECRYPTO="yes"
+         ],
+         [
+           AC_MSG_RESULT(no)
+           LDFLAGS="$CLEANLDFLAGS"
+           CPPFLAGS="$CLEANCPPFLAGS"
+           LIBS="$CLEANLIBS"
+
+         ])
+
+       ])
+
+     ])
+  ])
+
+  if test X"$HAVECRYPTO" = X"yes"; then
+    dnl This is only reasonable to do if crypto actually is there: check for
+    dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
+
+    AC_CHECK_LIB(ssl, SSL_connect)
+
+    if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
+        dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
+        AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
+        OLIBS=$LIBS
+        LIBS="-lRSAglue -lrsaref $LIBS"
+        AC_CHECK_LIB(ssl, SSL_connect)
+        if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
+            dnl still no SSL_connect
+            AC_MSG_RESULT(no)
+            LIBS=$OLIBS
+        else
+            AC_MSG_RESULT(yes)
+        fi
+
+    else
+
+      dnl Have the libraries--check for OpenSSL headers
+      AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
+                       openssl/pem.h openssl/ssl.h openssl/err.h,
+        ssl_msg="OpenSSL"
+	test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        OPENSSL_ENABLED=1
+        AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
+
+      if test $ac_cv_header_openssl_x509_h = no; then
+        dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
+        dnl since 'err.h' might in fact find a krb4 header with the same
+        dnl name
+        AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
+
+        if test $ac_cv_header_x509_h = yes &&
+           test $ac_cv_header_crypto_h = yes &&
+           test $ac_cv_header_ssl_h = yes; then
+          dnl three matches
+          ssl_msg="OpenSSL"
+          OPENSSL_ENABLED=1
+        fi
+      fi
+    fi
+
+    if test X"$OPENSSL_ENABLED" != X"1"; then
+       LIBS="$CLEANLIBS"
+    fi
+
+    if test X"$OPT_OPENSSL" != Xoff &&
+       test "$OPENSSL_ENABLED" != "1"; then
+      AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
+    fi
+  fi
+
+  if test X"$OPENSSL_ENABLED" = X"1"; then
+    dnl These can only exist if OpenSSL exists
+    dnl OpenSSL_version is introduced in 3.0.0
+
+    AC_CHECK_FUNCS( RAND_egd \
+                    SSLv2_client_method \
+                    OpenSSL_version )
+
+    AC_MSG_CHECKING([for BoringSSL])
+    AC_COMPILE_IFELSE([
+        AC_LANG_PROGRAM([[
+                #include <openssl/base.h>
+                ]],[[
+                #ifndef OPENSSL_IS_BORINGSSL
+                #error not boringssl
+                #endif
+       ]])
+    ],[
+        AC_MSG_RESULT([yes])
+        AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
+                           [Define to 1 if using BoringSSL.])
+        ssl_msg="BoringSSL"
+    ],[
+        AC_MSG_RESULT([no])
+    ])
+
+    AC_MSG_CHECKING([for libressl])
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+#include <openssl/opensslv.h>
+      ]],[[
+        int dummy = LIBRESSL_VERSION_NUMBER;
+      ]])
+    ],[
+      AC_MSG_RESULT([yes])
+      AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
+        [Define to 1 if using libressl.])
+      ssl_msg="libressl"
+    ],[
+      AC_MSG_RESULT([no])
+    ])
+
+    AC_MSG_CHECKING([for OpenSSL >= v3])
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+#include <openssl/opensslv.h>
+      ]],[[
+        #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
+        return 0;
+        #else
+        #error older than 3
+        #endif
+      ]])
+    ],[
+      AC_MSG_RESULT([yes])
+      AC_DEFINE_UNQUOTED(HAVE_OPENSSL3, 1,
+        [Define to 1 if using OpenSSL 3 or later.])
+      dnl OpenSSLv3 marks the DES functions deprecated but we have no
+      dnl replacements (yet) so tell the compiler to not warn for them
+      dnl
+      dnl Ask OpenSSL to suppress the warnings.
+      CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED"
+      ssl_msg="OpenSSL v3+"
+    ],[
+      AC_MSG_RESULT([no])
+    ])
+  fi
+
+  if test "$OPENSSL_ENABLED" = "1"; then
+    if test -n "$LIB_OPENSSL"; then
+       dnl when the ssl shared libs were found in a path that the run-time
+       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
+       dnl to prevent further configure tests to fail due to this
+       if test "x$cross_compiling" != "xyes"; then
+         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
+         export CURL_LIBRARY_PATH
+         AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
+       fi
+    fi
+    CURL_CHECK_OPENSSL_API
+    check_for_ca_bundle=1
+  fi
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+
+if test X"$OPT_OPENSSL" != Xno &&
+  test "$OPENSSL_ENABLED" != "1"; then
+  AC_MSG_NOTICE([OPT_OPENSSL: $OPT_OPENSSL])
+  AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
+  AC_MSG_ERROR([--with-openssl was given but OpenSSL could not be detected])
+fi
+
+dnl **********************************************************************
+dnl Check for the random seed preferences
+dnl **********************************************************************
+
+if test X"$OPENSSL_ENABLED" = X"1"; then
+  AC_ARG_WITH(egd-socket,
+  AS_HELP_STRING([--with-egd-socket=FILE],
+                 [Entropy Gathering Daemon socket pathname]),
+      [ EGD_SOCKET="$withval" ]
+  )
+  if test -n "$EGD_SOCKET" ; then
+          AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
+          [your Entropy Gathering Daemon socket pathname] )
+  fi
+
+  dnl Check for user-specified random device
+  AC_ARG_WITH(random,
+  AS_HELP_STRING([--with-random=FILE],
+                 [read randomness from FILE (default=/dev/urandom)]),
+      [ RANDOM_FILE="$withval" ],
+      [
+          if test x$cross_compiling != xyes; then
+            dnl Check for random device
+            AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
+          else
+            AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
+          fi
+      ]
+  )
+  if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
+          AC_SUBST(RANDOM_FILE)
+          AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
+          [a suitable file to read random data from])
+  fi
+fi
+
+dnl ---
+dnl We require OpenSSL with SRP support.
+dnl ---
+if test "$OPENSSL_ENABLED" = "1"; then
+  AC_CHECK_LIB(crypto, SRP_Calc_client_key,
+   [
+     AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key])
+     AC_SUBST(HAVE_OPENSSL_SRP, [1])
+   ])
+fi
+
+dnl ---
+dnl Whether the OpenSSL configuration will be loaded automatically
+dnl ---
+if test X"$OPENSSL_ENABLED" = X"1"; then
+AC_ARG_ENABLE(openssl-auto-load-config,
+AS_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration])
+AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]),
+[ if test X"$enableval" = X"no"; then
+    AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled])
+    AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration won't be loaded automatically])
+  fi
+])
+fi
+
+])
diff --git a/m4/curl-override.m4 b/m4/curl-override.m4
index 18e4e20..72fc393 100644
--- a/m4/curl-override.m4
+++ b/m4/curl-override.m4
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/m4/curl-reentrant.m4 b/m4/curl-reentrant.m4
index 32cbaf8..92ef002 100644
--- a/m4/curl-reentrant.m4
+++ b/m4/curl-reentrant.m4
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -214,76 +214,6 @@
 ])
 
 
-dnl CURL_CHECK_NEED_REENTRANT_INET_NTOA_R
-dnl -------------------------------------------------
-dnl Checks if the preprocessor _REENTRANT definition
-dnl makes function inet_ntoa_r compiler visible.
-
-AC_DEFUN([CURL_CHECK_NEED_REENTRANT_INET_NTOA_R], [
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([inet_ntoa_r])
-  ],[
-    tmp_inet_ntoa_r="yes"
-  ],[
-    tmp_inet_ntoa_r="no"
-  ])
-  if test "$tmp_inet_ntoa_r" = "yes"; then
-    AC_EGREP_CPP([inet_ntoa_r],[
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-    ],[
-      tmp_inet_ntoa_r="proto_declared"
-    ],[
-      AC_EGREP_CPP([inet_ntoa_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-      ],[
-        tmp_inet_ntoa_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-      ])
-    ])
-  fi
-])
-
-
-dnl CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
-dnl -------------------------------------------------
-dnl Checks if the preprocessor _REENTRANT definition
-dnl makes function gethostbyaddr_r compiler visible.
-
-AC_DEFUN([CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R], [
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
-  ],[
-    tmp_gethostbyaddr_r="yes"
-  ],[
-    tmp_gethostbyaddr_r="no"
-  ])
-  if test "$tmp_gethostbyaddr_r" = "yes"; then
-    AC_EGREP_CPP([gethostbyaddr_r],[
-#include <sys/types.h>
-#include <netdb.h>
-    ],[
-      tmp_gethostbyaddr_r="proto_declared"
-    ],[
-      AC_EGREP_CPP([gethostbyaddr_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-      ],[
-        tmp_gethostbyaddr_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-      ])
-    ])
-  fi
-])
-
-
 dnl CURL_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
 dnl -------------------------------------------------
 dnl Checks if the preprocessor _REENTRANT definition
@@ -350,39 +280,6 @@
 ])
 
 
-dnl CURL_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
-dnl -------------------------------------------------
-dnl Checks if the preprocessor _REENTRANT definition
-dnl makes function getservbyport_r compiler visible.
-
-AC_DEFUN([CURL_CHECK_NEED_REENTRANT_GETSERVBYPORT_R], [
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([getservbyport_r])
-  ],[
-    tmp_getservbyport_r="yes"
-  ],[
-    tmp_getservbyport_r="no"
-  ])
-  if test "$tmp_getservbyport_r" = "yes"; then
-    AC_EGREP_CPP([getservbyport_r],[
-#include <sys/types.h>
-#include <netdb.h>
-    ],[
-      tmp_getservbyport_r="proto_declared"
-    ],[
-      AC_EGREP_CPP([getservbyport_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-      ],[
-        tmp_getservbyport_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-      ])
-    ])
-  fi
-])
-
-
 dnl CURL_CHECK_NEED_REENTRANT_FUNCTIONS_R
 dnl -------------------------------------------------
 dnl Checks if the preprocessor _REENTRANT definition
@@ -403,20 +300,11 @@
     CURL_CHECK_NEED_REENTRANT_STRTOK_R
   fi
   if test "$tmp_need_reentrant" = "no"; then
-    CURL_CHECK_NEED_REENTRANT_INET_NTOA_R
-  fi
-  if test "$tmp_need_reentrant" = "no"; then
-    CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
-  fi
-  if test "$tmp_need_reentrant" = "no"; then
     CURL_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
   fi
   if test "$tmp_need_reentrant" = "no"; then
     CURL_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
   fi
-  if test "$tmp_need_reentrant" = "no"; then
-    CURL_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
-  fi
 ])
 
 
diff --git a/m4/curl-rustls.m4 b/m4/curl-rustls.m4
new file mode 100644
index 0000000..2ac34b3
--- /dev/null
+++ b/m4/curl-rustls.m4
@@ -0,0 +1,106 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_RUSTLS], [
+dnl ----------------------------------------------------
+dnl check for rustls
+dnl ----------------------------------------------------
+
+if test "x$OPT_RUSTLS" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+  ssl_msg=
+
+  if test X"$OPT_RUSTLS" != Xno; then
+
+    if test "$OPT_RUSTLS" = "yes"; then
+      OPT_RUSTLS=""
+    fi
+
+    if test -z "$OPT_RUSTLS" ; then
+      dnl check for lib first without setting any new path
+
+      AC_CHECK_LIB(crustls, rustls_client_session_read,
+      dnl libcrustls found, set the variable
+       [
+         AC_DEFINE(USE_RUSTLS, 1, [if rustls is enabled])
+         AC_SUBST(USE_RUSTLS, [1])
+         RUSTLS_ENABLED=1
+         USE_RUSTLS="yes"
+         ssl_msg="rustls"
+	 test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ], [], -lpthread -ldl)
+    fi
+
+    addld=""
+    addlib="-lpthread"
+    addcflags=""
+    bearssllib=""
+
+    if test "x$USE_RUSTLS" != "xyes"; then
+      dnl add the path and test again
+      addld=-L$OPT_RUSTLS/lib$libsuff
+      addcflags=-I$OPT_RUSTLS/include
+      rustlslib=$OPT_RUSTLS/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      AC_CHECK_LIB(crustls, rustls_connection_read,
+       [
+       AC_DEFINE(USE_RUSTLS, 1, [if rustls is enabled])
+       AC_SUBST(USE_RUSTLS, [1])
+       RUSTLS_ENABLED=1
+       USE_RUSTLS="yes"
+       ssl_msg="rustls"
+       test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+       ],
+       AC_MSG_ERROR([--with-rustls was specified but could not find rustls.]),
+       -lpthread -ldl)
+    fi
+
+    if test "x$USE_RUSTLS" = "xyes"; then
+      AC_MSG_NOTICE([detected rustls])
+      check_for_ca_bundle=1
+
+      LIBS="-lcrustls -lpthread -ldl $LIBS"
+
+      if test -n "$rustlslib"; then
+        dnl when shared libs were found in a path that the run-time
+        dnl linker doesn't search through, we need to add it to
+        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
+        dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$rustlslib"
+          export CURL_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $rustlslib to CURL_LIBRARY_PATH])
+        fi
+      fi
+    fi
+
+  fi dnl rustls not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+])
diff --git a/m4/curl-schannel.m4 b/m4/curl-schannel.m4
new file mode 100644
index 0000000..7ffe8dd
--- /dev/null
+++ b/m4/curl-schannel.m4
@@ -0,0 +1,46 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_SCHANNEL], [
+AC_MSG_CHECKING([whether to enable Windows native SSL/TLS])
+if test "x$OPT_SCHANNEL" != xno; then
+  ssl_msg=
+  if test "x$OPT_SCHANNEL" != "xno"  &&
+     test "x$curl_cv_native_windows" = "xyes"; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
+    AC_SUBST(USE_SCHANNEL, [1])
+    ssl_msg="Schannel"
+    test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+    SCHANNEL_ENABLED=1
+    # --with-schannel implies --enable-sspi
+    AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
+    AC_SUBST(USE_WINDOWS_SSPI, [1])
+    curl_sspi_msg="enabled"
+  else
+    AC_MSG_RESULT(no)
+  fi
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+else
+  AC_MSG_RESULT(no)
+fi
+])
diff --git a/m4/curl-sectransp.m4 b/m4/curl-sectransp.m4
new file mode 100644
index 0000000..658df95
--- /dev/null
+++ b/m4/curl-sectransp.m4
@@ -0,0 +1,43 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_SECURETRANSPORT], [
+AC_MSG_CHECKING([whether to enable Secure Transport])
+if test "x$OPT_SECURETRANSPORT" != xno; then
+  if test "x$OPT_SECURETRANSPORT" != "xno" &&
+     (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(USE_SECTRANSP, 1, [enable Secure Transport])
+    AC_SUBST(USE_SECTRANSP, [1])
+    ssl_msg="Secure Transport"
+    test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+    SECURETRANSPORT_ENABLED=1
+    LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
+  else
+    AC_MSG_RESULT(no)
+  fi
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+else
+  AC_MSG_RESULT(no)
+fi
+
+])
diff --git a/m4/curl-sysconfig.m4 b/m4/curl-sysconfig.m4
new file mode 100644
index 0000000..0af96ba
--- /dev/null
+++ b/m4/curl-sysconfig.m4
@@ -0,0 +1,52 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_DARWIN_SYSTEMCONFIGURATION], [
+AC_MSG_CHECKING([whether to link macOS CoreFoundation and SystemConfiguration framework])
+case $host_os in
+  darwin*)
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+#include <TargetConditionals.h>
+      ]],[[
+#if (TARGET_OS_OSX)
+      return 0;
+#else
+#error Not a macOS
+#endif
+      ]])
+    ],[
+      build_for_macos="yes"
+    ],[
+      build_for_macos="no"
+    ])
+    if test "x$build_for_macos" != xno; then
+      AC_MSG_RESULT(yes)
+      LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
+    else
+      AC_MSG_RESULT(no)
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT(no)
+esac
+])
diff --git a/m4/curl-wolfssl.m4 b/m4/curl-wolfssl.m4
new file mode 100644
index 0000000..b3e4b95
--- /dev/null
+++ b/m4/curl-wolfssl.m4
@@ -0,0 +1,175 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+AC_DEFUN([CURL_WITH_WOLFSSL], [
+dnl ----------------------------------------------------
+dnl check for wolfSSL
+dnl ----------------------------------------------------
+
+case "$OPT_WOLFSSL" in
+  yes|no)
+    wolfpkg=""
+    ;;
+  *)
+    wolfpkg="$withval/lib/pkgconfig"
+    ;;
+esac
+
+if test "x$OPT_WOLFSSL" != xno; then
+  _cppflags=$CPPFLAGS
+  _ldflags=$LDFLAGS
+
+  ssl_msg=
+
+  if test X"$OPT_WOLFSSL" != Xno; then
+
+    if test "$OPT_WOLFSSL" = "yes"; then
+      OPT_WOLFSSL=""
+    fi
+
+    dnl try pkg-config magic
+    CURL_CHECK_PKGCONFIG(wolfssl, [$wolfpkg])
+    AC_MSG_NOTICE([Check dir $wolfpkg])
+
+    addld=""
+    addlib=""
+    addcflags=""
+    if test "$PKGCONFIG" != "no" ; then
+      addlib=`CURL_EXPORT_PCDIR([$wolfpkg])
+        $PKGCONFIG --libs-only-l wolfssl`
+      addld=`CURL_EXPORT_PCDIR([$wolfpkg])
+        $PKGCONFIG --libs-only-L wolfssl`
+      addcflags=`CURL_EXPORT_PCDIR([$wolfpkg])
+        $PKGCONFIG --cflags-only-I wolfssl`
+      version=`CURL_EXPORT_PCDIR([$wolfpkg])
+        $PKGCONFIG --modversion wolfssl`
+      wolfssllibpath=`echo $addld | $SED -e 's/^-L//'`
+    else
+      addlib=-lwolfssl
+      dnl use system defaults if user does not supply a path
+      if test -n "$OPT_WOLFSSL"; then
+        addld=-L$OPT_WOLFSSL/lib$libsuff
+        addcflags=-I$OPT_WOLFSSL/include
+        wolfssllibpath=$OPT_WOLFSSL/lib$libsuff
+      fi
+    fi
+
+    if test "x$USE_WOLFSSL" != "xyes"; then
+
+      LDFLAGS="$LDFLAGS $addld"
+      AC_MSG_NOTICE([Add $addld to LDFLAGS])
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+         AC_MSG_NOTICE([Add $addcflags to CPPFLAGS])
+      fi
+
+      my_ac_save_LIBS="$LIBS"
+      LIBS="$addlib $LIBS"
+      AC_MSG_NOTICE([Add $addlib to LIBS])
+
+      AC_MSG_CHECKING([for wolfSSL_Init in -lwolfssl])
+      AC_LINK_IFELSE([
+	AC_LANG_PROGRAM([[
+/* These aren't needed for detection and confuse WolfSSL.
+   They are set up properly later if it is detected.  */
+#undef SIZEOF_LONG
+#undef SIZEOF_LONG_LONG
+#include <wolfssl/ssl.h>
+	]],[[
+	  return wolfSSL_Init();
+	]])
+      ],[
+         AC_MSG_RESULT(yes)
+         AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled])
+         AC_SUBST(USE_WOLFSSL, [1])
+         WOLFSSL_ENABLED=1
+         USE_WOLFSSL="yes"
+         ssl_msg="WolfSSL"
+	 test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+       ],
+       [
+         AC_MSG_RESULT(no)
+         CPPFLAGS=$_cppflags
+         LDFLAGS=$_ldflags
+         wolfssllibpath=""
+       ])
+      LIBS="$my_ac_save_LIBS"
+    fi
+
+    if test "x$USE_WOLFSSL" = "xyes"; then
+      AC_MSG_NOTICE([detected wolfSSL])
+      check_for_ca_bundle=1
+
+      dnl wolfssl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
+      AX_COMPILE_CHECK_SIZEOF(long long)
+
+      LIBS="$addlib -lm $LIBS"
+
+      dnl WolfSSL needs configure --enable-opensslextra to have *get_peer*
+      dnl DES* is needed for NTLM support and lives in the OpenSSL compatibility
+      dnl layer
+      AC_CHECK_FUNCS(wolfSSL_get_peer_certificate \
+                     wolfSSL_UseALPN )
+
+      dnl if this symbol is present, we want the include path to include the
+      dnl OpenSSL API root as well
+      AC_CHECK_FUNC(wolfSSL_DES_ecb_encrypt,
+        [
+            AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1,
+                      [if you have wolfSSL_DES_ecb_encrypt])
+            if test -n "$addcflags"; then
+              dnl use a for loop to strip off whitespace
+              for f in $addcflags; do
+                CPPFLAGS="$f/wolfssl $CPPFLAGS"
+                AC_MSG_NOTICE([Add $f/wolfssl to CPPFLAGS])
+                break
+              done
+            else
+              dnl user didn't give a path, so guess/hope they installed wolfssl
+              dnl headers to system default location
+              CPPFLAGS="-I/usr/include/wolfssl $CPPFLAGS"
+              AC_MSG_NOTICE([Add /usr/include/wolfssl to CPPFLAGS])
+            fi
+            WOLFSSL_NTLM=1
+        ]
+        )
+
+      if test -n "$wolfssllibpath"; then
+        dnl when shared libs were found in a path that the run-time
+        dnl linker doesn't search through, we need to add it to
+        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
+        dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath"
+          export CURL_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH])
+        fi
+      fi
+
+    fi
+
+  fi dnl wolfSSL not disabled
+
+  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
+fi
+
+])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a6d21ae..c4c0294 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1071,11 +1071,11 @@
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+	10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
 	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
 	10.[[012]][[,.]]*)
 	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
-	10.*)
+	10.*|11.*)
 	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
diff --git a/maketgz b/maketgz
index 55a57c1..2f97f18 100755
--- a/maketgz
+++ b/maketgz
@@ -9,11 +9,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/DOS/README b/packages/DOS/README
index 5278f2c..cc9da37 100644
--- a/packages/DOS/README
+++ b/packages/DOS/README
@@ -1,7 +1,9 @@
 Gisle Vanem made curl build fine on DOS (and MingW) with djgpp, OpenSSL and his
 Watt-32 stack.
 
-'make djgpp' in the root curl dir should build it fine.
+'make -f Makefile.dist djgpp' in the root curl dir should build it fine.
+Or enter 'lib' and do a 'make -f Makefile.dj clean all' to first delete
+'lib/curl_config.h' which is possibly from a previous incompatible Windows-build.
 
 Note 1: djgpp 2.04 beta has a sscanf() bug so the URL parsing isn't
         done properly. Use djgpp 2.03 until they fix it.
@@ -9,3 +11,7 @@
 Note 2: Compile Watt-32 (and OpenSSL) with the same version of djgpp.
         Otherwise things go wrong because things like FS-extensions and
         errnos have been changed between releases.
+        
+Note 3: Several 'USE_x' variables in 'common.dj' are on the 'USE_x ?= 0'
+        form (conditional variable assignment). So one can build like this:
+          c:\curl\lib> make -f makefile.dj USE_OPENSSL=1 USE_ZLIB=1 clean all
diff --git a/packages/DOS/common.dj b/packages/DOS/common.dj
index b0e15d6..dea4f3e 100644
--- a/packages/DOS/common.dj
+++ b/packages/DOS/common.dj
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -24,12 +24,10 @@
 #
 # Assumes you've unpacked curl with long-file names
 # I.e use "set LFN=y" before untaring on Win9x/XP.
-# Requires sed, yacc, rm and the usual stuff.
+# Requires sed, rm and the usual stuff.
 #
 # Define TOPDIR before including this file.
 
-.SUFFIXES: .exe .y
-
 MAKEFILE = Makefile.dj
 OBJ_DIR = djgpp
 
@@ -61,42 +59,62 @@
   DS     = \$(NOTHING)
 endif
 
+ifeq ($(OS),Windows_NT)
+  #
+  # Windows hosted djgpp cross compiler. Get it from:
+  #   https://github.com/andrewwutw/build-djgpp/releases
+  #
+  DJ_PREFIX ?= c:/some-path/djgpp/bin/i586-pc-msdosdjgpp-
+  CC = $(DJ_PREFIX)gcc
+
+else
+  #
+  # The normal djgpp 'gcc' for MSDOS.
+  #
+  CC = gcc
+endif
+
 #
 # OpenSSL is available from www.openssl.org and builds okay
 # with djgpp/Watt-32. Set to 0 if you don't need https URLs
 # (reduces curl.exe with approx 700 kB)
 #
-USE_SSL = 0
+USE_OPENSSL ?= 0
 
 #
-# Use zlib for contents encoding
+# Use zlib for contents encoding. Needed for 'USE_OPENSSL=1' too.
 #
-USE_ZLIB = 0
+USE_ZLIB ?= 0
 
 #
 # Use libidn for international domain names
 #
-USE_IDNA = 0
+USE_IDNA ?= 0
 
 #
 # Use Watt-32 IPv6 stack (only IPv6 name resolution working at the moment)
 #
-USE_IPV6 = 0
+USE_IPV6 ?= 0
 
 #
 # Use C-Ares resolver library
 #
-USE_ARES = 0
+USE_ARES ?= 0
 
 #
 # Enable debug code in libcurl/curl
 #
-USE_DEBUG = 0
+USE_DEBUG ?= 0
 
 #
 # Enable memory tracking code in libcurl/curl
 #
-USE_CURLDEBUG = 0
+USE_CURLDEBUG ?= 0
+
+#
+# Generate a .map file in 'link_EXE' macro
+#
+MAKE_MAP_FILE ?= 0
 
 default: all
 
@@ -104,20 +122,40 @@
 # Root directory for Waterloo tcp/ip etc. Change to suite.
 # WATT_ROOT should be set during Watt-32 install.
 #
-WATT32_ROOT  = $(subst \,/,$(WATT_ROOT))
-OPENSSL_ROOT = e:/net/openssl.099
-ZLIB_ROOT    = $(DJDIR)/contrib/zlib
-LIBIDN_ROOT  = $(TOPDIR)/../IDN/libidn
-ARES_ROOT    = $(TOPDIR)/ares
-
-CC   = gcc
-YACC = bison -y
+WATT32_ROOT   = $(realpath $(WATT_ROOT))
+OPENSSL_ROOT ?= $(TOPDIR)/../crypto/OpenSSL
+ZLIB_ROOT    ?= e:/djgpp/contrib/zlib
+LIBIDN_ROOT  ?= $(TOPDIR)/../IDN/libidn
+ARES_ROOT    ?= $(TOPDIR)/../DNS/c-ares
 
 CFLAGS = -g -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
          -I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H
 
-ifeq ($(USE_SSL),1)
-  CFLAGS += -DUSE_OPENSSL -I$(OPENSSL_ROOT)
+ifeq ($(USE_OPENSSL),1)
+  CFLAGS += -DUSE_OPENSSL -I$(OPENSSL_ROOT)/include
+
+  #
+  # Squelch the warnings on deprecated functions.
+  #
+  CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED
+
+  #
+  # Use some of these too?
+  #
+  # CFLAGS += -DUSE_TLS_SRP=1                    \
+  #           -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES \
+  #           -DHAVE_OPENSSL_PKCS12_H            \
+  #           -DHAVE_SSLV2_CLIENT_METHOD         \
+  #           -DOPENSSL_NO_DEPRECATED
+
+  #
+  # 'libcomm.a' is normally 'libcommon.a'. But to keep it 8+3 clean, it's
+  # shortened to 'libcomm.a'. The official OpenSSL build was recently changed
+  # and this "Common" library was added for several of the Crypto Providers.
+  #
+  OPENSSL_LIBS = $(OPENSSL_ROOT)/lib/libssl.a   \
+                 $(OPENSSL_ROOT)/lib/libcrypt.a \
+                 $(OPENSSL_ROOT)/lib/libcomm.a
 endif
 
 ifeq ($(USE_ZLIB),1)
@@ -129,7 +167,7 @@
 endif
 
 ifeq ($(USE_ARES),1)
-  CFLAGS += -DUSE_ARES -I$(ARES_ROOT)
+  CFLAGS += -DUSE_ARES -I$(ARES_ROOT)/include
 endif
 
 ifeq ($(USE_IDNA),1)
@@ -152,6 +190,34 @@
 	$(CC) $(CFLAGS) -o $@ -c $<
 	@echo
 
+#
+# Link-EXE macro:
+#   $(1): the .exe
+#   $(2): the .o-files and libraries
+#
+ifeq ($(MAKE_MAP_FILE),1)
+  define link_EXE
+    $(CC) -o $(1) $(LDFLAGS) -Wl,--print-map,--sort-common $(2) > $(1:.exe=.map)
+  endef
+else
+  define link_EXE
+    $(CC) $(LDFLAGS) -o $(1) $(2)
+  endef
+endif
+
+$(TOPDIR)/docs/curl.1: $(wildcard $(TOPDIR)/docs/cmdline-opts/*.d)
+	cd $(TOPDIR)/docs/cmdline-opts; \
+	perl gen.pl mainpage > ../$(TOPDIR)/docs/curl.1
+
+DEP_REPLACE = sed -e 's@\(.*\)\.o: @\n$$(OBJ_DIR)\/\1.o: @' \
+                  -e 's@$(ARES_ROOT)@$$(ARES_ROOT)@g'       \
+                  -e 's@$(OPENSSL_ROOT)@$$(OPENSSL_ROOT)@g' \
+                  -e 's@$(WATT32_ROOT)@$$(WATT32_ROOT)@g'   \
+                  -e 's@$(ZLIB_ROOT)@$$(ZLIB_ROOT)@g'
+
+#
+# One may have to do 'make -f Makefile.dj clean' first in case
+# a foreign 'curl_config.h' is making trouble.
+#
 depend: $(DEPEND_PREREQ) $(MAKEFILE)
-	$(CC) -MM $(CFLAGS) $(CSOURCES) | \
-	sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj
+	$(CC) -MM $(CFLAGS) $(CSOURCES) | $(DEP_REPLACE) > depend.dj
diff --git a/packages/Makefile.am b/packages/Makefile.am
index 0fc5856..56b1ae4 100644
--- a/packages/Makefile.am
+++ b/packages/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -41,3 +41,11 @@
   TPF/maketpf.env_curl \
   TPF/maketpf.env_curllib \
   Android/Android.mk
+
+CHECKSRC = $(CS_$(V))
+CS_0 = @echo "  RUN     " $@;
+CS_1 =
+CS_ = $(CS_0)
+
+checksrc:
+	$(CHECKSRC)(@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(srcdir) $(srcdir)/OS400/*.[ch])
diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400
index 95a5584..d3ad901 100644
--- a/packages/OS400/README.OS400
+++ b/packages/OS400/README.OS400
@@ -27,8 +27,8 @@
   To support all the different variants of EBCDIC, non-standard wrapper
 procedures have been added to libcurl on OS/400: they provide an additional
 CCSID (numeric Coded Character Set ID specific to OS/400) parameter for each
-string argument. String values passed to callback procedures are NOT converted,
-so text gathered this way is (probably !) ASCII.
+string argument. Callback procedures arguments giving access to strings are
+NOT converted, so text gathered this way is (probably !) ASCII.
 
   Another OS/400 problem comes from the fact that the last fixed argument of a
 vararg procedure may not be of type char, unsigned char, short or unsigned
@@ -65,6 +65,7 @@
 options:
         CURLOPT_ABSTRACT_UNIX_SOCKET
         CURLOPT_ALTSVC
+        CURLOPT_AWS_SIGV4
         CURLOPT_CAINFO
         CURLOPT_CAPATH
         CURLOPT_COOKIE
@@ -82,6 +83,7 @@
         CURLOPT_FTPPORT
         CURLOPT_FTP_ACCOUNT
         CURLOPT_FTP_ALTERNATIVE_TO_USER
+        CURLOPT_HSTS
         CURLOPT_INTERFACE
         CURLOPT_ISSUERCERT
         CURLOPT_KEYPASSWD
@@ -172,12 +174,13 @@
 
 _ curl_easy_getinfo_ccsid()
   The following options are followed by a 'char * *' and a CCSID. Unlike
-curl_easy_getinfo(), the value returned in the pointer should be freed after
-use:
+curl_easy_getinfo(), the value returned in the pointer should be released with
+curl_free() after use:
         CURLINFO_EFFECTIVE_URL
         CURLINFO_CONTENT_TYPE
         CURLINFO_FTP_ENTRY_PATH
         CURLINFO_REDIRECT_URL
+        CURLINFO_REFERER
         CURLINFO_PRIMARY_IP
         CURLINFO_RTSP_SESSION_ID
         CURLINFO_LOCAL_IP
@@ -188,17 +191,23 @@
         CURLINFO_COOKIELIST
 Lists returned should be released with curl_slist_free_all() after use.
   Option CURLINFO_CERTINFO is followed by a struct curl_certinfo * * and a
-CCSID. Returned structures should be free'ed using curl_certinfo_free_all()
+CCSID. Returned structures should be freed with curl_certinfo_free_all()
 after use.
   Other options are processed like in curl_easy_getinfo().
 
 _ curl_pushheader_bynum_cssid() and curl_pushheader_byname_ccsid()
   Although the prototypes are self-explanatory, the returned string pointer
-should be freed after use, as opposite to the non-ccsid versions of these
-procedures.
+should be released with curl_free() after use, as opposite to the non-ccsid
+versions of these procedures.
   Please note that HTTP2 is not (yet) implemented on OS/400, thus these
 functions will always return NULL.
 
+_ curl_easy_option_by_name_ccsid() returns a pointer to an untranslated option
+metadata structure. As each curl_easyoption structure holds the option name in
+ASCII, the curl_easy_option_get_name_ccsid() function allows getting it in any
+supported ccsid. However the caller should release the returned pointer with
+curl_free() after use.
+
 
   Standard compilation environment does support neither autotools nor make;
 in fact, very few common utilities are available. As a consequence, the
diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c
index 4e04927..4b30683 100644
--- a/packages/OS400/ccsidcurl.c
+++ b/packages/OS400/ccsidcurl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -26,6 +26,7 @@
 #include <iconv.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stddef.h>
 #include <errno.h>
 #include <stdarg.h>
 
@@ -57,7 +58,6 @@
 
 static void
 makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid)
-
 {
   /**
   *** Convert a CCSID to the corresponding IBM iconv_open() character
@@ -79,8 +79,7 @@
 
 static iconv_t
 iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin,
-                                                        unsigned int cstr)
-
+                 unsigned int cstr)
 {
   char fromcode[ICONV_ID_SIZE];
   char tocode[ICONV_ID_SIZE];
@@ -106,7 +105,6 @@
 static int
 convert(char *d, size_t dlen, int dccsid,
         const char *s, int slen, int sccsid)
-
 {
   int i;
   iconv_t cd;
@@ -160,9 +158,7 @@
 }
 
 
-static char *
-dynconvert(int dccsid, const char *s, int slen, int sccsid)
-
+static char *dynconvert(int dccsid, const char *s, int slen, int sccsid)
 {
   char *d;
   char *cp;
@@ -214,7 +210,6 @@
 
 static struct curl_slist *
 slist_convert(int dccsid, struct curl_slist *from, int sccsid)
-
 {
   struct curl_slist *to = (struct curl_slist *) NULL;
 
@@ -238,9 +233,7 @@
 }
 
 
-char *
-curl_version_ccsid(unsigned int ccsid)
-
+char *curl_version_ccsid(unsigned int ccsid)
 {
   int i;
   char *aversion;
@@ -268,7 +261,6 @@
 char *
 curl_easy_escape_ccsid(CURL *handle, const char *string, int length,
                        unsigned int sccsid, unsigned int dccsid)
-
 {
   char *s;
   char *d;
@@ -299,7 +291,6 @@
 curl_easy_unescape_ccsid(CURL *handle, const char *string, int length,
                          int *outlength,
                          unsigned int sccsid, unsigned int dccsid)
-
 {
   char *s;
   char *d;
@@ -333,7 +324,6 @@
 struct curl_slist *
 curl_slist_append_ccsid(struct curl_slist *list,
                         const char *data, unsigned int ccsid)
-
 {
   char *s;
 
@@ -354,8 +344,7 @@
 
 
 time_t
-curl_getdate_ccsid(const char *p, const time_t * unused, unsigned int ccsid)
-
+curl_getdate_ccsid(const char *p, const time_t *unused, unsigned int ccsid)
 {
   char *s;
   time_t t;
@@ -375,9 +364,8 @@
 
 
 static int
-convert_version_info_string(const char * * stringp,
-                            char * * bufp, int *left, unsigned int ccsid)
-
+convert_version_info_string(const char **stringp,
+                            char **bufp, int *left, unsigned int ccsid)
 {
   /* Helper for curl_version_info_ccsid(): convert a string if defined.
      Result is stored in the `*left'-byte buffer at `*bufp'.
@@ -401,19 +389,37 @@
 
 curl_version_info_data *
 curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
-
 {
-  curl_version_info_data * p;
+  curl_version_info_data *p;
   char *cp;
   int n;
   int nproto;
-  curl_version_info_data * id;
+  curl_version_info_data *id;
+  int i;
+  const char **cpp;
+  static const size_t charfields[] = {
+    offsetof(curl_version_info_data, version),
+    offsetof(curl_version_info_data, host),
+    offsetof(curl_version_info_data, ssl_version),
+    offsetof(curl_version_info_data, libz_version),
+    offsetof(curl_version_info_data, ares),
+    offsetof(curl_version_info_data, libidn),
+    offsetof(curl_version_info_data, libssh_version),
+    offsetof(curl_version_info_data, brotli_version),
+    offsetof(curl_version_info_data, nghttp2_version),
+    offsetof(curl_version_info_data, quic_version),
+    offsetof(curl_version_info_data, cainfo),
+    offsetof(curl_version_info_data, capath),
+    offsetof(curl_version_info_data, zstd_version),
+    offsetof(curl_version_info_data, hyper_version),
+    offsetof(curl_version_info_data, gsasl_version)
+  };
 
   /* The assertion below is possible, because although the second operand
      is an enum member, the first is a #define. In that case, the OS/400 C
      compiler seems to compare string values after substitution. */
 
-#if CURLVERSION_NOW != CURLVERSION_FOURTH
+#if CURLVERSION_NOW != CURLVERSION_TENTH
 #error curl_version_info_data structure has changed: upgrade this procedure.
 #endif
 
@@ -439,26 +445,11 @@
     n += nproto++;
     }
 
-  if(p->version)
-    n += strlen(p->version) + 1;
-
-  if(p->host)
-    n += strlen(p->host) + 1;
-
-  if(p->ssl_version)
-    n += strlen(p->ssl_version) + 1;
-
-  if(p->libz_version)
-    n += strlen(p->libz_version) + 1;
-
-  if(p->ares)
-    n += strlen(p->ares) + 1;
-
-  if(p->libidn)
-    n += strlen(p->libidn) + 1;
-
-  if(p->libssh_version)
-    n += strlen(p->libssh_version) + 1;
+  for(i = 0; i < sizeof(charfields) / sizeof(charfields[0]); i++) {
+    cpp = (const char **) ((char *) p + charfields[i]);
+    if(*cpp)
+      n += strlen(*cpp) + 1;
+  }
 
   /* Allocate thread space. */
 
@@ -490,28 +481,13 @@
       if(convert_version_info_string(((const char * *) id->protocols) + i,
                                       &cp, &n, ccsid))
         return (curl_version_info_data *) NULL;
-    }
+  }
 
-  if(convert_version_info_string(&id->version, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
-
-  if(convert_version_info_string(&id->host, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
-
-  if(convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
-
-  if(convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
-
-  if(convert_version_info_string(&id->ares, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
-
-  if(convert_version_info_string(&id->libidn, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
-
-  if(convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
-    return (curl_version_info_data *) NULL;
+  for(i = 0; i < sizeof(charfields) / sizeof(charfields[0]); i++) {
+    cpp = (const char **) ((char *) p + charfields[i]);
+    if (*cpp && convert_version_info_string(cpp, &cp, &n, ccsid))
+      return (curl_version_info_data *) NULL;
+  }
 
   return id;
 }
@@ -519,7 +495,6 @@
 
 const char *
 curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid)
-
 {
   int i;
   const char *s;
@@ -545,7 +520,6 @@
 
 const char *
 curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid)
-
 {
   int i;
   const char *s;
@@ -571,7 +545,6 @@
 
 const char *
 curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid)
-
 {
   int i;
   const char *s;
@@ -597,7 +570,6 @@
 
 void
 curl_certinfo_free_all(struct curl_certinfo *info)
-
 {
   /* Free all memory used by certificate info. */
   if(info) {
@@ -615,12 +587,11 @@
 
 CURLcode
 curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...)
-
 {
   va_list arg;
   void *paramp;
   CURLcode ret;
-  struct Curl_easy * data;
+  struct Curl_easy *data;
 
   /* WARNING: unlike curl_easy_getinfo(), the strings returned by this
      procedure have to be free'ed. */
@@ -716,7 +687,6 @@
 
 static int
 Curl_is_formadd_string(CURLformoption option)
-
 {
   switch(option) {
 
@@ -735,8 +705,7 @@
 
 
 static void
-Curl_formadd_release_local(struct curl_forms * forms, int nargs, int skip)
-
+Curl_formadd_release_local(struct curl_forms *forms, int nargs, int skip)
 {
   while(nargs--)
     if(nargs != skip)
@@ -749,9 +718,8 @@
 
 
 static int
-Curl_formadd_convert(struct curl_forms * forms,
+Curl_formadd_convert(struct curl_forms *forms,
                      int formx, int lengthx, unsigned int ccsid)
-
 {
   int l;
   char *cp;
@@ -793,16 +761,15 @@
 
 
 CURLFORMcode
-curl_formadd_ccsid(struct curl_httppost * * httppost,
-                   struct curl_httppost * * last_post, ...)
-
+curl_formadd_ccsid(struct curl_httppost **httppost,
+                   struct curl_httppost **last_post, ...)
 {
   va_list arg;
   CURLformoption option;
   CURLFORMcode result;
-  struct curl_forms * forms;
-  struct curl_forms * lforms;
-  struct curl_forms * tforms;
+  struct curl_forms *forms;
+  struct curl_forms *lforms;
+  struct curl_forms *tforms;
   unsigned int lformlen;
   const char *value;
   unsigned int ccsid;
@@ -1066,23 +1033,22 @@
 }
 
 
-typedef struct {
+struct cfcdata {
   curl_formget_callback append;
   void *                arg;
   unsigned int          ccsid;
-}   cfcdata;
+};
 
 
 static size_t
 Curl_formget_callback_ccsid(void *arg, const char *buf, size_t len)
-
 {
-  cfcdata * p;
+  struct cfcdata *p;
   char *b;
   int l;
   size_t ret;
 
-  p = (cfcdata *) arg;
+  p = (struct cfcdata *) arg;
 
   if((long) len <= 0)
     return (*p->append)(p->arg, buf, len);
@@ -1108,9 +1074,8 @@
 int
 curl_formget_ccsid(struct curl_httppost *form, void *arg,
                    curl_formget_callback append, unsigned int ccsid)
-
 {
-  cfcdata lcfc;
+  struct cfcdata lcfc;
 
   lcfc.append = append;
   lcfc.arg = arg;
@@ -1121,7 +1086,6 @@
 
 CURLcode
 curl_easy_setopt_ccsid(CURL *curl, CURLoption tag, ...)
-
 {
   CURLcode result;
   va_list arg;
@@ -1138,6 +1102,7 @@
 
   case CURLOPT_ABSTRACT_UNIX_SOCKET:
   case CURLOPT_ALTSVC:
+  case CURLOPT_AWS_SIGV4:
   case CURLOPT_CAINFO:
   case CURLOPT_CAPATH:
   case CURLOPT_COOKIE:
@@ -1157,6 +1122,7 @@
   case CURLOPT_FTPPORT:
   case CURLOPT_FTP_ACCOUNT:
   case CURLOPT_FTP_ALTERNATIVE_TO_USER:
+  case CURLOPT_HSTS:
   case CURLOPT_INTERFACE:
   case CURLOPT_ISSUERCERT:
   case CURLOPT_KEYPASSWD:
@@ -1208,6 +1174,7 @@
   case CURLOPT_SSLKEY:
   case CURLOPT_SSLKEYTYPE:
   case CURLOPT_SSL_CIPHER_LIST:
+  case CURLOPT_SSL_EC_CURVES:
   case CURLOPT_TLS13_CIPHERS:
   case CURLOPT_TLSAUTH_PASSWORD:
   case CURLOPT_TLSAUTH_TYPE:
@@ -1308,7 +1275,6 @@
 
 char *
 curl_form_long_value(long value)
-
 {
   /* ILE/RPG cannot cast an integer to a pointer. This procedure does it. */
 
@@ -1319,7 +1285,6 @@
 char *
 curl_pushheader_bynum_cssid(struct curl_pushheaders *h,
                             size_t num, unsigned int ccsid)
-
 {
   char *d = (char *) NULL;
   char *s = curl_pushheader_bynum(h, num);
@@ -1334,7 +1299,6 @@
 char *
 curl_pushheader_byname_ccsid(struct curl_pushheaders *h, const char *header,
                              unsigned int ccsidin, unsigned int ccsidout)
-
 {
   char *d = (char *) NULL;
 
@@ -1356,7 +1320,6 @@
 static CURLcode
 mime_string_call(curl_mimepart *part, const char *string, unsigned int ccsid,
                  CURLcode (*mimefunc)(curl_mimepart *part, const char *string))
-
 {
   char *s = (char *) NULL;
   CURLcode result;
@@ -1374,7 +1337,6 @@
 
 CURLcode
 curl_mime_name_ccsid(curl_mimepart *part, const char *name, unsigned int ccsid)
-
 {
   return mime_string_call(part, name, ccsid, curl_mime_name);
 }
@@ -1382,7 +1344,6 @@
 CURLcode
 curl_mime_filename_ccsid(curl_mimepart *part,
                          const char *filename, unsigned int ccsid)
-
 {
   return mime_string_call(part, filename, ccsid, curl_mime_filename);
 }
@@ -1390,7 +1351,6 @@
 CURLcode
 curl_mime_type_ccsid(curl_mimepart *part,
                      const char *mimetype, unsigned int ccsid)
-
 {
   return mime_string_call(part, mimetype, ccsid, curl_mime_type);
 }
@@ -1398,7 +1358,6 @@
 CURLcode
 curl_mime_encoder_ccsid(curl_mimepart *part,
                        const char *encoding, unsigned int ccsid)
-
 {
   return mime_string_call(part, encoding, ccsid, curl_mime_encoder);
 }
@@ -1406,7 +1365,6 @@
 CURLcode
 curl_mime_filedata_ccsid(curl_mimepart *part,
                          const char *filename, unsigned int ccsid)
-
 {
   return mime_string_call(part, filename, ccsid, curl_mime_filedata);
 }
@@ -1414,7 +1372,6 @@
 CURLcode
 curl_mime_data_ccsid(curl_mimepart *part,
                      const char *data, size_t datasize, unsigned int ccsid)
-
 {
   char *s = (char *) NULL;
   CURLcode result;
@@ -1433,7 +1390,6 @@
 CURLUcode
 curl_url_get_ccsid(CURLU *handle, CURLUPart what, char **part,
                    unsigned int flags, unsigned int ccsid)
-
 {
   char *s = (char *)NULL;
   CURLUcode result;
@@ -1458,7 +1414,6 @@
 CURLUcode
 curl_url_set_ccsid(CURLU *handle, CURLUPart what, const char *part,
                    unsigned int flags, unsigned int ccsid)
-
 {
   char *s = (char *)NULL;
   CURLUcode result;
@@ -1473,3 +1428,33 @@
     free(s);
   return result;
 }
+
+const struct curl_easyoption *
+curl_easy_option_by_name_ccsid(const char *name, unsigned int ccsid)
+{
+  const struct curl_easyoption *option = NULL;
+
+  if(name) {
+    char *s = dynconvert(ASCII_CCSID, name, -1, ccsid);
+
+    if(s) {
+      option = curl_easy_option_by_name(s);
+      free(s);
+    }
+  }
+
+  return option;
+}
+
+/* Return option name in the given ccsid. */
+const char *
+curl_easy_option_get_name_ccsid(const struct curl_easyoption *option,
+                                unsigned int ccsid)
+{
+  char *name = NULL;
+
+  if(option && option->name)
+    name = dynconvert(ccsid, option->name, -1, ASCII_CCSID);
+
+  return (const char *) name;
+}
diff --git a/packages/OS400/ccsidcurl.h b/packages/OS400/ccsidcurl.h
index 9594f66..959aaaa 100644
--- a/packages/OS400/ccsidcurl.h
+++ b/packages/OS400/ccsidcurl.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,37 +27,37 @@
 #include "multi.h"
 
 
-CURL_EXTERN char * curl_version_ccsid(unsigned int ccsid);
-CURL_EXTERN char * curl_easy_escape_ccsid(CURL * handle,
-                                          const char * string, int length,
-                                          unsigned int sccsid,
-                                          unsigned int dccsid);
-CURL_EXTERN char * curl_easy_unescape_ccsid(CURL * handle, const char * string,
-                                            int length, int * outlength,
-                                            unsigned int sccsid,
-                                            unsigned int dccsid);
-CURL_EXTERN struct curl_slist * curl_slist_append_ccsid(struct curl_slist * l,
-                                                        const char * data,
-                                                        unsigned int ccsid);
-CURL_EXTERN time_t curl_getdate_ccsid(const char * p, const time_t * unused,
+CURL_EXTERN char *curl_version_ccsid(unsigned int ccsid);
+CURL_EXTERN char *curl_easy_escape_ccsid(CURL *handle,
+                                         const char *string, int length,
+                                         unsigned int sccsid,
+                                         unsigned int dccsid);
+CURL_EXTERN char *curl_easy_unescape_ccsid(CURL *handle, const char *string,
+                                           int length, int *outlength,
+                                           unsigned int sccsid,
+                                           unsigned int dccsid);
+CURL_EXTERN struct curl_slist *curl_slist_append_ccsid(struct curl_slist *l,
+                                                       const char *data,
+                                                       unsigned int ccsid);
+CURL_EXTERN time_t curl_getdate_ccsid(const char *p, const time_t *unused,
                                       unsigned int ccsid);
-CURL_EXTERN curl_version_info_data * curl_version_info_ccsid(CURLversion stamp,
-                                                             unsigned int cid);
-CURL_EXTERN const char * curl_easy_strerror_ccsid(CURLcode error,
+CURL_EXTERN curl_version_info_data *curl_version_info_ccsid(CURLversion stamp,
+                                                            unsigned int cid);
+CURL_EXTERN const char *curl_easy_strerror_ccsid(CURLcode error,
+                                                 unsigned int ccsid);
+CURL_EXTERN const char *curl_share_strerror_ccsid(CURLSHcode error,
                                                   unsigned int ccsid);
-CURL_EXTERN const char * curl_share_strerror_ccsid(CURLSHcode error,
-                                                   unsigned int ccsid);
-CURL_EXTERN const char * curl_multi_strerror_ccsid(CURLMcode error,
-                                                   unsigned int ccsid);
-CURL_EXTERN CURLcode curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...);
-CURL_EXTERN CURLFORMcode curl_formadd_ccsid(struct curl_httppost * * httppost,
-                                            struct curl_httppost * * last_post,
+CURL_EXTERN const char *curl_multi_strerror_ccsid(CURLMcode error,
+                                                  unsigned int ccsid);
+CURL_EXTERN CURLcode curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...);
+CURL_EXTERN CURLFORMcode curl_formadd_ccsid(struct curl_httppost **httppost,
+                                            struct curl_httppost **last_post,
                                             ...);
-CURL_EXTERN char * curl_form_long_value(long value);
-CURL_EXTERN int curl_formget_ccsid(struct curl_httppost * form, void * arg,
+CURL_EXTERN char *curl_form_long_value(long value);
+CURL_EXTERN int curl_formget_ccsid(struct curl_httppost *form, void *arg,
                                    curl_formget_callback append,
                                    unsigned int ccsid);
-CURL_EXTERN CURLcode curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...);
+CURL_EXTERN CURLcode curl_easy_setopt_ccsid(CURL *curl, CURLoption tag, ...);
 CURL_EXTERN void curl_certinfo_free_all(struct curl_certinfo *info);
 CURL_EXTERN char *curl_pushheader_bynum_cssid(struct curl_pushheaders *h,
                                               size_t num, unsigned int ccsid);
@@ -89,5 +89,10 @@
 CURL_EXTERN CURLUcode curl_url_set_ccsid(CURLU *handle, CURLUPart what,
                                          const char *part, unsigned int flags,
                                          unsigned int ccsid);
+CURL_EXTERN const struct curl_easyoption *curl_easy_option_by_name_ccsid(
+                                         const char *name, unsigned int ccsid);
+CURL_EXTERN const char *curl_easy_option_get_name_ccsid(
+                                         const struct curl_easyoption *option,
+                                         unsigned int ccsid);
 
 #endif
diff --git a/packages/OS400/chkstrings.c b/packages/OS400/chkstrings.c
index 0832636..919a856 100644
--- a/packages/OS400/chkstrings.c
+++ b/packages/OS400/chkstrings.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -25,38 +25,38 @@
 #include "curl_setup.h"
 #include "urldata.h"
 
-/* The following defines indicate the expected dupstring enum values
- * in curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c. If a
- * mismatch is flagged during the build, it indicates that curl_easy_setopt_ccsid()
- * may need updating to perform data EBCDIC to ASCII data conversion on
- * the string.
+/* The following defines indicate the expected dupstring enum values in
+ * curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c. If a mismatch is
+ * flagged during the build, it indicates that curl_easy_setopt_ccsid() may
+ * need updating to perform data EBCDIC to ASCII data conversion on the
+ * string.
+ *
  * Once any applicable changes to curl_easy_setopt_ccsid() have been
  * made, the EXPECTED_STRING_LASTZEROTERMINATED/EXPECTED_STRING_LAST
  * values can be updated to match the latest enum values in urldata.h.
  */
-#define EXPECTED_STRING_LASTZEROTERMINATED  (STRING_DNS_LOCAL_IP6 + 1)
-#define EXPECTED_STRING_LAST                (STRING_COPYPOSTFIELDS + 1)
+#define EXPECTED_STRING_LASTZEROTERMINATED  (STRING_SSL_EC_CURVES + 1)
+#define EXPECTED_STRING_LAST                (STRING_AWS_SIGV4 + 1)
 
 int main(int argc, char *argv[])
 {
   int rc = 0;
 
-  if (STRING_LASTZEROTERMINATED != EXPECTED_STRING_LASTZEROTERMINATED)
-  {
-    fprintf(stderr,"STRING_LASTZEROTERMINATED(%d) is not expected value(%d).\n",
+  if(STRING_LASTZEROTERMINATED != EXPECTED_STRING_LASTZEROTERMINATED) {
+    fprintf(stderr,
+            "STRING_LASTZEROTERMINATED(%d) is not expected value(%d).\n",
             STRING_LASTZEROTERMINATED, EXPECTED_STRING_LASTZEROTERMINATED);
     rc += 1;
   }
-  if (STRING_LAST != EXPECTED_STRING_LAST)
-  {
-    fprintf(stderr,"STRING_LAST(%d) is not expected value(%d).\n",
+  if(STRING_LAST != EXPECTED_STRING_LAST) {
+    fprintf(stderr, "STRING_LAST(%d) is not expected value(%d).\n",
             STRING_LAST, EXPECTED_STRING_LAST);
     rc += 2;
   }
-  if (rc != 0)
-  {
-    fprintf(stderr,"curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c"
-            " may need updating if new strings are provided as input via the curl API.\n");
+  if(rc) {
+    fprintf(stderr, "curl_easy_setopt_ccsid() in packages/OS400/ccsidcurl.c"
+            " may need updating if new strings are provided as"
+            " input via the curl API.\n");
   }
   return rc;
 }
diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in
index 33ac8b3..018caba 100644
--- a/packages/OS400/curl.inc.in
+++ b/packages/OS400/curl.inc.in
@@ -5,11 +5,11 @@
       *                            | (__| |_| |  _ <| |___
       *                             \___|\___/|_| \_\_____|
       *
-      * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+      * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
       *
       * This software is licensed as described in the file COPYING, which
       * you should have received as part of this distribution. The terms
-      * are also available at https://curl.haxx.se/docs/copyright.html.
+      * are also available at https://curl.se/docs/copyright.html.
       *
       * You may opt to use, copy, modify, merge, publish, distribute and/or sell
       * copies of the Software, and permit persons to whom the Software is
@@ -140,8 +140,14 @@
      d                 c                   X'01000000'
      d CURL_VERSION_HTTP3...
      d                 c                   X'02000000'
-     d CURL_VERSION_UNICODE...
+     d CURL_VERSION_ZSTD...
      d                 c                   X'04000000'
+     d CURL_VERSION_UNICODE...
+     d                 c                   X'08000000'
+     d CURL_VERSION_HSTS...
+     d                 c                   X'10000000'
+     d CURL_VERSION_GSASL...
+     d                 c                   X'20000000'
       *
      d CURL_HTTPPOST_FILENAME...
      d                 c                   X'00000001'
@@ -193,6 +199,8 @@
      d                 c                   X'00000020'
      d CURLAUTH_BEARER...
      d                 c                   X'00000040'
+     d CURLAUTH_AWS_SIGV4...
+     d                 c                   X'00000080'
      d CURLAUTH_ONLY...
      d                 c                   X'80000000'
      d CURLAUTH_ANY    c                   X'7FFFFFEF'
@@ -228,14 +236,22 @@
       *
      d CURLOPTTYPE_LONG...
      d                 c                   0
+     d CURLOPTTYPE_VALUES...
+     d                 c                   0
      d CURLOPTTYPE_OBJECTPOINT...
      d                 c                   10000
      d CURLOPTTYPE_STRINGPOINT...
      d                 c                   10000
+     d CURLOPTTYPE_SLISTPOINT...
+     d                 c                   10000
+     d CURLOPTTYPE_CBPOINT...
+     d                 c                   10000
      d CURLOPTTYPE_FUNCTIONPOINT...
      d                 c                   20000
      d CURLOPTTYPE_OFF_T...
      d                 c                   30000
+     d CURLOPTTYPE_BLOB...
+     d                 c                   40000
       *
      d CURL_IPRESOLVE_WHATEVER...
      d                 c                   0
@@ -402,6 +418,11 @@
      d                 c                   X'00000100'
      d CURLU_GUESS_SCHEME...
      d                 c                   X'00000200'
+     d CURLU_NO_AUTHORITY...
+     d                 c                   X'00000400'
+      *
+     d CURLOT_FLAG_ALIAS...
+     d                 c                   X'00000001'
       *
       **************************************************************************
       *                                Types
@@ -429,8 +450,6 @@
      d                 c                   7
      d  CURLE_WEIRD_SERVER_REPLY...
      d                 c                   8
-     d  CURLE_FTP_WEIRD_SERVER_REPLY...
-     d                 c                   8
      d  CURLE_REMOTE_ACCESS_DENIED...
      d                 c                   9
      d  CURLE_FTP_ACCEPT_FAILED...
@@ -606,10 +625,14 @@
      d                 c                   95
      d  CURLE_QUIC_CONNECT_ERROR...
      d                 c                   96
+     d  CURLE_PROXY...
+     d                 c                   97
       *
       /if not defined(CURL_NO_OLDIES)
      d  CURLE_URL_MALFORMAT_USER...
      d                 c                   4
+     d  CURLE_FTP_WEIRD_SERVER_REPLY...
+     d                 c                   8
      d  CURLE_FTP_ACCESS_DENIED...
      d                 c                   9
      d  CURLE_FTP_USER_PASSWORD_INCORRECT...
@@ -654,12 +677,12 @@
      d                 c                   48
      d  CURLE_OBSOLETE...
      d                 c                   50
-     d  CURLE_SSL_PEER_CERTIFICATE...
-     d                 c                   51
      d  CURLE_SHARE_IN_USE...
      d                 c                   57
      d  CURLE_SSL_CACERT...
      d                 c                   60
+     d  CURLE_SSL_PEER_CERTIFICATE...
+     d                 c                   60
      d  CURLE_FTP_SSL_FAILED...
      d                 c                   64
      d  CURLE_TFTP_DISKFULL...
@@ -670,6 +693,75 @@
      d                 c                   99999
       /endif
       *
+     d CURLproxycode   s             10i 0 based(######ptr######)               Enum
+     d  CURLPX_OK      c                   0
+     d  CURLPX_BAD_ADDRESS_TYPE...
+     d                 c                   1
+     d  CURLPX_BAD_VERSION...
+     d                 c                   2
+     d  CURLPX_CLOSED...
+     d                 c                   3
+     d  CURLPX_GSSAPI...
+     d                 c                   4
+     d  CURLPX_GSSAPI_PERMSG...
+     d                 c                   5
+     d  CURLPX_GSSAPI_PROTECTION...
+     d                 c                   6
+     d  CURLPX_IDENTD...
+     d                 c                   7
+     d  CURLPX_IDENTD_DIFFER...
+     d                 c                   8
+     d  CURLPX_LONG_HOSTNAME...
+     d                 c                   9
+     d  CURLPX_LONG_PASSWD...
+     d                 c                   10
+     d  CURLPX_LONG_USER...
+     d                 c                   11
+     d  CURLPX_NO_AUTH...
+     d                 c                   12
+     d  CURLPX_RECV_ADDRESS...
+     d                 c                   13
+     d  CURLPX_RECV_AUTH...
+     d                 c                   14
+     d  CURLPX_RECV_CONNECT...
+     d                 c                   15
+     d  CURLPX_RECV_REQACK...
+     d                 c                   16
+     d  CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED...
+     d                 c                   17
+     d  CURLPX_REPLY_COMMAND_NOT_SUPPORTED...
+     d                 c                   18
+     d  CURLPX_REPLY_CONNECTION_REFUSED...
+     d                 c                   10
+     d  CURLPX_REPLY_GENERAL_SERVER_FAILURE...
+     d                 c                   20
+     d  CURLPX_REPLY_HOST_UNREACHABLE...
+     d                 c                   21
+     d  CURLPX_REPLY_NETWORK_UNREACHABLE...
+     d                 c                   22
+     d  CURLPX_REPLY_NOT_ALLOWED...
+     d                 c                   23
+     d  CURLPX_REPLY_TTL_EXPIRED...
+     d                 c                   24
+     d  CURLPX_REPLY_UNASSIGNED...
+     d                 c                   25
+     d  CURLPX_REQUEST_FAILED...
+     d                 c                   26
+     d  CURLPX_RESOLVE_HOST...
+     d                 c                   27
+     d  CURLPX_SEND_AUTH...
+     d                 c                   28
+     d  CURLPX_SEND_CONNECT...
+     d                 c                   29
+     d  CURLPX_SEND_REQUEST...
+     d                 c                   30
+     d  CURLPX_UNKNOWN_FAIL...
+     d                 c                   31
+     d  CURLPX_UNKNOWN_MODE...
+     d                 c                   32
+     d  CURLPX_USER_REJECTED...
+     d                 c                   33
+      *
      d curlioerr       s             10i 0 based(######ptr######)               Enum
      d  CURLIOE_OK     c                   0
      d  CURLIOE_UNKNOWNCMD...
@@ -743,8 +835,10 @@
      d                 c                   2
      d  CURLKHSTAT_DEFER...
      d                 c                   3
-     d  CURLKHSTAT_LAST...
+     d  CURLKHSTAT_FINE_REPLACE...
      d                 c                   4
+     d  CURLKHSTAT_LAST...
+     d                 c                   5
       *
      d curl_khmatch    s             10i 0 based(######ptr######)               Enum
      d  CURLKHMATCH_OK...
@@ -774,6 +868,10 @@
      d                 c                   X'0004'
      d CURLSSLOPT_REVOKE_BEST_EFFORT...
      d                 c                   X'0008'
+     d CURLSSLOPT_NATIVE_CA...
+     d                 c                   X'0010'
+     d CURLSSLOPT_AUTO_CLIENT_CERT...
+     d                 c                   X'0020'
       *
      d CURL_HET_DEFAULT...
      d                 c                   200
@@ -834,10 +932,6 @@
      d  CURLHEADER_SEPARATE...
      d                 c                   X'00000001'
       *
-     d  CURLALTSVC_IMMEDIATELY...
-     d                 c                   X'00000001'
-     d  CURLALTSVC_ALTUSED...
-     d                 c                   X'00000002'
      d  CURLALTSVC_READONLYFILE...
      d                 c                   X'00000004'
      d  CURLALTSVC_H1...
@@ -847,6 +941,11 @@
      d  CURLALTSVC_H3...
      d                 c                   X'00000020'
       *
+     d  CURLHSTS_ENABLE...
+     d                 c                   X'00000001'
+     d  CURLHSTS_READONLYFILE...
+     d                 c                   X'00000002'
+      *
      d  CURLPROTO_HTTP...
      d                 c                   X'00000001'
      d  CURLPROTO_HTTPS...
@@ -903,6 +1002,10 @@
      d                 c                   X'04000000'
      d  CURLPROTO_SMBS...
      d                 c                   X'08000000'
+     d  CURLPROTO_MQTT...
+     d                 c                   X'10000000'
+     d  CURLPROTO_GOPHERS...
+     d                 c                   X'20000000'
       *
      d CURLoption      s             10i 0 based(######ptr######)               Enum
      d  CURLOPT_WRITEDATA...
@@ -1101,6 +1204,8 @@
      d                 c                   00111
      d  CURLOPT_FTP_RESPONSE_TIMEOUT...
      d                 c                   00112
+     d  CURLOPT_SERVER_RESPONSE_TIMEOUT...                                      Alias
+     d                 c                   00112
      d  CURLOPT_IPRESOLVE...
      d                 c                   00113
      d  CURLOPT_MAXFILESIZE...
@@ -1436,6 +1541,48 @@
      d                 c                   00288
      d  CURLOPT_SASL_AUTHZID...
      d                 c                   10289
+     d  CURLOPT_MAIL_RCPT_ALLLOWFAILS...
+     d                 c                   00290
+     d  CURLOPT_SSLCERT_BLOB...
+     d                 c                   40291
+     d  CURLOPT_SSLKEY_BLOB...
+     d                 c                   40292
+     d  CURLOPT_PROXY_SSLCERT_BLOB...
+     d                 c                   40293
+     d  CURLOPT_PROXY_SSLKEY_BLOB...
+     d                 c                   40294
+     d  CURLOPT_ISSUERCERT_BLOB...
+     d                 c                   40295
+     d  CURLOPT_PROXY_ISSUERCERT...
+     d                 c                   10296
+     d  CURLOPT_PROXY_ISSUERCERT_BLOB...
+     d                 c                   40297
+     d  CURLOPT_SSL_EC_CURVES...
+     d                 c                   10298
+     d  CURLOPT_HSTS_CTRL...
+     d                 c                   00299
+     d  CURLOPT_HSTS...
+     d                 c                   10300
+     d  CURLOPT_HSTSREADFUNCTION...
+     d                 c                   20301
+     d  CURLOPT_HSTSREADDATA...
+     d                 c                   10302
+     d  CURLOPT_HSTSWRITEFUNCTION...
+     d                 c                   20303
+     d  CURLOPT_HSTSWRITEDATA...
+     d                 c                   10304
+     d  CURLOPT_AWS_SIG4...
+     d                 c                   10305
+     d  CURLOPT_DOH_SSL_VERIFYPEER...
+     d                 c                   00306
+     d  CURLOPT_DOH_SSL_VERIFYHOST...
+     d                 c                   00307
+     d  CURLOPT_DOH_SSL_VERIFYSTATUS...
+     d                 c                   00308
+     d  CURLOPT_CAINFO_BLOB...
+     d                 c                   40309
+     d  CURLOPT_PROXY_CAINFO_BLOB...
+     d                 c                   40310
       *
       /if not defined(CURL_NO_OLDIES)
      d  CURLOPT_FILE   c                   10001
@@ -1459,8 +1606,6 @@
      d                 c                   10063
      d  CURLOPT_ENCODING...
      d                 c                   10102
-     d  CURLOPT_SERVER_RESPONSE_TIMEOUT...
-     d                 c                   00112
      d  CURLOPT_FTP_SSL...
      d                 c                   00119
      d  CURLOPT_POST301...
@@ -1655,7 +1800,15 @@
      d  CURLINFO_REDIRECT_TIME_T...                                             CURLINFO_OFF_T  + 55
      d                 c                   X'00600037'
      d  CURLINFO_APPCONNECT_TIME_T...                                           CURLINFO_OFF_T  + 56
-     d                 c                   X'00600036'
+     d                 c                   X'00600038'
+     d  CURLINFO_RETRY_AFTER...                                                 CURLINFO_OFF_T  + 57
+     d                 c                   X'00600039'
+     d  CURLINFO_EFFECTIVE_METHOD...                                            CURLINFO_STRING + 58
+     d                 c                   X'0010003A'
+     d  CURLINFO_PROXY_ERROR...                                                 CURLINFO_LONG + 59
+     d                 c                   X'0020003B'
+     d  CURLINFO_REFERER...                                                     CURLINFO_STRING + 60
+     d                 c                   X'0010003C'
       *
      d  CURLINFO_HTTP_CODE...                                                   Old ...RESPONSE_CODE
      d                 c                   X'00200002'
@@ -1688,6 +1841,10 @@
      d                 c                   11
      d  CURLSSLBACKEND_MESALINK...
      d                 c                   12
+     d  CURLSSLBACKEND_BEARSSL...
+     d                 c                   13
+     d  CURLSSLBACKEND_RUSTLS...
+     d                 c                   14
       * Aliases for clones.
      d  CURLSSLBACKEND_LIBRESSL...
      d                 c                   1
@@ -1747,6 +1904,21 @@
      d  CURL_TIMECOND_LAST...
      d                 c                   3
       *
+     d curl_easytype   s             10i 0 based(######ptr######)               Enum
+     d  CURLOT_LONG    c                   0
+     d  CURLOT_VALUES...
+     d                 c                   1
+     d  CURLOT_OFF_T   c                   2
+     d  CURLOT_OBJECT...
+     d                 c                   3
+     d  CURLOT_STRING...
+     d                 c                   4
+     d  CURLOT_SLIST   c                   5
+     d  CURLOT_CBPTR   c                   6
+     d  CURLOT_BLOB    c                   7
+     d  CURLOT_FUNCTION...
+     d                 c                   8
+      *
      d CURLSHcode      s             10i 0 based(######ptr######)               Enum
      d  CURLSHE_OK     c                   0
      d  CURLSHE_BAD_OPTION...
@@ -1782,8 +1954,20 @@
      d                 c                   2
      d  CURLVERSION_FOURTH...
      d                 c                   3
+     d  CURLVERSION_FIFTH...
+     d                 c                   4
+     d  CURLVERSION_SIXTH...
+     d                 c                   5
+     d  CURLVERSION_SEVENTH...
+     d                 c                   6
+     d  CURLVERSION_EIGHTH...
+     d                 c                   7
+     d  CURLVERSION_NINTH...
+     d                 c                   8
+     d  CURLVERSION_TENTH...
+     d                 c                   9
      d  CURLVERSION_NOW...
-     d                 c                   3                                    CURLVERSION_FOURTH
+     d                 c                   9                                    CURLVERSION_TENTH
       *
      d curlsocktype    s             10i 0 based(######ptr######)               Enum
      d  CURLSOCKTYPE_IPCXN...
@@ -1958,6 +2142,14 @@
      d                 c                   8
      d  CURLUPART_FRAGMENT...
      d                 c                   9
+     d  CURLUPART_ZONEID...
+     d                 c                   10
+      *
+      *
+     d CURLSTScode     s             10i 0 based(######ptr######)               Enum
+     d  CURLSTS_OK     c                   0
+     d  CURLSTS_DONE   c                   1
+     d  CURLSTS_FAIL   c                   2
       *
       *  Renaming CURLMsg to CURL_Msg to avoid case-insensivity name clash.
       *
@@ -2054,6 +2246,28 @@
      d                               10i 0
      d  libssh_version...
      d                                 *                                        const char *
+     d  brotli_ver_num...
+     d                               10u 0
+     d  brotli_version...
+     d                                 *                                        const char *
+     d  nghttp2_ver_num...
+     d                               10u 0
+     d  nghttp2_version...
+     d                                 *                                        const char *
+     d  quic_version...
+     d                                 *                                        const char *
+     d  cainfo...
+     d                                 *                                        const char *
+     d  capath...
+     d                                 *                                        const char *
+     d  zstd_ver_num...
+     d                               10u 0
+     d  zstd_version...
+     d                                 *                                        const char *
+     d  hyper_version...
+     d                                 *                                        const char *
+     d  gsasl_version...
+     d                                 *                                        const char *
       *
      d curl_certinfo   ds                  based(######ptr######)
      d                                     qualified
@@ -2090,6 +2304,28 @@
      d  b_size                       10u 0                                      size_t
      d  b_used                       10u 0                                      size_t
       *
+     d curl_easyoption...
+     d                 ds                  based(######ptr######)
+     d                                     qualified
+     d  name                           *                                        const char *
+     d  id                                 like(CURLoption)
+     d  type                               like(curl_easytyoe)
+     d  flags                        10u 0
+      *
+     d curl_hstsentry...
+     d                 ds                  based(######ptr######)
+     d                                     qualified
+     d  name                           *                                        char *
+     d  namelen                      10u 0                                      size_t
+     d  includeSubDomain...
+     d                               10u 0                                      Bit field: 1
+     d  expire                       10
+      *
+     d curl_index      ds                  based(######ptr######)
+     d                                     qualified
+     d  index                        10u 0                                      size_t
+     d  total                        10u 0                                      size_t
+      *
      d curl_formget_callback...
      d                 s               *   based(######ptr######) procptr
       *
@@ -2177,6 +2413,12 @@
      d curl_resolver_start_callback...
      d                 s               *   based(######ptr######) procptr
       *
+     d curl_hstsread_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
+     d curl_hstswrite_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
       **************************************************************************
       *                              Prototypes
       **************************************************************************
@@ -2671,6 +2913,18 @@
      d  part                           *   value options(*string)
      d  flags                        10u 0 value
       *
+     d curl_easy_option_by_name...
+     d                 pr              *   extproc('curl_easy_option_by_name')  curl_easyoption *
+     d  name                           *   value option(*string)
+      *
+     d curl_easy_option_by_id...
+     d                 pr              *   extproc('curl_easy_option_by_id')    curl_easyoption *
+     d  id                                 value like(CURLoption)
+      *
+     d curl_easy_option_next...
+     d                 pr              *   extproc('curl_easy_next')            curl_easyoption *
+     d  prev                           *   value                                curl_easyoption *
+      *
       **************************************************************************
       *                CCSID wrapper procedure prototypes
       **************************************************************************
@@ -2845,4 +3099,16 @@
      d  flags                        10u 0 value
      d  ccsid                        10u 0 value
       *
+     d curl_easy_option_by_name_ccsid...
+     d                 pr              *   extproc(                             curl_easyoption *
+     d                                      'curl_easy_option_by_name_ccsid')
+     d  name                           *   value option(*string)
+     d  ccsid                        10u 0 value
+      *
+     d curl_easy_option_get_name_ccsid...
+     d                 pr              *   extproc(                             const char *
+     d                                       'curl_easy_option_get_name_ccsid')
+     d  option                         *   value                                curl_easyoption *
+     d  ccsid                        10u 0 value
+      *
       /endif
diff --git a/packages/OS400/initscript.sh b/packages/OS400/initscript.sh
index a593511..50550f7 100644
--- a/packages/OS400/initscript.sh
+++ b/packages/OS400/initscript.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/OS400/make-include.sh b/packages/OS400/make-include.sh
index 4cb0edd..b05ddf4 100644
--- a/packages/OS400/make-include.sh
+++ b/packages/OS400/make-include.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh
index c772b24..cac5aac 100644
--- a/packages/OS400/make-lib.sh
+++ b/packages/OS400/make-lib.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/OS400/make-src.sh b/packages/OS400/make-src.sh
index dbe039b..8e7ad6d 100644
--- a/packages/OS400/make-src.sh
+++ b/packages/OS400/make-src.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/OS400/make-tests.sh b/packages/OS400/make-tests.sh
index 54cdd2f..078b0f1 100644
--- a/packages/OS400/make-tests.sh
+++ b/packages/OS400/make-tests.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/OS400/makefile.sh b/packages/OS400/makefile.sh
index 29ba506..bfc56da 100644
--- a/packages/OS400/makefile.sh
+++ b/packages/OS400/makefile.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c
index 3490fc7..ec06c95 100644
--- a/packages/OS400/os400sys.c
+++ b/packages/OS400/os400sys.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -60,78 +60,70 @@
 
 #include "os400sys.h"
 
-
 /**
-***     QADRT OS/400 ASCII runtime defines only the most used procedures, but
-***             but a lot of them are not supported. This module implements
-***             ASCII wrappers for those that are used by libcurl, but not
-***             defined by QADRT.
+*** QADRT OS/400 ASCII runtime defines only the most used procedures, but a
+*** lot of them are not supported. This module implements ASCII wrappers for
+*** those that are used by libcurl, but not defined by QADRT.
 **/
 
 #pragma convert(0)                              /* Restore EBCDIC. */
 
-
 #define MIN_BYTE_GAIN   1024    /* Minimum gain when shortening a buffer. */
 
-typedef struct {
-        unsigned long   size;                   /* Buffer size. */
-        char *          buf;                    /* Buffer address. */
-}               buffer_t;
+struct buffer_t {
+  unsigned long size;            /* Buffer size. */
+  char *buf;                     /* Buffer address. */
+};
 
 
-static char *   buffer_undef(localkey_t key, long size);
-static char *   buffer_threaded(localkey_t key, long size);
-static char *   buffer_unthreaded(localkey_t key, long size);
+static char *buffer_undef(localkey_t key, long size);
+static char *buffer_threaded(localkey_t key, long size);
+static char *buffer_unthreaded(localkey_t key, long size);
 
 static pthread_mutex_t  mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_key_t    thdkey;
-static buffer_t *       locbufs;
+static struct buffer_t *locbufs;
 
-char *  (* Curl_thread_buffer)(localkey_t key, long size) = buffer_undef;
+char *(*Curl_thread_buffer)(localkey_t key, long size) = buffer_undef;
 
-
-static void
-thdbufdestroy(void * private)
-
+static void thdbufdestroy(void *private)
 {
   if(private) {
-    buffer_t * p = (buffer_t *) private;
+    struct buffer_t *p = (struct buffer_t *) private;
     localkey_t i;
 
     for(i = (localkey_t) 0; i < LK_LAST; i++) {
       free(p->buf);
       p++;
-      }
+    }
 
     free(private);
-    }
+  }
 }
 
 
 static void
 terminate(void)
-
 {
   if(Curl_thread_buffer == buffer_threaded) {
     locbufs = pthread_getspecific(thdkey);
     pthread_setspecific(thdkey, (void *) NULL);
     pthread_key_delete(thdkey);
-    }
+  }
 
   if(Curl_thread_buffer != buffer_undef) {
     thdbufdestroy((void *) locbufs);
-    locbufs = (buffer_t *) NULL;
-    }
+    locbufs = (struct buffer_t *) NULL;
+  }
 
   Curl_thread_buffer = buffer_undef;
 }
 
 
 static char *
-get_buffer(buffer_t * buf, long size)
-
+get_buffer(struct buffer_t *buf, long size)
 {
-  char * cp;
+  char *cp;
 
   /* If `size' >= 0, make sure buffer at `buf' is at least `size'-byte long.
      Return the buffer address. */
@@ -171,7 +163,6 @@
 
 static char *
 buffer_unthreaded(localkey_t key, long size)
-
 {
   return get_buffer(locbufs + key, size);
 }
@@ -179,15 +170,14 @@
 
 static char *
 buffer_threaded(localkey_t key, long size)
-
 {
-  buffer_t * bufs;
+  struct buffer_t *bufs;
 
   /* Get the buffer for the given local key in the current thread, and
      make sure it is at least `size'-byte long. Set `size' to < 0 to get
      its address only. */
 
-  bufs = (buffer_t *) pthread_getspecific(thdkey);
+  bufs = (struct buffer_t *) pthread_getspecific(thdkey);
 
   if(!bufs) {
     if(size < 0)
@@ -211,7 +201,6 @@
 
 static char *
 buffer_undef(localkey_t key, long size)
-
 {
   /* Define the buffer system, get the buffer for the given local key in
      the current thread, and make sure it is at least `size'-byte long.
@@ -224,15 +213,18 @@
   if(Curl_thread_buffer == buffer_undef) {      /* If unchanged during lock. */
     if(!pthread_key_create(&thdkey, thdbufdestroy))
       Curl_thread_buffer = buffer_threaded;
-    else if(!(locbufs = calloc((size_t) LK_LAST, sizeof(*locbufs)))) {
-      pthread_mutex_unlock(&mutex);
-      return (char *) NULL;
+    else {
+      locbufs = calloc((size_t) LK_LAST, sizeof(*locbufs));
+      if(!locbufs) {
+        pthread_mutex_unlock(&mutex);
+        return (char *) NULL;
       }
-    else
+      else
         Curl_thread_buffer = buffer_unthreaded;
+    }
 
     atexit(terminate);
-    }
+  }
 
   pthread_mutex_unlock(&mutex);
   return Curl_thread_buffer(key, size);
@@ -240,11 +232,10 @@
 
 
 static char *
-set_thread_string(localkey_t key, const char * s)
-
+set_thread_string(localkey_t key, const char *s)
 {
   int i;
-  char * cp;
+  char *cp;
 
   if(!s)
     return (char *) NULL;
@@ -262,11 +253,10 @@
 
 
 int
-Curl_getnameinfo_a(const struct sockaddr * sa, curl_socklen_t salen,
-              char * nodename, curl_socklen_t nodenamelen,
-              char * servname, curl_socklen_t servnamelen,
-              int flags)
-
+Curl_getnameinfo_a(const struct sockaddr *sa, curl_socklen_t salen,
+                   char *nodename, curl_socklen_t nodenamelen,
+                   char *servname, curl_socklen_t servnamelen,
+                   int flags)
 {
   char *enodename = NULL;
   char *eservname = NULL;
@@ -293,31 +283,29 @@
     int i;
     if(enodename) {
       i = QadrtConvertE2A(nodename, enodename,
-        nodenamelen - 1, strlen(enodename));
+                          nodenamelen - 1, strlen(enodename));
       nodename[i] = '\0';
-      }
+    }
 
     if(eservname) {
       i = QadrtConvertE2A(servname, eservname,
-        servnamelen - 1, strlen(eservname));
+                          servnamelen - 1, strlen(eservname));
       servname[i] = '\0';
-      }
     }
+  }
 
   free(enodename);
   free(eservname);
   return status;
 }
 
-
 int
-Curl_getaddrinfo_a(const char * nodename, const char * servname,
-            const struct addrinfo * hints,
-            struct addrinfo * * res)
-
+Curl_getaddrinfo_a(const char *nodename, const char *servname,
+                   const struct addrinfo *hints,
+                   struct addrinfo **res)
 {
-  char * enodename;
-  char * eservname;
+  char *enodename;
+  char *eservname;
   int status;
   int i;
 
@@ -354,7 +342,6 @@
   return status;
 }
 
-
 #ifdef USE_GSKIT
 
 /* ASCII wrappers for the GSKit procedures. */
@@ -370,22 +357,19 @@
  */
 
 struct gskstrlist {
-  struct gskstrlist * next;
-  const char * ebcdicstr;
-  const char * asciistr;
+  struct gskstrlist *next;
+  const char *ebcdicstr;
+  const char *asciistr;
 };
 
 struct Curl_gsk_descriptor {
   gsk_handle h;
-  struct gskstrlist * strlist;
+  struct gskstrlist *strlist;
 };
 
-
-int
-Curl_gsk_environment_open(gsk_handle * my_env_handle)
-
+int Curl_gsk_environment_open(gsk_handle *my_env_handle)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
   int rc;
 
   if(!my_env_handle)
@@ -402,13 +386,10 @@
   return rc;
 }
 
-
-int
-Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
-                         gsk_handle * my_session_handle)
-
+int Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
+                             gsk_handle *my_session_handle)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
   gsk_handle h;
   int rc;
 
@@ -429,12 +410,9 @@
   return rc;
 }
 
-
-static void
-gsk_free_handle(struct Curl_gsk_descriptor * p)
-
+static void gsk_free_handle(struct Curl_gsk_descriptor *p)
 {
-  struct gskstrlist * q;
+  struct gskstrlist *q;
 
   while((q = p->strlist)) {
     p->strlist = q;
@@ -444,12 +422,9 @@
   free(p);
 }
 
-
-int
-Curl_gsk_environment_close(gsk_handle * my_env_handle)
-
+int Curl_gsk_environment_close(gsk_handle *my_env_handle)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
   int rc;
 
   if(!my_env_handle)
@@ -466,11 +441,9 @@
 }
 
 
-int
-Curl_gsk_secure_soc_close(gsk_handle * my_session_handle)
-
+int Curl_gsk_secure_soc_close(gsk_handle *my_session_handle)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
   int rc;
 
   if(!my_session_handle)
@@ -486,12 +459,9 @@
   return rc;
 }
 
-
-int
-Curl_gsk_environment_init(gsk_handle my_env_handle)
-
+int Curl_gsk_environment_init(gsk_handle my_env_handle)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_env_handle)
     return GSK_INVALID_HANDLE;
@@ -500,11 +470,9 @@
 }
 
 
-int
-Curl_gsk_secure_soc_init(gsk_handle my_session_handle)
-
+int Curl_gsk_secure_soc_init(gsk_handle my_session_handle)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_session_handle)
     return GSK_INVALID_HANDLE;
@@ -515,11 +483,10 @@
 
 int
 Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
-                                const char * buffer, int bufSize)
-
+                                const char *buffer, int bufSize)
 {
-  struct Curl_gsk_descriptor * p;
-  char * ebcdicbuf;
+  struct Curl_gsk_descriptor *p;
+  char *ebcdicbuf;
   int rc;
 
   if(!my_gsk_handle)
@@ -545,9 +512,8 @@
 int
 Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
                             GSK_ENUM_VALUE enumValue)
-
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_gsk_handle)
     return GSK_INVALID_HANDLE;
@@ -559,9 +525,8 @@
 int
 Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
                                      GSK_NUM_ID numID, int numValue)
-
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_gsk_handle)
     return GSK_INVALID_HANDLE;
@@ -573,10 +538,9 @@
 int
 Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
                                 GSK_CALLBACK_ID callBackID,
-                                void * callBackAreaPtr)
-
+                                void *callBackAreaPtr)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_gsk_handle)
     return GSK_INVALID_HANDLE;
@@ -586,13 +550,12 @@
 
 
 static int
-cachestring(struct Curl_gsk_descriptor * p,
-            const char * ebcdicbuf, int bufsize, const char * * buffer)
-
+cachestring(struct Curl_gsk_descriptor *p,
+            const char *ebcdicbuf, int bufsize, const char **buffer)
 {
   int rc;
-  char * asciibuf;
-  struct gskstrlist * sp;
+  char *asciibuf;
+  struct gskstrlist *sp;
 
   for(sp = p->strlist; sp; sp = sp->next)
     if(sp->ebcdicstr == ebcdicbuf)
@@ -620,12 +583,11 @@
 
 int
 Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
-                                const char * * buffer, int * bufSize)
-
+                                const char **buffer, int *bufSize)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
   int rc;
-  const char * mybuf;
+  const char *mybuf;
   int mylen;
 
   if(!my_gsk_handle)
@@ -645,10 +607,9 @@
 
 int
 Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
-                            GSK_ENUM_VALUE * enumValue)
-
+                            GSK_ENUM_VALUE *enumValue)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_gsk_handle)
     return GSK_INVALID_HANDLE;
@@ -659,10 +620,9 @@
 
 int
 Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
-                                     GSK_NUM_ID numID, int * numValue)
-
+                                     GSK_NUM_ID numID, int *numValue)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_gsk_handle)
     return GSK_INVALID_HANDLE;
@@ -674,11 +634,10 @@
 int
 Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
                                  GSK_CERT_ID certID,
-                                 const gsk_cert_data_elem * * certDataElem,
-                                 int * certDataElementCount)
-
+                                 const gsk_cert_data_elem **certDataElem,
+                                 int *certDataElementCount)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_gsk_handle)
     return GSK_INVALID_HANDLE;
@@ -691,9 +650,8 @@
 
 int
 Curl_gsk_secure_soc_misc(gsk_handle my_session_handle, GSK_MISC_ID miscID)
-
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_session_handle)
     return GSK_INVALID_HANDLE;
@@ -703,11 +661,10 @@
 
 
 int
-Curl_gsk_secure_soc_read(gsk_handle my_session_handle, char * readBuffer,
-                         int readBufSize, int * amtRead)
-
+Curl_gsk_secure_soc_read(gsk_handle my_session_handle, char *readBuffer,
+                         int readBufSize, int *amtRead)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_session_handle)
     return GSK_INVALID_HANDLE;
@@ -717,11 +674,10 @@
 
 
 int
-Curl_gsk_secure_soc_write(gsk_handle my_session_handle, char * writeBuffer,
-                          int writeBufSize, int * amtWritten)
-
+Curl_gsk_secure_soc_write(gsk_handle my_session_handle, char *writeBuffer,
+                          int writeBufSize, int *amtWritten)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_session_handle)
     return GSK_INVALID_HANDLE;
@@ -732,7 +688,6 @@
 
 const char *
 Curl_gsk_strerror_a(int gsk_return_value)
-
 {
   return set_thread_string(LK_GSK_ERROR, gsk_strerror(gsk_return_value));
 }
@@ -740,10 +695,9 @@
 int
 Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
                               int IOCompletionPort,
-                              Qso_OverlappedIO_t * communicationsArea)
-
+                              Qso_OverlappedIO_t *communicationsArea)
 {
-  struct Curl_gsk_descriptor * p;
+  struct Curl_gsk_descriptor *p;
 
   if(!my_session_handle)
     return GSK_INVALID_HANDLE;
@@ -753,15 +707,12 @@
 
 #endif /* USE_GSKIT */
 
-
-
 #ifdef HAVE_GSSAPI
 
 /* ASCII wrappers for the GSSAPI procedures. */
 
 static int
-Curl_gss_convert_in_place(OM_uint32 * minor_status, gss_buffer_t buf)
-
+Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf)
 {
   unsigned int i = buf->length;
 
@@ -789,9 +740,8 @@
 
 
 OM_uint32
-Curl_gss_import_name_a(OM_uint32 * minor_status, gss_buffer_t in_name,
-                       gss_OID in_name_type, gss_name_t * out_name)
-
+Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name,
+                       gss_OID in_name_type, gss_name_t *out_name)
 {
   int rc;
   unsigned int i;
@@ -818,17 +768,16 @@
   return rc;
 }
 
-
 OM_uint32
-Curl_gss_display_status_a(OM_uint32 * minor_status, OM_uint32 status_value,
-                   int status_type, gss_OID mech_type,
-                   gss_msg_ctx_t * message_context, gss_buffer_t status_string)
-
+Curl_gss_display_status_a(OM_uint32 *minor_status, OM_uint32 status_value,
+                          int status_type, gss_OID mech_type,
+                          gss_msg_ctx_t *message_context,
+                          gss_buffer_t status_string)
 {
   int rc;
 
   rc = gss_display_status(minor_status, status_value, status_type,
-                              mech_type, message_context, status_string);
+                          mech_type, message_context, status_string);
 
   if(rc != GSS_S_COMPLETE || !status_string ||
      !status_string->length || !status_string->value)
@@ -844,19 +793,17 @@
   return rc;
 }
 
-
 OM_uint32
-Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
+Curl_gss_init_sec_context_a(OM_uint32 *minor_status,
                             gss_cred_id_t cred_handle,
-                            gss_ctx_id_t * context_handle,
+                            gss_ctx_id_t *context_handle,
                             gss_name_t target_name, gss_OID mech_type,
                             gss_flags_t req_flags, OM_uint32 time_req,
                             gss_channel_bindings_t input_chan_bindings,
                             gss_buffer_t input_token,
-                            gss_OID * actual_mech_type,
-                            gss_buffer_t output_token, gss_flags_t * ret_flags,
-                            OM_uint32 * time_rec)
-
+                            gss_OID *actual_mech_type,
+                            gss_buffer_t output_token, gss_flags_t *ret_flags,
+                            OM_uint32 *time_rec)
 {
   int rc;
   gss_buffer_desc in;
@@ -885,13 +832,13 @@
   }
 
   rc = gss_init_sec_context(minor_status, cred_handle, context_handle,
-                             target_name, mech_type, req_flags, time_req,
-                             input_chan_bindings, inp, actual_mech_type,
-                             output_token, ret_flags, time_rec);
+                            target_name, mech_type, req_flags, time_req,
+                            input_chan_bindings, inp, actual_mech_type,
+                            output_token, ret_flags, time_rec);
   free(in.value);
 
   if(rc != GSS_S_COMPLETE || !output_token ||
-      !output_token->length || !output_token->value)
+     !output_token->length || !output_token->value)
     return rc;
 
   /* No way to allocate a buffer here, because it will be released by
@@ -906,17 +853,16 @@
 
 
 OM_uint32
-Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
-                              gss_ctx_id_t * context_handle,
+Curl_gss_delete_sec_context_a(OM_uint32 *minor_status,
+                              gss_ctx_id_t *context_handle,
                               gss_buffer_t output_token)
-
 {
   int rc;
 
   rc = gss_delete_sec_context(minor_status, context_handle, output_token);
 
   if(rc != GSS_S_COMPLETE || !output_token ||
-      !output_token->length || !output_token->value)
+     !output_token->length || !output_token->value)
     return rc;
 
   /* No way to allocate a buffer here, because it will be released by
@@ -931,18 +877,16 @@
 
 #endif /* HAVE_GSSAPI */
 
-
 #ifndef CURL_DISABLE_LDAP
 
 /* ASCII wrappers for the LDAP procedures. */
 
 void *
-Curl_ldap_init_a(char * host, int port)
-
+Curl_ldap_init_a(char *host, int port)
 {
   unsigned int i;
-  char * ehost;
-  void * result;
+  char *ehost;
+  void *result;
 
   if(!host)
     return (void *) ldap_init(host, port);
@@ -960,14 +904,12 @@
   return result;
 }
 
-
 int
-Curl_ldap_simple_bind_s_a(void * ld, char * dn, char * passwd)
-
+Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd)
 {
   int i;
-  char * edn;
-  char * epasswd;
+  char *edn;
+  char *epasswd;
 
   edn = (char *) NULL;
   epasswd = (char *) NULL;
@@ -1002,22 +944,20 @@
   return i;
 }
 
-
 int
-Curl_ldap_search_s_a(void * ld, char * base, int scope, char * filter,
-                     char * * attrs, int attrsonly, LDAPMessage * * res)
-
+Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter,
+                     char **attrs, int attrsonly, LDAPMessage **res)
 {
   int i;
   int j;
-  char * ebase;
-  char * efilter;
-  char * * eattrs;
+  char *ebase;
+  char *efilter;
+  char **eattrs;
   int status;
 
   ebase = (char *) NULL;
   efilter = (char *) NULL;
-  eattrs = (char * *) NULL;
+  eattrs = (char **) NULL;
   status = LDAP_SUCCESS;
 
   if(base) {
@@ -1063,9 +1003,9 @@
 
         QadrtConvertA2E(eattrs[j], attrs[j], i, i);
         eattrs[j][i] = '\0';
-        }
       }
     }
+  }
 
   if(status == LDAP_SUCCESS)
     status = ldap_search_s(ld, ebase? ebase: "", scope,
@@ -1077,7 +1017,7 @@
       free(eattrs[j]);
 
     free(eattrs);
-    }
+  }
 
   free(efilter);
   free(ebase);
@@ -1085,12 +1025,11 @@
 }
 
 
-struct berval * *
-Curl_ldap_get_values_len_a(void * ld, LDAPMessage * entry, const char * attr)
-
+struct berval **
+Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr)
 {
-  char * cp;
-  struct berval * * result;
+  char *cp;
+  struct berval **result;
 
   cp = (char *) NULL;
 
@@ -1101,7 +1040,7 @@
     if(!cp) {
       ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL,
                        ldap_err2string(LDAP_NO_MEMORY));
-      return (struct berval * *) NULL;
+      return (struct berval **) NULL;
     }
 
     QadrtConvertA2E(cp, attr, i, i);
@@ -1117,22 +1056,18 @@
   return result;
 }
 
-
 char *
 Curl_ldap_err2string_a(int error)
-
 {
   return set_thread_string(LK_LDAP_ERROR, ldap_err2string(error));
 }
 
-
 char *
-Curl_ldap_get_dn_a(void * ld, LDAPMessage * entry)
-
+Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry)
 {
   int i;
-  char * cp;
-  char * cp2;
+  char *cp;
+  char *cp2;
 
   cp = ldap_get_dn(ld, entry);
 
@@ -1157,15 +1092,13 @@
   return cp;
 }
 
-
 char *
-Curl_ldap_first_attribute_a(void * ld,
-                            LDAPMessage * entry, BerElement * * berptr)
-
+Curl_ldap_first_attribute_a(void *ld,
+                            LDAPMessage *entry, BerElement **berptr)
 {
   int i;
-  char * cp;
-  char * cp2;
+  char *cp;
+  char *cp2;
 
   cp = ldap_first_attribute(ld, entry, berptr);
 
@@ -1190,15 +1123,13 @@
   return cp;
 }
 
-
 char *
-Curl_ldap_next_attribute_a(void * ld,
-                           LDAPMessage * entry, BerElement * berptr)
-
+Curl_ldap_next_attribute_a(void *ld,
+                           LDAPMessage *entry, BerElement *berptr)
 {
   int i;
-  char * cp;
-  char * cp2;
+  char *cp;
+  char *cp2;
 
   cp = ldap_next_attribute(ld, entry, berptr);
 
@@ -1225,7 +1156,6 @@
 
 #endif /* CURL_DISABLE_LDAP */
 
-
 static int
 sockaddr2ebcdic(struct sockaddr_storage *dstaddr,
                 const struct sockaddr *srcaddr, int srclen)
@@ -1241,11 +1171,11 @@
      sizeof(srcaddr->sa_family) || srclen > sizeof(*dstaddr)) {
     errno = EINVAL;
     return -1;
-    }
+  }
 
   memcpy((char *) dstaddr, (char *) srcaddr, srclen);
 
-  switch (srcaddr->sa_family) {
+  switch(srcaddr->sa_family) {
 
   case AF_UNIX:
     srcu = (const struct sockaddr_un *) srcaddr;
@@ -1255,7 +1185,7 @@
     i = QadrtConvertA2E(dstu->sun_path, srcu->sun_path, dstsize - 1, srclen);
     dstu->sun_path[i] = '\0';
     srclen = i + offsetof(struct sockaddr_un, sun_path);
-    }
+  }
 
   return srclen;
 }
@@ -1278,13 +1208,13 @@
   if(!srcaddr || srclen < 0) {
     errno = EINVAL;
     return -1;
-    }
+  }
 
   memcpy((char *) dstaddr, (char *) srcaddr, srclen);
 
   if(srclen >= offsetof(struct sockaddr_storage, ss_family) +
      sizeof(srcaddr->ss_family)) {
-    switch (srcaddr->ss_family) {
+    switch(srcaddr->ss_family) {
 
     case AF_UNIX:
       srcu = (const struct sockaddr_un *) srcaddr;
@@ -1303,9 +1233,8 @@
   return srclen;
 }
 
-
 int
-Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen)
+Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen)
 {
   int i;
   struct sockaddr_storage laddr;
@@ -1318,9 +1247,8 @@
   return connect(sd, (struct sockaddr *) &laddr, i);
 }
 
-
 int
-Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen)
+Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen)
 {
   int i;
   struct sockaddr_storage laddr;
@@ -1333,10 +1261,9 @@
   return bind(sd, (struct sockaddr *) &laddr, i);
 }
 
-
 int
-Curl_os400_sendto(int sd, char * buffer, int buflen, int flags,
-                                struct sockaddr * dstaddr, int addrlen)
+Curl_os400_sendto(int sd, char *buffer, int buflen, int flags,
+                  struct sockaddr *dstaddr, int addrlen)
 {
   int i;
   struct sockaddr_storage laddr;
@@ -1349,10 +1276,9 @@
   return sendto(sd, buffer, buflen, flags, (struct sockaddr *) &laddr, i);
 }
 
-
 int
-Curl_os400_recvfrom(int sd, char * buffer, int buflen, int flags,
-                                struct sockaddr * fromaddr, int * addrlen)
+Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags,
+                    struct sockaddr *fromaddr, int *addrlen)
 {
   int rcvlen;
   struct sockaddr_storage laddr;
@@ -1379,7 +1305,6 @@
   return rcvlen;
 }
 
-
 int
 Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen)
 {
@@ -1397,7 +1322,6 @@
   return retcode;
 }
 
-
 int
 Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen)
 {
@@ -1419,17 +1343,15 @@
 #ifdef HAVE_LIBZ
 const char *
 Curl_os400_zlibVersion(void)
-
 {
   return set_thread_string(LK_ZLIB_VERSION, zlibVersion());
 }
 
 
 int
-Curl_os400_inflateInit_(z_streamp strm, const char * version, int stream_size)
-
+Curl_os400_inflateInit_(z_streamp strm, const char *version, int stream_size)
 {
-  z_const char * msgb4 = strm->msg;
+  z_const char *msgb4 = strm->msg;
   int ret;
 
   ret = inflateInit(strm);
@@ -1440,13 +1362,11 @@
   return ret;
 }
 
-
 int
 Curl_os400_inflateInit2_(z_streamp strm, int windowBits,
-                                        const char * version, int stream_size)
-
+                         const char *version, int stream_size)
 {
-  z_const char * msgb4 = strm->msg;
+  z_const char *msgb4 = strm->msg;
   int ret;
 
   ret = inflateInit2(strm, windowBits);
@@ -1457,12 +1377,10 @@
   return ret;
 }
 
-
 int
 Curl_os400_inflate(z_streamp strm, int flush)
-
 {
-  z_const char * msgb4 = strm->msg;
+  z_const char *msgb4 = strm->msg;
   int ret;
 
   ret = inflate(strm, flush);
@@ -1473,12 +1391,10 @@
   return ret;
 }
 
-
 int
 Curl_os400_inflateEnd(z_streamp strm)
-
 {
-  z_const char * msgb4 = strm->msg;
+  z_const char *msgb4 = strm->msg;
   int ret;
 
   ret = inflateEnd(strm);
diff --git a/packages/OS400/os400sys.h b/packages/OS400/os400sys.h
index 8dafd64..3b76675 100644
--- a/packages/OS400/os400sys.h
+++ b/packages/OS400/os400sys.h
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/packages/TPF/curl.mak b/packages/TPF/curl.mak
index d8d55a8..5d6f3d7 100644
--- a/packages/TPF/curl.mak
+++ b/packages/TPF/curl.mak
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/TPF/maketpf.env_curl b/packages/TPF/maketpf.env_curl
index ac46043..6ea24d4 100644
--- a/packages/TPF/maketpf.env_curl
+++ b/packages/TPF/maketpf.env_curl
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/TPF/maketpf.env_curllib b/packages/TPF/maketpf.env_curllib
index 613619b..28414c6 100644
--- a/packages/TPF/maketpf.env_curllib
+++ b/packages/TPF/maketpf.env_curllib
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/vms/Makefile.am b/packages/vms/Makefile.am
index f5cf9a9..16db595 100644
--- a/packages/vms/Makefile.am
+++ b/packages/vms/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/packages/vms/config_h.com b/packages/vms/config_h.com
index 4049d9f..af97eb1 100644
--- a/packages/vms/config_h.com
+++ b/packages/vms/config_h.com
@@ -28,7 +28,7 @@
 $! This procedure may not guess the options correctly for all architectures,
 $! and is a work in progress.
 $!
-$! Copyright 2011 - 2020, John Malmberg
+$! Copyright 2011 - 2021, John Malmberg
 $!
 $! Permission to use, copy, modify, and/or distribute this software for any
 $! purpose with or without fee is hereby granted, provided that the above
@@ -1855,16 +1855,6 @@
 $	    goto cfgh_in_loop1
 $	endif
 $!
-$!	Process RETSIGTYPE directive
-$!----------------------------------
-$	if key2 .eqs. "RETSIGTYPE"
-$	then
-$	    write tf "#ifndef RETSIGTYPE"
-$	    write tf "#define RETSIGTYPE void"
-$	    write tf "#endif"
-$	    goto cfgh_in_loop1
-$	endif
-$!
 $!	Process STDC_HEADERS (SAMBA!)
 $!---------------------------
 $	if key2 .eqs. "STDC_HEADERS"
@@ -2129,7 +2119,7 @@
 $write tf " /* Allow compiler builtins */"
 $write tf "/*-------------------------*/"
 $write tf "#ifdef __DECC_VER"
-$write tf "#include <non_existant_dir:builtins.h>"
+$write tf "#include <non_existent_dir:builtins.h>"
 $write tf "#endif"
 $!
 $write tf ""
diff --git a/packages/vms/curl_crtl_init.c b/packages/vms/curl_crtl_init.c
index b8e5f7f..63c6742 100644
--- a/packages/vms/curl_crtl_init.c
+++ b/packages/vms/curl_crtl_init.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt
index 52dc328..2c3dba1 100644
--- a/packages/vms/curl_gnv_build_steps.txt
+++ b/packages/vms/curl_gnv_build_steps.txt
@@ -36,7 +36,7 @@
 [gnv.common_src]curl_*_original_src.bck is the original source of the curl kit
 as provided by the curl project.  [gnv.vms_src]curl-*_vms_src.bck, if present,
 has the OpenVMS specific files that are used for building that are not yet in
-the curl source kits for that release distributed https://curl.haxx.se
+the curl source kits for that release distributed https://curl.se
 
 These backup savesets should be restored to different directory trees on
 an ODS-5 volume(s) which are referenced by concealed rooted logical names.
diff --git a/packages/vms/curlmsg.h b/packages/vms/curlmsg.h
index 55c9ee5..b3d0b25 100644
--- a/packages/vms/curlmsg.h
+++ b/packages/vms/curlmsg.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/packages/vms/curlmsg.msg b/packages/vms/curlmsg.msg
index 73bc763..e86aee7 100644
--- a/packages/vms/curlmsg.msg
+++ b/packages/vms/curlmsg.msg
@@ -9,7 +9,7 @@
 !
 ! This software is licensed as described in the file COPYING, which
 ! you should have received as part of this distribution. The terms
-! are also available at https://curl.haxx.se/docs/copyright.html.
+! are also available at https://curl.se/docs/copyright.html.
 !
 ! You may opt to use, copy, modify, merge, publish, distribute and/or sell
 ! copies of the Software, and permit persons to whom the Software is
diff --git a/packages/vms/curlmsg_vms.h b/packages/vms/curlmsg_vms.h
index 9dbc6ab..3392a4c 100644
--- a/packages/vms/curlmsg_vms.h
+++ b/packages/vms/curlmsg_vms.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com
index 6c65b24..07d3fb0 100644
--- a/packages/vms/generate_config_vms_h_curl.com
+++ b/packages/vms/generate_config_vms_h_curl.com
@@ -17,7 +17,7 @@
 $! filenames are slightly different.
 $!
 $!
-$! Copyright 2013 - 2020, John Malmberg
+$! Copyright 2013 - 2021, John Malmberg
 $!
 $! Permission to use, copy, modify, and/or distribute this software for any
 $! purpose with or without fee is hereby granted, provided that the above
@@ -331,9 +331,6 @@
 $write cvh "#ifdef USE_GNUTLS"
 $write cvh "#undef USE_GNUTLS"
 $write cvh "#endif"
-$write cvh "#ifdef USE_GNUTLS_NETTLE"
-$write cvh "#undef USE_GNUTLS_NETTLE"
-$write cvh "#endif"
 $write cvh "#ifdef USE_LIBRTMP"
 $write cvh "#undef USE_LIBRTMP"
 $write cvh "#endif"
diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com
index c9db8d9..0e2719c 100644
--- a/packages/vms/gnv_link_curl.com
+++ b/packages/vms/gnv_link_curl.com
@@ -4,7 +4,7 @@
 $!
 $! File to build images using gnv$libcurl.exe
 $!
-$! Copyright 2009 - 2020, John Malmberg
+$! Copyright 2009 - 2021, John Malmberg
 $!
 $! Permission to use, copy, modify, and/or distribute this software for any
 $! purpose with or without fee is hereby granted, provided that the above
@@ -408,7 +408,7 @@
            [.src]curl-tool_getpass.o, [.src]curl-tool_help.o, -
            [.src]curl-tool_helpers.o, [.src]curl-tool_homedir.o, -
            [.src]curl-tool_hugehelp.o, [.src]curl-tool_libinfo.o, -
-           [.src]curl-tool_metalink.o, [.src]curl-tool_mfiles.o, -
+           [.src]curl-tool_mfiles.o, -
            [.src]curl-tool_msgs.o, [.src]curl-tool_operate.o, -
            [.src]curl-tool_operhlp.o, [.src]curl-tool_panykey.o, -
            [.src]curl-tool_paramhlp.o, [.src]curl-tool_parsecfg.o, -
diff --git a/packages/vms/readme b/packages/vms/readme
index be1278f..0bb6166 100644
--- a/packages/vms/readme
+++ b/packages/vms/readme
@@ -168,8 +168,8 @@
 should be produced in an architecture-specific subdirectory under this
 directory ([.ALPHA], [.IA64], [.VAX]).
 
-The file curl_gnv_build_steps.txt contains information on buildling using
-the GNV tool kit, building a shared libcurl, and producting a PCSI kit for
+The file curl_gnv_build_steps.txt contains information on building using
+the GNV tool kit, building a shared libcurl, and producing a PCSI kit for
 distribution.  The curl_gnv_build_steps.text is included in the release
 notes file of the PCSI kit.
 
diff --git a/plan9/include/mkfile b/plan9/include/mkfile
index c1ed850..cbf403f 100644
--- a/plan9/include/mkfile
+++ b/plan9/include/mkfile
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/plan9/lib/mkfile b/plan9/lib/mkfile
index d7a7ac5..d64b465 100644
--- a/plan9/lib/mkfile
+++ b/plan9/lib/mkfile
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/plan9/lib/mkfile.inc b/plan9/lib/mkfile.inc
index 0966d77..b202f57 100755
--- a/plan9/lib/mkfile.inc
+++ b/plan9/lib/mkfile.inc
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/plan9/mkfile b/plan9/mkfile
index a9b4fe6..0fd18f4 100644
--- a/plan9/mkfile
+++ b/plan9/mkfile
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/plan9/mkfile.proto b/plan9/mkfile.proto
index edb79f5..a88374c 100644
--- a/plan9/mkfile.proto
+++ b/plan9/mkfile.proto
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/plan9/src/mkfile b/plan9/src/mkfile
index 889d066..f752078 100644
--- a/plan9/src/mkfile
+++ b/plan9/src/mkfile
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/plan9/src/mkfile.inc b/plan9/src/mkfile.inc
index 0966d77..b202f57 100755
--- a/plan9/src/mkfile.inc
+++ b/plan9/src/mkfile.inc
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/projects/README b/projects/README
index 62b9986..7a7698c 100644
--- a/projects/README
+++ b/projects/README
@@ -145,7 +145,7 @@
    find bugs in the project files that need correcting, and would like to
    submit updated files back then please note that, whilst the solution files
    can be edited directly, the templates for the project files (which are
-   stored in the git repositoty) will need to be modified rather than the
+   stored in the git repository) will need to be modified rather than the
    generated project files that Visual Studio uses.
 
 Legacy Windows and SSL
diff --git a/projects/Windows/VC10/lib/libcurl.vcxproj b/projects/Windows/VC10/lib/libcurl.vcxproj
index e346e4b..8ddf84c 100644
--- a/projects/Windows/VC10/lib/libcurl.vcxproj
+++ b/projects/Windows/VC10/lib/libcurl.vcxproj
@@ -1297,7 +1297,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1310,7 +1310,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1331,7 +1331,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1344,7 +1344,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1365,7 +1365,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1377,7 +1377,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1397,7 +1397,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1409,7 +1409,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1687,7 +1687,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1700,7 +1700,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1721,7 +1721,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1734,7 +1734,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1755,7 +1755,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1767,7 +1767,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1787,7 +1787,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1799,7 +1799,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1809,7 +1809,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1832,7 +1832,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1852,7 +1852,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1875,7 +1875,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1981,7 +1981,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2004,7 +2004,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2024,7 +2024,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2047,7 +2047,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2068,7 +2068,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2091,7 +2091,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2111,7 +2111,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2134,7 +2134,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2240,7 +2240,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2263,7 +2263,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2283,7 +2283,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC10\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2306,7 +2306,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC10\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2328,6 +2328,8 @@
     <ClCompile Include="..\..\..\..\lib\asyn-ares.c" />

     <ClCompile Include="..\..\..\..\lib\asyn-thread.c" />

     <ClCompile Include="..\..\..\..\lib\base64.c" />

+    <ClCompile Include="..\..\..\..\lib\bufref.c" />

+    <ClCompile Include="..\..\..\..\lib\c-hyper.c" />

     <ClCompile Include="..\..\..\..\lib\conncache.c" />

     <ClCompile Include="..\..\..\..\lib\connect.c" />

     <ClCompile Include="..\..\..\..\lib\content_encoding.c" />

@@ -2374,7 +2376,9 @@
     <ClCompile Include="..\..\..\..\lib\hostip6.c" />

     <ClCompile Include="..\..\..\..\lib\hostip.c" />

     <ClCompile Include="..\..\..\..\lib\hostsyn.c" />

+    <ClCompile Include="..\..\..\..\lib\hsts.c" />

     <ClCompile Include="..\..\..\..\lib\http2.c" />

+    <ClCompile Include="..\..\..\..\lib\http_aws_sigv4.c" />

     <ClCompile Include="..\..\..\..\lib\http.c" />

     <ClCompile Include="..\..\..\..\lib\http_chunks.c" />

     <ClCompile Include="..\..\..\..\lib\http_digest.c" />

@@ -2443,6 +2447,7 @@
     <ClCompile Include="..\..\..\..\lib\vauth\cram.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest_sspi.c" />

+    <ClCompile Include="..\..\..\..\lib\vauth\gsasl.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_gssapi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_sspi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\ntlm.c" />

@@ -2466,6 +2471,7 @@
     <ClCompile Include="..\..\..\..\lib\vtls\mesalink.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />

+    <ClCompile Include="..\..\..\..\lib\vtls\rustls.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\sectransp.c" />

@@ -2477,6 +2483,8 @@
     <ClInclude Include="..\..\..\..\lib\amigaos.h" />

     <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />

     <ClInclude Include="..\..\..\..\lib\asyn.h" />

+    <ClInclude Include="..\..\..\..\lib\bufref.h" />

+    <ClInclude Include="..\..\..\..\lib\c-hyper.h" />

     <ClInclude Include="..\..\..\..\lib\config-win32.h" />

     <ClInclude Include="..\..\..\..\lib\conncache.h" />

     <ClInclude Include="..\..\..\..\lib\connect.h" />

@@ -2529,7 +2537,9 @@
     <ClInclude Include="..\..\..\..\lib\hash.h" />

     <ClInclude Include="..\..\..\..\lib\hostcheck.h" />

     <ClInclude Include="..\..\..\..\lib\hostip.h" />

+    <ClInclude Include="..\..\..\..\lib\hsts.h" />

     <ClInclude Include="..\..\..\..\lib\http2.h" />

+    <ClInclude Include="..\..\..\..\lib\http_aws_sigv4.h" />

     <ClInclude Include="..\..\..\..\lib\http_chunks.h" />

     <ClInclude Include="..\..\..\..\lib\http_digest.h" />

     <ClInclude Include="..\..\..\..\lib\http.h" />

@@ -2605,6 +2615,7 @@
     <ClInclude Include="..\..\..\..\lib\vtls\mesalink.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\nssg.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\openssl.h" />

+    <ClInclude Include="..\..\..\..\lib\vtls\rustls.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\schannel.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\sectransp.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\vtls.h" />

diff --git a/projects/Windows/VC10/src/curl.vcxproj b/projects/Windows/VC10/src/curl.vcxproj
index ee3bf78..0eb7fe6 100644
--- a/projects/Windows/VC10/src/curl.vcxproj
+++ b/projects/Windows/VC10/src/curl.vcxproj
@@ -1916,7 +1916,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1948,7 +1948,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1979,7 +1979,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2009,7 +2009,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2038,7 +2038,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2070,7 +2070,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2101,7 +2101,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2131,7 +2131,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC10\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2160,7 +2160,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2192,7 +2192,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2223,7 +2223,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2253,7 +2253,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2282,7 +2282,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2314,7 +2314,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2345,7 +2345,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2375,7 +2375,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC10\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC10\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC10\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2658,7 +2658,6 @@
     <ClCompile Include="..\..\..\..\src\tool_hugehelp.c" />

     <ClCompile Include="..\..\..\..\src\tool_libinfo.c" />

     <ClCompile Include="..\..\..\..\src\tool_main.c" />

-    <ClCompile Include="..\..\..\..\src\tool_metalink.c" />

     <ClCompile Include="..\..\..\..\src\tool_msgs.c" />

     <ClCompile Include="..\..\..\..\src\tool_operate.c" />

     <ClCompile Include="..\..\..\..\src\tool_operhlp.c" />

@@ -2710,7 +2709,6 @@
     <ClInclude Include="..\..\..\..\src\tool_hugehelp.h" />

     <ClInclude Include="..\..\..\..\src\tool_libinfo.h" />

     <ClInclude Include="..\..\..\..\src\tool_main.h" />

-    <ClInclude Include="..\..\..\..\src\tool_metalink.h" />

     <ClInclude Include="..\..\..\..\src\tool_msgs.h" />

     <ClInclude Include="..\..\..\..\src\tool_operate.h" />

     <ClInclude Include="..\..\..\..\src\tool_operhlp.h" />

diff --git a/projects/Windows/VC11/lib/libcurl.vcxproj b/projects/Windows/VC11/lib/libcurl.vcxproj
index a937b95..2bbadab9 100644
--- a/projects/Windows/VC11/lib/libcurl.vcxproj
+++ b/projects/Windows/VC11/lib/libcurl.vcxproj
@@ -1353,7 +1353,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1366,7 +1366,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1387,7 +1387,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1400,7 +1400,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1421,7 +1421,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1433,7 +1433,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1453,7 +1453,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1465,7 +1465,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1743,7 +1743,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1756,7 +1756,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1777,7 +1777,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1790,7 +1790,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1811,7 +1811,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1823,7 +1823,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1843,7 +1843,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1855,7 +1855,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1865,7 +1865,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1888,7 +1888,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1908,7 +1908,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1931,7 +1931,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2037,7 +2037,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2060,7 +2060,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2080,7 +2080,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2103,7 +2103,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2124,7 +2124,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2147,7 +2147,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2167,7 +2167,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2190,7 +2190,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2296,7 +2296,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2319,7 +2319,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2339,7 +2339,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC11\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2362,7 +2362,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC11\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2384,6 +2384,8 @@
     <ClCompile Include="..\..\..\..\lib\asyn-ares.c" />

     <ClCompile Include="..\..\..\..\lib\asyn-thread.c" />

     <ClCompile Include="..\..\..\..\lib\base64.c" />

+    <ClCompile Include="..\..\..\..\lib\bufref.c" />

+    <ClCompile Include="..\..\..\..\lib\c-hyper.c" />

     <ClCompile Include="..\..\..\..\lib\conncache.c" />

     <ClCompile Include="..\..\..\..\lib\connect.c" />

     <ClCompile Include="..\..\..\..\lib\content_encoding.c" />

@@ -2430,7 +2432,9 @@
     <ClCompile Include="..\..\..\..\lib\hostip6.c" />

     <ClCompile Include="..\..\..\..\lib\hostip.c" />

     <ClCompile Include="..\..\..\..\lib\hostsyn.c" />

+    <ClCompile Include="..\..\..\..\lib\hsts.c" />

     <ClCompile Include="..\..\..\..\lib\http2.c" />

+    <ClCompile Include="..\..\..\..\lib\http_aws_sigv4.c" />

     <ClCompile Include="..\..\..\..\lib\http.c" />

     <ClCompile Include="..\..\..\..\lib\http_chunks.c" />

     <ClCompile Include="..\..\..\..\lib\http_digest.c" />

@@ -2499,6 +2503,7 @@
     <ClCompile Include="..\..\..\..\lib\vauth\cram.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest_sspi.c" />

+    <ClCompile Include="..\..\..\..\lib\vauth\gsasl.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_gssapi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_sspi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\ntlm.c" />

@@ -2522,6 +2527,7 @@
     <ClCompile Include="..\..\..\..\lib\vtls\mesalink.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />

+    <ClCompile Include="..\..\..\..\lib\vtls\rustls.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\sectransp.c" />

@@ -2533,6 +2539,8 @@
     <ClInclude Include="..\..\..\..\lib\amigaos.h" />

     <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />

     <ClInclude Include="..\..\..\..\lib\asyn.h" />

+    <ClInclude Include="..\..\..\..\lib\bufref.h" />

+    <ClInclude Include="..\..\..\..\lib\c-hyper.h" />

     <ClInclude Include="..\..\..\..\lib\config-win32.h" />

     <ClInclude Include="..\..\..\..\lib\conncache.h" />

     <ClInclude Include="..\..\..\..\lib\connect.h" />

@@ -2585,7 +2593,9 @@
     <ClInclude Include="..\..\..\..\lib\hash.h" />

     <ClInclude Include="..\..\..\..\lib\hostcheck.h" />

     <ClInclude Include="..\..\..\..\lib\hostip.h" />

+    <ClInclude Include="..\..\..\..\lib\hsts.h" />

     <ClInclude Include="..\..\..\..\lib\http2.h" />

+    <ClInclude Include="..\..\..\..\lib\http_aws_sigv4.h" />

     <ClInclude Include="..\..\..\..\lib\http_chunks.h" />

     <ClInclude Include="..\..\..\..\lib\http_digest.h" />

     <ClInclude Include="..\..\..\..\lib\http.h" />

@@ -2661,6 +2671,7 @@
     <ClInclude Include="..\..\..\..\lib\vtls\mesalink.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\nssg.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\openssl.h" />

+    <ClInclude Include="..\..\..\..\lib\vtls\rustls.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\schannel.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\sectransp.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\vtls.h" />

diff --git a/projects/Windows/VC11/src/curl.vcxproj b/projects/Windows/VC11/src/curl.vcxproj
index 00c2b09..832cc99 100644
--- a/projects/Windows/VC11/src/curl.vcxproj
+++ b/projects/Windows/VC11/src/curl.vcxproj
@@ -1972,7 +1972,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2004,7 +2004,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2035,7 +2035,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2065,7 +2065,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2094,7 +2094,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2126,7 +2126,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2157,7 +2157,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2187,7 +2187,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC11\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2216,7 +2216,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2248,7 +2248,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2279,7 +2279,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2309,7 +2309,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2338,7 +2338,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2370,7 +2370,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2401,7 +2401,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2431,7 +2431,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC11\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC11\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC11\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2714,7 +2714,6 @@
     <ClCompile Include="..\..\..\..\src\tool_hugehelp.c" />

     <ClCompile Include="..\..\..\..\src\tool_libinfo.c" />

     <ClCompile Include="..\..\..\..\src\tool_main.c" />

-    <ClCompile Include="..\..\..\..\src\tool_metalink.c" />

     <ClCompile Include="..\..\..\..\src\tool_msgs.c" />

     <ClCompile Include="..\..\..\..\src\tool_operate.c" />

     <ClCompile Include="..\..\..\..\src\tool_operhlp.c" />

@@ -2766,7 +2765,6 @@
     <ClInclude Include="..\..\..\..\src\tool_hugehelp.h" />

     <ClInclude Include="..\..\..\..\src\tool_libinfo.h" />

     <ClInclude Include="..\..\..\..\src\tool_main.h" />

-    <ClInclude Include="..\..\..\..\src\tool_metalink.h" />

     <ClInclude Include="..\..\..\..\src\tool_msgs.h" />

     <ClInclude Include="..\..\..\..\src\tool_operate.h" />

     <ClInclude Include="..\..\..\..\src\tool_operhlp.h" />

diff --git a/projects/Windows/VC12/lib/libcurl.vcxproj b/projects/Windows/VC12/lib/libcurl.vcxproj
index ed379af..779211a 100644
--- a/projects/Windows/VC12/lib/libcurl.vcxproj
+++ b/projects/Windows/VC12/lib/libcurl.vcxproj
@@ -1353,7 +1353,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1366,7 +1366,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1387,7 +1387,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1400,7 +1400,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1421,7 +1421,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1433,7 +1433,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1453,7 +1453,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1465,7 +1465,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1743,7 +1743,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1756,7 +1756,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1777,7 +1777,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1790,7 +1790,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1811,7 +1811,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1823,7 +1823,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1843,7 +1843,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1855,7 +1855,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1865,7 +1865,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1888,7 +1888,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1908,7 +1908,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1931,7 +1931,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2037,7 +2037,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2060,7 +2060,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2080,7 +2080,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2103,7 +2103,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2124,7 +2124,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2147,7 +2147,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2167,7 +2167,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2190,7 +2190,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2296,7 +2296,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2319,7 +2319,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2339,7 +2339,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC12\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2362,7 +2362,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC12\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2384,6 +2384,8 @@
     <ClCompile Include="..\..\..\..\lib\asyn-ares.c" />

     <ClCompile Include="..\..\..\..\lib\asyn-thread.c" />

     <ClCompile Include="..\..\..\..\lib\base64.c" />

+    <ClCompile Include="..\..\..\..\lib\bufref.c" />

+    <ClCompile Include="..\..\..\..\lib\c-hyper.c" />

     <ClCompile Include="..\..\..\..\lib\conncache.c" />

     <ClCompile Include="..\..\..\..\lib\connect.c" />

     <ClCompile Include="..\..\..\..\lib\content_encoding.c" />

@@ -2430,7 +2432,9 @@
     <ClCompile Include="..\..\..\..\lib\hostip6.c" />

     <ClCompile Include="..\..\..\..\lib\hostip.c" />

     <ClCompile Include="..\..\..\..\lib\hostsyn.c" />

+    <ClCompile Include="..\..\..\..\lib\hsts.c" />

     <ClCompile Include="..\..\..\..\lib\http2.c" />

+    <ClCompile Include="..\..\..\..\lib\http_aws_sigv4.c" />

     <ClCompile Include="..\..\..\..\lib\http.c" />

     <ClCompile Include="..\..\..\..\lib\http_chunks.c" />

     <ClCompile Include="..\..\..\..\lib\http_digest.c" />

@@ -2499,6 +2503,7 @@
     <ClCompile Include="..\..\..\..\lib\vauth\cram.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest_sspi.c" />

+    <ClCompile Include="..\..\..\..\lib\vauth\gsasl.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_gssapi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_sspi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\ntlm.c" />

@@ -2522,6 +2527,7 @@
     <ClCompile Include="..\..\..\..\lib\vtls\mesalink.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />

+    <ClCompile Include="..\..\..\..\lib\vtls\rustls.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\sectransp.c" />

@@ -2533,6 +2539,8 @@
     <ClInclude Include="..\..\..\..\lib\amigaos.h" />

     <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />

     <ClInclude Include="..\..\..\..\lib\asyn.h" />

+    <ClInclude Include="..\..\..\..\lib\bufref.h" />

+    <ClInclude Include="..\..\..\..\lib\c-hyper.h" />

     <ClInclude Include="..\..\..\..\lib\config-win32.h" />

     <ClInclude Include="..\..\..\..\lib\conncache.h" />

     <ClInclude Include="..\..\..\..\lib\connect.h" />

@@ -2585,7 +2593,9 @@
     <ClInclude Include="..\..\..\..\lib\hash.h" />

     <ClInclude Include="..\..\..\..\lib\hostcheck.h" />

     <ClInclude Include="..\..\..\..\lib\hostip.h" />

+    <ClInclude Include="..\..\..\..\lib\hsts.h" />

     <ClInclude Include="..\..\..\..\lib\http2.h" />

+    <ClInclude Include="..\..\..\..\lib\http_aws_sigv4.h" />

     <ClInclude Include="..\..\..\..\lib\http_chunks.h" />

     <ClInclude Include="..\..\..\..\lib\http_digest.h" />

     <ClInclude Include="..\..\..\..\lib\http.h" />

@@ -2661,6 +2671,7 @@
     <ClInclude Include="..\..\..\..\lib\vtls\mesalink.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\nssg.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\openssl.h" />

+    <ClInclude Include="..\..\..\..\lib\vtls\rustls.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\schannel.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\sectransp.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\vtls.h" />

diff --git a/projects/Windows/VC12/src/curl.vcxproj b/projects/Windows/VC12/src/curl.vcxproj
index bb6b5c0..7f55bf2 100644
--- a/projects/Windows/VC12/src/curl.vcxproj
+++ b/projects/Windows/VC12/src/curl.vcxproj
@@ -1972,7 +1972,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2004,7 +2004,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2035,7 +2035,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2065,7 +2065,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2094,7 +2094,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2126,7 +2126,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2157,7 +2157,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2187,7 +2187,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC12\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2216,7 +2216,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2248,7 +2248,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2279,7 +2279,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2309,7 +2309,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2338,7 +2338,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2370,7 +2370,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2401,7 +2401,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2431,7 +2431,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC12\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC12\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC12\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2714,7 +2714,6 @@
     <ClCompile Include="..\..\..\..\src\tool_hugehelp.c" />

     <ClCompile Include="..\..\..\..\src\tool_libinfo.c" />

     <ClCompile Include="..\..\..\..\src\tool_main.c" />

-    <ClCompile Include="..\..\..\..\src\tool_metalink.c" />

     <ClCompile Include="..\..\..\..\src\tool_msgs.c" />

     <ClCompile Include="..\..\..\..\src\tool_operate.c" />

     <ClCompile Include="..\..\..\..\src\tool_operhlp.c" />

@@ -2766,7 +2765,6 @@
     <ClInclude Include="..\..\..\..\src\tool_hugehelp.h" />

     <ClInclude Include="..\..\..\..\src\tool_libinfo.h" />

     <ClInclude Include="..\..\..\..\src\tool_main.h" />

-    <ClInclude Include="..\..\..\..\src\tool_metalink.h" />

     <ClInclude Include="..\..\..\..\src\tool_msgs.h" />

     <ClInclude Include="..\..\..\..\src\tool_operate.h" />

     <ClInclude Include="..\..\..\..\src\tool_operhlp.h" />

diff --git a/projects/Windows/VC14/lib/libcurl.vcxproj b/projects/Windows/VC14/lib/libcurl.vcxproj
index 3bc6191..c7b860c 100644
--- a/projects/Windows/VC14/lib/libcurl.vcxproj
+++ b/projects/Windows/VC14/lib/libcurl.vcxproj
@@ -1353,7 +1353,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1366,7 +1366,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1387,7 +1387,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1400,7 +1400,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1421,7 +1421,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1433,7 +1433,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1453,7 +1453,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1465,7 +1465,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1743,7 +1743,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1756,7 +1756,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1777,7 +1777,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1790,7 +1790,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1811,7 +1811,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1823,7 +1823,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1843,7 +1843,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1855,7 +1855,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1865,7 +1865,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1888,7 +1888,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1908,7 +1908,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -1931,7 +1931,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2037,7 +2037,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2060,7 +2060,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2080,7 +2080,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2103,7 +2103,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MinimalRebuild>true</MinimalRebuild>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

@@ -2124,7 +2124,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2147,7 +2147,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2167,7 +2167,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2190,7 +2190,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2296,7 +2296,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2319,7 +2319,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2339,7 +2339,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC14\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2362,7 +2362,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC14\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2384,6 +2384,8 @@
     <ClCompile Include="..\..\..\..\lib\asyn-ares.c" />

     <ClCompile Include="..\..\..\..\lib\asyn-thread.c" />

     <ClCompile Include="..\..\..\..\lib\base64.c" />

+    <ClCompile Include="..\..\..\..\lib\bufref.c" />

+    <ClCompile Include="..\..\..\..\lib\c-hyper.c" />

     <ClCompile Include="..\..\..\..\lib\conncache.c" />

     <ClCompile Include="..\..\..\..\lib\connect.c" />

     <ClCompile Include="..\..\..\..\lib\content_encoding.c" />

@@ -2430,7 +2432,9 @@
     <ClCompile Include="..\..\..\..\lib\hostip6.c" />

     <ClCompile Include="..\..\..\..\lib\hostip.c" />

     <ClCompile Include="..\..\..\..\lib\hostsyn.c" />

+    <ClCompile Include="..\..\..\..\lib\hsts.c" />

     <ClCompile Include="..\..\..\..\lib\http2.c" />

+    <ClCompile Include="..\..\..\..\lib\http_aws_sigv4.c" />

     <ClCompile Include="..\..\..\..\lib\http.c" />

     <ClCompile Include="..\..\..\..\lib\http_chunks.c" />

     <ClCompile Include="..\..\..\..\lib\http_digest.c" />

@@ -2499,6 +2503,7 @@
     <ClCompile Include="..\..\..\..\lib\vauth\cram.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest_sspi.c" />

+    <ClCompile Include="..\..\..\..\lib\vauth\gsasl.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_gssapi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_sspi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\ntlm.c" />

@@ -2522,6 +2527,7 @@
     <ClCompile Include="..\..\..\..\lib\vtls\mesalink.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />

+    <ClCompile Include="..\..\..\..\lib\vtls\rustls.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\sectransp.c" />

@@ -2533,6 +2539,8 @@
     <ClInclude Include="..\..\..\..\lib\amigaos.h" />

     <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />

     <ClInclude Include="..\..\..\..\lib\asyn.h" />

+    <ClInclude Include="..\..\..\..\lib\bufref.h" />

+    <ClInclude Include="..\..\..\..\lib\c-hyper.h" />

     <ClInclude Include="..\..\..\..\lib\config-win32.h" />

     <ClInclude Include="..\..\..\..\lib\conncache.h" />

     <ClInclude Include="..\..\..\..\lib\connect.h" />

@@ -2585,7 +2593,9 @@
     <ClInclude Include="..\..\..\..\lib\hash.h" />

     <ClInclude Include="..\..\..\..\lib\hostcheck.h" />

     <ClInclude Include="..\..\..\..\lib\hostip.h" />

+    <ClInclude Include="..\..\..\..\lib\hsts.h" />

     <ClInclude Include="..\..\..\..\lib\http2.h" />

+    <ClInclude Include="..\..\..\..\lib\http_aws_sigv4.h" />

     <ClInclude Include="..\..\..\..\lib\http_chunks.h" />

     <ClInclude Include="..\..\..\..\lib\http_digest.h" />

     <ClInclude Include="..\..\..\..\lib\http.h" />

@@ -2661,6 +2671,7 @@
     <ClInclude Include="..\..\..\..\lib\vtls\mesalink.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\nssg.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\openssl.h" />

+    <ClInclude Include="..\..\..\..\lib\vtls\rustls.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\schannel.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\sectransp.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\vtls.h" />

diff --git a/projects/Windows/VC14/src/curl.vcxproj b/projects/Windows/VC14/src/curl.vcxproj
index 2f29865..33c7457 100644
--- a/projects/Windows/VC14/src/curl.vcxproj
+++ b/projects/Windows/VC14/src/curl.vcxproj
@@ -1972,7 +1972,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2004,7 +2004,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2035,7 +2035,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2065,7 +2065,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2094,7 +2094,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC14\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2126,7 +2126,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC14\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2157,7 +2157,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC14\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2187,7 +2187,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC14\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2216,7 +2216,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2248,7 +2248,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2279,7 +2279,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2309,7 +2309,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2338,7 +2338,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2370,7 +2370,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2401,7 +2401,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2431,7 +2431,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC14\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC14\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC14\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2714,7 +2714,6 @@
     <ClCompile Include="..\..\..\..\src\tool_hugehelp.c" />

     <ClCompile Include="..\..\..\..\src\tool_libinfo.c" />

     <ClCompile Include="..\..\..\..\src\tool_main.c" />

-    <ClCompile Include="..\..\..\..\src\tool_metalink.c" />

     <ClCompile Include="..\..\..\..\src\tool_msgs.c" />

     <ClCompile Include="..\..\..\..\src\tool_operate.c" />

     <ClCompile Include="..\..\..\..\src\tool_operhlp.c" />

@@ -2766,7 +2765,6 @@
     <ClInclude Include="..\..\..\..\src\tool_hugehelp.h" />

     <ClInclude Include="..\..\..\..\src\tool_libinfo.h" />

     <ClInclude Include="..\..\..\..\src\tool_main.h" />

-    <ClInclude Include="..\..\..\..\src\tool_metalink.h" />

     <ClInclude Include="..\..\..\..\src\tool_msgs.h" />

     <ClInclude Include="..\..\..\..\src\tool_operate.h" />

     <ClInclude Include="..\..\..\..\src\tool_operhlp.h" />

diff --git a/projects/Windows/VC15/lib/libcurl.vcxproj b/projects/Windows/VC15/lib/libcurl.vcxproj
index 98a38f9..9051489 100644
--- a/projects/Windows/VC15/lib/libcurl.vcxproj
+++ b/projects/Windows/VC15/lib/libcurl.vcxproj
@@ -1345,7 +1345,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1357,7 +1357,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1378,7 +1378,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1390,7 +1390,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1411,7 +1411,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1423,7 +1423,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1443,7 +1443,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1455,7 +1455,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1729,7 +1729,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1741,7 +1741,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1762,7 +1762,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1774,7 +1774,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1795,7 +1795,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1807,7 +1807,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ManifestFile>$(IntDir)$(TargetFileName).intermediate.manifest</ManifestFile>

@@ -1827,7 +1827,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -1839,7 +1839,7 @@
       <Culture>0x0409</Culture>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>

@@ -1849,7 +1849,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1871,7 +1871,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1890,7 +1890,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - DLL OpenSSL - DLL LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -1912,7 +1912,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -2013,7 +2013,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -2035,7 +2035,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\LIB Debug\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -2054,7 +2054,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='LIB Debug - LIB OpenSSL - LIB LibSSH2|Win32'">

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -2076,7 +2076,7 @@
     </Midl>

     <ClCompile>

       <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

@@ -2096,7 +2096,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2119,7 +2119,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2139,7 +2139,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2162,7 +2162,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2268,7 +2268,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2291,7 +2291,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\LIB Release\include;..\..\..\..\..\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2311,7 +2311,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC15\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2334,7 +2334,7 @@
     <ClCompile>

       <Optimization>MaxSpeed</Optimization>

       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC15\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

       <PreprocessorDefinitions>NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <StringPooling>true</StringPooling>

       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

@@ -2356,6 +2356,8 @@
     <ClCompile Include="..\..\..\..\lib\asyn-ares.c" />

     <ClCompile Include="..\..\..\..\lib\asyn-thread.c" />

     <ClCompile Include="..\..\..\..\lib\base64.c" />

+    <ClCompile Include="..\..\..\..\lib\bufref.c" />

+    <ClCompile Include="..\..\..\..\lib\c-hyper.c" />

     <ClCompile Include="..\..\..\..\lib\conncache.c" />

     <ClCompile Include="..\..\..\..\lib\connect.c" />

     <ClCompile Include="..\..\..\..\lib\content_encoding.c" />

@@ -2402,7 +2404,9 @@
     <ClCompile Include="..\..\..\..\lib\hostip6.c" />

     <ClCompile Include="..\..\..\..\lib\hostip.c" />

     <ClCompile Include="..\..\..\..\lib\hostsyn.c" />

+    <ClCompile Include="..\..\..\..\lib\hsts.c" />

     <ClCompile Include="..\..\..\..\lib\http2.c" />

+    <ClCompile Include="..\..\..\..\lib\http_aws_sigv4.c" />

     <ClCompile Include="..\..\..\..\lib\http.c" />

     <ClCompile Include="..\..\..\..\lib\http_chunks.c" />

     <ClCompile Include="..\..\..\..\lib\http_digest.c" />

@@ -2471,6 +2475,7 @@
     <ClCompile Include="..\..\..\..\lib\vauth\cram.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\digest_sspi.c" />

+    <ClCompile Include="..\..\..\..\lib\vauth\gsasl.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_gssapi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\krb5_sspi.c" />

     <ClCompile Include="..\..\..\..\lib\vauth\ntlm.c" />

@@ -2494,6 +2499,7 @@
     <ClCompile Include="..\..\..\..\lib\vtls\mesalink.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />

+    <ClCompile Include="..\..\..\..\lib\vtls\rustls.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />

     <ClCompile Include="..\..\..\..\lib\vtls\sectransp.c" />

@@ -2505,6 +2511,8 @@
     <ClInclude Include="..\..\..\..\lib\amigaos.h" />

     <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />

     <ClInclude Include="..\..\..\..\lib\asyn.h" />

+    <ClInclude Include="..\..\..\..\lib\bufref.h" />

+    <ClInclude Include="..\..\..\..\lib\c-hyper.h" />

     <ClInclude Include="..\..\..\..\lib\config-win32.h" />

     <ClInclude Include="..\..\..\..\lib\conncache.h" />

     <ClInclude Include="..\..\..\..\lib\connect.h" />

@@ -2557,7 +2565,9 @@
     <ClInclude Include="..\..\..\..\lib\hash.h" />

     <ClInclude Include="..\..\..\..\lib\hostcheck.h" />

     <ClInclude Include="..\..\..\..\lib\hostip.h" />

+    <ClInclude Include="..\..\..\..\lib\hsts.h" />

     <ClInclude Include="..\..\..\..\lib\http2.h" />

+    <ClInclude Include="..\..\..\..\lib\http_aws_sigv4.h" />

     <ClInclude Include="..\..\..\..\lib\http_chunks.h" />

     <ClInclude Include="..\..\..\..\lib\http_digest.h" />

     <ClInclude Include="..\..\..\..\lib\http.h" />

@@ -2633,6 +2643,7 @@
     <ClInclude Include="..\..\..\..\lib\vtls\mesalink.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\nssg.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\openssl.h" />

+    <ClInclude Include="..\..\..\..\lib\vtls\rustls.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\schannel.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\sectransp.h" />

     <ClInclude Include="..\..\..\..\lib\vtls\vtls.h" />

diff --git a/projects/Windows/VC15/src/curl.vcxproj b/projects/Windows/VC15/src/curl.vcxproj
index 85d9179..220c71a 100644
--- a/projects/Windows/VC15/src/curl.vcxproj
+++ b/projects/Windows/VC15/src/curl.vcxproj
@@ -1955,7 +1955,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -1986,7 +1986,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2017,7 +2017,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2047,7 +2047,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2075,7 +2075,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC15\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2106,7 +2106,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC15\LIB Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2137,7 +2137,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC15\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2167,7 +2167,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC15\LIB Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2195,7 +2195,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2226,7 +2226,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2257,7 +2257,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2287,7 +2287,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2315,7 +2315,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2346,7 +2346,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libeay32.lib;ssleay32.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurld.lib;libcrypto.lib;libssl.lib;libssh2d.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <GenerateDebugInformation>true</GenerateDebugInformation>

@@ -2377,7 +2377,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libeay32.lib;ssleay32.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libcrypto.lib;libssl.lib;libssh2.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win32\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win32\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2407,7 +2407,7 @@
       <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ResourceCompile>

     <Link>

-      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>

+      <AdditionalDependencies>crypt32.lib;ws2_32.lib;wldap32.lib;libcurl.lib;libssh2.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>

       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

       <AdditionalLibraryDirectories>..\..\..\..\build\Win64\VC15\$(Configuration);..\..\..\..\..\openssl\build\Win64\VC15\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC15\DLL Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

       <SubSystem>Console</SubSystem>

@@ -2686,7 +2686,6 @@
     <ClCompile Include="..\..\..\..\src\tool_hugehelp.c" />

     <ClCompile Include="..\..\..\..\src\tool_libinfo.c" />

     <ClCompile Include="..\..\..\..\src\tool_main.c" />

-    <ClCompile Include="..\..\..\..\src\tool_metalink.c" />

     <ClCompile Include="..\..\..\..\src\tool_msgs.c" />

     <ClCompile Include="..\..\..\..\src\tool_operate.c" />

     <ClCompile Include="..\..\..\..\src\tool_operhlp.c" />

@@ -2738,7 +2737,6 @@
     <ClInclude Include="..\..\..\..\src\tool_hugehelp.h" />

     <ClInclude Include="..\..\..\..\src\tool_libinfo.h" />

     <ClInclude Include="..\..\..\..\src\tool_main.h" />

-    <ClInclude Include="..\..\..\..\src\tool_metalink.h" />

     <ClInclude Include="..\..\..\..\src\tool_msgs.h" />

     <ClInclude Include="..\..\..\..\src\tool_operate.h" />

     <ClInclude Include="..\..\..\..\src\tool_operhlp.h" />

diff --git a/projects/Windows/VC6/lib/libcurl.dsp b/projects/Windows/VC6/lib/libcurl.dsp
index 816afae..db26bb0 100644
--- a/projects/Windows/VC6/lib/libcurl.dsp
+++ b/projects/Windows/VC6/lib/libcurl.dsp
@@ -93,8 +93,8 @@
 # PROP Ignore_Export_Lib 0

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c

-# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c

+# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c

+# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /FD /EHsc /GZ /c

 MTL=midl.exe

 # ADD BASE MTL /nologo /D "_DEBUG" /win32

 # ADD MTL /nologo /D "_DEBUG" /win32

@@ -105,8 +105,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /fixed:no

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /fixed:no

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no

 

 !ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Debug DLL OpenSSL DLL LibSSH2"

 

@@ -123,8 +123,8 @@
 # PROP Ignore_Export_Lib 0

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

-# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

+# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

+# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

 MTL=midl.exe

 # ADD BASE MTL /nologo /D "_DEBUG" /win32

 # ADD MTL /nologo /D "_DEBUG" /win32

@@ -135,8 +135,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2d.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\DLL Debug - DLL OpenSSL - DLL LibSSH2\libcurld.dll" /pdbtype:con /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

 

 !ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Debug DLL Windows SSPI"

 

@@ -242,8 +242,8 @@
 # PROP Ignore_Export_Lib 0

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c

-# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c

+# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c

+# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /FD /EHsc /c

 MTL=midl.exe

 # ADD BASE MTL /nologo /D "NDEBUG" /win32

 # ADD MTL /nologo /D "NDEBUG" /win32

@@ -254,8 +254,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no /release

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib /nologo /dll /pdb:none /machine:I386 /fixed:no /release

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no /release

 

 !ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Release DLL OpenSSL DLL LibSSH2"

 

@@ -272,8 +272,8 @@
 # PROP Ignore_Export_Lib 0

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

-# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

+# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

+# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

 MTL=midl.exe

 # ADD BASE MTL /nologo /D "NDEBUG" /win32

 # ADD MTL /nologo /D "NDEBUG" /win32

@@ -284,8 +284,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no /release

 

 !ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Release DLL Windows SSPI"

 

@@ -385,8 +385,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

-# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

+# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

+# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "_DEBUG"

 # ADD RSC /l 0x409 /d "_DEBUG"

@@ -410,8 +410,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

-# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

+# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

+# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Debug\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "_DEBUG"

 # ADD RSC /l 0x409 /d "_DEBUG"

@@ -485,8 +485,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

-# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

+# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Debug\include" /I "..\..\..\..\..\openssl\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

+# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Debug\include" /I "..\..\..\..\..\openssl\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /GZ /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "_DEBUG"

 # ADD RSC /l 0x409 /d "_DEBUG"

@@ -510,8 +510,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

-# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

+# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Debug\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

+# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Debug\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "DEBUGBUILD" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /GZ /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "_DEBUG"

 # ADD RSC /l 0x409 /d "_DEBUG"

@@ -560,8 +560,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

-# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

+# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

+# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "NDEBUG"

 # ADD RSC /l 0x409 /d "NDEBUG"

@@ -585,8 +585,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

-# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

+# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

+# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\DLL Release\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "NDEBUG"

 # ADD RSC /l 0x409 /d "NDEBUG"

@@ -660,8 +660,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

-# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

+# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Release\include" /I "..\..\..\..\..\openssl\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

+# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Release\include" /I "..\..\..\..\..\openssl\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /FD /EHsc /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "NDEBUG"

 # ADD RSC /l 0x409 /d "NDEBUG"

@@ -685,8 +685,8 @@
 # PROP Intermediate_Dir "..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\lib"

 # PROP Target_Dir ""

 CPP=cl.exe

-# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

-# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\inc32" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

+# ADD BASE CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Release\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

+# ADD CPP /nologo /MD /W4 /O2 /I "$(ProgramFiles)\Microsoft Platform SDK\Include" /I "..\..\..\..\include" /I "..\..\..\..\lib" /I "..\..\..\..\..\openssl\include\..\build\Win32\VC6\LIB Release\include" /I "..\..\..\..\..\openssl\include" /I "..\..\..\..\..\libssh2\include" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /D "USE_OPENSSL" /D "USE_LIBSSH2" /D "HAVE_LIBSSH2_H" /FD /EHsc /c

 RSC=rc.exe

 # ADD BASE RSC /l 0x409 /d "NDEBUG"

 # ADD RSC /l 0x409 /d "NDEBUG"

@@ -750,6 +750,14 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\bufref.c

+# End Source File

+# Begin Source File

+

+SOURCE=..\..\..\..\lib\c-hyper.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\conncache.c

 # End Source File

 # Begin Source File

@@ -934,10 +942,18 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\hsts.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\http2.c

 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\http_aws_sigv4.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\http.c

 # End Source File

 # Begin Source File

@@ -1210,6 +1226,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\vauth\gsasl.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\vauth\krb5_gssapi.c

 # End Source File

 # Begin Source File

@@ -1302,6 +1322,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\vtls\rustls.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\vtls\schannel.c

 # End Source File

 # Begin Source File

@@ -1342,6 +1366,14 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\bufref.h

+# End Source File

+# Begin Source File

+

+SOURCE=..\..\..\..\lib\c-hyper.h

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\config-win32.h

 # End Source File

 # Begin Source File

@@ -1550,10 +1582,18 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\hsts.h

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\http2.h

 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\http_aws_sigv4.h

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\http_chunks.h

 # End Source File

 # Begin Source File

@@ -1854,6 +1894,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\..\..\lib\vtls\rustls.h

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\..\..\lib\vtls\schannel.h

 # End Source File

 # Begin Source File

diff --git a/projects/Windows/VC6/src/curl.dsp b/projects/Windows/VC6/src/curl.dsp
index b35cd1a..0793834 100644
--- a/projects/Windows/VC6/src/curl.dsp
+++ b/projects/Windows/VC6/src/curl.dsp
@@ -344,8 +344,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /fixed:no

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /fixed:no

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Debug DLL OpenSSL DLL LibSSH2"

 

@@ -369,8 +369,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL - DLL LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Debug" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Debug DLL Windows SSPI"

 

@@ -444,8 +444,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /fixed:no

-# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /fixed:no

+# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /fixed:no

+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Debug LIB OpenSSL LIB LibSSH2"

 

@@ -469,8 +469,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no

-# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no

+# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no

+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL - LIB LibSSH2\curld.exe" /pdbtype:con /libpath:"..\..\..\..\build\Win32\VC6\LIB Debug - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Debug" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Debug" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Release"

 

@@ -518,8 +518,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /fixed:no

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /fixed:no

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Release DLL OpenSSL DLL LibSSH2"

 

@@ -543,8 +543,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no

-# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no

+# ADD BASE LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no

+# ADD LINK32 crypt32.lib advapi32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL - DLL LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - DLL OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\DLL Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\DLL Release" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Release DLL Windows SSPI"

 

@@ -618,8 +618,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /fixed:no

-# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /fixed:no

+# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /fixed:no

+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /fixed:no

 

 !ELSEIF  "$(CFG)" == "curl - Win32 LIB Release LIB OpenSSL LIB LibSSH2"

 

@@ -643,8 +643,8 @@
 # ADD BASE BSC32 /nologo

 # ADD BSC32 /nologo

 LINK32=link.exe

-# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no

-# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no

+# ADD BASE LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no

+# ADD LINK32 advapi32.lib crypt32.lib gdi32.lib user32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL - LIB LibSSH2\curl.exe" /libpath:"..\..\..\..\build\Win32\VC6\LIB Release - LIB OpenSSL" /libpath:"..\..\..\..\..\openssl\build\Win32\VC6\LIB Release" /libpath:"..\..\..\..\..\libssh2\build\Win32\VC6\LIB Release" /fixed:no

 

 !ENDIF 

 

@@ -803,10 +803,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\..\..\src\tool_metalink.c

-# End Source File

-# Begin Source File

-

 SOURCE=..\..\..\..\src\tool_msgs.c

 # End Source File

 # Begin Source File

@@ -1007,10 +1003,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=..\..\..\..\src\tool_metalink.h

-# End Source File

-# Begin Source File

-

 SOURCE=..\..\..\..\src\tool_msgs.h

 # End Source File

 # Begin Source File

diff --git a/projects/Windows/VC7.1/lib/libcurl.vcproj b/projects/Windows/VC7.1/lib/libcurl.vcproj
index 67a2f5e..cf292d9 100644
--- a/projects/Windows/VC7.1/lib/libcurl.vcproj
+++ b/projects/Windows/VC7.1/lib/libcurl.vcproj
@@ -22,7 +22,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Release\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -35,7 +35,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -80,7 +80,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Debug\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -93,7 +93,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -197,7 +197,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Release\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -244,7 +244,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Debug\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -348,7 +348,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\LIB Debug\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -442,7 +442,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Debug\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -651,7 +651,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Release\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -664,7 +664,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -709,7 +709,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\LIB Release\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -803,7 +803,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Release\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -850,7 +850,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\LIB Release\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -944,7 +944,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\DLL Debug\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -957,7 +957,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -1003,7 +1003,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7.1\LIB Debug\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -1271,6 +1271,12 @@
 				RelativePath="..\..\..\..\lib\base64.c">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.c">

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.c">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\conncache.c">

 			</File>

 			<File

@@ -1409,9 +1415,15 @@
 				RelativePath="..\..\..\..\lib\hostsyn.c">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.c">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.c">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.c">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http.c">

 			</File>

 			<File

@@ -1620,6 +1632,12 @@
 				RelativePath="..\..\..\..\lib\asyn.h">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.h">

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.h">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\config-win32.h">

 			</File>

 			<File

@@ -1776,9 +1794,15 @@
 				RelativePath="..\..\..\..\lib\hostip.h">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.h">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.h">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.h">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http_chunks.h">

 			</File>

 			<File

@@ -1982,6 +2006,9 @@
 					RelativePath="..\..\..\..\lib\vauth\digest_sspi.c">

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vauth\gsasl.c">

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vauth\krb5_gssapi.c">

 				</File>

 				<File

@@ -2108,6 +2135,9 @@
 					RelativePath="..\..\..\..\lib\vtls\openssl.c">

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.c">

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.c">

 				</File>

 				<File

@@ -2154,6 +2184,9 @@
 					RelativePath="..\..\..\..\lib\vtls\openssl.h">

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.h">

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.h">

 				</File>

 				<File

diff --git a/projects/Windows/VC7.1/src/curl.vcproj b/projects/Windows/VC7.1/src/curl.vcproj
index 08c738a..ecb83dc 100644
--- a/projects/Windows/VC7.1/src/curl.vcproj
+++ b/projects/Windows/VC7.1/src/curl.vcproj
@@ -34,7 +34,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -199,7 +199,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -256,7 +256,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -370,7 +370,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -427,7 +427,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -482,7 +482,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -592,7 +592,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -647,7 +647,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -1455,9 +1455,6 @@
 				RelativePath="..\..\..\..\src\tool_main.c">

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.c">

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.c">

 			</File>

 			<File

@@ -1609,9 +1606,6 @@
 				RelativePath="..\..\..\..\src\tool_main.h">

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.h">

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.h">

 			</File>

 			<File

diff --git a/projects/Windows/VC7/lib/libcurl.vcproj b/projects/Windows/VC7/lib/libcurl.vcproj
index d8a45a1..57f76d3 100644
--- a/projects/Windows/VC7/lib/libcurl.vcproj
+++ b/projects/Windows/VC7/lib/libcurl.vcproj
@@ -22,7 +22,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Release\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -35,7 +35,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -74,7 +74,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Debug\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -87,7 +87,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -179,7 +179,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Release\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -220,7 +220,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Debug\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -312,7 +312,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\LIB Debug\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -394,7 +394,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Debug\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -579,7 +579,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Release\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -592,7 +592,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -631,7 +631,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\LIB Release\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -713,7 +713,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Release\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -754,7 +754,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\LIB Release\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="TRUE"

 				RuntimeLibrary="2"

@@ -836,7 +836,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32,..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\DLL Debug\include,..\..\..\..\..\openssl\include,..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -849,7 +849,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -889,7 +889,7 @@
 				Name="VCCLCompilerTool"

 				AdditionalOptions="/EHsc "

 				Optimization="0"

-				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="$(ProgramFiles)\Microsoft Platform SDK\Include,..\..\..\..\include,..\..\..\..\lib,..\..\..\..\..\openssl\include\..\build\Win32\VC7\LIB Debug\include,..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				BasicRuntimeChecks="3"

 				RuntimeLibrary="3"

@@ -1125,6 +1125,12 @@
 				RelativePath="..\..\..\..\lib\base64.c">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.c">

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.c">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\conncache.c">

 			</File>

 			<File

@@ -1263,9 +1269,15 @@
 				RelativePath="..\..\..\..\lib\hostsyn.c">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.c">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.c">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.c">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http.c">

 			</File>

 			<File

@@ -1474,6 +1486,12 @@
 				RelativePath="..\..\..\..\lib\asyn.h">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.h">

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.h">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\config-win32.h">

 			</File>

 			<File

@@ -1630,9 +1648,15 @@
 				RelativePath="..\..\..\..\lib\hostip.h">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.h">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.h">

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.h">

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http_chunks.h">

 			</File>

 			<File

@@ -1836,6 +1860,9 @@
 					RelativePath="..\..\..\..\lib\vauth\digest_sspi.c">

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vauth\gsasl.c">

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vauth\krb5_gssapi.c">

 				</File>

 				<File

@@ -1962,6 +1989,9 @@
 					RelativePath="..\..\..\..\lib\vtls\openssl.c">

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.c">

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.c">

 				</File>

 				<File

@@ -2008,6 +2038,9 @@
 					RelativePath="..\..\..\..\lib\vtls\openssl.h">

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.h">

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.h">

 				</File>

 				<File

diff --git a/projects/Windows/VC7/src/curl.vcproj b/projects/Windows/VC7/src/curl.vcproj
index 8e2a1dd..0390ef8 100644
--- a/projects/Windows/VC7/src/curl.vcproj
+++ b/projects/Windows/VC7/src/curl.vcproj
@@ -34,7 +34,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -181,7 +181,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -232,7 +232,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -334,7 +334,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -385,7 +385,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -434,7 +434,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -532,7 +532,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -581,7 +581,7 @@
 			<Tool

 				Name="VCLinkerTool"

 				AdditionalOptions="/MACHINE:I386 /FIXED:NO"

-				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib wldap32.lib ws2_32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				SuppressStartupBanner="TRUE"

@@ -1309,9 +1309,6 @@
 				RelativePath="..\..\..\..\src\tool_main.c">

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.c">

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.c">

 			</File>

 			<File

@@ -1463,9 +1460,6 @@
 				RelativePath="..\..\..\..\src\tool_main.h">

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.h">

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.h">

 			</File>

 			<File

diff --git a/projects/Windows/VC8/lib/libcurl.vcproj b/projects/Windows/VC8/lib/libcurl.vcproj
index 2d12151..3ed378f 100644
--- a/projects/Windows/VC8/lib/libcurl.vcproj
+++ b/projects/Windows/VC8/lib/libcurl.vcproj
@@ -661,7 +661,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -682,7 +682,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug"

@@ -749,7 +749,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -770,7 +770,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug"

@@ -837,7 +837,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -857,7 +857,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Release"

@@ -923,7 +923,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -943,7 +943,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Release"

@@ -1353,7 +1353,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1374,7 +1374,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Debug"

@@ -1441,7 +1441,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1462,7 +1462,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Debug"

@@ -1529,7 +1529,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -1549,7 +1549,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Release"

@@ -1615,7 +1615,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -1635,7 +1635,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Release"

@@ -1694,7 +1694,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1761,7 +1761,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1827,7 +1827,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1894,7 +1894,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2093,7 +2093,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\LIB Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2160,7 +2160,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\LIB Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2226,7 +2226,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2293,7 +2293,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2360,7 +2360,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2427,7 +2427,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2493,7 +2493,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2560,7 +2560,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2759,7 +2759,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\LIB Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2826,7 +2826,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\LIB Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2892,7 +2892,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC8\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2959,7 +2959,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC8\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -3637,6 +3637,14 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.c"

+			>

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.c"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\conncache.c"

 			>

 			</File>

@@ -3821,10 +3829,18 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.c"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.c"

 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.c"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http.c"

 			>

 			</File>

@@ -4101,6 +4117,14 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.h"

+			>

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.h"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\config-win32.h"

 			>

 			</File>

@@ -4309,10 +4333,18 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.h"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.h"

 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.h"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http_chunks.h"

 			>

 			</File>

@@ -4580,6 +4612,10 @@
 				>

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vauth\gsasl.c"

+				>

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vauth\krb5_gssapi.c"

 				>

 				</File>

@@ -4736,6 +4772,10 @@
 				>

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.c"

+				>

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.c"

 				>

 				</File>

@@ -4796,6 +4836,10 @@
 				>

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.h"

+				>

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.h"

 				>

 				</File>

diff --git a/projects/Windows/VC8/src/curl.vcproj b/projects/Windows/VC8/src/curl.vcproj
index 61fa593..9ae8b22 100644
--- a/projects/Windows/VC8/src/curl.vcproj
+++ b/projects/Windows/VC8/src/curl.vcproj
@@ -1758,7 +1758,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Debug"

@@ -1844,7 +1844,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Debug"

@@ -1929,7 +1929,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Release"

@@ -2013,7 +2013,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Release"

@@ -2096,7 +2096,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC8\LIB Debug"

@@ -2182,7 +2182,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC8\LIB Debug"

@@ -2267,7 +2267,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC8\LIB Release"

@@ -2351,7 +2351,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC8\LIB Release"

@@ -2434,7 +2434,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug"

@@ -2520,7 +2520,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug"

@@ -2605,7 +2605,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Release"

@@ -2689,7 +2689,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Release"

@@ -2772,7 +2772,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Debug"

@@ -2858,7 +2858,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Debug"

@@ -2943,7 +2943,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC8\DLL Release"

@@ -3027,7 +3027,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libssh2.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libssh2.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC8\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC8\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC8\DLL Release"

@@ -4205,10 +4205,6 @@
 			>

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.c"

-			>

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.c"

 			>

 			</File>

@@ -4409,10 +4405,6 @@
 			>

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.h"

-			>

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.h"

 			>

 			</File>

diff --git a/projects/Windows/VC9/lib/libcurl.vcproj b/projects/Windows/VC9/lib/libcurl.vcproj
index 3457513..35ae56e 100644
--- a/projects/Windows/VC9/lib/libcurl.vcproj
+++ b/projects/Windows/VC9/lib/libcurl.vcproj
@@ -650,7 +650,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -671,7 +671,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug"

@@ -735,7 +735,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_IPV6"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -756,7 +756,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug"

@@ -820,7 +820,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -840,7 +840,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Release"

@@ -903,7 +903,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_IPV6"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -923,7 +923,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Release"

@@ -1318,7 +1318,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1339,7 +1339,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Debug"

@@ -1403,7 +1403,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1424,7 +1424,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Debug"

@@ -1488,7 +1488,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -1508,7 +1508,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win32\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Release"

@@ -1571,7 +1571,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -1591,7 +1591,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).dll"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\..\openssl\build\Win64\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Release"

@@ -1647,7 +1647,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1714,7 +1714,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1780,7 +1780,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -1847,7 +1847,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2046,7 +2046,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\LIB Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2113,7 +2113,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\LIB Debug\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2179,7 +2179,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2246,7 +2246,7 @@
 			<Tool

 				Name="VCCLCompilerTool"

 				Optimization="0"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\LIB Debug\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="_DEBUG;BUILDING_LIBCURL;DEBUGBUILD;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				MinimalRebuild="true"

 				BasicRuntimeChecks="3"

@@ -2313,7 +2313,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2380,7 +2380,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2446,7 +2446,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2513,7 +2513,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\DLL Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2712,7 +2712,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\LIB Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2779,7 +2779,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\LIB Release\include;..\..\..\..\..\openssl\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_IPV6"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2845,7 +2845,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win32\VC9\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -2912,7 +2912,7 @@
 				Name="VCCLCompilerTool"

 				Optimization="2"

 				InlineFunctionExpansion="1"

-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\inc32;..\..\..\..\..\libssh2\include"

+				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\lib;..\..\..\..\..\openssl\include\..\build\Win64\VC9\LIB Release\include;..\..\..\..\..\openssl\include;..\..\..\..\..\libssh2\include"

 				PreprocessorDefinitions="NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_OPENSSL;USE_LIBSSH2;USE_IPV6;HAVE_LIBSSH2_H"

 				StringPooling="true"

 				RuntimeLibrary="2"

@@ -3578,6 +3578,14 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.c"

+			>

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.c"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\conncache.c"

 			>

 			</File>

@@ -3762,10 +3770,18 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.c"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.c"

 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.c"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http.c"

 			>

 			</File>

@@ -4042,6 +4058,14 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\bufref.h"

+			>

+			</File>

+			<File

+				RelativePath="..\..\..\..\lib\c-hyper.h"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\config-win32.h"

 			>

 			</File>

@@ -4250,10 +4274,18 @@
 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\hsts.h"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http2.h"

 			>

 			</File>

 			<File

+				RelativePath="..\..\..\..\lib\http_aws_sigv4.h"

+			>

+			</File>

+			<File

 				RelativePath="..\..\..\..\lib\http_chunks.h"

 			>

 			</File>

@@ -4521,6 +4553,10 @@
 				>

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vauth\gsasl.c"

+				>

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vauth\krb5_gssapi.c"

 				>

 				</File>

@@ -4677,6 +4713,10 @@
 				>

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.c"

+				>

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.c"

 				>

 				</File>

@@ -4737,6 +4777,10 @@
 				>

 				</File>

 				<File

+					RelativePath="..\..\..\..\lib\vtls\rustls.h"

+				>

+				</File>

+				<File

 					RelativePath="..\..\..\..\lib\vtls\schannel.h"

 				>

 				</File>

diff --git a/projects/Windows/VC9/src/curl.vcproj b/projects/Windows/VC9/src/curl.vcproj
index d32db51..2940238 100644
--- a/projects/Windows/VC9/src/curl.vcproj
+++ b/projects/Windows/VC9/src/curl.vcproj
@@ -1699,7 +1699,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Debug"

@@ -1782,7 +1782,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Debug"

@@ -1864,7 +1864,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Release"

@@ -1945,7 +1945,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Release"

@@ -2025,7 +2025,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Debug;..\..\..\..\..\libssh2\build\Win32\VC9\LIB Debug"

@@ -2108,7 +2108,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Debug;..\..\..\..\..\libssh2\build\Win64\VC9\LIB Debug"

@@ -2190,7 +2190,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\LIB Release;..\..\..\..\..\libssh2\build\Win32\VC9\LIB Release"

@@ -2271,7 +2271,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\LIB Release;..\..\..\..\..\libssh2\build\Win64\VC9\LIB Release"

@@ -2351,7 +2351,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug"

@@ -2434,7 +2434,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug"

@@ -2516,7 +2516,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Release"

@@ -2597,7 +2597,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Release"

@@ -2677,7 +2677,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Debug"

@@ -2760,7 +2760,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libeay32.lib ssleay32.lib libssh2d.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurld.lib libcrypto.lib libssl.lib libssh2d.lib"

 				OutputFile="$(OutDir)\$(ProjectName)d.exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Debug;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Debug"

@@ -2842,7 +2842,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libeay32.lib ssleay32.lib libssh2.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libcrypto.lib libssl.lib libssh2.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win32\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win32\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win32\VC9\DLL Release"

@@ -2923,7 +2923,7 @@
 			/>

 			<Tool

 				Name="VCLinkerTool"

-				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libssh2.lib libeay32.lib ssleay32.lib"

+				AdditionalDependencies="crypt32.lib ws2_32.lib wldap32.lib libcurl.lib libssh2.lib libcrypto.lib libssl.lib"

 				OutputFile="$(OutDir)\$(ProjectName).exe"

 				LinkIncremental="1"

 				AdditionalLibraryDirectories="..\..\..\..\build\Win64\VC9\$(ConfigurationName);..\..\..\..\..\openssl\build\Win64\VC9\DLL Release;..\..\..\..\..\libssh2\build\Win64\VC9\DLL Release"

@@ -4062,10 +4062,6 @@
 			>

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.c"

-			>

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.c"

 			>

 			</File>

@@ -4266,10 +4262,6 @@
 			>

 			</File>

 			<File

-				RelativePath="..\..\..\..\src\tool_metalink.h"

-			>

-			</File>

-			<File

 				RelativePath="..\..\..\..\src\tool_msgs.h"

 			>

 			</File>

diff --git a/projects/build-openssl.bat b/projects/build-openssl.bat
index c9633b4..a4a661b 100644
--- a/projects/build-openssl.bat
+++ b/projects/build-openssl.bat
@@ -1,695 +1,741 @@
-@echo off
-rem ***************************************************************************
-rem *                                  _   _ ____  _
-rem *  Project                     ___| | | |  _ \| |
-rem *                             / __| | | | |_) | |
-rem *                            | (__| |_| |  _ <| |___
-rem *                             \___|\___/|_| \_\_____|
-rem *
-rem * Copyright (C) 2012 - 2019, Steve Holme, <steve_holme@hotmail.com>.
-rem *
-rem * This software is licensed as described in the file COPYING, which
-rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
-rem *
-rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-rem * copies of the Software, and permit persons to whom the Software is
-rem * furnished to do so, under the terms of the COPYING file.
-rem *
-rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-rem * KIND, either express or implied.
-rem *
-rem ***************************************************************************
-
-:begin
-  rem Check we are running on a Windows NT derived OS
-  if not "%OS%" == "Windows_NT" goto nodos
-
-  rem Set our variables
-  setlocal ENABLEDELAYEDEXPANSION
-  set VC_VER=
-  set BUILD_PLATFORM=
-  set BUILD_CONFIG=
-
-  rem Ensure we have the required arguments
-  if /i "%~1" == "" goto syntax
-
-  rem Calculate the program files directory
-  if defined PROGRAMFILES (
-    set "PF=%PROGRAMFILES%"
-    set OS_PLATFORM=x86
-  )
-  if defined PROGRAMFILES(x86) (
-    set "PF=%PROGRAMFILES(x86)%"
-    set OS_PLATFORM=x64
-  )
-
-:parseArgs
-  if not "%~1" == "" (
-    if /i "%~1" == "vc6" (
-      set VC_VER=6.0
-      set VC_DESC=VC6
-      set "VC_PATH=Microsoft Visual Studio\VC98"
-    ) else if /i "%~1" == "vc7" (
-      set VC_VER=7.0
-      set VC_DESC=VC7
-      set "VC_PATH=Microsoft Visual Studio .NET\Vc7"
-    ) else if /i "%~1" == "vc7.1" (
-      set VC_VER=7.1
-      set VC_DESC=VC7.1
-      set "VC_PATH=Microsoft Visual Studio .NET 2003\Vc7"
-    ) else if /i "%~1" == "vc8" (
-      set VC_VER=8.0
-      set VC_DESC=VC8
-      set "VC_PATH=Microsoft Visual Studio 8\VC"
-    ) else if /i "%~1" == "vc9" (
-      set VC_VER=9.0
-      set VC_DESC=VC9
-      set "VC_PATH=Microsoft Visual Studio 9.0\VC"
-    ) else if /i "%~1" == "vc10" (
-      set VC_VER=10.0
-      set VC_DESC=VC10
-      set "VC_PATH=Microsoft Visual Studio 10.0\VC"
-    ) else if /i "%~1" == "vc11" (
-      set VC_VER=11.0
-      set VC_DESC=VC11
-      set "VC_PATH=Microsoft Visual Studio 11.0\VC"
-    ) else if /i "%~1" == "vc12" (
-      set VC_VER=12.0
-      set VC_DESC=VC12
-      set "VC_PATH=Microsoft Visual Studio 12.0\VC"
-    ) else if /i "%~1" == "vc14" (
-      set VC_VER=14.0
-      set VC_DESC=VC14
-      set "VC_PATH=Microsoft Visual Studio 14.0\VC"
-    ) else if /i "%~1" == "vc14.1" (
-      set VC_VER=14.1
-      set VC_DESC=VC14.1
-
-      rem Determine the VC14.1 path based on the installed edition in descending
-      rem order (Enterprise, then Professional and finally Community)
-      if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
-        set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
-      ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
-        set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
-      ) else (
-        set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
-      )
-    ) else if /i "%~1" == "vc14.2" (
-      set VC_VER=14.2
-      set VC_DESC=VC14.2
-
-      rem Determine the VC14.2 path based on the installed edition in descending
-      rem order (Enterprise, then Professional and finally Community)
-      if exist "%PF%\Microsoft Visual Studio\2019\Enterprise\VC" (
-        set "VC_PATH=Microsoft Visual Studio\2019\Enterprise\VC"
-      ) else if exist "%PF%\Microsoft Visual Studio\2019\Professional\VC" (
-        set "VC_PATH=Microsoft Visual Studio\2019\Professional\VC"
-      ) else (
-        set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"
-      )
-    ) else if /i "%~1%" == "x86" (
-      set BUILD_PLATFORM=x86
-    ) else if /i "%~1%" == "x64" (
-      set BUILD_PLATFORM=x64
-    ) else if /i "%~1%" == "debug" (
-      set BUILD_CONFIG=debug
-    ) else if /i "%~1%" == "release" (
-      set BUILD_CONFIG=release
-    ) else if /i "%~1" == "-?" (
-      goto syntax
-    ) else if /i "%~1" == "-h" (
-      goto syntax
-    ) else if /i "%~1" == "-help" (
-      goto syntax
-    ) else if /i "%~1" == "-VSpath" (
-      if "%~2" == "" (
-        echo.
-        echo Error. Please provide VS Path.
-        goto error
-      ) else (
-        set "ABS_VC_PATH=%~2\VC"
-        shift
-      )
-    ) else if /i "%~1" == "-perlpath" (
-      if "%~2" == "" (
-        echo.
-        echo Error. Please provide Perl root Path.
-        goto error
-      ) else (
-        set "PERL_PATH=%~2"
-        shift
-      )
-    ) else (
-      if not defined START_DIR (
-        set START_DIR=%~1%
-      ) else (
-        goto unknown
-      )
-    )
-
-    shift & goto parseArgs
-  )
-
-:prerequisites
-  rem Compiler is a required parameter
-  if not defined VC_VER goto syntax
-
-  rem Default the start directory if one isn't specified
-  if not defined START_DIR set START_DIR=..\..\openssl
-
-  if not defined ABS_VC_PATH (
-    rem Check we have a program files directory
-    if not defined PF goto nopf
-    set "ABS_VC_PATH=%PF%\%VC_PATH%"
-  )
-
-  rem Check we have Visual Studio installed
-  if not exist "%ABS_VC_PATH%" goto novc
-
-  if not defined PERL_PATH (
-    rem Check we have Perl in our path
-    perl --version <NUL 1>NUL 2>&1
-    if errorlevel 1 (
-      rem It isn't so check we have it installed and set the path if it is
-      if exist "%SystemDrive%\Perl" (
-        set "PATH=%SystemDrive%\Perl\bin;%PATH%"
-      ) else (
-        if exist "%SystemDrive%\Perl64" (
-          set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
-        ) else (
-          goto noperl
-        )
-      )
-    )
-  ) else (
-    set "PATH=%PERL_PATH%\Perl\bin;%PATH%"
-  )
-
-  rem Check the start directory exists
-  if not exist "%START_DIR%" goto noopenssl
-
-:setup
-  if "%BUILD_PLATFORM%" == "" (
-    if "%VC_VER%" == "6.0" (
-      set BUILD_PLATFORM=x86
-    ) else if "%VC_VER%" == "7.0" (
-      set BUILD_PLATFORM=x86
-    ) else if "%VC_VER%" == "7.1" (
-      set BUILD_PLATFORM=x86
-    ) else (
-      set BUILD_PLATFORM=%OS_PLATFORM%
-    )
-  )
-
-  if "%BUILD_PLATFORM%" == "x86" (
-    set VCVARS_PLATFORM=x86
-  ) else if "%BUILD_PLATFORM%" == "x64" (
-    if "%VC_VER%" == "6.0" goto nox64
-    if "%VC_VER%" == "7.0" goto nox64
-    if "%VC_VER%" == "7.1" goto nox64
-    if "%VC_VER%" == "8.0" set VCVARS_PLATFORM=x86_amd64
-    if "%VC_VER%" == "9.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
-    if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
-    if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
-    if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
-    if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
-    if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
-    if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64
-  )
-
-  if exist "%START_DIR%\ms\do_ms.bat" (
-    set LEGACY_BUILD=TRUE
-  ) else (
-    set LEGACY_BUILD=FALSE
-  )
-
-:start
-  echo.
-  set SAVED_PATH=%CD%
-
-  if "%VC_VER%" == "6.0" (
-    call "%ABS_VC_PATH%\bin\vcvars32"
-  ) else if "%VC_VER%" == "7.0" (
-    call "%ABS_VC_PATH%\bin\vcvars32"
-  ) else if "%VC_VER%" == "7.1" (
-    call "%ABS_VC_PATH%\bin\vcvars32"
-  ) else if "%VC_VER%" == "14.1" (
-    call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
-  ) else if "%VC_VER%" == "14.2" (
-    call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
-  ) else (
-    call "%ABS_VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
-  )
-
-  echo.
-  cd /d %SAVED_PATH%
-  if defined START_DIR cd /d %START_DIR%
-  goto %BUILD_PLATFORM%
-
-:x64
-  rem Calculate our output directory
-  set OUTDIR=build\Win64\%VC_DESC%
-  if not exist %OUTDIR% md %OUTDIR%
-
-  if not "%BUILD_CONFIG%" == "release" (
-    rem Configuring 64-bit Static Library Debug Build
-    call :configure x64 debug static %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x64 static %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install debug static %LEGACY_BUILD%
-
-    rem Configuring 64-bit Shared Library Debug Build
-    call :configure x64 debug shared %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x64 shared %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install debug shared %LEGACY_BUILD%
-  )
-
-  if not "%BUILD_CONFIG%" == "debug" (
-    rem Configuring 64-bit Static Library Release Build
-    call :configure x64 release static %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x64 static %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install release static %LEGACY_BUILD%
-
-    rem Configuring 64-bit Shared Library Release Build
-    call :configure x64 release shared %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x64 shared %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install release shared %LEGACY_BUILD%
-  )
-
-  goto success
-
-:x86
-  rem Calculate our output directory
-  set OUTDIR=build\Win32\%VC_DESC%
-  if not exist %OUTDIR% md %OUTDIR%
-
-  if not "%BUILD_CONFIG%" == "release" (
-    rem Configuring 32-bit Static Library Debug Build
-    call :configure x86 debug static %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x86 static %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install debug static %LEGACY_BUILD%
-
-    rem Configuring 32-bit Shared Library Debug Build
-    call :configure x86 debug shared %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x86 shared %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install debug shared %LEGACY_BUILD%
-  )
-
-  if not "%BUILD_CONFIG%" == "debug" (
-    rem Configuring 32-bit Static Library Release Build
-    call :configure x86 release static %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x86 static %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install release static %LEGACY_BUILD%
-
-    rem Configuring 32-bit Shared Library Release Build
-    call :configure x86 release shared %LEGACY_BUILD%
-
-    rem Perform the build
-    call :build x86 shared %LEGACY_BUILD%
-
-    rem Perform the install
-    call :install release shared %LEGACY_BUILD%
-  )
-
-  goto success
-
-rem Function to configure the build.
-rem
-rem %1 - Platform (x86 or x64)
-rem %2 - Configuration (release or debug)
-rem %3 - Build Type (static or shared)
-rem %4 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)
-rem
-:configure
-  setlocal
-
-  if "%1" == "" exit /B 1
-  if "%2" == "" exit /B 1
-  if "%3" == "" exit /B 1
-  if "%4" == "" exit /B 1
-
-  if "%4" == "TRUE" (
-    rem Calculate the build directory
-    set build_dir=%cd%
-
-    rem Calculate the configure options
-    if "%1" == "x86" (
-      if "%2" == "debug" (
-        set options=debug-VC-WIN32
-      ) else if "%2" == "release" (
-        set options=VC-WIN32
-      ) else (
-        exit /B 1
-      )
-
-      set options=!options! no-asm
-    ) else if "%1" == "x64" (
-      if "%2" == "debug" (
-        set options=debug-VC-WIN64A
-      ) else if "%2" == "release" (
-        set options=VC-WIN64A
-      ) else (
-        exit /B 1
-      )
-    ) else (
-      exit /B 1
-    )
-  ) else if "%4" == "FALSE" (
-    rem Has configure already been ran?
-    if exist makefile (
-      rem Clean up the previous build
-      nmake clean
-
-      rem Remove the old makefile
-      del makefile 1>nul
-    )
-
-    rem Calculate the build directory
-    set build_dir=%cd%\build\tmp
-
-    rem Calculate the configure options
-    if "%1" == "x86" (
-      set options=VC-WIN32
-    ) else if "%1" == "x64" (
-      set options=VC-WIN64A
-    ) else (
-      exit /B 1
-    )
-
-    if "%2" == "debug" (
-      set options=!options! --debug
-    ) else if "%2" == "release" (
-      set options=!options! --release
-    ) else (
-      exit /B 1
-    )
-
-    if "%3" == "static" (
-      set options=!options! no-shared
-    ) else if not "%3" == "shared" (
-      exit /B 1
-    )
-
-    set options=!options! no-asm
-  ) else (
-    exit /B 1
-  )
-
-  set options=%options% --prefix=%build_dir%
-
-  rem Run the configure
-  perl Configure %options%
-
-  exit /B %ERRORLEVEL
-
-rem Main build function.
-rem
-rem %1 - Platform (x86 or x64)
-rem %2 - Build Type (static or shared)
-rem %3 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)
-rem
-:build
-  setlocal
-
-  if "%1" == "" exit /B 1
-  if "%2" == "" exit /B 1
-  if "%3" == "" exit /B 1
-
-  if "%3" == "TRUE" (
-    if "%1" == "x86" (
-      call ms\do_ms.bat
-    ) else if "%1" == "x64" (
-      call ms\do_win64a.bat
-    ) else (
-      exit /B 1
-    )
-
-    if "%2" == "static" (
-      nmake -f ms\nt.mak
-    ) else if "%2" == "shared" (
-      nmake -f ms\ntdll.mak
-    ) else (
-      exit /B 1
-    )
-  ) else if "%2" == "FALSE" (
-    nmake
-  ) else (
-    exit /B 1
-  )
-
-  exit /B 0
-
-rem Main installation function.
-rem
-rem %1 - Configuration (release or debug)
-rem %2 - Build Type (static or shared)
-rem %3 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)
-rem
-:install
-  setlocal
-
-  if "%1" == "" exit /B 1
-  if "%2" == "" exit /B 1
-  if "%3" == "" exit /B 1
-
-  rem Copy the generated files to our directory structure
-  if "%3" == "TRUE" (
-    if "%1" == "debug" (
-      if "%2" == "static" (
-        rem Move the output directories
-        if exist "%OUTDIR%\LIB Debug" (
-          copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul
-          rd out32.dbg /s /q
-        ) else (
-          move out32.dbg "%OUTDIR%\LIB Debug" 1>nul
-        )
-
-        rem Move the PDB files
-        move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul
-
-        rem Remove the intermediate directories
-        rd tmp32.dbg /s /q
-      ) else if "%2" == "shared" (
-        if exist "%OUTDIR%\DLL Debug" (
-          copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul
-          rd out32dll.dbg /s /q
-        ) else (
-          move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul
-        )
-
-        rem Move the PDB files
-        move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul
-
-        rem Remove the intermediate directories
-        rd tmp32dll.dbg /s /q
-      ) else (
-        exit /B 1
-      )
-    ) else if "%1" == "release" (
-      if "%2" == "static" (
-        rem Move the output directories
-        if exist "%OUTDIR%\LIB Release" (
-          copy /y out32\* "%OUTDIR%\LIB Release" 1>nul
-          rd out32 /s /q
-        ) else (
-          move out32 "%OUTDIR%\LIB Release" 1>nul
-        )
-
-        rem Move the PDB files
-        move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul
-
-        rem Remove the intermediate directories
-        rd tmp32 /s /q
-      ) else if "%2" == "shared" (
-        if exist "%OUTDIR%\DLL Release" (
-          copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul
-          rd out32dll /s /q
-        ) else (
-          move out32dll "%OUTDIR%\DLL Release" 1>nul
-        )
-
-        rem Move the PDB files
-        move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul
-
-        rem Remove the intermediate directories
-        rd tmp32dll /s /q
-      ) else (
-        exit /B 1
-      )
-    )
-  ) else if "%3" == "FALSE" (
-    rem Calculate the build directory
-    set build_dir=%cd%\build\tmp
-
-    rem Perform the installation
-    nmake install_sw
-
-    rem Move the output directories
-    if "%1" == "debug" (
-      if "%2" == "static" (
-        if not exist "%OUTDIR%\LIB Debug" (
-          mkdir "%OUTDIR%\LIB Debug" 1>nul
-        )
-
-        move !build_dir!\lib\*.lib "%OUTDIR%\LIB Debug" 1>nul
-        move !build_dir!\bin\*.exe "%OUTDIR%\LIB Debug" 1>nul
-      ) else if "%2" == "shared" (
-        if not exist "%OUTDIR%\DLL Debug" (
-          mkdir "%OUTDIR%\DLL Debug" 1>nul
-        )
-
-        move !build_dir!\lib\*.lib "%OUTDIR%\DLL Debug" 1>nul
-        move !build_dir!\bin\*.dll "%OUTDIR%\DLL Debug" 1>nul
-        move !build_dir!\bin\*.exe "%OUTDIR%\DLL Debug" 1>nul
-        move !build_dir!\bin\*.pdb "%OUTDIR%\DLL Debug" 1>nul
-      ) else (
-        exit /B 1
-      )
-    ) else if "%1" == "release" (
-      if "%2" == "static" (
-        if not exist "%OUTDIR%\LIB Release" (
-          mkdir "%OUTDIR%\LIB Release" 1>nul
-        )
-
-        move !build_dir!\lib\*.lib "%OUTDIR%\LIB Release" 1>nul
-        move !build_dir!\bin\*.exe "%OUTDIR%\LIB Release" 1>nul
-      ) else if "%2" == "shared" (
-        if not exist "%OUTDIR%\DLL Release" (
-          mkdir "%OUTDIR%\DLL Release" 1>nul
-        )
-
-        move !build_dir!\lib\*.lib "%OUTDIR%\DLL Release" 1>nul
-        move !build_dir!\bin\*.dll "%OUTDIR%\DLL Release" 1>nul
-        move !build_dir!\bin\*.exe "%OUTDIR%\DLL Release" 1>nul
-      ) else (
-        exit /B 1
-      )
-    ) else (
-      exit /B 1
-    )
-
-    rem Remove the output directories
-    rd !build_dir! /s /q
-  ) else (
-    exit /B 1
-  )
-
-  exit /B 0
-
-:syntax
-  rem Display the help
-  echo.
-  echo Usage: build-openssl ^<compiler^> [platform] [configuration] [directory] [-VSpath] ["VSpath"] [-perlpath] ["perlpath"]
-  echo.
-  echo Compiler:
-  echo.
-  echo vc6       - Use Visual Studio 6
-  echo vc7       - Use Visual Studio .NET
-  echo vc7.1     - Use Visual Studio .NET 2003
-  echo vc8       - Use Visual Studio 2005
-  echo vc9       - Use Visual Studio 2008
-  echo vc10      - Use Visual Studio 2010
-  echo vc11      - Use Visual Studio 2012
-  echo vc12      - Use Visual Studio 2013
-  echo vc14      - Use Visual Studio 2015
-  echo vc14.1    - Use Visual Studio 2017
-  echo vc14.2    - Use Visual Studio 2019
-  echo.
-  echo Platform:
-  echo.
-  echo x86       - Perform a 32-bit build
-  echo x64       - Perform a 64-bit build
-  echo.
-  echo Configuration:
-  echo.
-  echo debug     - Perform a debug build
-  echo release   - Perform a release build
-  echo.
-  echo Other:
-  echo.
-  echo directory - Specifies the OpenSSL source directory
-  echo.
-  echo -VSpath - Specify the custom VS path if Visual Studio is installed at other location
-  echo           then "C:/<ProgramFiles>/Microsoft Visual Studio[version]
-  echo           For e.g. -VSpath "C:\apps\MVS14"
-  echo.
-  echo -perlpath - Specify the custom perl root path if perl is not located at "C:\Perl" and it is a
-  echo             portable copy of perl and not installed on the win system
-  echo             For e.g. -perlpath "D:\strawberry-perl-5.24.3.1-64bit-portable"
-  goto error
-
-:unknown
-  echo.
-  echo Error: Unknown argument '%1'
-  goto error
-
-:nodos
-  echo.
-  echo Error: Only a Windows NT based Operating System is supported
-  goto error
-
-:nopf
-  echo.
-  echo Error: Cannot obtain the directory for Program Files
-  goto error
-
-:novc
-  echo.
-  echo Error: %VC_DESC% is not installed
-  echo Error: Please check whether Visual compiler is installed at the path "%ABS_VC_PATH%"
-  echo Error: Please provide proper VS Path by using -VSpath
-  goto error
-
-:noperl
-  echo.
-  echo Error: Perl is not installed
-  echo Error: Please check whether Perl is installed or it is at location "C:\Perl"
-  echo Error: If Perl is portable please provide perl root path by using -perlpath
-  goto error
-
-:nox64
-  echo.
-  echo Error: %VC_DESC% does not support 64-bit builds
-  goto error
-
-:noopenssl
-  echo.
-  echo Error: Cannot locate OpenSSL source directory
-  goto error
-
-:error
-  if "%OS%" == "Windows_NT" endlocal
-  exit /B 1
-
-:success
-  cd /d %SAVED_PATH%
-  endlocal
-  exit /B 0
+@echo off

+rem ***************************************************************************

+rem *                                  _   _ ____  _

+rem *  Project                     ___| | | |  _ \| |

+rem *                             / __| | | | |_) | |

+rem *                            | (__| |_| |  _ <| |___

+rem *                             \___|\___/|_| \_\_____|

+rem *

+rem * Copyright (C) 2012 - 2021, Steve Holme, <steve_holme@hotmail.com>.

+rem *

+rem * This software is licensed as described in the file COPYING, which

+rem * you should have received as part of this distribution. The terms

+rem * are also available at https://curl.se/docs/copyright.html.

+rem *

+rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell

+rem * copies of the Software, and permit persons to whom the Software is

+rem * furnished to do so, under the terms of the COPYING file.

+rem *

+rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY

+rem * KIND, either express or implied.

+rem *

+rem ***************************************************************************

+

+:begin

+  rem Check we are running on a Windows NT derived OS

+  if not "%OS%" == "Windows_NT" goto nodos

+

+  rem Set our variables

+  setlocal ENABLEDELAYEDEXPANSION

+  set BUILD_CONFIG=

+  set BUILD_PLATFORM=

+  set SAVED_PATH=

+  set SOURCE_PATH=

+  set TMP_BUILD_PATH=

+  set TMP_INSTALL_PATH=

+  set VC_VER=

+

+  rem Ensure we have the required arguments

+  if /i "%~1" == "" goto syntax

+

+  rem Calculate the program files directory

+  if defined PROGRAMFILES (

+    set "PF=%PROGRAMFILES%"

+    set OS_PLATFORM=x86

+  )

+  if defined PROGRAMFILES(x86) (

+    set "PF=%PROGRAMFILES(x86)%"

+    set OS_PLATFORM=x64

+  )

+

+:parseArgs

+  if not "%~1" == "" (

+    if /i "%~1" == "vc6" (

+      set VC_VER=6.0

+      set VC_DESC=VC6

+      set "VC_PATH=Microsoft Visual Studio\VC98"

+    ) else if /i "%~1" == "vc7" (

+      set VC_VER=7.0

+      set VC_DESC=VC7

+      set "VC_PATH=Microsoft Visual Studio .NET\Vc7"

+    ) else if /i "%~1" == "vc7.1" (

+      set VC_VER=7.1

+      set VC_DESC=VC7.1

+      set "VC_PATH=Microsoft Visual Studio .NET 2003\Vc7"

+    ) else if /i "%~1" == "vc8" (

+      set VC_VER=8.0

+      set VC_DESC=VC8

+      set "VC_PATH=Microsoft Visual Studio 8\VC"

+    ) else if /i "%~1" == "vc9" (

+      set VC_VER=9.0

+      set VC_DESC=VC9

+      set "VC_PATH=Microsoft Visual Studio 9.0\VC"

+    ) else if /i "%~1" == "vc10" (

+      set VC_VER=10.0

+      set VC_DESC=VC10

+      set "VC_PATH=Microsoft Visual Studio 10.0\VC"

+    ) else if /i "%~1" == "vc11" (

+      set VC_VER=11.0

+      set VC_DESC=VC11

+      set "VC_PATH=Microsoft Visual Studio 11.0\VC"

+    ) else if /i "%~1" == "vc12" (

+      set VC_VER=12.0

+      set VC_DESC=VC12

+      set "VC_PATH=Microsoft Visual Studio 12.0\VC"

+    ) else if /i "%~1" == "vc14" (

+      set VC_VER=14.0

+      set VC_DESC=VC14

+      set "VC_PATH=Microsoft Visual Studio 14.0\VC"

+    ) else if /i "%~1" == "vc14.1" (

+      set VC_VER=14.1

+      set VC_DESC=VC14.1

+

+      rem Determine the VC14.1 path based on the installed edition in descending

+      rem order (Enterprise, then Professional and finally Community)

+      if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (

+        set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"

+      ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (

+        set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"

+      ) else (

+        set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"

+      )

+    ) else if /i "%~1" == "vc14.2" (

+      set VC_VER=14.2

+      set VC_DESC=VC14.2

+

+      rem Determine the VC14.2 path based on the installed edition in descending

+      rem order (Enterprise, then Professional and finally Community)

+      if exist "%PF%\Microsoft Visual Studio\2019\Enterprise\VC" (

+        set "VC_PATH=Microsoft Visual Studio\2019\Enterprise\VC"

+      ) else if exist "%PF%\Microsoft Visual Studio\2019\Professional\VC" (

+        set "VC_PATH=Microsoft Visual Studio\2019\Professional\VC"

+      ) else (

+        set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"

+      )

+    ) else if /i "%~1%" == "x86" (

+      set BUILD_PLATFORM=x86

+    ) else if /i "%~1%" == "x64" (

+      set BUILD_PLATFORM=x64

+    ) else if /i "%~1%" == "debug" (

+      set BUILD_CONFIG=debug

+    ) else if /i "%~1%" == "release" (

+      set BUILD_CONFIG=release

+    ) else if /i "%~1" == "-?" (

+      goto syntax

+    ) else if /i "%~1" == "-h" (

+      goto syntax

+    ) else if /i "%~1" == "-help" (

+      goto syntax

+    ) else if /i "%~1" == "-VSpath" (

+      if "%~2" == "" (

+        echo.

+        echo Error. Please provide VS Path.

+        goto error

+      ) else (

+        set "ABS_VC_PATH=%~2\VC"

+        shift

+      )

+    ) else if /i "%~1" == "-perlpath" (

+      if "%~2" == "" (

+        echo.

+        echo Error. Please provide Perl root Path.

+        goto error

+      ) else (

+        set "PERL_PATH=%~2"

+        shift

+      )

+    ) else (

+      if not defined START_DIR (

+        set "START_DIR=%~1%"

+      ) else (

+        goto unknown

+      )

+    )

+

+    shift & goto parseArgs

+  )

+

+:prerequisites

+  rem Compiler is a required parameter

+  if not defined VC_VER goto syntax

+

+  rem Default the start directory if one isn't specified

+  if not defined START_DIR set START_DIR=..\..\openssl

+

+  if not defined ABS_VC_PATH (

+    rem Check we have a program files directory

+    if not defined PF goto nopf

+    set "ABS_VC_PATH=%PF%\%VC_PATH%"

+  )

+

+  rem Check we have Visual Studio installed

+  if not exist "%ABS_VC_PATH%" goto novc

+

+  if not defined PERL_PATH (

+    rem Check we have Perl in our path

+    perl --version <NUL 1>NUL 2>&1

+    if errorlevel 1 (

+      rem It isn't so check we have it installed and set the path if it is

+      if exist "%SystemDrive%\Perl" (

+        set "PATH=%SystemDrive%\Perl\bin;%PATH%"

+      ) else (

+        if exist "%SystemDrive%\Perl64" (

+          set "PATH=%SystemDrive%\Perl64\bin;%PATH%"

+        ) else (

+          goto noperl

+        )

+      )

+    )

+  ) else (

+    set "PATH=%PERL_PATH%\Perl\bin;%PATH%"

+  )

+

+  rem Check the start directory exists

+  if not exist "%START_DIR%" goto noopenssl

+

+:setup

+  if "%BUILD_PLATFORM%" == "" (

+    if "%VC_VER%" == "6.0" (

+      set BUILD_PLATFORM=x86

+    ) else if "%VC_VER%" == "7.0" (

+      set BUILD_PLATFORM=x86

+    ) else if "%VC_VER%" == "7.1" (

+      set BUILD_PLATFORM=x86

+    ) else (

+      set BUILD_PLATFORM=%OS_PLATFORM%

+    )

+  )

+

+  if "%BUILD_PLATFORM%" == "x86" (

+    set VCVARS_PLATFORM=x86

+  ) else if "%BUILD_PLATFORM%" == "x64" (

+    if "%VC_VER%" == "6.0" goto nox64

+    if "%VC_VER%" == "7.0" goto nox64

+    if "%VC_VER%" == "7.1" goto nox64

+    if "%VC_VER%" == "8.0" set VCVARS_PLATFORM=x86_amd64

+    if "%VC_VER%" == "9.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%

+    if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%

+    if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64

+    if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64

+    if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64

+    if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64

+    if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64

+  )

+

+  if exist "%START_DIR%\ms\do_ms.bat" (

+    set LEGACY_BUILD=TRUE

+  ) else (

+    set LEGACY_BUILD=FALSE

+  )

+

+:start

+  echo.

+  set "SAVED_PATH=%CD%"

+

+  if "%VC_VER%" == "6.0" (

+    call "%ABS_VC_PATH%\bin\vcvars32"

+  ) else if "%VC_VER%" == "7.0" (

+    call "%ABS_VC_PATH%\bin\vcvars32"

+  ) else if "%VC_VER%" == "7.1" (

+    call "%ABS_VC_PATH%\bin\vcvars32"

+  ) else if "%VC_VER%" == "14.1" (

+    call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%

+  ) else if "%VC_VER%" == "14.2" (

+    call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%

+  ) else (

+    call "%ABS_VC_PATH%\vcvarsall" %VCVARS_PLATFORM%

+  )

+

+  echo.

+

+  cd /d "%START_DIR%" || (echo Error: Failed cd start & exit /B 1)

+  rem Save the full path of the openssl source dir

+  set "SOURCE_PATH=%CD%"

+

+  rem Set temporary paths for building and installing OpenSSL. If a temporary

+  rem path is not the same as the source path then it is *removed* after the

+  rem installation is completed.

+  rem

+  rem For legacy OpenSSL the temporary build path must be the source path.

+  rem

+  rem For OpenSSL 1.1.x the temporary paths must be separate not a descendant

+  rem of the other, otherwise pdb files will be lost between builds.

+  rem https://github.com/openssl/openssl/issues/10005

+  rem

+  if "%LEGACY_BUILD%" == "TRUE" (

+    set "TMP_BUILD_PATH=%SOURCE_PATH%"

+    set "TMP_INSTALL_PATH=%SOURCE_PATH%"

+  ) else (

+    set "TMP_BUILD_PATH=%SOURCE_PATH%\build\tmp_build"

+    set "TMP_INSTALL_PATH=%SOURCE_PATH%\build\tmp_install"

+  )

+

+  goto %BUILD_PLATFORM%

+

+:x64

+  rem Calculate our output directory

+  set OUTDIR=build\Win64\%VC_DESC%

+  if not exist %OUTDIR% md %OUTDIR%

+

+  if not "%BUILD_CONFIG%" == "release" (

+    rem Configuring 64-bit Static Library Debug Build

+    call :configure x64 debug static %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x64 static %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install debug static %LEGACY_BUILD%

+

+    rem Configuring 64-bit Shared Library Debug Build

+    call :configure x64 debug shared %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x64 shared %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install debug shared %LEGACY_BUILD%

+  )

+

+  if not "%BUILD_CONFIG%" == "debug" (

+    rem Configuring 64-bit Static Library Release Build

+    call :configure x64 release static %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x64 static %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install release static %LEGACY_BUILD%

+

+    rem Configuring 64-bit Shared Library Release Build

+    call :configure x64 release shared %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x64 shared %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install release shared %LEGACY_BUILD%

+  )

+

+  goto success

+

+:x86

+  rem Calculate our output directory

+  set OUTDIR=build\Win32\%VC_DESC%

+  if not exist %OUTDIR% md %OUTDIR%

+

+  if not "%BUILD_CONFIG%" == "release" (

+    rem Configuring 32-bit Static Library Debug Build

+    call :configure x86 debug static %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x86 static %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install debug static %LEGACY_BUILD%

+

+    rem Configuring 32-bit Shared Library Debug Build

+    call :configure x86 debug shared %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x86 shared %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install debug shared %LEGACY_BUILD%

+  )

+

+  if not "%BUILD_CONFIG%" == "debug" (

+    rem Configuring 32-bit Static Library Release Build

+    call :configure x86 release static %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x86 static %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install release static %LEGACY_BUILD%

+

+    rem Configuring 32-bit Shared Library Release Build

+    call :configure x86 release shared %LEGACY_BUILD%

+

+    rem Perform the build

+    call :build x86 shared %LEGACY_BUILD%

+

+    rem Perform the install

+    call :install release shared %LEGACY_BUILD%

+  )

+

+  goto success

+

+rem Function to configure the build.

+rem

+rem %1 - Platform (x86 or x64)

+rem %2 - Configuration (release or debug)

+rem %3 - Build Type (static or shared)

+rem %4 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)

+rem

+:configure

+  setlocal

+

+  if "%1" == "" exit /B 1

+  if "%2" == "" exit /B 1

+  if "%3" == "" exit /B 1

+  if "%4" == "" exit /B 1

+

+  if not exist "%TMP_BUILD_PATH%" mkdir "%TMP_BUILD_PATH%"

+  cd /d "%TMP_BUILD_PATH%" || (echo Error: Failed cd build & exit /B 1)

+

+  if "%4" == "TRUE" (

+    rem Calculate the configure options

+    if "%1" == "x86" (

+      if "%2" == "debug" (

+        set options=debug-VC-WIN32

+      ) else if "%2" == "release" (

+        set options=VC-WIN32

+      ) else (

+        exit /B 1

+      )

+

+      set options=!options! no-asm

+    ) else if "%1" == "x64" (

+      if "%2" == "debug" (

+        set options=debug-VC-WIN64A

+      ) else if "%2" == "release" (

+        set options=VC-WIN64A

+      ) else (

+        exit /B 1

+      )

+    ) else (

+      exit /B 1

+    )

+  ) else if "%4" == "FALSE" (

+    rem Has configure already been ran?

+    if exist makefile (

+      rem Clean up the previous build

+      nmake clean

+

+      rem Remove the old makefile

+      del makefile 1>nul

+    )

+

+    rem Calculate the configure options

+    if "%1" == "x86" (

+      set options=VC-WIN32

+    ) else if "%1" == "x64" (

+      set options=VC-WIN64A

+    ) else (

+      exit /B 1

+    )

+

+    if "%2" == "debug" (

+      set options=!options! --debug

+    ) else if "%2" == "release" (

+      set options=!options! --release

+    ) else (

+      exit /B 1

+    )

+

+    if "%3" == "static" (

+      set options=!options! no-shared

+    ) else if not "%3" == "shared" (

+      exit /B 1

+    )

+

+    set options=!options! no-asm

+  ) else (

+    exit /B 1

+  )

+

+  rem Run the configure

+  perl "%SOURCE_PATH%\Configure" %options% "--prefix=%TMP_INSTALL_PATH%"

+

+  exit /B %ERRORLEVEL%

+

+rem Main build function.

+rem

+rem %1 - Platform (x86 or x64)

+rem %2 - Build Type (static or shared)

+rem %3 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)

+rem

+:build

+  setlocal

+

+  if "%1" == "" exit /B 1

+  if "%2" == "" exit /B 1

+  if "%3" == "" exit /B 1

+

+  cd /d "%TMP_BUILD_PATH%" || (echo Error: Failed cd build & exit /B 1)

+

+  if "%3" == "TRUE" (

+    if "%1" == "x86" (

+      call ms\do_ms.bat

+    ) else if "%1" == "x64" (

+      call ms\do_win64a.bat

+    ) else (

+      exit /B 1

+    )

+

+    if "%2" == "static" (

+      nmake -f ms\nt.mak

+    ) else if "%2" == "shared" (

+      nmake -f ms\ntdll.mak

+    ) else (

+      exit /B 1

+    )

+  ) else if "%3" == "FALSE" (

+    nmake

+  ) else (

+    exit /B 1

+  )

+

+  exit /B 0

+

+rem Main installation function.

+rem

+rem %1 - Configuration (release or debug)

+rem %2 - Build Type (static or shared)

+rem %3 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)

+rem

+:install

+  setlocal

+

+  if "%1" == "" exit /B 1

+  if "%2" == "" exit /B 1

+  if "%3" == "" exit /B 1

+

+  rem Copy the generated files to our directory structure

+  if "%3" == "TRUE" (

+    rem There's no actual installation for legacy OpenSSL, the files are copied

+    rem from the build dir (for legacy this is same as source dir) to the final

+    rem location.

+    cd /d "%SOURCE_PATH%" || (echo Error: Failed cd source & exit /B 1)

+    if "%1" == "debug" (

+      if "%2" == "static" (

+        rem Move the output directories

+        if exist "%OUTDIR%\LIB Debug" (

+          copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul

+          rd out32.dbg /s /q

+        ) else (

+          move out32.dbg "%OUTDIR%\LIB Debug" 1>nul

+        )

+

+        rem Move the PDB files

+        move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul

+

+        rem Remove the intermediate directories

+        rd tmp32.dbg /s /q

+      ) else if "%2" == "shared" (

+        if exist "%OUTDIR%\DLL Debug" (

+          copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul

+          rd out32dll.dbg /s /q

+        ) else (

+          move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul

+        )

+

+        rem Move the PDB files

+        move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul

+

+        rem Remove the intermediate directories

+        rd tmp32dll.dbg /s /q

+      ) else (

+        exit /B 1

+      )

+    ) else if "%1" == "release" (

+      if "%2" == "static" (

+        rem Move the output directories

+        if exist "%OUTDIR%\LIB Release" (

+          copy /y out32\* "%OUTDIR%\LIB Release" 1>nul

+          rd out32 /s /q

+        ) else (

+          move out32 "%OUTDIR%\LIB Release" 1>nul

+        )

+

+        rem Move the PDB files

+        move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul

+

+        rem Remove the intermediate directories

+        rd tmp32 /s /q

+      ) else if "%2" == "shared" (

+        if exist "%OUTDIR%\DLL Release" (

+          copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul

+          rd out32dll /s /q

+        ) else (

+          move out32dll "%OUTDIR%\DLL Release" 1>nul

+        )

+

+        rem Move the PDB files

+        move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul

+

+        rem Remove the intermediate directories

+        rd tmp32dll /s /q

+      ) else (

+        exit /B 1

+      )

+    )

+  ) else if "%3" == "FALSE" (

+    cd /d "%TMP_BUILD_PATH%" || (echo Error: Failed cd build & exit /B 1)

+

+    rem Perform the installation

+    nmake install_sw

+

+    cd /d "%SOURCE_PATH%" || (echo Error: Failed cd source & exit /B 1)

+

+    rem Move the output directories

+    if "%1" == "debug" (

+      if "%2" == "static" (

+        if not exist "%OUTDIR%\LIB Debug" (

+          mkdir "%OUTDIR%\LIB Debug" 1>nul

+        )

+

+        move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\LIB Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\lib\*.pdb" "%OUTDIR%\LIB Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\LIB Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\LIB Debug" 1>nul

+        xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\LIB Debug\include" 1>nul

+      ) else if "%2" == "shared" (

+        if not exist "%OUTDIR%\DLL Debug" (

+          mkdir "%OUTDIR%\DLL Debug" 1>nul

+        )

+

+        move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\DLL Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.dll" "%OUTDIR%\DLL Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.pdb" "%OUTDIR%\DLL Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.dll" "%OUTDIR%\DLL Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\DLL Debug" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\DLL Debug" 1>nul

+        xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\DLL Debug\include" 1>nul

+      ) else (

+        exit /B 1

+      )

+    ) else if "%1" == "release" (

+      if "%2" == "static" (

+        if not exist "%OUTDIR%\LIB Release" (

+          mkdir "%OUTDIR%\LIB Release" 1>nul

+        )

+

+        move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\LIB Release" 1>nul

+        move "%TMP_INSTALL_PATH%\lib\*.pdb" "%OUTDIR%\LIB Release" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\LIB Release" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\LIB Release" 1>nul

+        xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\LIB Release\include" 1>nul

+      ) else if "%2" == "shared" (

+        if not exist "%OUTDIR%\DLL Release" (

+          mkdir "%OUTDIR%\DLL Release" 1>nul

+        )

+

+        move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\DLL Release" 1>nul

+        move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.dll" "%OUTDIR%\DLL Release" 1>nul

+        move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.pdb" "%OUTDIR%\DLL Release" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.dll" "%OUTDIR%\DLL Release" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\DLL Release" 1>nul

+        move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\DLL Release" 1>nul

+        xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\DLL Release\include" 1>nul

+      ) else (

+        exit /B 1

+      )

+    ) else (

+      exit /B 1

+    )

+

+    rem Remove the output directories

+    if not "%SOURCE_PATH%" == "%TMP_BUILD_PATH%" (

+      rd "%TMP_BUILD_PATH%" /s /q

+    )

+    if not "%SOURCE_PATH%" == "%TMP_INSTALL_PATH%" (

+      rd "%TMP_INSTALL_PATH%" /s /q

+    )

+  ) else (

+    exit /B 1

+  )

+

+  exit /B 0

+

+:syntax

+  rem Display the help

+  echo.

+  echo Usage: build-openssl ^<compiler^> [platform] [configuration] [directory] [-VSpath] ["VSpath"] [-perlpath] ["perlpath"]

+  echo.

+  echo Compiler:

+  echo.

+  echo vc6       - Use Visual Studio 6

+  echo vc7       - Use Visual Studio .NET

+  echo vc7.1     - Use Visual Studio .NET 2003

+  echo vc8       - Use Visual Studio 2005

+  echo vc9       - Use Visual Studio 2008

+  echo vc10      - Use Visual Studio 2010

+  echo vc11      - Use Visual Studio 2012

+  echo vc12      - Use Visual Studio 2013

+  echo vc14      - Use Visual Studio 2015

+  echo vc14.1    - Use Visual Studio 2017

+  echo vc14.2    - Use Visual Studio 2019

+  echo.

+  echo Platform:

+  echo.

+  echo x86       - Perform a 32-bit build

+  echo x64       - Perform a 64-bit build

+  echo.

+  echo Configuration:

+  echo.

+  echo debug     - Perform a debug build

+  echo release   - Perform a release build

+  echo.

+  echo Other:

+  echo.

+  echo directory - Specifies the OpenSSL source directory

+  echo.

+  echo -VSpath - Specify the custom VS path if Visual Studio is not located at

+  echo           "C:\<ProgramFiles>\Microsoft Visual Studio <version>"

+  echo           For e.g. -VSpath "C:\apps\MVS14"

+  echo.

+  echo -perlpath - Specify the custom perl root path if perl is not located at

+  echo             "C:\Perl" and it is a portable copy of perl and not

+  echo             installed on the win system.

+  echo             For e.g. -perlpath "D:\strawberry-perl-5.24.3.1-64bit-portable"

+  goto error

+

+:unknown

+  echo.

+  echo Error: Unknown argument '%1'

+  goto error

+

+:nodos

+  echo.

+  echo Error: Only a Windows NT based Operating System is supported

+  goto error

+

+:nopf

+  echo.

+  echo Error: Cannot obtain the directory for Program Files

+  goto error

+

+:novc

+  echo.

+  echo Error: %VC_DESC% is not installed

+  echo Error: Please check whether Visual compiler is installed at the path "%ABS_VC_PATH%"

+  echo Error: Please provide proper VS Path by using -VSpath

+  goto error

+

+:noperl

+  echo.

+  echo Error: Perl is not installed

+  echo Error: Please check whether Perl is installed or it is at location "C:\Perl"

+  echo Error: If Perl is portable please provide perl root path by using -perlpath

+  goto error

+

+:nox64

+  echo.

+  echo Error: %VC_DESC% does not support 64-bit builds

+  goto error

+

+:noopenssl

+  echo.

+  echo Error: Cannot locate OpenSSL source directory

+  goto error

+

+:error

+  if "%OS%" == "Windows_NT" endlocal

+  exit /B 1

+

+:success

+  cd /d "%SAVED_PATH%"

+  endlocal

+  exit /B 0

diff --git a/projects/build-wolfssl.bat b/projects/build-wolfssl.bat
index 8c6c8ed..8ee61e6 100644
--- a/projects/build-wolfssl.bat
+++ b/projects/build-wolfssl.bat
@@ -11,7 +11,7 @@
 rem *
 rem * This software is licensed as described in the file COPYING, which
 rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
+rem * are also available at https://curl.se/docs/copyright.html.
 rem *
 rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 rem * copies of the Software, and permit persons to whom the Software is
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index 2ca90d0..9b4dc44 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -10,7 +10,7 @@
 rem *
 rem * This software is licensed as described in the file COPYING, which
 rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
+rem * are also available at https://curl.se/docs/copyright.html.
 rem *
 rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 rem * copies of the Software, and permit persons to whom the Software is
diff --git a/projects/generate.bat b/projects/generate.bat
index bc50245..5ef562f 100644
--- a/projects/generate.bat
+++ b/projects/generate.bat
@@ -10,7 +10,7 @@
 rem *
 rem * This software is licensed as described in the file COPYING, which
 rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
+rem * are also available at https://curl.se/docs/copyright.html.
 rem *
 rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 rem * copies of the Software, and permit persons to whom the Software is
diff --git a/projects/wolfssl_options.h b/projects/wolfssl_options.h
index b8022cf..ca36547 100644
--- a/projects/wolfssl_options.h
+++ b/projects/wolfssl_options.h
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index e56938d..214a10f 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/scripts/completion.pl b/scripts/completion.pl
index c717c6d..8bbf483 100755
--- a/scripts/completion.pl
+++ b/scripts/completion.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -37,7 +37,7 @@
 Pod::Usage::pod2usage() if $help;
 
 my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s*(\<.+?\>)?\s+(.*)';
-my @opts = parse_main_opts('--help', $regex);
+my @opts = parse_main_opts('--help all', $regex);
 
 if ($shell eq 'fish') {
     print "# curl fish completion\n\n";
diff --git a/scripts/coverage.sh b/scripts/coverage.sh
index cae5e02..e2b65b7 100755
--- a/scripts/coverage.sh
+++ b/scripts/coverage.sh
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/scripts/updatemanpages.pl b/scripts/updatemanpages.pl
index 21a7df1..2b6e25a 100755
--- a/scripts/updatemanpages.pl
+++ b/scripts/updatemanpages.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b994ae9..6f9c5d6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/src/Makefile.am b/src/Makefile.am
index 029a492..7343731 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -61,18 +61,15 @@
 LIBS = $(BLANK_AT_MAKETIME)
 
 if USE_EXPLICIT_LIB_DEPS
-curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
+curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
 else
-curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
+curl_LDADD = $(top_builddir)/lib/libcurl.la @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
 endif
 
-curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
-curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
-
 # if unit tests are enabled, build a static library to link them with
 if BUILD_UNITTESTS
 noinst_LTLIBRARIES = libcurltool.la
-libcurltool_la_CPPFLAGS = $(LIBMETALINK_CPPFLAGS) $(AM_CPPFLAGS) \
+libcurltool_la_CPPFLAGS = $(AM_CPPFLAGS) \
                           -DCURL_STATICLIB -DUNITTESTS
 libcurltool_la_CFLAGS =
 libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
diff --git a/src/Makefile.inc b/src/Makefile.inc
index 6f236fe..9839d4f 100644
--- a/src/Makefile.inc
+++ b/src/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -74,7 +74,6 @@
   tool_hugehelp.c \
   tool_libinfo.c \
   tool_main.c \
-  tool_metalink.c \
   tool_msgs.c \
   tool_operate.c \
   tool_operhlp.c \
@@ -117,7 +116,6 @@
   tool_hugehelp.h \
   tool_libinfo.h \
   tool_main.h \
-  tool_metalink.h \
   tool_msgs.h \
   tool_operate.h \
   tool_operhlp.h \
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index b3fcae5..380d264 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1999 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1999 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -59,10 +59,6 @@
 ifndef LIBRTMP_PATH
 LIBRTMP_PATH = ../../librtmp-2.4
 endif
-# Edit the path below to point to the base of your libmetalink package.
-ifndef LIBMETALINK_PATH
-LIBMETALINK_PATH = ../../libmetalink-0.1.3
-endif
 # Edit the path below to point to the base of your libexpat package.
 ifndef LIBEXPAT_PATH
 LIBEXPAT_PATH = ../../expat-2.1.0
@@ -71,6 +67,10 @@
 ifndef LIBXML2_PATH
 LIBXML2_PATH = ../../libxml2-2.9.2
 endif
+# Edit the path below to point to the base of your libgsasl package.
+ifndef LIBGSASL_PATH
+LIBGSASL_PATH = ../../libgsasl-1.10.0
+endif
 # Edit the path below to point to the base of your libidn2 package.
 ifndef LIBIDN2_PATH
 LIBIDN2_PATH = ../../libidn2-2.0.3
@@ -89,6 +89,14 @@
 ifndef NGHTTP2_PATH
 NGHTTP2_PATH = ../../nghttp2-1.0.0
 endif
+# Edit the path below to point to the base of your nghttp3 package.
+ifndef NGHTTP3_PATH
+NGHTTP3_PATH = ../../nghttp3-1.0.0
+endif
+# Edit the path below to point to the base of your ngtcp2 package.
+ifndef NGTCP2_PATH
+NGTCP2_PATH = ../../ngtcp2-1.0.0
+endif
 
 PROOT = ..
 
@@ -199,6 +207,9 @@
 ifeq ($(findstring -brotli,$(CFG)),-brotli)
 BROTLI = 1
 endif
+ifeq ($(findstring -gsasl,$(CFG)),-gsasl)
+GSASL = 1
+endif
 ifeq ($(findstring -idn2,$(CFG)),-idn2)
 IDN2 = 1
 endif
@@ -214,9 +225,6 @@
 ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
 IPV6 = 1
 endif
-ifeq ($(findstring -metalink,$(CFG)),-metalink)
-METALINK = 1
-endif
 ifeq ($(findstring -winssl,$(CFG)),-winssl)
 WINSSL = 1
 SSPI = 1
@@ -224,6 +232,15 @@
 ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
 NGHTTP2 = 1
 endif
+ifeq ($(findstring -nghttp3,$(CFG)),-nghttp3)
+NGHTTP3 = 1
+endif
+ifeq ($(findstring -ngtcp2,$(CFG)),-ngtcp2)
+NGTCP2 = 1
+endif
+ifeq ($(findstring -unicode,$(CFG)),-unicode)
+UNICODE = 1
+endif
 
 INCLUDES = -I. -I../include -I../lib
 ifdef SSL
@@ -231,6 +248,10 @@
     CFLAGS += -DCURL_WITH_MULTI_SSL
   endif
 endif
+ifdef UNICODE
+  CFLAGS += -DUNICODE -D_UNICODE
+  LDFLAGS += -municode
+endif
 
 ifdef DYN
   curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
@@ -270,6 +291,15 @@
   endif
 endif
 ifdef SSL
+  ifdef NGHTTP3
+    CFLAGS += -DUSE_NGHTTP3
+    curl_LDADD += -L"$(NGHTTP3_PATH)/lib" -lnghttp3
+    ifdef NGTCP2
+      CFLAGS += -DUSE_NGTCP2
+      curl_LDADD += -L"$(NGTCP2_PATH)/lib" -lngtcp2 -lngtcp2_crypto_openssl
+    endif
+  endif
+
   ifndef OPENSSL_INCLUDE
     ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
       OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
@@ -329,6 +359,10 @@
     curl_LDADD += -lbrotlidec
   endif
 endif
+ifdef GSASL
+  CFLAGS += -DUSE_GSASL
+  curl_LDADD += -L"$(LIBGSASL_PATH)/lib" -lgsasl
+endif
 ifdef IDN2
   CFLAGS += -DUSE_LIBIDN2
   curl_LDADD += -L"$(LIBIDN2_PATH)/lib" -lidn2
@@ -338,18 +372,6 @@
   curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
 endif
 endif
-ifdef METALINK
-  INCLUDES += -I"$(LIBMETALINK_PATH)/include"
-  CFLAGS += -DUSE_METALINK
-  curl_LDADD += -L"$(LIBMETALINK_PATH)/lib" -lmetalink
-  ifndef DYN
-    ifeq ($(findstring libexpat_metalink_parser.o,$(shell $(AR) t "$(LIBMETALINK_PATH)/lib/libmetalink.a")),libexpat_metalink_parser.o)
-      curl_LDADD += -L"$(LIBEXPAT_PATH)/lib" -lexpat
-    else
-      curl_LDADD += -L"$(LIBXML2_PATH)/lib" -lxml2
-    endif
-  endif
-endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
 endif
diff --git a/src/Makefile.netware b/src/Makefile.netware
index 20d9807..20c82ea 100644
--- a/src/Makefile.netware
+++ b/src/Makefile.netware
@@ -6,11 +6,11 @@
 #                             \___|\___/|_| \_\_____|
 #
 # Copyright (C) 2004 - 2014, Guenter Knauf
-# Copyright (C) 2001 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2001 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -69,11 +69,6 @@
 FBOPENSSL_PATH = ../../fbopenssl-0.4
 endif
 
-# Edit the path below to point to the base of your libmetalink package.
-ifndef LIBMETALINK_PATH
-LIBMETALINK_PATH = ../../libmetalink-0.1.2
-endif
-
 # Edit the path below to point to the base of your libexpat package.
 ifndef LIBEXPAT_PATH
 LIBEXPAT_PATH = ../../expat-2.1.0
@@ -97,7 +92,7 @@
 TARGET  = curl
 VERSION = $(LIBCURL_VERSION)
 COPYR   = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
-DESCR   = curl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - https://curl.haxx.se
+DESCR   = curl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - https://curl.se
 MTSAFE  = YES
 STACK   = 64000
 SCREEN  = $(TARGET) commandline utility
@@ -243,10 +238,6 @@
 ifeq ($(findstring -idn,$(CFG)),-idn)
 WITH_IDN = 1
 endif
-ifeq ($(findstring -metalink,$(CFG)),-metalink)
-WITH_METALINK = 1
-WITH_SSL = 1
-endif
 ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
 WITH_NGHTTP2 = 1
 endif
@@ -301,25 +292,6 @@
   INCLUDES += -I$(NGHTTP2_PATH)/include
   LDLIBS += $(NGHTTP2_PATH)/lib/libnghttp2.$(LIBEXT)
 endif
-ifdef WITH_METALINK
-  CFLAGS += -DUSE_METALINK
-  INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
-  INCLUDES += -I$(LIBMETALINK_PATH)/include
-  LDLIBS += $(LIBMETALINK_PATH)/lib/libmetalink.$(LIBEXT)
-  ifdef WITH_LIBEXPAT
-    ifeq ($(LIBARCH),LIBC)
-      IMPORTS += @$(LIBEXPAT_PATH)/imports/expatlbc.imp
-      MODULES += expatlbc
-    else
-      IMPORTS += @$(LIBEXPAT_PATH)/imports/expatlib.imp
-      MODULES += expatlib
-  endif
-else
-ifdef WITH_LIBXML2
-  IMPORTS += @$(LIBXML2_PATH)/lib/libxml2.imp
-  MODULES += libxml2
-endif
-endif
 endif
 
 ifeq ($(LIBARCH),LIBC)
diff --git a/src/curl.rc b/src/curl.rc
index 4dac2ae..7d88b32 100644
--- a/src/curl.rc
+++ b/src/curl.rc
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,7 @@
   BEGIN
     BLOCK "040904b0"
     BEGIN
-      VALUE "CompanyName",      "curl, https://curl.haxx.se/\0"
+      VALUE "CompanyName",      "curl, https://curl.se/\0"
       VALUE "FileDescription",  "The curl executable\0"
       VALUE "FileVersion",      CURL_VERSION "\0"
       VALUE "InternalName",     "curl\0"
@@ -52,7 +52,7 @@
       VALUE "ProductName",      "The curl executable\0"
       VALUE "ProductVersion",   CURL_VERSION "\0"
       VALUE "LegalCopyright",   "\xa9 " CURL_COPYRIGHT "\0"  /* a9: Copyright symbol */
-      VALUE "License",          "https://curl.haxx.se/docs/copyright.html\0"
+      VALUE "License",          "https://curl.se/docs/copyright.html\0"
     END
   END
 
diff --git a/src/makefile.amiga b/src/makefile.amiga
index 38c4268..acc0aef 100644
--- a/src/makefile.amiga
+++ b/src/makefile.amiga
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/src/makefile.dj b/src/makefile.dj
index 259d4c9..d92a5cd 100644
--- a/src/makefile.dj
+++ b/src/makefile.dj
@@ -5,12 +5,12 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2003 - 2007, Gisle Vanem <gvanem@yahoo.no>.
+# Copyright (C) 2003 - 2021, Gisle Vanem <gvanem@yahoo.no>.
 # Copyright (C) 2003 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -29,13 +29,15 @@
 
 TOPDIR = ..
 
+vpath %.c ../lib
+
 include ../packages/DOS/common.dj
 include Makefile.inc
 
-CSOURCES = $(CURL_CFILES)
+CSOURCES = $(CURL_CFILES) $(CURLX_CFILES)
 
-ifeq ($(USE_SSL),1)
-  EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
+ifeq ($(USE_OPENSSL),1)
+  EX_LIBS += $(OPENSSL_LIBS)
 endif
 
 ifeq ($(USE_ARES),1)
@@ -53,8 +55,8 @@
 
 EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
 
-PROGRAM  = curl.exe
-OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
+PROGRAM = curl.exe
+OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(CSOURCES:.c=.o)))
 
 all: $(OBJ_DIR) $(PROGRAM)
 	@echo Welcome to curl
@@ -64,10 +66,14 @@
 
 #
 # groff 1.18+ requires "-P -c"
+# If 'USE_ZLIB = 1', create a compressed help-file.
 #
-tool_hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
-	groff -Tascii -man ../docs/curl.1 | \
-	perl -w mkhelp.pl ../docs/MANUAL > $@
+ifeq ($(USE_ZLIB),1)
+  COMPRESS_OPT = -c
+endif
+
+tool_hugehelp.c: ../docs/curl.1 mkhelp.pl Makefile.dj
+	groff -Tascii -man $< | perl -w mkhelp.pl $(COMPRESS_OPT) $< > $@
 
 # clean generated files
 #
diff --git a/src/mkhelp.pl b/src/mkhelp.pl
index 5e62b4e..a52bf22 100755
--- a/src/mkhelp.pl
+++ b/src/mkhelp.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/src/slist_wc.c b/src/slist_wc.c
index da25632..c1393ee 100644
--- a/src/slist_wc.c
+++ b/src/slist_wc.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/slist_wc.h b/src/slist_wc.h
index 54f871b..dd7e0b5 100644
--- a/src/slist_wc.h
+++ b/src/slist_wc.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_binmode.c b/src/tool_binmode.c
index b88a0fd..f8559e7 100644
--- a/src/tool_binmode.c
+++ b/src/tool_binmode.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_binmode.h b/src/tool_binmode.h
index 1ff0f76..1d84cff 100644
--- a/src/tool_binmode.h
+++ b/src/tool_binmode.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_bname.c b/src/tool_bname.c
index 6014c6b..c1c3b0d 100644
--- a/src/tool_bname.c
+++ b/src/tool_bname.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_bname.h b/src/tool_bname.h
index dfde589..3a4ec96 100644
--- a/src/tool_bname.h
+++ b/src/tool_bname.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index 1c42db8..6e82e38 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -187,7 +187,7 @@
 
   switch(type) {
   case CURLINFO_TEXT:
-    fprintf(output, "%s== Info: %s", timebuf, data);
+    fprintf(output, "%s== Info: %.*s", timebuf, (int)size, data);
     /* FALLTHROUGH */
   default: /* in case a new one is introduced to shock us */
     return 0;
diff --git a/src/tool_cb_dbg.h b/src/tool_cb_dbg.h
index 8883bb1..c3d3f7b 100644
--- a/src/tool_cb_dbg.h
+++ b/src/tool_cb_dbg.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index 6c6c095..67ea104 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h
index ec5772f..6bb2153 100644
--- a/src/tool_cb_hdr.h
+++ b/src/tool_cb_hdr.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index aad451b..bb93d15 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -117,7 +117,7 @@
 #if (SIZEOF_CURL_OFF_T == 4)
 #  define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF)
 #else
-   /* assume CURL_SIZEOF_CURL_OFF_T == 8 */
+   /* assume SIZEOF_CURL_OFF_T == 8 */
 #  define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
 #endif
 
diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h
index cc88768..a6fab32 100644
--- a/src/tool_cb_prg.h
+++ b/src/tool_cb_prg.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c
index 78a169f..507373d 100644
--- a/src/tool_cb_rea.c
+++ b/src/tool_cb_rea.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,7 +35,7 @@
 ** callback for CURLOPT_READFUNCTION
 */
 
-size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
+size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
 {
   ssize_t rc;
   struct InStruct *in = userdata;
diff --git a/src/tool_cb_rea.h b/src/tool_cb_rea.h
index 5f7e483..0e5ad47 100644
--- a/src/tool_cb_rea.h
+++ b/src/tool_cb_rea.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -27,7 +27,7 @@
 ** callback for CURLOPT_READFUNCTION
 */
 
-size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
+size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata);
 
 /*
 ** callback for CURLOPT_XFERINFOFUNCTION used to unpause busy reads
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
index 9d66031..c158c8d 100644
--- a/src/tool_cb_see.c
+++ b/src/tool_cb_see.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,7 +48,7 @@
 {
   struct InStruct *in = userdata;
 
-#if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
+#if(SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
 
   /* The offset check following here is only interesting if curl_off_t is
      larger than off_t and we are not using the WIN32 large file support
@@ -100,6 +100,7 @@
 /* 64-bit lseek-like function unavailable */
 #    define _lseeki64(hnd,ofs,whence) _lseek(hnd,ofs,whence)
 #  else
+#    undef _lseeki64
 #    define _lseeki64(hnd,ofs,whence) _lseek64(hnd,ofs,whence)
 #  endif
 #endif
diff --git a/src/tool_cb_see.h b/src/tool_cb_see.h
index b5b787e..edaf818 100644
--- a/src/tool_cb_see.h
+++ b/src/tool_cb_see.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index 6fc51f9..d5e96aa 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
index e49d8f3..95a11eb 100644
--- a/src/tool_cb_wrt.h
+++ b/src/tool_cb_wrt.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
index e99602c..c3f7cec 100644
--- a/src/tool_cfgable.c
+++ b/src/tool_cfgable.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,6 +44,7 @@
   config->tcp_nodelay = TRUE; /* enabled by default */
   config->happy_eyeballs_timeout_ms = CURL_HET_DEFAULT;
   config->http09_allowed = FALSE;
+  config->ftp_skip_ip = TRUE;
 }
 
 static void free_config_fields(struct OperationConfig *config)
@@ -54,9 +55,10 @@
   Curl_safefree(config->egd_file);
   Curl_safefree(config->useragent);
   Curl_safefree(config->altsvc);
-  Curl_safefree(config->cookie);
+  Curl_safefree(config->hsts);
+  curl_slist_free_all(config->cookies);
   Curl_safefree(config->cookiejar);
-  Curl_safefree(config->cookiefile);
+  curl_slist_free_all(config->cookiefiles);
 
   Curl_safefree(config->postfields);
   Curl_safefree(config->referer);
@@ -166,6 +168,8 @@
 
   Curl_safefree(config->ftp_account);
   Curl_safefree(config->ftp_alternative_to_user);
+
+  Curl_safefree(config->aws_sigv4);
 }
 
 void config_free(struct OperationConfig *config)
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
index 489f9ca..b00aacb 100644
--- a/src/tool_cfgable.h
+++ b/src/tool_cfgable.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,7 +23,6 @@
  ***************************************************************************/
 #include "tool_setup.h"
 #include "tool_sdecls.h"
-#include "tool_metalink.h"
 #include "tool_urlglob.h"
 #include "tool_formparse.h"
 
@@ -54,10 +53,11 @@
   char *random_file;
   char *egd_file;
   char *useragent;
-  char *cookie;             /* single line with specified cookies */
+  struct curl_slist *cookies;  /* cookies to serialize into a single line */
   char *cookiejar;          /* write to this file */
-  char *cookiefile;         /* read from this file */
+  struct curl_slist *cookiefiles;  /* file(s) to load cookies from */
   char *altsvc;             /* alt-svc cache file name */
+  char *hsts;               /* HSTS cache file name */
   bool cookiesession;       /* new session? */
   bool encoding;            /* Accept-Encoding please */
   bool tr_encoding;         /* Transfer-Encoding please */
@@ -117,6 +117,7 @@
   bool use_ascii;           /* select ascii or text transfer */
   bool autoreferer;         /* automatically set referer */
   bool failonerror;         /* fail on (HTTP) errors */
+  bool failwithbody;        /* fail on (HTTP) errors but still store body */
   bool show_headers;        /* show headers to data output */
   bool no_body;             /* don't get the body */
   bool dirlistonly;         /* only get the FTP dir list */
@@ -172,10 +173,13 @@
   bool globoff;
   bool use_httpget;
   bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
+  bool doh_insecure_ok;     /* set TRUE to allow insecure SSL connects
+                               for DoH */
   bool proxy_insecure_ok;   /* set TRUE to allow insecure SSL connects
                                for proxy */
   bool terminal_binary_ok;
   bool verifystatus;
+  bool doh_verifystatus;
   bool create_dirs;
   bool ftp_create_dirs;
   bool ftp_skip_ip;
@@ -192,6 +196,7 @@
   long ssl_version_max;
   long proxy_ssl_version;
   long ip_version;
+  long create_file_mode; /* CURLOPT_NEW_FILE_PERMS */
   curl_TimeCond timecond;
   curl_off_t condtime;
   struct curl_slist *headers;
@@ -261,10 +266,9 @@
                                   revocation list errors */
 
   bool native_ca_store;        /* use the native os ca store */
-
-  bool use_metalink;        /* process given URLs as metalink XML file */
-  struct metalinkfile *metalinkfile_list; /* point to the first node */
-  struct metalinkfile *metalinkfile_last; /* point to the last/current node */
+  bool ssl_auto_client_cert;   /* automatically locate and use a client
+                                  certificate for authentication (Schannel) */
+  bool proxy_ssl_auto_client_cert; /* proxy version of ssl_auto_client_cert */
   char *oauth_bearer;             /* OAuth 2.0 bearer token */
   bool nonpn;                     /* enable/disable TLS NPN extension */
   bool noalpn;                    /* enable/disable TLS ALPN extension */
@@ -282,6 +286,7 @@
                                      0 is valid. default: CURL_HET_DEFAULT. */
   bool haproxy_protocol;          /* whether to send HAProxy protocol v1 */
   bool disallow_username_in_url;  /* disallow usernames in URLs */
+  char *aws_sigv4;
   struct GlobalConfig *global;
   struct OperationConfig *prev;
   struct OperationConfig *next;   /* Always last in the struct */
diff --git a/src/tool_convert.c b/src/tool_convert.c
index 3969130..04818e9 100644
--- a/src/tool_convert.c
+++ b/src/tool_convert.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -65,7 +65,7 @@
   in_bytes = out_bytes = length;
   res = iconv(outbound_cd, &input_ptr,  &in_bytes,
               &output_ptr, &out_bytes);
-  if((res == (size_t)-1) || (in_bytes != 0)) {
+  if((res == (size_t)-1) || (in_bytes)) {
     return CURLE_CONV_FAILED;
   }
 
@@ -95,7 +95,7 @@
   in_bytes = out_bytes = length;
   res = iconv(inbound_cd, &input_ptr,  &in_bytes,
               &output_ptr, &out_bytes);
-  if((res == (size_t)-1) || (in_bytes != 0)) {
+  if((res == (size_t)-1) || (in_bytes)) {
     return CURLE_CONV_FAILED;
   }
 
diff --git a/src/tool_convert.h b/src/tool_convert.h
index 6d78ecf..59db764 100644
--- a/src/tool_convert.h
+++ b/src/tool_convert.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
index 320fb36..bf11005 100644
--- a/src/tool_dirhie.c
+++ b/src/tool_dirhie.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_dirhie.h b/src/tool_dirhie.h
index 96fae9e..c0ef1fc 100644
--- a/src/tool_dirhie.h
+++ b/src/tool_dirhie.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
index dd8341a..98e13bc 100644
--- a/src/tool_doswin.c
+++ b/src/tool_doswin.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -28,6 +28,7 @@
 #endif
 
 #ifdef WIN32
+#  include <stdlib.h>
 #  include <tlhelp32.h>
 #  include "tool_cfgable.h"
 #  include "tool_libinfo.h"
@@ -702,6 +703,64 @@
   return slist;
 }
 
+/* The terminal settings to restore on exit */
+static struct TerminalSettings {
+  HANDLE hStdOut;
+  DWORD dwOutputMode;
+  LONG valid;
+} TerminalSettings;
+
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+#endif
+
+static void restore_terminal(void)
+{
+  if(InterlockedExchange(&TerminalSettings.valid, (LONG)FALSE))
+    SetConsoleMode(TerminalSettings.hStdOut, TerminalSettings.dwOutputMode);
+}
+
+/* This is the console signal handler.
+ * The system calls it in a separate thread.
+ */
+static BOOL WINAPI signal_handler(DWORD type)
+{
+  if(type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT)
+    restore_terminal();
+  return FALSE;
+}
+
+static void init_terminal(void)
+{
+  TerminalSettings.hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
+  /*
+   * Enable VT (Virtual Terminal) output.
+   * Note: VT mode flag can be set on any version of Windows, but VT
+   * processing only performed on Win10 >= Creators Update)
+   */
+  if((TerminalSettings.hStdOut != INVALID_HANDLE_VALUE) &&
+     GetConsoleMode(TerminalSettings.hStdOut,
+                    &TerminalSettings.dwOutputMode) &&
+     !(TerminalSettings.dwOutputMode &
+       ENABLE_VIRTUAL_TERMINAL_PROCESSING)) {
+    /* The signal handler is set before attempting to change the console mode
+       because otherwise a signal would not be caught after the change but
+       before the handler was installed. */
+    (void)InterlockedExchange(&TerminalSettings.valid, (LONG)TRUE);
+    if(SetConsoleCtrlHandler(signal_handler, TRUE)) {
+      if(SetConsoleMode(TerminalSettings.hStdOut,
+                        (TerminalSettings.dwOutputMode |
+                         ENABLE_VIRTUAL_TERMINAL_PROCESSING))) {
+        atexit(restore_terminal);
+      }
+      else {
+        SetConsoleCtrlHandler(signal_handler, FALSE);
+        (void)InterlockedExchange(&TerminalSettings.valid, (LONG)FALSE);
+      }
+    }
+  }
+}
+
 LARGE_INTEGER tool_freq;
 bool tool_isVistaOrGreater;
 
@@ -714,6 +773,9 @@
     tool_isVistaOrGreater = false;
 
   QueryPerformanceFrequency(&tool_freq);
+
+  init_terminal();
+
   return CURLE_OK;
 }
 
diff --git a/src/tool_doswin.h b/src/tool_doswin.h
index ab23f8d..ecf952b 100644
--- a/src/tool_doswin.h
+++ b/src/tool_doswin.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
index 7343f7d..246d814 100644
--- a/src/tool_easysrc.c
+++ b/src/tool_easysrc.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,7 +48,7 @@
 static const char *const srchead[]={
   "/********* Sample code generated by the curl command line tool **********",
   " * All curl_easy_setopt() options are documented at:",
-  " * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html",
+  " * https://curl.se/libcurl/c/curl_easy_setopt.html",
   " ************************************************************************/",
   "#include <curl/curl.h>",
   "",
diff --git a/src/tool_easysrc.h b/src/tool_easysrc.h
index fd799ab..86bdfa2 100644
--- a/src/tool_easysrc.h
+++ b/src/tool_easysrc.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_filetime.c b/src/tool_filetime.c
index 1ffc981..e31fd59 100644
--- a/src/tool_filetime.c
+++ b/src/tool_filetime.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,8 @@
  *
  ***************************************************************************/
 #include "tool_filetime.h"
-
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
 #include "curlx.h"
 
 #ifdef HAVE_UTIME_H
@@ -29,7 +30,12 @@
 #  include <sys/utime.h>
 #endif
 
-curl_off_t getfiletime(const char *filename, FILE *error_stream)
+#if defined(__GNUC__) && defined(__MINGW32__)
+/* GCC 10 on mingw has issues with this, disable */
+#pragma GCC diagnostic ignored "-Wformat"
+#endif
+
+curl_off_t getfiletime(const char *filename, struct GlobalConfig *global)
 {
   curl_off_t result = -1;
 
@@ -52,26 +58,23 @@
           | ((curl_off_t)ft.dwHighDateTime) << 32;
 
       if(converted < CURL_OFF_T_C(116444736000000000)) {
-        fprintf(error_stream,
-                "Failed to get filetime: underflow\n");
+        warnf(global, "Failed to get filetime: underflow\n");
       }
       else {
         result = (converted - CURL_OFF_T_C(116444736000000000)) / 10000000;
       }
     }
     else {
-      fprintf(error_stream,
-              "Failed to get filetime: "
-              "GetFileTime failed: GetLastError %u\n",
-              (unsigned int)GetLastError());
+      warnf(global, "Failed to get filetime: "
+            "GetFileTime failed: GetLastError %u\n",
+            (unsigned int)GetLastError());
     }
     CloseHandle(hfile);
   }
   else if(GetLastError() != ERROR_FILE_NOT_FOUND) {
-    fprintf(error_stream,
-            "Failed to get filetime: "
-            "CreateFile failed: GetLastError %u\n",
-            (unsigned int)GetLastError());
+    warnf(global, "Failed to get filetime: "
+          "CreateFile failed: GetLastError %u\n",
+          (unsigned int)GetLastError());
   }
 #else
   struct_stat statbuf;
@@ -79,17 +82,16 @@
     result = (curl_off_t)statbuf.st_mtime;
   }
   else if(errno != ENOENT) {
-    fprintf(error_stream,
-            "Failed to get filetime: %s\n", strerror(errno));
+    warnf(global, "Failed to get filetime: %s\n", strerror(errno));
   }
 #endif
   return result;
 }
 
-#if defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \
-    (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8))
+#if defined(HAVE_UTIME) || defined(HAVE_UTIMES) ||      \
+  (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8))
 void setfiletime(curl_off_t filetime, const char *filename,
-    FILE *error_stream)
+                 struct GlobalConfig *global)
 {
   if(filetime >= 0) {
 /* Windows utime() may attempt to adjust the unix GMT file time by a daylight
@@ -102,37 +104,34 @@
     /* 910670515199 is the maximum unix filetime that can be used as a
        Windows FILETIME without overflow: 30827-12-31T23:59:59. */
     if(filetime > CURL_OFF_T_C(910670515199)) {
-      fprintf(error_stream,
-              "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-              " on outfile: overflow\n", filetime);
+      warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
+            " on outfile: overflow\n", filetime);
       curlx_unicodefree(tchar_filename);
       return;
     }
 
     hfile = CreateFile(tchar_filename, FILE_WRITE_ATTRIBUTES,
-                        (FILE_SHARE_READ | FILE_SHARE_WRITE |
-                         FILE_SHARE_DELETE),
-                        NULL, OPEN_EXISTING, 0, NULL);
+                       (FILE_SHARE_READ | FILE_SHARE_WRITE |
+                        FILE_SHARE_DELETE),
+                       NULL, OPEN_EXISTING, 0, NULL);
     curlx_unicodefree(tchar_filename);
     if(hfile != INVALID_HANDLE_VALUE) {
       curl_off_t converted = ((curl_off_t)filetime * 10000000) +
-                             CURL_OFF_T_C(116444736000000000);
+        CURL_OFF_T_C(116444736000000000);
       FILETIME ft;
       ft.dwLowDateTime = (DWORD)(converted & 0xFFFFFFFF);
       ft.dwHighDateTime = (DWORD)(converted >> 32);
       if(!SetFileTime(hfile, NULL, &ft, &ft)) {
-        fprintf(error_stream,
-                "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-                " on outfile: SetFileTime failed: GetLastError %u\n",
-                filetime, (unsigned int)GetLastError());
+        warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
+              " on outfile: SetFileTime failed: GetLastError %u\n",
+              filetime, (unsigned int)GetLastError());
       }
       CloseHandle(hfile);
     }
     else {
-      fprintf(error_stream,
-              "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-              " on outfile: CreateFile failed: GetLastError %u\n",
-              filetime, (unsigned int)GetLastError());
+      warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
+            " on outfile: CreateFile failed: GetLastError %u\n",
+            filetime, (unsigned int)GetLastError());
     }
 
 #elif defined(HAVE_UTIMES)
@@ -140,9 +139,8 @@
     times[0].tv_sec = times[1].tv_sec = (time_t)filetime;
     times[0].tv_usec = times[1].tv_usec = 0;
     if(utimes(filename, times)) {
-      fprintf(error_stream,
-              "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-              " on outfile: %s\n", filetime, strerror(errno));
+      warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
+            " on '%s': %s\n", filetime, filename, strerror(errno));
     }
 
 #elif defined(HAVE_UTIME)
@@ -150,9 +148,8 @@
     times.actime = (time_t)filetime;
     times.modtime = (time_t)filetime;
     if(utime(filename, &times)) {
-      fprintf(error_stream,
-              "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-              " on outfile: %s\n", filetime, strerror(errno));
+      warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
+            " on '%s': %s\n", filetime, filename, strerror(errno));
     }
 #endif
   }
diff --git a/src/tool_filetime.h b/src/tool_filetime.h
index f23afcf..f3883d2 100644
--- a/src/tool_filetime.h
+++ b/src/tool_filetime.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,15 +23,17 @@
  ***************************************************************************/
 #include "tool_setup.h"
 
-curl_off_t getfiletime(const char *filename, FILE *error_stream);
+struct GlobalConfig;
 
-#if defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \
-    (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8))
+curl_off_t getfiletime(const char *filename, struct GlobalConfig *global);
+
+#if defined(HAVE_UTIME) || defined(HAVE_UTIMES) ||      \
+  (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8))
 void setfiletime(curl_off_t filetime, const char *filename,
-    FILE *error_stream);
+                 struct GlobalConfig *global);
 #else
 #define setfiletime(a,b,c) Curl_nop_stmt
-#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \
+#endif /* defined(HAVE_UTIME) || defined(HAVE_UTIMES) ||        \
           (defined(WIN32) && (SIZEOF_CURL_OFF_T >= 8)) */
 
 #endif /* HEADER_CURL_TOOL_FILETIME_H */
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
index 8e8fe87..fa81291 100644
--- a/src/tool_formparse.c
+++ b/src/tool_formparse.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -720,19 +720,22 @@
  ***************************************************************************/
 
 /* Convenience macros for null pointer check. */
-#define NULL_CHECK(ptr, init, retcode) {                                \
-  (ptr) = (init);                                                       \
-  if(!(ptr)) {                                                          \
-    warnf(config->global, "out of memory!\n");                          \
-    curl_slist_free_all(headers);                                       \
-    Curl_safefree(contents);                                            \
-    return retcode;                                                     \
-  }                                                                     \
-}
-#define SET_TOOL_MIME_PTR(m, field, retcode) {                          \
-  if(field)                                                             \
-    NULL_CHECK((m)->field, strdup(field), retcode);                     \
-}
+#define NULL_CHECK(ptr, init, retcode)                                  \
+  do {                                                                  \
+    (ptr) = (init);                                                     \
+    if(!(ptr)) {                                                        \
+      warnf(config->global, "out of memory!\n");                        \
+      curl_slist_free_all(headers);                                     \
+      Curl_safefree(contents);                                          \
+      return retcode;                                                   \
+    }                                                                   \
+  } while(0)
+
+#define SET_TOOL_MIME_PTR(m, field, retcode)                            \
+  do {                                                                  \
+    if(field)                                                           \
+      NULL_CHECK((m)->field, strdup(field), retcode);                   \
+  } while(0)
 
 int formparse(struct OperationConfig *config,
               const char *input,
diff --git a/src/tool_formparse.h b/src/tool_formparse.h
index 5c1525e..7fb4107 100644
--- a/src/tool_formparse.h
+++ b/src/tool_formparse.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 910a5a2..641cca2 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,7 +36,6 @@
 #include "tool_getparam.h"
 #include "tool_helpers.h"
 #include "tool_libinfo.h"
-#include "tool_metalink.h"
 #include "tool_msgs.h"
 #include "tool_paramhlp.h"
 #include "tool_parsecfg.h"
@@ -108,10 +107,12 @@
 #endif
   {"*q", "ftp-create-dirs",          ARG_BOOL},
   {"*r", "create-dirs",              ARG_BOOL},
+  {"*R", "create-file-mode",         ARG_STRING},
   {"*s", "max-redirs",               ARG_STRING},
   {"*t", "proxy-ntlm",               ARG_BOOL},
   {"*u", "crlf",                     ARG_BOOL},
   {"*v", "stderr",                   ARG_FILENAME},
+  {"*V", "aws-sigv4",                ARG_STRING},
   {"*w", "interface",                ARG_STRING},
   {"*x", "krb",                      ARG_STRING},
   {"*x", "krb4",                     ARG_STRING},
@@ -219,6 +220,7 @@
   {"A",  "user-agent",               ARG_STRING},
   {"b",  "cookie",                   ARG_STRING},
   {"ba", "alt-svc",                  ARG_STRING},
+  {"bb", "hsts",                     ARG_STRING},
   {"B",  "use-ascii",                ARG_BOOL},
   {"c",  "cookie-jar",               ARG_STRING},
   {"C",  "continue-at",              ARG_STRING},
@@ -244,10 +246,12 @@
   {"El", "tlspassword",              ARG_STRING},
   {"Em", "tlsauthtype",              ARG_STRING},
   {"En", "ssl-allow-beast",          ARG_BOOL},
-  /* Eo */
+  {"Eo", "ssl-auto-client-cert",     ARG_BOOL},
+  {"EO", "proxy-ssl-auto-client-cert", ARG_BOOL},
   {"Ep", "pinnedpubkey",             ARG_STRING},
   {"EP", "proxy-pinnedpubkey",       ARG_STRING},
   {"Eq", "cert-status",              ARG_BOOL},
+  {"EQ", "doh-cert-status",          ARG_BOOL},
   {"Er", "false-start",              ARG_BOOL},
   {"Es", "ssl-no-revoke",            ARG_BOOL},
   {"ES", "ssl-revoke-best-effort",   ARG_BOOL},
@@ -277,6 +281,7 @@
   {"fa", "fail-early",               ARG_BOOL},
   {"fb", "styled-output",            ARG_BOOL},
   {"fc", "mail-rcpt-allowfails",     ARG_BOOL},
+  {"fd", "fail-with-body",           ARG_BOOL},
   {"F",  "form",                     ARG_STRING},
   {"Fs", "form-string",              ARG_STRING},
   {"g",  "globoff",                  ARG_BOOL},
@@ -290,6 +295,7 @@
   {"j",  "junk-session-cookies",     ARG_BOOL},
   {"J",  "remote-header-name",       ARG_BOOL},
   {"k",  "insecure",                 ARG_BOOL},
+  {"kd", "doh-insecure",             ARG_BOOL},
   {"K",  "config",                   ARG_FILENAME},
   {"l",  "list-only",                ARG_BOOL},
   {"L",  "location",                 ARG_BOOL},
@@ -436,6 +442,34 @@
   *certname_place = '\0';
 }
 
+/* Replace (in-place) '%20' by '+' according to RFC1866 */
+static size_t replace_url_encoded_space_by_plus(char *url)
+{
+  size_t orig_len = strlen(url);
+  size_t orig_index = 0;
+  size_t new_index = 0;
+
+  while(orig_index < orig_len) {
+    if((url[orig_index] == '%') &&
+       (url[orig_index + 1] == '2') &&
+       (url[orig_index + 2] == '0')) {
+      url[new_index] = '+';
+      orig_index += 3;
+    }
+    else{
+      if(new_index != orig_index) {
+        url[new_index] = url[orig_index];
+      }
+      orig_index++;
+    }
+    new_index++;
+  }
+
+  url[new_index] = 0; /* terminate string */
+
+  return new_index; /* new size */
+}
+
 static void
 GetFileAndPassword(char *nextarg, char **file, char **password)
 {
@@ -773,6 +807,12 @@
         config->create_dirs = toggle;
         break;
 
+      case 'R': /* --create-file-mode */
+        err = oct2nummax(&config->create_file_mode, nextarg, 0777);
+        if(err)
+          return err;
+        break;
+
       case 's': /* --max-redirs */
         /* specified max no of redirects (http(s)), this accepts -1 as a
            special condition */
@@ -795,6 +835,11 @@
         config->crlf = toggle;
         break;
 
+      case 'V': /* --aws-sigv4 */
+        config->authtype |= CURLAUTH_AWS_SIGV4;
+        GetStr(&config->aws_sigv4, nextarg);
+        break;
+
       case 'v': /* --stderr */
         if(strcmp(nextarg, "-")) {
           FILE *newfile = fopen(nextarg, FOPEN_WRITETEXT);
@@ -1094,29 +1139,8 @@
         GetStr(&config->mail_auth, nextarg);
         break;
       case 'J': /* --metalink */
-        {
-#ifdef USE_METALINK
-          int mlmaj, mlmin, mlpatch;
-          metalink_get_version(&mlmaj, &mlmin, &mlpatch);
-          if((mlmaj*10000)+(mlmin*100) + mlpatch < CURL_REQ_LIBMETALINK_VERS) {
-            warnf(global,
-                  "--metalink option cannot be used because the version of "
-                  "the linked libmetalink library is too old. "
-                  "Required: %d.%d.%d, found %d.%d.%d\n",
-                  CURL_REQ_LIBMETALINK_MAJOR,
-                  CURL_REQ_LIBMETALINK_MINOR,
-                  CURL_REQ_LIBMETALINK_PATCH,
-                  mlmaj, mlmin, mlpatch);
-            return PARAM_BAD_USE;
-          }
-          else
-            config->use_metalink = toggle;
-#else
-          warnf(global, "--metalink option is ignored because the binary is "
-                "built without the Metalink support.\n");
-#endif
-          break;
-        }
+        errorf(global, "--metalink is disabled\n");
+        return PARAM_BAD_USE;
       case '6': /* --sasl-authzid */
         GetStr(&config->sasl_authzid, nextarg);
         break;
@@ -1261,11 +1285,11 @@
       break;
     case '2':
       /* SSL version 2 */
-      config->ssl_version = CURL_SSLVERSION_SSLv2;
+      warnf(global, "Ignores instruction to use SSLv2\n");
       break;
     case '3':
       /* SSL version 3 */
-      config->ssl_version = CURL_SSLVERSION_SSLv3;
+      warnf(global, "Ignores instruction to use SSLv3\n");
       break;
     case '4':
       /* IPv4 */
@@ -1291,17 +1315,27 @@
         else
           return PARAM_LIBCURL_DOESNT_SUPPORT;
         break;
+      case 'b': /* --hsts */
+        if(curlinfo->features & CURL_VERSION_HSTS)
+          GetStr(&config->hsts, nextarg);
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
       default:  /* --cookie string coming up: */
         if(nextarg[0] == '@') {
           nextarg++;
         }
         else if(strchr(nextarg, '=')) {
           /* A cookie string must have a =-letter */
-          GetStr(&config->cookie, nextarg);
+          err = add2list(&config->cookies, nextarg);
+          if(err)
+            return err;
           break;
         }
         /* We have a cookie file to read from! */
-        GetStr(&config->cookiefile, nextarg);
+        err = add2list(&config->cookiefiles, nextarg);
+        if(err)
+          return err;
       }
       break;
     case 'B':
@@ -1395,9 +1429,11 @@
           char *enc = curl_easy_escape(NULL, postdata, (int)size);
           Curl_safefree(postdata); /* no matter if it worked or not */
           if(enc) {
+            /* replace (in-place) '%20' by '+' acording to RFC1866 */
+            size_t enclen = replace_url_encoded_space_by_plus(enc);
             /* now make a string with the name from above and append the
                encoded string */
-            size_t outlen = nlen + strlen(enc) + 2;
+            size_t outlen = nlen + enclen + 2;
             char *n = malloc(outlen);
             if(!n) {
               curl_free(enc);
@@ -1524,7 +1560,8 @@
       }
       else
         config->autoreferer = FALSE;
-      GetStr(&config->referer, nextarg);
+      ptr = *nextarg ? nextarg : NULL;
+      GetStr(&config->referer, ptr);
     }
     break;
     case 'E':
@@ -1593,6 +1630,16 @@
           config->ssl_allow_beast = toggle;
         break;
 
+      case 'o': /* --ssl-auto-client-cert */
+        if(curlinfo->features & CURL_VERSION_SSL)
+          config->ssl_auto_client_cert = toggle;
+        break;
+
+      case 'O': /* --proxy-ssl-auto-client-cert */
+        if(curlinfo->features & CURL_VERSION_SSL)
+          config->proxy_ssl_auto_client_cert = toggle;
+        break;
+
       case 'p': /* Pinned public key DER file */
         GetStr(&config->pinnedpubkey, nextarg);
         break;
@@ -1605,6 +1652,10 @@
         config->verifystatus = TRUE;
         break;
 
+      case 'Q': /* --doh-cert-status */
+        config->doh_verifystatus = TRUE;
+        break;
+
       case 'r': /* --false-start */
         config->falsestart = TRUE;
         break;
@@ -1746,8 +1797,17 @@
       case 'c': /* --mail-rcpt-allowfails */
         config->mail_rcpt_allowfails = toggle;
         break;
+      case 'd': /* --fail-with-body */
+        config->failwithbody = toggle;
+        break;
       default: /* --fail (hard on errors)  */
         config->failonerror = toggle;
+        break;
+      }
+      if(config->failonerror && config->failwithbody) {
+        errorf(config->global, "You must select either --fail or "
+               "--fail-with-body, not both.\n");
+        return PARAM_BAD_USE;
       }
       break;
     case 'F':
@@ -1857,7 +1917,10 @@
       config->content_disposition = toggle;
       break;
     case 'k': /* allow insecure SSL connects */
-      config->insecure_ok = toggle;
+      if(subletter == 'd') /* --doh-insecure */
+        config->doh_insecure_ok = toggle;
+      else
+        config->insecure_ok = toggle;
       break;
     case 'K': /* parse config file */
       if(parseconfig(nextarg, global))
@@ -1904,7 +1967,7 @@
         break;
       default:
         /* pick info from .netrc, if this is used for http, curl will
-           automatically enfore user+password with the request */
+           automatically enforce user+password with the request */
         config->netrc = toggle;
         break;
       }
@@ -1971,7 +2034,7 @@
       /* This makes the FTP sessions use PORT instead of PASV */
       /* use <eth0> or <192.168.10.10> style addresses. Anything except
          this will make us try to get the "default" address.
-         NOTE: this is a changed behaviour since the released 4.1!
+         NOTE: this is a changed behavior since the released 4.1!
       */
       GetStr(&config->ftpport, nextarg);
       break;
@@ -2234,7 +2297,7 @@
       config->condtime = (curl_off_t)curl_getdate(nextarg, &now);
       if(-1 == config->condtime) {
         /* now let's see if it is a file name to get the time from instead! */
-        curl_off_t filetime = getfiletime(nextarg, config->global->errors);
+        curl_off_t filetime = getfiletime(nextarg, global);
         if(filetime >= 0) {
           /* pull the time out from the file */
           config->condtime = filetime;
@@ -2270,6 +2333,8 @@
 
   for(i = 1, stillflags = TRUE; i < argc && !result; i++) {
     orig_opt = curlx_convert_tchar_to_UTF8(argv[i]);
+    if(!orig_opt)
+      return PARAM_NO_MEM;
 
     if(stillflags && ('-' == orig_opt[0])) {
       bool passarg;
diff --git a/src/tool_getparam.h b/src/tool_getparam.h
index f6fcd5a..2c24d48 100644
--- a/src/tool_getparam.h
+++ b/src/tool_getparam.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_getpass.c b/src/tool_getpass.c
index 35e7c73..4c50a12 100644
--- a/src/tool_getpass.c
+++ b/src/tool_getpass.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_getpass.h b/src/tool_getpass.h
index f639596..d4b35e7 100644
--- a/src/tool_getpass.h
+++ b/src/tool_getpass.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_help.c b/src/tool_help.c
index c7af101..b5e37aa 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,6 +23,9 @@
 #if defined(HAVE_STRCASECMP) && defined(HAVE_STRINGS_H)
 #include <strings.h>
 #endif
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
 
 #include "tool_panykey.h"
 #include "tool_help.h"
@@ -87,7 +90,7 @@
   {"imap", "IMAP protocol options", CURLHELP_IMAP},
   /* important is left out because it is the default help page */
   {"misc", "Options that don't fit into any other category", CURLHELP_MISC},
-  {"output", "The output of curl", CURLHELP_OUTPUT},
+  {"output", "Filesystem output", CURLHELP_OUTPUT},
   {"pop3", "POP3 protocol options", CURLHELP_POP3},
   {"post", "HTTP Post specific options", CURLHELP_POST},
   {"proxy", "All options related to proxies", CURLHELP_PROXY},
@@ -133,6 +136,9 @@
   {"-a, --append",
    "Append to target file when uploading",
    CURLHELP_FTP | CURLHELP_SFTP},
+  {"    --aws-sigv4 <provider1[:provider2[:region[:service]]]>",
+   "Use AWS V4 signature authentication",
+   CURLHELP_AUTH | CURLHELP_HTTP},
   {"    --basic",
    "Use HTTP Basic Authentication",
    CURLHELP_AUTH},
@@ -146,7 +152,7 @@
    "Client certificate file and password",
    CURLHELP_TLS},
   {"    --cert-status",
-   "Verify the status of the server certificate",
+   "Verify the status of the server cert via OCSP-staple",
    CURLHELP_TLS},
   {"    --cert-type <type>",
    "Certificate type (DER/PEM/ENG)",
@@ -181,6 +187,9 @@
   {"    --create-dirs",
    "Create necessary local directory hierarchy",
    CURLHELP_CURL},
+  {"    --create-file-mode <mode>",
+   "File mode (octal) for created files",
+   CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_FILE | CURLHELP_UPLOAD},
   {"    --crlf",
    "Convert LF to CRLF in upload",
    CURLHELP_FTP | CURLHELP_SMTP},
@@ -235,8 +244,14 @@
   {"    --dns-servers <addresses>",
    "DNS server addrs to use",
    CURLHELP_DNS},
+  {"    --doh-cert-status",
+   "Verify the status of the DoH server cert via OCSP-staple",
+   CURLHELP_DNS | CURLHELP_TLS},
+  {"    --doh-insecure",
+   "Allow insecure DoH server connections",
+   CURLHELP_DNS | CURLHELP_TLS},
   {"    --doh-url <URL>",
-   "Resolve host names over DOH",
+   "Resolve host names over DoH",
    CURLHELP_DNS},
   {"-D, --dump-header <filename>",
    "Write the received headers to <filename>",
@@ -262,6 +277,9 @@
   {"    --fail-early",
    "Fail on first transfer error, do not continue",
    CURLHELP_CURL},
+  {"    --fail-with-body",
+   "Fail on HTTP errors but save the body",
+   CURLHELP_HTTP | CURLHELP_OUTPUT},
   {"    --false-start",
    "Enable TLS False Start",
    CURLHELP_TLS},
@@ -328,6 +346,9 @@
   {"    --hostpubmd5 <md5>",
    "Acceptable MD5 hash of the host public key",
    CURLHELP_SFTP | CURLHELP_SCP},
+  {"    --hsts <file name>",
+   "Enable HSTS with this cache file",
+   CURLHELP_HTTP},
   {"    --http0.9",
    "Allow HTTP 0.9 responses",
    CURLHELP_HTTP},
@@ -484,7 +505,7 @@
   {"    --parallel-immediate",
    "Do not wait for multiplexing (with --parallel)",
    CURLHELP_CONNECTION | CURLHELP_CURL},
-  {"    --parallel-max",
+  {"    --parallel-max <num>",
    "Maximum concurrency for parallel transfers",
    CURLHELP_CONNECTION | CURLHELP_CURL},
   {"    --pass <phrase>",
@@ -580,6 +601,9 @@
   {"    --proxy-ssl-allow-beast",
    "Allow security flaw for interop for HTTPS proxy",
    CURLHELP_PROXY | CURLHELP_TLS},
+  {"    --proxy-ssl-auto-client-cert",
+   "Use auto client certificate for proxy (Schannel)",
+   CURLHELP_PROXY | CURLHELP_TLS},
   {"    --proxy-tls13-ciphers <ciphersuite list>",
    "TLS 1.3 proxy cipher suites",
    CURLHELP_PROXY | CURLHELP_TLS},
@@ -607,7 +631,7 @@
   {"    --pubkey <key>",
    "SSH Public key file name",
    CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_AUTH},
-  {"-Q, --quote",
+  {"-Q, --quote <command>",
    "Send command(s) to server before transfer",
    CURLHELP_FTP | CURLHELP_SFTP},
   {"    --random-file <file>",
@@ -637,10 +661,10 @@
   {"-X, --request <command>",
    "Specify request command to use",
    CURLHELP_CONNECTION},
-  {"    --request-target",
+  {"    --request-target <path>",
    "Specify the target for this request",
    CURLHELP_HTTP},
-  {"    --resolve <host:port:addr[,addr]...>",
+  {"    --resolve <[+]host:port:addr[,addr]...>",
    "Resolve the host+port to this address",
    CURLHELP_CONNECTION},
   {"    --retry <num>",
@@ -709,6 +733,9 @@
   {"    --ssl-allow-beast",
    "Allow security flaw to improve interop",
    CURLHELP_TLS},
+  {"    --ssl-auto-client-cert",
+   "Use auto client certificate (Schannel)",
+   CURLHELP_TLS},
   {"    --ssl-no-revoke",
    "Disable cert revocation checks (Schannel)",
    CURLHELP_TLS},
@@ -724,7 +751,7 @@
   {"-3, --sslv3",
    "Use SSLv3",
    CURLHELP_TLS},
-  {"    --stderr",
+  {"    --stderr <file>",
    "Where to redirect stderr",
    CURLHELP_VERBOSE},
   {"    --styled-output",
@@ -760,7 +787,7 @@
   {"    --tlsauthtype <type>",
    "TLS authentication type",
    CURLHELP_TLS | CURLHELP_AUTH},
-  {"    --tlspassword",
+  {"    --tlspassword <string>",
    "TLS password",
    CURLHELP_TLS | CURLHELP_AUTH},
   {"    --tlsuser <name>",
@@ -826,10 +853,6 @@
   { NULL, NULL, CURLHELP_HIDDEN }
 };
 
-#ifdef NETWARE
-#  define PRINT_LINES_PAUSE 23
-#endif
-
 struct feat {
   const char *name;
   int bitmask;
@@ -862,6 +885,8 @@
   {"MultiSSL",       CURL_VERSION_MULTI_SSL},
   {"PSL",            CURL_VERSION_PSL},
   {"alt-svc",        CURL_VERSION_ALTSVC},
+  {"HSTS",           CURL_VERSION_HSTS},
+  {"gsasl",          CURL_VERSION_GSASL},
 };
 
 static void print_category(curlhelp_t category)
@@ -869,7 +894,7 @@
   unsigned int i;
   for(i = 0; helptext[i].opt; ++i)
     if(helptext[i].categories & category) {
-      printf(" %-19s %s\n", helptext[i].opt, helptext[i].desc);
+      printf(" %-18s  %s\n", helptext[i].opt, helptext[i].desc);
     }
 }
 
@@ -964,9 +989,6 @@
       if(curlinfo->features & feats[i].bitmask)
         featp[numfeat++] = (char *)feats[i].name;
     }
-#ifdef USE_METALINK
-    featp[numfeat++] = (char *)"Metalink";
-#endif
     qsort(&featp[0], numfeat, sizeof(char *), featcomp);
     for(i = 0; i< numfeat; i++)
       printf(" %s", featp[i]);
diff --git a/src/tool_help.h b/src/tool_help.h
index 1da23cc..39ea240 100644
--- a/src/tool_help.h
+++ b/src/tool_help.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_helpers.c b/src/tool_helpers.c
index 61788b7..8cd2ac5 100644
--- a/src/tool_helpers.c
+++ b/src/tool_helpers.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_helpers.h b/src/tool_helpers.h
index 67d28be..c5e5773 100644
--- a/src/tool_helpers.h
+++ b/src/tool_helpers.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_homedir.c b/src/tool_homedir.c
index 3529672..632bdcc 100644
--- a/src/tool_homedir.c
+++ b/src/tool_homedir.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -22,6 +22,7 @@
 #include "tool_setup.h"
 
 #ifdef HAVE_PWD_H
+#  undef __NO_NET_API /* required for building for AmigaOS */
 #  include <pwd.h>
 #endif
 
diff --git a/src/tool_homedir.h b/src/tool_homedir.h
index 66defc2..31e38e9 100644
--- a/src/tool_homedir.h
+++ b/src/tool_homedir.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_hugehelp.c b/src/tool_hugehelp.c
index a0859d6..f1fb951 100644
--- a/src/tool_hugehelp.c
+++ b/src/tool_hugehelp.c
@@ -26,13 +26,13 @@
 , stdout);
  fputs(
 "       IMAPS,  LDAP,  LDAPS,  MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP,\n"
-"       SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command  is  designed  to\n"
+"       SMB, SMBS, SMTP, SMTPS, TELNET or TFTP). The  command  is  designed  to\n"
 "       work without user interaction.\n"
 "\n"
 "       curl offers a busload of useful tricks like proxy support, user authen-\n"
 "       tication, FTP upload, HTTP post, SSL connections, cookies, file  trans-\n"
-"       fer  resume,  Metalink,  and more. As you will see below, the number of\n"
-"       features will make your head spin!\n"
+"       fer resume and more. As you will see below, the number of features will\n"
+"       make your head spin!\n"
 "\n"
 , stdout);
  fputs(
@@ -107,28 +107,41 @@
 "       that  getting many files from the same server will not do multiple con-\n"
 "       nects / handshakes. This improves speed. Of course this is only done on\n"
 "       files  specified  on  a  single command line and cannot be used between\n"
-"       separate curl invokes.\n"
+"       separate curl invocations.\n"
+"\n"
+"OUTPUT\n"
+"       If not told otherwise, curl writes the received data to stdout. It  can\n"
+, stdout);
+ fputs(
+"       be  instructed  to  instead save that data into a local file, using the\n"
+"       -o, --output or -O, --remote-name options. If curl  is  given  multiple\n"
+"       URLs  to  transfer on the command line, it similarly needs multiple op-\n"
+"       tions for where to save them.\n"
+"\n"
+"       curl does not parse or otherwise \"understand\" the content  it  gets  or\n"
+"       writes  as  output.  It does no encoding or decoding, unless explicitly\n"
+"       asked to with dedicated command line options.\n"
 "\n"
 "PROTOCOLS\n"
+, stdout);
+ fputs(
 "       curl supports numerous protocols, or put in URL  terms:  schemes.  Your\n"
 "       particular build may not support them all.\n"
 "\n"
-, stdout);
- fputs(
 "       DICT   Lets you lookup words using online dictionaries.\n"
 "\n"
 "       FILE   Read  or  write  local  files.  curl  does not support accessing\n"
-"              file:// URL remotely, but when running on Microsft Windows using\n"
-"              the native UNC approach will work.\n"
+"              file:// URL remotely, but when running on Microsoft Windows  us-\n"
+"              ing the native UNC approach will work.\n"
 "\n"
 "       FTP(S) curl  supports  the  File Transfer Protocol with a lot of tweaks\n"
+, stdout);
+ fputs(
 "              and levers. With or without using TLS.\n"
 "\n"
 "       GOPHER Retrieve files.\n"
 "\n"
 "       HTTP(S)\n"
-, stdout);
- fputs(
 "              curl supports HTTP with numerous options and variations. It  can\n"
 "              speak HTTP version 0.9, 1.0, 1.1, 2 and 3 depending on build op-\n"
 "              tions and the correct command line options.\n"
@@ -138,10 +151,10 @@
 "              you. With or without using TLS.\n"
 "\n"
 "       LDAP(S)\n"
-"              curl can do directory lookups for you, with or without TLS.\n"
-"\n"
 , stdout);
  fputs(
+"              curl can do directory lookups for you, with or without TLS.\n"
+"\n"
 "       MQTT   curl supports MQTT version 3. Downloading over MQTT equals \"sub-\n"
 "              scribe\" to a topic while uploading/posting equals \"publish\" on a\n"
 "              topic.  MQTT  support  is experimental and TLS based MQTT is not\n"
@@ -152,9 +165,9 @@
 "              without using TLS.\n"
 "\n"
 "       RTMP(S)\n"
-"              The  Realtime  Messaging  Protocol  is  primarily used to server\n"
 , stdout);
  fputs(
+"              The  Realtime  Messaging  Protocol  is  primarily used to server\n"
 "              streaming media and curl can download it.\n"
 "\n"
 "       RTSP   curl supports RTSP 1.0 downloads.\n"
@@ -167,10 +180,10 @@
 "\n"
 "       SMTP(S)\n"
 "              Uploading contents to an SMTP server  means  sending  an  email.\n"
-"              With or without TLS.\n"
-"\n"
 , stdout);
  fputs(
+"              With or without TLS.\n"
+"\n"
 "       TELNET Telling curl to fetch a telnet URL starts an interactive session\n"
 "              where it sends what it reads  on  stdin  and  outputs  what  the\n"
 "              server sends it.\n"
@@ -180,30 +193,30 @@
 "PROGRESS METER\n"
 "       curl  normally  displays a progress meter during operations, indicating\n"
 "       the amount of transferred data,  transfer  speeds  and  estimated  time\n"
-"       left,  etc.  The progress meter displays number of bytes and the speeds\n"
 , stdout);
  fputs(
+"       left,  etc.  The progress meter displays number of bytes and the speeds\n"
 "       are in bytes per second. The suffixes (k, M, G, T, P) are  1024  based.\n"
 "       For example 1k is 1024 bytes. 1M is 1048576 bytes.\n"
 "\n"
 "       curl  displays  this  data to the terminal by default, so if you invoke\n"
 "       curl to do an operation and it is about to write data to the  terminal,\n"
 "       it disables the progress meter as otherwise it would mess up the output\n"
-"       mixing progress meter and response data.\n"
-"\n"
 , stdout);
  fputs(
+"       mixing progress meter and response data.\n"
+"\n"
 "       If you want a progress meter for HTTP POST or PUT requests, you need to\n"
 "       redirect  the  response output to a file, using shell redirect (>), -o,\n"
 "       --output or similar.\n"
 "\n"
-"       It is not the same case for FTP upload as that operation does not  spit\n"
-"       out any response data to the terminal.\n"
+"       This does not apply to FTP upload as that operation does not  spit  out\n"
+"       any response data to the terminal.\n"
 "\n"
 "       If  you  prefer  a  progress  \"bar\"  instead  of the regular meter, -#,\n"
-"       --progress-bar is your friend. You can also disable the progress  meter\n"
 , stdout);
  fputs(
+"       --progress-bar is your friend. You can also disable the progress  meter\n"
 "       completely with the -s, --silent option.\n"
 "\n"
 "OPTIONS\n"
@@ -213,29 +226,29 @@
 "       The short \"single-dash\" form of the options, -d  for  example,  may  be\n"
 "       used with or without a space between it and its value, although a space\n"
 "       is a recommended separator. The long \"double-dash\" form, -d, --data for\n"
-"       example, requires a space between it and its value.\n"
-"\n"
 , stdout);
  fputs(
+"       example, requires a space between it and its value.\n"
+"\n"
 "       Short version options that don't need any additional values can be used\n"
 "       immediately next to each other, like for example you  can  specify  all\n"
 "       the options -O, -L and -v at once as -OLv.\n"
 "\n"
 "       In general, all boolean options are enabled with --option and yet again\n"
 "       disabled with --no-option. That is, you use the exact same option  name\n"
-"       but prefix it with \"no-\". However, in this list we mostly only list and\n"
 , stdout);
  fputs(
+"       but prefix it with \"no-\". However, in this list we mostly only list and\n"
 "       show the --option version of them. (This concept with --no options  was\n"
-"       added  in  7.19.0.  Previously  most options were toggled on/off on re-\n"
-"       peated use of the same command line option.)\n"
+"       added  in  7.19.0.  Previously most options were toggled on/off through\n"
+"       repeated use of the same command line option.)\n"
 "\n"
 "       --abstract-unix-socket <path>\n"
 "              (HTTP) Connect through an abstract Unix domain  socket,  instead\n"
 "              of  using  the  network.  Note: netstat shows the path of an ab-\n"
-"              stract socket prefixed with '@',  however  the  <path>  argument\n"
 , stdout);
  fputs(
+"              stract socket prefixed with '@',  however  the  <path>  argument\n"
 "              should not have this leading character.\n"
 "\n"
 "              Added in 7.53.0.\n"
@@ -246,9 +259,9 @@
 "\n"
 "              This option enables the alt-svc parser in curl. If the file name\n"
 "              points to an existing alt-svc cache file, that will be used. Af-\n"
-"              ter a completed transfer, the cache will be saved  to  the  file\n"
 , stdout);
  fputs(
+"              ter a completed transfer, the cache will be saved  to  the  file\n"
 "              name again if it has been modified.\n"
 "\n"
 "              Specify a \"\" file name (zero length) to avoid loading/saving and\n"
@@ -260,18 +273,18 @@
 "              Added in 7.64.1.\n"
 "\n"
 "       --anyauth\n"
-"              (HTTP) Tells curl to figure out authentication method by itself,\n"
 , stdout);
  fputs(
+"              (HTTP) Tells curl to figure out authentication method by itself,\n"
 "              and use the most secure one the remote site claims  to  support.\n"
 "              This is done by first doing a request and checking the response-\n"
 "              headers, thus possibly inducing  an  extra  network  round-trip.\n"
 "              This  is  used  instead  of  setting  a  specific authentication\n"
 "              method, which you can do with  --basic,  --digest,  --ntlm,  and\n"
-"              --negotiate.\n"
-"\n"
 , stdout);
  fputs(
+"              --negotiate.\n"
+"\n"
 "              Using --anyauth is not recommended if you do uploads from stdin,\n"
 "              since it may require data to be sent twice and then  the  client\n"
 "              must  be able to rewind. If the need should arise when uploading\n"
@@ -289,100 +302,118 @@
 "              doesn't exist, it will be created.  Note that this flag  is  ig-\n"
 "              nored by some SFTP servers (including OpenSSH).\n"
 "\n"
-"       --basic\n"
-"              (HTTP)  Tells curl to use HTTP Basic authentication with the re-\n"
-"              mote host. This is the default and this option is usually point-\n"
+"       --aws-sigv4 <provider1[:provider2[:region[:service]]]>\n"
+"              Use AWS V4 signature authentication in the transfer.\n"
+"\n"
 , stdout);
  fputs(
+"              The  provider argument is a string that is used by the algorithm\n"
+"              when creating outgoing authentication headers.\n"
+"\n"
+"              The region argument is a string that points to a geographic area\n"
+"              of  a resources collection (region-code) when the region name is\n"
+"              omitted from the endpoint.\n"
+"\n"
+"              The service argument is a string that points to a function  pro-\n"
+"              vided by a cloud (service-code) when the service name is omitted\n"
+, stdout);
+ fputs(
+"              from the endpoint.\n"
+"\n"
+"              Added in 7.75.0.\n"
+"\n"
+"       --basic\n"
+"              (HTTP) Tells curl to use HTTP Basic authentication with the  re-\n"
+"              mote host. This is the default and this option is usually point-\n"
 "              less, unless you use it to override a previously set option that\n"
-"              sets a different authentication method (such  as  --ntlm,  --di-\n"
+"              sets  a  different  authentication method (such as --ntlm, --di-\n"
 "              gest, or --negotiate).\n"
 "\n"
 "              Used together with -u, --user.\n"
 "\n"
+, stdout);
+ fputs(
 "              See also --proxy-basic.\n"
 "\n"
 "       --cacert <file>\n"
 "              (TLS) Tells curl to use the specified certificate file to verify\n"
-"              the peer. The file may contain  multiple  CA  certificates.  The\n"
-, stdout);
- fputs(
-"              certificate(s)  must be in PEM format. Normally curl is built to\n"
+"              the  peer.  The  file  may contain multiple CA certificates. The\n"
+"              certificate(s) must be in PEM format. Normally curl is built  to\n"
 "              use a default file for this, so this option is typically used to\n"
 "              alter that default file.\n"
 "\n"
-"              curl  recognizes the environment variable named 'CURL_CA_BUNDLE'\n"
-"              if it is set, and uses the given path as a path  to  a  CA  cert\n"
-"              bundle. This option overrides that variable.\n"
-"\n"
-"              The  windows  version  of  curl will automatically look for a CA\n"
+"              curl recognizes the environment variable named  'CURL_CA_BUNDLE'\n"
 , stdout);
  fputs(
+"              if  it  is  set,  and uses the given path as a path to a CA cert\n"
+"              bundle. This option overrides that variable.\n"
+"\n"
+"              The windows version of curl will automatically  look  for  a  CA\n"
 "              certs file named 'curl-ca-bundle.crt', either in the same direc-\n"
 "              tory as curl.exe, or in the Current Working Directory, or in any\n"
 "              folder along your PATH.\n"
 "\n"
-"              If curl is built against  the  NSS  SSL  library,  the  NSS  PEM\n"
+"              If  curl  is  built  against  the  NSS  SSL library, the NSS PEM\n"
+, stdout);
+ fputs(
 "              PKCS#11 module (libnsspem.so) needs to be available for this op-\n"
 "              tion to work properly.\n"
 "\n"
-"              (iOS and macOS only) If curl is built against Secure  Transport,\n"
+"              (iOS  and macOS only) If curl is built against Secure Transport,\n"
+"              then this option is supported for  backward  compatibility  with\n"
+"              other  SSL  engines,  but it should not be set. If the option is\n"
+"              not set, then curl will use the certificates in the  system  and\n"
 , stdout);
  fputs(
-"              then  this  option  is supported for backward compatibility with\n"
-"              other SSL engines, but it should not be set. If  the  option  is\n"
-"              not  set,  then curl will use the certificates in the system and\n"
-"              user Keychain to verify the peer, which is the preferred  method\n"
+"              user  Keychain to verify the peer, which is the preferred method\n"
 "              of verifying the peer's certificate chain.\n"
 "\n"
 "              (Schannel only) This option is supported for Schannel in Windows\n"
-, stdout);
- fputs(
-"              7 or later with libcurl 7.60 or later. This option is  supported\n"
+"              7  or later with libcurl 7.60 or later. This option is supported\n"
 "              for backward compatibility with other SSL engines; instead it is\n"
-"              recommended to use Windows' store of root certificates (the  de-\n"
+"              recommended  to use Windows' store of root certificates (the de-\n"
 "              fault for Schannel).\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --capath <dir>\n"
-"              (TLS)  Tells  curl to use the specified certificate directory to\n"
-, stdout);
- fputs(
-"              verify the peer. Multiple paths can be  provided  by  separating\n"
+"              (TLS) Tells curl to use the specified certificate  directory  to\n"
+"              verify  the  peer.  Multiple paths can be provided by separating\n"
 "              them with \":\" (e.g.  \"path1:path2:path3\"). The certificates must\n"
-"              be in PEM format, and if curl is built against OpenSSL, the  di-\n"
+"              be  in PEM format, and if curl is built against OpenSSL, the di-\n"
 "              rectory must have been processed using the c_rehash utility sup-\n"
-"              plied with OpenSSL. Using  --capath  can  allow  OpenSSL-powered\n"
-"              curl  to  make  SSL-connections much more efficiently than using\n"
 , stdout);
  fputs(
+"              plied  with  OpenSSL.  Using  --capath can allow OpenSSL-powered\n"
+"              curl to make SSL-connections much more  efficiently  than  using\n"
 "              --cacert if the --cacert file contains many CA certificates.\n"
 "\n"
 "              If this option is set, the default capath value will be ignored,\n"
 "              and if it is used several times, the last one will be used.\n"
 "\n"
 "       --cert-status\n"
-"              (TLS)  Tells curl to verify the status of the server certificate\n"
+"              (TLS) Tells curl to verify the status of the server  certificate\n"
+, stdout);
+ fputs(
 "              by using the Certificate Status Request (aka. OCSP stapling) TLS\n"
 "              extension.\n"
 "\n"
-, stdout);
- fputs(
-"              If  this option is enabled and the server sends an invalid (e.g.\n"
+"              If this option is enabled and the server sends an invalid  (e.g.\n"
 "              expired) response, if the response suggests that the server cer-\n"
-"              tificate  has  been  revoked, or no response at all is received,\n"
+"              tificate has been revoked, or no response at  all  is  received,\n"
 "              the verification fails.\n"
 "\n"
-"              This is currently only implemented in the  OpenSSL,  GnuTLS  and\n"
+"              This  is  currently  only implemented in the OpenSSL, GnuTLS and\n"
 "              NSS backends.\n"
 "\n"
+, stdout);
+ fputs(
 "              Added in 7.41.0.\n"
 "\n"
 "       --cert-type <type>\n"
-, stdout);
- fputs(
-"              (TLS)  Tells  curl  what type the provided client certificate is\n"
+"              (TLS) Tells curl what type the provided  client  certificate  is\n"
 "              using. PEM, DER, ENG and P12 are recognized types.  If not spec-\n"
 "              ified, PEM is assumed.\n"
 "\n"
@@ -391,85 +422,85 @@
 "              See also -E, --cert, --key and --key-type.\n"
 "\n"
 "       -E, --cert <certificate[:password]>\n"
-"              (TLS)  Tells  curl  to use the specified client certificate file\n"
 , stdout);
  fputs(
+"              (TLS) Tells curl to use the specified  client  certificate  file\n"
 "              when getting a file with HTTPS, FTPS or another SSL-based proto-\n"
-"              col.  The  certificate must be in PKCS#12 format if using Secure\n"
-"              Transport, or PEM format if using any other engine.  If the  op-\n"
-"              tional  password  isn't specified, it will be queried for on the\n"
-"              terminal. Note that this option  assumes  a  \"certificate\"  file\n"
-"              that is the private key and the client certificate concatenated!\n"
+"              col. The certificate must be in PKCS#12 format if  using  Secure\n"
+"              Transport,  or PEM format if using any other engine.  If the op-\n"
+"              tional password isn't specified, it will be queried for  on  the\n"
+"              terminal.  Note  that  this  option assumes a \"certificate\" file\n"
 , stdout);
  fputs(
+"              that is the private key and the client certificate concatenated!\n"
 "              See -E, --cert and --key to specify them independently.\n"
 "\n"
-"              If curl is built against the NSS SSL library  then  this  option\n"
-"              can  tell curl the nickname of the certificate to use within the\n"
-"              NSS database defined by the environment variable SSL_DIR (or  by\n"
-"              default  /etc/pki/nssdb).  If  the  NSS PEM PKCS#11 module (lib-\n"
-"              nsspem.so) is available then PEM files may  be  loaded.  If  you\n"
+"              If  curl  is  built against the NSS SSL library then this option\n"
+"              can tell curl the nickname of the certificate to use within  the\n"
+"              NSS  database defined by the environment variable SSL_DIR (or by\n"
+"              default /etc/pki/nssdb). If the NSS  PEM  PKCS#11  module  (lib-\n"
 , stdout);
  fputs(
+"              nsspem.so)  is  available  then  PEM files may be loaded. If you\n"
 "              want to use a file from the current directory, please precede it\n"
-"              with \"./\" prefix, in order to avoid confusion with  a  nickname.\n"
-"              If  the nickname contains \":\", it needs to be preceded by \"\\\" so\n"
-"              that it is not recognized as password delimiter.  If  the  nick-\n"
-"              name  contains \"\\\", it needs to be escaped as \"\\\\\" so that it is\n"
+"              with  \"./\"  prefix, in order to avoid confusion with a nickname.\n"
+"              If the nickname contains \":\", it needs to be preceded by \"\\\"  so\n"
+"              that  it  is not recognized as password delimiter.  If the nick-\n"
+"              name contains \"\\\", it needs to be escaped as \"\\\\\" so that it  is\n"
+, stdout);
+ fputs(
 "              not recognized as an escape character.\n"
 "\n"
-, stdout);
- fputs(
-"              If curl is built against OpenSSL library, and the engine  pkcs11\n"
+"              If  curl is built against OpenSSL library, and the engine pkcs11\n"
 "              is available, then a PKCS#11 URI (RFC 7512) can be used to spec-\n"
-"              ify a certificate located in a PKCS#11 device. A  string  begin-\n"
-"              ning  with  \"pkcs11:\" will be interpreted as a PKCS#11 URI. If a\n"
+"              ify  a  certificate located in a PKCS#11 device. A string begin-\n"
+"              ning with \"pkcs11:\" will be interpreted as a PKCS#11 URI.  If  a\n"
 "              PKCS#11 URI is provided, then the --engine option will be set as\n"
-"              \"pkcs11\" if none was provided and the --cert-type option will be\n"
 , stdout);
  fputs(
+"              \"pkcs11\" if none was provided and the --cert-type option will be\n"
 "              set as \"ENG\" if none was provided.\n"
 "\n"
-"              (iOS and macOS only) If curl is built against Secure  Transport,\n"
+"              (iOS  and macOS only) If curl is built against Secure Transport,\n"
 "              then the certificate string can either be the name of a certifi-\n"
-"              cate/private key in the system or user keychain, or the path  to\n"
-"              a  PKCS#12-encoded  certificate  and private key. If you want to\n"
-"              use a file from the current directory, please  precede  it  with\n"
+"              cate/private  key in the system or user keychain, or the path to\n"
+"              a PKCS#12-encoded certificate and private key. If  you  want  to\n"
 , stdout);
  fputs(
+"              use  a  file  from the current directory, please precede it with\n"
 "              \"./\" prefix, in order to avoid confusion with a nickname.\n"
 "\n"
-"              (Schannel  only) Client certificates must be specified by a path\n"
-"              expression to a certificate store.  (Loading  PFX  is  not  sup-\n"
+"              (Schannel only) Client certificates must be specified by a  path\n"
+"              expression  to  a  certificate  store.  (Loading PFX is not sup-\n"
 "              ported; you can import it to a store first). You can use \"<store\n"
-"              location>\\<store name>\\<thumbprint>\" to refer to  a  certificate\n"
-"              in   the   system  certificates  store,  for  example,  \"Curren-\n"
+"              location>\\<store  name>\\<thumbprint>\"  to refer to a certificate\n"
 , stdout);
  fputs(
+"              in  the  system  certificates  store,  for   example,   \"Curren-\n"
 "              tUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a\".   Thumbprint\n"
-"              is  usually  a SHA-1 hex string which you can see in certificate\n"
-"              details. Following store locations are  supported:  CurrentUser,\n"
-"              LocalMachine,  CurrentService, Services, CurrentUserGroupPolicy,\n"
+"              is usually a SHA-1 hex string which you can see  in  certificate\n"
+"              details.  Following  store locations are supported: CurrentUser,\n"
+"              LocalMachine, CurrentService, Services,  CurrentUserGroupPolicy,\n"
 "              LocalMachineGroupPolicy, LocalMachineEnterprise.\n"
 "\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
 , stdout);
  fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
 "              See also --cert-type, --key and --key-type.\n"
 "\n"
 "       --ciphers <list of ciphers>\n"
 "              (TLS) Specifies which ciphers to use in the connection. The list\n"
-"              of  ciphers  must  specify  valid ciphers. Read up on SSL cipher\n"
+"              of ciphers must specify valid ciphers. Read  up  on  SSL  cipher\n"
 "              list details on this URL:\n"
 "\n"
-"               https://curl.haxx.se/docs/ssl-ciphers.html\n"
+"               https://curl.se/docs/ssl-ciphers.html\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --compressed-ssh\n"
-, stdout);
- fputs(
 "              (SCP SFTP) Enables built-in SSH compression.  This is a request,\n"
 "              not an order; the server may or may not do it.\n"
 "\n"
@@ -480,39 +511,42 @@
 "              curl supports, and automatically decompress the content. Headers\n"
 "              are not modified.\n"
 "\n"
-"              If  this  option is used and the server sends an unsupported en-\n"
 , stdout);
  fputs(
+"              If this option is used and the server sends an  unsupported  en-\n"
 "              coding, curl will report an error.\n"
 "\n"
 "       -K, --config <file>\n"
 "\n"
-"              Specify a text file to read curl  arguments  from.  The  command\n"
-"              line  arguments  found  in the text file will be used as if they\n"
+"              Specify  a  text  file  to read curl arguments from. The command\n"
+"              line arguments found in the text file will be used  as  if  they\n"
 "              were provided on the command line.\n"
 "\n"
-"              Options and their parameters must be specified on the same  line\n"
-"              in the file, separated by whitespace, colon, or the equals sign.\n"
+"              Options  and their parameters must be specified on the same line\n"
 , stdout);
  fputs(
-"              Long option names can optionally be given  in  the  config  file\n"
+"              in the file, separated by whitespace, colon, or the equals sign.\n"
+"              Long  option  names  can  optionally be given in the config file\n"
 "              without the initial double dashes and if so, the colon or equals\n"
 "              characters can be used as separators. If the option is specified\n"
-"              with  one or two dashes, there can be no colon or equals charac-\n"
+"              with one or two dashes, there can be no colon or equals  charac-\n"
 "              ter between the option and its parameter.\n"
 "\n"
-"              If the parameter contains whitespace (or starts with  :  or  =),\n"
 , stdout);
  fputs(
-"              the  parameter  must  be  enclosed  within quotes. Within double\n"
-"              quotes, the following escape sequences are  available:  \\\\,  \\\",\n"
+"              If  the  parameter  contains whitespace (or starts with : or =),\n"
+"              the parameter must be  enclosed  within  quotes.  Within  double\n"
+"              quotes,  the  following  escape sequences are available: \\\\, \\\",\n"
 "              \\t, \\n, \\r and \\v. A backslash preceding any other letter is ig-\n"
-"              nored. If the first column of a config line is a '#'  character,\n"
-"              the  rest  of  the line will be treated as a comment. Only write\n"
-"              one option per physical line in the config file.\n"
+"              nored.\n"
+"\n"
+"              If  the  first  column  of a config line is a '#' character, the\n"
+"              rest of the line will be treated as a comment.\n"
 "\n"
 , stdout);
  fputs(
+"              Only write one option per physical line in the config file.\n"
+"\n"
 "              Specify the filename to -K, --config as '-' to  make  curl  read\n"
 "              the file from stdin.\n"
 "\n"
@@ -521,7 +555,7 @@
 "              writing  the  URL  on its own line. So, it could look similar to\n"
 "              this:\n"
 "\n"
-"              url = \"https://curl.haxx.se/docs/\"\n"
+"              url = \"https://curl.se/docs/\"\n"
 "\n"
 , stdout);
  fputs(
@@ -677,42 +711,51 @@
 "              cookies will be written to the file. To store cookies,  use  the\n"
 "              -c, --cookie-jar option.\n"
 "\n"
-"              Exercise  caution  if  you  are  using  this option and multiple\n"
-"              transfers may occur.  If you use the NAME1=VALUE1; format, or in\n"
-"              a  file  use  the  Set-Cookie format and don't specify a domain,\n"
+"              If you use the Set-Cookie file format and don't specify a domain\n"
+"              then the cookie is not sent since the domain will  never  match.\n"
+"              To  address  this,  set  a domain in Set-Cookie line (doing that\n"
 , stdout);
  fputs(
-"              then the cookie is sent for any domain (even after redirects are\n"
-"              followed)  and cannot be modified by a server-set cookie. If the\n"
-"              cookie engine is enabled and a server sets a cookie of the  same\n"
-"              name then both will be sent on a future transfer to that server,\n"
-"              likely not what you intended.  To address these issues set a do-\n"
-"              main  in Set-Cookie (doing that will include sub domains) or use\n"
-, stdout);
- fputs(
-"              the Netscape format.\n"
+"              will include sub-domains) or preferably: use the  Netscape  for-\n"
+"              mat.\n"
 "\n"
-"              If this option is used several times, the last one will be used.\n"
+"              This option can be used multiple times.\n"
+"\n"
 "              Users very often want to both read cookies from a file and write\n"
-"              updated  cookies  back to a file, so using both -b, --cookie and\n"
+"              updated cookies back to a file, so using both -b,  --cookie  and\n"
 "              -c, --cookie-jar in the same command line is common.\n"
 "\n"
 "       --create-dirs\n"
 "              When used in conjunction with the -o, --output option, curl will\n"
 , stdout);
  fputs(
-"              create  the  necessary local directory hierarchy as needed. This\n"
-"              option creates the dirs mentioned with the -o, --output  option,\n"
-"              nothing  else.  If  the --output file name uses no dir or if the\n"
-"              dirs it mentions already exist, no dir will be created.\n"
+"              create the necessary local directory hierarchy as  needed.  This\n"
+"              option  creates  the directories mentioned with the -o, --output\n"
+"              option, nothing else. If the --output file name uses  no  direc-\n"
+"              tory, or if the directories it mentions already exist, no direc-\n"
+"              tories will be created.\n"
 "\n"
 "              Created dirs are made with mode 0750 on unix style file systems.\n"
+, stdout);
+ fputs(
 "              To create remote directories when using FTP or SFTP, try  --ftp-\n"
 "              create-dirs.\n"
 "\n"
+"       --create-file-mode <mode>\n"
+"              (SFTP SCP FILE) When curl is used to create files remotely using\n"
+"              one of the supported protocols, this option allows the  user  to\n"
+"              set which 'mode' to set on the file at creation time, instead of\n"
+"              the default 0644.\n"
+"\n"
+"              This option takes an octal number as argument.\n"
+"\n"
 , stdout);
  fputs(
-"       --crlf (FTP  SMTP)  Convert  LF  to  CRLF  in  upload.  Useful  for MVS\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"              See also --ftp-create-dirs. Added in 7.75.0.\n"
+"\n"
+"       --crlf (FTP SMTP)  Convert  LF  to  CRLF  in  upload.  Useful  for  MVS\n"
 "              (OS/390).\n"
 "\n"
 "              (SMTP added in 7.40.0)\n"
@@ -722,297 +765,313 @@
 "              tion List that may specify peer certificates that are to be con-\n"
 "              sidered revoked.\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "              Added in 7.19.7.\n"
 "\n"
+"       --curves <algorithm list>\n"
+"              (TLS)  Tells  curl  to request specific curves to use during SSL\n"
+"              session establishment according to RFC 8422, 5.1.  Multiple  al-\n"
+"              gorithms  can  be  provided  by  separating  them with \":\" (e.g.\n"
+"              \"X25519:P-521\").  The parameter is available identically in  the\n"
 , stdout);
  fputs(
-"       --curves <algorithm list>\n"
-"              (TLS) Tells curl to request specific curves to  use  during  SSL\n"
-"              session  establishment according to RFC 8422, 5.1.  Multiple al-\n"
-"              gorithms can be provided  by  separating  them  with  \":\"  (e.g.\n"
-"              \"X25519:P-521\").   The parameter is available identically in the\n"
 "              \"openssl s_client/s_server\" utilities.\n"
 "\n"
-"              --curves allows a OpenSSL powered curl to  make  SSL-connections\n"
-, stdout);
- fputs(
-"              with  exactly  the  (EC) curve requested by the client, avoiding\n"
+"              --curves  allows  a OpenSSL powered curl to make SSL-connections\n"
+"              with exactly the (EC) curve requested by  the  client,  avoiding\n"
 "              intransparent client/server negotiations.\n"
 "\n"
-"              If this option is  set,  the  default  curves  list  built  into\n"
+"              If  this  option  is  set,  the  default  curves list built into\n"
 "              openssl will be ignored.\n"
 "\n"
 "              Added in 7.73.0.\n"
 "\n"
 "       --data-ascii <data>\n"
+, stdout);
+ fputs(
 "              (HTTP) This is just an alias for -d, --data.\n"
 "\n"
 "       --data-binary <data>\n"
-"              (HTTP)  This  posts data exactly as specified with no extra pro-\n"
-, stdout);
- fputs(
+"              (HTTP) This posts data exactly as specified with no  extra  pro-\n"
 "              cessing whatsoever.\n"
 "\n"
-"              If you start the data with the letter @, the rest  should  be  a\n"
-"              filename.   Data  is  posted  in  a similar manner as -d, --data\n"
-"              does, except that newlines and carriage  returns  are  preserved\n"
+"              If  you  start  the data with the letter @, the rest should be a\n"
+"              filename.  Data is posted in a  similar  manner  as  -d,  --data\n"
+"              does,  except  that  newlines and carriage returns are preserved\n"
 "              and conversions are never done.\n"
 "\n"
-"              Like  -d,  --data the default content-type sent to the server is\n"
-"              application/x-www-form-urlencoded. If you want the  data  to  be\n"
 , stdout);
  fputs(
+"              Like -d, --data the default content-type sent to the  server  is\n"
+"              application/x-www-form-urlencoded.  If  you  want the data to be\n"
 "              treated as arbitrary binary data by the server then set the con-\n"
-"              tent-type to octet-stream: -H \"Content-Type:  application/octet-\n"
+"              tent-type  to octet-stream: -H \"Content-Type: application/octet-\n"
 "              stream\".\n"
 "\n"
-"              If  this  option  is  used several times, the ones following the\n"
+"              If this option is used several times,  the  ones  following  the\n"
 "              first will append data as described in -d, --data.\n"
 "\n"
-"       --data-raw <data>\n"
-"              (HTTP) This posts data similarly to -d, --data but  without  the\n"
-"              special interpretation of the @ character.\n"
-"\n"
 , stdout);
  fputs(
+"       --data-raw <data>\n"
+"              (HTTP)  This  posts data similarly to -d, --data but without the\n"
+"              special interpretation of the @ character.\n"
+"\n"
 "              See also -d, --data. Added in 7.43.0.\n"
 "\n"
 "       --data-urlencode <data>\n"
-"              (HTTP)  This posts data, similar to the other -d, --data options\n"
+"              (HTTP) This posts data, similar to the other -d, --data  options\n"
 "              with the exception that this performs URL-encoding.\n"
 "\n"
-"              To be CGI-compliant, the <data> part should begin  with  a  name\n"
-"              followed  by a separator and a content specification. The <data>\n"
+"              To  be  CGI-compliant,  the <data> part should begin with a name\n"
+, stdout);
+ fputs(
+"              followed by a separator and a content specification. The  <data>\n"
 "              part can be passed to curl using one of the following syntaxes:\n"
 "\n"
 "              content\n"
-, stdout);
- fputs(
-"                     This will make curl URL-encode the content and pass  that\n"
-"                     on.  Just  be careful so that the content doesn't contain\n"
-"                     any = or @ symbols, as that will  then  make  the  syntax\n"
+"                     This  will make curl URL-encode the content and pass that\n"
+"                     on. Just be careful so that the content  doesn't  contain\n"
+"                     any  =  or  @  symbols, as that will then make the syntax\n"
 "                     match one of the other cases below!\n"
 "\n"
 "              =content\n"
-"                     This  will make curl URL-encode the content and pass that\n"
-"                     on. The preceding = symbol is not included in the data.\n"
-"\n"
 , stdout);
  fputs(
+"                     This will make curl URL-encode the content and pass  that\n"
+"                     on. The preceding = symbol is not included in the data.\n"
+"\n"
 "              name=content\n"
-"                     This will make curl URL-encode the content part and  pass\n"
-"                     that  on.  Note that the name part is expected to be URL-\n"
+"                     This  will make curl URL-encode the content part and pass\n"
+"                     that on. Note that the name part is expected to  be  URL-\n"
 "                     encoded already.\n"
 "\n"
 "              @filename\n"
-"                     This will make curl load data from the  given  file  (in-\n"
-"                     cluding  any  newlines), URL-encode that data and pass it\n"
+"                     This  will  make  curl load data from the given file (in-\n"
+, stdout);
+ fputs(
+"                     cluding any newlines), URL-encode that data and  pass  it\n"
 "                     on in the POST.\n"
 "\n"
 "              name@filename\n"
+"                     This  will  make  curl load data from the given file (in-\n"
+"                     cluding any newlines), URL-encode that data and  pass  it\n"
+"                     on  in  the  POST.  The  name part gets an equal sign ap-\n"
+"                     pended, resulting in  name=urlencoded-file-content.  Note\n"
 , stdout);
  fputs(
-"                     This will make curl load data from the  given  file  (in-\n"
-"                     cluding  any  newlines), URL-encode that data and pass it\n"
-"                     on in the POST. The name part  gets  an  equal  sign  ap-\n"
-"                     pended,  resulting  in name=urlencoded-file-content. Note\n"
 "                     that the name is expected to be URL-encoded already.\n"
 "       See also -d, --data and --data-raw. Added in 7.18.0.\n"
 "\n"
 "       -d, --data <data>\n"
+"              (HTTP  MQTT)  Sends  the specified data in a POST request to the\n"
+"              HTTP server, in the same way that a browser does when a user has\n"
+"              filled  in an HTML form and presses the submit button. This will\n"
+"              cause curl to pass the data to the server using the content-type\n"
 , stdout);
  fputs(
-"              (HTTP MQTT) Sends the specified data in a POST  request  to  the\n"
-"              HTTP server, in the same way that a browser does when a user has\n"
-"              filled in an HTML form and presses the submit button. This  will\n"
-"              cause curl to pass the data to the server using the content-type\n"
 "              application/x-www-form-urlencoded.  Compare to -F, --form.\n"
 "\n"
 "              --data-raw is almost the same but does not have a special inter-\n"
-, stdout);
- fputs(
-"              pretation  of  the  @ character. To post data purely binary, you\n"
-"              should instead use the --data-binary option.  To URL-encode  the\n"
+"              pretation of the @ character. To post data  purely  binary,  you\n"
+"              should  instead use the --data-binary option.  To URL-encode the\n"
 "              value of a form field you may use --data-urlencode.\n"
 "\n"
-"              If  any of these options is used more than once on the same com-\n"
-"              mand line, the data pieces specified  will  be  merged  together\n"
-"              with  a  separating  &-symbol.  Thus,  using  '-d name=daniel -d\n"
+"              If any of these options is used more than once on the same  com-\n"
 , stdout);
  fputs(
+"              mand  line,  the  data  pieces specified will be merged together\n"
+"              with a separating  &-symbol.  Thus,  using  '-d  name=daniel  -d\n"
 "              skill=lousy'  would  generate  a  post  chunk  that  looks  like\n"
 "              'name=daniel&skill=lousy'.\n"
 "\n"
-"              If  you  start  the data with the letter @, the rest should be a\n"
-"              file name to read the data from, or - if you want curl  to  read\n"
-"              the  data  from  stdin.  Posting data from a file named 'foobar'\n"
-"              would thus be done with -d, --data @foobar. When -d,  --data  is\n"
+"              If you start the data with the letter @, the rest  should  be  a\n"
+"              file  name  to read the data from, or - if you want curl to read\n"
 , stdout);
  fputs(
-"              told  to  read  from a file like that, carriage returns and new-\n"
+"              the data from stdin. Posting data from  a  file  named  'foobar'\n"
+"              would  thus  be done with -d, --data @foobar. When -d, --data is\n"
+"              told to read from a file like that, carriage  returns  and  new-\n"
 "              lines will be stripped out. If you don't want the @ character to\n"
 "              have a special interpretation use --data-raw instead.\n"
 "\n"
-"              See  also  --data-binary,  --data-urlencode and --data-raw. This\n"
-"              option overrides -F, --form and -I,  --head  and  -T,  --upload-\n"
+"              See also --data-binary, --data-urlencode  and  --data-raw.  This\n"
+, stdout);
+ fputs(
+"              option  overrides  -F,  --form  and -I, --head and -T, --upload-\n"
 "              file.\n"
 "\n"
 "       --delegation <LEVEL>\n"
-, stdout);
- fputs(
-"              (GSS/kerberos)  Set  LEVEL to tell the server what it is allowed\n"
+"              (GSS/kerberos) Set LEVEL to tell the server what it  is  allowed\n"
 "              to delegate when it comes to user credentials.\n"
 "\n"
 "              none   Don't allow any delegation.\n"
 "\n"
-"              policy Delegates if and only if the OK-AS-DELEGATE flag  is  set\n"
-"                     in  the  Kerberos  service  ticket,  which is a matter of\n"
+"              policy Delegates  if  and only if the OK-AS-DELEGATE flag is set\n"
+"                     in the Kerberos service ticket,  which  is  a  matter  of\n"
+, stdout);
+ fputs(
 "                     realm policy.\n"
 "\n"
 "              always Unconditionally allow the server to delegate.\n"
 "\n"
+"       If this option is used several times, the last one will be used.\n"
+"\n"
 "       --digest\n"
-, stdout);
- fputs(
-"              (HTTP) Enables HTTP Digest authentication. This is an  authenti-\n"
-"              cation  scheme  that  prevents the password from being sent over\n"
-"              the wire in clear text. Use this in combination with the  normal\n"
+"              (HTTP)  Enables HTTP Digest authentication. This is an authenti-\n"
+"              cation scheme that prevents the password from  being  sent  over\n"
+"              the  wire in clear text. Use this in combination with the normal\n"
 "              -u, --user option to set user name and password.\n"
 "\n"
-"              If  this  option  is  used  several times, only the first one is\n"
-"              used.\n"
-"\n"
-"              See also -u, --user, --proxy-digest and --anyauth.  This  option\n"
 , stdout);
  fputs(
+"              If this option is used several times,  only  the  first  one  is\n"
+"              used.\n"
+"\n"
+"              See  also  -u, --user, --proxy-digest and --anyauth. This option\n"
 "              overrides --basic and --ntlm and --negotiate.\n"
 "\n"
 "       --disable-eprt\n"
 "              (FTP) Tell curl to disable the use of the EPRT and LPRT commands\n"
 "              when doing active FTP transfers. Curl will normally always first\n"
-"              attempt  to use EPRT, then LPRT before using PORT, but with this\n"
-"              option, it will use PORT right away. EPRT and  LPRT  are  exten-\n"
-"              sions  to  the  original  FTP  protocol, and may not work on all\n"
+"              attempt to use EPRT, then LPRT before using PORT, but with  this\n"
 , stdout);
  fputs(
+"              option,  it  will  use PORT right away. EPRT and LPRT are exten-\n"
+"              sions to the original FTP protocol, and  may  not  work  on  all\n"
 "              servers, but they enable more functionality in a better way than\n"
 "              the traditional PORT command.\n"
 "\n"
 "              --eprt can be used to explicitly enable EPRT again and --no-eprt\n"
 "              is an alias for --disable-eprt.\n"
 "\n"
-"              If the server is accessed using IPv6, this option will  have  no\n"
-"              effect as EPRT is necessary then.\n"
-"\n"
-"              Disabling  EPRT only changes the active behavior. If you want to\n"
+"              If  the  server is accessed using IPv6, this option will have no\n"
 , stdout);
  fputs(
-"              switch to passive mode you need to not  use  -P,  --ftp-port  or\n"
+"              effect as EPRT is necessary then.\n"
+"\n"
+"              Disabling EPRT only changes the active behavior. If you want  to\n"
+"              switch  to  passive  mode  you need to not use -P, --ftp-port or\n"
 "              force it with --ftp-pasv.\n"
 "\n"
 "       --disable-epsv\n"
-"              (FTP)  (FTP)  Tell  curl  to disable the use of the EPSV command\n"
-"              when doing passive FTP  transfers.  Curl  will  normally  always\n"
-"              first  attempt to use EPSV before PASV, but with this option, it\n"
-"              will not try using EPSV.\n"
-"\n"
-"              --epsv can be used to explicitly enable EPSV again and --no-epsv\n"
+"              (FTP) Tell curl to disable the use of the EPSV command when  do-\n"
+"              ing  passive  FTP transfers. Curl will normally always first at-\n"
 , stdout);
  fputs(
+"              tempt to use EPSV before PASV, but with this option, it will not\n"
+"              try using EPSV.\n"
+"\n"
+"              --epsv can be used to explicitly enable EPSV again and --no-epsv\n"
 "              is an alias for --disable-epsv.\n"
 "\n"
-"              If  the  server is an IPv6 host, this option will have no effect\n"
+"              If the server is an IPv6 host, this option will have  no  effect\n"
 "              as EPSV is necessary then.\n"
 "\n"
 "              Disabling EPSV only changes the passive behavior. If you want to\n"
+, stdout);
+ fputs(
 "              switch to active mode you need to use -P, --ftp-port.\n"
 "\n"
 "       -q, --disable\n"
-"              If  used  as the first parameter on the command line, the curlrc\n"
-"              config file will not be read and used. See the -K, --config  for\n"
-, stdout);
- fputs(
+"              If used as the first parameter on the command line,  the  curlrc\n"
+"              config  file will not be read and used. See the -K, --config for\n"
 "              details on the default config file search path.\n"
 "\n"
 "       --disallow-username-in-url\n"
-"              (HTTP)  This  tells  curl  to  exit if passed a url containing a\n"
+"              (HTTP) This tells curl to exit if  passed  a  url  containing  a\n"
 "              username.\n"
 "\n"
 "              See also --proto. Added in 7.61.0.\n"
 "\n"
-"       --dns-interface <interface>\n"
-"              (DNS) Tell curl to send outgoing DNS  requests  through  <inter-\n"
-"              face>.  This  option is a counterpart to --interface (which does\n"
 , stdout);
  fputs(
-"              not affect DNS). The supplied string must be an  interface  name\n"
+"       --dns-interface <interface>\n"
+"              (DNS)  Tell  curl  to send outgoing DNS requests through <inter-\n"
+"              face>. This option is a counterpart to --interface  (which  does\n"
+"              not  affect  DNS). The supplied string must be an interface name\n"
 "              (not an address).\n"
 "\n"
-"              See  also  --dns-ipv4-addr  and --dns-ipv6-addr. --dns-interface\n"
-"              requires that the underlying libcurl was  built  to  support  c-\n"
+"              See also --dns-ipv4-addr  and  --dns-ipv6-addr.  --dns-interface\n"
+"              requires  that  the  underlying  libcurl was built to support c-\n"
 "              ares. Added in 7.33.0.\n"
+, stdout);
+ fputs(
 "\n"
 "       --dns-ipv4-addr <address>\n"
 "              (DNS) Tell curl to bind to <ip-address> when making IPv4 DNS re-\n"
-"              quests, so that the DNS requests originate  from  this  address.\n"
-, stdout);
- fputs(
+"              quests,  so  that  the DNS requests originate from this address.\n"
 "              The argument should be a single IPv4 address.\n"
 "\n"
-"              See  also  --dns-interface  and --dns-ipv6-addr. --dns-ipv4-addr\n"
-"              requires that the underlying libcurl was  built  to  support  c-\n"
+"              If this option is used several times, the last one will be used.\n"
+"              See also --dns-interface  and  --dns-ipv6-addr.  --dns-ipv4-addr\n"
+"              requires  that  the  underlying  libcurl was built to support c-\n"
+, stdout);
+ fputs(
 "              ares. Added in 7.33.0.\n"
 "\n"
 "       --dns-ipv6-addr <address>\n"
 "              (DNS) Tell curl to bind to <ip-address> when making IPv6 DNS re-\n"
-"              quests, so that the DNS requests originate  from  this  address.\n"
-, stdout);
- fputs(
+"              quests,  so  that  the DNS requests originate from this address.\n"
 "              The argument should be a single IPv6 address.\n"
 "\n"
-"              See  also  --dns-interface  and --dns-ipv4-addr. --dns-ipv6-addr\n"
-"              requires that the underlying libcurl was  built  to  support  c-\n"
+"              If this option is used several times, the last one will be used.\n"
+"              See also --dns-interface  and  --dns-ipv4-addr.  --dns-ipv6-addr\n"
+, stdout);
+ fputs(
+"              requires  that  the  underlying  libcurl was built to support c-\n"
 "              ares. Added in 7.33.0.\n"
 "\n"
 "       --dns-servers <addresses>\n"
 "              Set the list of DNS servers to be used instead of the system de-\n"
-"              fault.  The list of IP addresses should be separated  with  com-\n"
-, stdout);
- fputs(
+"              fault.   The  list of IP addresses should be separated with com-\n"
 "              mas. Port numbers may also optionally be given as :<port-number>\n"
 "              after each IP address.\n"
 "\n"
-"              --dns-servers requires that the underlying libcurl was built  to\n"
-"              support c-ares. Added in 7.33.0.\n"
-"\n"
-"       --doh-url <URL>\n"
-"              (all)  Specifies which DNS-over-HTTPS (DOH) server to use to re-\n"
-"              solve hostnames, instead of  using  the  default  name  resolver\n"
-"              mechanism. The URL must be HTTPS.\n"
-"\n"
 , stdout);
  fputs(
 "              If this option is used several times, the last one will be used.\n"
+"              --dns-servers  requires that the underlying libcurl was built to\n"
+"              support c-ares. Added in 7.33.0.\n"
+"\n"
+"       --doh-cert-status\n"
+"              (all) Same as --cert-status but used for DoH (DNS-over-HTTPS).\n"
+"\n"
+"              Added in 7.76.0.\n"
+"\n"
+"       --doh-insecure\n"
+"              (all) Same as -k, --insecure but used for DoH (DNS-over-HTTPS).\n"
+"\n"
+"              Added in 7.76.0.\n"
+"\n"
+"       --doh-url <URL>\n"
+, stdout);
+ fputs(
+"              (all) Specifies which DNS-over-HTTPS (DoH) server to use to  re-\n"
+"              solve  hostnames,  instead  of  using  the default name resolver\n"
+"              mechanism. The URL must be HTTPS.\n"
+"\n"
+"              Some SSL options that you set for your transfer  will  apply  to\n"
+"              DoH  since  the  name  lookups take place over SSL. However, the\n"
+"              certificate verification settings are not inherited and  can  be\n"
+, stdout);
+ fputs(
+"              controlled separately via --doh-insecure and --doh-cert-status.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
 "\n"
 "              Added in 7.62.0.\n"
 "\n"
 "       -D, --dump-header <filename>\n"
 "              (HTTP  FTP) Write the received protocol headers to the specified\n"
-"              file.\n"
+"              file. If no headers are received, the use of  this  option  will\n"
+"              create an empty file.\n"
 "\n"
-"              This option is handy to use when you want to store  the  headers\n"
-"              that  an  HTTP site sends to you. Cookies from the headers could\n"
-"              then be read in a  second  curl  invocation  by  using  the  -b,\n"
 , stdout);
  fputs(
-"              --cookie  option! The -c, --cookie-jar option is a better way to\n"
-"              store cookies.\n"
-"\n"
-"              If no headers are received, the use of this option  will  create\n"
-"              an empty file.\n"
-"\n"
 "              When  used  in FTP, the FTP server response lines are considered\n"
 "              being \"headers\" and thus are saved there.\n"
 "\n"
@@ -1021,89 +1080,75 @@
 "              See also -o, --output.\n"
 "\n"
 "       --egd-file <file>\n"
-, stdout);
- fputs(
 "              (TLS) Specify the path name  to  the  Entropy  Gathering  Daemon\n"
 "              socket.  The  socket  is  used to seed the random engine for SSL\n"
 "              connections.\n"
 "\n"
+, stdout);
+ fputs(
 "              See also --random-file.\n"
 "\n"
 "       --engine <name>\n"
 "              (TLS) Select the OpenSSL crypto engine to use for cipher  opera-\n"
 "              tions. Use --engine list to print a list of build-time supported\n"
-"              engines. Note that not all (or  none)  of  the  engines  may  be\n"
-, stdout);
- fputs(
-"              available at run-time.\n"
+"              engines. Note that not all (and possibly none)  of  the  engines\n"
+"              may be available at run-time.\n"
 "\n"
 "       --etag-compare <file>\n"
 "              (HTTP) This option makes a conditional HTTP request for the spe-\n"
-"              cific ETag read from the given file by sending a custom If-None-\n"
-"              Match header using the extracted ETag.\n"
-"\n"
-"              For correct results, make sure that specified file contains only\n"
-"              a single line with a desired ETag. An empty file is parsed as an\n"
-"              empty ETag.\n"
-"\n"
 , stdout);
  fputs(
-"              Use  the  option  --etag-save  to first save the ETag from a re-\n"
-"              sponse, and then use this option to compare using the saved ETag\n"
-"              in a subsequent request.\n"
+"              cific ETag read from the given file by sending a custom If-None-\n"
+"              Match header using the stored ETag.\n"
 "\n"
-"              OMPARISON:  There  are  2 types of comparison or ETags, Weak and\n"
-"              Strong.  This option expects, and uses a strong comparison.\n"
+"              For  correct results, make sure that the specified file contains\n"
+"              only a single line with the  desired  ETag.  An  empty  file  is\n"
+"              parsed as an empty ETag.\n"
+"\n"
+"              Use  the  option  --etag-save  to first save the ETag from a re-\n"
+"              sponse, and then use this option to compare  against  the  saved\n"
+, stdout);
+ fputs(
+"              ETag in a subsequent request.\n"
 "\n"
 "              Added in 7.68.0.\n"
 "\n"
 "       --etag-save <file>\n"
-"              (HTTP) This option saves an HTTP ETag  to  the  specified  file.\n"
-, stdout);
- fputs(
-"              Etag  is  usually  part  of  headers returned by a request. When\n"
-"              server sends an ETag, it must be enveloped by  a  double  quote.\n"
-"              This  option  extracts  the  ETag  without the double quotes and\n"
-"              saves it into the <file>.\n"
+"              (HTTP)  This option saves an HTTP ETag to the specified file. An\n"
+"              ETag is a caching related header,  usually  returned  in  a  re-\n"
+"              sponse.\n"
 "\n"
-"              A server can send a week ETag which is prefixed  by  \"W/\".  This\n"
-"              identifier  is  not  considered,  and only relevant ETag between\n"
-"              quotation marks is parsed.\n"
-"\n"
-, stdout);
- fputs(
-"              It an ETag wasn't send by the server or it cannot be parsed, and\n"
-"              empty file is created.\n"
+"              If no ETag is sent by the server, an empty file is created.\n"
 "\n"
 "              Added in 7.68.0.\n"
 "\n"
 "       --expect100-timeout <seconds>\n"
+, stdout);
+ fputs(
 "              (HTTP) Maximum time in seconds that you allow curl to wait for a\n"
 "              100-continue response when curl emits an  Expects:  100-continue\n"
 "              header  in  its  request.  By default curl will wait one second.\n"
-, stdout);
- fputs(
 "              This option accepts decimal values! When curl stops waiting,  it\n"
 "              will continue as if the response has been received.\n"
 "\n"
 "              See also --connect-timeout. Added in 7.47.0.\n"
 "\n"
 "       --fail-early\n"
+, stdout);
+ fputs(
 "              Fail and exit on the first detected transfer error.\n"
 "\n"
 "              When  curl is used to do multiple transfers on the command line,\n"
 "              it will attempt to operate on each given URL, one by one. By de-\n"
-, stdout);
- fputs(
 "              fault,  it  will  ignore errors if there are more URLs given and\n"
 "              the last URL's success will determine the error  code  curl  re-\n"
 "              turns. So early failures will be \"hidden\" by subsequent success-\n"
 "              ful transfers.\n"
 "\n"
-"              Using this option, curl will instead  return  an  error  on  the\n"
-"              first  transfer  that  fails,  independent of the amount of URLs\n"
 , stdout);
  fputs(
+"              Using this option, curl will instead  return  an  error  on  the\n"
+"              first  transfer  that  fails,  independent of the amount of URLs\n"
 "              that are given on the command line. This way, no transfer  fail-\n"
 "              ures go undetected by scripts and similar.\n"
 "\n"
@@ -1111,34 +1156,52 @@
 "              use of -:, --next.\n"
 "\n"
 "              This option does not imply -f, --fail, which causes transfers to\n"
-"              fail  due  to the server's HTTP status code. You can combine the\n"
-"              two options, however note -f, --fail is not global and is there-\n"
 , stdout);
  fputs(
+"              fail  due  to the server's HTTP status code. You can combine the\n"
+"              two options, however note -f, --fail is not global and is there-\n"
 "              fore contained by -:, --next.\n"
 "\n"
 "              Added in 7.52.0.\n"
+"       --fail-with-body\n"
+"              (HTTP)  Return an error on server errors where the HTTP response\n"
+"              code is 400 or greater). In normal cases  when  an  HTTP  server\n"
+"              fails to deliver a document, it returns an HTML document stating\n"
+, stdout);
+ fputs(
+"              so (which often also describes why and  more).  This  flag  will\n"
+"              still allow curl to output and save that content but also to re-\n"
+"              turn error 22.\n"
+"\n"
+"              This is an alternative option to -f,  --fail  which  makes  curl\n"
+"              fail for the same circumstances but without saving the content.\n"
+"\n"
+"              See also -f, --fail. Added in 7.76.0.\n"
 "\n"
 "       -f, --fail\n"
 "              (HTTP)  Fail  silently (no output at all) on server errors. This\n"
-"              is mostly done to better enable scripts etc to better deal  with\n"
-"              failed  attempts.  In  normal cases when an HTTP server fails to\n"
-"              deliver a document, it  returns  an  HTML  document  stating  so\n"
-"              (which  often  also describes why and more). This flag will pre-\n"
 , stdout);
  fputs(
-"              vent curl from outputting that and return error 22.\n"
+"              is mostly done to enable scripts etc to better deal with  failed\n"
+"              attempts. In normal cases when an HTTP server fails to deliver a\n"
+"              document, it returns an HTML document stating  so  (which  often\n"
+"              also  describes  why and more). This flag will prevent curl from\n"
+"              outputting that and return error 22.\n"
 "\n"
 "              This method is not fail-safe and there are occasions where  non-\n"
+, stdout);
+ fputs(
 "              successful response codes will slip through, especially when au-\n"
 "              thentication is involved (response codes 401 and 407).\n"
 "\n"
+"              See also --fail-with-body.\n"
+"\n"
 "       --false-start\n"
 "              (TLS) Tells curl to use false start during  the  TLS  handshake.\n"
 "              False  start is a mode where a TLS client will start sending ap-\n"
+"              plication data before verifying the server's  Finished  message,\n"
 , stdout);
  fputs(
-"              plication data before verifying the server's  Finished  message,\n"
 "              thus saving a round trip when performing a full handshake.\n"
 "\n"
 "              This  is currently only implemented in the NSS and Secure Trans-\n"
@@ -1148,9 +1211,9 @@
 "\n"
 "       --form-string <name=string>\n"
 "              (HTTP SMTP IMAP) Similar to -F, --form  except  that  the  value\n"
+"              string  for  the  named parameter is used literally. Leading '@'\n"
 , stdout);
  fputs(
-"              string  for  the  named parameter is used literally. Leading '@'\n"
 "              and '<' characters, and the ';type=' string in the value have no\n"
 "              special meaning. Use this in preference to -F, --form if there's\n"
 "              any possibility that the string value may  accidentally  trigger\n"
@@ -1159,36 +1222,36 @@
 "              See also -F, --form.\n"
 "\n"
 "       -F, --form <name=content>\n"
+"              (HTTP  SMTP  IMAP) For HTTP protocol family, this lets curl emu-\n"
 , stdout);
  fputs(
-"              (HTTP  SMTP  IMAP) For HTTP protocol family, this lets curl emu-\n"
 "              late a filled-in form in which a user  has  pressed  the  submit\n"
 "              button.  This  causes  curl  to POST data using the Content-Type\n"
 "              multipart/form-data according to RFC 2388.\n"
 "\n"
-"              For SMTP and IMAP protocols, this is the mean to compose a  mul-\n"
+"              For SMTP and IMAP protocols, this is the means to compose a mul-\n"
 "              tipart mail message to transmit.\n"
 "\n"
+"              This  enables  uploading of binary files etc. To force the 'con-\n"
 , stdout);
  fputs(
-"              This  enables  uploading of binary files etc. To force the 'con-\n"
 "              tent' part to be a file, prefix the file name with an @ sign. To\n"
 "              just get the content part from a file, prefix the file name with\n"
 "              the symbol <. The difference between @ and  <  is  then  that  @\n"
 "              makes  a  file  get attached in the post as a file upload, while\n"
 "              the < makes a text field and just get the contents for that text\n"
-, stdout);
- fputs(
 "              field from a file.\n"
 "\n"
+, stdout);
+ fputs(
 "              Tell  curl to read content from stdin instead of a file by using\n"
 "              - as filename. This goes for both @ and < constructs. When stdin\n"
 "              is used, the contents is buffered in memory first by curl to de-\n"
 "              termine its size and allow a possible resend.  Defining a part's\n"
 "              data from a named non-regular file (such as a named pipe or sim-\n"
+"              ilar) is unfortunately not subject to buffering and will be  ef-\n"
 , stdout);
  fputs(
-"              ilar) is unfortunately not subject to buffering and will be  ef-\n"
 "              fectively  read at transmission time; since the full size is un-\n"
 "              known before the transfer starts, such data is sent as chunks by\n"
 "              HTTP and rejected by IMAP.\n"
@@ -1197,10 +1260,10 @@
 "              name of the form-field to which the file  portrait.jpg  will  be\n"
 "              the input:\n"
 "\n"
-, stdout);
- fputs(
 "               curl -F profile=@portrait.jpg https://example.com/upload.cgi\n"
 "\n"
+, stdout);
+ fputs(
 "              Example:  send your name and shoe size in two text fields to the\n"
 "              server:\n"
 "\n"
@@ -1212,9 +1275,9 @@
 "\n"
 "               curl -F \"story=<hugefile.txt\" https://example.com/\n"
 "\n"
+"              You can also  tell  curl  what  Content-Type  to  use  by  using\n"
 , stdout);
  fputs(
-"              You can also  tell  curl  what  Content-Type  to  use  by  using\n"
 "              'type=', in a manner similar to:\n"
 "\n"
 "               curl -F \"web=@index.html;type=text/html\" example.com\n"
@@ -1228,31 +1291,32 @@
 "\n"
 "               curl -F \"file=@localfile;filename=nameinpost\" example.com\n"
 "\n"
+"              If filename/path contains ',' or ';', it must be quoted by  dou-\n"
 , stdout);
  fputs(
-"              If filename/path contains ',' or ';', it must be quoted by  dou-\n"
 "              ble-quotes like:\n"
 "\n"
-"               curl   -F  \"file=@\\\"localfile\\\";filename=\\\"nameinpost\\\"\"  exam-\n"
+"               curl  -F \"file=@\\\"local,file\\\";filename=\\\"name;in;post\\\"\" exam-\n"
 "              ple.com\n"
 "\n"
 "              or\n"
 "\n"
-"               curl -F 'file=@\"localfile\";filename=\"nameinpost\"' example.com\n"
+"               curl  -F   'file=@\"local,file\";filename=\"name;in;post\"'   exam-\n"
+"              ple.com\n"
 "\n"
-"              Note that if a filename/path is  quoted  by  double-quotes,  any\n"
+"              Note  that  if  a  filename/path is quoted by double-quotes, any\n"
 "              double-quote or backslash within the filename must be escaped by\n"
 "              backslash.\n"
 "\n"
 , stdout);
  fputs(
-"              Quoting must also be applied to non-file  data  if  it  contains\n"
+"              Quoting  must  also  be  applied to non-file data if it contains\n"
 "              semicolons, leading/trailing spaces or leading double quotes:\n"
 "\n"
-"               curl  -F  'colors=\"red;  green;  blue\";type=text/x-myapp' exam-\n"
+"               curl -F  'colors=\"red;  green;  blue\";type=text/x-myapp'  exam-\n"
 "              ple.com\n"
 "\n"
-"              You can add custom headers to the  field  by  setting  headers=,\n"
+"              You  can  add  custom  headers to the field by setting headers=,\n"
 "              like\n"
 "\n"
 "                curl -F \"submit=OK;headers=\\\"X-submit-type: OK\\\"\" example.com\n"
@@ -1263,14 +1327,14 @@
  fputs(
 "                curl -F \"submit=OK;headers=@headerfile\" example.com\n"
 "\n"
-"              The  headers=  keyword may appear more that once and above notes\n"
-"              about quoting apply. When headers are read from  a  file,  Empty\n"
+"              The headers= keyword may appear more that once and  above  notes\n"
+"              about  quoting  apply.  When headers are read from a file, Empty\n"
 "              lines and lines starting with '#' are comments and ignored; each\n"
 "              header can be folded by splitting between two words and starting\n"
-"              the  continuation  line  with a space; embedded carriage-returns\n"
+"              the continuation line with a  space;  embedded  carriage-returns\n"
 , stdout);
  fputs(
-"              and trailing spaces are stripped.   Here  is  an  example  of  a\n"
+"              and  trailing  spaces  are  stripped.   Here  is an example of a\n"
 "              header file contents:\n"
 "\n"
 "                # This file contain two headers.\n"
@@ -1280,17 +1344,17 @@
 "                X-header-2: this is\n"
 "                 another header\n"
 "\n"
-"              To  support  sending  multipart mail messages, the syntax is ex-\n"
+"              To support sending multipart mail messages, the  syntax  is  ex-\n"
 "              tended as follows:\n"
 , stdout);
  fputs(
-"              - name can be omitted: the equal sign is the first character  of\n"
+"              -  name can be omitted: the equal sign is the first character of\n"
 "              the argument,\n"
-"              -  if  data  starts with '(', this signals to start a new multi-\n"
+"              - if data starts with '(', this signals to start  a  new  multi-\n"
 "              part: it can be followed by a content type specification.\n"
 "              - a multipart can be terminated with a '=)' argument.\n"
 "\n"
-"              Example: the following command sends an SMTP  mime  e-mail  con-\n"
+"              Example:  the  following  command sends an SMTP mime e-mail con-\n"
 "              sisting in an inline part in two alternative formats: plain text\n"
 , stdout);
  fputs(
@@ -1301,16 +1365,16 @@
 "                       -F '= <body>HTML message</body>;type=text/html' \\\n"
 "                    -F '=)' -F '=@textfile.txt' ...  smtp://example.com\n"
 "\n"
-"              Data can be encoded for transfer using encoder=.  Available  en-\n"
+"              Data  can  be encoded for transfer using encoder=. Available en-\n"
 "              codings are binary and 8bit that do nothing else than adding the\n"
 , stdout);
  fputs(
-"              corresponding Content-Transfer-Encoding header, 7bit  that  only\n"
+"              corresponding  Content-Transfer-Encoding  header, 7bit that only\n"
 "              rejects 8-bit characters with a transfer error, quoted-printable\n"
-"              and base64 that encodes  data  according  to  the  corresponding\n"
+"              and  base64  that  encodes  data  according to the corresponding\n"
 "              schemes, limiting lines length to 76 characters.\n"
 "\n"
-"              Example:  send  multipart mail with a quoted-printable text mes-\n"
+"              Example: send multipart mail with a quoted-printable  text  mes-\n"
 "              sage and a base64 attached file:\n"
 "\n"
 "               curl -F '=text message;encoder=quoted-printable' \\\n"
@@ -1322,12 +1386,12 @@
 "\n"
 "              This option can be used multiple times.\n"
 "\n"
-"              This option overrides -d, --data and -I, --head  and  -T,  --up-\n"
+"              This  option  overrides  -d, --data and -I, --head and -T, --up-\n"
 "              load-file.\n"
 "\n"
 "       --ftp-account <data>\n"
 "              (FTP) When an FTP server asks for \"account data\" after user name\n"
-"              and password has been provided, this data is sent off using  the\n"
+"              and  password has been provided, this data is sent off using the\n"
 , stdout);
  fputs(
 "              ACCT command.\n"
@@ -1337,18 +1401,18 @@
 "              Added in 7.13.0.\n"
 "\n"
 "       --ftp-alternative-to-user <command>\n"
-"              (FTP)  If  authenticating with the USER and PASS commands fails,\n"
-"              send this  command.   When  connecting  to  Tumbleweed's  Secure\n"
-"              Transport  server  over  FTPS  using a client certificate, using\n"
-"              \"SITE AUTH\" will tell the server to retrieve the  username  from\n"
+"              (FTP) If authenticating with the USER and PASS  commands  fails,\n"
+"              send  this  command.   When  connecting  to  Tumbleweed's Secure\n"
+"              Transport server over FTPS using  a  client  certificate,  using\n"
+"              \"SITE  AUTH\"  will tell the server to retrieve the username from\n"
 , stdout);
  fputs(
 "              the certificate.\n"
 "              Added in 7.15.5.\n"
 "\n"
 "       --ftp-create-dirs\n"
-"              (FTP  SFTP)  When  an FTP or SFTP URL/operation uses a path that\n"
-"              doesn't currently exist on the server, the standard behavior  of\n"
+"              (FTP SFTP) When an FTP or SFTP URL/operation uses  a  path  that\n"
+"              doesn't  currently exist on the server, the standard behavior of\n"
 "              curl is to fail. Using this option, curl will instead attempt to\n"
 "              create missing directories.\n"
 "\n"
@@ -1357,41 +1421,41 @@
 "       --ftp-method <method>\n"
 , stdout);
  fputs(
-"              (FTP) Control what method curl should use to reach a file on  an\n"
-"              FTP(S)  server. The method argument should be one of the follow-\n"
+"              (FTP)  Control what method curl should use to reach a file on an\n"
+"              FTP(S) server. The method argument should be one of the  follow-\n"
 "              ing alternatives:\n"
 "\n"
 "              multicwd\n"
-"                     curl does a single CWD operation for each  path  part  in\n"
-"                     the  given URL. For deep hierarchies this means very many\n"
-"                     commands. This is how RFC 1738 says it  should  be  done.\n"
+"                     curl  does  a  single CWD operation for each path part in\n"
+"                     the given URL. For deep hierarchies this means very  many\n"
+"                     commands.  This  is  how RFC 1738 says it should be done.\n"
 , stdout);
  fputs(
 "                     This is the default but the slowest behavior.\n"
 "\n"
-"              nocwd  curl  does  no  CWD at all. curl will do SIZE, RETR, STOR\n"
+"              nocwd  curl does no CWD at all. curl will do  SIZE,  RETR,  STOR\n"
 "                     etc and give a full path to the server for all these com-\n"
 "                     mands. This is the fastest behavior.\n"
 "\n"
 "              singlecwd\n"
 "                     curl does one CWD with the full target directory and then\n"
-"                     operates on the file \"normally\"  (like  in  the  multicwd\n"
+"                     operates  on  the  file  \"normally\" (like in the multicwd\n"
 , stdout);
  fputs(
-"                     case).  This  is  somewhat  more standards compliant than\n"
+"                     case). This is somewhat  more  standards  compliant  than\n"
 "                     'nocwd' but without the full penalty of 'multicwd'.\n"
 "\n"
 "       Added in 7.15.1.\n"
 "\n"
 "       --ftp-pasv\n"
-"              (FTP) Use passive mode for the data connection. Passive  is  the\n"
-"              internal  default behavior, but using this option can be used to\n"
+"              (FTP)  Use  passive mode for the data connection. Passive is the\n"
+"              internal default behavior, but using this option can be used  to\n"
 "              override a previous -P, --ftp-port option.\n"
 "\n"
-"              If this option is used several times,  only  the  first  one  is\n"
+"              If  this  option  is  used  several times, only the first one is\n"
 , stdout);
  fputs(
-"              used.  Undoing  an  enforced passive really isn't doable but you\n"
+"              used. Undoing an enforced passive really isn't  doable  but  you\n"
 "              must then instead enforce the correct -P, --ftp-port again.\n"
 "\n"
 "              Passive mode means that curl will try the EPSV command first and\n"
@@ -1399,17 +1463,17 @@
 "              See also --disable-epsv. Added in 7.11.0.\n"
 "\n"
 "       -P, --ftp-port <address>\n"
-"              (FTP)  Reverses  the  default initiator/listener roles when con-\n"
+"              (FTP) Reverses the default initiator/listener  roles  when  con-\n"
 , stdout);
  fputs(
-"              necting with FTP. This option makes curl use active  mode.  curl\n"
-"              then  tells the server to connect back to the client's specified\n"
+"              necting  with  FTP. This option makes curl use active mode. curl\n"
+"              then tells the server to connect back to the client's  specified\n"
 "              address and port, while passive mode asks the server to setup an\n"
-"              IP  address  and  port for it to connect to. <address> should be\n"
+"              IP address and port for it to connect to.  <address>  should  be\n"
 "              one of:\n"
 "\n"
 "              interface\n"
-"                     e.g. \"eth0\" to specify which interface's IP  address  you\n"
+"                     e.g.  \"eth0\"  to specify which interface's IP address you\n"
 "                     want to use (Unix only)\n"
 "\n"
 , stdout);
@@ -1420,20 +1484,20 @@
 "              host name\n"
 "                     e.g. \"my.host.domain\" to specify the machine\n"
 "\n"
-"              -      make  curl  pick the same IP address that is already used\n"
+"              -      make curl pick the same IP address that is  already  used\n"
 "                     for the control connection\n"
 "\n"
-"       If this option is used several times, the last one will be  used.  Dis-\n"
-"       able  the  use  of PORT with --ftp-pasv. Disable the attempt to use the\n"
+"       If  this  option is used several times, the last one will be used. Dis-\n"
+"       able the use of PORT with --ftp-pasv. Disable the attempt  to  use  the\n"
 , stdout);
  fputs(
-"       EPRT command instead of PORT by using --disable-eprt.  EPRT  is  really\n"
+"       EPRT  command  instead  of PORT by using --disable-eprt. EPRT is really\n"
 "       PORT++.\n"
 "\n"
-"       Since  7.19.5,  you can append \":[start]-[end]\" to the right of the ad-\n"
-"       dress, to tell curl what TCP port range to use. That means you  specify\n"
+"       Since 7.19.5, you can append \":[start]-[end]\" to the right of  the  ad-\n"
+"       dress,  to tell curl what TCP port range to use. That means you specify\n"
 "       a port range, from a lower to a higher number. A single number works as\n"
-"       well, but do note that it increases the risk of failure since the  port\n"
+"       well,  but do note that it increases the risk of failure since the port\n"
 "       may not be available.\n"
 "\n"
 "       See also --ftp-pasv and --disable-eprt.\n"
@@ -1441,95 +1505,97 @@
 , stdout);
  fputs(
 "       --ftp-pret\n"
-"              (FTP)  Tell  curl to send a PRET command before PASV (and EPSV).\n"
-"              Certain FTP servers, mainly drftpd,  require  this  non-standard\n"
-"              command  for  directory  listings as well as up and downloads in\n"
+"              (FTP) Tell curl to send a PRET command before PASV  (and  EPSV).\n"
+"              Certain  FTP  servers,  mainly drftpd, require this non-standard\n"
+"              command for directory listings as well as up  and  downloads  in\n"
 "              PASV mode.\n"
 "\n"
 "              Added in 7.20.0.\n"
 "\n"
 "       --ftp-skip-pasv-ip\n"
 "              (FTP) Tell curl to not use the IP address the server suggests in\n"
-"              its  response to curl's PASV command when curl connects the data\n"
+"              its response to curl's PASV command when curl connects the  data\n"
 , stdout);
  fputs(
-"              connection. Instead curl will re-use the same IP address it  al-\n"
+"              connection.  Instead curl will re-use the same IP address it al-\n"
 "              ready uses for the control connection.\n"
 "\n"
-"              This  option has no effect if PORT, EPRT or EPSV is used instead\n"
+"              Since curl 7.74.0 this option is enabled by default.\n"
+"\n"
+"              This option has no effect if PORT, EPRT or EPSV is used  instead\n"
 "              of PASV.\n"
 "\n"
 "              See also --ftp-pasv. Added in 7.14.2.\n"
 "\n"
 "       --ftp-ssl-ccc-mode <active/passive>\n"
-"              (FTP) Sets the CCC mode. The passive mode will not initiate  the\n"
-"              shutdown, but instead wait for the server to do it, and will not\n"
+"              (FTP)  Sets the CCC mode. The passive mode will not initiate the\n"
 , stdout);
  fputs(
+"              shutdown, but instead wait for the server to do it, and will not\n"
 "              reply to the shutdown from the server. The active mode initiates\n"
 "              the shutdown and waits for a reply from the server.\n"
 "\n"
 "              See also --ftp-ssl-ccc. Added in 7.16.2.\n"
 "\n"
 "       --ftp-ssl-ccc\n"
-"              (FTP)  Use  CCC  (Clear  Command Channel) Shuts down the SSL/TLS\n"
+"              (FTP) Use CCC (Clear Command Channel)  Shuts  down  the  SSL/TLS\n"
 "              layer after authenticating. The rest of the control channel com-\n"
-"              munication  will be unencrypted. This allows NAT routers to fol-\n"
 , stdout);
  fputs(
+"              munication will be unencrypted. This allows NAT routers to  fol-\n"
 "              low the FTP transaction. The default mode is passive.\n"
 "\n"
 "              See also --ssl and --ftp-ssl-ccc-mode. Added in 7.16.1.\n"
 "\n"
 "       --ftp-ssl-control\n"
-"              (FTP) Require SSL/TLS for the FTP  login,  clear  for  transfer.\n"
-"              Allows  secure  authentication, but non-encrypted data transfers\n"
-"              for efficiency.  Fails the transfer if the server  doesn't  sup-\n"
+"              (FTP)  Require  SSL/TLS  for  the FTP login, clear for transfer.\n"
+"              Allows secure authentication, but non-encrypted  data  transfers\n"
+"              for  efficiency.   Fails the transfer if the server doesn't sup-\n"
+, stdout);
+ fputs(
 "              port SSL/TLS.\n"
 "\n"
 "              Added in 7.16.0.\n"
 "\n"
 "       -G, --get\n"
+"              When used, this option will make all  data  specified  with  -d,\n"
+"              --data,  --data-binary or --data-urlencode to be used in an HTTP\n"
+"              GET request instead of the POST request that otherwise would  be\n"
+"              used. The data will be appended to the URL with a '?' separator.\n"
+"              If  used  in combination with -I, --head, the POST data will in-\n"
 , stdout);
  fputs(
-"              When  used,  this  option  will make all data specified with -d,\n"
-"              --data, --data-binary or --data-urlencode to be used in an  HTTP\n"
-"              GET  request instead of the POST request that otherwise would be\n"
-"              used. The data will be appended to the URL with a '?' separator.\n"
-"              If used in combination with -I, --head, the POST data  will  in-\n"
 "              stead be appended to the URL with a HEAD request.\n"
 "\n"
-, stdout);
- fputs(
-"              If  this  option  is  used  several times, only the first one is\n"
-"              used. This is because undoing a GET doesn't make sense, but  you\n"
+"              If this option is used several times,  only  the  first  one  is\n"
+"              used.  This is because undoing a GET doesn't make sense, but you\n"
 "              should then instead enforce the alternative method you prefer.\n"
 "\n"
 "       -g, --globoff\n"
 "              This option switches off the \"URL globbing parser\". When you set\n"
-"              this option, you can specify URLs that contain the letters  {}[]\n"
-"              without  having them being interpreted by curl itself. Note that\n"
+"              this  option, you can specify URLs that contain the letters {}[]\n"
 , stdout);
  fputs(
-"              these letters are not normal legal URL contents but they  should\n"
-"              be encoded according to the URI standard.\n"
+"              without having curl itself interpret them. Note that these  let-\n"
+"              ters  are  not  normal legal URL contents but they should be en-\n"
+"              coded according to the URI standard.\n"
 "\n"
 "       --happy-eyeballs-timeout-ms <milliseconds>\n"
-"              Happy  eyeballs is an algorithm that attempts to connect to both\n"
-"              IPv4 and IPv6 addresses for dual-stack  hosts,  preferring  IPv6\n"
+"              Happy eyeballs is an algorithm that attempts to connect to  both\n"
+"              IPv4  and  IPv6  addresses for dual-stack hosts, preferring IPv6\n"
 "              first for the number of milliseconds. If the IPv6 address cannot\n"
 , stdout);
  fputs(
-"              be connected to within that time then a  connection  attempt  is\n"
+"              be  connected  to  within that time then a connection attempt is\n"
 "              made to the IPv4 address in parallel. The first connection to be\n"
 "              established is the one that is used.\n"
 "\n"
-"              The range of suggested useful values is limited. Happy  Eyeballs\n"
-"              RFC  6555  says  \"It  is RECOMMENDED that connection attempts be\n"
-"              paced 150-250 ms apart to balance human factors against  network\n"
+"              The  range of suggested useful values is limited. Happy Eyeballs\n"
+"              RFC 6555 says \"It is RECOMMENDED  that  connection  attempts  be\n"
+"              paced  150-250 ms apart to balance human factors against network\n"
 , stdout);
  fputs(
-"              load.\"  libcurl currently defaults to 200 ms. Firefox and Chrome\n"
+"              load.\" libcurl currently defaults to 200 ms. Firefox and  Chrome\n"
 "              currently default to 300 ms.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -1537,86 +1603,89 @@
 "              Added in 7.59.0.\n"
 "\n"
 "       --haproxy-protocol\n"
-"              (HTTP) Send a HAProxy PROXY protocol v1 header at the  beginning\n"
-"              of  the  connection. This is used by some load balancers and re-\n"
+"              (HTTP)  Send a HAProxy PROXY protocol v1 header at the beginning\n"
+"              of the connection. This is used by some load balancers  and  re-\n"
 "              verse proxies to indicate the client's true IP address and port.\n"
 , stdout);
  fputs(
-"              This option is primarily useful when sending test requests to  a\n"
+"              This  option is primarily useful when sending test requests to a\n"
 "              service that expects this header.\n"
 "\n"
 "              Added in 7.60.0.\n"
 "\n"
 "       -I, --head\n"
 "              (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the\n"
-"              command HEAD which this uses to get nothing but the header of  a\n"
-"              document.  When  used  on an FTP or FILE file, curl displays the\n"
+"              command  HEAD which this uses to get nothing but the header of a\n"
+"              document. When used on an FTP or FILE file,  curl  displays  the\n"
 "              file size and last modification time only.\n"
 "\n"
 , stdout);
  fputs(
 "       -H, --header <header/@file>\n"
-"              (HTTP) Extra header to include in the request when sending  HTTP\n"
-"              to  a  server. You may specify any number of extra headers. Note\n"
+"              (HTTP)  Extra header to include in the request when sending HTTP\n"
+"              to a server. You may specify any number of extra  headers.  Note\n"
 "              that if you should add a custom header that has the same name as\n"
-"              one  of  the  internal  ones curl would use, your externally set\n"
+"              one of the internal ones curl would  use,  your  externally  set\n"
 "              header will be used instead of the internal one. This allows you\n"
 , stdout);
  fputs(
-"              to  make  even  trickier  stuff than curl would normally do. You\n"
-"              should not replace internally set headers without  knowing  per-\n"
+"              to make even trickier stuff than curl  would  normally  do.  You\n"
+"              should  not  replace internally set headers without knowing per-\n"
 "              fectly well what you're doing. Remove an internal header by giv-\n"
-"              ing a replacement without content  on  the  right  side  of  the\n"
+"              ing  a  replacement  without  content  on  the right side of the\n"
 "              colon, as in: -H \"Host:\". If you send the custom header with no-\n"
-"              value then its header must be terminated with a semicolon,  such\n"
+"              value  then its header must be terminated with a semicolon, such\n"
 , stdout);
  fputs(
 "              as -H \"X-Custom-Header;\" to send \"X-Custom-Header:\".\n"
 "\n"
-"              curl  will  make  sure  that each header you add/replace is sent\n"
+"              curl will make sure that each header  you  add/replace  is  sent\n"
 "              with the proper end-of-line marker, you should thus not add that\n"
 "              as a part of the header content: do not add newlines or carriage\n"
 "              returns, they will only mess things up for you.\n"
 "\n"
-"              Starting in 7.55.0, this option can take an argument  in  @file-\n"
+"              This  option can take an argument in @filename style, which then\n"
 , stdout);
  fputs(
-"              name  style, which then adds a header for each line in the input\n"
-"              file. Using @- will make curl read the header file from stdin.\n"
+"              adds a header for each line in the input  file.  Using  @-  will\n"
+"              make curl read the header file from stdin. Added in 7.55.0.\n"
 "\n"
-"              See also the -A, --user-agent and -e, --referer options.\n"
+"              You  need  --proxy-header  to send custom headers intended for a\n"
+"              HTTP proxy. Added in 7.37.0.\n"
 "\n"
-"              Starting in 7.37.0, you need --proxy-header to send custom head-\n"
-"              ers intended for a proxy.\n"
+"              Passing on a \"Transfer-Encoding: chunked\" header  when  doing  a\n"
+"              HTTP  request  with a request body, will make curl send the data\n"
+"              using chunked encoding.\n"
 "\n"
 "              Example:\n"
 "\n"
+, stdout);
+ fputs(
 "               curl -H \"X-First-Name: Joe\" http://example.com/\n"
 "\n"
-, stdout);
- fputs(
-"              WARNING:  headers  set  with  this option will be set in all re-\n"
-"              quests - even after redirects are followed, like when told  with\n"
-"              -L,  --location. This can lead to the header being sent to other\n"
-"              hosts than the original host, so  sensitive  headers  should  be\n"
+"              WARNING: headers set with this option will be  set  in  all  re-\n"
+"              quests  - even after redirects are followed, like when told with\n"
+"              -L, --location. This can lead to the header being sent to  other\n"
+"              hosts  than  the  original  host, so sensitive headers should be\n"
 "              used with caution combined with following redirects.\n"
 "\n"
-"              This  option  can  be  used multiple times to add/replace/remove\n"
+, stdout);
+ fputs(
+"              This option can be used  multiple  times  to  add/replace/remove\n"
 "              multiple headers.\n"
 "\n"
+"              See also -A, --user-agent and -e, --referer.\n"
+"\n"
+"       -h, --help <category>\n"
+"              Usage  help.  This  lists all commands of the <category>.  If no\n"
+"              arg was provided, curl will display the most  important  command\n"
+"              line  arguments.   If the argument \"all\" was provided, curl will\n"
 , stdout);
  fputs(
-"       -h, --help <category>\n"
-"              Usage help. This lists all commands of the  <category>.   If  no\n"
-"              arg  was  provided, curl will display the most important command\n"
-"              line arguments and the list  of  categories.   If  the  argument\n"
-"              \"all\" was provided, curl will display all options available.  If\n"
-"              the argument \"category\" was provided, curl will display all cat-\n"
-"              egories and their meanings.\n"
+"              display all options available.  If the argument  \"category\"  was\n"
+"              provided, curl will display all categories and their meanings.\n"
 "\n"
 "       --hostpubmd5 <md5>\n"
-, stdout);
- fputs(
 "              (SFTP  SCP)  Pass a string containing 32 hexadecimal digits. The\n"
 "              string should be the 128 bit MD5 checksum of the  remote  host's\n"
 "              public key, curl will refuse the connection with the host unless\n"
@@ -1624,13 +1693,34 @@
 "\n"
 "              Added in 7.17.1.\n"
 "\n"
+, stdout);
+ fputs(
+"       --hsts <file name>\n"
+"              (HTTPS) WARNING: this option is experimental. Do not use in pro-\n"
+"              duction.\n"
+"\n"
+"              This  option  enables  HSTS  for  the transfer. If the file name\n"
+"              points to an existing HSTS cache file, that will be used.  After\n"
+"              a  completed  transfer, the cache will be saved to the file name\n"
+"              again if it has been modified.\n"
+"\n"
+"              Specify a \"\" file name (zero length) to avoid loading/saving and\n"
+, stdout);
+ fputs(
+"              make curl just handle HSTS in memory.\n"
+"\n"
+"              If  this  option  is used several times, curl will load contents\n"
+"              from all the files but the last one will be used for saving.\n"
+"\n"
+"              Added in 7.74.0.\n"
+"\n"
 "       --http0.9\n"
 "              (HTTP) Tells curl to be fine with HTTP version 0.9 response.\n"
 "\n"
 "              HTTP/0.9 is a completely headerless response and  therefore  you\n"
+"              can  also  connect with this to non-HTTP servers and still get a\n"
 , stdout);
  fputs(
-"              can  also  connect with this to non-HTTP servers and still get a\n"
 "              response since curl will simply transparently downgrade - if al-\n"
 "              lowed.\n"
 "\n"
@@ -1643,10 +1733,10 @@
 "              This option overrides --http1.1 and --http2.\n"
 "\n"
 "       --http1.1\n"
-, stdout);
- fputs(
 "              (HTTP) Tells curl to use HTTP version 1.1.\n"
 "\n"
+, stdout);
+ fputs(
 "              This option  overrides  -0,  --http1.0  and  --http2.  Added  in\n"
 "              7.33.0.\n"
 "\n"
@@ -1654,11 +1744,11 @@
 "              (HTTP)  Tells  curl  to  issue  its  non-TLS HTTP requests using\n"
 "              HTTP/2 without HTTP/1.1 Upgrade.  It  requires  prior  knowledge\n"
 "              that  the  server  supports HTTP/2 straight away. HTTPS requests\n"
-, stdout);
- fputs(
 "              will still do HTTP/2 the standard way with  negotiated  protocol\n"
 "              version in the TLS handshake.\n"
 "\n"
+, stdout);
+ fputs(
 "              --http2-prior-knowledge requires that the underlying libcurl was\n"
 "              built to support HTTP/2. This option overrides --http1.1 and -0,\n"
 "              --http1.0 and --http2. Added in 7.49.0.\n"
@@ -1667,9 +1757,9 @@
 "              (HTTP) Tells curl to use HTTP version 2.\n"
 "\n"
 "              See also --http1.1 and --http3. --http2 requires that the under-\n"
+"              lying libcurl was built to support HTTP/2. This option overrides\n"
 , stdout);
  fputs(
-"              lying libcurl was built to support HTTP/2. This option overrides\n"
 "              --http1.1  and  -0, --http1.0 and --http2-prior-knowledge. Added\n"
 "              in 7.33.0.\n"
 "\n"
@@ -1679,9 +1769,9 @@
 "\n"
 "              Tells  curl  to use HTTP version 3 directly to the host and port\n"
 "              number used in the URL. A normal HTTP/3 transaction will be done\n"
+"              to  a  host and then get redirected via Alt-Svc, but this option\n"
 , stdout);
  fputs(
-"              to  a  host and then get redirected via Alt-SVc, but this option\n"
 "              allows a user to circumvent that when you know that  the  target\n"
 "              speaks HTTP/3 on the given host and port.\n"
 "\n"
@@ -1690,9 +1780,9 @@
 "              own.\n"
 "\n"
 "              See also --http1.1 and --http2. --http3 requires that the under-\n"
+"              lying libcurl was built to support HTTP/3. This option overrides\n"
 , stdout);
  fputs(
-"              lying libcurl was built to support HTTP/3. This option overrides\n"
 "              --http1.1 and -0, --http1.0 and --http2 and --http2-prior-knowl-\n"
 "              edge. Added in 7.66.0.\n"
 "\n"
@@ -1702,41 +1792,45 @@
 "              report incorrect Content-Length for files larger  than  2  giga-\n"
 "              bytes.\n"
 "\n"
+"              For  FTP (since 7.46.0), skip the RETR command to figure out the\n"
 , stdout);
  fputs(
-"              For  FTP (since 7.46.0), skip the RETR command to figure out the\n"
 "              size before downloading a file.\n"
 "\n"
+"              This option doesn't work if libcurl was built to use  hyper  for\n"
+"              HTTP.\n"
+"\n"
 "       -i, --include\n"
-"              Include the HTTP response headers in the output.  The  HTTP  re-\n"
-"              sponse  headers  can  include  things like server name, cookies,\n"
+"              Include  the  HTTP  response headers in the output. The HTTP re-\n"
+"              sponse headers can include things  like  server  name,  cookies,\n"
 "              date of the document, HTTP version and more...\n"
 "\n"
 "              To view the request headers, consider the -v, --verbose option.\n"
 "\n"
-"              See also -v, --verbose.\n"
-"\n"
 , stdout);
  fputs(
+"              See also -v, --verbose.\n"
+"\n"
 "       -k, --insecure\n"
 "              (TLS) By default, every SSL connection curl makes is verified to\n"
-"              be  secure.  This option allows curl to proceed and operate even\n"
+"              be secure. This option allows curl to proceed and  operate  even\n"
 "              for server connections otherwise considered insecure.\n"
 "\n"
-"              The server connection is verified by making  sure  the  server's\n"
-"              certificate  contains  the  right name and verifies successfully\n"
+"              The  server  connection  is verified by making sure the server's\n"
+"              certificate contains the right name  and  verifies  successfully\n"
 "              using the cert store.\n"
 "\n"
 , stdout);
  fputs(
 "              See this online resource for further details:\n"
-"               https://curl.haxx.se/docs/sslcerts.html\n"
+"               https://curl.se/docs/sslcerts.html\n"
+"\n"
 "              See also --proxy-insecure and --cacert.\n"
 "\n"
 "       --interface <name>\n"
 "\n"
-"              Perform an operation using a specified interface. You can  enter\n"
-"              interface  name,  IP address or host name. An example could look\n"
+"              Perform  an operation using a specified interface. You can enter\n"
+"              interface name, IP address or host name. An example  could  look\n"
 "              like:\n"
 "\n"
 "               curl --interface eth0:1 https://www.example.com/\n"
@@ -1744,27 +1838,27 @@
 , stdout);
  fputs(
 "              If this option is used several times, the last one will be used.\n"
-"              On Linux it can be used to specify a VRF, but the  binary  needs\n"
-"              to  either  have CAP_NET_RAW or to be run as root. More informa-\n"
-"              tion  about  Linux  VRF:   https://www.kernel.org/doc/Documenta-\n"
+"              On  Linux  it can be used to specify a VRF, but the binary needs\n"
+"              to either have CAP_NET_RAW or to be run as root.  More  informa-\n"
+"              tion   about  Linux  VRF:  https://www.kernel.org/doc/Documenta-\n"
 "              tion/networking/vrf.txt\n"
 "\n"
 "              See also --dns-interface.\n"
 "\n"
 "       -4, --ipv4\n"
-"              This  option tells curl to resolve names to IPv4 addresses only,\n"
+"              This option tells curl to resolve names to IPv4 addresses  only,\n"
 , stdout);
  fputs(
 "              and not for example try IPv6.\n"
 "\n"
-"              See also  --http1.1  and  --http2.  This  option  overrides  -6,\n"
+"              See  also  --http1.1  and  --http2.  This  option  overrides -6,\n"
 "              --ipv6.\n"
 "\n"
 "       -6, --ipv6\n"
-"              This  option tells curl to resolve names to IPv6 addresses only,\n"
+"              This option tells curl to resolve names to IPv6 addresses  only,\n"
 "              and not for example try IPv4.\n"
 "\n"
-"              See also  --http1.1  and  --http2.  This  option  overrides  -4,\n"
+"              See  also  --http1.1  and  --http2.  This  option  overrides -4,\n"
 "              --ipv4.\n"
 "\n"
 "       -j, --junk-session-cookies\n"
@@ -1772,8 +1866,8 @@
  fputs(
 "              (HTTP) When curl is told to read cookies from a given file, this\n"
 "              option will make it discard all \"session cookies\". This will ba-\n"
-"              sically  have  the  same  effect as if a new session is started.\n"
-"              Typical browsers always discard  session  cookies  when  they're\n"
+"              sically have the same effect as if a  new  session  is  started.\n"
+"              Typical  browsers  always  discard  session cookies when they're\n"
 "              closed down.\n"
 "\n"
 "              See also -b, --cookie and -c, --cookie-jar.\n"
@@ -1781,11 +1875,11 @@
 "       --keepalive-time <seconds>\n"
 , stdout);
  fputs(
-"              This  option sets the time a connection needs to remain idle be-\n"
-"              fore sending keepalive probes and the  time  between  individual\n"
+"              This option sets the time a connection needs to remain idle  be-\n"
+"              fore  sending  keepalive  probes and the time between individual\n"
 "              keepalive probes. It is currently effective on operating systems\n"
 "              offering  the  TCP_KEEPIDLE  and  TCP_KEEPINTVL  socket  options\n"
-"              (meaning  Linux, recent AIX, HP-UX and more). This option has no\n"
+"              (meaning Linux, recent AIX, HP-UX and more). This option has  no\n"
 "              effect if --no-keepalive is used.\n"
 "\n"
 , stdout);
@@ -1796,8 +1890,8 @@
 "              Added in 7.18.0.\n"
 "\n"
 "       --key-type <type>\n"
-"              (TLS)  Private key file type. Specify which type your --key pro-\n"
-"              vided private key is. DER, PEM, and ENG are  supported.  If  not\n"
+"              (TLS) Private key file type. Specify which type your --key  pro-\n"
+"              vided  private  key  is. DER, PEM, and ENG are supported. If not\n"
 "              specified, PEM is assumed.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -1806,18 +1900,18 @@
  fputs(
 "       --key <key>\n"
 "              (TLS SSH) Private key file name. Allows you to provide your pri-\n"
-"              vate key in this separate file. For SSH, if not specified,  curl\n"
-"              tries   the  following  candidates  in  order:  '~/.ssh/id_rsa',\n"
+"              vate  key in this separate file. For SSH, if not specified, curl\n"
+"              tries  the  following  candidates  in  order:   '~/.ssh/id_rsa',\n"
 "              '~/.ssh/id_dsa', './id_rsa', './id_dsa'.\n"
 "\n"
-"              If curl is built against OpenSSL library, and the engine  pkcs11\n"
+"              If  curl is built against OpenSSL library, and the engine pkcs11\n"
 "              is available, then a PKCS#11 URI (RFC 7512) can be used to spec-\n"
 , stdout);
  fputs(
-"              ify a private key located in a PKCS#11 device. A  string  begin-\n"
-"              ning  with  \"pkcs11:\" will be interpreted as a PKCS#11 URI. If a\n"
+"              ify  a  private key located in a PKCS#11 device. A string begin-\n"
+"              ning with \"pkcs11:\" will be interpreted as a PKCS#11 URI.  If  a\n"
 "              PKCS#11 URI is provided, then the --engine option will be set as\n"
-"              \"pkcs11\"  if none was provided and the --key-type option will be\n"
+"              \"pkcs11\" if none was provided and the --key-type option will  be\n"
 "              set as \"ENG\" if none was provided.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -1825,93 +1919,93 @@
 "       --krb <level>\n"
 , stdout);
  fputs(
-"              (FTP) Enable Kerberos authentication and use. The level must  be\n"
+"              (FTP)  Enable Kerberos authentication and use. The level must be\n"
 "              entered and should be one of 'clear', 'safe', 'confidential', or\n"
-"              'private'. Should you use a level that  is  not  one  of  these,\n"
+"              'private'.  Should  you  use  a  level that is not one of these,\n"
 "              'private' will instead be used.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
-"              --krb  requires that the underlying libcurl was built to support\n"
+"              --krb requires that the underlying libcurl was built to  support\n"
 "              Kerberos.\n"
 "\n"
 "       --libcurl <file>\n"
 , stdout);
  fputs(
-"              Append this option to any ordinary curl command  line,  and  you\n"
-"              will  get a libcurl-using C source code written to the file that\n"
+"              Append  this  option  to any ordinary curl command line, and you\n"
+"              will get libcurl-using C source code written to  the  file  that\n"
 "              does the equivalent of what your command-line operation does!\n"
 "\n"
-"              If this option is used several times, the last given  file  name\n"
+"              If  this  option is used several times, the last given file name\n"
 "              will be used.\n"
 "\n"
 "              Added in 7.16.1.\n"
 "\n"
 "       --limit-rate <speed>\n"
-"              Specify  the  maximum  transfer  rate you want curl to use - for\n"
+"              Specify the maximum transfer rate you want curl  to  use  -  for\n"
 , stdout);
  fputs(
 "              both downloads and uploads. This feature is useful if you have a\n"
 "              limited pipe and you'd like your transfer not to use your entire\n"
 "              bandwidth. To make it slower than it otherwise would be.\n"
 "\n"
-"              The given speed is measured in bytes/second, unless a suffix  is\n"
-"              appended.   Appending  'k' or 'K' will count the number as kilo-\n"
-"              bytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes  it\n"
+"              The  given speed is measured in bytes/second, unless a suffix is\n"
+"              appended.  Appending 'k' or 'K' will count the number  as  kilo-\n"
+"              bytes,  'm' or 'M' makes it megabytes, while 'g' or 'G' makes it\n"
 , stdout);
  fputs(
 "              gigabytes. Examples: 200K, 3m and 1G.\n"
 "\n"
-"              If  you  also use the -Y, --speed-limit option, that option will\n"
+"              If you also use the -Y, --speed-limit option, that  option  will\n"
 "              take precedence and might cripple the rate-limiting slightly, to\n"
 "              help keeping the speed-limit logic working.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       -l, --list-only\n"
-"              (FTP  POP3)  (FTP)  When  listing  an FTP directory, this switch\n"
+"              (FTP POP3) (FTP) When listing  an  FTP  directory,  this  switch\n"
 , stdout);
  fputs(
-"              forces a name-only view. This is especially useful if  the  user\n"
-"              wants  to  machine-parse  the contents of an FTP directory since\n"
+"              forces  a  name-only view. This is especially useful if the user\n"
+"              wants to machine-parse the contents of an  FTP  directory  since\n"
 "              the normal directory view doesn't use a standard look or format.\n"
-"              When used like this, the option causes a NLST command to be sent\n"
-"              to the server instead of LIST.\n"
+"              When used like this, the option causes an  NLST  command  to  be\n"
+"              sent to the server instead of LIST.\n"
 "\n"
-"              Note: Some FTP servers list only  files  in  their  response  to\n"
+"              Note:  Some  FTP  servers  list  only files in their response to\n"
 , stdout);
  fputs(
 "              NLST; they do not include sub-directories and symbolic links.\n"
 "\n"
-"              (POP3)  When  retrieving a specific email from POP3, this switch\n"
-"              forces a LIST command to be performed instead of RETR.  This  is\n"
-"              particularly  useful if the user wants to see if a specific mes-\n"
-"              sage id exists on the server and what size it is.\n"
+"              (POP3) When retrieving a specific email from POP3,  this  switch\n"
+"              forces  a  LIST command to be performed instead of RETR. This is\n"
+"              particularly useful if the user wants to see if a specific  mes-\n"
+"              sage-id exists on the server and what size it is.\n"
 "\n"
-"              Note: When combined with -X, --request, this option can be  used\n"
+"              Note:  When combined with -X, --request, this option can be used\n"
 , stdout);
  fputs(
-"              to send an UIDL command instead, so the user may use the email's\n"
-"              unique identifier rather than it's message id to  make  the  re-\n"
+"              to send a UIDL command instead, so the user may use the  email's\n"
+"              unique  identifier  rather  than  its message-id to make the re-\n"
 "              quest.\n"
 "\n"
 "              Added in 4.0.\n"
 "\n"
 "       --local-port <num/range>\n"
-"              Set  a  preferred single number or range (FROM-TO) of local port\n"
+"              Set a preferred single number or range (FROM-TO) of  local  port\n"
 "              numbers to use for the connection(s).  Note that port numbers by\n"
-"              nature  are a scarce resource that will be busy at times so set-\n"
+"              nature are a scarce resource that will be busy at times so  set-\n"
 , stdout);
  fputs(
-"              ting this range to something too narrow might cause  unnecessary\n"
+"              ting  this range to something too narrow might cause unnecessary\n"
 "              connection setup failures.\n"
 "\n"
 "              Added in 7.15.2.\n"
 "\n"
 "       --location-trusted\n"
-"              (HTTP)  Like  -L,  --location, but will allow sending the name +\n"
+"              (HTTP) Like -L, --location, but will allow sending  the  name  +\n"
 "              password to all hosts that the site may redirect to. This may or\n"
 "              may not introduce a security breach if the site redirects you to\n"
-"              a site to which you'll send your authentication info  (which  is\n"
+"              a  site  to which you'll send your authentication info (which is\n"
 , stdout);
  fputs(
 "              plaintext in the case of HTTP Basic authentication).\n"
@@ -1919,47 +2013,47 @@
 "              See also -u, --user.\n"
 "\n"
 "       -L, --location\n"
-"              (HTTP)  If  the server reports that the requested page has moved\n"
+"              (HTTP) If the server reports that the requested page  has  moved\n"
 "              to a different location (indicated with a Location: header and a\n"
-"              3XX  response code), this option will make curl redo the request\n"
-"              on the new place. If used together with  -i,  --include  or  -I,\n"
+"              3XX response code), this option will make curl redo the  request\n"
+"              on  the  new  place.  If used together with -i, --include or -I,\n"
 , stdout);
  fputs(
 "              --head, headers from all requested pages will be shown. When au-\n"
-"              thentication is used, curl only sends  its  credentials  to  the\n"
-"              initial  host.  If a redirect takes curl to a different host, it\n"
-"              won't be able to intercept the user+password. See  also  --loca-\n"
-"              tion-trusted  on how to change this. You can limit the amount of\n"
+"              thentication  is  used,  curl  only sends its credentials to the\n"
+"              initial host. If a redirect takes curl to a different  host,  it\n"
+"              won't  be  able to intercept the user+password. See also --loca-\n"
+"              tion-trusted on how to change this. You can limit the amount  of\n"
 "              redirects to follow by using the --max-redirs option.\n"
 "\n"
 , stdout);
  fputs(
-"              When curl follows a redirect and if the request is  a  POST,  it\n"
-"              will  do  the  following request with a GET if the HTTP response\n"
-"              was 301, 302, or 303. If the response code  was  any  other  3xx\n"
+"              When  curl  follows  a redirect and if the request is a POST, it\n"
+"              will do the following request with a GET if  the  HTTP  response\n"
+"              was  301,  302,  or  303. If the response code was any other 3xx\n"
 "              code, curl will re-send the following request using the same un-\n"
 "              modified method.\n"
 "\n"
 "              You can tell curl to not change POST requests to GET after a 30x\n"
 , stdout);
  fputs(
-"              response  by  using  the  dedicated options for that: --post301,\n"
+"              response by using the dedicated  options  for  that:  --post301,\n"
 "              --post302 and --post303.\n"
 "\n"
-"              The method set with -X,  --request  overrides  the  method  curl\n"
+"              The  method  set  with  -X,  --request overrides the method curl\n"
 "              would otherwise select to use.\n"
 "\n"
 "       --login-options <options>\n"
-"              (IMAP  POP3 SMTP) Specify the login options to use during server\n"
+"              (IMAP POP3 SMTP) Specify the login options to use during  server\n"
 "              authentication.\n"
 "\n"
-"              You can use the login options to specify protocol  specific  op-\n"
+"              You  can  use login options to specify protocol specific options\n"
 , stdout);
  fputs(
-"              tions  that  may  be used during authentication. At present only\n"
-"              IMAP, POP3 and SMTP support login options. For more  information\n"
-"              about  the  login options please see RFC 2384, RFC 5092 and IETF\n"
-"              draft draft-earhart-url-smtp-00.txt\n"
+"              that may be used during authentication. At  present  only  IMAP,\n"
+"              POP3  and SMTP support login options. For more information about\n"
+"              login options please see RFC  2384,  RFC  5092  and  IETF  draft\n"
+"              draft-earhart-url-smtp-00.txt\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
@@ -1968,14 +2062,14 @@
 "       --mail-auth <address>\n"
 , stdout);
  fputs(
-"              (SMTP) Specify a single address. This will be  used  to  specify\n"
-"              the  authentication  address  (identity)  of a submitted message\n"
+"              (SMTP)  Specify  a  single address. This will be used to specify\n"
+"              the authentication address (identity)  of  a  submitted  message\n"
 "              that is being relayed to another server.\n"
 "\n"
 "              See also --mail-rcpt and --mail-from. Added in 7.25.0.\n"
 "\n"
 "       --mail-from <address>\n"
-"              (SMTP) Specify a single address that the given mail  should  get\n"
+"              (SMTP)  Specify  a single address that the given mail should get\n"
 "              sent from.\n"
 "\n"
 "              See also --mail-rcpt and --mail-auth. Added in 7.20.0.\n"
@@ -1984,33 +2078,33 @@
  fputs(
 "       --mail-rcpt-allowfails\n"
 "              (SMTP) When sending data to multiple recipients, by default curl\n"
-"              will abort SMTP conversation if at least one of  the  recipients\n"
+"              will  abort  SMTP conversation if at least one of the recipients\n"
 "              causes RCPT TO command to return an error.\n"
 "\n"
-"              The  default  behavior can be changed by passing --mail-rcpt-al-\n"
-"              lowfails command-line option which will make curl ignore  errors\n"
+"              The default behavior can be changed by  passing  --mail-rcpt-al-\n"
+"              lowfails  command-line option which will make curl ignore errors\n"
 "              and proceed with the remaining valid recipients.\n"
 "\n"
 , stdout);
  fputs(
-"              In  case when all recipients cause RCPT TO command to fail, curl\n"
-"              will abort SMTP conversation and return the error received  from\n"
+"              In case when all recipients cause RCPT TO command to fail,  curl\n"
+"              will  abort SMTP conversation and return the error received from\n"
 "              to the last RCPT TO command.  Added in 7.69.0.\n"
 "\n"
 "       --mail-rcpt <address>\n"
 "              (SMTP) Specify a single address, user name or mailing list name.\n"
 "              Repeat this option several times to send to multiple recipients.\n"
-"              When performing a mail transfer, the recipient should specify  a\n"
+"              When  performing a mail transfer, the recipient should specify a\n"
 , stdout);
  fputs(
 "              valid email address to send the mail to.\n"
 "\n"
-"              When  performing an address verification (VRFY command), the re-\n"
-"              cipient should be specified as the user name or  user  name  and\n"
+"              When performing an address verification (VRFY command), the  re-\n"
+"              cipient  should  be  specified as the user name or user name and\n"
 "              domain (as per Section 3.5 of RFC5321). (Added in 7.34.0)\n"
 "\n"
 "              When performing a mailing list expand (EXPN command), the recip-\n"
-"              ient should be specified using the mailing list  name,  such  as\n"
+"              ient  should  be  specified using the mailing list name, such as\n"
 , stdout);
  fputs(
 "              \"Friends\" or \"London-Office\".  (Added in 7.34.0)\n"
@@ -2021,31 +2115,30 @@
 "              Manual. Display the huge help text.\n"
 "\n"
 "       --max-filesize <bytes>\n"
-"              Specify  the  maximum  size (in bytes) of a file to download. If\n"
-"              the file requested is larger than this value, the transfer  will\n"
+"              Specify the maximum size (in bytes) of a file  to  download.  If\n"
+"              the  file requested is larger than this value, the transfer will\n"
 "              not start and curl will return with exit code 63.\n"
 "\n"
 , stdout);
  fputs(
-"              A  size  modifier may be used. For example, Appending 'k' or 'K'\n"
-"              will count  the  number  as  kilobytes,  'm'  or  'M'  makes  it\n"
-"              megabytes,  while 'g' or 'G' makes it gigabytes. Examples: 200K,\n"
+"              A size modifier may be used. For example, Appending 'k'  or  'K'\n"
+"              will  count  the  number  as  kilobytes,  'm'  or  'M'  makes it\n"
+"              megabytes, while 'g' or 'G' makes it gigabytes. Examples:  200K,\n"
 "              3m and 1G. (Added in 7.58.0)\n"
 "\n"
-"              NOTE: The file size is not always known prior to  download,  and\n"
-"              for such files this option has no effect even if the file trans-\n"
+"              NOTE:  For protocols where the size is not known in advance (in-\n"
+"              cluding FTP and HTTP) this option has no effect even if the file\n"
 , stdout);
  fputs(
-"              fer ends up being larger than this given  limit.  This  concerns\n"
-"              both FTP and HTTP transfers.\n"
+"              transfer ends up being larger than the given limit.\n"
 "\n"
 "              See also --limit-rate.\n"
 "\n"
 "       --max-redirs <num>\n"
-"              (HTTP)  Set  maximum  number  of redirection-followings allowed.\n"
-"              When -L, --location is used, is used to prevent curl  from  fol-\n"
-"              lowing redirections too much. By default, the limit is set to 50\n"
-"              redirections. Set this option to -1 to make it unlimited.\n"
+"              (HTTP)  Set  maximum  number of redirections to follow. When -L,\n"
+"              --location is used, to prevent  curl  from  following  too  many\n"
+"              redirects,  by  default,  the  limit is set to 50 redirects. Set\n"
+"              this option to -1 to make it unlimited.\n"
 "\n"
 , stdout);
  fputs(
@@ -2066,57 +2159,29 @@
 "              See also --connect-timeout.\n"
 "\n"
 "       --metalink\n"
-"              This  option  can  tell curl to parse and process a given URI as\n"
-"              Metalink file (both version 3 and 4 (RFC  5854)  are  supported)\n"
-"              and  make use of the mirrors listed within for failover if there\n"
-, stdout);
- fputs(
-"              are errors (such as the file or server not being available).  It\n"
-"              will  also  verify  the hash of the file after the download com-\n"
-"              pletes. The Metalink file itself is downloaded and processed  in\n"
-"              memory and not stored in the local file system.\n"
+"              This  option was previously used to specify a metalink resource.\n"
+"              Metalink support has been disabled in curl since 7.78.0 for  se-\n"
+"              curity reasons.\n"
 "\n"
-"              Example to use a remote Metalink file:\n"
-"\n"
-"               curl --metalink http://www.example.com/example.metalink\n"
-"\n"
-, stdout);
- fputs(
-"              To use a Metalink file in the local file system, use FILE proto-\n"
-"              col (file://):\n"
-"\n"
-"               curl --metalink file://example.metalink\n"
-"\n"
-"              Please note that if FILE protocol is disabled, there is  no  way\n"
-"              to  use  a local Metalink file at the time of this writing. Also\n"
-"              note that if --metalink and -i,  --include  are  used  together,\n"
-"              --include  will be ignored. This is because including headers in\n"
-, stdout);
- fputs(
-"              the response will break Metalink parser and if the  headers  are\n"
-"              included in the file described in Metalink file, hash check will\n"
-"              fail.\n"
-"\n"
-"              --metalink requires that the underlying  libcurl  was  built  to\n"
-"              support metalink. Added in 7.27.0.\n"
+"              Added in 7.27.0.\n"
 "\n"
 "       --negotiate\n"
+, stdout);
+ fputs(
 "              (HTTP) Enables Negotiate (SPNEGO) authentication.\n"
 "\n"
 "              This  option  requires a library built with GSS-API or SSPI sup-\n"
-, stdout);
- fputs(
 "              port. Use -V, --version  to  see  if  your  curl  supports  GSS-\n"
 "              API/SSPI or SPNEGO.\n"
 "\n"
 "              When  using this option, you must also provide a fake -u, --user\n"
 "              option to activate the authentication code properly.  Sending  a\n"
 "              '-u  :'  is  enough  as  the user name and password from the -u,\n"
+, stdout);
+ fputs(
 "              --user option aren't actually used.\n"
 "\n"
 "              If this option is used several times,  only  the  first  one  is\n"
-, stdout);
- fputs(
 "              used.\n"
 "\n"
 "              See also --basic, --ntlm, --anyauth and --proxy-negotiate.\n"
@@ -2125,11 +2190,11 @@
 "              This  option  is similar to -n, --netrc, except that you provide\n"
 "              the path (absolute or relative) to  the  netrc  file  that  curl\n"
 "              should use.  You can only specify one netrc file per invocation.\n"
+, stdout);
+ fputs(
 "              If several --netrc-file options are provided, the last one  will\n"
 "              be used.\n"
 "\n"
-, stdout);
- fputs(
 "              It will abide by --netrc-optional if specified.\n"
 "\n"
 "              This option overrides -n, --netrc. Added in 7.21.5.\n"
@@ -2140,20 +2205,20 @@
 "\n"
 "              See also --netrc-file. This option overrides -n, --netrc.\n"
 "\n"
+, stdout);
+ fputs(
 "       -n, --netrc\n"
 "              Makes curl scan the .netrc  (_netrc  on  Windows)  file  in  the\n"
-, stdout);
- fputs(
 "              user's home directory for login name and password. This is typi-\n"
 "              cally used for FTP on Unix. If used with HTTP, curl will  enable\n"
-"              user authentication. See netrc(5) ftp(1) for details on the file\n"
-"              format. Curl will not complain if that  file  doesn't  have  the\n"
-"              right permissions (it should not be either world- or group-read-\n"
-"              able). The environment variable \"HOME\" is used to find the  home\n"
-"              directory.\n"
-"\n"
+"              user  authentication. See netrc(5) and ftp(1) for details on the\n"
+"              file format. Curl will not complain if that  file  doesn't  have\n"
+"              the  right  permissions  (it should be neither world- nor group-\n"
 , stdout);
  fputs(
+"              readable). The environment variable \"HOME\" is used to  find  the\n"
+"              home directory.\n"
+"\n"
 "              A  quick and very simple example of how to setup a .netrc to al-\n"
 "              low curl to FTP to the machine host.domain.com  with  user  name\n"
 "              'myself' and password 'secret' should look similar to:\n"
@@ -2161,20 +2226,20 @@
 "              machine host.domain.com login myself password secret\n"
 "\n"
 "       -:, --next\n"
-"              Tells curl to use a separate operation for the following URL and\n"
-"              associated options. This allows you  to  send  several  URL  re-\n"
 , stdout);
  fputs(
+"              Tells curl to use a separate operation for the following URL and\n"
+"              associated options. This allows you  to  send  several  URL  re-\n"
 "              quests,  each with their own specific options, for example, such\n"
 "              as different user names or custom requests for each.\n"
 "\n"
 "              -:, --next will reset all local options  and  only  global  ones\n"
 "              will  have  their values survive over to the operation following\n"
+, stdout);
+ fputs(
 "              the -:, --next instruction. Global options  include  -v,  --ver-\n"
 "              bose, --trace, --trace-ascii and --fail-early.\n"
 "\n"
-, stdout);
- fputs(
 "              For  example,  you can do both a GET and a POST in a single com-\n"
 "              mand line:\n"
 "\n"
@@ -2184,10 +2249,10 @@
 "\n"
 "       --no-alpn\n"
 "              (HTTPS) Disable the ALPN TLS extension. ALPN is enabled  by  de-\n"
-"              fault  if  libcurl  was  built with an SSL library that supports\n"
-"              ALPN. ALPN is used by a libcurl that supports HTTP/2 to  negoti-\n"
 , stdout);
  fputs(
+"              fault  if  libcurl  was  built with an SSL library that supports\n"
+"              ALPN. ALPN is used by a libcurl that supports HTTP/2 to  negoti-\n"
 "              ate HTTP/2 support with the server during https sessions.\n"
 "\n"
 "              See  also  --no-npn and --http2. --no-alpn requires that the un-\n"
@@ -2195,10 +2260,10 @@
 "\n"
 "       -N, --no-buffer\n"
 "              Disables the buffering of the output stream. In normal work sit-\n"
-"              uations,  curl  will  use a standard buffered output stream that\n"
-"              will have the effect that it will output the data in chunks, not\n"
 , stdout);
  fputs(
+"              uations,  curl  will  use a standard buffered output stream that\n"
+"              will have the effect that it will output the data in chunks, not\n"
 "              necessarily  exactly  when  the data arrives.  Using this option\n"
 "              will disable that buffering.\n"
 "\n"
@@ -2206,300 +2271,309 @@
 "              thus use --buffer to enforce the buffering.\n"
 "\n"
 "       --no-keepalive\n"
+, stdout);
+ fputs(
 "              Disables  the  use  of keepalive messages on the TCP connection.\n"
 "              curl otherwise enables them by default.\n"
 "\n"
 "              Note that this is the negated option name  documented.  You  can\n"
-, stdout);
- fputs(
 "              thus use --keepalive to enforce keepalive.\n"
 "\n"
 "       --no-npn\n"
 "              (HTTPS) Disable the NPN TLS extension. NPN is enabled by default\n"
 "              if libcurl was built with an SSL library that supports NPN.  NPN\n"
+, stdout);
+ fputs(
 "              is  used  by  a libcurl that supports HTTP/2 to negotiate HTTP/2\n"
 "              support with the server during https sessions.\n"
 "\n"
 "              See also --no-alpn and --http2. --no-npn requires that  the  un-\n"
-, stdout);
- fputs(
 "              derlying libcurl was built to support TLS. Added in 7.36.0.\n"
 "\n"
 "       --no-progress-meter\n"
 "              Option to switch off the progress meter output without muting or\n"
 "              otherwise affecting warning and informational messages like  -s,\n"
+, stdout);
+ fputs(
 "              --silent does.\n"
 "\n"
 "              Note  that  this  is the negated option name documented. You can\n"
 "              thus use --progress-meter to enable the progress meter again.\n"
 "\n"
-, stdout);
- fputs(
 "              See also -v, --verbose and -s, --silent. Added in 7.67.0.\n"
 "\n"
 "       --no-sessionid\n"
 "              (TLS) Disable curl's use of SSL session-ID caching.  By  default\n"
 "              all  transfers are done using the cache. Note that while nothing\n"
+, stdout);
+ fputs(
 "              should ever get hurt by attempting  to  reuse  SSL  session-IDs,\n"
 "              there seem to be broken SSL implementations in the wild that may\n"
 "              require you to disable this in order for you to succeed.\n"
 "\n"
-, stdout);
- fputs(
 "              Note that this is the negated option name  documented.  You  can\n"
 "              thus use --sessionid to enforce session-ID caching.\n"
 "\n"
 "              Added in 7.16.0.\n"
 "\n"
 "       --noproxy <no-proxy-list>\n"
-"              Comma-separated  list  of hosts which do not use a proxy, if one\n"
-"              is specified.  The only wildcard is a single * character,  which\n"
-"              matches all hosts, and effectively disables the proxy. Each name\n"
 , stdout);
  fputs(
-"              in this list is matched as either a domain  which  contains  the\n"
-"              hostname,  or  the hostname itself. For example, local.com would\n"
-"              match  local.com,  local.com:80,  and  www.local.com,  but   not\n"
-"              www.notlocal.com.\n"
+"              Comma-separated  list  of hosts for which not to use a proxy, if\n"
+"              one is specified. The only wildcard is  a  single  *  character,\n"
+"              which  matches  all  hosts,  and effectively disables the proxy.\n"
+"              Each name in this list is matched as either a domain which  con-\n"
+"              tains  the  hostname,  or  the hostname itself. For example, lo-\n"
+"              cal.com would match local.com, local.com:80, and  www.local.com,\n"
+, stdout);
+ fputs(
+"              but not www.notlocal.com.\n"
 "\n"
 "              Since  7.53.0,  This  option overrides the environment variables\n"
-"              that disable the proxy. If there's an environment variable  dis-\n"
-, stdout);
- fputs(
-"              abling a proxy, you can set noproxy list to \"\" to override it.\n"
+"              that disable the proxy ('no_proxy' and 'NO_PROXY').  If  there's\n"
+"              an  environment  variable disabling a proxy, you can set the no-\n"
+"              proxy list to \"\" to override it.\n"
 "\n"
 "              Added in 7.19.4.\n"
 "\n"
 "       --ntlm-wb\n"
 "              (HTTP) Enables NTLM much in the style --ntlm does, but hand over\n"
-"              the authentication to the separate binary  ntlmauth  application\n"
+, stdout);
+ fputs(
+"              the  authentication  to the separate binary ntlmauth application\n"
 "              that is executed when needed.\n"
 "\n"
 "              See also --ntlm and --proxy-ntlm.\n"
 "\n"
-"       --ntlm (HTTP)  Enables  NTLM  authentication.  The  NTLM authentication\n"
+"       --ntlm (HTTP) Enables  NTLM  authentication.  The  NTLM  authentication\n"
+"              method was designed by Microsoft and is used by IIS web servers.\n"
+"              It is a proprietary protocol, reverse-engineered by clever  peo-\n"
+"              ple and implemented in curl based on their efforts. This kind of\n"
 , stdout);
  fputs(
-"              method was designed by Microsoft and is used by IIS web servers.\n"
-"              It  is a proprietary protocol, reverse-engineered by clever peo-\n"
-"              ple and implemented in curl based on their efforts. This kind of\n"
-"              behavior  should  not be endorsed, you should encourage everyone\n"
-"              who uses NTLM to switch to a public and  documented  authentica-\n"
+"              behavior should not be endorsed, you should  encourage  everyone\n"
+"              who  uses  NTLM to switch to a public and documented authentica-\n"
 "              tion method instead, such as Digest.\n"
 "\n"
-, stdout);
- fputs(
-"              If  you  want to enable NTLM for your proxy authentication, then\n"
+"              If you want to enable NTLM for your proxy  authentication,  then\n"
 "              use --proxy-ntlm.\n"
 "\n"
-"              If this option is used several times,  only  the  first  one  is\n"
+"              If  this  option  is  used  several times, only the first one is\n"
 "              used.\n"
 "\n"
-"              See  also  --proxy-ntlm.  --ntlm  requires  that  the underlying\n"
-"              libcurl was built to support TLS. This option overrides  --basic\n"
+, stdout);
+ fputs(
+"              See also  --proxy-ntlm.  --ntlm  requires  that  the  underlying\n"
+"              libcurl  was built to support TLS. This option overrides --basic\n"
 "              and --negotiate and --digest and --anyauth.\n"
 "\n"
 "       --oauth2-bearer <token>\n"
+"              (IMAP POP3 SMTP HTTP) Specify the Bearer  Token  for  OAUTH  2.0\n"
+"              server  authentication.  The Bearer Token is used in conjunction\n"
+"              with the user name which can be specified as part of  the  --url\n"
 , stdout);
  fputs(
-"              (IMAP  POP3  SMTP  HTTP)  Specify the Bearer Token for OAUTH 2.0\n"
-"              server authentication. The Bearer Token is used  in  conjunction\n"
-"              with  the  user name which can be specified as part of the --url\n"
 "              or -u, --user options.\n"
 "\n"
-"              The Bearer Token and user name are formatted  according  to  RFC\n"
+"              The  Bearer  Token  and user name are formatted according to RFC\n"
 "              6750.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --output-dir <dir>\n"
 "\n"
-, stdout);
- fputs(
-"              This  option  specifies  the  directory in which files should be\n"
+"              This option specifies the directory in  which  files  should  be\n"
 "              stored, when -O, --remote-name or -o, --output are used.\n"
 "\n"
-"              The given output directory is used for all URLs and  output  op-\n"
-"              tions on the command line, up until the first -:, --next.\n"
-"\n"
-"              If  the  specified target directory doesn't exist, the operation\n"
-"              will fail unless --create-dirs is also used.\n"
-"\n"
+"              The  given  output directory is used for all URLs and output op-\n"
 , stdout);
  fputs(
+"              tions on the command line, up until the first -:, --next.\n"
+"\n"
+"              If the specified target directory doesn't exist,  the  operation\n"
+"              will fail unless --create-dirs is also used.\n"
+"\n"
 "              If this option is used multiple times, the last specified direc-\n"
 "              tory will be used.\n"
 "\n"
-"              See  also  -O, --remote-name and -J, --remote-header-name. Added\n"
+"              See also -O, --remote-name and -J,  --remote-header-name.  Added\n"
 "              in 7.73.0.\n"
 "\n"
 "       -o, --output <file>\n"
-"              Write output to <file> instead of stdout. If you are using {} or\n"
-"              [] to fetch multiple documents, you should quote the URL and you\n"
-"              can use '#' followed by a number in the <file>  specifier.  That\n"
 , stdout);
  fputs(
-"              variable  will  be  replaced with the current string for the URL\n"
+"              Write output to <file> instead of stdout. If you are using {} or\n"
+"              [] to fetch multiple documents, you should quote the URL and you\n"
+"              can  use  '#' followed by a number in the <file> specifier. That\n"
+"              variable will be replaced with the current string  for  the  URL\n"
 "              being fetched. Like in:\n"
 "\n"
 "               curl \"http://{one,two}.example.com\" -o \"file_#1.txt\"\n"
 "\n"
 "              or use several variables like:\n"
 "\n"
-"               curl \"http://{site,host}.host[1-5].com\" -o \"#1_#2\"\n"
-"\n"
-"              You may use this option as many times as the number of URLs  you\n"
-"              have.  For  example, if you specify two URLs on the same command\n"
 , stdout);
  fputs(
+"               curl \"http://{site,host}.host[1-5].com\" -o \"#1_#2\"\n"
+"\n"
+"              You  may use this option as many times as the number of URLs you\n"
+"              have. For example, if you specify two URLs on the  same  command\n"
 "              line, you can use it like this:\n"
 "\n"
 "                curl -o aa example.com -o bb example.net\n"
 "\n"
-"              and the order of the -o options and  the  URLs  doesn't  matter,\n"
-"              just  that  the  first -o is for the first URL and so on, so the\n"
+"              and  the  order  of  the -o options and the URLs doesn't matter,\n"
+"              just that the first -o is for the first URL and so  on,  so  the\n"
+, stdout);
+ fputs(
 "              above command line can also be written as\n"
 "\n"
 "                curl example.com example.net -o aa -o bb\n"
 "\n"
-"              See also the --create-dirs option to create the  local  directo-\n"
-, stdout);
- fputs(
-"              ries  dynamically.  Specifying the output as '-' (a single dash)\n"
+"              See  also  the --create-dirs option to create the local directo-\n"
+"              ries dynamically. Specifying the output as '-' (a  single  dash)\n"
 "              will force the output to be done to stdout.\n"
 "\n"
-"              See also -O, --remote-name, --remote-name-all and -J,  --remote-\n"
+"              See  also -O, --remote-name, --remote-name-all and -J, --remote-\n"
 "              header-name.\n"
 "\n"
 "       --parallel-immediate\n"
-"              When  doing  parallel  transfers, this option will instruct curl\n"
-"              that it should rather prefer opening up more connections in par-\n"
 , stdout);
  fputs(
+"              When doing parallel transfers, this option  will  instruct  curl\n"
+"              that it should rather prefer opening up more connections in par-\n"
 "              allel at once rather than waiting to see if new transfers can be\n"
 "              added as multiplexed streams on another connection.\n"
 "\n"
 "              See also -Z, --parallel and --parallel-max. Added in 7.68.0.\n"
 "\n"
-"       --parallel-max\n"
-"              When asked to do parallel transfers, using -Z, --parallel,  this\n"
+"       --parallel-max <num>\n"
+"              When  asked to do parallel transfers, using -Z, --parallel, this\n"
+, stdout);
+ fputs(
 "              option controls the maximum amount of transfers to do simultane-\n"
 "              ously.\n"
 "\n"
 "              The default is 50.\n"
 "\n"
-, stdout);
- fputs(
 "              See also -Z, --parallel. Added in 7.66.0.\n"
 "\n"
 "       -Z, --parallel\n"
-"              Makes curl perform its transfers in parallel as compared to  the\n"
+"              Makes  curl perform its transfers in parallel as compared to the\n"
 "              regular serial manner.\n"
 "\n"
 "              Added in 7.66.0.\n"
 "\n"
 "       --pass <phrase>\n"
-"              (SSH TLS) Passphrase for the private key\n"
+"              (SSH TLS) Passphrase for the private key.\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --path-as-is\n"
-"              Tell  curl  to  not handle sequences of /../ or /./ in the given\n"
-, stdout);
- fputs(
-"              URL path. Normally curl will squash or merge them  according  to\n"
+"              Tell curl to not handle sequences of /../ or /./  in  the  given\n"
+"              URL  path.  Normally curl will squash or merge them according to\n"
 "              standards but with this option set you tell it not to do that.\n"
 "\n"
 "              Added in 7.42.0.\n"
 "\n"
 "       --pinnedpubkey <hashes>\n"
-"              (TLS)  Tells  curl  to  use  the  specified  public key file (or\n"
-"              hashes) to verify the peer. This can be a path to a  file  which\n"
-"              contains a single public key in PEM or DER format, or any number\n"
+"              (TLS) Tells curl to  use  the  specified  public  key  file  (or\n"
 , stdout);
  fputs(
+"              hashes)  to  verify the peer. This can be a path to a file which\n"
+"              contains a single public key in PEM or DER format, or any number\n"
 "              of base64 encoded sha256 hashes preceded by 'sha256//' and sepa-\n"
 "              rated by ';'\n"
 "\n"
-"              When  negotiating  a  TLS  or SSL connection, the server sends a\n"
-"              certificate indicating its identity. A public key  is  extracted\n"
-"              from  this certificate and if it does not exactly match the pub-\n"
-"              lic key provided to this option, curl will abort the  connection\n"
+"              When negotiating a TLS or SSL connection,  the  server  sends  a\n"
+"              certificate  indicating  its identity. A public key is extracted\n"
+, stdout);
+ fputs(
+"              from this certificate and if it does not exactly match the  pub-\n"
+"              lic  key provided to this option, curl will abort the connection\n"
 "              before sending or receiving any data.\n"
 "\n"
+"              PEM/DER support:\n"
+"\n"
+"              7.39.0: OpenSSL, GnuTLS and GSKit\n"
+"\n"
+"              7.43.0: NSS and wolfSSL\n"
+"\n"
+"              7.47.0: mbedtls\n"
+"              sha256 support:\n"
+"\n"
+"              7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL\n"
+"\n"
+"              7.47.0: mbedtls\n"
+"\n"
 , stdout);
  fputs(
-"              PEM/DER support:\n"
-"                7.39.0: OpenSSL, GnuTLS and GSKit\n"
-"                7.43.0: NSS and wolfSSL\n"
-"                7.47.0: mbedtls sha256 support:\n"
-"                7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL\n"
-"                7.47.0: mbedtls Other SSL backends not supported.\n"
+"              Other SSL backends not supported.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --post301\n"
 "              (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST\n"
+"              requests into GET requests when following a 301 redirection. The\n"
+"              non-RFC behavior is ubiquitous in web browsers, so curl does the\n"
+"              conversion by default to maintain consistency. However, a server\n"
 , stdout);
  fputs(
-"              requests into GET requests when following a 301 redirection. The\n"
-"              non-RFC  behaviour  is  ubiquitous in web browsers, so curl does\n"
-"              the conversion by default to maintain  consistency.  However,  a\n"
-"              server  may  require  a POST to remain a POST after such a redi-\n"
-"              rection. This option is meaningful only when using  -L,  --loca-\n"
-"              tion.\n"
+"              may require a POST to remain a POST after  such  a  redirection.\n"
+"              This option is meaningful only when using -L, --location.\n"
 "\n"
 "              See  also  --post302,  --post303  and  -L,  --location. Added in\n"
-, stdout);
- fputs(
 "              7.17.1.\n"
 "\n"
 "       --post302\n"
 "              (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST\n"
 "              requests into GET requests when following a 302 redirection. The\n"
-"              non-RFC behaviour is ubiquitous in web browsers,  so  curl  does\n"
-"              the  conversion  by  default to maintain consistency. However, a\n"
-"              server may require a POST to remain a POST after  such  a  redi-\n"
 , stdout);
  fputs(
-"              rection.  This  option is meaningful only when using -L, --loca-\n"
-"              tion.\n"
+"              non-RFC behavior is ubiquitous in web browsers, so curl does the\n"
+"              conversion by default to maintain consistency. However, a server\n"
+"              may require a POST to remain a POST after  such  a  redirection.\n"
+"              This option is meaningful only when using -L, --location.\n"
 "\n"
-"              See also --post301,  --post303  and  -L,  --location.  Added  in\n"
+"              See  also  --post301,  --post303  and  -L,  --location. Added in\n"
 "              7.19.1.\n"
 "\n"
 "       --post303\n"
-"              (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST\n"
-"              requests into GET requests when following  303  redirections.  A\n"
-"              server may require a POST to remain a POST after a 303 redirect-\n"
 , stdout);
  fputs(
+"              (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST\n"
+"              requests  into  GET  requests when following 303 redirections. A\n"
+"              server may require a POST to remain a POST after a 303 redirect-\n"
 "              ion. This option is meaningful only when using -L, --location.\n"
 "\n"
-"              See also --post302,  --post301  and  -L,  --location.  Added  in\n"
+"              See  also  --post302,  --post301  and  -L,  --location. Added in\n"
 "              7.26.0.\n"
 "\n"
 "       --preproxy [protocol://]host[:port]\n"
-"              Use  the  specified  SOCKS proxy before connecting to an HTTP or\n"
-"              HTTPS -x, --proxy. In such a case curl  first  connects  to  the\n"
-"              SOCKS  proxy  and  then  connects (through SOCKS) to the HTTP or\n"
 , stdout);
  fputs(
+"              Use the specified SOCKS proxy before connecting to  an  HTTP  or\n"
+"              HTTPS  -x,  --proxy.  In  such a case curl first connects to the\n"
+"              SOCKS proxy and then connects (through SOCKS)  to  the  HTTP  or\n"
 "              HTTPS proxy. Hence pre proxy.\n"
 "\n"
 "              The pre proxy string should be specified with a protocol:// pre-\n"
-"              fix  to  specify  alternative  proxy  protocols.  Use socks4://,\n"
-"              socks4a://, socks5:// or  socks5h://  to  request  the  specific\n"
-"              SOCKS  version  to be used. No protocol specified will make curl\n"
-"              default to SOCKS4.\n"
-"\n"
-"              If the port number is not specified in the proxy string,  it  is\n"
+"              fix to  specify  alternative  proxy  protocols.  Use  socks4://,\n"
 , stdout);
  fputs(
+"              socks4a://,  socks5://  or  socks5h://  to  request the specific\n"
+"              SOCKS version to be used. No protocol specified will  make  curl\n"
+"              default to SOCKS4.\n"
+"\n"
+"              If  the  port number is not specified in the proxy string, it is\n"
 "              assumed to be 1080.\n"
 "\n"
 "              User and password that might be provided in the proxy string are\n"
-"              URL decoded by curl. This allows you to pass in special  charac-\n"
+"              URL  decoded by curl. This allows you to pass in special charac-\n"
+, stdout);
+ fputs(
 "              ters such as @ by using %40 or pass in a colon with %3a.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -2508,40 +2582,40 @@
 "\n"
 "       -#, --progress-bar\n"
 "              Make curl display transfer progress as a simple progress bar in-\n"
-, stdout);
- fputs(
 "              stead of the standard, more informational, meter.\n"
 "\n"
-"              This progress bar draws a single line of '#'  characters  across\n"
+"              This  progress  bar draws a single line of '#' characters across\n"
+, stdout);
+ fputs(
 "              the screen and shows a percentage if the transfer size is known.\n"
-"              For transfers without a known size, there  will  be  space  ship\n"
-"              (-=o=-)  that  moves back and forth but only while data is being\n"
+"              For  transfers  without  a  known size, there will be space ship\n"
+"              (-=o=-) that moves back and forth but only while data  is  being\n"
 "              transferred, with a set of flying hash sign symbols on top.\n"
 "\n"
 "       --proto-default <protocol>\n"
-, stdout);
- fputs(
 "              Tells curl to use protocol for any URL missing a scheme name.\n"
 "\n"
 "              Example:\n"
 "\n"
+, stdout);
+ fputs(
 "               curl --proto-default https ftp.mozilla.org\n"
 "\n"
-"              An unknown or unsupported  protocol  causes  error  CURLE_UNSUP-\n"
+"              An  unknown  or  unsupported  protocol causes error CURLE_UNSUP-\n"
 "              PORTED_PROTOCOL (1).\n"
 "\n"
 "              This option does not change the default proxy protocol (http).\n"
 "\n"
-"              Without  this  option curl would make a guess based on the host,\n"
+"              Without this option curl would make a guess based on  the  host,\n"
 "              see --url for details.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.45.0.\n"
 "\n"
 "       --proto-redir <protocols>\n"
-"              Tells curl to limit what protocols it may use on redirect.  Pro-\n"
-"              tocols  denied by --proto are not overridden by this option. See\n"
+, stdout);
+ fputs(
+"              Tells  curl to limit what protocols it may use on redirect. Pro-\n"
+"              tocols denied by --proto are not overridden by this option.  See\n"
 "              --proto for how protocols are represented.\n"
 "\n"
 "              Example, allow only HTTP and HTTPS on redirect:\n"
@@ -2552,9 +2626,9 @@
 , stdout);
  fputs(
 "              (7.65.2).  Older versions of curl allowed all protocols on redi-\n"
-"              rect except several disabled for security reasons: Since  7.19.4\n"
-"              FILE  and  SCP  are  disabled, and since 7.40.0 SMB and SMBS are\n"
-"              also disabled. Specifying all or +all enables all  protocols  on\n"
+"              rect  except several disabled for security reasons: Since 7.19.4\n"
+"              FILE and SCP are disabled, and since 7.40.0  SMB  and  SMBS  are\n"
+"              also  disabled.  Specifying all or +all enables all protocols on\n"
 "              redirect, including those disabled for security.\n"
 "\n"
 "              Added in 7.20.2.\n"
@@ -2562,9 +2636,9 @@
 "       --proto <protocols>\n"
 , stdout);
  fputs(
-"              Tells  curl  to limit what protocols it may use in the transfer.\n"
-"              Protocols are evaluated left to right, are comma separated,  and\n"
-"              are  each  a protocol name or 'all', optionally prefixed by zero\n"
+"              Tells curl to limit what protocols it  may  use  for  transfers.\n"
+"              Protocols  are evaluated left to right, are comma separated, and\n"
+"              are each a protocol name or 'all', optionally prefixed  by  zero\n"
 "              or more modifiers. Available modifiers are:\n"
 "\n"
 "              +  Permit this protocol in addition to protocols already permit-\n"
@@ -2572,11 +2646,11 @@
 "\n"
 , stdout);
  fputs(
-"              -  Deny  this  protocol,  removing it from the list of protocols\n"
+"              -  Deny this protocol, removing it from the  list  of  protocols\n"
 "                 already permitted.\n"
 "\n"
-"              =  Permit only this protocol (ignoring the list already  permit-\n"
-"                 ted),  though subject to later modification by subsequent en-\n"
+"              =  Permit  only this protocol (ignoring the list already permit-\n"
+"                 ted), though subject to later modification by subsequent  en-\n"
 "                 tries in the comma separated list.\n"
 "\n"
 "              For example:\n"
@@ -2591,29 +2665,30 @@
 "              --proto =http,https\n"
 "                             also only enables http and https\n"
 "\n"
-"       Unknown protocols produce a warning. This allows scripts to safely rely\n"
-"       on being able to disable potentially dangerous protocols, without rely-\n"
-"       ing upon support for that protocol being built into curl  to  avoid  an\n"
-"       error.\n"
+"              Unknown  protocols  produce  a  warning.  This allows scripts to\n"
+"              safely rely on being able to disable potentially dangerous  pro-\n"
+"              tocols,  without  relying  upon  support for that protocol being\n"
+"              built into curl to avoid an error.\n"
 "\n"
-"       This option can be used multiple times, in which case the effect is the\n"
 , stdout);
  fputs(
-"       same as concatenating the protocols into one instance of the option.\n"
+"              This option can be used multiple times, in which case the effect\n"
+"              is  the same as concatenating the protocols into one instance of\n"
+"              the option.\n"
 "\n"
-"       See also --proto-redir and --proto-default. Added in 7.20.2.\n"
+"              See also --proto-redir and --proto-default. Added in 7.20.2.\n"
 "\n"
 "       --proxy-anyauth\n"
 "              Tells curl to pick a suitable authentication method when  commu-\n"
 "              nicating  with  the  given HTTP proxy. This might cause an extra\n"
 "              request/response round-trip.\n"
 "\n"
+, stdout);
+ fputs(
 "              See also -x, --proxy, --proxy-basic and --proxy-digest. Added in\n"
 "              7.13.2.\n"
 "\n"
 "       --proxy-basic\n"
-, stdout);
- fputs(
 "              Tells  curl  to use HTTP Basic authentication when communicating\n"
 "              with the given proxy. Use --basic for enabling HTTP Basic with a\n"
 "              remote  host.  Basic  is  the default authentication method curl\n"
@@ -2622,10 +2697,10 @@
 "              See also -x, --proxy, --proxy-anyauth and --proxy-digest.\n"
 "\n"
 "       --proxy-cacert <file>\n"
-"              Same as --cacert but used in HTTPS proxy context.\n"
-"\n"
 , stdout);
  fputs(
+"              Same as --cacert but used in HTTPS proxy context.\n"
+"\n"
 "              See also --proxy-capath, --cacert,  --capath  and  -x,  --proxy.\n"
 "              Added in 7.52.0.\n"
 "\n"
@@ -2638,11 +2713,11 @@
 "       --proxy-cert-type <type>\n"
 "              Same as --cert-type but used in HTTPS proxy context.\n"
 "\n"
+, stdout);
+ fputs(
 "              Added in 7.52.0.\n"
 "\n"
 "       --proxy-cert <cert[:passwd]>\n"
-, stdout);
- fputs(
 "              Same as -E, --cert but used in HTTPS proxy context.\n"
 "\n"
 "              Added in 7.52.0.\n"
@@ -2658,9 +2733,9 @@
 "              Added in 7.52.0.\n"
 "\n"
 "       --proxy-digest\n"
-"              Tells curl to use HTTP Digest authentication when  communicating\n"
 , stdout);
  fputs(
+"              Tells curl to use HTTP Digest authentication when  communicating\n"
 "              with the given proxy. Use --digest for enabling HTTP Digest with\n"
 "              a remote host.\n"
 "\n"
@@ -2669,9 +2744,9 @@
 "       --proxy-header <header/@file>\n"
 "              (HTTP) Extra header to include in the request when sending  HTTP\n"
 "              to a proxy. You may specify any number of extra headers. This is\n"
-"              the equivalent option to -H, --header but is for proxy  communi-\n"
 , stdout);
  fputs(
+"              the equivalent option to -H, --header but is for proxy  communi-\n"
 "              cation  only  like  in CONNECT requests when you want a separate\n"
 "              header sent to the proxy to what is sent to  the  actual  remote\n"
 "              host.\n"
@@ -2679,10 +2754,10 @@
 "              curl  will  make  sure  that each header you add/replace is sent\n"
 "              with the proper end-of-line marker, you should thus not add that\n"
 "              as a part of the header content: do not add newlines or carriage\n"
-"              returns, they will only mess things up for you.\n"
-"\n"
 , stdout);
  fputs(
+"              returns, they will only mess things up for you.\n"
+"\n"
 "              Headers specified with this option will not be included  in  re-\n"
 "              quests that curl knows will not be sent to a proxy.\n"
 "\n"
@@ -2690,11 +2765,11 @@
 "              name style, which then adds a header for each line in the  input\n"
 "              file. Using @- will make curl read the header file from stdin.\n"
 "\n"
+, stdout);
+ fputs(
 "              This  option  can  be  used multiple times to add/replace/remove\n"
 "              multiple headers.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.37.0.\n"
 "       --proxy-insecure\n"
 "              Same as -k, --insecure but used in HTTPS proxy context.\n"
@@ -2709,10 +2784,10 @@
 "       --proxy-key <key>\n"
 "              Same as --key but used in HTTPS proxy context.\n"
 "\n"
-"       --proxy-negotiate\n"
-"              Tells curl to use HTTP Negotiate  (SPNEGO)  authentication  when\n"
 , stdout);
  fputs(
+"       --proxy-negotiate\n"
+"              Tells curl to use HTTP Negotiate  (SPNEGO)  authentication  when\n"
 "              communicating with the given proxy. Use --negotiate for enabling\n"
 "              HTTP Negotiate (SPNEGO) with a remote host.\n"
 "\n"
@@ -2721,12 +2796,12 @@
 "       --proxy-ntlm\n"
 "              Tells curl to use HTTP NTLM  authentication  when  communicating\n"
 "              with the given proxy. Use --ntlm for enabling NTLM with a remote\n"
+, stdout);
+ fputs(
 "              host.\n"
 "\n"
 "              See also --proxy-negotiate and --proxy-anyauth.\n"
 "\n"
-, stdout);
- fputs(
 "       --proxy-pass <phrase>\n"
 "              Same as --pass but used in HTTPS proxy context.\n"
 "\n"
@@ -2736,9 +2811,9 @@
 "              (TLS) Tells curl to  use  the  specified  public  key  file  (or\n"
 "              hashes)  to verify the proxy. This can be a path to a file which\n"
 "              contains a single public key in PEM or DER format, or any number\n"
-"              of base64 encoded sha256 hashes preceded by 'sha256//' and sepa-\n"
 , stdout);
  fputs(
+"              of base64 encoded sha256 hashes preceded by 'sha256//' and sepa-\n"
 "              rated by ';'\n"
 "\n"
 "              When negotiating a TLS or SSL connection,  the  server  sends  a\n"
@@ -2747,10 +2822,10 @@
 "              lic  key provided to this option, curl will abort the connection\n"
 "              before sending or receiving any data.\n"
 "\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
 , stdout);
  fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
 "       --proxy-service-name <name>\n"
 "              This option allows you to change the service name for proxy  ne-\n"
 "              gotiation.\n"
@@ -2762,21 +2837,26 @@
 "\n"
 "              Added in 7.52.0.\n"
 "\n"
-"       --proxy-tls13-ciphers <ciphersuite list>\n"
-"              (TLS)  Specifies which cipher suites to use in the connection to\n"
+"       --proxy-ssl-auto-client-cert\n"
 , stdout);
  fputs(
+"              Same as --ssl-auto-client-cert but used in HTTPS proxy context.\n"
+"\n"
+"              Added in 7.77.0.\n"
+"\n"
+"       --proxy-tls13-ciphers <ciphersuite list>\n"
+"              (TLS)  Specifies which cipher suites to use in the connection to\n"
 "              your HTTPS proxy when it negotiates TLS 1.3. The list of ciphers\n"
 "              suites  must  specify  valid  ciphers. Read up on TLS 1.3 cipher\n"
 "              suite details on this URL:\n"
 "\n"
-"               https://curl.haxx.se/docs/ssl-ciphers.html\n"
+"               https://curl.se/docs/ssl-ciphers.html\n"
 "\n"
+, stdout);
+ fputs(
 "              This option is currently used only when curl  is  built  to  use\n"
 "              OpenSSL 1.1.1 or later. If you are using a different SSL backend\n"
 "              you can try setting TLS 1.3 cipher suites by using the  --proxy-\n"
-, stdout);
- fputs(
 "              ciphers option.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -2786,6 +2866,8 @@
 "\n"
 "              Added in 7.52.0.\n"
 "\n"
+, stdout);
+ fputs(
 "       --proxy-tlspassword <string>\n"
 "              Same as --tlspassword but used in HTTPS proxy context.\n"
 "\n"
@@ -2794,8 +2876,6 @@
 "       --proxy-tlsuser <name>\n"
 "              Same as --tlsuser but used in HTTPS proxy context.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.52.0.\n"
 "\n"
 "       --proxy-tlsv1\n"
@@ -2804,58 +2884,60 @@
 "              Added in 7.52.0.\n"
 "\n"
 "       -U, --proxy-user <user:password>\n"
+, stdout);
+ fputs(
 "              Specify  the user name and password to use for proxy authentica-\n"
 "              tion.\n"
 "\n"
 "              If you use a Windows SSPI-enabled curl binary and do either  Ne-\n"
 "              gotiate  or NTLM authentication then you can tell curl to select\n"
-, stdout);
- fputs(
 "              the user name and password from your environment by specifying a\n"
 "              single colon with this option: \"-U :\".\n"
 "\n"
 "              On systems where it works, curl will hide the given option argu-\n"
+, stdout);
+ fputs(
 "              ment from process listings. This is not enough to  protect  cre-\n"
 "              dentials  from  possibly getting seen by other users on the same\n"
 "              system as they will still be visible for a brief  moment  before\n"
-, stdout);
- fputs(
 "              cleared. Such sensitive data should be retrieved from a file in-\n"
 "              stead or similar and never used in clear text in a command line.\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
+, stdout);
+ fputs(
 "       -x, --proxy [protocol://]host[:port]\n"
 "              Use the specified proxy.\n"
 "\n"
 "              The proxy string can be specified with a protocol:// prefix.  No\n"
 "              protocol specified or http:// will be treated as HTTP proxy. Use\n"
-, stdout);
- fputs(
 "              socks4://, socks4a://, socks5:// or socks5h:// to request a spe-\n"
 "              cific SOCKS version to be used.  (The protocol support was added\n"
 "              in curl 7.21.7)\n"
 "\n"
+, stdout);
+ fputs(
 "              HTTPS proxy support via https:// protocol prefix  was  added  in\n"
 "              7.52.0 for OpenSSL, GnuTLS and NSS.\n"
 "\n"
 "              Unrecognized  and  unsupported  proxy  protocols  cause an error\n"
 "              since 7.52.0.  Prior versions may ignore the  protocol  and  use\n"
-, stdout);
- fputs(
 "              http:// instead.\n"
 "\n"
 "              If  the  port number is not specified in the proxy string, it is\n"
 "              assumed to be 1080.\n"
 "\n"
+, stdout);
+ fputs(
 "              This option overrides existing environment  variables  that  set\n"
 "              the  proxy  to use. If there's an environment variable setting a\n"
 "              proxy, you can set proxy to \"\" to override it.\n"
 "\n"
 "              All operations that are performed over an HTTP proxy will trans-\n"
-, stdout);
- fputs(
 "              parently  be  converted  to HTTP. It means that certain protocol\n"
 "              specific operations might not be available. This is not the case\n"
+, stdout);
+ fputs(
 "              if you can tunnel through the proxy, as one with the -p, --prox-\n"
 "              ytunnel option.\n"
 "\n"
@@ -2863,10 +2945,10 @@
 "              URL  decoded by curl. This allows you to pass in special charac-\n"
 "              ters such as @ by using %40 or pass in a colon with %3a.\n"
 "\n"
-, stdout);
- fputs(
 "              The proxy host can be specified the exact same way as the  proxy\n"
 "              environment  variables,  including the protocol prefix (http://)\n"
+, stdout);
+ fputs(
 "              and the embedded user + password.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -2875,21 +2957,21 @@
 "              Use the specified HTTP 1.0 proxy. If  the  port  number  is  not\n"
 "              specified, it is assumed at port 1080.\n"
 "\n"
-, stdout);
- fputs(
 "              The  only  difference between this and the HTTP proxy option -x,\n"
 "              --proxy, is that attempts to use CONNECT through the proxy  will\n"
+, stdout);
+ fputs(
 "              specify an HTTP 1.0 protocol instead of the default HTTP 1.1.\n"
 "\n"
 "       -p, --proxytunnel\n"
 "              When  an  HTTP  proxy is used -x, --proxy, this option will make\n"
 "              curl tunnel through the proxy. The tunnel approach is made  with\n"
 "              the  HTTP  proxy CONNECT request and requires that the proxy al-\n"
-, stdout);
- fputs(
 "              lows direct connect to the remote port number curl wants to tun-\n"
 "              nel through to.\n"
 "\n"
+, stdout);
+ fputs(
 "              To  suppress  proxy CONNECT response headers when curl is set to\n"
 "              output headers use --suppress-connect-headers.\n"
 "\n"
@@ -2899,61 +2981,61 @@
 "              (SFTP SCP) Public key file name. Allows you to provide your pub-\n"
 "              lic key in this separate file.\n"
 "\n"
-, stdout);
- fputs(
 "              If this option is used several times, the last one will be used.\n"
 "              (As of 7.39.0, curl attempts to automatically extract the public\n"
+, stdout);
+ fputs(
 "              key from the private key file, so passing this option is  gener-\n"
 "              ally not required. Note that this public key extraction requires\n"
 "              libcurl to be linked against a copy of libssh2 1.2.8  or  higher\n"
 "              that is itself linked against OpenSSL.)\n"
 "\n"
-"       -Q, --quote\n"
-, stdout);
- fputs(
+"       -Q, --quote <command>\n"
 "              (FTP  SFTP)  Send an arbitrary command to the remote FTP or SFTP\n"
 "              server. Quote commands are sent BEFORE the transfer takes  place\n"
+, stdout);
+ fputs(
 "              (just  after  the  initial PWD command in an FTP transfer, to be\n"
 "              exact). To make commands take place after a successful transfer,\n"
 "              prefix  them  with  a  dash '-'.  To make commands be sent after\n"
 "              curl has changed the working directory, just before the transfer\n"
-, stdout);
- fputs(
 "              command(s),  prefix  the  command  with a '+' (this is only sup-\n"
 "              ported for FTP). You may specify any number of commands.\n"
 "\n"
+, stdout);
+ fputs(
 "              If the server returns failure for one of the commands,  the  en-\n"
 "              tire operation will be aborted. You must send syntactically cor-\n"
 "              rect FTP commands as RFC 959 defines to FTP servers, or  one  of\n"
 "              the commands listed below to SFTP servers.\n"
 "\n"
-, stdout);
- fputs(
 "              Prefix  the  command  with an asterisk (*) to make curl continue\n"
 "              even if the command fails as by default curl will stop at  first\n"
 "              failure.\n"
 "\n"
+, stdout);
+ fputs(
 "              This option can be used multiple times.\n"
 "\n"
 "              SFTP  is a binary protocol. Unlike for FTP, curl interprets SFTP\n"
 "              quote commands itself before sending them to the  server.   File\n"
 "              names may be quoted shell-style to embed spaces or special char-\n"
-, stdout);
- fputs(
 "              acters.  Following is the list of all supported SFTP quote  com-\n"
 "              mands:\n"
 "\n"
 "              atime date file\n"
+, stdout);
+ fputs(
 "                     The  atime  command sets the last access time of the file\n"
 "                     named by the file operand. The <date expression>  can  be\n"
 "                     all  sorts  of  date strings, see the curl_getdate(3) man\n"
 "                     page for date expression details. (Added in 7.73.0)\n"
 "\n"
 "              chgrp group file\n"
-, stdout);
- fputs(
 "                     The chgrp command sets the group ID of the file named  by\n"
 "                     the  file  operand to the group ID specified by the group\n"
+, stdout);
+ fputs(
 "                     operand. The group operand is a decimal integer group ID.\n"
 "\n"
 "              chmod mode file\n"
@@ -2962,10 +3044,10 @@
 "                     number.\n"
 "\n"
 "              chown user file\n"
-, stdout);
- fputs(
 "                     The chown command sets the owner of the file named by the\n"
 "                     file  operand  to the user ID specified by the user oper-\n"
+, stdout);
+ fputs(
 "                     and. The user operand is a decimal integer user ID.\n"
 "\n"
 "              ln source_file target_file\n"
@@ -2974,23 +3056,23 @@
 "                     tion.\n"
 "\n"
 "              mkdir directory_name\n"
-, stdout);
- fputs(
 "                     The mkdir command creates the directory named by the  di-\n"
 "                     rectory_name operand.\n"
 "\n"
 "              mtime date file\n"
+, stdout);
+ fputs(
 "                     The  mtime command sets the last modification time of the\n"
 "                     file named by the file operand. The <date expression> can\n"
 "                     be all sorts of date strings, see the curl_getdate(3) man\n"
 "                     page for date expression details. (Added in 7.73.0)\n"
 "\n"
-, stdout);
- fputs(
 "              pwd    The pwd command returns the absolute pathname of the cur-\n"
 "                     rent working directory.\n"
 "\n"
 "              rename source target\n"
+, stdout);
+ fputs(
 "                     The rename command renames the file or directory named by\n"
 "                     the source operand to the destination path named  by  the\n"
 "                     target operand.\n"
@@ -2999,10 +3081,10 @@
 "                     The rm command removes the file specified by the file op-\n"
 "                     erand.\n"
 "\n"
-, stdout);
- fputs(
 "              rmdir directory\n"
 "                     The rmdir command removes the directory  entry  specified\n"
+, stdout);
+ fputs(
 "                     by the directory operand, provided it is empty.\n"
 "\n"
 "              symlink source_file target_file\n"
@@ -3011,11 +3093,11 @@
 "       --random-file <file>\n"
 "              Specify the path name to file containing what will be considered\n"
 "              as random data. The data may be used to seed the  random  engine\n"
-, stdout);
- fputs(
 "              for SSL connections.  See also the --egd-file option.\n"
 "\n"
 "       -r, --range <range>\n"
+, stdout);
+ fputs(
 "              (HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial docu-\n"
 "              ment) from an HTTP/1.1, FTP or SFTP  server  or  a  local  FILE.\n"
 "              Ranges can be specified in a number of ways.\n"
@@ -3026,31 +3108,33 @@
 "\n"
 "              -500      specifies the last 500 bytes\n"
 "\n"
-, stdout);
- fputs(
 "              9500-     specifies the bytes from offset 9500 and forward\n"
 "\n"
+, stdout);
+ fputs(
 "              0-0,-1    specifies the first and last byte only(*)(HTTP)\n"
 "\n"
 "              100-199,500-599\n"
 "                        specifies two separate 100-byte ranges(*) (HTTP)\n"
 "\n"
 "              (*)  = NOTE that this will cause the server to reply with a mul-\n"
-"              tipart response!\n"
+"              tipart response, which will be returned as-is by  curl!  Parsing\n"
+"              or otherwise transforming this response is the responsibility of\n"
+"              the caller.\n"
 "\n"
-"              Only digit characters (0-9) are valid in the 'start' and  'stop'\n"
 , stdout);
  fputs(
+"              Only digit characters (0-9) are valid in the 'start' and  'stop'\n"
 "              fields  of the 'start-stop' range syntax. If a non-digit charac-\n"
 "              ter is given in the range, the server's response will be unspec-\n"
 "              ified, depending on the server's configuration.\n"
 "\n"
 "              You  should also be aware that many HTTP/1.1 servers do not have\n"
 "              this feature enabled, so that when you attempt to get  a  range,\n"
-"              you'll instead get the whole document.\n"
-"\n"
 , stdout);
  fputs(
+"              you'll instead get the whole document.\n"
+"\n"
 "              FTP  and  SFTP  range  downloads only support the simple 'start-\n"
 "              stop' syntax (optionally with one of the numbers  omitted).  FTP\n"
 "              use depends on the extended FTP command SIZE.\n"
@@ -3058,11 +3142,11 @@
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --raw  (HTTP) When used, it disables all internal HTTP decoding of con-\n"
+, stdout);
+ fputs(
 "              tent or transfer encodings and instead makes them passed on  un-\n"
 "              altered, raw.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.16.2.\n"
 "\n"
 "       -e, --referer <URL>\n"
@@ -3070,9 +3154,9 @@
 "              This can also be set with the -H, --header flag of course.  When\n"
 "              used  with  -L,  --location  you  can  append \";auto\" to the -e,\n"
 "              --referer URL to make curl automatically set  the  previous  URL\n"
-"              when  it  follows  a Location: header. The \";auto\" string can be\n"
 , stdout);
  fputs(
+"              when  it  follows  a Location: header. The \";auto\" string can be\n"
 "              used alone, even if you don't set an initial -e, --referer.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -3082,21 +3166,21 @@
 "       -J, --remote-header-name\n"
 "              (HTTP) This option tells the -O, --remote-name option to use the\n"
 "              server-specified  Content-Disposition  filename  instead  of ex-\n"
-"              tracting a filename from the URL.\n"
-"\n"
 , stdout);
  fputs(
+"              tracting a filename from the URL.\n"
+"\n"
 "              If the server specifies a file name and a file  with  that  name\n"
 "              already  exists  in the current working directory it will not be\n"
 "              overwritten and an error will occur. If the server doesn't spec-\n"
 "              ify a file name then this option has no effect.\n"
 "\n"
 "              There's  no  attempt to decode %-sequences (yet) in the provided\n"
+, stdout);
+ fputs(
 "              file name, so this option may provide you with rather unexpected\n"
 "              file names.\n"
 "\n"
-, stdout);
- fputs(
 "              WARNING:  Exercise  judicious  use of this option, especially on\n"
 "              Windows. A rogue server could send you the  name  of  a  DLL  or\n"
 "              other  file  that could possibly be loaded automatically by Win-\n"
@@ -3104,9 +3188,9 @@
 "\n"
 "       --remote-name-all\n"
 "              This option changes the default action for all given URLs to  be\n"
-"              dealt with as if -O, --remote-name were used for each one. So if\n"
 , stdout);
  fputs(
+"              dealt with as if -O, --remote-name were used for each one. So if\n"
 "              you want to disable that for a specific URL after --remote-name-\n"
 "              all has been used, you must use \"-o -\" or --no-remote-name.\n"
 "\n"
@@ -3117,18 +3201,18 @@
 "              (Only the file part of the remote file is used, the path is  cut\n"
 "              off.)\n"
 "\n"
-"              The  file will be saved in the current working directory. If you\n"
 , stdout);
  fputs(
+"              The  file will be saved in the current working directory. If you\n"
 "              want the file saved in a  different  directory,  make  sure  you\n"
 "              change  the  current working directory before invoking curl with\n"
 "              this option.\n"
 "\n"
 "              The remote file name to use for saving  is  extracted  from  the\n"
 "              given  URL,  nothing  else,  and if it already exists it will be\n"
-"              overwritten. If you want the server to be  able  to  choose  the\n"
 , stdout);
  fputs(
+"              overwritten. If you want the server to be  able  to  choose  the\n"
 "              file name refer to -J, --remote-header-name which can be used in\n"
 "              addition to this option. If the server chooses a file  name  and\n"
 "              that name already exists it will not be overwritten.\n"
@@ -3137,9 +3221,9 @@
 "              other URL encoded parts of the name, they will end up  as-is  as\n"
 "              file name.\n"
 "\n"
-"              You  may use this option as many times as the number of URLs you\n"
 , stdout);
  fputs(
+"              You  may use this option as many times as the number of URLs you\n"
 "              have.\n"
 "\n"
 "       -R, --remote-time\n"
@@ -3147,11 +3231,11 @@
 "              stamp  of the remote file, and if that is available make the lo-\n"
 "              cal file get that same timestamp.\n"
 "\n"
-"       --request-target\n"
+"       --request-target <path>\n"
 "              (HTTP) Tells curl to use an alternative \"target\" (path)  instead\n"
-"              of  using  the  path as provided in the URL. Particularly useful\n"
 , stdout);
  fputs(
+"              of  using  the  path as provided in the URL. Particularly useful\n"
 "              when wanting to issue HTTP requests  without  leading  slash  or\n"
 "              other  data  that  doesn't  follow the regular URL pattern, like\n"
 "              \"OPTIONS *\".\n"
@@ -3161,9 +3245,9 @@
 "       -X, --request <command>\n"
 "              (HTTP) Specifies a custom request method to use when communicat-\n"
 "              ing  with the HTTP server.  The specified request method will be\n"
-"              used instead of the method otherwise  used  (which  defaults  to\n"
 , stdout);
  fputs(
+"              used instead of the method otherwise  used  (which  defaults  to\n"
 "              GET).  Read  the HTTP 1.1 specification for details and explana-\n"
 "              tions. Common additional HTTP requests include PUT  and  DELETE,\n"
 "              but related technologies like WebDAV offers PROPFIND, COPY, MOVE\n"
@@ -3171,10 +3255,10 @@
 "\n"
 "              Normally you don't need this option. All  sorts  of  GET,  HEAD,\n"
 "              POST and PUT requests are rather invoked by using dedicated com-\n"
-"              mand line options.\n"
-"\n"
 , stdout);
  fputs(
+"              mand line options.\n"
+"\n"
 "              This option only changes the actual word used in  the  HTTP  re-\n"
 "              quest, it does not alter the way curl behaves. So for example if\n"
 "              you want to make a proper HEAD request, using -X HEAD  will  not\n"
@@ -3203,7 +3287,7 @@
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
-"       --resolve <host:port:addr[,addr]...>\n"
+"       --resolve <[+]host:port:addr[,addr]...>\n"
 "              Provide a custom address for a specific host and port pair.  Us-\n"
 "              ing  this, you can make the curl requests(s) use a specified ad-\n"
 , stdout);
@@ -3226,14 +3310,25 @@
 "              --ipv4 or -6, --ipv6 is set to make curl use another IP version.\n"
 , stdout);
  fputs(
+"              By prefixing the host with a '+' you can make the entry time out\n"
+"              after curl's default timeout (1 minute).  Note  that  this  will\n"
+"              only  make  sense for long running parallel transfers with a lot\n"
+"              of files. In such cases, if this option is used curl will try to\n"
+"              resolve  the  host as it normally would once the timeout has ex-\n"
+"              pired.\n"
+"\n"
 "              Support for providing the IP address within [brackets] was added\n"
+, stdout);
+ fputs(
 "              in 7.57.0.\n"
 "\n"
-"              Support for providing multiple IP addresses per entry was  added\n"
+"              Support  for providing multiple IP addresses per entry was added\n"
 "              in 7.59.0.\n"
 "\n"
 "              Support for resolving with wildcard was added in 7.64.0.\n"
 "\n"
+"              Support for the '+' prefix was was added in 7.75.0.\n"
+"\n"
 "              This option can be used many times to add many host names to re-\n"
 "              solve.\n"
 "\n"
@@ -3244,59 +3339,71 @@
  fputs(
 "              Retry on any error. This option is used together with --retry.\n"
 "\n"
-"              This option is the \"sledgehammer\" of retrying. Do not  use  this\n"
+"              This  option  is the \"sledgehammer\" of retrying. Do not use this\n"
 "              option by default (eg in curlrc), there may be unintended conse-\n"
-"              quences such as sending or receiving duplicate data. Do not  use\n"
-"              with  redirected  input or output. You'd be much better off han-\n"
-"              dling your unique problems in shell script. Please read the  ex-\n"
+"              quences  such as sending or receiving duplicate data. Do not use\n"
+"              with redirected input or output. You'd be much better  off  han-\n"
+"              dling  your unique problems in shell script. Please read the ex-\n"
 "              ample below.\n"
 , stdout);
  fputs(
 "\n"
-"              Warning:  For server compatibility curl attempts to retry failed\n"
-"              flaky transfers as close as possible to how they  were  started,\n"
-"              but  this  is  not possible with redirected input or output. For\n"
-"              example, before retrying it removes output data  from  a  failed\n"
-"              partial  transfer  that  was  written to an output file. However\n"
+"              Warning: For server compatibility curl attempts to retry  failed\n"
+"              flaky  transfers  as close as possible to how they were started,\n"
+"              but this is not possible with redirected input  or  output.  For\n"
+"              example,  before  retrying  it removes output data from a failed\n"
+"              partial transfer that was written to  an  output  file.  However\n"
 "              this is not true of data redirected to a | pipe or > file, which\n"
 , stdout);
  fputs(
-"              are  not reset. We strongly suggest don't parse or record output\n"
-"              via redirect in combination with this option, since you may  re-\n"
+"              are not reset. We strongly suggest don't parse or record  output\n"
+"              via  redirect in combination with this option, since you may re-\n"
 "              ceive duplicate data.\n"
 "\n"
+"              By default curl will not error on an HTTP response code that in-\n"
+"              dicates an HTTP error, if the transfer was successful. For exam-\n"
+"              ple, if a server replies 404 Not Found and the  reply  is  fully\n"
+, stdout);
+ fputs(
+"              received  then  that  is not an error. When --retry is used then\n"
+"              curl will retry on some HTTP response codes that indicate  tran-\n"
+"              sient  HTTP  errors, but that does not include most 4xx response\n"
+"              codes such as 404. If you want to retry on  all  response  codes\n"
+"              that  indicate  HTTP  errors (4xx and 5xx) then combine with -f,\n"
+"              --fail.\n"
+"\n"
 "              Added in 7.71.0.\n"
 "\n"
 "       --retry-connrefused\n"
-"              In  addition to the other conditions, consider ECONNREFUSED as a\n"
-"              transient error too for --retry. This option  is  used  together\n"
+, stdout);
+ fputs(
+"              In addition to the other conditions, consider ECONNREFUSED as  a\n"
+"              transient  error  too  for --retry. This option is used together\n"
 "              with --retry.\n"
 "\n"
 "              Added in 7.52.0.\n"
 "\n"
+"       --retry-delay <seconds>\n"
+"              Make curl sleep this amount of time before  each  retry  when  a\n"
+"              transfer  has  failed with a transient error (it changes the de-\n"
+"              fault backoff time algorithm between retries).  This  option  is\n"
 , stdout);
  fputs(
-"       --retry-delay <seconds>\n"
-"              Make  curl  sleep  this  amount of time before each retry when a\n"
-"              transfer has failed with a transient error (it changes  the  de-\n"
-"              fault  backoff  time  algorithm between retries). This option is\n"
-"              only interesting if --retry is also used. Setting this delay  to\n"
+"              only  interesting if --retry is also used. Setting this delay to\n"
 "              zero will make curl use the default backoff time.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.12.3.\n"
 "\n"
 "       --retry-max-time <seconds>\n"
-"              The  retry timer is reset before the first transfer attempt. Re-\n"
-"              tries will be done as usual (see --retry) as long as  the  timer\n"
-"              hasn't reached this given limit. Notice that if the timer hasn't\n"
-"              reached the limit, the request will be made and  while  perform-\n"
-"              ing,  it may take longer than this given time period. To limit a\n"
+"              The retry timer is reset before the first transfer attempt.  Re-\n"
+"              tries  will  be done as usual (see --retry) as long as the timer\n"
 , stdout);
  fputs(
+"              hasn't reached this given limit. Notice that if the timer hasn't\n"
+"              reached  the  limit, the request will be made and while perform-\n"
+"              ing, it may take longer than this given time period. To limit  a\n"
 "              single request's maximum time, use -m, --max-time.  Set this op-\n"
 "              tion to zero to not timeout retries.\n"
 "\n"
@@ -3304,43 +3411,44 @@
 "\n"
 "              Added in 7.12.3.\n"
 "\n"
-"       --retry <num>\n"
-"              If  a  transient  error is returned when curl tries to perform a\n"
-"              transfer, it will retry this number of times before  giving  up.\n"
 , stdout);
  fputs(
-"              Setting  the  number to 0 makes curl do no retries (which is the\n"
-"              default). Transient error means either: a timeout,  an  FTP  4xx\n"
-"              response code or an HTTP 408 or 5xx response code.\n"
+"       --retry <num>\n"
+"              If a transient error is returned when curl tries  to  perform  a\n"
+"              transfer,  it  will retry this number of times before giving up.\n"
+"              Setting the number to 0 makes curl do no retries (which  is  the\n"
+"              default).  Transient  error  means either: a timeout, an FTP 4xx\n"
+"              response code or an HTTP 408, 429, 500, 502, 503 or 504 response\n"
+"              code.\n"
 "\n"
+, stdout);
+ fputs(
 "              When  curl  is about to retry a transfer, it will first wait one\n"
 "              second and then for all forthcoming retries it will  double  the\n"
 "              waiting  time until it reaches 10 minutes which then will be the\n"
-, stdout);
- fputs(
 "              delay between the rest of the retries.  By  using  --retry-delay\n"
 "              you   disable  this  exponential  backoff  algorithm.  See  also\n"
 "              --retry-max-time to limit the total time allowed for retries.\n"
 "\n"
+, stdout);
+ fputs(
 "              Since curl 7.66.0, curl will comply with  the  Retry-After:  re-\n"
 "              sponse  header if one was present to know when to issue the next\n"
 "              retry.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.12.3.\n"
 "\n"
 "       --sasl-authzid <identity>\n"
 "              Use this authorisation identity (authzid), during SASL PLAIN au-\n"
 "              thentication,  in addition to the authentication identity (auth-\n"
+, stdout);
+ fputs(
 "              cid) as specified by -u, --user.\n"
 "\n"
 "              If the option isn't specified, the server will  derive  the  au-\n"
 "              thzid  from  the authcid, but if specified, and depending on the\n"
-, stdout);
- fputs(
 "              server implementation, it may be used to access  another  user's\n"
 "              inbox,  that  the  user  has been granted access to, or a shared\n"
 "              mailbox for example.\n"
@@ -3348,6 +3456,8 @@
 "              Added in 7.66.0.\n"
 "\n"
 "       --sasl-ir\n"
+, stdout);
+ fputs(
 "              Enable initial response in SASL authentication.\n"
 "\n"
 "              Added in 7.31.0.\n"
@@ -3355,8 +3465,6 @@
 "       --service-name <name>\n"
 "              This option allows you to change the service name for SPNEGO.\n"
 "\n"
-, stdout);
- fputs(
 "              Examples:   --negotiate   --service-name   sockd    would    use\n"
 "              sockd/server-name.\n"
 "\n"
@@ -3365,82 +3473,87 @@
 "              When used with -s, --silent, it makes curl show an error message\n"
 "              if it fails.\n"
 "\n"
+, stdout);
+ fputs(
 "              See also --no-progress-meter.\n"
 "\n"
 "       -s, --silent\n"
 "              Silent or quiet mode. Don't show progress meter  or  error  mes-\n"
 "              sages.   Makes  Curl mute. It will still output the data you ask\n"
-, stdout);
- fputs(
 "              for, potentially even to the terminal/stdout unless you redirect\n"
 "              it.\n"
 "\n"
 "              Use  -S,  --show-error  in  addition  to  this option to disable\n"
 "              progress meter but still show error messages.\n"
 "\n"
+, stdout);
+ fputs(
 "              See also -v, --verbose, --stderr and --no-progress-meter.\n"
 "\n"
 "       --socks4 <host[:port]>\n"
 "              Use the specified SOCKS4 proxy. If the port number is not speci-\n"
-"              fied, it is assumed at port 1080.\n"
+"              fied,  it  is  assumed at port 1080. Using this socket type make\n"
+"              curl resolve the host name and passing the  address  on  to  the\n"
+"              proxy.\n"
 "\n"
-, stdout);
- fputs(
 "              This  option  overrides any previous use of -x, --proxy, as they\n"
 "              are mutually exclusive.\n"
 "\n"
+, stdout);
+ fputs(
 "              Since 7.21.7, this option is superfluous since you can specify a\n"
 "              socks4 proxy with -x, --proxy using a socks4:// protocol prefix.\n"
 "              Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at\n"
 "              the same time -x, --proxy is used with an HTTP/HTTPS  proxy.  In\n"
-, stdout);
- fputs(
 "              such a case curl first connects to the SOCKS proxy and then con-\n"
 "              nects (through SOCKS) to the HTTP or HTTPS proxy.\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "              Added in 7.15.2.\n"
 "\n"
 "       --socks4a <host[:port]>\n"
 "              Use the specified SOCKS4a proxy. If the port number is not spec-\n"
-"              ified, it is assumed at port 1080.\n"
+"              ified,  it  is  assumed at port 1080. This asks the proxy to re-\n"
+"              solve the host name.\n"
 "\n"
-"              This  option  overrides any previous use of -x, --proxy, as they\n"
-, stdout);
- fputs(
+"              This option overrides any previous use of -x, --proxy,  as  they\n"
 "              are mutually exclusive.\n"
 "\n"
+, stdout);
+ fputs(
 "              Since 7.21.7, this option is superfluous since you can specify a\n"
-"              socks4a  proxy with -x, --proxy using a socks4a:// protocol pre-\n"
+"              socks4a proxy with -x, --proxy using a socks4a:// protocol  pre-\n"
 "              fix.\n"
 "\n"
 "              Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at\n"
-"              the  same  time -x, --proxy is used with an HTTP/HTTPS proxy. In\n"
+"              the same time -x, --proxy is used with an HTTP/HTTPS  proxy.  In\n"
 "              such a case curl first connects to the SOCKS proxy and then con-\n"
-, stdout);
- fputs(
 "              nects (through SOCKS) to the HTTP or HTTPS proxy.\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "              Added in 7.18.0.\n"
 "\n"
 "       --socks5-basic\n"
 "              Tells curl to use username/password authentication when connect-\n"
-"              ing to a SOCKS5 proxy.  The username/password authentication  is\n"
-"              enabled  by  default.   Use --socks5-gssapi to force GSS-API au-\n"
+"              ing  to a SOCKS5 proxy.  The username/password authentication is\n"
+"              enabled by default.  Use --socks5-gssapi to  force  GSS-API  au-\n"
 "              thentication to SOCKS5 proxies.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.55.0.\n"
 "\n"
 "       --socks5-gssapi-nec\n"
-"              As part of the GSS-API negotiation a protection mode is  negoti-\n"
-"              ated.  RFC  1961 says in section 4.3/4.4 it should be protected,\n"
-"              but the NEC  reference  implementation  does  not.   The  option\n"
-"              --socks5-gssapi-nec  allows the unprotected exchange of the pro-\n"
+, stdout);
+ fputs(
+"              As  part of the GSS-API negotiation a protection mode is negoti-\n"
+"              ated. RFC 1961 says in section 4.3/4.4 it should  be  protected,\n"
+"              but  the  NEC  reference  implementation  does  not.  The option\n"
+"              --socks5-gssapi-nec allows the unprotected exchange of the  pro-\n"
 "              tection mode negotiation.\n"
 "\n"
 "              Added in 7.19.4.\n"
@@ -3451,9 +3564,9 @@
 "              The default service name for a socks server is rcmd/server-fqdn.\n"
 "              This option allows you to change it.\n"
 "\n"
-"              Examples:   --socks5  proxy-name  --socks5-gssapi-service  sockd\n"
-"              would use sockd/proxy-name --socks5 proxy-name  --socks5-gssapi-\n"
-"              service  sockd/real-name  would  use  sockd/real-name  for cases\n"
+"              Examples:  --socks5  proxy-name  --socks5-gssapi-service   sockd\n"
+"              would  use sockd/proxy-name --socks5 proxy-name --socks5-gssapi-\n"
+"              service sockd/real-name  would  use  sockd/real-name  for  cases\n"
 "              where the proxy-name does not match the principal name.\n"
 "\n"
 "              Added in 7.19.4.\n"
@@ -3461,21 +3574,21 @@
 "       --socks5-gssapi\n"
 , stdout);
  fputs(
-"              Tells curl to use GSS-API authentication when  connecting  to  a\n"
-"              SOCKS5  proxy.  The GSS-API authentication is enabled by default\n"
-"              (if curl is compiled with GSS-API support).  Use  --socks5-basic\n"
+"              Tells  curl  to  use GSS-API authentication when connecting to a\n"
+"              SOCKS5 proxy.  The GSS-API authentication is enabled by  default\n"
+"              (if  curl is compiled with GSS-API support).  Use --socks5-basic\n"
 "              to force username/password authentication to SOCKS5 proxies.\n"
 "\n"
 "              Added in 7.55.0.\n"
 "\n"
 "       --socks5-hostname <host[:port]>\n"
-"              Use  the  specified  SOCKS5 proxy (and let the proxy resolve the\n"
+"              Use the specified SOCKS5 proxy (and let the  proxy  resolve  the\n"
 , stdout);
  fputs(
-"              host name). If the port number is not specified, it  is  assumed\n"
+"              host  name).  If the port number is not specified, it is assumed\n"
 "              at port 1080.\n"
 "\n"
-"              This  option  overrides any previous use of -x, --proxy, as they\n"
+"              This option overrides any previous use of -x, --proxy,  as  they\n"
 "              are mutually exclusive.\n"
 "\n"
 "              Since 7.21.7, this option is superfluous since you can specify a\n"
@@ -3485,7 +3598,7 @@
 "              Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at\n"
 , stdout);
  fputs(
-"              the  same  time -x, --proxy is used with an HTTP/HTTPS proxy. In\n"
+"              the same time -x, --proxy is used with an HTTP/HTTPS  proxy.  In\n"
 "              such a case curl first connects to the SOCKS proxy and then con-\n"
 "              nects (through SOCKS) to the HTTP or HTTPS proxy.\n"
 "\n"
@@ -3494,13 +3607,13 @@
 "              Added in 7.18.0.\n"
 "\n"
 "       --socks5 <host[:port]>\n"
-"              Use  the  specified SOCKS5 proxy - but resolve the host name lo-\n"
+"              Use the specified SOCKS5 proxy - but resolve the host  name  lo-\n"
 , stdout);
  fputs(
-"              cally. If the port number is not specified,  it  is  assumed  at\n"
+"              cally.  If  the  port  number is not specified, it is assumed at\n"
 "              port 1080.\n"
 "\n"
-"              This  option  overrides any previous use of -x, --proxy, as they\n"
+"              This option overrides any previous use of -x, --proxy,  as  they\n"
 "              are mutually exclusive.\n"
 "\n"
 "              Since 7.21.7, this option is superfluous since you can specify a\n"
@@ -3508,12 +3621,12 @@
 "              Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at\n"
 , stdout);
  fputs(
-"              the same time -x, --proxy is used with an HTTP/HTTPS  proxy.  In\n"
+"              the  same  time -x, --proxy is used with an HTTP/HTTPS proxy. In\n"
 "              such a case curl first connects to the SOCKS proxy and then con-\n"
 "              nects (through SOCKS) to the HTTP or HTTPS proxy.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
-"              This option (as well as --socks4) does not work with IPV6,  FTPS\n"
+"              This  option (as well as --socks4) does not work with IPV6, FTPS\n"
 "              or LDAP.\n"
 "\n"
 "              Added in 7.18.0.\n"
@@ -3522,7 +3635,7 @@
 , stdout);
  fputs(
 "              If a download is slower than this given speed (in bytes per sec-\n"
-"              ond) for speed-time seconds it gets aborted. speed-time  is  set\n"
+"              ond)  for  speed-time seconds it gets aborted. speed-time is set\n"
 "              with -y, --speed-time and is 30 if not set.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -3532,11 +3645,11 @@
 "              a speed-time period, the download gets aborted. If speed-time is\n"
 , stdout);
  fputs(
-"              used,  the  default  speed-limit  will  be 1 unless set with -Y,\n"
+"              used, the default speed-limit will be  1  unless  set  with  -Y,\n"
 "              --speed-limit.\n"
 "\n"
-"              This option controls transfers and thus  will  not  affect  slow\n"
-"              connects  etc.  If this is a concern for you, try the --connect-\n"
+"              This  option  controls  transfers  and thus will not affect slow\n"
+"              connects etc. If this is a concern for you, try  the  --connect-\n"
 "              timeout option.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -3545,18 +3658,31 @@
 "              This option tells curl to not work around a security flaw in the\n"
 , stdout);
  fputs(
-"              SSL3  and TLS1.0 protocols known as BEAST.  If this option isn't\n"
-"              used, the SSL layer may use workarounds known to cause  interop-\n"
+"              SSL3 and TLS1.0 protocols known as BEAST.  If this option  isn't\n"
+"              used,  the SSL layer may use workarounds known to cause interop-\n"
 "              erability problems with some older SSL implementations. WARNING:\n"
 "              this option loosens the SSL security, and by using this flag you\n"
 "              ask for exactly that.\n"
 "\n"
 "              Added in 7.25.0.\n"
 "\n"
-"       --ssl-no-revoke\n"
-"              (Schannel) This option tells curl to disable certificate revoca-\n"
+"       --ssl-auto-client-cert\n"
+"              Tell libcurl to automatically locate and use a  client  certifi-\n"
 , stdout);
  fputs(
+"              cate  for authentication, when requested by the server. This op-\n"
+"              tion is only supported for Schannel (the native Windows SSL  li-\n"
+"              brary). Prior to 7.77.0 this was the default behavior in libcurl\n"
+"              with Schannel. Since the server can request any certificate that\n"
+"              supports  client  authentication  in the OS certificate store it\n"
+"              could be a privacy violation and unexpected.\n"
+"\n"
+, stdout);
+ fputs(
+"              See also --proxy-ssl-auto-client-cert. Added in 7.77.0.\n"
+"\n"
+"       --ssl-no-revoke\n"
+"              (Schannel) This option tells curl to disable certificate revoca-\n"
 "              tion checks.  WARNING: this option loosens the SSL security, and\n"
 "              by using this flag you ask for exactly that.\n"
 "\n"
@@ -3564,6 +3690,8 @@
 "\n"
 "       --ssl-reqd\n"
 "              (FTP IMAP POP3 SMTP) Require SSL/TLS for the connection.  Termi-\n"
+, stdout);
+ fputs(
 "              nates the connection if the server doesn't support SSL/TLS.\n"
 "\n"
 "              This option was formerly known as --ftp-ssl-reqd.\n"
@@ -3571,99 +3699,97 @@
 "              Added in 7.20.0.\n"
 "\n"
 "       --ssl-revoke-best-effort\n"
-, stdout);
- fputs(
-"              (Schannel) This option tells curl to ignore certificate  revoca-\n"
+"              (Schannel)  This option tells curl to ignore certificate revoca-\n"
 "              tion checks when they failed due to missing/offline distribution\n"
 "              points for the revocation check lists.\n"
 "\n"
 "              Added in 7.70.0.\n"
 "\n"
-"       --ssl  (FTP IMAP POP3 SMTP) Try to use SSL/TLS for the connection.  Re-\n"
-"              verts  to  a non-secure connection if the server doesn't support\n"
-"              SSL/TLS.  See also --ftp-ssl-control and --ssl-reqd for  differ-\n"
 , stdout);
  fputs(
+"       --ssl  (FTP IMAP POP3 SMTP) Try to use SSL/TLS for the connection.  Re-\n"
+"              verts to a non-secure connection if the server  doesn't  support\n"
+"              SSL/TLS.   See also --ftp-ssl-control and --ssl-reqd for differ-\n"
 "              ent levels of encryption required.\n"
 "\n"
-"              This  option  was formerly known as --ftp-ssl (Added in 7.11.0).\n"
-"              That option name can still be used but will be removed in a  fu-\n"
+"              This option was formerly known as --ftp-ssl (Added  in  7.11.0).\n"
+"              That  option name can still be used but will be removed in a fu-\n"
 "              ture version.\n"
 "\n"
+, stdout);
+ fputs(
 "              Added in 7.20.0.\n"
 "\n"
 "       -2, --sslv2\n"
-"              (SSL)  Forces  curl to use SSL version 2 when negotiating with a\n"
-"              remote SSL server. Sometimes curl is built  without  SSLv2  sup-\n"
-, stdout);
- fputs(
-"              port. SSLv2 is widely considered insecure (see RFC 6176).\n"
+"              (SSL) This option previously asked curl to use SSLv2, but start-\n"
+"              ing  in curl 7.77.0 this instruction is ignored. SSLv2 is widely\n"
+"              considered insecure (see RFC 6176).\n"
 "\n"
-"              See  also  --http1.1  and --http2. -2, --sslv2 requires that the\n"
-"              underlying libcurl was built to support TLS. This  option  over-\n"
+"              See also --http1.1 and --http2. -2, --sslv2  requires  that  the\n"
+"              underlying  libcurl  was built to support TLS. This option over-\n"
 "              rides -3, --sslv3 and -1, --tlsv1 and --tlsv1.1 and --tlsv1.2.\n"
 "\n"
-"       -3, --sslv3\n"
-"              (SSL)  Forces  curl to use SSL version 3 when negotiating with a\n"
-"              remote SSL server. Sometimes curl is built  without  SSLv3  sup-\n"
 , stdout);
  fputs(
-"              port. SSLv3 is widely considered insecure (see RFC 7568).\n"
+"       -3, --sslv3\n"
+"              (SSL) This option previously asked curl to use SSLv3, but start-\n"
+"              ing  in curl 7.77.0 this instruction is ignored. SSLv3 is widely\n"
+"              considered insecure (see RFC 7568).\n"
 "\n"
-"              See  also  --http1.1  and --http2. -3, --sslv3 requires that the\n"
-"              underlying libcurl was built to support TLS. This  option  over-\n"
+"              See also --http1.1 and --http2. -3, --sslv3  requires  that  the\n"
+"              underlying  libcurl  was built to support TLS. This option over-\n"
 "              rides -2, --sslv2 and -1, --tlsv1 and --tlsv1.1 and --tlsv1.2.\n"
 "\n"
-"       --stderr\n"
-"              Redirect  all writes to stderr to the specified file instead. If\n"
-"              the file name is a plain '-', it is instead written to stdout.\n"
-"\n"
+"       --stderr <file>\n"
 , stdout);
  fputs(
+"              Redirect all writes to stderr to the specified file instead.  If\n"
+"              the file name is a plain '-', it is instead written to stdout.\n"
+"\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "              See also -v, --verbose and -s, --silent.\n"
 "\n"
 "       --styled-output\n"
-"              Enables the automatic use of bold font styles when writing  HTTP\n"
-"              headers  to  the terminal. Use --no-styled-output to switch them\n"
+"              Enables  the automatic use of bold font styles when writing HTTP\n"
+"              headers to the terminal. Use --no-styled-output to  switch  them\n"
 "              off.\n"
 "\n"
+, stdout);
+ fputs(
 "              Added in 7.61.0.\n"
 "\n"
 "       --suppress-connect-headers\n"
-"              When -p, --proxytunnel is used and a  CONNECT  request  is  made\n"
-, stdout);
- fputs(
-"              don't  output  proxy  CONNECT  response  headers. This option is\n"
-"              meant to be used with -D, --dump-header or -i,  --include  which\n"
-"              are  used  to show protocol headers in the output. It has no ef-\n"
-"              fect on debug options such as -v, --verbose or --trace,  or  any\n"
+"              When  -p,  --proxytunnel  is  used and a CONNECT request is made\n"
+"              don't output proxy CONNECT  response  headers.  This  option  is\n"
+"              meant  to  be used with -D, --dump-header or -i, --include which\n"
+"              are used to show protocol headers in the output. It has  no  ef-\n"
+"              fect  on  debug options such as -v, --verbose or --trace, or any\n"
 "              statistics.\n"
 "\n"
+, stdout);
+ fputs(
 "              See also -D, --dump-header, -i, --include and -p, --proxytunnel.\n"
 "\n"
 "       --tcp-fastopen\n"
 "              Enable use of TCP Fast Open (RFC7413).\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.49.0.\n"
 "\n"
 "       --tcp-nodelay\n"
-"              Turn  on the TCP_NODELAY option. See the curl_easy_setopt(3) man\n"
+"              Turn on the TCP_NODELAY option. See the curl_easy_setopt(3)  man\n"
 "              page for details about this option.\n"
 "\n"
-"              Since 7.50.2, curl sets this option by default and you  need  to\n"
+"              Since  7.50.2,  curl sets this option by default and you need to\n"
 "              explicitly switch it off if you don't want it on.\n"
 "\n"
+, stdout);
+ fputs(
 "              Added in 7.11.2.\n"
 "\n"
 "       -t, --telnet-option <opt=val>\n"
 "              Pass options to the telnet protocol. Supported options are:\n"
 "\n"
-, stdout);
- fputs(
 "              TTYPE=<term> Sets the terminal type.\n"
 "\n"
 "              XDISPLOC=<X display> Sets the X display location.\n"
@@ -3672,11 +3798,11 @@
 "\n"
 "       --tftp-blksize <value>\n"
 "              (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block\n"
+, stdout);
+ fputs(
 "              size that curl will try to use when transferring data to or from\n"
 "              a TFTP server. By default 512 bytes will be used.\n"
 "\n"
-, stdout);
- fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "              Added in 7.20.0.\n"
@@ -3684,42 +3810,44 @@
 "       --tftp-no-options\n"
 "              (TFTP) Tells curl not to send TFTP options requests.\n"
 "\n"
-"              This  option  improves  interop with some legacy servers that do\n"
-"              not acknowledge or properly implement TFTP  options.  When  this\n"
+"              This option improves interop with some legacy  servers  that  do\n"
+, stdout);
+ fputs(
+"              not  acknowledge  or  properly implement TFTP options. When this\n"
 "              option is used --tftp-blksize is ignored.\n"
 "\n"
 "              Added in 7.48.0.\n"
 "\n"
 "       -z, --time-cond <time>\n"
+"              (HTTP FTP) Request a file that has been modified later than  the\n"
+"              given  time  and date, or one that has been modified before that\n"
+"              time. The <date expression> can be all sorts of date strings  or\n"
 , stdout);
  fputs(
-"              (HTTP  FTP) Request a file that has been modified later than the\n"
-"              given time and date, or one that has been modified  before  that\n"
-"              time.  The <date expression> can be all sorts of date strings or\n"
 "              if it doesn't match any internal ones, it is taken as a filename\n"
-"              and  tries  to get the modification date (mtime) from <file> in-\n"
+"              and tries to get the modification date (mtime) from  <file>  in-\n"
 "              stead. See the curl_getdate(3) man pages for date expression de-\n"
 "              tails.\n"
 "\n"
-, stdout);
- fputs(
 "              Start the date expression with a dash (-) to make it request for\n"
-"              a document that is older than the given date/time, default is  a\n"
+"              a  document that is older than the given date/time, default is a\n"
 "              document that is newer than the specified date/time.\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --tls-max <VERSION>\n"
 "              (SSL) VERSION defines maximum supported TLS version. The minimum\n"
-"              acceptable version  is  set  by  tlsv1.0,  tlsv1.1,  tlsv1.2  or\n"
-, stdout);
- fputs(
+"              acceptable  version  is  set  by  tlsv1.0,  tlsv1.1,  tlsv1.2 or\n"
 "              tlsv1.3.\n"
 "\n"
-"              If  the  connection  is done without TLS, this option has no ef-\n"
+"              If the connection is done without TLS, this option  has  no  ef-\n"
 "              fect. This includes QUIC-using (HTTP/3) transfers.\n"
 "\n"
 "              default\n"
+, stdout);
+ fputs(
 "                     Use up to recommended TLS version.\n"
 "\n"
 "              1.0    Use up to TLSv1.0.\n"
@@ -3727,105 +3855,105 @@
 "              1.2    Use up to TLSv1.2.\n"
 "              1.3    Use up to TLSv1.3.\n"
 "\n"
-"       See also --tlsv1.0, --tlsv1.1, --tlsv1.2 and --tlsv1.3.  --tls-max  re-\n"
-, stdout);
- fputs(
-"       quires  that  the underlying libcurl was built to support TLS. Added in\n"
+"       See  also  --tlsv1.0, --tlsv1.1, --tlsv1.2 and --tlsv1.3. --tls-max re-\n"
+"       quires that the underlying libcurl was built to support TLS.  Added  in\n"
 "       7.54.0.\n"
 "\n"
 "       --tls13-ciphers <ciphersuite list>\n"
-"              (TLS) Specifies which cipher suites to use in the connection  if\n"
-"              it  negotiates  TLS 1.3. The list of ciphers suites must specify\n"
-"              valid ciphers. Read up on TLS 1.3 cipher suite details  on  this\n"
-"              URL:\n"
-"\n"
-"               https://curl.haxx.se/docs/ssl-ciphers.html\n"
-"\n"
 , stdout);
  fputs(
-"              This  option  is  currently  used only when curl is built to use\n"
+"              (TLS)  Specifies which cipher suites to use in the connection if\n"
+"              it negotiates TLS 1.3. The list of ciphers suites  must  specify\n"
+"              valid  ciphers.  Read up on TLS 1.3 cipher suite details on this\n"
+"              URL:\n"
+"\n"
+"               https://curl.se/docs/ssl-ciphers.html\n"
+"\n"
+"              This option is currently used only when curl  is  built  to  use\n"
 "              OpenSSL 1.1.1 or later. If you are using a different SSL backend\n"
+, stdout);
+ fputs(
 "              you can try setting TLS 1.3 cipher suites by using the --ciphers\n"
 "              option.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --tlsauthtype <type>\n"
-"              Set TLS authentication type. Currently, the only  supported  op-\n"
+"              Set  TLS  authentication type. Currently, the only supported op-\n"
+"              tion  is  \"SRP\",  for  TLS-SRP  (RFC  5054).  If  --tlsuser  and\n"
+"              --tlspassword  are specified but --tlsauthtype is not, then this\n"
 , stdout);
  fputs(
-"              tion  is  \"SRP\",  for  TLS-SRP  (RFC  5054).  If  --tlsuser  and\n"
-"              --tlspassword are specified but --tlsauthtype is not, then  this\n"
-"              option  defaults to \"SRP\".  This option works only if the under-\n"
-"              lying libcurl is built  with  TLS-SRP  support,  which  requires\n"
+"              option defaults to \"SRP\".  This option works only if the  under-\n"
+"              lying  libcurl  is  built  with  TLS-SRP support, which requires\n"
 "              OpenSSL or GnuTLS with TLS-SRP support.\n"
 "\n"
 "              Added in 7.21.4.\n"
 "\n"
-"       --tlspassword\n"
-, stdout);
- fputs(
-"              Set  password  for use with the TLS authentication method speci-\n"
+"       --tlspassword <string>\n"
+"              Set password for use with the TLS authentication  method  speci-\n"
 "              fied with --tlsauthtype. Requires that --tlsuser also be set.\n"
 "\n"
 "              This doesn't work with TLS 1.3.\n"
 "\n"
+, stdout);
+ fputs(
 "              Added in 7.21.4.\n"
 "       --tlsuser <name>\n"
-"              Set username for use with the TLS authentication  method  speci-\n"
-"              fied  with  --tlsauthtype.  Requires  that --tlspassword also is\n"
+"              Set  username  for use with the TLS authentication method speci-\n"
+"              fied with --tlsauthtype. Requires  that  --tlspassword  also  is\n"
 "              set.\n"
 "\n"
 "              This doesn't work with TLS 1.3.\n"
 "\n"
-, stdout);
- fputs(
 "              Added in 7.21.4.\n"
 "\n"
 "       --tlsv1.0\n"
-"              (TLS) Forces curl to use TLS version 1.0 or later when  connect-\n"
+"              (TLS)  Forces curl to use TLS version 1.0 or later when connect-\n"
 "              ing to a remote TLS server.\n"
 "\n"
-"              In  old  versions  of  curl  this option was documented to allow\n"
-"              _only_ TLS 1.0, but behavior was inconsistent depending  on  the\n"
+, stdout);
+ fputs(
+"              In old versions of curl this  option  was  documented  to  allow\n"
+"              _only_  TLS  1.0, but behavior was inconsistent depending on the\n"
 "              TLS library. Use --tls-max if you want to set a maximum TLS ver-\n"
 "              sion.\n"
 "\n"
 "              Added in 7.34.0.\n"
 "\n"
 "       --tlsv1.1\n"
-, stdout);
- fputs(
-"              (TLS) Forces curl to use TLS version 1.1 or later when  connect-\n"
+"              (TLS)  Forces curl to use TLS version 1.1 or later when connect-\n"
 "              ing to a remote TLS server.\n"
 "\n"
-"              In  old  versions  of  curl  this option was documented to allow\n"
-"              _only_ TLS 1.1, but behavior was inconsistent depending  on  the\n"
+, stdout);
+ fputs(
+"              In old versions of curl this  option  was  documented  to  allow\n"
+"              _only_  TLS  1.1, but behavior was inconsistent depending on the\n"
 "              TLS library. Use --tls-max if you want to set a maximum TLS ver-\n"
 "              sion.\n"
 "\n"
 "              Added in 7.34.0.\n"
 "\n"
 "       --tlsv1.2\n"
-, stdout);
- fputs(
-"              (TLS) Forces curl to use TLS version 1.2 or later when  connect-\n"
+"              (TLS)  Forces curl to use TLS version 1.2 or later when connect-\n"
 "              ing to a remote TLS server.\n"
 "\n"
-"              In  old  versions  of  curl  this option was documented to allow\n"
-"              _only_ TLS 1.2, but behavior was inconsistent depending  on  the\n"
+, stdout);
+ fputs(
+"              In old versions of curl this  option  was  documented  to  allow\n"
+"              _only_  TLS  1.2, but behavior was inconsistent depending on the\n"
 "              TLS library. Use --tls-max if you want to set a maximum TLS ver-\n"
 "              sion.\n"
 "\n"
 "              Added in 7.34.0.\n"
 "\n"
 "       --tlsv1.3\n"
-, stdout);
- fputs(
-"              (TLS) Forces curl to use TLS version 1.3 or later when  connect-\n"
+"              (TLS)  Forces curl to use TLS version 1.3 or later when connect-\n"
 "              ing to a remote TLS server.\n"
 "\n"
-"              If  the  connection  is done without TLS, this option has no ef-\n"
+, stdout);
+ fputs(
+"              If the connection is done without TLS, this option  has  no  ef-\n"
 "              fect. This includes QUIC-using (HTTP/3) transfers.\n"
 "\n"
 "              Note that TLS 1.3 is not supported by all TLS backends.\n"
@@ -3833,52 +3961,52 @@
 "              Added in 7.52.0.\n"
 "\n"
 "       -1, --tlsv1\n"
-"              (SSL) Tells curl to use at least TLS version 1.x when  negotiat-\n"
-, stdout);
- fputs(
-"              ing  with  a  remote  TLS  server. That means TLS version 1.0 or\n"
+"              (SSL)  Tells curl to use at least TLS version 1.x when negotiat-\n"
+"              ing with a remote TLS server. That  means  TLS  version  1.0  or\n"
 "              higher\n"
 "\n"
-"              See also --http1.1 and --http2. -1, --tlsv1  requires  that  the\n"
-"              underlying  libcurl  was built to support TLS. This option over-\n"
+, stdout);
+ fputs(
+"              See  also  --http1.1  and --http2. -1, --tlsv1 requires that the\n"
+"              underlying libcurl was built to support TLS. This  option  over-\n"
 "              rides --tlsv1.1 and --tlsv1.2 and --tlsv1.3.\n"
 "\n"
 "       --tr-encoding\n"
 "              (HTTP) Request a compressed Transfer-Encoding response using one\n"
-"              of  the  algorithms curl supports, and uncompress the data while\n"
-, stdout);
- fputs(
+"              of the algorithms curl supports, and uncompress the  data  while\n"
 "              receiving it.\n"
 "\n"
 "              Added in 7.21.6.\n"
 "\n"
 "       --trace-ascii <file>\n"
+, stdout);
+ fputs(
 "              Enables a full trace dump of all incoming and outgoing data, in-\n"
-"              cluding  descriptive  information, to the given output file. Use\n"
+"              cluding descriptive information, to the given output  file.  Use\n"
 "              \"-\" as filename to have the output sent to stdout.\n"
 "\n"
 "              This is very similar to --trace, but leaves out the hex part and\n"
-"              only  shows  the ASCII part of the dump. It makes smaller output\n"
-, stdout);
- fputs(
+"              only shows the ASCII part of the dump. It makes  smaller  output\n"
 "              that might be easier to read for untrained humans.\n"
 "\n"
+, stdout);
+ fputs(
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "              This option overrides --trace and -v, --verbose.\n"
 "\n"
 "       --trace-time\n"
-"              Prepends a time stamp to each trace or verbose  line  that  curl\n"
+"              Prepends  a  time  stamp to each trace or verbose line that curl\n"
 "              displays.\n"
 "\n"
 "              Added in 7.14.0.\n"
 "\n"
 "       --trace <file>\n"
 "              Enables a full trace dump of all incoming and outgoing data, in-\n"
+"              cluding  descriptive  information, to the given output file. Use\n"
 , stdout);
  fputs(
-"              cluding descriptive information, to the given output  file.  Use\n"
-"              \"-\"  as  filename  to have the output sent to stdout. Use \"%\" as\n"
+"              \"-\" as filename to have the output sent to stdout.  Use  \"%\"  as\n"
 "              filename to have the output sent to stderr.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -3887,37 +4015,37 @@
 "\n"
 "       --unix-socket <path>\n"
 "              (HTTP) Connect through this Unix domain socket, instead of using\n"
-, stdout);
- fputs(
 "              the network.\n"
 "\n"
 "              Added in 7.40.0.\n"
 "\n"
 "       -T, --upload-file <file>\n"
-"              This  transfers  the  specified local file to the remote URL. If\n"
-"              there is no file part in the specified URL, curl will append the\n"
-"              local file name. NOTE that you must use a trailing / on the last\n"
-"              directory to really prove to Curl that there is no file name  or\n"
-"              curl will think that your last directory name is the remote file\n"
 , stdout);
  fputs(
+"              This transfers the specified local file to the  remote  URL.  If\n"
+"              there is no file part in the specified URL, curl will append the\n"
+"              local file name. NOTE that you must use a trailing / on the last\n"
+"              directory  to really prove to Curl that there is no file name or\n"
+"              curl will think that your last directory name is the remote file\n"
 "              name to use. That will most likely cause the upload operation to\n"
+, stdout);
+ fputs(
 "              fail. If this is used on an HTTP(S) server, the PUT command will\n"
 "              be used.\n"
 "\n"
-"              Use the file name \"-\" (a single dash) to use stdin instead of  a\n"
-"              given  file.   Alternately,  the file name \".\" (a single period)\n"
-"              may be specified instead of \"-\" to  use  stdin  in  non-blocking\n"
-"              mode  to  allow  reading  server output while stdin is being up-\n"
-, stdout);
- fputs(
+"              Use  the file name \"-\" (a single dash) to use stdin instead of a\n"
+"              given file.  Alternately, the file name \".\"  (a  single  period)\n"
+"              may  be  specified  instead  of \"-\" to use stdin in non-blocking\n"
+"              mode to allow reading server output while  stdin  is  being  up-\n"
 "              loaded.\n"
 "\n"
-"              You can specify one -T, --upload-file for each URL on  the  com-\n"
-"              mand  line.  Each -T, --upload-file + URL pair specifies what to\n"
-"              upload and to where. curl also supports \"globbing\"  of  the  -T,\n"
-"              --upload-file  argument,  meaning  that  you can upload multiple\n"
-"              files to a single URL by using the same URL globbing style  sup-\n"
+, stdout);
+ fputs(
+"              You  can  specify one -T, --upload-file for each URL on the com-\n"
+"              mand line. Each -T, --upload-file + URL pair specifies  what  to\n"
+"              upload  and  to  where. curl also supports \"globbing\" of the -T,\n"
+"              --upload-file argument, meaning that  you  can  upload  multiple\n"
+"              files  to a single URL by using the same URL globbing style sup-\n"
 "              ported in the URL, like this:\n"
 "\n"
 , stdout);
@@ -3928,50 +4056,50 @@
 "\n"
 "               curl -T \"img[1-1000].png\" ftp://ftp.example.com/upload/\n"
 "\n"
-"              When  uploading  to an SMTP server: the uploaded data is assumed\n"
+"              When uploading to an SMTP server: the uploaded data  is  assumed\n"
 "              to be RFC 5322 formatted. It has to feature the necessary set of\n"
-"              headers  and  mail  body formatted correctly by the user as curl\n"
+"              headers and mail body formatted correctly by the  user  as  curl\n"
 "              will not transcode nor encode it further in any way.\n"
 "\n"
 "       --url <url>\n"
 , stdout);
  fputs(
-"              Specify a URL to fetch. This option is  mostly  handy  when  you\n"
+"              Specify  a  URL  to  fetch. This option is mostly handy when you\n"
 "              want to specify URL(s) in a config file.\n"
 "\n"
-"              If  the given URL is missing a scheme name (such as \"http://\" or\n"
-"              \"ftp://\" etc) then curl will make a guess based on the host.  If\n"
-"              the  outermost  sub-domain  name  matches DICT, FTP, IMAP, LDAP,\n"
-"              POP3 or SMTP then that protocol will  be  used,  otherwise  HTTP\n"
+"              If the given URL is missing a scheme name (such as \"http://\"  or\n"
+"              \"ftp://\"  etc) then curl will make a guess based on the host. If\n"
+"              the outermost sub-domain name matches  DICT,  FTP,  IMAP,  LDAP,\n"
+"              POP3  or  SMTP  then  that protocol will be used, otherwise HTTP\n"
 , stdout);
  fputs(
 "              will be used. Since 7.45.0 guessing can be disabled by setting a\n"
 "              default protocol, see --proto-default for details.\n"
 "\n"
-"              This option may be used any number of times.  To  control  where\n"
-"              this  URL  is written, use the -o, --output or the -O, --remote-\n"
+"              This  option  may  be used any number of times. To control where\n"
+"              this URL is written, use the -o, --output or the  -O,  --remote-\n"
 "              name options.\n"
 "\n"
-"              Warning: On Windows, particular file://  accesses  can  be  con-\n"
+"              Warning:  On  Windows,  particular  file:// accesses can be con-\n"
 "              verted to network accesses by the operating system. Beware!\n"
 "\n"
 , stdout);
  fputs(
 "       -B, --use-ascii\n"
-"              (FTP  LDAP) Enable ASCII transfer. For FTP, this can also be en-\n"
-"              forced by using a URL that  ends  with  \";type=A\".  This  option\n"
+"              (FTP LDAP) Enable ASCII transfer. For FTP, this can also be  en-\n"
+"              forced  by  using  a  URL  that ends with \";type=A\". This option\n"
 "              causes data sent to stdout to be in text mode for win32 systems.\n"
 "\n"
 "       -A, --user-agent <name>\n"
 "              (HTTP) Specify the User-Agent string to send to the HTTP server.\n"
-"              To encode blanks in the string, surround the string with  single\n"
+"              To  encode blanks in the string, surround the string with single\n"
 , stdout);
  fputs(
-"              quote  marks.  This header can also be set with the -H, --header\n"
+"              quote marks. This header can also be set with the  -H,  --header\n"
 "              or the --proxy-header options.\n"
 "\n"
-"              If you give an empty argument to -A, --user-agent (\"\"), it  will\n"
-"              remove  the  header completely from the request. If you prefer a\n"
+"              If  you give an empty argument to -A, --user-agent (\"\"), it will\n"
+"              remove the header completely from the request. If you  prefer  a\n"
 "              blank header, you can set it to a single space (\" \").\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
@@ -3982,41 +4110,41 @@
 "              Specify the user name and password to use for server authentica-\n"
 "              tion. Overrides -n, --netrc and --netrc-optional.\n"
 "\n"
-"              If  you  simply  specify  the  user name, curl will prompt for a\n"
+"              If you simply specify the user name,  curl  will  prompt  for  a\n"
 "              password.\n"
 "\n"
-"              The user name and passwords are split up  on  the  first  colon,\n"
-"              which  makes  it impossible to use a colon in the user name with\n"
+"              The  user  name  and  passwords are split up on the first colon,\n"
+"              which makes it impossible to use a colon in the user  name  with\n"
 "              this option. The password can, still.\n"
 "\n"
 , stdout);
  fputs(
 "              On systems where it works, curl will hide the given option argu-\n"
-"              ment  from  process listings. This is not enough to protect cre-\n"
-"              dentials from possibly getting seen by other users on  the  same\n"
-"              system  as  they will still be visible for a brief moment before\n"
+"              ment from process listings. This is not enough to  protect  cre-\n"
+"              dentials  from  possibly getting seen by other users on the same\n"
+"              system as they will still be visible for a brief  moment  before\n"
 "              cleared. Such sensitive data should be retrieved from a file in-\n"
 "              stead or similar and never used in clear text in a command line.\n"
 , stdout);
  fputs(
-"              When  using  Kerberos  V5 with a Windows based server you should\n"
-"              include the Windows domain name in the user name, in  order  for\n"
-"              the  server  to  successfully  obtain  a Kerberos Ticket. If you\n"
+"              When using Kerberos V5 with a Windows based  server  you  should\n"
+"              include  the  Windows domain name in the user name, in order for\n"
+"              the server to successfully obtain  a  Kerberos  Ticket.  If  you\n"
 "              don't then the initial authentication handshake may fail.\n"
 "\n"
-"              When using NTLM, the user name can be specified  simply  as  the\n"
-"              user  name,  without the domain, if there is a single domain and\n"
+"              When  using  NTLM,  the user name can be specified simply as the\n"
+"              user name, without the domain, if there is a single  domain  and\n"
 , stdout);
  fputs(
 "              forest in your setup for example.\n"
 "\n"
-"              To specify the domain name use either Down-Level Logon  Name  or\n"
+"              To  specify  the domain name use either Down-Level Logon Name or\n"
 "              UPN (User Principal Name) formats. For example, EXAMPLE\\user and\n"
 "              user@example.com respectively.\n"
 "\n"
-"              If you use a Windows SSPI-enabled curl binary and  perform  Ker-\n"
-"              beros  V5, Negotiate, NTLM or Digest authentication then you can\n"
-"              tell curl to select the user name and password from  your  envi-\n"
+"              If  you  use a Windows SSPI-enabled curl binary and perform Ker-\n"
+"              beros V5, Negotiate, NTLM or Digest authentication then you  can\n"
+"              tell  curl  to select the user name and password from your envi-\n"
 , stdout);
  fputs(
 "              ronment by specifying a single colon with this option: \"-u :\".\n"
@@ -4024,10 +4152,10 @@
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       -v, --verbose\n"
-"              Makes  curl  verbose  during the operation. Useful for debugging\n"
-"              and seeing what's going on \"under the  hood\".  A  line  starting\n"
-"              with  '>'  means  \"header  data\" sent by curl, '<' means \"header\n"
-"              data\" received by curl that is hidden in  normal  cases,  and  a\n"
+"              Makes curl verbose during the operation.  Useful  for  debugging\n"
+"              and  seeing  what's  going  on \"under the hood\". A line starting\n"
+"              with '>' means \"header data\" sent by  curl,  '<'  means  \"header\n"
+"              data\"  received  by  curl  that is hidden in normal cases, and a\n"
 , stdout);
  fputs(
 "              line starting with '*' means additional info provided by curl.\n"
@@ -4035,22 +4163,22 @@
 "              If you only want HTTP headers in the output, -i, --include might\n"
 "              be the option you're looking for.\n"
 "\n"
-"              If you think this option still doesn't give you enough  details,\n"
+"              If  you think this option still doesn't give you enough details,\n"
 "              consider using --trace or --trace-ascii instead.\n"
 "\n"
 "              Use -s, --silent to make curl really quiet.\n"
 "\n"
-"              See  also  -i,  --include.  This  option  overrides  --trace and\n"
+"              See also  -i,  --include.  This  option  overrides  --trace  and\n"
 , stdout);
  fputs(
 "              --trace-ascii.\n"
 "\n"
 "       -V, --version\n"
 "              Displays information about curl and the libcurl version it uses.\n"
-"              The first line includes the full version of  curl,  libcurl  and\n"
+"              The  first  line  includes the full version of curl, libcurl and\n"
 "              other 3rd party libraries linked with the executable.\n"
 "\n"
-"              The  second  line (starts with \"Protocols:\") shows all protocols\n"
+"              The second line (starts with \"Protocols:\") shows  all  protocols\n"
 "              that libcurl reports to support.\n"
 "\n"
 "              The third line (starts with \"Features:\") shows specific features\n"
@@ -4062,8 +4190,8 @@
 "                     Support for the Alt-Svc: header is provided.\n"
 "\n"
 "              AsynchDNS\n"
-"                     This  curl  uses asynchronous name resolves. Asynchronous\n"
-"                     name resolves can be done using either the c-ares or  the\n"
+"                     This curl uses asynchronous name  resolves.  Asynchronous\n"
+"                     name  resolves can be done using either the c-ares or the\n"
 "                     threaded resolver backends.\n"
 "\n"
 "              brotli Support for automatic brotli compression over HTTP(S).\n"
@@ -4074,18 +4202,23 @@
 "                     curl was built with support for character set conversions\n"
 "                     (like EBCDIC)\n"
 "\n"
-"              Debug  This curl uses a libcurl built with Debug.  This  enables\n"
-"                     more  error-tracking  and memory debugging etc. For curl-\n"
+"              Debug  This  curl  uses a libcurl built with Debug. This enables\n"
+"                     more error-tracking and memory debugging etc.  For  curl-\n"
 "                     developers only!\n"
 "\n"
+"              gsasl  The  built-in  SASL authentication includes extensions to\n"
+"                     support SCRAM because libcurl was built with libgsasl.\n"
+"\n"
 "              GSS-API\n"
+, stdout);
+ fputs(
 "                     GSS-API is supported.\n"
 "\n"
+"              HSTS   HSTS support is present.\n"
+"\n"
 "              HTTP2  HTTP/2 support has been built-in.\n"
 "              HTTP3  HTTP/3 support has been built-in.\n"
 "\n"
-, stdout);
- fputs(
 "              HTTPS-proxy\n"
 "                     This curl is built to support HTTPS proxy.\n"
 "\n"
@@ -4093,32 +4226,32 @@
 "\n"
 "              IPv6   You can use IPv6 with this.\n"
 "\n"
-"              krb4   Krb4 for FTP is supported.\n"
+"              Kerberos\n"
+, stdout);
+ fputs(
+"                     Kerberos V5 authentication is supported.\n"
 "\n"
 "              Largefile\n"
 "                     This curl supports transfers of large files, files larger\n"
 "                     than 2GB.\n"
 "\n"
-"              libz   Automatic  decompression of compressed files over HTTP is\n"
-, stdout);
- fputs(
-"                     supported.\n"
-"\n"
-"              Metalink\n"
-"                     This curl supports Metalink\n"
+"              libz   Automatic decompression (via gzip, deflate) of compressed\n"
+"                     files over HTTP is supported.\n"
 "\n"
 "              MultiSSL\n"
 "                     This curl supports multiple TLS backends.\n"
 "\n"
 "              NTLM   NTLM authentication is supported.\n"
-"              NTLM   NTLM authentication is supported.\n"
+"\n"
+"              NTLM_WB\n"
+, stdout);
+ fputs(
+"                     NTLM delegation to winbind helper is supported.\n"
 "\n"
 "              PSL    PSL is short for Public Suffix List and means  that  this\n"
 "                     curl  has  been  built  with knowledge about \"public suf-\n"
 "                     fixes\".\n"
 "\n"
-, stdout);
- fputs(
 "              SPNEGO SPNEGO authentication is supported.\n"
 "\n"
 "              SSL    SSL versions of various protocols are supported, such  as\n"
@@ -4126,67 +4259,83 @@
 "\n"
 "              SSPI   SSPI is supported.\n"
 "\n"
+, stdout);
+ fputs(
 "              TLS-SRP\n"
 "                     SRP  (Secure Remote Password) authentication is supported\n"
 "                     for TLS.\n"
 "\n"
+"              TrackMemory\n"
+"                     Debug memory tracking is supported.\n"
+"\n"
+"              Unicode\n"
+"                     Unicode support on Windows.\n"
+"\n"
 "              UnixSockets\n"
 "                     Unix sockets support is provided.\n"
 "\n"
-"       -w, --write-out <format>\n"
+"              zstd   Automatic decompression (via zstd)  of  compressed  files\n"
+"                     over HTTP is supported.\n"
+"\n"
 , stdout);
  fputs(
+"       -w, --write-out <format>\n"
 "              Make curl display information on stdout after a completed trans-\n"
-"              fer.  The  format  is a string that may contain plain text mixed\n"
-"              with any number of variables. The format can be specified  as  a\n"
-"              literal  \"string\",  or  you can have curl read the format from a\n"
-"              file with \"@filename\" and to tell curl to read the  format  from\n"
+"              fer. The format is a string that may contain  plain  text  mixed\n"
+"              with  any  number of variables. The format can be specified as a\n"
+"              literal \"string\", or you can have curl read the  format  from  a\n"
+"              file  with  \"@filename\" and to tell curl to read the format from\n"
 "              stdin you write \"@-\".\n"
 "\n"
 , stdout);
  fputs(
-"              The  variables  present in the output format will be substituted\n"
-"              by the value or text that curl thinks fit, as  described  below.\n"
-"              All  variables are specified as %{variable_name} and to output a\n"
-"              normal % you just write them as %%. You can output a newline  by\n"
+"              The variables present in the output format will  be  substituted\n"
+"              by  the  value or text that curl thinks fit, as described below.\n"
+"              All variables are specified as %{variable_name} and to output  a\n"
+"              normal  % you just write them as %%. You can output a newline by\n"
 "              using \\n, a carriage return with \\r and a tab space with \\t.\n"
 "\n"
-"              The  output  will be written to standard output, but this can be\n"
+"              The output will be written to standard output, but this  can  be\n"
 , stdout);
  fputs(
 "              switched to standard error by using %{stderr}.\n"
 "\n"
 "              NOTE: The %-symbol is a special symbol in the win32-environment,\n"
-"              where  all  occurrences of % must be doubled when using this op-\n"
+"              where all occurrences of % must be doubled when using  this  op-\n"
 "              tion.\n"
 "\n"
 "              The variables available are:\n"
 "\n"
-"              content_type   The Content-Type of the  requested  document,  if\n"
+"              content_type   The  Content-Type  of  the requested document, if\n"
 "                             there was any.\n"
 "\n"
-"              filename_effective\n"
+"              errormsg       The error message. (Added in 7.75.0)\n"
+"\n"
 , stdout);
  fputs(
+"              exitcode       The numerical exitcode of the transfer. (Added in\n"
+"                             7.75.0)\n"
+"\n"
+"              filename_effective\n"
 "                             The  ultimate  filename  that curl writes out to.\n"
 "                             This is only meaningful if curl is told to  write\n"
 "                             to  a  file  with  the  -O,  --remote-name or -o,\n"
 "                             --output option. It's most useful in  combination\n"
+, stdout);
+ fputs(
 "                             with  the -J, --remote-header-name option. (Added\n"
 "                             in 7.26.0)\n"
 "\n"
-, stdout);
- fputs(
 "              ftp_entry_path The initial path curl ended up in when logging on\n"
 "                             to the remote FTP server. (Added in 7.15.4)\n"
 "\n"
 "              http_code      The numerical response code that was found in the\n"
 "                             last retrieved HTTP(S)  or  FTP(s)  transfer.  In\n"
+, stdout);
+ fputs(
 "                             7.18.2  the alias response_code was added to show\n"
 "                             the same info.\n"
 "\n"
-, stdout);
- fputs(
 "              http_connect   The numerical code that was found in the last re-\n"
 "                             sponse  (from a proxy) to a curl CONNECT request.\n"
 "                             (Added in 7.12.4)\n"
@@ -4194,23 +4343,23 @@
 "              http_version   The  http  version  that  was  effectively  used.\n"
 "                             (Added in 7.50.0)\n"
 "\n"
+, stdout);
+ fputs(
 "              json           A JSON object with all available keys.\n"
 "\n"
 "              local_ip       The  IP  address of the local end of the most re-\n"
-, stdout);
- fputs(
 "                             cently done connection - can be  either  IPv4  or\n"
-"                             IPv6 (Added in 7.29.0)\n"
+"                             IPv6. (Added in 7.29.0)\n"
 "\n"
 "              local_port     The  local  port number of the most recently done\n"
-"                             connection (Added in 7.29.0)\n"
+"                             connection. (Added in 7.29.0)\n"
 "\n"
 "              method         The http method used in the most recent HTTP  re-\n"
-"                             quest (Added in 7.72.0)\n"
-"\n"
-"              num_connects   Number  of new connects made in the recent trans-\n"
 , stdout);
  fputs(
+"                             quest. (Added in 7.72.0)\n"
+"\n"
+"              num_connects   Number  of new connects made in the recent trans-\n"
 "                             fer. (Added in 7.12.3)\n"
 "\n"
 "              num_headers    The number of response headers in the most recent\n"
@@ -4218,47 +4367,56 @@
 "                              redirect).  Note  that  the status line IS NOT a\n"
 "                             header. (Added in 7.73.0)\n"
 "\n"
+, stdout);
+ fputs(
 "              num_redirects  Number of redirects that were followed in the re-\n"
 "                             quest. (Added in 7.12.3)\n"
 "\n"
+"              onerror        The  rest  of  the  output  is  only shown if the\n"
+"                             transfer returned  a  non-zero  error  (Added  in\n"
+"                             7.75.0)\n"
+"\n"
 "              proxy_ssl_verify_result\n"
+"                             The result of the HTTPS proxy's SSL peer certifi-\n"
 , stdout);
  fputs(
-"                             The result of the HTTPS proxy's SSL peer certifi-\n"
 "                             cate verification that was requested. 0 means the\n"
 "                             verification was successful. (Added in 7.52.0)\n"
 "\n"
 "              redirect_url   When an HTTP request was made without -L, --loca-\n"
-"                             tion to follow redirects (or when --max-redir  is\n"
+"                             tion to follow redirects (or when --max-redirs is\n"
 "                             met),  this  variable  will show the actual URL a\n"
-, stdout);
- fputs(
 "                             redirect would have gone to. (Added in 7.18.2)\n"
 "\n"
-"              remote_ip      The remote IP address of the most  recently  done\n"
-"                             connection - can be either IPv4 or IPv6 (Added in\n"
-"                             7.29.0)\n"
-"\n"
-"              remote_port    The remote port number of the most recently  done\n"
-"                             connection (Added in 7.29.0)\n"
-"\n"
-"              response_code  The numerical response code that was found in the\n"
 , stdout);
  fputs(
-"                             last transfer (formerly  known  as  \"http_code\").\n"
+"              referer        The Referer: header, if there was any. (Added  in\n"
+"                             7.76.0)\n"
+"\n"
+"              remote_ip      The  remote  IP address of the most recently done\n"
+"                             connection - can be either IPv4 or  IPv6.  (Added\n"
+"                             in 7.29.0)\n"
+"\n"
+"              remote_port    The  remote port number of the most recently done\n"
+"                             connection. (Added in 7.29.0)\n"
+"\n"
+, stdout);
+ fputs(
+"              response_code  The numerical response code that was found in the\n"
+"                             last  transfer  (formerly  known as \"http_code\").\n"
 "                             (Added in 7.18.2)\n"
 "\n"
-"              scheme         The  URL  scheme (sometimes called protocol) that\n"
-"                             was effectively used (Added in 7.52.0)\n"
+"              scheme         The URL scheme (sometimes called  protocol)  that\n"
+"                             was effectively used. (Added in 7.52.0)\n"
 "\n"
 "              size_download  The total amount of bytes that were downloaded.\n"
 "\n"
+, stdout);
+ fputs(
 "              size_header    The total amount of bytes of the downloaded head-\n"
 "                             ers.\n"
 "\n"
-, stdout);
- fputs(
-"              size_request   The  total  amount of bytes that were sent in the\n"
+"              size_request   The total amount of bytes that were sent  in  the\n"
 "                             HTTP request.\n"
 "\n"
 "              size_upload    The total amount of bytes that were uploaded.\n"
@@ -4266,88 +4424,96 @@
 "              speed_download The average download speed that curl measured for\n"
 "                             the complete download. Bytes per second.\n"
 "\n"
-"              speed_upload   The  average  upload speed that curl measured for\n"
-"                             the complete upload. Bytes per second.\n"
-"\n"
 , stdout);
  fputs(
+"              speed_upload   The average upload speed that curl  measured  for\n"
+"                             the complete upload. Bytes per second.\n"
+"\n"
 "              ssl_verify_result\n"
-"                             The result of the SSL peer certificate  verifica-\n"
+"                             The  result of the SSL peer certificate verifica-\n"
 "                             tion that was requested. 0 means the verification\n"
 "                             was successful. (Added in 7.19.0)\n"
 "\n"
-"              stderr         From this point on, the  -w,  --write-out  output\n"
-"                             will  be  written  to  standard  error. (Added in\n"
-"                             7.63.0)\n"
-"\n"
+"              stderr         From  this  point  on, the -w, --write-out output\n"
 , stdout);
  fputs(
-"              stdout         From this point on, the  -w,  --write-out  output\n"
-"                             will  be written to standard output.  This is the\n"
-"                             default, but can be used  to  switch  back  after\n"
+"                             will be written  to  standard  error.  (Added  in\n"
+"                             7.63.0)\n"
+"\n"
+"              stdout         From  this  point  on, the -w, --write-out output\n"
+"                             will be written to standard output.  This is  the\n"
+"                             default,  but  can  be  used to switch back after\n"
 "                             switching to stderr.  (Added in 7.63.0)\n"
 "\n"
 "              time_appconnect\n"
-"                             The  time, in seconds, it took from the start un-\n"
-"                             til the SSL/SSH/etc connect/handshake to the  re-\n"
 , stdout);
  fputs(
+"                             The time, in seconds, it took from the start  un-\n"
+"                             til  the SSL/SSH/etc connect/handshake to the re-\n"
 "                             mote host was completed. (Added in 7.19.0)\n"
 "\n"
-"              time_connect   The  time, in seconds, it took from the start un-\n"
+"              time_connect   The time, in seconds, it took from the start  un-\n"
 "                             til the TCP connect to the remote host (or proxy)\n"
 "                             was completed.\n"
 "\n"
 "              time_namelookup\n"
-"                             The  time, in seconds, it took from the start un-\n"
-"                             til the name resolving was completed.\n"
-"\n"
-"              time_pretransfer\n"
 , stdout);
  fputs(
 "                             The time, in seconds, it took from the start  un-\n"
-"                             til  the  file  transfer was just about to begin.\n"
+"                             til the name resolving was completed.\n"
+"\n"
+"              time_pretransfer\n"
+"                             The  time, in seconds, it took from the start un-\n"
+"                             til the file transfer was just  about  to  begin.\n"
 "                             This includes all pre-transfer commands and nego-\n"
 "                             tiations that are specific to the particular pro-\n"
+, stdout);
+ fputs(
 "                             tocol(s) involved.\n"
 "\n"
 "              time_redirect  The time, in seconds, it took for all redirection\n"
-, stdout);
- fputs(
 "                             steps including name lookup, connect, pretransfer\n"
-"                             and transfer before  the  final  transaction  was\n"
-"                             started.  time_redirect shows the complete execu-\n"
-"                             tion time for multiple  redirections.  (Added  in\n"
+"                             and  transfer  before  the  final transaction was\n"
+"                             started. time_redirect shows the complete  execu-\n"
+"                             tion  time  for  multiple redirections. (Added in\n"
 "                             7.12.3)\n"
 "\n"
-"              time_starttransfer\n"
-"                             The  time, in seconds, it took from the start un-\n"
 , stdout);
  fputs(
-"                             til the first byte was just about  to  be  trans-\n"
-"                             ferred.  This  includes time_pretransfer and also\n"
-"                             the time the server needed to calculate  the  re-\n"
+"              time_starttransfer\n"
+"                             The time, in seconds, it took from the start  un-\n"
+"                             til  the  first  byte was just about to be trans-\n"
+"                             ferred. This includes time_pretransfer  and  also\n"
+"                             the  time  the server needed to calculate the re-\n"
 "                             sult.\n"
 "\n"
-"              time_total     The  total time, in seconds, that the full opera-\n"
+"              time_total     The total time, in seconds, that the full  opera-\n"
+, stdout);
+ fputs(
 "                             tion lasted.\n"
 "\n"
+"              url            The URL that was fetched. (Added in 7.75.0)\n"
+"\n"
+"              urlnum         The URL index number of this transfer, 0-indexed.\n"
+"                             De-globbed URLs share the same  index  number  as\n"
+"                             the origin globbed URL. (Added in 7.75.0)\n"
+"\n"
 "              url_effective  The URL that was fetched last. This is most mean-\n"
 , stdout);
  fputs(
-"                             ingful  if  you've  told curl to follow location:\n"
+"                             ingful if you've told curl  to  follow  location:\n"
 "                             headers.\n"
 "\n"
 "              If this option is used several times, the last one will be used.\n"
 "\n"
 "       --xattr\n"
-"              When saving output to a file, this option tells  curl  to  store\n"
-"              certain  file  metadata  in extended file attributes. Currently,\n"
+"              When  saving  output  to a file, this option tells curl to store\n"
+"              certain file metadata in extended  file  attributes.  Currently,\n"
 "              the URL is stored in the xdg.origin.url attribute and, for HTTP,\n"
 , stdout);
  fputs(
-"              the  content  type  is stored in the mime_type attribute. If the\n"
-"              file system does not support extended attributes, a  warning  is\n"
+"              the content type is stored in the mime_type  attribute.  If  the\n"
+"              file  system  does not support extended attributes, a warning is\n"
 "              issued.\n"
 "\n"
 "FILES\n"
@@ -4361,7 +4527,7 @@
 "\n"
 , stdout);
  fputs(
-"       Using  an  environment variable to set the proxy has the same effect as\n"
+"       Using an environment variable to set the proxy has the same  effect  as\n"
 "       using the -x, --proxy option.\n"
 "\n"
 "       http_proxy [protocol://]<host>[:port]\n"
@@ -4370,87 +4536,91 @@
 "              Sets the proxy server to use for HTTPS.\n"
 "\n"
 "       [url-protocol]_PROXY [protocol://]<host>[:port]\n"
-"              Sets the proxy server to use for [url-protocol], where the  pro-\n"
+"              Sets  the proxy server to use for [url-protocol], where the pro-\n"
 , stdout);
  fputs(
-"              tocol  is  a  protocol  that curl supports and as specified in a\n"
-"              URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc.\n"
+"              tocol is a protocol that curl supports and  as  specified  in  a\n"
+"              URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP, etc.\n"
 "\n"
 "       ALL_PROXY [protocol://]<host>[:port]\n"
-"              Sets the proxy server to use if no  protocol-specific  proxy  is\n"
+"              Sets  the  proxy  server to use if no protocol-specific proxy is\n"
 "              set.\n"
 "\n"
 "       NO_PROXY <comma-separated list of hosts/domains>\n"
-"              list  of  host names that shouldn't go through any proxy. If set\n"
+"              list of host names that shouldn't go through any proxy.  If  set\n"
 "              to an asterisk '*' only, it matches all hosts. Each name in this\n"
 , stdout);
  fputs(
 "              list is matched as either a domain name which contains the host-\n"
 "              name, or the hostname itself.\n"
 "\n"
-"              This environment variable disables use of the  proxy  even  when\n"
-"              specified  with  the  -x,  --proxy  option. That is NO_PROXY=di-\n"
+"              This  environment  variable  disables use of the proxy even when\n"
+"              specified with the -x,  --proxy  option.  That  is  NO_PROXY=di-\n"
 "              rect.example.com  curl  -x  http://proxy.example.com  http://di-\n"
-"              rect.example.com   accesses   the   target   URL  directly,  and\n"
+"              rect.example.com  accesses  the   target   URL   directly,   and\n"
 , stdout);
  fputs(
-"              NO_PROXY=direct.example.com  curl  -x   http://proxy.example.com\n"
+"              NO_PROXY=direct.example.com   curl  -x  http://proxy.example.com\n"
 "              http://somewhere.example.com accesses the target URL through the\n"
 "              proxy.\n"
 "\n"
-"              The list of host names can also  be  include  numerical  IP  ad-\n"
-"              dresses,  and IPv6 versions should then be given without enclos-\n"
+"              The  list  of  host  names  can also be include numerical IP ad-\n"
+"              dresses, and IPv6 versions should then be given without  enclos-\n"
 "              ing brackets.\n"
 "\n"
-"              IPv6 numerical addresses are compared as strings, so  they  will\n"
+"              IPv6  numerical  addresses are compared as strings, so they will\n"
 , stdout);
  fputs(
-"              only  match  if  the  representations are the same: \"::1\" is the\n"
+"              only match if the representations are the  same:  \"::1\"  is  the\n"
 "              same as \"::0:1\" but they don't match.\n"
 "\n"
 "       CURL_SSL_BACKEND <TLS backend>\n"
-"              If curl was built with support for \"MultiSSL\", meaning  that  it\n"
-"              has  built-in  support for more than one TLS backend, this envi-\n"
-"              ronment variable can be set to the case insensitive name of  the\n"
-"              particular  backend  to use when curl is invoked. Setting a name\n"
+"              If  curl  was built with support for \"MultiSSL\", meaning that it\n"
+"              has built-in support for more than one TLS backend,  this  envi-\n"
+"              ronment  variable can be set to the case insensitive name of the\n"
+"              particular backend to use when curl is invoked. Setting  a  name\n"
 , stdout);
  fputs(
-"              that isn't a built-in alternative, will make curl stay with  the\n"
+"              that  isn't  a built-in alternative will make curl stay with the\n"
 "              default.\n"
 "\n"
+"              SSL backend names (case-insensitive):  bearssl,  gnutls,  gskit,\n"
+"              mbedtls, mesalink, nss, openssl, rustls, schannel, secure-trans-\n"
+"              port, wolfssl\n"
+"\n"
 "       QLOGDIR <directory name>\n"
-"              If  curl was built with HTTP/3 support, setting this environment\n"
-"              variable to a local directory will make curl  produce  qlogs  in\n"
-"              that  directory,  using  file  names named after the destination\n"
-"              connection id (in hex). Do note  that  these  files  can  become\n"
+"              If curl was built with HTTP/3 support, setting this  environment\n"
+"              variable  to  a  local directory will make curl produce qlogs in\n"
 , stdout);
  fputs(
+"              that directory, using file names  named  after  the  destination\n"
+"              connection  id  (in  hex).  Do  note that these files can become\n"
 "              rather large. Works with both QUIC backends.\n"
 "\n"
 "       SSLKEYLOGFILE <file name>\n"
-"              If  you  set this environment variable to a file name, curl will\n"
+"              If you set this environment variable to a file name,  curl  will\n"
 "              store TLS secrets from its connections in that file when invoked\n"
 "              to enable you to analyze the TLS traffic in real time using net-\n"
-"              work analyzing tools such as Wireshark. This works with the fol-\n"
-"              lowing  TLS  backends: OpenSSL, libressl, BoringSSL, GnuTLS, NSS\n"
 , stdout);
  fputs(
+"              work analyzing tools such as Wireshark. This works with the fol-\n"
+"              lowing TLS backends: OpenSSL, libressl, BoringSSL,  GnuTLS,  NSS\n"
 "              and wolfSSL.\n"
 "\n"
 "PROXY PROTOCOL PREFIXES\n"
-"       Since curl version 7.21.7, the proxy string may  be  specified  with  a\n"
+"       Since  curl  version  7.21.7,  the proxy string may be specified with a\n"
 "       protocol:// prefix to specify alternative proxy protocols.\n"
 "\n"
-"       If  no  protocol  is  specified  in  the  proxy string or if the string\n"
-"       doesn't match a supported one, the proxy will be  treated  as  an  HTTP\n"
+"       If no protocol is specified in  the  proxy  string  or  if  the  string\n"
+, stdout);
+ fputs(
+"       doesn't  match  a  supported  one, the proxy will be treated as an HTTP\n"
 "       proxy.\n"
 "\n"
 "       The supported proxy protocol prefixes are as follows:\n"
 "\n"
 "       http://\n"
-, stdout);
- fputs(
-"              Makes  it use it as an HTTP proxy. The default if no scheme pre-\n"
+"              Makes it use it as an HTTP proxy. The default if no scheme  pre-\n"
 "              fix is used.\n"
 "\n"
 "       https://\n"
@@ -4463,54 +4633,55 @@
 "              Makes it the equivalent of --socks4a\n"
 "\n"
 "       socks5://\n"
+, stdout);
+ fputs(
 "              Makes it the equivalent of --socks5\n"
 "\n"
 "       socks5h://\n"
 "              Makes it the equivalent of --socks5-hostname\n"
 "\n"
 "EXIT CODES\n"
-, stdout);
- fputs(
-"       There are a bunch of different error codes and their corresponding  er-\n"
-"       ror messages that may appear during bad conditions. At the time of this\n"
-"       writing, the exit codes are:\n"
+"       There  are a bunch of different error codes and their corresponding er-\n"
+"       ror messages that may appear under error conditions.  At  the  time  of\n"
+"       this writing, the exit codes are:\n"
 "\n"
 "       1      Unsupported protocol. This build of curl has no support for this\n"
 "              protocol.\n"
 "\n"
 "       2      Failed to initialize.\n"
 "\n"
-"       3      URL malformed. The syntax was not correct.\n"
-"\n"
-"       4      A  feature  or option that was needed to perform the desired re-\n"
 , stdout);
  fputs(
-"              quest was not enabled or was explicitly disabled at  build-time.\n"
+"       3      URL malformed. The syntax was not correct.\n"
+"\n"
+"       4      A feature or option that was needed to perform the  desired  re-\n"
+"              quest  was not enabled or was explicitly disabled at build-time.\n"
 "              To make curl able to do this, you probably need another build of\n"
 "              libcurl!\n"
 "\n"
-"       5      Couldn't resolve proxy. The given proxy host could  not  be  re-\n"
+"       5      Couldn't  resolve  proxy.  The given proxy host could not be re-\n"
 "              solved.\n"
 "\n"
-"       6      Couldn't resolve host. The given remote host was not resolved.\n"
+"       6      Couldn't resolve host. The given remote host could  not  be  re-\n"
+, stdout);
+ fputs(
+"              solved.\n"
 "\n"
 "       7      Failed to connect to host.\n"
 "\n"
 "       8      Weird server reply. The server sent data curl couldn't parse.\n"
 "\n"
-, stdout);
- fputs(
 "       9      FTP  access  denied. The server denied login or denied access to\n"
 "              the particular resource or directory you wanted to  reach.  Most\n"
 "              often  you  tried to change to a directory that doesn't exist on\n"
 "              the server.\n"
 "\n"
 "       10     FTP accept failed. While waiting for the server to connect  back\n"
+, stdout);
+ fputs(
 "              when  an active FTP session is used, an error code was sent over\n"
 "              the control connection or similar.\n"
 "\n"
-, stdout);
- fputs(
 "       11     FTP weird PASS reply. Curl couldn't parse the reply sent to  the\n"
 "              PASS request.\n"
 "\n"
@@ -4520,11 +4691,11 @@
 "       13     FTP weird PASV reply, Curl couldn't parse the reply sent to  the\n"
 "              PASV request.\n"
 "\n"
+, stdout);
+ fputs(
 "       14     FTP  weird  227  format.  Curl  couldn't  parse the 227-line the\n"
 "              server sent.\n"
 "\n"
-, stdout);
- fputs(
 "       15     FTP can't get host. Couldn't resolve the host IP we got  in  the\n"
 "              227-line.\n"
 "\n"
@@ -4533,22 +4704,22 @@
 "              see the error message for details.\n"
 "\n"
 "       17     FTP  couldn't set binary. Couldn't change transfer method to bi-\n"
+, stdout);
+ fputs(
 "              nary.\n"
 "\n"
 "       18     Partial file. Only a part of the file was transferred.\n"
 "\n"
-, stdout);
- fputs(
 "       19     FTP couldn't download/access the given file, the RETR (or  simi-\n"
 "              lar) command failed.\n"
 "\n"
 "       21     FTP quote error. A quote command returned error from the server.\n"
 "       22     HTTP  page not retrieved. The requested url was not found or re-\n"
 "              turned another error with the  HTTP  error  code  being  400  or\n"
-"              above. This return code only appears if -f, --fail is used.\n"
-"\n"
 , stdout);
  fputs(
+"              above. This return code only appears if -f, --fail is used.\n"
+"\n"
 "       23     Write  error.  Curl couldn't write data to a local filesystem or\n"
 "              similar.\n"
 "\n"
@@ -4560,10 +4731,10 @@
 "       27     Out of memory. A memory allocation request failed.\n"
 "\n"
 "       28     Operation timeout. The specified time-out period was reached ac-\n"
-"              cording to the conditions.\n"
-"\n"
 , stdout);
  fputs(
+"              cording to the conditions.\n"
+"\n"
 "       30     FTP PORT failed. The PORT command failed. Not  all  FTP  servers\n"
 "              support  the  PORT  command, try doing a transfer using PASV in-\n"
 "              stead!\n"
@@ -4670,7 +4841,7 @@
  fputs(
 "       76     Character conversion functions required.\n"
 "\n"
-"       77     Problem with reading the SSL CA cert (path? access rights?).\n"
+"       77     Problem reading the SSL CA cert (path? access rights?).\n"
 "\n"
 "       78     The resource referenced in the URL does not exist.\n"
 "\n"
@@ -4685,19 +4856,19 @@
 "\n"
 , stdout);
  fputs(
-"       84     The FTP PRET command failed\n"
+"       84     The FTP PRET command failed.\n"
 "\n"
-"       85     RTSP: mismatch of CSeq numbers\n"
+"       85     Mismatch of RTSP CSeq numbers.\n"
 "\n"
-"       86     RTSP: mismatch of Session Identifiers\n"
+"       86     Mismatch of RTSP Session Identifiers.\n"
 "\n"
-"       87     unable to parse FTP file list\n"
+"       87     Unable to parse FTP file list.\n"
 "\n"
-"       88     FTP chunk callback reported error\n"
+"       88     FTP chunk callback reported error.\n"
 "\n"
-"       89     No connection available, the session will be queued\n"
+"       89     No connection available, the session will be queued.\n"
 "\n"
-"       90     SSL public key does not matched pinned public key\n"
+"       90     SSL public key does not matched pinned public key.\n"
 "\n"
 "       91     Invalid SSL certificate status.\n"
 "\n"
@@ -4726,7 +4897,7 @@
 "       is found in the separate THANKS file.\n"
 "\n"
 "WWW\n"
-"       https://curl.haxx.se\n"
+"       https://curl.se\n"
 "\n"
 "SEE ALSO\n"
 "       ftp(1), wget(1)\n"
@@ -4748,4285 +4919,4388 @@
 #include "memdebug.h" /* keep this as LAST include */
 static const unsigned char hugehelpgz[] = {
   /* This mumbo-jumbo is the huge help text compressed with gzip.
-     Thanks to this operation, the size of this data shrank from 182728
-     to 51301 bytes. You can disable the use of compressed help
+     Thanks to this operation, the size of this data shrank from 188442
+     to 52541 bytes. You can disable the use of compressed help
      texts by NOT passing -c to the mkhelp.pl tool. */
   0x1f, 0x8b, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xed, 0xbd,
-  0x7b, 0x7b, 0xdc, 0xc6, 0x91, 0x2e, 0xfe, 0xbf, 0x3f, 0x05, 0x96, 0x79,
-  0x72, 0x48, 0x6e, 0x66, 0x86, 0x37, 0x5d, 0x2c, 0x46, 0xf6, 0x9a, 0xa6,
-  0x28, 0x9b, 0x6b, 0x4a, 0xe4, 0x6a, 0x28, 0xdb, 0x39, 0xb1, 0x1f, 0x3d,
-  0xe0, 0x0c, 0x48, 0x22, 0x9a, 0x01, 0x26, 0x00, 0x86, 0x97, 0xec, 0xe6,
-  0x7c, 0xf6, 0x5f, 0xd7, 0x5b, 0x55, 0xdd, 0x0d, 0x74, 0x63, 0x48, 0x3b,
-  0x56, 0xf6, 0x5c, 0x7e, 0xd9, 0x73, 0x64, 0x89, 0x04, 0x1a, 0xdd, 0xd5,
-  0xd5, 0xd5, 0x75, 0x7d, 0x2b, 0x49, 0x1e, 0xfa, 0xdf, 0x07, 0xfc, 0xff,
-  0x0f, 0xe6, 0x7f, 0xe6, 0xbf, 0x9f, 0x25, 0xc9, 0x59, 0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8b, 0xc4, 0xe5, 0xa5, 0x21, 0x68, 0x6d, 0x28, 0x78, 0xb1, 0xac, 0x67,
-  0x65, 0x3a, 0x25, 0xba, 0x99, 0x57, 0x2e, 0x97, 0x86, 0xe2, 0x55, 0x3e,
-  0xf9, 0x58, 0x27, 0xb3, 0xfc, 0x63, 0x46, 0x54, 0xbb, 0xbb, 0x57, 0x2a,
-  0x0e, 0x78, 0xd0, 0x74, 0x69, 0x08, 0x5c, 0x0c, 0x75, 0xb8, 0x26, 0x9f,
-  0xa4, 0xf4, 0x01, 0x90, 0x31, 0x59, 0x2e, 0x68, 0x34, 0x26, 0x5f, 0xb2,
-  0x28, 0x6b, 0xf3, 0xd2, 0x78, 0x7c, 0x62, 0xe6, 0x5e, 0x14, 0x19, 0xe6,
-  0x51, 0x0f, 0xcc, 0x3f, 0xca, 0x8f, 0x79, 0x66, 0xfe, 0x72, 0x99, 0xcf,
-  0xb2, 0x84, 0xb7, 0xd7, 0x0e, 0x47, 0xfb, 0x9c, 0x54, 0x59, 0xbd, 0x9c,
-  0x67, 0x44, 0xd9, 0xac, 0x49, 0x67, 0x79, 0xf1, 0xd1, 0xfc, 0x95, 0x96,
-  0x3e, 0x2f, 0xab, 0x6c, 0x94, 0x1c, 0xd4, 0xc9, 0x7d, 0xb9, 0x34, 0x2b,
-  0x9d, 0xcd, 0x0c, 0x03, 0x64, 0xc9, 0x45, 0x36, 0x2b, 0x6f, 0x07, 0xb4,
-  0xed, 0x49, 0xb1, 0x9c, 0x5f, 0x98, 0x01, 0xca, 0x4b, 0x37, 0x5c, 0xda,
-  0x2c, 0xcd, 0x70, 0xfc, 0xf4, 0x3c, 0x35, 0x6b, 0x32, 0xef, 0x56, 0xc9,
-  0x75, 0x66, 0xd6, 0x5c, 0x2f, 0xf2, 0xe2, 0x5f, 0xda, 0x74, 0x31, 0xb4,
-  0x5d, 0x94, 0xb7, 0x59, 0x65, 0x28, 0x7b, 0x71, 0x9f, 0x18, 0x22, 0x5c,
-  0x30,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 0xee,
-  0xfe, 0x4e, 0x84, 0x79, 0xfb, 0xde, 0x30, 0xdc, 0xb6, 0xbf, 0xdb, 0x79,
-  0xfc, 0x07, 0x23, 0xc6, 0xdd, 0xd1, 0x31, 0x33, 0xf8, 0xcf, 0xbf, 0x7b,
-  0xbc, 0x77, 0x4b, 0xbf, 0xcd, 0x8b, 0x9b, 0xf2, 0xa3, 0x21, 0x13, 0x2e,
-  0xdd, 0xb4, 0x4d, 0x51, 0x92, 0x54, 0xf3, 0x45, 0x63, 0x6f, 0x33, 0x62,
-  0x4a, 0xf3, 0xa3, 0x8b, 0xf4, 0x62, 0x76, 0x9f, 0x5c, 0xa7, 0x37, 0x19,
-  0xad, 0x79, 0x61, 0xb8, 0x95, 0xa8, 0x60, 0x2e, 0x96, 0x19, 0x04, 0x83,
-  0x88, 0x8e, 0x69, 0xb9, 0xbc, 0x30, 0xe2, 0x87, 0xc4, 0x06, 0x13, 0x27,
-  0xbd, 0x29, 0xf3, 0x69, 0xeb, 0xea, 0xbe, 0xce, 0x48, 0xe4, 0xd1, 0x87,
-  0x71, 0x8d, 0x19, 0x91, 0x4b, 0x33, 0xc5, 0x81, 0xcb, 0x1b, 0xba, 0x12,
-  0x8d, 0xb0, 0x4c, 0x67, 0x75, 0x99, 0x24, 0x57, 0x25, 0x9d, 0x15, 0x88,
-  0x68, 0x30, 0xbb, 0xd9, 0x98, 0xeb, 0x94, 0xee, 0x3d, 0x73, 0xc5, 0xd9,
-  0xd3, 0x50, 0x65, 0x90, 0xd6, 0xd8, 0xad, 0x74, 0x36, 0xe0, 0xfb, 0x8d,
-  0xde, 0x11, 0x5a, 0x25, 0xeb, 0xff, 0x63, 0x7d, 0x90, 0xac, 0xff, 0xdb,
-  0x3a, 0x78, 0x62, 0xfd, 0x5f, 0xd7, 0xdd, 0x5e, 0x1b, 0xdd, 0xed, 0x26,
-  0x9f, 0x66, 0xcc, 0x16, 0xc7, 0x67, 0x37, 0xcf, 0x92, 0xbf, 0x91, 0xaa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 0x13, 0x8e, 0xec, 0x54, 0x46,
-  0x23, 0x37, 0x1f, 0x4f, 0xcd, 0x9e, 0x99, 0x33, 0xf7, 0x86, 0x68, 0x25,
-  0xcb, 0x52, 0x7d, 0x98, 0x58, 0xc3, 0x6c, 0x64, 0xe2, 0x54, 0xe0, 0x74,
-  0x3a, 0xcd, 0x61, 0xeb, 0xcc, 0xc8, 0xfe, 0x5e, 0x66, 0xf0, 0x90, 0x0a,
-  0x51, 0xe7, 0x9e, 0x80, 0xa5, 0x0d, 0xbc, 0x26, 0x3d, 0x68, 0x8d, 0xed,
-  0xc4, 0x21, 0x7d, 0x66, 0x8d, 0xb6, 0x72, 0xde, 0xf9, 0x88, 0x59, 0xc3,
-  0x54, 0x7c, 0x10, 0x22, 0x10, 0x06, 0x09, 0xac, 0x33, 0xcf, 0x91, 0x09,
-  0x95, 0xa1, 0xab, 0x29, 0x1a, 0x83, 0x7f, 0x41, 0xce, 0x1e, 0xb1, 0x30,
-  0x61, 0xaa, 0xe3, 0xcc, 0xd6, 0x3c, 0xb5, 0x81, 0x21, 0x2e, 0x3d, 0x79,
-  0x75, 0xad, 0x8f, 0x7a, 0x66, 0x7f, 0x6a, 0xd6, 0x46, 0x2a, 0x36, 0x45,
-  0x04, 0xa6, 0x6a, 0x95, 0x96, 0x15, 0x8b, 0xb3, 0x59, 0x69, 0x38, 0x79,
-  0x8d, 0x5d, 0x6a, 0xde, 0xc4, 0x69, 0xa6, 0x44, 0x71, 0x0e, 0x9b, 0x39,
-  0xd5, 0xc9, 0x4e, 0x5b, 0xc8, 0x55, 0x3f, 0x38, 0x35, 0xef, 0x26, 0x07,
-  0x91, 0xf4, 0xea, 0x57, 0xba, 0x83, 0xbf, 0x8d, 0x26, 0xb1, 0xde, 0xf0,
-  0x79, 0x84, 0x1f, 0xb8, 0x43, 0xf9, 0x1a, 0xfc, 0x23, 0x66, 0xb6, 0x5d,
-  0xd9, 0x1c, 0x6a, 0x13, 0xf8, 0x44, 0x77, 0xc6,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x0b, 0x78, 0xd9, 0x33, 0x9e, 0x49, 0xb5, 0xc8, 0x32, 0xb1, 0x34, 0xf1,
-  0x28, 0xc9, 0x2e, 0xba, 0xa1, 0xa1, 0x23, 0xdb, 0x98, 0x6e, 0x72, 0x78,
-  0x90, 0xf8, 0xc3, 0xd6, 0xec, 0xc6, 0xeb, 0x46, 0x59, 0xdc, 0x03, 0x1b,
-  0xf5, 0xa6, 0x48, 0xb0, 0x0b, 0xe8, 0x10, 0x67, 0x47, 0x6f, 0x60, 0xb6,
-  0xa6, 0x86, 0x71, 0xde, 0xaa, 0x93, 0x52, 0x93, 0xf2, 0x28, 0x18, 0xe5,
-  0x87, 0xee, 0x9d, 0xa1, 0x8d, 0x84, 0x38, 0x66, 0x2d, 0xcc, 0x8e, 0xf3,
-  0x6e, 0x72, 0x84, 0xac, 0xbb, 0x8c, 0xd6, 0xdc, 0x2f, 0x24, 0xda, 0x2e,
-  0x4e, 0xfd, 0xee, 0xa5, 0x3c, 0x23, 0xe5, 0x8d, 0xad, 0x59, 0x6f, 0xcc,
-  0x60, 0x87, 0x58, 0x63, 0xa1, 0x4b, 0xe0, 0xaa, 0xc8, 0xff, 0x26, 0xda,
-  0x67, 0x56, 0xdc, 0xe4, 0x55, 0x59, 0x90, 0x76, 0xcb, 0x41, 0xb9, 0x0b,
-  0x51, 0xbc, 0xa6, 0xc9, 0xfa, 0xe1, 0xfb, 0x77, 0x27, 0x1f, 0x0e, 0x0f,
-  0x3e, 0x7c, 0xfd, 0xfe, 0xed, 0xab, 0x93, 0xa3, 0xf5, 0xce, 0x70, 0xac,
-  0xd7, 0x99, 0xf9, 0xd5, 0x64, 0x6d, 0x88, 0x66, 0xc0, 0x83, 0x5e, 0xe5,
-  0x37, 0x46, 0x98, 0xc1, 0x6e, 0x40, 0xce, 0x00, 0xfe, 0x06, 0x45, 0x20,
-  0x75, 0x14, 0xef, 0x0c, 0x77, 0xb1, 0x24, 0x05, 0x6d, 0xd4, 0x52, 0x93,
-  0xf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, 0x66, 0x04, 0x65, 0x24,
-  0x1b, 0x82, 0xa3, 0x39, 0xf0, 0x6d, 0x4a, 0xb2, 0x4a, 0xf7, 0xac, 0x72,
-  0x39, 0x86, 0x78, 0x71, 0xd8, 0x7b, 0xa3, 0x35, 0x04, 0x72, 0x5b, 0x38,
-  0xcd, 0x77, 0x40, 0xd5, 0x1f, 0x44, 0x95, 0x05, 0xdd, 0x47, 0x53, 0xf2,
-  0x01, 0x46, 0x72, 0x41, 0x93, 0xb5, 0xd1, 0xd6, 0x9a, 0xad, 0x76, 0x31,
-  0x24, 0xe6, 0xa2, 0x2e, 0x1b, 0xec, 0x32, 0x0c, 0x76, 0xb9, 0xac, 0xad,
-  0x07, 0x93, 0x18, 0x59, 0xb7, 0x6b, 0x14, 0xbd, 0xcb, 0xbd, 0xed, 0xb4,
-  0x1a, 0x97, 0xd1, 0x8c, 0x71, 0xb0, 0x7c, 0x5b, 0x5d, 0x66, 0x85, 0xcd,
-  0x5a, 0xfb, 0x69, 0xcd, 0xab, 0x97, 0x68, 0x9d, 0x86, 0xc6, 0x8f, 0x20,
-  0x88, 0xfc, 0x37, 0x77, 0xb1, 0x3d, 0xc0, 0xd3, 0x6c, 0x96, 0xcf, 0x73,
-  0xd8, 0x5d, 0x6e, 0x87, 0x68, 0x06, 0xc3, 0x58, 0x58, 0xd0, 0x9b, 0xd2,
-  0x4f, 0xe1, 0x94, 0xb4, 0x0c, 0x29, 0xa5, 0x5f, 0x63, 0x4a, 0xde, 0x24,
-  0x22, 0x26, 0x73, 0x7b, 0x4a, 0xb6, 0x8e, 0x69, 0x45, 0xb0, 0xf8, 0xf8,
-  0x01, 0x3d, 0xde, 0x79, 0x44, 0xf4, 0xcc, 0xb3, 0x50, 0x33, 0x12, 0xeb,
-  0xe3, 0xa4, 0xde, 0xd9, 0xe9, 0xde, 0x72, 0x1e, 0x4f, 0x0d, 0x98, 0xa9,
-  0x52, 0xcb, 0x96, 0xef, 0xdf, 0x1d, 0x27, 0x1b, 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0x0c,
-  0x40, 0x58, 0x2d, 0xc4, 0x14, 0x8d, 0x86, 0x90, 0x2e, 0x43, 0xcd, 0x49,
-  0xd2, 0x60, 0xb9, 0xac, 0x26, 0x99, 0x56, 0x78, 0x5d, 0x64, 0x97, 0x61,
-  0x44, 0x88, 0xa3, 0xf5, 0x3e, 0xb2, 0x8d, 0xa0, 0x71, 0x4c, 0x09, 0xc3,
-  0xa6, 0x48, 0x59, 0xc6, 0xd0, 0xc5, 0xe2, 0x00, 0x1f, 0xa4, 0x06, 0x70,
-  0x10, 0x39, 0xff, 0xae, 0x4c, 0xcb, 0x7a, 0xda, 0xc6, 0xc7, 0xff, 0xf3,
-  0xc8, 0x41, 0x24, 0x5a, 0x0c, 0x42, 0xae, 0x7b, 0x89, 0x95, 0x11, 0x25,
-  0x6b, 0xc3, 0xc3, 0x64, 0x88, 0x38, 0x94, 0x97, 0x74, 0x52, 0x76, 0xfc,
-  0xac, 0x50, 0xf5, 0x49, 0x8f, 0x60, 0x84, 0xa2, 0x2d, 0x2a, 0xfb, 0x0f,
-  0xaf, 0x06, 0x46, 0xd9, 0x16, 0x62, 0xeb, 0x2a, 0x71, 0x44, 0x1a, 0xa9,
-  0xa0, 0xf3, 0x6b, 0x50, 0x58, 0x5b, 0xdc, 0xca, 0x0b, 0xd2, 0x19, 0xa1,
-  0xc0, 0x04, 0xc5, 0x19, 0x5a, 0x0e, 0xcb, 0x70, 0x27, 0xcb, 0xe6, 0x9f,
-  0x18, 0x48, 0x21, 0x30, 0x93, 0x21, 0xa0, 0x76, 0x3d, 0xa6, 0x9e, 0x30,
-  0x53, 0x13, 0xda, 0xf8, 0xf0, 0x2f, 0xc6, 0x8c, 0x7e, 0xa9, 0xae, 0x88,
-  0x1e, 0x60, 0x00, 0xeb, 0xb5, 0x28, 0x25, 0x68, 0x02, 0xde, 0xb0, 0x61,
-  0x5b, 0xa5, 0x35, 0xc3, 0xea, 0x00, 0x0c, 0x5c, 0xa0, 0xcc, 0xbb, 0x67,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 0x6e, 0x16, 0x3d, 0xc9, 0xf3, 0xe5, 0x14,
-  0xce, 0xab, 0xd6, 0xcb, 0x67, 0x48, 0x88, 0x98, 0x18, 0xee, 0x18, 0x59,
-  0x00, 0x41, 0xbd, 0x25, 0xdb, 0x32, 0x44, 0x8b, 0xce, 0x10, 0x35, 0x08,
-  0x73, 0xf8, 0x98, 0xc2, 0xba, 0x4a, 0xd2, 0x27, 0xed, 0x9e, 0x0a, 0xcb,
-  0x30, 0x9e, 0xa9, 0xcb, 0xa9, 0x27, 0x9e, 0x65, 0x78, 0xa8, 0xfe, 0x84,
-  0x45, 0xbb, 0x37, 0x40, 0xf3, 0x40, 0x50, 0xa4, 0xb8, 0x57, 0x50, 0xa9,
-  0x0d, 0x5c, 0x9d, 0xac, 0x21, 0x2a, 0xec, 0x20, 0x82, 0x90, 0x61, 0x6d,
-  0xf2, 0xac, 0xbc, 0x45, 0xac, 0xa5, 0x8d, 0x52, 0xae, 0xd9, 0x10, 0x9c,
-  0x65, 0xc7, 0xc2, 0x79, 0x48, 0x1a, 0x13, 0x7f, 0x57, 0x0f, 0x5c, 0x94,
-  0x03, 0x54, 0xfa, 0x74, 0xca, 0x92, 0x52, 0x97, 0x28, 0xd1, 0xb0, 0x43,
-  0x99, 0x75, 0x0c, 0xa9, 0x3b, 0xa8, 0x43, 0xc8, 0x24, 0x96, 0x92, 0xb4,
-  0xe2, 0x8b, 0xb2, 0xb9, 0xf6, 0x32, 0x53, 0x09, 0xd9, 0x8f, 0x9c, 0x3d,
-  0x97, 0xcb, 0x06, 0x96, 0x80, 0x9a, 0x83, 0x8d, 0xe4, 0x1e, 0x8b, 0xc7,
-  0x28, 0x48, 0x6e, 0xf8, 0x08, 0x04, 0xb8, 0xb2, 0x71, 0x18, 0xfb, 0x94,
-  0x50, 0x5b, 0x70, 0xf6, 0xf8, 0x39, 0xac, 0x60, 0x4d, 0x1b, 0xa1, 0xec,
-  0xa5, 0xba, 0x26, 0x40, 0x39, 0x24, 0xa9,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, 0xca, 0xb6, 0x29, 0x53, 0xad, 0xa2, 0xac, 0x7c, 0xca, 0xb0,
-  0x46, 0xb3, 0x99, 0x56, 0x3b, 0x74, 0x87, 0x33, 0xe6, 0x7d, 0x51, 0xd7,
-  0xc6, 0x28, 0xfe, 0xc0, 0xa5, 0x78, 0x5b, 0xf5, 0x07, 0xbe, 0x9f, 0xd7,
-  0xa4, 0x68, 0x3e, 0x8f, 0x38, 0x9a, 0xed, 0xce, 0x20, 0xca, 0x48, 0xea,
-  0x82, 0x16, 0xfb, 0x68, 0xe3, 0x3c, 0xdd, 0x87, 0x78, 0x15, 0x7c, 0x34,
-  0x97, 0x4d, 0x0d, 0x02, 0x16, 0xd5, 0x1b, 0x47, 0x87, 0x9b, 0xbc, 0x69,
-  0xba, 0x97, 0xae, 0x08, 0x8e, 0x67, 0x3a, 0xe0, 0x52, 0x86, 0xb0, 0x66,
-  0xde, 0x68, 0x0d, 0xa8, 0x28, 0x49, 0x51, 0x3b, 0xa1, 0xcb, 0x62, 0xed,
-  0x46, 0x01, 0x9a, 0xda, 0xad, 0x29, 0x7a, 0x39, 0xdb, 0x21, 0x88, 0x78,
-  0x75, 0x74, 0xb2, 0x76, 0x4e, 0x63, 0x96, 0x9a, 0x16, 0xfa, 0x68, 0x19,
-  0x7a, 0x4e, 0x40, 0xda, 0x4e, 0x1d, 0xfd, 0xaa, 0x03, 0xf0, 0xbc, 0x03,
-  0xb7, 0x49, 0x16, 0xf4, 0x30, 0xad, 0x27, 0x79, 0xce, 0x4e, 0x82, 0x1e,
-  0xdf, 0x80, 0xa6, 0x15, 0x03, 0x9b, 0x11, 0x08, 0xcd, 0x79, 0xca, 0xf9,
-  0x0f, 0x0e, 0xfd, 0x37, 0x18, 0x96, 0x2c, 0x40, 0x23, 0x64, 0x57, 0x8d,
-  0x2b, 0xa0, 0x7d, 0xd4, 0x59, 0xa2, 0x66, 0x6b, 0xde, 0x5a, 0x6d, 0x75,
-  0xd7, 0x28, 0x31, 0x77, 0x0b, 0x83, 0x01, 0x46, 0x40, 0x3c, 0xa5, 0x2d,
-  0x0c, 0x14, 0xbb, 0xba, 0x24, 0x41, 0x11, 0xa3, 0x3d, 0xdc, 0x7e, 0x40,
-  0x7c, 0xb6, 0x4e, 0x09, 0x7b, 0x99, 0x4a, 0x1a, 0xdd, 0x57, 0x03, 0xad,
-  0x7c, 0x6f, 0xda, 0x8e, 0x85, 0x34, 0x62, 0x58, 0x71, 0x47, 0xad, 0x04,
-  0x99, 0x27, 0xd2, 0xd0, 0xa1, 0xe4, 0xee, 0x7a, 0x80, 0xe3, 0xb7, 0x99,
-  0x55, 0xd2, 0x59, 0x8e, 0x60, 0x81, 0x2d, 0xb5, 0x22, 0xd8, 0x6d, 0x03,
-  0xb3, 0x3e, 0x00, 0xe2, 0x42, 0x84, 0x16, 0xd9, 0x2d, 0x69, 0x37, 0xb5,
-  0x68, 0xe6, 0x55, 0x95, 0x93, 0x37, 0xd6, 0xcc, 0xcc, 0xe8, 0xbc, 0x85,
-  0x38, 0x52, 0xc9, 0x77, 0x00, 0xbe, 0x9b, 0x46, 0xa0, 0x13, 0x26, 0xb8,
-  0x9d, 0x6a, 0x5b, 0x17, 0x51, 0x00, 0xd6, 0x95, 0xb0, 0x1b, 0x03, 0xda,
-  0xa0, 0x29, 0x18, 0x26, 0xa7, 0x48, 0xce, 0x4d, 0x3b, 0x6b, 0x8a, 0xac,
-  0x60, 0x2e, 0xe8, 0x62, 0xf0, 0xc0, 0xb2, 0xe5, 0xb4, 0xa9, 0xfb, 0x63,
-  0x90, 0x5b, 0x77, 0xc3, 0xdb, 0xdb, 0xdb, 0x21, 0xdd, 0x38, 0x94, 0xce,
-  0x26, 0x75, 0x4c, 0x9d, 0x4a, 0x25, 0xe7, 0xca, 0xe1, 0x9c, 0xba, 0xc0,
-  0x24, 0x73, 0x69, 0x85, 0xd5, 0x45, 0xde, 0xa0, 0x68, 0x56, 0x98, 0x0b,
-  0xaf, 0xc9, 0xa9, 0x95, 0xe9, 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0x00, 0xa7, 0x08, 0x35, 0x05, 0xea, 0x5d, 0x54,
-  0xc1, 0x76, 0xed, 0x79, 0x6a, 0xd7, 0x94, 0x45, 0x1d, 0x46, 0x00, 0xc1,
-  0x03, 0xf0, 0x1d, 0xba, 0xb2, 0x94, 0x6d, 0xff, 0x71, 0xe8, 0xcf, 0x17,
-  0x7f, 0xf2, 0xc0, 0x0b, 0x59, 0xe7, 0xe4, 0xcf, 0xf5, 0xfb, 0xbc, 0x6a,
-  0x37, 0x71, 0xca, 0x5a, 0xac, 0xae, 0xb8, 0xad, 0x02, 0x23, 0x2e, 0x47,
-  0x5d, 0x0e, 0x69, 0xdb, 0x01, 0xf3, 0x3f, 0x86, 0x7c, 0xa3, 0x22, 0x39,
-  0x76, 0xc9, 0xc1, 0x2f, 0xfc, 0x62, 0x7d, 0x38, 0x65, 0xb1, 0x32, 0x4d,
-  0x0b, 0x43, 0x09, 0x73, 0x62, 0xc3, 0xa4, 0xb3, 0xd9, 0xec, 0x8b, 0x59,
-  0xb9, 0xac, 0xef, 0xd7, 0x13, 0x69, 0x90, 0x25, 0x3d, 0x65, 0x80, 0x04,
-  0xc1, 0xa6, 0x27, 0x55, 0x26, 0x2c, 0x8b, 0x8f, 0x7a, 0x29, 0x52, 0x79,
-  0x4f, 0xcd, 0x81, 0x8f, 0xce, 0x70, 0xeb, 0xde, 0xc7, 0xfe, 0x87, 0x3f,
-  0x76, 0x94, 0xca, 0x88, 0xa5, 0x49, 0xab, 0xa4, 0x47, 0x59, 0xce, 0x2e,
-  0xc4, 0x19, 0x33, 0x9b, 0x93, 0x56, 0xf8, 0xdb, 0x0e, 0x48, 0x97, 0x07,
-  0xa3, 0x5c, 0x2b, 0xda, 0xbd, 0x4b, 0x88, 0x82, 0xa4, 0xe9, 0xa9, 0xd9,
-  0x12, 0xd3, 0x11, 0x77, 0x8f, 0xc4, 0x68, 0x93, 0xe4, 0x4c, 0x7a, 0x55,
-  0xba, 0x6b, 0x29, 0x6d, 0x21, 0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e3, 0xca, 0x74, 0x85, 0x5f, 0x20,
-  0xb4, 0x1f, 0xb7, 0xc3, 0xad, 0x66, 0xda, 0x36, 0xe3, 0x8e, 0x81, 0xce,
-  0xa5, 0xa6, 0xbd, 0x0a, 0x3a, 0xc1, 0x92, 0x32, 0x98, 0xd7, 0x73, 0xbe,
-  0x15, 0x09, 0x69, 0x46, 0x6f, 0x42, 0x4c, 0xec, 0x9f, 0x99, 0xc0, 0xfa,
-  0x6c, 0xb7, 0x45, 0xd5, 0x57, 0xd0, 0x15, 0x97, 0xf3, 0x85, 0x54, 0xdf,
-  0x3f, 0x50, 0x7d, 0x0c, 0x13, 0x7c, 0x33, 0xf9, 0x01, 0xb5, 0xc5, 0xec,
-  0xad, 0x97, 0x42, 0x3c, 0xb5, 0xca, 0x6d, 0xe9, 0x91, 0x86, 0xc2, 0x7a,
-  0xd0, 0x01, 0xa3, 0x80, 0x6c, 0x1d, 0x58, 0x0d, 0xae, 0x19, 0xd3, 0x66,
-  0x04, 0x24, 0x23, 0x3d, 0x9d, 0x59, 0xca, 0x80, 0x04, 0x29, 0x23, 0x0a,
-  0xcd, 0xc9, 0x8e, 0x35, 0x52, 0x36, 0x38, 0xa2, 0x48, 0x93, 0x66, 0x94,
-  0x4d, 0xf3, 0xba, 0x19, 0x6a, 0x24, 0xa5, 0x88, 0xb5, 0x8b, 0x3b, 0xeb,
-  0xec, 0x01, 0x6f, 0x16, 0xab, 0x9d, 0x51, 0xed, 0x16, 0x9e, 0x02, 0x81,
-  0xb5, 0x51, 0x1d, 0x92, 0x8a, 0xc9, 0xd4, 0xb9, 0x47, 0xa9, 0xb3, 0x3e,
-  0xa7, 0x0c, 0x2f, 0xc2, 0x3a, 0x53, 0x2d, 0xd4, 0xe5, 0x15, 0xff, 0x0b,
-  0x98, 0xa3, 0xa7, 0x6a, 0x89, 0x35, 0x33, 0xdf, 0x33, 0x11, 0x9c, 0x24,
-  0xbf, 0x2a, 0x2a, 0xc6, 0x51, 0xc6, 0xcc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0a,
-  0x71, 0xb1, 0x22, 0x46, 0xd4, 0x41, 0xc6, 0x1b, 0xfc, 0x01, 0xac, 0x29,
-  0x18, 0xbb, 0x75, 0x80, 0xbd, 0xbb, 0xa0, 0xe6, 0x98, 0xd9, 0x88, 0x77,
-  0x38, 0xea, 0xe4, 0x18, 0x68, 0xd7, 0x1f, 0xb2, 0x20, 0xb8, 0xaa, 0x8c,
-  0x17, 0x53, 0x3b, 0xe0, 0x5c, 0x94, 0xed, 0xd2, 0x2f, 0xcc, 0xb8, 0xb5,
-  0xfa, 0x28, 0x8a, 0x58, 0x82, 0x16, 0xb4, 0x73, 0xf3, 0xd4, 0x3a, 0x61,
-  0x40, 0x22, 0x84, 0xc9, 0x23, 0x5b, 0x9c, 0x5a, 0xd6, 0x40, 0x00, 0xef,
-  0x93, 0x70, 0xc2, 0xa0, 0x82, 0x74, 0x07, 0xca, 0x23, 0xe5, 0x47, 0x11,
-  0x88, 0x75, 0x82, 0xcd, 0x01, 0x54, 0xd0, 0xb2, 0xf2, 0xb2, 0xa2, 0xd6,
-  0xae, 0x73, 0xb3, 0xab, 0xc5, 0x1a, 0x54, 0x22, 0x77, 0xb1, 0xca, 0x77,
-  0x83, 0xc5, 0x2e, 0x67, 0x5e, 0x84, 0x2e, 0xd4, 0x1d, 0x2c, 0xc6, 0x49,
-  0x50, 0x04, 0x6e, 0x5d, 0x0a, 0x72, 0xa7, 0x48, 0x5a, 0x31, 0xaf, 0xa1,
-  0x2c, 0x92, 0xde, 0x0a, 0x1e, 0xc7, 0x1d, 0x62, 0xdf, 0xa2, 0x9f, 0x29,
-  0x11, 0xdc, 0x35, 0x14, 0xb4, 0x3d, 0x30, 0xe6, 0xe4, 0xca, 0xa7, 0x7f,
-  0x11, 0x8d, 0x63, 0xd6, 0x31, 0x6d, 0x82, 0x20, 0xa7, 0x45, 0xba, 0x2b,
-  0x48, 0xb6, 0x76, 0x7a, 0x8f, 0xc2, 0x6c, 0xf7, 0x61, 0x70, 0x77, 0x80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28, 0x6d,
-  0x99, 0xba, 0xb0, 0x94, 0x85, 0x94, 0x80, 0xc3, 0xe7, 0x21, 0x81, 0x63,
-  0xe5, 0xa7, 0xac, 0x99, 0x78, 0xbf, 0x9c, 0x66, 0xe9, 0x2c, 0xda, 0x63,
-  0x8c, 0x26, 0x8c, 0x68, 0x27, 0xcb, 0x36, 0x00, 0xca, 0x15, 0x1a, 0x3c,
-  0x97, 0xd2, 0x19, 0x4e, 0x1e, 0x2f, 0x5a, 0x48, 0x55, 0x38, 0x53, 0xe1,
-  0x4e, 0x53, 0xdf, 0x43, 0xfa, 0x35, 0xc1, 0x79, 0x4c, 0x1c, 0x6e, 0x93,
-  0x57, 0x53, 0x09, 0x5f, 0xd3, 0x9b, 0x93, 0xc4, 0x3e, 0x80, 0xbc, 0x57,
-  0x4e, 0xde, 0x0d, 0x9a, 0x2d, 0x4a, 0x34, 0x4d, 0xc0, 0x33, 0xf8, 0x9a,
-  0xd1, 0x62, 0x3c, 0x9a, 0x17, 0xf7, 0x59, 0x22, 0x19, 0xb9, 0x29, 0x47,
-  0x11, 0xc9, 0x76, 0x10, 0x1f, 0x8b, 0x70, 0xa7, 0x6f, 0x32, 0xcd, 0x76,
-  0x85, 0xf9, 0xc1, 0xe4, 0x6f, 0x2c, 0x9e, 0x08, 0x8d, 0x25, 0xb2, 0x86,
-  0xc5, 0xcc, 0xee, 0x6e, 0xfc, 0x64, 0xcc, 0x33, 0xa3, 0x48, 0x4e, 0x95,
-  0xc5, 0x70, 0xd6, 0xeb, 0xf4, 0x32, 0x53, 0x9b, 0x45, 0x44, 0x77, 0x39,
-  0x31, 0xe4, 0x43, 0xa6, 0xce, 0x2d, 0x1b, 0x14, 0x45, 0xa4, 0x50, 0x9f,
-  0xa5, 0x26, 0x49, 0x49, 0x7b, 0xe5, 0xd2, 0x31, 0x10, 0x71, 0x5b, 0xcf,
-  0xf2, 0x85, 0x86, 0x29, 0x07, 0x49, 0x26, 0x89, 0xa4, 0xd4, 0xec, 0x01,
-  0x5b, 0xb2, 0x1c, 0x46, 0x1c, 0x70, 0x9a, 0x6a, 0xa7, 0xbd, 0x00, 0x66,
-  0x64, 0x19, 0x6d, 0x74, 0x46, 0x7f, 0xb2, 0xbd, 0x83, 0xd9, 0x3e, 0xd9,
-  0x7e, 0xbe, 0xd9, 0xbe, 0x95, 0x67, 0x75, 0x36, 0x44, 0x22, 0xf2, 0x23,
-  0x2a, 0xf4, 0xe1, 0x8d, 0xa0, 0x37, 0x24, 0x75, 0x59, 0x0b, 0xf2, 0xa1,
-  0x73, 0xa3, 0xef, 0x33, 0x39, 0x28, 0xeb, 0x6b, 0x82, 0xa7, 0x0e, 0x6e,
-  0x79, 0x7a, 0x4d, 0xde, 0xe3, 0x9c, 0x46, 0xba, 0x96, 0x98, 0x52, 0x29,
-  0x5e, 0x96, 0xbe, 0xb2, 0x4c, 0x08, 0x3c, 0x67, 0x2d, 0xf0, 0x58, 0x07,
-  0x78, 0x59, 0x35, 0x17, 0x50, 0x72, 0x06, 0x07, 0x77, 0x1a, 0xb7, 0x36,
-  0xa2, 0xca, 0x9c, 0xe4, 0x75, 0x5e, 0xe4, 0xf5, 0x35, 0xb1, 0xfd, 0x9c,
-  0x92, 0x16, 0xae, 0xb2, 0x10, 0x04, 0xc8, 0x88, 0x23, 0x63, 0x02, 0xb0,
-  0xb9, 0x5f, 0xa1, 0x45, 0x0f, 0x25, 0x03, 0x33, 0xdd, 0xa5, 0x08, 0x51,
-  0x3a, 0x13, 0x03, 0x42, 0xd6, 0x2d, 0x33, 0x6a, 0x96, 0x3c, 0xaa, 0x6d,
-  0x36, 0x35, 0x70, 0x05, 0x98, 0x28, 0xf7, 0x54, 0x44, 0x4b, 0xc5, 0x58,
-  0xaf, 0xbc, 0x64, 0x83, 0x36, 0xf7, 0x74, 0x6c, 0x44, 0xd0, 0x36, 0x69,
-  0xe4, 0xb3, 0x94, 0x1a, 0x89, 0xd0, 0xdf, 0xcc, 0xcf, 0x7e, 0x34, 0xba,
-  0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x0b, 0x72,
-  0x32, 0x5b, 0x78, 0x02, 0xac, 0xcd, 0x25, 0x0a, 0x91, 0x5e, 0x04, 0xb0,
-  0x78, 0xc9, 0xd9, 0x52, 0xe7, 0x7f, 0x63, 0xad, 0x4c, 0x6a, 0x3b, 0x14,
-  0x47, 0x16, 0x0e, 0x8e, 0x8c, 0x7a, 0x17, 0x25, 0xaf, 0xa8, 0x39, 0x3b,
-  0x5f, 0xe5, 0xc4, 0x6f, 0x81, 0x9c, 0xf6, 0xcb, 0x9b, 0xf8, 0x3a, 0x22,
-  0x35, 0xae, 0xca, 0xae, 0x96, 0x74, 0xd1, 0x81, 0x4c, 0x1b, 0x8a, 0x1b,
-  0xaf, 0x4f, 0x2c, 0xf2, 0x05, 0x7a, 0xba, 0x19, 0x7b, 0x2e, 0x68, 0x66,
-  0x6d, 0xde, 0x42, 0xd7, 0xf5, 0x65, 0x61, 0xa8, 0xd5, 0x2c, 0x29, 0x17,
-  0x45, 0x20, 0xf3, 0x8c, 0xf8, 0xfa, 0x0b, 0x02, 0x40, 0xa5, 0xac, 0x9c,
-  0xbb, 0x90, 0x4d, 0xad, 0xe5, 0x9d, 0x64, 0x97, 0x81, 0xed, 0x92, 0x21,
-  0xff, 0x91, 0xee, 0x05, 0x4e, 0x29, 0x6c, 0x54, 0x02, 0x48, 0x7f, 0xde,
-  0x7c, 0x9e, 0xfd, 0x91, 0x42, 0x01, 0x72, 0x94, 0xa1, 0xad, 0x80, 0x2a,
-  0x98, 0x42, 0x77, 0x38, 0xc0, 0x46, 0xab, 0xf6, 0x24, 0x79, 0xdc, 0x6c,
-  0xd1, 0x72, 0xeb, 0xb7, 0x01, 0x43, 0xe4, 0x73, 0xb5, 0xaa, 0x00, 0x23,
-  0xa6, 0x35, 0x97, 0xc4, 0xd5, 0x61, 0xdb, 0x7a, 0x5c, 0x01, 0xac, 0x55,
-  0xff, 0xc5, 0x1a, 0xbc, 0x24, 0xfa, 0x22, 0x10, 0x93, 0x00, 0xd8, 0x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d9, 0xdc,
-  0x35, 0x6b, 0x8f, 0x5a, 0xb5, 0xfa, 0x26, 0x38, 0xad, 0xab, 0xf1, 0x52,
-  0xda, 0x51, 0xa8, 0xd6, 0x52, 0x1c, 0x12, 0x07, 0x54, 0x66, 0x53, 0x1d,
-  0xba, 0x35, 0xa2, 0xac, 0x84, 0x0e, 0x98, 0x68, 0x82, 0x61, 0xe4, 0x50,
-  0x53, 0x56, 0xac, 0xe0, 0x36, 0xbb, 0xf8, 0xe2, 0x2b, 0xf2, 0x67, 0xdd,
-  0xa1, 0xc1, 0x12, 0x6b, 0xb3, 0x44, 0xb8, 0x2d, 0xf4, 0x5b, 0x4a, 0xbc,
-  0x45, 0x74, 0x07, 0x29, 0xab, 0xfe, 0x61, 0xbd, 0x9a, 0x55, 0x6f, 0xc8,
-  0xcb, 0xb2, 0x5c, 0x39, 0x22, 0x51, 0x85, 0xbb, 0x71, 0x80, 0x2e, 0x5e,
-  0x32, 0x3b, 0xa7, 0x78, 0xbb, 0x8a, 0x7c, 0x66, 0x09, 0x77, 0xc1, 0xf0,
-  0x59, 0x88, 0xe1, 0xa3, 0x20, 0xde, 0xca, 0xb6, 0xb9, 0xde, 0x34, 0x5f,
-  0x0c, 0xb4, 0xa4, 0x33, 0xd2, 0x34, 0xcf, 0xad, 0x81, 0x8f, 0x21, 0xb8,
-  0x82, 0xfe, 0xfa, 0x47, 0xfb, 0x3a, 0xfd, 0x61, 0x4e, 0x31, 0x5a, 0x96,
-  0xac, 0x58, 0xcd, 0xf1, 0xa5, 0xfd, 0xe2, 0x16, 0xd2, 0x0f, 0x6c, 0x98,
-  0x75, 0x7d, 0xc0, 0xfa, 0xf5, 0x1f, 0xd7, 0x5b, 0x71, 0x2a, 0xc4, 0x90,
-  0x38, 0x48, 0x35, 0x2d, 0x03, 0x75, 0x96, 0x72, 0xf1, 0x25, 0xca, 0x44,
-  0xb3, 0xef, 0x99, 0x38, 0x69, 0xdb, 0x89, 0xce, 0xfd, 0xa7, 0x35,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 0x6f, 0x94, 0x16, 0x34,
-  0x47, 0x0c, 0xd1, 0x50, 0x5d, 0x24, 0xda, 0xb1, 0x8f, 0x3c, 0x43, 0x87,
-  0xd3, 0xa6, 0xca, 0x27, 0x1f, 0x01, 0x88, 0x56, 0x37, 0x4b, 0xa8, 0x74,
-  0x69, 0xe1, 0xcf, 0xd2, 0x36, 0xfa, 0x98, 0x96, 0xa0, 0x74, 0x5c, 0xfb,
-  0x24, 0x15, 0x89, 0x5c, 0x06, 0x84, 0xbf, 0xad, 0xb3, 0xe1, 0xd5, 0xd8,
-  0xb3, 0x62, 0xd5, 0x34, 0x2a, 0x83, 0xc4, 0xce, 0x2e, 0x22, 0x5d, 0x01,
-  0xcc, 0x31, 0x26, 0x00, 0x0e, 0xf2, 0xb5, 0xdd, 0x0a, 0xb4, 0xd8, 0x7a,
-  0x95, 0x71, 0x67, 0x92, 0x91, 0x31, 0x45, 0xe7, 0x54, 0x11, 0x80, 0x34,
-  0x5b, 0x59, 0xb2, 0x90, 0xc7, 0x48, 0xb6, 0xab, 0xfc, 0x26, 0x9a, 0x65,
-  0xa1, 0x13, 0x9b, 0x33, 0xde, 0x05, 0xcf, 0x42, 0x53, 0x8e, 0x15, 0xeb,
-  0x28, 0x11, 0x97, 0x74, 0x42, 0x50, 0x70, 0x76, 0xfb, 0x82, 0x13, 0x3c,
-  0x23, 0x95, 0x95, 0x80, 0xbc, 0x0a, 0x6e, 0xb6, 0xfe, 0xad, 0xd1, 0x7d,
-  0xf6, 0xd7, 0x6c, 0x3f, 0x0d, 0x49, 0x8a, 0xca, 0x3a, 0x9c, 0x03, 0x23,
-  0xa3, 0x28, 0x87, 0xd1, 0x1e, 0x92, 0xac, 0xb8, 0x37, 0x2a, 0xb7, 0x6c,
-  0xbd, 0x4d, 0x98, 0xd5, 0x6c, 0xeb, 0x5f, 0x06, 0x80, 0x36, 0xb9, 0x0e,
-  0xab, 0xfc, 0x68, 0x4a, 0x3f, 0x0e, 0x0f, 0xf1, 0xf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 0x03, 0xe6, 0xe9, 0x40, 0x30, 0xf0, 0x42, 0x74,
-  0x95, 0x79, 0xa5, 0xc0, 0x42, 0xad, 0x24, 0x52, 0x62, 0xdc, 0xc5, 0xf2,
-  0x62, 0x3e, 0x7d, 0x9a, 0xbc, 0x34, 0x7f, 0x04, 0x5a, 0xeb, 0x98, 0xd3,
-  0x73, 0x0f, 0x29, 0x2c, 0x41, 0x39, 0x43, 0x8c, 0x28, 0xcc, 0xb5, 0x42,
-  0xb6, 0x2b, 0xd3, 0xde, 0xae, 0xd9, 0xf2, 0xbb, 0x54, 0x61, 0x42, 0xa7,
-  0xe6, 0x50, 0x34, 0xc8, 0xe5, 0xeb, 0x01, 0x60, 0x72, 0x49, 0xa2, 0xb4,
-  0xe6, 0x9d, 0xdd, 0xcf, 0x13, 0xaa, 0xe5, 0x78, 0xf3, 0xea, 0x69, 0x32,
-  0xb9, 0xce, 0x26, 0x1f, 0xeb, 0xe5, 0xdc, 0x32, 0x09, 0xf1, 0x28, 0x45,
-  0x96, 0x68, 0x9e, 0x01, 0x74, 0x86, 0x99, 0xf8, 0x2c, 0x9f, 0x50, 0x25,
-  0xe5, 0xa0, 0x15, 0xef, 0xbb, 0xd4, 0x78, 0x9f, 0x67, 0xd6, 0xdb, 0x7b,
-  0x18, 0xf9, 0x17, 0x9c, 0xa4, 0x14, 0xd9, 0x00, 0x43, 0x03, 0xf3, 0x79,
-  0xea, 0xe3, 0x61, 0x0c, 0x9d, 0x95, 0x3e, 0xf0, 0xe7, 0xed, 0x30, 0x02,
-  0x49, 0xca, 0xed, 0xd1, 0x8b, 0x1e, 0x84, 0xe4, 0x16, 0xaa, 0x19, 0x15,
-  0x7f, 0x59, 0xd0, 0x6c, 0x18, 0x58, 0x64, 0x36, 0xd1, 0x24, 0x09, 0x59,
-  0x4b, 0xc3, 0xa2, 0xc1, 0xc7, 0xe9, 0xc9, 0x2d, 0x7a, 0x42, 0x5a, 0x44,
-  0x91, 0x44, 0x06, 0xb6, 0x07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 0x25, 0x69, 0xab, 0x9a, 0xdc, 0xac, 0x89, 0x88, 0xad, 0xbd, 0x2d,
-  0x19, 0xc7, 0xbe, 0xeb, 0x51, 0xbc, 0x2d, 0x7e, 0xd9, 0x19, 0xdd, 0xd5,
-  0x33, 0xba, 0xf7, 0x5b, 0x9f, 0xd1, 0xbd, 0x5f, 0x7a, 0x46, 0x45, 0xbe,
-  0xc5, 0x4f, 0x68, 0xdf, 0x69, 0x0d, 0xd4, 0x79, 0x77, 0x7a, 0xc5, 0x83,
-  0xdf, 0x4e, 0xc2, 0x18, 0x32, 0x1a, 0xc7, 0x50, 0x1c, 0x41, 0x43, 0xae,
-  0x38, 0x8e, 0x15, 0xdb, 0xf1, 0x19, 0x56, 0x04, 0xcd, 0x41, 0x72, 0xcc,
-  0xe0, 0xf0, 0x3e, 0x2e, 0xe5, 0x09, 0x97, 0x2b, 0x4b, 0x18, 0xc1, 0xd5,
-  0xa8, 0x44, 0x20, 0x0d, 0xf2, 0x09, 0xe1, 0xd4, 0xcd, 0x00, 0x40, 0x85,
-  0x20, 0x06, 0x9c, 0x10, 0xb6, 0x3b, 0xdd, 0x12, 0x51, 0x9a, 0xe4, 0x60,
-  0x41, 0x55, 0xc7, 0x46, 0xe7, 0xb8, 0x53, 0xc7, 0x0e, 0x31, 0x58, 0x98,
-  0xdc, 0x55, 0x02, 0x32, 0x40, 0x2b, 0x19, 0x3a, 0xd3, 0xa1, 0x81, 0x19,
-  0x42, 0x72, 0x46, 0x9c, 0xcf, 0xf0, 0xeb, 0x05, 0xb5, 0x50, 0x31, 0x0c,
-  0x7e, 0x15, 0x74, 0x29, 0xba, 0xb8, 0x6f, 0x22, 0x75, 0x75, 0xb4, 0x6e,
-  0xc4, 0x06, 0x36, 0x58, 0x51, 0x35, 0xd7, 0x88, 0x21, 0xe4, 0xa6, 0x31,
-  0xde, 0x3f, 0x02, 0x0a, 0x39, 0x43, 0xe1, 0x93, 0x8d, 0x54, 0xa0, 0xbb,
-  0xcc, 0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, 0x8a, 0xb4, 0x75, 0x20, 0xe7, 0x56, 0x24, 0x97, 0x4b, 0x3b, 0xbd,
-  0xb8, 0x46, 0x60, 0x5e, 0xe6, 0x91, 0x6b, 0xd2, 0x92, 0xe8, 0x02, 0xa3,
-  0x01, 0xf4, 0x60, 0x90, 0xd6, 0x32, 0x2e, 0xee, 0xb5, 0xcd, 0xa9, 0xf5,
-  0x6b, 0x5b, 0x55, 0x36, 0x30, 0xb0, 0xbd, 0x82, 0x5f, 0x07, 0x49, 0xd5,
-  0x0a, 0x16, 0x58, 0xf8, 0x40, 0xf9, 0x40, 0xed, 0x21, 0x8e, 0x07, 0xd8,
-  0x0d, 0x0e, 0x00, 0x97, 0x06, 0xe6, 0x7e, 0x79, 0xd1, 0x2d, 0xe6, 0xdb,
-  0x92, 0x61, 0x44, 0xa8, 0xa3, 0xe3, 0x92, 0x32, 0x79, 0x70, 0xfc, 0x05,
-  0x0e, 0x40, 0x10, 0x00, 0xba, 0xe8, 0x30, 0x16, 0x63, 0x8f, 0x68, 0x3f,
-  0xba, 0x4e, 0xef, 0xee, 0x46, 0x75, 0xb6, 0x65, 0xb8, 0xb6, 0xde, 0xaa,
-  0xeb, 0x19, 0x7d, 0xb4, 0x06, 0x9c, 0xdd, 0xca, 0x66, 0xd1, 0x77, 0xf7,
-  0x96, 0x81, 0x44, 0x38, 0x4f, 0x52, 0x7a, 0xb5, 0x25, 0x6c, 0x5d, 0xb7,
-  0x68, 0xee, 0xb7, 0xd6, 0xcd, 0xc1, 0x66, 0x04, 0x6f, 0xf2, 0x7b, 0xfb,
-  0xa5, 0xcb, 0x2c, 0x19, 0x5c, 0xaa, 0x9b, 0x1d, 0xc6, 0x75, 0x25, 0x48,
-  0x08, 0xb2, 0xbb, 0xea, 0xab, 0x95, 0x49, 0xe4, 0xac, 0xfa, 0xd1, 0x66,
-  0x43, 0x16, 0x5b, 0x53, 0xc2, 0x4d, 0xb7, 0x04, 0xab, 0x08, 0x1d, 0x14,
-  0xcd, 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0x89, 0xb3, 0x01, 0xce, 0x67, 0xdd, 0x0c, 0x23, 0x00,
-  0xba, 0x0c, 0xb8, 0x78, 0x76, 0x7a, 0xb6, 0xb7, 0x69, 0x0b, 0xce, 0xb9,
-  0x7a, 0x42, 0xe0, 0x26, 0x2c, 0x00, 0xa3, 0x45, 0xa2, 0x50, 0xb4, 0x6b,
-  0xd4, 0x3d, 0x86, 0xb6, 0x25, 0xd0, 0xd3, 0x21, 0x5a, 0xf0, 0x3d, 0x38,
-  0xfc, 0x5d, 0xd5, 0x8d, 0xd7, 0x54, 0xd2, 0x1d, 0x4b, 0x07, 0x38, 0xf9,
-  0x59, 0x88, 0xd3, 0x53, 0x6b, 0x8a, 0x3e, 0x40, 0x6e, 0x86, 0xa8, 0xa7,
-  0x4c, 0xda, 0x1d, 0x5a, 0xa8, 0xc3, 0x47, 0x67, 0x92, 0x9c, 0x78, 0x14,
-  0x49, 0xe9, 0x92, 0x20, 0xaf, 0x7b, 0x10, 0x01, 0x09, 0x2d, 0x2f, 0xe5,
-  0xfb, 0xd6, 0x66, 0x5b, 0x90, 0xb7, 0x94, 0xd8, 0x96, 0x41, 0xaa, 0x47,
-  0xb1, 0x92, 0x66, 0x69, 0x10, 0x28, 0x8d, 0x42, 0x5a, 0x16, 0x99, 0x34,
-  0x7f, 0x4b, 0x93, 0xb7, 0x27, 0xe3, 0x73, 0x3f, 0x86, 0x04, 0x3d, 0x2c,
-  0x48, 0x20, 0x6c, 0x23, 0xe5, 0x79, 0x89, 0x45, 0x27, 0xc7, 0xe3, 0xf3,
-  0x51, 0xac, 0x05, 0xc6, 0x7e, 0x32, 0xa6, 0xe2, 0x25, 0x0f, 0x78, 0x84,
-  0xb3, 0x17, 0x19, 0x90, 0x8c, 0x83, 0x63, 0x0a, 0x40, 0x97, 0x57, 0x5e,
-  0x56, 0x56, 0xc8, 0xa9, 0x34, 0xc5, 0x3f, 0x72, 0xde, 0xb7, 0xe4, 0x8c,
-  0x6b, 0x88, 0xa8, 0x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x66, 0xd2,
-  0x8b, 0xc6, 0x27, 0x18, 0xee, 0xd7, 0xcb, 0x56, 0x5a, 0x4b, 0xce, 0x1d,
-  0x5c, 0x09, 0x8e, 0x65, 0x10, 0x31, 0x76, 0xd8, 0xa5, 0x30, 0x2d, 0x03,
-  0x37, 0xac, 0xad, 0xf9, 0xe5, 0x93, 0x40, 0xd8, 0x27, 0x32, 0x72, 0x2b,
-  0x19, 0x28, 0x50, 0x94, 0xeb, 0x64, 0x6f, 0x7b, 0xc7, 0x58, 0x4a, 0xdb,
-  0xbb, 0xe8, 0xcd, 0xbd, 0xb7, 0xbd, 0x67, 0xb1, 0x23, 0x5a, 0x67, 0x44,
-  0x2a, 0x68, 0xc8, 0x17, 0xc2, 0x16, 0xa8, 0x39, 0x48, 0x77, 0x77, 0x61,
-  0xd3, 0x8f, 0xac, 0x5d, 0x44, 0x31, 0xb4, 0x95, 0x9c, 0xe1, 0x54, 0x1d,
-  0x21, 0x11, 0xac, 0x0b, 0xfb, 0x7c, 0x72, 0xdd, 0x34, 0x55, 0x20, 0x01,
-  0x6e, 0x65, 0xd4, 0xd7, 0x14, 0xac, 0xe9, 0x22, 0xca, 0xc9, 0x86, 0xfb,
-  0x08, 0x3c, 0xd8, 0x44, 0xa2, 0x8a, 0x00, 0x59, 0x99, 0x95, 0xde, 0xf5,
-  0x15, 0x1f, 0xb8, 0x4e, 0x88, 0x16, 0xf1, 0x55, 0x05, 0x8d, 0xd6, 0xe0,
-  0x68, 0xa7, 0xdb, 0x7d, 0xca, 0xf6, 0x30, 0xcc, 0x4d, 0x44, 0x0c, 0x4e,
-  0x32, 0xff, 0x42, 0x93, 0xf3, 0xf8, 0x5f, 0x7b, 0x51, 0x63, 0x5d, 0xf0,
-  0x64, 0xc8, 0x03, 0x6a, 0x55, 0x38, 0xa7, 0xc3, 0xb5, 0xa2, 0xba, 0xec,
-  0x07, 0xe1, 0xe7, 0x63, 0x6e, 0x7a, 0x76, 0x0a, 0x38, 0x27, 0x41, 0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b, 0x95, 0x61, 0x4d, 0x27, 0x7f, 0xb5, 0x43, 0x88,
-  0x9e, 0xd9, 0xc3, 0x92, 0x62, 0x1c, 0x4e, 0xf8, 0xfe, 0xc2, 0x7e, 0xd3,
-  0xb3, 0x64, 0x03, 0x13, 0xde, 0xda, 0xda, 0x7c, 0x78, 0xd2, 0xf2, 0xe4,
-  0x43, 0x93, 0x3c, 0x63, 0x47, 0x9c, 0xd7, 0xa2, 0xe6, 0xd2, 0x9b, 0x03,
-  0x7d, 0xd3, 0x03, 0x8c, 0x19, 0x30, 0x47, 0x4a, 0xaa, 0x25, 0x39, 0xcc,
-  0xef, 0x23, 0xe5, 0x63, 0x88, 0xac, 0xa6, 0xb2, 0xc0, 0xf6, 0xda, 0xc5,
-  0x4d, 0xc3, 0x08, 0xa1, 0x22, 0x42, 0x28, 0x37, 0x10, 0x90, 0x8d, 0x07,
-  0x86, 0x09, 0x43, 0x7d, 0xd3, 0x4d, 0xcb, 0x5b, 0x1c, 0x5c, 0x32, 0x9d,
-  0x68, 0x13, 0x4e, 0xa1, 0xfa, 0xcc, 0x38, 0x2e, 0x15, 0xa9, 0x0e, 0xd2,
-  0xa7, 0x6d, 0x86, 0x31, 0x9c, 0x06, 0x11, 0x94, 0x75, 0x7e, 0xd2, 0x75,
-  0xdc, 0x8e, 0xb4, 0x67, 0x69, 0x85, 0x10, 0x78, 0x40, 0x23, 0x51, 0x3f,
-  0xba, 0x35, 0x33, 0xc4, 0xb9, 0x1f, 0x04, 0x71, 0xd5, 0xc6, 0x69, 0x15,
-  0x86, 0x9e, 0x30, 0x37, 0xcb, 0xdf, 0xa0, 0xd8, 0x34, 0xab, 0x27, 0x55,
-  0x7e, 0xc1, 0x3f, 0x6d, 0x11, 0x73, 0xc0, 0x67, 0x14, 0x50, 0x50, 0x31,
-  0x5d, 0x1d, 0x8d, 0x58, 0x43, 0x2c, 0x13, 0x4b, 0xc3, 0x95, 0x39, 0xa8,
-  0x36, 0x09, 0x95, 0x83, 0x22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f, 0x85, 0x15, 0x73, 0x9b, 0xd1, 0x96, 0x6b, 0x3b, 0xed, 0xc6,
-  0xdd, 0xed, 0x2f, 0x75, 0x86, 0xfe, 0x9e, 0x90, 0x13, 0xec, 0x16, 0x63,
-  0x37, 0x5a, 0x9b, 0xdc, 0x01, 0xbd, 0x11, 0x2f, 0x03, 0x11, 0x62, 0x84,
-  0x27, 0x02, 0xd6, 0xa5, 0x3c, 0x12, 0xbb, 0x2a, 0x55, 0x8c, 0xc8, 0xd3,
-  0x96, 0x72, 0x6f, 0x5e, 0x7e, 0xd9, 0xfb, 0x86, 0x2d, 0x83, 0x2b, 0x57,
-  0xb7, 0xcf, 0x76, 0xbb, 0x33, 0x7a, 0x04, 0x41, 0xdc, 0xfa, 0xdd, 0x0f,
-  0x03, 0x9b, 0xce, 0x26, 0x4b, 0xd4, 0x13, 0x41, 0x02, 0x1d, 0x09, 0x17,
-  0x6e, 0x7c, 0x90, 0xbf, 0xd0, 0x19, 0xf8, 0x21, 0x2f, 0x8c, 0x4e, 0x58,
-  0x6f, 0x2a, 0x73, 0x4a, 0x62, 0x66, 0x78, 0x6a, 0xab, 0x75, 0xea, 0x0f,
-  0x6d, 0x64, 0x8d, 0x4b, 0x52, 0x25, 0x95, 0x99, 0x43, 0x8b, 0x81, 0x10,
-  0xf2, 0xba, 0x24, 0xdf, 0x2f, 0x82, 0xda, 0xb1, 0x89, 0x15, 0x37, 0x18,
-  0x03, 0x30, 0xe8, 0xc6, 0x20, 0x28, 0xf2, 0x3b, 0x97, 0xdf, 0x62, 0x91,
-  0x07, 0xfd, 0x90, 0xbf, 0x11, 0x81, 0x74, 0x51, 0x45, 0x66, 0x17, 0x04,
-  0x5b, 0x89, 0xba, 0x58, 0xe7, 0xc6, 0xd3, 0xcd, 0xe4, 0xb2, 0x59, 0x6c,
-  0xec, 0x6c, 0x72, 0x4f, 0x0c, 0x86, 0x65, 0xf0, 0x3b, 0x24, 0x87, 0xfe,
-  0x1b, 0xca, 0xab, 0x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0xcf, 0xb5, 0x39, 0x1c, 0x45, 0x06, 0x33, 0x4a, 0x05, 0x8f, 0x63, 0x43,
-  0xd9, 0xfd, 0xb0, 0x7d, 0x99, 0xa6, 0xdc, 0x1b, 0x48, 0x72, 0xb3, 0x52,
-  0xee, 0x1a, 0x4a, 0x09, 0x4a, 0x28, 0x0c, 0x95, 0xb0, 0x61, 0xac, 0x5f,
-  0x1e, 0xda, 0x48, 0x98, 0x23, 0xd0, 0x63, 0xd4, 0x1a, 0xbb, 0x7b, 0xc7,
-  0x37, 0xbc, 0x95, 0x08, 0x43, 0x42, 0x68, 0xab, 0x1b, 0x36, 0x22, 0x6f,
-  0x6f, 0x77, 0xfd, 0x67, 0x56, 0xe5, 0x6d, 0x74, 0x00, 0xc1, 0x8a, 0x72,
-  0x98, 0xce, 0x16, 0xd1, 0x0c, 0xcf, 0xf1, 0x66, 0xab, 0x75, 0xee, 0xc1,
-  0xc9, 0xd9, 0x5b, 0x60, 0x45, 0x52, 0x17, 0x86, 0xa2, 0xe6, 0x7c, 0x1a,
-  0xfa, 0x19, 0x95, 0x6f, 0x14, 0x0c, 0xa9, 0x8a, 0xcc, 0xaa, 0x69, 0x08,
-  0x2d, 0xc0, 0x51, 0x71, 0x32, 0x1c, 0x62, 0x96, 0x15, 0xe7, 0xb4, 0x15,
-  0x89, 0x57, 0xdd, 0xcb, 0x02, 0x5e, 0x2d, 0x8b, 0xee, 0x72, 0xcc, 0x57,
-  0xdd, 0xb7, 0xb5, 0x61, 0x8b, 0xad, 0xc1, 0x6b, 0xbf, 0x6b, 0xe1, 0x32,
-  0x4b, 0xc5, 0xc6, 0x0c, 0xe4, 0x79, 0x93, 0x59, 0x50, 0x4e, 0xb1, 0xe8,
-  0x6c, 0x8c, 0x5c, 0xfc, 0x49, 0x92, 0x4e, 0x04, 0xd0, 0x16, 0x85, 0x87,
-  0x88, 0xab, 0x13, 0x36, 0x81, 0xd1, 0x10, 0xb6, 0x58, 0x14, 0x5d, 0xac,
-  0x39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0, 0x58,
-  0x22, 0x72, 0x61, 0x5b, 0xef, 0xb9, 0xf1, 0x8f, 0x8d, 0x78, 0x37, 0xfa,
-  0x0f, 0x4d, 0x9b, 0x64, 0x7c, 0x72, 0x2c, 0xfb, 0x77, 0x28, 0x03, 0x8c,
-  0x8e, 0x47, 0xe2, 0x30, 0x32, 0x43, 0xd4, 0x03, 0xbb, 0xb0, 0x36, 0x60,
-  0xe9, 0xf3, 0x60, 0xef, 0x84, 0xd9, 0xf2, 0x69, 0x14, 0x79, 0x46, 0x0f,
-  0xa5, 0x34, 0x07, 0x97, 0x28, 0x13, 0x1d, 0x23, 0x85, 0xbc, 0x3a, 0x7e,
-  0x65, 0x16, 0x4a, 0x56, 0xc6, 0x95, 0x39, 0x3f, 0x5f, 0xdf, 0x27, 0x3d,
-  0xc7, 0x92, 0x94, 0x5d, 0x17, 0x89, 0x87, 0x6f, 0x86, 0x70, 0x7d, 0x7d,
-  0x3c, 0x42, 0x82, 0x27, 0xf5, 0x1a, 0x62, 0x4a, 0x96, 0x84, 0xf4, 0x22,
-  0x8b, 0xbb, 0x92, 0xc8, 0x14, 0x00, 0x44, 0xc0, 0xf5, 0xd2, 0x70, 0x2a,
-  0xa9, 0x29, 0xdc, 0x39, 0x90, 0x93, 0xcf, 0x4b, 0x32, 0x0f, 0x20, 0x6e,
-  0x69, 0xc2, 0xde, 0x8c, 0x03, 0x2e, 0xe0, 0xd0, 0x43, 0x9d, 0x19, 0x11,
-  0xca, 0x15, 0x8e, 0x17, 0x55, 0xf9, 0x31, 0x63, 0x79, 0x01, 0xa3, 0x10,
-  0x88, 0x71, 0xac, 0x03, 0x8b, 0x07, 0xdd, 0xdc, 0x50, 0xdc, 0x1d, 0x88,
-  0xb2, 0x4c, 0x82, 0x50, 0x39, 0xf7, 0x2a, 0x16, 0xa8, 0x19, 0x77, 0x8f,
-  0xe5, 0x78, 0x1d, 0x18, 0x2f, 0xda, 0xd0, 0x87, 0x8f, 0xda, 0x84, 0x92,
-  0x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 0x77, 0xf6, 0x75, 0xcc, 0x79, 0xde, 0xee, 0x98, 0xe3,
-  0xf3, 0x46, 0x14, 0xa3, 0xee, 0x87, 0x8a, 0x80, 0x22, 0xd4, 0xb3, 0x59,
-  0xca, 0x43, 0x3e, 0x8c, 0x4d, 0xdd, 0x4c, 0x29, 0x33, 0x54, 0x7b, 0xe9,
-  0x32, 0x87, 0xd1, 0x01, 0xfc, 0xcf, 0xbf, 0x87, 0xce, 0x88, 0x3f, 0xff,
-  0x8c, 0x00, 0x24, 0x3a, 0x72, 0x5b, 0xc2, 0xe9, 0xd5, 0x58, 0xb7, 0xae,
-  0xde, 0xbf, 0x2e, 0x4b, 0xc9, 0x95, 0x91, 0x28, 0x58, 0x4f, 0x3f, 0x38,
-  0xba, 0xaf, 0xd6, 0x7f, 0xb7, 0x6e, 0x5b, 0x6c, 0xb2, 0xf3, 0x5d, 0x72,
-  0xca, 0x45, 0x19, 0x94, 0x59, 0xdb, 0x2d, 0xe1, 0xfe, 0x20, 0x81, 0x8b,
-  0xd7, 0xe9, 0xbb, 0xec, 0x2b, 0xbe, 0x40, 0x71, 0x1e, 0x70, 0x16, 0xbc,
-  0x42, 0x35, 0x81, 0x0c, 0x56, 0x28, 0x4d, 0x8d, 0xda, 0x99, 0x59, 0x06,
-  0xaa, 0x06, 0x7e, 0x9f, 0xc1, 0x86, 0x19, 0x31, 0xb2, 0x48, 0x5e, 0xf4,
-  0x04, 0x56, 0xd6, 0x24, 0xb1, 0xf1, 0x3f, 0x8d, 0x70, 0x19, 0x34, 0xb7,
-  0xe5, 0xdf, 0xfd, 0x08, 0xca, 0x9a, 0xd9, 0xa9, 0x64, 0x8d, 0x16, 0xf1,
-  0xe1, 0x77, 0x3b, 0x54, 0x5a, 0xbb, 0xf6, 0x59, 0x28, 0x4b, 0x97, 0xa8,
-  0xe1, 0x65, 0x89, 0x65, 0x6d, 0x80, 0x55, 0xb8, 0xf9, 0xf6, 0x93, 0x04,
-  0x06, 0x32, 0x20, 0x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0x82, 0x7c, 0x5a, 0x54, 0xb9, 0x40, 0x69, 0x35, 0x05, 0x61,
-  0x10, 0x1a, 0xfe, 0xd8, 0x1a, 0x8d, 0xb6, 0x48, 0x29, 0xd8, 0x32, 0xff,
-  0xc9, 0xbd, 0x86, 0x7a, 0xdd, 0xde, 0xd7, 0xe6, 0x12, 0xa1, 0x6f, 0x51,
-  0x18, 0x81, 0x82, 0xe9, 0xb3, 0x7b, 0xbf, 0x0b, 0xee, 0x5f, 0x97, 0x28,
-  0x3c, 0xa1, 0x2e, 0xcc, 0x15, 0x10, 0x8d, 0xb2, 0x79, 0xc7, 0xc2, 0x0a,
-  0xac, 0x11, 0x0e, 0xab, 0xd7, 0x82, 0x97, 0xa6, 0xad, 0x79, 0x5d, 0x57,
-  0x08, 0xf6, 0xe0, 0xd3, 0x22, 0xf2, 0x46, 0x51, 0x6a, 0x01, 0x78, 0x95,
-  0xae, 0xf4, 0x09, 0x3e, 0xd9, 0xed, 0x6c, 0x5f, 0x6e, 0x36, 0x7c, 0xba,
-  0x58, 0x5e, 0x00, 0xdc, 0x9e, 0x72, 0xef, 0xc3, 0xea, 0x5d, 0x69, 0x05,
-  0x10, 0xb4, 0x64, 0x5d, 0xd6, 0x59, 0x60, 0x53, 0x78, 0x6d, 0x99, 0xa5,
-  0xd2, 0x28, 0x50, 0x5d, 0xf9, 0x23, 0xc8, 0xe1, 0x95, 0xda, 0x1c, 0xb0,
-  0x43, 0x46, 0xca, 0xa4, 0x6d, 0xd0, 0x7e, 0x01, 0xff, 0x3b, 0x65, 0x00,
-  0xc3, 0x01, 0x24, 0x29, 0x81, 0x31, 0xcf, 0xb9, 0xf5, 0x5b, 0xdb, 0xfb,
-  0xca, 0x9b, 0x82, 0x59, 0x33, 0xf5, 0x07, 0x30, 0x94, 0x7f, 0x75, 0xf4,
-  0x4e, 0xcc, 0x5b, 0x00, 0x26, 0x91, 0x66, 0xc5, 0xca, 0x54, 0xd0, 0x90,
-  0x02, 0xce, 0xb0, 0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x9c, 0xe2, 0x3f, 0xfc, 0x0f, 0xe2, 0x34, 0x00, 0x53, 0x76, 0x77,
-  0x81, 0x18, 0x2a, 0x21, 0xb6, 0xda, 0xe4, 0xe6, 0xad, 0x9c, 0x69, 0x70,
-  0x91, 0x37, 0x68, 0x9d, 0xa2, 0x56, 0x64, 0xfb, 0x68, 0xa2, 0xcd, 0x61,
-  0x85, 0xb7, 0xa2, 0x15, 0xf0, 0xa3, 0xe4, 0x3f, 0x80, 0x81, 0x29, 0x6f,
-  0x73, 0x11, 0x06, 0x92, 0x21, 0xbe, 0x3e, 0x7a, 0x7d, 0xfa, 0xee, 0xa8,
-  0x5d, 0x9c, 0xd8, 0x00, 0x61, 0x2b, 0x41, 0xb0, 0xbf, 0x3b, 0x3b, 0x86,
-  0x15, 0x14, 0xd0, 0x03, 0xc9, 0x54, 0xc8, 0xc9, 0xee, 0x4f, 0xce, 0x7e,
-  0x78, 0x65, 0x67, 0x47, 0x5a, 0x42, 0xc1, 0xbd, 0xf8, 0x64, 0xd0, 0x01,
-  0x53, 0xba, 0x7b, 0xb5, 0x93, 0x16, 0x40, 0x2d, 0x07, 0x4b, 0x49, 0x64,
-  0xd0, 0xf9, 0x21, 0xc5, 0x82, 0x13, 0x63, 0xb4, 0x30, 0x1f, 0x9d, 0x1a,
-  0xea, 0x9a, 0x0a, 0xed, 0xed, 0xa0, 0x81, 0xde, 0xcb, 0xd6, 0x11, 0xc3,
-  0x4b, 0x71, 0x22, 0x71, 0x9a, 0x00, 0xbe, 0x8f, 0x10, 0xfd, 0x46, 0x49,
-  0xf8, 0x21, 0x4d, 0x0a, 0xc1, 0x57, 0x62, 0x02, 0xfb, 0x9a, 0x72, 0xb2,
-  0x11, 0x08, 0xe1, 0xdb, 0x8e, 0x1c, 0x2e, 0xc4, 0xb4, 0x16, 0x34, 0x76,
-  0xc0, 0x50, 0x8b, 0x12, 0xee, 0xf1, 0x09, 0x19, 0x89, 0x90, 0x9b, 0x6f,
-  0x6e, 0xd4,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d,
-  0xd1, 0xb9, 0x21, 0xba, 0xf9, 0x36, 0x2f, 0x86, 0x6d, 0x53, 0x82, 0x80,
-  0xca, 0x32, 0xc5, 0x34, 0x9e, 0x7d, 0xb8, 0xca, 0x1a, 0xfa, 0xed, 0xc6,
-  0xde, 0x26, 0x91, 0x23, 0x3e, 0xdc, 0x82, 0xea, 0xe2, 0x51, 0x25, 0xdc,
-  0x9e, 0x86, 0xad, 0x1a, 0x36, 0x0a, 0x89, 0x8b, 0x5f, 0x10, 0xda, 0x74,
-  0xe0, 0x37, 0x9b, 0x5c, 0x5f, 0x55, 0x0b, 0x6e, 0x68, 0xfb, 0x00, 0x55,
-  0xf9, 0xc9, 0x80, 0xa6, 0xfc, 0xea, 0xf1, 0x2b, 0x9f, 0x96, 0x42, 0x36,
-  0x43, 0xb7, 0xf8, 0x70, 0x02, 0xa6, 0x4b, 0x99, 0x23, 0x42, 0x4e, 0xe5,
-  0x5a, 0x3b, 0x9a, 0xb3, 0xdc, 0x84, 0xf8, 0xf8, 0x4d, 0x7c, 0xb8, 0xd6,
-  0x96, 0xf0, 0x08, 0x3a, 0x2c, 0xce, 0x9f, 0x31, 0xef, 0x73, 0xea, 0x4d,
-  0x48, 0x27, 0xec, 0x2a, 0xab, 0xec, 0x47, 0xc2, 0xcc, 0xd3, 0xeb, 0x79,
-  0x39, 0xa5, 0xb2, 0xb8, 0xec, 0x41, 0x5a, 0xd0, 0x83, 0x4a, 0x0b, 0x29,
-  0x27, 0xac, 0xfd, 0x75, 0x61, 0x10, 0x73, 0xf2, 0x75, 0xa7, 0x43, 0x30,
-  0x96, 0xae, 0x6d, 0x99, 0x68, 0x83, 0xe9, 0x8c, 0x5f, 0xf6, 0x97, 0x50,
-  0x24, 0xe5, 0xa4, 0xf1, 0x56, 0x40, 0x0f, 0xf4, 0x30, 0x2c, 0x6e, 0xab,
-  0xc8, 0xca, 0xa8, 0xc6, 0x0c, 0x66, 0xfa, 0x43, 0x2b, 0xa3, 0x07, 0x83,
-  0x5d, 0x36, 0x3f, 0x74, 0x88, 0xca, 0xde, 0x16, 0xf3, 0xe6, 0xc4, 0x87,
-  0x6b, 0x6f, 0xb0, 0xee, 0x30, 0xe6, 0x10, 0xdb, 0x60, 0xe9, 0x3b, 0x10,
-  0xaa, 0xad, 0xce, 0xe9, 0xc0, 0xd4, 0xb1, 0x0f, 0xf6, 0x6e, 0xb0, 0x7c,
-  0x23, 0xa0, 0xc2, 0xac, 0x30, 0x87, 0x6f, 0x59, 0x4d, 0xb2, 0x0f, 0x98,
-  0x1b, 0x63, 0xd7, 0x7f, 0x58, 0x4d, 0x90, 0x99, 0x00, 0x52, 0xdc, 0xcf,
-  0x49, 0x23, 0x75, 0x12, 0x58, 0x50, 0x93, 0x53, 0x01, 0x68, 0x30, 0x5a,
-  0x33, 0x7e, 0xcf, 0x26, 0x62, 0x0f, 0xdb, 0xbb, 0xef, 0x31, 0xd2, 0x32,
-  0xe7, 0xb7, 0x2d, 0xca, 0xbc, 0xb0, 0x3d, 0xbf, 0xa0, 0x47, 0x78, 0x73,
-  0x8c, 0x81, 0x57, 0xad, 0x8a, 0x01, 0xce, 0x3f, 0x52, 0x95, 0x9a, 0xd5,
-  0xac, 0x3e, 0x44, 0xfa, 0x3a, 0x79, 0x8b, 0xe3, 0xa7, 0x75, 0xb7, 0x79,
-  0x49, 0x52, 0x85, 0x69, 0x01, 0xfd, 0x5b, 0x22, 0x30, 0x09, 0xab, 0xc9,
-  0x3d, 0x2d, 0x43, 0x3f, 0x68, 0x4f, 0x64, 0x30, 0xbb, 0x47, 0x8b, 0x70,
-  0x7e, 0x32, 0x2e, 0xc1, 0x5b, 0x75, 0xab, 0x9e, 0x1c, 0x5f, 0xc1, 0x86,
-  0xbf, 0x58, 0x8e, 0x4f, 0xfa, 0x64, 0x2e, 0x29, 0x62, 0x74, 0x97, 0x41,
-  0x88, 0x9b, 0xef, 0xfe, 0xf7, 0x8b, 0xf0, 0xc5, 0xed, 0xd4, 0xba, 0x0c,
-  0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, 0xff, 0x9b, 0x2e, 0x49, 0xcf, 0xf9, 0x96, 0x8c,
-  0x8f, 0xff, 0xe7, 0xd1, 0xa7, 0x8c, 0x8f, 0x56, 0xe9, 0xad, 0x2d, 0x71,
-  0xfd, 0x81, 0x81, 0x54, 0x25, 0x6e, 0x69, 0x11, 0x54, 0xd2, 0x99, 0x78,
-  0x9b, 0xa8, 0xc7, 0x34, 0x6e, 0x0f, 0x04, 0xc0, 0xc1, 0x65, 0xe4, 0xe5,
-  0x0c, 0x1d, 0x92, 0xa8, 0x44, 0x75, 0x88, 0x7a, 0x5c, 0x35, 0x81, 0xda,
-  0x44, 0x76, 0x55, 0xf3, 0x3e, 0xce, 0xe1, 0xf4, 0x86, 0x13, 0x8a, 0xe2,
-  0x12, 0x0c, 0x73, 0x16, 0xe9, 0xdc, 0x0d, 0xa4, 0x4e, 0x9a, 0x94, 0x99,
-  0xeb, 0x03, 0x3d, 0x7a, 0x7d, 0x10, 0x08, 0x69, 0xed, 0x42, 0x81, 0xd4,
-  0x2a, 0x79, 0xf9, 0xfe, 0xdd, 0x49, 0x4f, 0x61, 0xef, 0x18, 0x7b, 0x40,
-  0xc4, 0x5a, 0x7b, 0x97, 0x01, 0x65, 0xaf, 0x4a, 0xce, 0x8c, 0x9a, 0xbd,
-  0xe6, 0x03, 0x1b, 0xb6, 0x90, 0x4d, 0xc5, 0x55, 0x16, 0x73, 0xfc, 0xf9,
-  0x1d, 0x7a, 0x48, 0x88, 0xbb, 0x04, 0x06, 0xbf, 0x1c, 0xf7, 0x72, 0x96,
-  0x0a, 0xed, 0x96, 0x15, 0x25, 0x9e, 0x80, 0xf2, 0x91, 0xd6, 0x8a, 0xea,
-  0x51, 0xef, 0x40, 0xd2, 0x4a, 0xcb, 0x48, 0xb8, 0x8e, 0xd2, 0x05, 0xf1,
-  0x50, 0xb2, 0xf6, 0x47, 0x8a, 0x15, 0xad, 0xe9, 0x34, 0x87, 0x59, 0x18,
-  0x0e, 0x56, 0x52, 0x50, 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xb0, 0xed, 0x5e,
-  0xee, 0x34, 0x56, 0x0f, 0x35, 0xb7, 0x7d, 0xb7, 0xf1, 0x7c, 0xec, 0xe5,
-  0x2c, 0xc2, 0x35, 0x84, 0xfd, 0x84, 0x14, 0xe0, 0xab, 0x3b, 0x4e, 0x1e,
-  0xc9, 0x01, 0xf6, 0x89, 0x12, 0xbd, 0xec, 0x38, 0x2b, 0xd8, 0x01, 0xb7,
-  0x83, 0x6b, 0x60, 0x36, 0x15, 0xed, 0x28, 0x11, 0x66, 0x9a, 0x37, 0x10,
-  0x20, 0xbf, 0xdf, 0xdd, 0xee, 0x13, 0xf2, 0x34, 0x90, 0x56, 0x63, 0xd3,
-  0x69, 0xac, 0xad, 0xfd, 0x85, 0x6b, 0xd0, 0x95, 0xb0, 0xd0, 0x1d, 0xb2,
-  0x5c, 0x90, 0x9f, 0x6e, 0x48, 0xfc, 0x92, 0xd6, 0x7d, 0xf4, 0x8f, 0x5b,
-  0xc5, 0xbf, 0xb6, 0x4f, 0x6a, 0x4f, 0x9b, 0x54, 0x27, 0xbf, 0xde, 0x79,
-  0x7b, 0x4c, 0x03, 0xc5, 0x52, 0x21, 0x55, 0x96, 0xa8, 0x9f, 0xc4, 0x53,
-  0xda, 0x9d, 0xce, 0x00, 0xbb, 0x1e, 0xfd, 0x30, 0xe5, 0x70, 0xd2, 0x68,
-  0xa1, 0xf9, 0x9a, 0xce, 0x17, 0x49, 0x44, 0x64, 0x0d, 0xf4, 0x04, 0x68,
-  0x42, 0x55, 0xea, 0x60, 0x58, 0x53, 0x11, 0x8f, 0xb3, 0x32, 0xc4, 0x09,
-  0x12, 0x41, 0xca, 0xc6, 0x78, 0x2a, 0x89, 0xc5, 0x20, 0x08, 0x7d, 0xa9,
-  0x7d, 0x31, 0x22, 0x3b, 0x72, 0x18, 0xf5, 0xf6, 0x47, 0xbb, 0x99, 0x48,
-  0x9d, 0x83, 0xdf, 0xa2, 0x61, 0x8d, 0xdf, 0x5e, 0x4b, 0x36, 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a8, 0x01,
-  0x52, 0x50, 0xc1, 0x87, 0x5d, 0x43, 0xad, 0x48, 0x18, 0x64, 0x99, 0xa5,
-  0x1f, 0xef, 0xbd, 0xae, 0x73, 0x54, 0xf5, 0x34, 0x23, 0x1f, 0x21, 0xb9,
-  0x2b, 0x38, 0x5e, 0x01, 0xa7, 0xe7, 0x35, 0x7b, 0x05, 0xa8, 0x2c, 0x17,
-  0x0d, 0xe8, 0x90, 0x9d, 0x90, 0x4d, 0x63, 0x66, 0xa2, 0xb4, 0x9f, 0x91,
-  0xaa, 0x64, 0x37, 0x0a, 0x07, 0x7d, 0x1c, 0xc9, 0x03, 0x8a, 0xbf, 0x0e,
-  0xae, 0xc2, 0x4c, 0xfb, 0x62, 0x89, 0x3f, 0x57, 0xd9, 0x8f, 0x2e, 0x6c,
-  0x4d, 0x12, 0x14, 0xdf, 0x3a, 0xbb, 0x33, 0xd8, 0xf9, 0x9a, 0x26, 0xf1,
-  0xc5, 0x6a, 0x0a, 0x99, 0xcb, 0x09, 0x10, 0xff, 0x07, 0x64, 0x8c, 0xc6,
-  0xe5, 0xb8, 0xb7, 0xa9, 0x0c, 0xcb, 0xf9, 0xed, 0xd2, 0x30, 0x38, 0xe6,
-  0x3c, 0x56, 0x98, 0x81, 0x6a, 0x99, 0x49, 0x66, 0x6d, 0xea, 0x2f, 0x12,
-  0x2e, 0xff, 0xff, 0x4a, 0x16, 0xf9, 0x02, 0x89, 0xa2, 0x5f, 0x8a, 0xb7,
-  0x2b, 0x06, 0x17, 0x89, 0xde, 0x46, 0x5c, 0xe9, 0x68, 0x24, 0xb9, 0xb9,
-  0xc0, 0x90, 0xa2, 0x5b, 0x16, 0x57, 0x48, 0x10, 0xb9, 0x02, 0x48, 0x39,
-  0x5b, 0xc4, 0x66, 0x1d, 0x75, 0x26, 0xac, 0x4f, 0xb6, 0x24, 0xcf, 0xb5,
-  0x33, 0x1c, 0x01, 0x89, 0xe8, 0x44, 0x70, 0xee, 0xca, 0xf9, 0x85,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0xa7, 0x2b, 0xa0, 0x46, 0xcd, 0xb3, 0xa6, 0x95, 0x45,
-  0xed, 0xcd, 0x20, 0x10, 0xe0, 0x33, 0xa9, 0x31, 0xf8, 0xeb, 0x32, 0xcf,
-  0x50, 0xe2, 0x9b, 0x91, 0xd3, 0x09, 0xa7, 0x56, 0x1a, 0x80, 0x63, 0xcc,
-  0x04, 0x63, 0x72, 0xe5, 0x99, 0x34, 0x83, 0x37, 0xd3, 0x0d, 0x04, 0xb8,
-  0x99, 0x3e, 0x5d, 0x6d, 0x30, 0x08, 0xcd, 0xe9, 0x39, 0xa4, 0x45, 0xce,
-  0xcd, 0xd5, 0x09, 0xf7, 0xbe, 0x07, 0x84, 0xab, 0xd9, 0x84, 0x5a, 0xe2,
-  0x87, 0x2a, 0x96, 0xfa, 0x63, 0x58, 0xc2, 0x37, 0x68, 0x35, 0x50, 0x85,
-  0x43, 0x59, 0xa4, 0x58, 0x43, 0xdd, 0x77, 0x8b, 0x74, 0xb6, 0x55, 0x37,
-  0x53, 0x52, 0x27, 0x96, 0xc5, 0x8c, 0xe6, 0x49, 0x23, 0xf5, 0xb4, 0xf3,
-  0x8e, 0x00, 0x46, 0xbe, 0x47, 0x24, 0x75, 0x8c, 0x48, 0xaa, 0xdb, 0x50,
-  0xee, 0xa1, 0x64, 0xc5, 0xa6, 0x34, 0xd5, 0xf2, 0x92, 0xcb, 0x6d, 0x72,
-  0x67, 0x88, 0x5e, 0xe9, 0x53, 0x8b, 0x44, 0x14, 0xaf, 0x17, 0xb4, 0x6c,
-  0xed, 0xf2, 0xaa, 0xcd, 0xbc, 0xa1, 0xfd, 0x32, 0x6c, 0x79, 0x51, 0xd6,
-  0x48, 0xd1, 0x37, 0x2b, 0x34, 0xef, 0x4a, 0xbf, 0x93, 0x55, 0x1b, 0x3d,
-  0x64, 0x00, 0xd9, 0x5f, 0x88, 0xd1, 0x07, 0xac, 0xd8, 0x27, 0x1e, 0x42,
-  0x5f, 0xd3, 0x89, 0xfd, 0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da, 0x3d, 0x9d, 0xc0, 0xe7, 0x9a, 0x90,
-  0xdd, 0x06, 0xe0, 0x84, 0x84, 0x81, 0x2e, 0x16, 0xb0, 0xe6, 0xac, 0xd7,
-  0x8b, 0xa7, 0x66, 0x11, 0xc4, 0xb4, 0xc0, 0xab, 0x1f, 0x43, 0xc1, 0x76,
-  0x9e, 0x6e, 0x73, 0x1f, 0xb1, 0x0d, 0x5c, 0x05, 0x2b, 0x69, 0xfa, 0xa4,
-  0x1d, 0x32, 0xf8, 0x1b, 0x0e, 0x39, 0x41, 0x33, 0xc2, 0x2b, 0xfd, 0x92,
-  0xfe, 0x1a, 0x6f, 0xce, 0x82, 0xee, 0xa2, 0xf0, 0xdb, 0xa0, 0xa9, 0x34,
-  0xab, 0x67, 0x58, 0xb6, 0xad, 0xcf, 0x90, 0x1e, 0x72, 0xd4, 0xe3, 0xa3,
-  0x71, 0xf1, 0x84, 0x38, 0xf0, 0xa9, 0xf5, 0xea, 0x53, 0xcf, 0x28, 0xd4,
-  0x71, 0x10, 0x67, 0xf4, 0x8c, 0x67, 0xab, 0xfe, 0xe8, 0xf7, 0x11, 0xcf,
-  0xae, 0x24, 0x63, 0x44, 0x3b, 0x60, 0xad, 0x6c, 0x76, 0x15, 0x62, 0x33,
-  0x71, 0x85, 0x80, 0x3a, 0x09, 0x38, 0x43, 0x85, 0x22, 0x8a, 0xb6, 0xd7,
-  0x80, 0x99, 0x66, 0xad, 0x2a, 0x28, 0x95, 0x94, 0xc2, 0x22, 0x77, 0x68,
-  0xe4, 0x11, 0x98, 0x1a, 0xa9, 0x80, 0xd4, 0x8e, 0x12, 0x0d, 0x37, 0xc7,
-  0x73, 0x08, 0x7e, 0x98, 0xd0, 0x06, 0x9a, 0x85, 0x49, 0xd3, 0x1a, 0xee,
-  0x10, 0x94, 0x84, 0xd8, 0xcf, 0xa2, 0x2f, 0x8f, 0xfb, 0x3b, 0x74, 0xe1,
-  0x4e, 0xaa, 0x7b, 0xba, 0x71, 0x05, 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6d, 0x28, 0x75, 0x33, 0x0c,
-  0x53, 0x0d, 0xb8, 0x12, 0x34, 0x58, 0x92, 0x91, 0xf7, 0x22, 0x74, 0x04,
-  0xc0, 0x2d, 0xe7, 0xa0, 0x7a, 0xed, 0xd3, 0xea, 0x9a, 0x1a, 0x44, 0x7a,
-  0xce, 0x27, 0x41, 0xc1, 0x33, 0xa7, 0x28, 0x30, 0x56, 0xd0, 0x22, 0x84,
-  0x51, 0xe7, 0x0d, 0x85, 0x81, 0xdd, 0x4e, 0xb9, 0x59, 0x94, 0x80, 0xeb,
-  0xf2, 0xdd, 0x49, 0x9d, 0xcb, 0x0a, 0x76, 0xaa, 0x94, 0x0a, 0x67, 0x98,
-  0x4c, 0x42, 0x34, 0xd2, 0x29, 0x23, 0x58, 0xd7, 0x3c, 0xa2, 0x10, 0xe7,
-  0x9e, 0x52, 0x6b, 0xf9, 0xea, 0xa0, 0xcc, 0x61, 0x23, 0xb3, 0x19, 0x6a,
-  0x9e, 0x88, 0x53, 0x3b, 0xca, 0x47, 0x1a, 0x58, 0xf2, 0x4a, 0x13, 0x6d,
-  0x73, 0x73, 0xef, 0x23, 0x6b, 0x9b, 0xd3, 0x70, 0x93, 0x33, 0xed, 0x19,
-  0x20, 0xf0, 0xa2, 0xca, 0xb3, 0x4b, 0x23, 0xa0, 0xb1, 0x24, 0x4e, 0x4a,
-  0x0e, 0x5c, 0x76, 0x19, 0x81, 0xd1, 0x53, 0xb9, 0x83, 0xd9, 0x47, 0x2a,
-  0xc9, 0xcf, 0xe1, 0xb6, 0x63, 0xb1, 0x6f, 0xe1, 0x1a, 0xb9, 0x09, 0x04,
-  0x95, 0xda, 0x62, 0x15, 0xa9, 0x16, 0xc4, 0x45, 0x13, 0x7e, 0x49, 0xbc,
-  0xa9, 0xbb, 0x99, 0x18, 0xac, 0xa0, 0x53, 0x6c, 0x3b, 0x46, 0xe3, 0x8b,
-  0x7c, 0x73, 0x88, 0x6a, 0xe9, 0xb5, 0x1e, 0x8d,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b, 0xed, 0xee, 0x8f, 0x4f, 0x82, 0x89,
-  0x51, 0x96, 0xd2, 0x07, 0x64, 0x11, 0x58, 0x66, 0x32, 0x37, 0x5f, 0x56,
-  0xe5, 0x13, 0xbf, 0x9b, 0x32, 0x1e, 0x00, 0x3f, 0x31, 0xfe, 0x2d, 0xa5,
-  0x15, 0x44, 0xe1, 0xcf, 0x3b, 0xff, 0x83, 0x9f, 0xda, 0x45, 0xd6, 0x34,
-  0x23, 0x16, 0x57, 0xa0, 0x99, 0x26, 0x25, 0x5f, 0x79, 0xa9, 0x20, 0x61,
-  0x7f, 0x8a, 0xce, 0xff, 0xd0, 0x5f, 0x61, 0x57, 0x3a, 0x65, 0xcf, 0xf2,
-  0xb4, 0xb6, 0x33, 0xe4, 0x25, 0xe0, 0x48, 0x61, 0xc1, 0x82, 0xea, 0xf7,
-  0xe0, 0x39, 0xe4, 0x3c, 0x45, 0x52, 0x40, 0x46, 0x3d, 0x94, 0xe1, 0xec,
-  0xf2, 0x2e, 0x65, 0xfa, 0x09, 0xa2, 0x6b, 0x1e, 0xae, 0xfe, 0xb6, 0xc2,
-  0x1f, 0x6e, 0x48, 0xb4, 0x11, 0x76, 0xe7, 0x26, 0x67, 0x13, 0x80, 0x19,
-  0x14, 0x2a, 0x51, 0x73, 0x14, 0x56, 0x0f, 0xb7, 0xd1, 0xee, 0xd3, 0xde,
-  0xb3, 0xcf, 0x16, 0xa0, 0x86, 0x85, 0x06, 0xfd, 0x2c, 0x71, 0xa8, 0x35,
-  0xac, 0xfa, 0xd3, 0x7a, 0x12, 0x2b, 0x7a, 0x14, 0xc8, 0xe2, 0x17, 0x7c,
-  0xfe, 0xe9, 0x76, 0x84, 0xff, 0xff, 0x52, 0xe3, 0xb3, 0xf6, 0xd6, 0x4e,
-  0xfe, 0x7d, 0x7c, 0xfa, 0x36, 0x29, 0x2f, 0xfe, 0x42, 0xc4, 0x65, 0x9d,
-  0x8b, 0x52, 0xd4, 0xad, 0x50, 0xfe, 0x98, 0x45, 0x2a, 0x40, 0x90, 0xa8,
-  0xfe, 0x21, 0x5f, 0xf8, 0x82, 0xef, 0xf8, 0x0c, 0xad, 0x8c, 0x51, 0x63,
-  0x25, 0x52, 0x99, 0xf3, 0xd9, 0x29, 0x89, 0x46, 0x7e, 0x00, 0xf1, 0xf0,
-  0xe0, 0x8e, 0x4c, 0x18, 0xb7, 0x03, 0x7e, 0x2f, 0xaf, 0xa6, 0x71, 0xa8,
-  0x9a, 0x9e, 0xba, 0xc1, 0xc8, 0x5c, 0x7f, 0x12, 0x89, 0xba, 0x25, 0x11,
-  0x3b, 0xdf, 0xa7, 0xcb, 0xee, 0x8b, 0x08, 0x5d, 0x78, 0x49, 0xd0, 0xa9,
-  0xed, 0x92, 0x78, 0xfe, 0xad, 0x46, 0x3d, 0xed, 0x85, 0x78, 0x33, 0x7d,
-  0x60, 0x49, 0x6e, 0x19, 0x0f, 0xce, 0x44, 0x01, 0x03, 0x3c, 0xe2, 0x82,
-  0x3f, 0xe4, 0xe7, 0x1a, 0xdb, 0xee, 0x4c, 0x83, 0x6d, 0xf5, 0x87, 0x89,
-  0xcb, 0x65, 0x77, 0xfe, 0x24, 0x9e, 0xef, 0x46, 0x26, 0x61, 0x96, 0xfb,
-  0xc1, 0xf5, 0x99, 0x48, 0xde, 0xf2, 0xea, 0x69, 0xf9, 0x46, 0xc7, 0x72,
-  0x1d, 0x28, 0x08, 0x6f, 0x54, 0x27, 0x23, 0xf3, 0x88, 0xda, 0x06, 0x49,
-  0xc4, 0x54, 0xe8, 0x9c, 0x94, 0xbd, 0xe8, 0x1c, 0x6c, 0x76, 0xac, 0x3d,
-  0xf7, 0xb2, 0x0b, 0x56, 0x22, 0x76, 0xc2, 0x34, 0x1e, 0x49, 0x56, 0xcf,
-  0x41, 0x51, 0xb9, 0x36, 0x28, 0x44, 0x9c, 0x22, 0xff, 0xce, 0x9c, 0x3a,
-  0x4a, 0x31, 0x5f, 0xfd, 0x9e, 0xed, 0xfa, 0x4d, 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e0, 0x39, 0xe3, 0x93, 0x54, 0xd2, 0xee, 0xc1, 0xc1, 0x5d, 0x76, 0xa1,
-  0x27, 0xeb, 0x61, 0x37, 0x17, 0xea, 0x5d, 0x24, 0xa7, 0xcc, 0x25, 0x8f,
-  0x76, 0x44, 0x04, 0x47, 0x1e, 0x67, 0x75, 0xf9, 0xb0, 0x16, 0x88, 0x1d,
-  0xf0, 0x5a, 0xf6, 0x51, 0xef, 0x13, 0xf6, 0xb2, 0x1b, 0x3b, 0x88, 0x0e,
-  0x4e, 0xa3, 0x4c, 0xf3, 0xb0, 0xe3, 0xdb, 0xec, 0x61, 0xfc, 0xc4, 0x88,
-  0x55, 0xd0, 0x36, 0x12, 0x42, 0x2a, 0x2b, 0x7a, 0x08, 0x27, 0xc2, 0x22,
-  0x5b, 0xfd, 0x31, 0x4c, 0x44, 0xb6, 0x64, 0xe4, 0xac, 0xa2, 0xab, 0x8c,
-  0x1a, 0x65, 0xfc, 0x65, 0x5b, 0x53, 0x0a, 0x63, 0x35, 0xe3, 0x28, 0x29,
-  0xbd, 0xee, 0x4a, 0xa3, 0x60, 0x53, 0x93, 0x3e, 0x39, 0x7c, 0x28, 0x20,
-  0x84, 0xd8, 0x19, 0x05, 0xcf, 0x90, 0x91, 0x8d, 0xa2, 0x44, 0x8a, 0x9e,
-  0x69, 0x98, 0x5e, 0x3c, 0x2c, 0xda, 0x07, 0x65, 0xff, 0x31, 0x5e, 0xbb,
-  0xfa, 0x53, 0x62, 0x30, 0xdf, 0xa5, 0xe6, 0x0c, 0xc4, 0xaa, 0x6d, 0xea,
-  0x14, 0xb7, 0x90, 0x6b, 0x50, 0xc5, 0x15, 0x52, 0x6d, 0x78, 0x3f, 0xee,
-  0x93, 0xa9, 0x88, 0x8d, 0xd0, 0x4c, 0x23, 0x05, 0x59, 0x46, 0xad, 0x47,
-  0xd9, 0x10, 0x5f, 0x16, 0xc6, 0xa2, 0x4e, 0x51, 0x8b, 0x45, 0xbb, 0x9c,
-  0xdd,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d, 0x8f,
-  0x38, 0x62, 0x65, 0x7b, 0xdb, 0x53, 0x55, 0xf0, 0x1d, 0x75, 0x5a, 0x40,
-  0x62, 0x3d, 0xf5, 0x31, 0xff, 0xcc, 0x92, 0x84, 0x63, 0xd5, 0x2e, 0x78,
-  0xd4, 0x9a, 0x84, 0x63, 0xee, 0xf7, 0xb5, 0x24, 0xcc, 0x26, 0xd1, 0xd5,
-  0x28, 0x72, 0x27, 0x14, 0x02, 0x7c, 0x16, 0xa8, 0x1a, 0x1a, 0x23, 0x64,
-  0x21, 0xe1, 0x65, 0x88, 0x79, 0x88, 0xe9, 0x77, 0xb6, 0xcd, 0x56, 0x80,
-  0x92, 0xee, 0xad, 0xe2, 0xcf, 0xea, 0x2c, 0xda, 0xdf, 0xda, 0xfa, 0xf9,
-  0x25, 0x29, 0xab, 0x5f, 0xfe, 0x79, 0x9f, 0xf8, 0xe0, 0xe7, 0x10, 0xed,
-  0xb9, 0xf6, 0xa6, 0x21, 0x32, 0xd7, 0xab, 0xd5, 0x25, 0xbe, 0xb5, 0xe4,
-  0x84, 0x53, 0xfb, 0xc3, 0xd9, 0xbb, 0xd3, 0x1f, 0xff, 0xf4, 0x1b, 0x7f,
-  0xc2, 0xcb, 0x16, 0xfb, 0x33, 0xe5, 0x11, 0xeb, 0xe0, 0x3f, 0xff, 0xe6,
-  0x5f, 0x6b, 0x0f, 0x3f, 0x90, 0x7c, 0x10, 0x1c, 0xc5, 0x88, 0x42, 0xc6,
-  0x38, 0x14, 0xdc, 0x8b, 0x24, 0x71, 0xc0, 0x14, 0x9e, 0x8f, 0xc3, 0x66,
-  0x66, 0xe2, 0x8a, 0xab, 0xdb, 0x0c, 0x9a, 0x86, 0x4d, 0x01, 0x46, 0x0c,
-  0x41, 0xe0, 0xf2, 0xfb, 0x14, 0x20, 0x83, 0x40, 0x30, 0x18, 0x26, 0x03,
-  0x39, 0xd5, 0x96, 0x1e, 0x07, 0x27, 0x27, 0xbf, 0x29, 0x11, 0xcc, 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91, 0x9a, 0xee,
-  0xed, 0x17, 0xd3, 0xb0, 0xfc, 0x90, 0x40, 0x73, 0xfd, 0xca, 0x4c, 0xb9,
-  0x79, 0x87, 0x77, 0x89, 0x62, 0x20, 0xf1, 0x3e, 0xb5, 0x9e, 0x91, 0xdf,
-  0x3c, 0x66, 0x38, 0x0f, 0x48, 0x84, 0xa7, 0x9a, 0x34, 0x94, 0x09, 0xde,
-  0x24, 0xe2, 0x17, 0x67, 0x25, 0x1c, 0xb0, 0x61, 0x61, 0xd5, 0x91, 0x37,
-  0xf1, 0x55, 0x13, 0xed, 0x9d, 0x69, 0x24, 0x83, 0xc1, 0x3c, 0x46, 0x2e,
-  0x78, 0xc6, 0xc3, 0xf2, 0xc7, 0xb3, 0xf3, 0x84, 0xb6, 0xca, 0x73, 0x64,
-  0x3d, 0x4e, 0x51, 0x01, 0xb3, 0x58, 0x48, 0x31, 0x9a, 0x24, 0xe6, 0x1f,
-  0x19, 0x39, 0x0b, 0x16, 0x01, 0x03, 0x4a, 0xb8, 0x6d, 0x2d, 0xe9, 0x42,
-  0x1d, 0x92, 0x87, 0x10, 0x54, 0xc6, 0x23, 0xb9, 0x5d, 0xeb, 0x09, 0x11,
-  0xf9, 0xb1, 0x59, 0xc9, 0x52, 0x7a, 0x8e, 0x62, 0xd5, 0x0b, 0x2d, 0xda,
-  0xd7, 0x50, 0x9d, 0xb9, 0x02, 0x67, 0x65, 0x1d, 0x43, 0x06, 0xbe, 0xa0,
-  0xca, 0x8f, 0xac, 0xe9, 0x29, 0x2c, 0x70, 0x33, 0x92, 0x50, 0x96, 0xe4,
-  0x44, 0x92, 0xd1, 0x45, 0x55, 0xf0, 0x10, 0x86, 0xdc, 0x69, 0x6b, 0x40,
-  0xe9, 0xcb, 0x5c, 0x60, 0x1f, 0xc3, 0xd0, 0x60, 0x2c, 0x54, 0x6e, 0xb7,
-  0x05, 0xfd, 0x55, 0xd4, 0x7b, 0x49, 0xff, 0x4c, 0x6d, 0xc3, 0x40, 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a, 0x23, 0x5b, 0x18,
-  0xdd, 0xc3, 0x76, 0x0d, 0xd0, 0xc0, 0xa2, 0x42, 0x35, 0x1d, 0xb1, 0x1c,
-  0x74, 0x0d, 0x72, 0x2a, 0x5d, 0x2a, 0xf9, 0x34, 0x6e, 0x02, 0x9d, 0x05,
-  0x91, 0x24, 0x98, 0x2e, 0x27, 0x86, 0xb9, 0xff, 0x3a, 0x2b, 0xaf, 0xea,
-  0x88, 0x13, 0x81, 0x19, 0xc5, 0x0e, 0x30, 0xb0, 0x78, 0x0d, 0x6c, 0xc0,
-  0xb0, 0x88, 0xa0, 0x3f, 0xa7, 0x92, 0xb4, 0x8e, 0xc8, 0x59, 0x46, 0x78,
-  0x1a, 0xb1, 0x10, 0x83, 0x17, 0x5f, 0xcd, 0xa7, 0xc9, 0x86, 0xa1, 0xf7,
-  0x75, 0x76, 0xb7, 0x39, 0x4a, 0x5e, 0x95, 0x64, 0x1c, 0xf8, 0x89, 0x1d,
-  0x75, 0xa6, 0x58, 0x7b, 0x8a, 0xe3, 0x64, 0xce, 0x71, 0x00, 0x1e, 0x9d,
-  0xe2, 0x2e, 0x44, 0x89, 0xce, 0x28, 0xf9, 0x01, 0xdd, 0x60, 0x40, 0xbc,
-  0x8b, 0xd2, 0xfc, 0x41, 0x18, 0xea, 0x91, 0x92, 0x14, 0x73, 0x14, 0xbe,
-  0x3b, 0xfa, 0x93, 0xd9, 0x1c, 0xb2, 0x23, 0x18, 0xb4, 0xb4, 0x77, 0x63,
-  0x18, 0xb3, 0x25, 0x6b, 0x02, 0xaa, 0x77, 0xe8, 0x6c, 0x07, 0xf1, 0x40,
-  0x49, 0x82, 0xc8, 0x02, 0x9d, 0x20, 0x46, 0x95, 0x9f, 0x54, 0xa4, 0x10,
-  0xc1, 0x57, 0x62, 0x2e, 0x5f, 0x8f, 0x2a, 0x92, 0x54, 0x93, 0x36, 0x92,
-  0xee, 0x7e, 0x8d, 0x12, 0x6d, 0x70, 0x73, 0xa8, 0x68, 0x70, 0xc5, 0x1c,
-  0x17, 0x32, 0x93, 0xda, 0x91, 0xce, 0xee, 0xff, 0x96, 0xd9, 0xae, 0x28,
-  0x4d, 0x95, 0x5e, 0x92, 0x16, 0x65, 0x06, 0xa4, 0x02, 0x62, 0xf6, 0x63,
-  0xf0, 0xe6, 0x51, 0x13, 0xd5, 0x6e, 0x16, 0x32, 0x20, 0xb0, 0x30, 0x04,
-  0x07, 0x00, 0xa8, 0x4e, 0x44, 0xf1, 0xdc, 0x7e, 0x20, 0x00, 0xf4, 0xeb,
-  0xb4, 0xfa, 0x28, 0x5e, 0x80, 0x5b, 0x47, 0x68, 0xce, 0xda, 0x9f, 0x85,
-  0xc0, 0x93, 0xb7, 0xe0, 0x12, 0x20, 0xb7, 0xeb, 0x16, 0xec, 0x6b, 0xe7,
-  0x9c, 0x01, 0xaa, 0x70, 0x8d, 0x84, 0x9e, 0x0d, 0x92, 0xaf, 0x4b, 0x92,
-  0xc8, 0xf8, 0x21, 0x37, 0xd3, 0x19, 0x24, 0x6f, 0xc7, 0xe3, 0x48, 0xa5,
-  0xfd, 0x6d, 0x39, 0xbb, 0x34, 0x8f, 0x99, 0x7d, 0x64, 0x75, 0xcf, 0xfc,
-  0x79, 0x7e, 0x7a, 0x78, 0x7a, 0x62, 0xfe, 0x72, 0xf4, 0xfa, 0xf8, 0x47,
-  0x67, 0x11, 0x32, 0xce, 0x5a, 0xab, 0xd4, 0x18, 0xf0, 0xe1, 0xcf, 0x07,
-  0xbe, 0x0a, 0xca, 0x25, 0x12, 0x54, 0x1d, 0x81, 0x7b, 0x2d, 0xd0, 0x4e,
-  0xac, 0xa6, 0xec, 0xe9, 0xb8, 0x00, 0x49, 0xca, 0xef, 0x7c, 0x18, 0x3d,
-  0x4f, 0x5c, 0xc8, 0xc8, 0xb6, 0xcc, 0xc6, 0x71, 0x1c, 0x71, 0x92, 0xaf,
-  0xe2, 0x4a, 0x97, 0x3c, 0xf7, 0xc9, 0x5c, 0x21, 0x61, 0x5a, 0x93, 0x33,
-  0x52, 0x57, 0xba, 0x1a, 0xf1, 0x0f, 0x74, 0xb8, 0x4e, 0x3f, 0x48, 0x0f,
-  0xe4, 0xdf, 0x88, 0x66, 0x7f, 0x91, 0xea, 0xe8, 0x30, 0xbc, 0x90, 0x41,
-  0x23, 0xe6, 0x3a, 0x8d, 0xa2, 0x0d, 0x56, 0xd7, 0xd1, 0x06, 0x48, 0x0d,
-  0x70, 0x23, 0xb6, 0xd7, 0x24, 0x04, 0x90, 0x8b, 0x15, 0xf9, 0x0c, 0xe4,
-  0xc3, 0xf1, 0x90, 0x2a, 0x45, 0x53, 0x89, 0x03, 0x2f, 0x70, 0xc5, 0x37,
-  0xfd, 0x07, 0xf9, 0xdf, 0x1c, 0xc1, 0x16, 0x6d, 0xfa, 0x1c, 0x72, 0x43,
-  0x3a, 0x2d, 0xc2, 0x22, 0x90, 0xc4, 0x83, 0x45, 0xe8, 0x56, 0xa3, 0x3d,
-  0x10, 0x47, 0x4f, 0xdb, 0xda, 0xac, 0xfb, 0x3e, 0x4d, 0xee, 0x49, 0xa1,
-  0x81, 0xfb, 0x74, 0x50, 0xf1, 0x48, 0xa5, 0x3e, 0xf5, 0x93, 0x55, 0x63,
-  0x90, 0x37, 0xe0, 0xaf, 0xcb, 0xfc, 0x26, 0x45, 0x95, 0xbe, 0xb9, 0xa6,
-  0x86, 0x43, 0x7e, 0xa9, 0x33, 0x46, 0xfa, 0xab, 0x06, 0x49, 0xdb, 0xa3,
-  0x3c, 0xfd, 0x35, 0x83, 0x3c, 0xed, 0x8c, 0x71, 0xfd, 0xab, 0x06, 0x19,
-  0xaa, 0x71, 0xf0, 0xd9, 0x67, 0x47, 0x3f, 0x1e, 0x9f, 0x27, 0x87, 0xa7,
-  0xaf, 0xdc, 0x01, 0x3b, 0x87, 0x85, 0x0a, 0x0e, 0x30, 0x17, 0x56, 0x61,
-  0x78, 0x90, 0x1a, 0x99, 0xda, 0xae, 0x6c, 0x5c, 0x48, 0x41, 0x59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b2, 0x11, 0x08,
-  0x5b, 0x6e, 0x56, 0xcc, 0xf4, 0x31, 0x96, 0xc7, 0x95, 0x28, 0x5b, 0x1e,
-  0xca, 0x3a, 0x37, 0xba, 0xe6, 0xeb, 0xd0, 0x9c, 0x75, 0x38, 0xf8, 0x23,
-  0xb3, 0xeb, 0xf6, 0xf1, 0xd9, 0xd9, 0xb6, 0x74, 0xe0, 0x1e, 0xb6, 0x80,
-  0xda, 0x22, 0x2a, 0xfc, 0x00, 0x60, 0xed, 0xdb, 0x14, 0x32, 0xc4, 0xe2,
-  0x57, 0x38, 0x87, 0x95, 0x0d, 0xf1, 0x93, 0x52, 0x13, 0x56, 0x72, 0x15,
-  0xb8, 0x5e, 0x53, 0x8e, 0xa8, 0x70, 0x31, 0x0a, 0x17, 0x7c, 0xcb, 0x75,
-  0x35, 0x80, 0x33, 0xd7, 0x0a, 0x48, 0xce, 0xb1, 0x81, 0xec, 0xbd, 0xc9,
-  0x62, 0x00, 0x64, 0x0a, 0xbf, 0xea, 0xe9, 0xcd, 0x0e, 0x7e, 0xcd, 0x5b,
-  0xcf, 0x8e, 0x5d, 0xcf, 0x2d, 0x18, 0xe5, 0xec, 0x60, 0x3c, 0x56, 0x36,
-  0x39, 0x0c, 0x39, 0x42, 0x32, 0x07, 0x08, 0x16, 0x4c, 0xc1, 0x3f, 0x23,
-  0x16, 0x8d, 0x0c, 0xd2, 0x49, 0x30, 0xdb, 0x61, 0x99, 0xf6, 0x8a, 0x05,
-  0x33, 0xb4, 0x09, 0x59, 0x2f, 0xf3, 0x95, 0xae, 0xf8, 0x76, 0x35, 0x25,
-  0xe3, 0x86, 0x01, 0x27, 0xab, 0x10, 0x9d, 0x01, 0xec, 0xa2, 0x32, 0x1e,
-  0x6e, 0x81, 0xbb, 0x45, 0xde, 0x6a, 0x27, 0xbe, 0xb3, 0x17, 0x2e, 0xfa,
-  0x7b, 0x5e, 0xd5, 0xe0, 0x1f, 0x5a, 0xf4, 0xf7, 0x91, 0x45, 0x3f, 0x71,
-  0x07, 0x87, 0x3f, 0x96, 0xec, 0xee, 0x3e, 0xd7, 0x02, 0x53, 0xc3, 0xc7,
-  0xf8, 0x9e, 0xfb, 0xa0, 0xf7, 0x45, 0xf3, 0xdc, 0x10, 0xd9, 0xe9, 0x11,
-  0xc7, 0x80, 0x3b, 0xbc, 0xde, 0xa7, 0x9e, 0xda, 0x4f, 0x19, 0xc3, 0x87,
-  0xbc, 0x8f, 0xc6, 0xfc, 0x60, 0x29, 0x13, 0x08, 0x1f, 0x75, 0xe3, 0x91,
-  0x0b, 0xe6, 0x96, 0x32, 0x81, 0x1b, 0xab, 0x4b, 0x76, 0x3e, 0xa5, 0xb3,
-  0xf0, 0xbe, 0xf3, 0xcc, 0xba, 0xd0, 0xb7, 0x76, 0x35, 0x79, 0xea, 0x00,
-  0xb2, 0x78, 0x96, 0xcd, 0xb9, 0xcf, 0x58, 0x46, 0xb0, 0x87, 0x2e, 0xf4,
-  0xc3, 0xa0, 0x16, 0x97, 0x55, 0x8a, 0xa6, 0x21, 0xb3, 0xf4, 0x3e, 0x82,
-  0xcc, 0x2a, 0x51, 0x42, 0x76, 0x55, 0xa5, 0x34, 0xfb, 0x82, 0xbc, 0x32,
-  0xd0, 0x04, 0xc4, 0xfc, 0x27, 0x07, 0x02, 0xed, 0x68, 0x79, 0x69, 0xc3,
-  0x74, 0xf2, 0xd5, 0x00, 0x58, 0xa9, 0x96, 0xde, 0xe2, 0x7c, 0x64, 0x44,
-  0x4b, 0x88, 0x43, 0x1c, 0xef, 0x3c, 0x77, 0x5b, 0x64, 0xf7, 0x81, 0x4c,
-  0x37, 0x86, 0x5b, 0xf3, 0xa8, 0xa7, 0xb2, 0x44, 0x63, 0xc1, 0x52, 0xe6,
-  0x41, 0x19, 0x1a, 0x79, 0xe8, 0x31, 0xad, 0x3c, 0x05, 0x71, 0x87, 0xa5,
-  0xf1, 0x19, 0x09, 0x3b, 0xe9, 0x1b, 0x31, 0x4a, 0x4e, 0x11, 0x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b0, 0x11, 0x45, 0xcd, 0xa1, 0x32, 0x1d, 0x38, 0xef, 0x09, 0x56, 0x8f,
+  0x74, 0x3d, 0xb7, 0x4b, 0xf6, 0x71, 0x78, 0x30, 0x1a, 0xe2, 0x09, 0xce,
+  0xb6, 0x74, 0xd7, 0x5e, 0xa4, 0x2e, 0x79, 0xb4, 0x16, 0x8d, 0x26, 0x4f,
+  0x26, 0x17, 0x1c, 0xb0, 0x34, 0x71, 0x4b, 0x97, 0x0c, 0xce, 0xd3, 0x6a,
+  0xe0, 0x54, 0x4e, 0xf1, 0xa4, 0x99, 0xb6, 0x2f, 0x49, 0xa7, 0xa0, 0xa5,
+  0x35, 0xb3, 0xfc, 0x93, 0x37, 0x4b, 0x7d, 0x79, 0x64, 0x5e, 0x05, 0x09,
+  0x91, 0xa3, 0xe5, 0xc2, 0x88, 0xac, 0x38, 0x31, 0x6a, 0xa3, 0x25, 0x8b,
+  0x9d, 0x10, 0x4b, 0x9b, 0x56, 0xb8, 0x4d, 0xcf, 0x78, 0x6b, 0x8e, 0x09,
+  0x84, 0x7d, 0x96, 0x96, 0xf0, 0xe8, 0xa8, 0x86, 0xd2, 0x5a, 0x9b, 0x95,
+  0x07, 0xbb, 0x58, 0x8a, 0x23, 0xeb, 0x84, 0x5c, 0x86, 0x56, 0x8f, 0x3a,
+  0x11, 0xb1, 0x96, 0x79, 0x30, 0x5f, 0xee, 0x09, 0x3b, 0x03, 0x2b, 0x23,
+  0x8d, 0x9b, 0xce, 0x53, 0xb3, 0x5f, 0xe6, 0xbc, 0xbd, 0xc6, 0x5a, 0xc9,
+  0xb4, 0x54, 0x16, 0x06, 0x59, 0x98, 0x4d, 0x4c, 0x9c, 0xf8, 0x9b, 0xce,
+  0x66, 0x39, 0xe9, 0x3a, 0x73, 0x18, 0x70, 0x56, 0x19, 0x99, 0xd8, 0x65,
+  0x51, 0x17, 0xfe, 0x36, 0x1a, 0x86, 0x70, 0x05, 0x19, 0x68, 0xc0, 0x86,
+  0x86,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, 0x67, 0xa3, 0xa6, 0xca,
+  0x97, 0xd1, 0xd1, 0x91, 0x51, 0x85, 0xb6, 0xa5, 0x25, 0x98, 0x22, 0x36,
+  0xc5, 0x9a, 0x7a, 0xc4, 0xf3, 0x33, 0xed, 0xac, 0x66, 0x97, 0x20, 0x69,
+  0x6d, 0x87, 0xb0, 0x81, 0x19, 0x61, 0x41, 0xe3, 0x29, 0x66, 0x62, 0xbd,
+  0x37, 0x3b, 0x68, 0x34, 0xb7, 0x7c, 0x3a, 0xc4, 0x6f, 0xb3, 0xfc, 0x32,
+  0x43, 0xe4, 0x12, 0xae, 0xb1, 0x66, 0x6e, 0x84, 0xa2, 0x08, 0x7d, 0x9b,
+  0xaf, 0xb2, 0xcb, 0xb2, 0x81, 0x20, 0x12, 0x90, 0x09, 0x1b, 0x28, 0x2d,
+  0x4d, 0x88, 0x01, 0xac, 0x25, 0x8e, 0x89, 0x8e, 0x66, 0xba, 0x17, 0xf5,
+  0x9b, 0xe9, 0x94, 0xf4, 0xfe, 0xee, 0xae, 0x9b, 0xd6, 0xa6, 0xa4, 0x45,
+  0x41, 0x64, 0x54, 0x79, 0x55, 0x25, 0x7d, 0xf0, 0x03, 0x08, 0xc7, 0xcd,
+  0x4d, 0x3e, 0xcd, 0x54, 0xa9, 0xb5, 0xf1, 0x0c, 0xf3, 0x3c, 0xe4, 0xf1,
+  0x0b, 0x9c, 0x47, 0xbc, 0xc7, 0x02, 0x39, 0x1c, 0x83, 0x37, 0x39, 0x04,
+  0x76, 0xe1, 0x78, 0x24, 0x8e, 0xc9, 0x45, 0x90, 0x56, 0x39, 0x79, 0x41,
+  0x11, 0x36, 0xa0, 0x66, 0x97, 0xd8, 0xf9, 0xe2, 0x71, 0xd3, 0xeb, 0xa2,
+  0xc3, 0x38, 0xdd, 0x85, 0x0e, 0xd7, 0x05, 0x59, 0x5e, 0x82, 0x75, 0x22,
+  0x25, 0xec, 0x32, 0x23, 0x7f, 0x31, 0x0b, 0x0e, 0x2b, 0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0x66, 0xd4, 0x49, 0x3d, 0xb6, 0xb1, 0xf3,
+  0xb8, 0x03, 0x82, 0x78, 0x5d, 0xdc, 0x09, 0x43, 0x62, 0xa3, 0xb0, 0x43,
+  0x50, 0x2e, 0xc7, 0xec, 0xf7, 0xbb, 0xbf, 0x02, 0x45, 0xf4, 0x68, 0x28,
+  0x2b, 0x88, 0x7f, 0x3f, 0x64, 0x77, 0x62, 0x56, 0x34, 0xbf, 0xd1, 0x92,
+  0x7a, 0xeb, 0x6c, 0x9f, 0x4c, 0x9e, 0x7b, 0x2b, 0xf4, 0xe3, 0x01, 0x92,
+  0x45, 0x10, 0x43, 0xfd, 0xf3, 0xaf, 0xbb, 0x0e, 0xe3, 0xcb, 0x1e, 0x31,
+  0x10, 0x92, 0x31, 0x45, 0x83, 0x1e, 0x39, 0x40, 0x85, 0xf9, 0xbb, 0x24,
+  0x2f, 0x23, 0xaf, 0x19, 0xd4, 0x9e, 0x16, 0x56, 0x1e, 0x19, 0x71, 0x5c,
+  0x26, 0xc5, 0xca, 0x76, 0x17, 0x7e, 0x5a, 0xce, 0x83, 0x8b, 0xae, 0xa5,
+  0xb5, 0x92, 0x30, 0xbf, 0x27, 0x97, 0x1b, 0x69, 0x72, 0xe2, 0xc9, 0x64,
+  0x11, 0xba, 0x7b, 0x16, 0xac, 0x40, 0x4d, 0xb2, 0x97, 0xbb, 0x16, 0xf1,
+  0x26, 0xbf, 0x48, 0xf1, 0x18, 0x34, 0x34, 0x16, 0x93, 0xc6, 0x89, 0x13,
+  0x77, 0x63, 0xb2, 0xbf, 0xd9, 0x58, 0x5d, 0x5b, 0xb3, 0xe3, 0xb0, 0x8d,
+  0xda, 0x55, 0x6b, 0xd9, 0x47, 0x0d, 0x87, 0xab, 0x72, 0x15, 0xce, 0x25,
+  0xbb, 0x2f, 0x74, 0xb8, 0x71, 0x74, 0x8c, 0xd8, 0x50, 0x25, 0xc9, 0x85,
+  0xa3, 0xac, 0xd4, 0x5d, 0x4f, 0xb4, 0x07, 0x35, 0x74, 0xe0, 0x2d, 0xc9,
+  0x20, 0xb6, 0x15, 0x6a, 0x78, 0xe4, 0xf3, 0x93, 0x5f, 0x63, 0xe9, 0x94,
+  0x76, 0xe8, 0x86, 0xe6, 0x2d, 0x6d, 0xc9, 0xbd, 0x65, 0x81, 0x7f, 0x0b,
+  0x58, 0x72, 0xff, 0x25, 0x42, 0x8d, 0x1e, 0x79, 0x59, 0x0a, 0xa4, 0x80,
+  0x52, 0x71, 0xd4, 0x91, 0xf4, 0x82, 0x8c, 0x34, 0x49, 0x1a, 0x9e, 0xdf,
+  0x3d, 0x48, 0x9b, 0x53, 0xe9, 0x43, 0x95, 0x36, 0x4f, 0x93, 0x0b, 0x54,
+  0x9d, 0x2e, 0x81, 0x18, 0x1e, 0xde, 0x20, 0xf0, 0x89, 0x69, 0x17, 0xbe,
+  0x82, 0x7c, 0xfa, 0x81, 0x73, 0x49, 0x2e, 0xba, 0xda, 0x86, 0x4d, 0xa1,
+  0xe2, 0xf4, 0xbf, 0xc8, 0x16, 0x90, 0x22, 0x09, 0x3f, 0x06, 0x68, 0x12,
+  0x57, 0x73, 0x5e, 0x38, 0xab, 0x6d, 0xd4, 0xc4, 0x60, 0xc6, 0xfa, 0xfe,
+  0xe5, 0xab, 0xb7, 0xc9, 0x26, 0xc4, 0xef, 0xae, 0x86, 0xab, 0x77, 0xfb,
+  0x76, 0xd6, 0x4c, 0xb7, 0x97, 0x1f, 0xf2, 0x6d, 0xa3, 0x69, 0xce, 0xce,
+  0xb7, 0xac, 0x06, 0x45, 0xdd, 0x81, 0x0a, 0xad, 0x56, 0xaa, 0x6a, 0x29,
+  0xe9, 0xa5, 0x81, 0xb9, 0xdc, 0xe9, 0xa9, 0x8c, 0x47, 0x60, 0x15, 0x54,
+  0xf1, 0xb0, 0x10, 0x41, 0x93, 0x3f, 0x11, 0x06, 0xa2, 0xf3, 0x8c, 0xdc,
+  0x90, 0x19, 0xfb, 0x51, 0x8c, 0x82, 0xdd, 0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xd5, 0xbc, 0x76, 0xe7, 0x2b,
+  0xaa, 0x32, 0xce, 0xc7, 0x36, 0x92, 0x46, 0x55, 0x95, 0x9e, 0xe8, 0x3b,
+  0xfa, 0x96, 0x54, 0x50, 0x73, 0x87, 0xe6, 0x97, 0xea, 0x81, 0xef, 0x09,
+  0x1b, 0xc5, 0x05, 0xd7, 0x20, 0x1c, 0x5f, 0x51, 0xbd, 0x4a, 0xca, 0x67,
+  0x93, 0xa0, 0x29, 0x09, 0x2c, 0xe1, 0x28, 0x37, 0x31, 0x32, 0xb4, 0xb1,
+  0x76, 0x3c, 0xc8, 0x1d, 0xff, 0x71, 0x44, 0x07, 0xda, 0xc0, 0x20, 0x34,
+  0x2f, 0x46, 0x0e, 0x2f, 0x5e, 0x93, 0xd2, 0xf9, 0x73, 0x8e, 0xa6, 0xea,
+  0xea, 0x84, 0x14, 0x42, 0x6e, 0x25, 0xc3, 0x18, 0x32, 0x51, 0x77, 0x3e,
+  0x36, 0x99, 0x44, 0x96, 0x37, 0x27, 0xa4, 0xac, 0x94, 0x32, 0x55, 0x62,
+  0x02, 0x40, 0xe9, 0xf9, 0x71, 0xd1, 0x60, 0x78, 0x33, 0x36, 0x36, 0x12,
+  0x58, 0xa1, 0x25, 0x48, 0x6c, 0x30, 0xac, 0xca, 0x5c, 0x8e, 0xc8, 0xa1,
+  0x00, 0x22, 0xda, 0xbc, 0x74, 0x62, 0x98, 0x64, 0xe3, 0x22, 0x4e, 0x6a,
+  0x1c, 0x70, 0x77, 0x5c, 0x36, 0x7e, 0xd8, 0x7f, 0x2d, 0xb9, 0x0d, 0xfc,
+  0x19, 0x91, 0xdf, 0xb9, 0xba, 0xd1, 0x1d, 0xe3, 0xc3, 0xfe, 0xc5, 0x0c,
+  0x48, 0x92, 0x67, 0xc2, 0xd8, 0x34, 0x39, 0x21, 0x2f, 0x09, 0x4e, 0x0f,
+  0xe7, 0xcc, 0xa8, 0xf1, 0xbb, 0x2e, 0x25, 0x10, 0x19, 0x03,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, 0x3f, 0x6d,
+  0x38, 0xd2, 0x1a, 0x46, 0x0c, 0x49, 0x55, 0xc6, 0x42, 0x02, 0x5d, 0x75,
+  0xb9, 0x77, 0xcd, 0x29, 0x04, 0x14, 0xa9, 0xa9, 0xec, 0x62, 0x0d, 0x6f,
+  0x94, 0x13, 0x98, 0xe7, 0x39, 0xe7, 0xb1, 0x74, 0x0a, 0x28, 0x72, 0x3f,
+  0x97, 0x57, 0x77, 0x35, 0x58, 0xba, 0x8c, 0x25, 0x38, 0x4d, 0xbd, 0x31,
+  0xf4, 0x7a, 0xe4, 0x49, 0x55, 0x33, 0x9c, 0xb0, 0xc5, 0x47, 0xcd, 0x60,
+  0x36, 0x46, 0x1b, 0xa4, 0x14, 0x90, 0xf3, 0x4c, 0x2c, 0x74, 0x55, 0x98,
+  0x2b, 0x62, 0xf3, 0x0f, 0x5c, 0x8c, 0x6d, 0xd0, 0x65, 0xcb, 0x78, 0x59,
+  0xb6, 0xe2, 0x7a, 0x1d, 0x4c, 0x19, 0x12, 0x94, 0xc3, 0xe1, 0x0f, 0x23,
+  0x66, 0x2a, 0xc9, 0x8b, 0xb4, 0xef, 0xe6, 0x8d, 0xe7, 0x4d, 0x1a, 0x8d,
+  0x08, 0x3a, 0x72, 0xc9, 0x70, 0x8f, 0x9c, 0x96, 0x4b, 0x49, 0x89, 0x00,
+  0x0f, 0xac, 0xe1, 0xe1, 0x08, 0xf8, 0xaf, 0x86, 0xbc, 0x36, 0x16, 0xf7,
+  0x10, 0x67, 0x1e, 0xc0, 0x83, 0x37, 0x85, 0x40, 0xc3, 0x4d, 0x4a, 0x32,
+  0xe7, 0x4c, 0x29, 0xf2, 0x81, 0x62, 0x6c, 0x24, 0x65, 0x32, 0xd4, 0x1d,
+  0x71, 0x0d, 0x06, 0xc2, 0x13, 0xc6, 0xf4, 0x19, 0x03, 0x67, 0x05, 0x22,
+  0xd4, 0xa0, 0xfb, 0xf0, 0xf7, 0x36, 0x4a, 0x82, 0x90, 0x95, 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75, 0x41, 0x84, 0x10, 0x47, 0x1b, 0x18,
+  0x5d, 0x53, 0x96, 0xf7, 0x8e, 0x8f, 0x99, 0x94, 0x11, 0x46, 0x97, 0xa6,
+  0xfd, 0xe8, 0x50, 0x46, 0x27, 0xc1, 0x5d, 0x87, 0x48, 0xde, 0x4a, 0x39,
+  0x9e, 0x61, 0x78, 0x45, 0x49, 0x78, 0x12, 0x86, 0xe0, 0xe6, 0xf3, 0x16,
+  0xe8, 0xe8, 0x20, 0xbe, 0xcc, 0x05, 0x81, 0xfd, 0x66, 0xdd, 0xd5, 0x5e,
+  0x93, 0x2e, 0xe7, 0x0b, 0x73, 0x36, 0x00, 0x96, 0xd4, 0x4b, 0x4b, 0x05,
+  0xee, 0x73, 0xe1, 0x82, 0x11, 0x4c, 0xa7, 0xba, 0xad, 0xac, 0x91, 0x36,
+  0x3e, 0x42, 0x33, 0x10, 0x41, 0x9f, 0x33, 0xd0, 0x42, 0xa0, 0xe1, 0xbf,
+  0x4e, 0x6f, 0xf3, 0xc5, 0x6a, 0xc1, 0xa0, 0x0f, 0x6c, 0x9a, 0x91, 0x27,
+  0xf5, 0xd6, 0x83, 0xe9, 0x86, 0x23, 0x56, 0xb0, 0xa9, 0x1b, 0xb5, 0xa7,
+  0xe8, 0x47, 0x6e, 0x10, 0x73, 0xe3, 0xaa, 0x92, 0x2a, 0xf9, 0xae, 0x8b,
+  0xbc, 0xa9, 0x3b, 0x06, 0x02, 0x73, 0xf3, 0xa7, 0x08, 0x40, 0x00, 0xd4,
+  0x64, 0x6e, 0x7d, 0x68, 0x11, 0x86, 0xcd, 0x50, 0x76, 0x2a, 0xb1, 0x79,
+  0x01, 0xac, 0x59, 0x95, 0x97, 0x33, 0x7b, 0x6c, 0x20, 0x2d, 0xe6, 0xc5,
+  0xca, 0x2c, 0x34, 0xdb, 0x97, 0x1b, 0xfd, 0x26, 0x30, 0x1a, 0x52, 0x6a,
+  0xc8, 0x84, 0x12, 0x7e, 0x34, 0x24, 0xf5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 0xec, 0x8b, 0x18, 0x25, 0x08, 0xce,
+  0xd7, 0x81, 0xb6, 0xda, 0x27, 0xb3, 0xdb, 0x2e, 0x49, 0xf2, 0x05, 0x54,
+  0x56, 0x97, 0x83, 0xf1, 0x83, 0x2f, 0x15, 0x6c, 0xa4, 0xbd, 0x50, 0xd2,
+  0x99, 0x7c, 0xa2, 0x67, 0xbc, 0x5a, 0xcd, 0x23, 0x61, 0x7e, 0x9e, 0x65,
+  0x19, 0x79, 0x53, 0xf3, 0x6b, 0x16, 0xba, 0x47, 0xdf, 0x80, 0x37, 0x71,
+  0xda, 0xd6, 0xb8, 0x15, 0x24, 0xf5, 0xac, 0x65, 0x2e, 0x3c, 0x14, 0x95,
+  0x8c, 0x18, 0xf3, 0xc8, 0x9c, 0x86, 0xe7, 0xe5, 0xc5, 0x85, 0x91, 0xd6,
+  0xba, 0x17, 0xd0, 0xa1, 0x3c, 0xb2, 0xfd, 0x56, 0x50, 0xe9, 0x6d, 0xfe,
+  0x4d, 0x1b, 0x31, 0x35, 0x49, 0x9b, 0x36, 0xd7, 0xe2, 0xe6, 0xc6, 0xb1,
+  0x24, 0xb6, 0xd6, 0x13, 0x1c, 0x5e, 0xc0, 0xc4, 0x48, 0xd0, 0x0e, 0x01,
+  0x54, 0x91, 0x9f, 0x41, 0xde, 0x3d, 0x12, 0x1f, 0xf2, 0xe5, 0x12, 0x2a,
+  0x0c, 0x81, 0x50, 0x5b, 0x74, 0x34, 0xb4, 0x46, 0x8e, 0x5d, 0x46, 0x4a,
+  0x94, 0xd8, 0x41, 0xca, 0x2d, 0x53, 0x03, 0xdd, 0x79, 0x76, 0x11, 0xfa,
+  0x85, 0x38, 0xc8, 0xd1, 0x07, 0x65, 0x12, 0x30, 0x99, 0x19, 0xe0, 0x97,
+  0x8a, 0x94, 0x79, 0x0c, 0x2e, 0x16, 0x87, 0x57, 0x22, 0x09, 0xac, 0x31,
+  0xc5, 0xdc, 0xe5, 0x18, 0x5a, 0xa3, 0xdb, 0xe4, 0xd5, 0xff, 0x3c, 0x72,
+  0x10, 0xb1, 0x16, 0x83, 0x95, 0xd3, 0x5f, 0x62, 0xc9, 0x44, 0xc9, 0x60,
+  0x74, 0x98, 0x8c, 0x08, 0xc6, 0xce, 0x8b, 0x3d, 0x29, 0x3b, 0x26, 0x57,
+  0x12, 0xf5, 0x21, 0x47, 0x30, 0xb8, 0xd6, 0x36, 0x50, 0x2b, 0xc2, 0xab,
+  0x41, 0x0a, 0x0b, 0x08, 0xa6, 0x91, 0xe6, 0x19, 0xe2, 0x88, 0x34, 0x92,
+  0xfe, 0xe9, 0x67, 0xa1, 0xb0, 0xb4, 0xb8, 0x9d, 0x17, 0x90, 0x19, 0x49,
+  0x80, 0x09, 0x52, 0x34, 0x34, 0x97, 0x9b, 0xe1, 0x7a, 0x56, 0xcd, 0x1f,
+  0xe8, 0x4e, 0xa9, 0x08, 0xce, 0x15, 0x50, 0xe3, 0x1e, 0x51, 0x4f, 0x99,
+  0xa8, 0x51, 0x5f, 0x61, 0xf4, 0x77, 0xa3, 0x41, 0x3f, 0x57, 0x2b, 0x44,
+  0x0f, 0xaa, 0x85, 0x35, 0x58, 0x94, 0xe2, 0x3a, 0x21, 0xda, 0xb0, 0xc8,
+  0x4a, 0xba, 0xd6, 0x6c, 0x1d, 0xa1, 0x20, 0x49, 0x29, 0xde, 0xd0, 0x3d,
+  0xf3, 0x17, 0x8d, 0xe0, 0x09, 0x39, 0x08, 0x03, 0x97, 0x02, 0x3c, 0x86,
+  0xef, 0xca, 0x62, 0xe2, 0xa6, 0x24, 0x10, 0x51, 0x2b, 0x02, 0xf6, 0x1d,
+  0xdc, 0xb9, 0x79, 0x31, 0x62, 0x70, 0x00, 0x79, 0x90, 0xdc, 0x6b, 0x00,
+  0xd5, 0x16, 0x6a, 0xe4, 0xfd, 0x61, 0x3d, 0xbb, 0xd1, 0xfc, 0x40, 0xce,
+  0xb3, 0x45, 0x9f, 0x51, 0xe8, 0x49, 0x09, 0x4d, 0x30,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 0x4d, 0xf0, 0xd7, 0x1e,
+  0xff, 0xb5, 0x37, 0x88, 0x6e, 0x97, 0xe1, 0x52, 0x1b, 0x9f, 0x6d, 0x24,
+  0xf5, 0xdd, 0xe2, 0xbc, 0x9c, 0xdb, 0xed, 0x92, 0xb5, 0x50, 0xb7, 0xd9,
+  0x50, 0xae, 0x71, 0xcd, 0x38, 0x12, 0x2b, 0x78, 0x97, 0x65, 0xd7, 0x12,
+  0x87, 0xa8, 0xec, 0x86, 0xdc, 0x75, 0x7e, 0x6e, 0x71, 0x43, 0x80, 0x01,
+  0xca, 0xc5, 0xc4, 0x71, 0xd7, 0x17, 0x1b, 0x4a, 0x97, 0x92, 0x1e, 0xec,
+  0xda, 0x3f, 0x93, 0xc2, 0x3a, 0xf8, 0x7e, 0x21, 0xfa, 0x70, 0xd8, 0x30,
+  0xc2, 0x30, 0xf2, 0x88, 0x93, 0x72, 0xc1, 0x08, 0x9f, 0x52, 0x2a, 0x88,
+  0xdf, 0x96, 0x40, 0x4b, 0x80, 0xc9, 0xdc, 0x09, 0x84, 0xc6, 0x46, 0x95,
+  0x59, 0xde, 0x4b, 0x73, 0xa6, 0x77, 0xbb, 0xcd, 0x9d, 0x8b, 0xec, 0xa2,
+  0x81, 0x93, 0xb4, 0x27, 0xa3, 0x63, 0x82, 0xf8, 0xd0, 0xa0, 0x0d, 0x77,
+  0x0c, 0x00, 0xff, 0x5d, 0xb6, 0x2a, 0xe6, 0x74, 0x79, 0x94, 0x82, 0xa6,
+  0xb6, 0xdc, 0x7f, 0x6c, 0x4e, 0x0e, 0x91, 0x83, 0x18, 0xc4, 0xc8, 0xac,
+  0x0d, 0x05, 0xa0, 0x24, 0x8b, 0x20, 0x60, 0xab, 0x30, 0xb2, 0xe4, 0xa6,
+  0x61, 0xef, 0x5b, 0xbe, 0x53, 0x56, 0x77, 0x8f, 0xb6, 0xc5, 0x73, 0x23,
+  0xd7, 0xeb, 0xbc, 0x01, 0x67, 0xd6, 0x63, 0xc0, 0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0x74, 0x4c, 0x98, 0x94, 0x3b,
+  0x12, 0xff, 0x7b, 0xd3, 0xed, 0x39, 0x7b, 0xfe, 0x22, 0x18, 0x18, 0xa0,
+  0x97, 0x78, 0x6c, 0xd0, 0x5e, 0x40, 0x3e, 0x77, 0x0a, 0xca, 0x53, 0x94,
+  0xbd, 0xcd, 0xf9, 0xec, 0x47, 0x01, 0x7b, 0xba, 0x84, 0x7a, 0x28, 0x22,
+  0x2a, 0x36, 0x93, 0xb4, 0x91, 0x85, 0xe1, 0xb5, 0x3c, 0xfd, 0x05, 0xcc,
+  0x88, 0x3b, 0x4f, 0x1f, 0xef, 0xe0, 0x8e, 0x01, 0x4a, 0x21, 0x33, 0x5d,
+  0x9e, 0x91, 0x78, 0x66, 0x22, 0x07, 0x5c, 0x36, 0x4d, 0x50, 0x85, 0xfc,
+  0x59, 0xdc, 0xb8, 0xe2, 0x4f, 0xd0, 0xcb, 0x91, 0x1d, 0x4c, 0xd5, 0x0f,
+  0xe1, 0xcc, 0x31, 0x0b, 0x76, 0xd1, 0x04, 0x41, 0xa7, 0x1e, 0xa5, 0x45,
+  0x08, 0x10, 0x03, 0x19, 0xd1, 0x28, 0x9f, 0xe3, 0x67, 0x20, 0xc8, 0x11,
+  0xc2, 0x10, 0x42, 0xc7, 0xe0, 0x19, 0xdb, 0x6a, 0x7b, 0x5e, 0xd5, 0xbe,
+  0x29, 0xa3, 0xe5, 0x34, 0x0a, 0xad, 0xf5, 0x10, 0x4d, 0x10, 0xf5, 0x02,
+  0xb3, 0x22, 0x45, 0x1d, 0x3b, 0xd6, 0x71, 0x78, 0x03, 0x58, 0x06, 0x91,
+  0x84, 0xf6, 0xc0, 0x12, 0x00, 0xb6, 0xc7, 0x32, 0xc5, 0x06, 0x06, 0xbf,
+  0xc1, 0x48, 0xed, 0x8d, 0xde, 0xe7, 0xaa, 0x5a, 0x32, 0x3c, 0x10, 0x3e,
+  0x34, 0x7c, 0x66, 0x68, 0xef, 0xe4, 0xf2, 0x22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, 0x11, 0x72, 0xe3, 0xbc, 0x20, 0x15,
+  0x08, 0xfe, 0x0a, 0x98, 0x09, 0x65, 0x5a, 0xac, 0x36, 0x2b, 0x36, 0x54,
+  0xbb, 0x94, 0xcb, 0x3a, 0x9b, 0x83, 0x00, 0x01, 0x51, 0xcf, 0xca, 0x45,
+  0x95, 0x94, 0x28, 0x86, 0x9a, 0xd3, 0x69, 0x50, 0xf5, 0x2a, 0x34, 0xd7,
+  0xd0, 0xd2, 0x76, 0x52, 0xf8, 0xd7, 0xa2, 0x84, 0x75, 0x00, 0x6a, 0xa1,
+  0xb6, 0x8f, 0xd2, 0x7a, 0x9a, 0xe7, 0x6c, 0x99, 0xe8, 0x31, 0x48, 0x68,
+  0x58, 0x33, 0xa1, 0x99, 0x12, 0x46, 0x42, 0x9e, 0x72, 0xd0, 0x85, 0x43,
+  0xcc, 0x0e, 0x9a, 0x85, 0xda, 0x69, 0x6e, 0xd7, 0x7b, 0xdb, 0x45, 0x1d,
+  0x96, 0x9a, 0x0d, 0x08, 0x56, 0x51, 0xac, 0xbb, 0x7a, 0x10, 0x44, 0x17,
+  0x41, 0xcf, 0x8c, 0x00, 0xaf, 0x49, 0x29, 0x25, 0x4a, 0xe5, 0xae, 0x4b,
+  0x30, 0x8a, 0xe8, 0xda, 0x53, 0x66, 0x8e, 0xe0, 0xa4, 0x5b, 0x63, 0x88,
+  0x15, 0xb7, 0x24, 0x92, 0xef, 0x8b, 0xa1, 0xe6, 0xdd, 0x37, 0x9e, 0x82,
+  0x98, 0x46, 0xb4, 0x39, 0x2e, 0x63, 0x48, 0xd1, 0x2e, 0x89, 0xcc, 0x43,
+  0x13, 0xce, 0x6c, 0x14, 0x97, 0xd6, 0xf2, 0x24, 0x01, 0x11, 0x8b, 0x25,
+  0xab, 0x13, 0x41, 0x3b, 0x44, 0x21, 0x87, 0x5b, 0x42, 0x91, 0x16, 0x63,
+  0x58, 0x91, 0xdd, 0x40, 0x10, 0xae, 0xa5, 0x6e, 0x5b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 0x62, 0x7f, 0x1b, 0x7d, 0xb1, 0x81, 0x02, 0x59, 0xc4, 0x56,
+  0x66, 0x69, 0x61, 0x16, 0x02, 0x27, 0x36, 0x8c, 0x74, 0x9b, 0xcf, 0x3f,
+  0x9b, 0x97, 0xab, 0xfa, 0x6e, 0x23, 0x91, 0x82, 0x72, 0x52, 0x87, 0xa9,
+  0x61, 0x44, 0x09, 0xda, 0x4e, 0xb3, 0xc5, 0xab, 0xe2, 0x83, 0xea, 0x8f,
+  0x48, 0x27, 0xaa, 0x13, 0xaa, 0x09, 0xd5, 0x69, 0x6e, 0xc3, 0xeb, 0xed,
+  0xff, 0xf1, 0xdb, 0xee, 0xf3, 0xe9, 0xb1, 0xd2, 0xfc, 0x20, 0x9d, 0xb9,
+  0x15, 0x04, 0x10, 0x53, 0x9b, 0x85, 0x1d, 0x5b, 0x97, 0xac, 0x6d, 0x15,
+  0x77, 0x07, 0x43, 0x6c, 0x6b, 0x85, 0x88, 0x56, 0x1c, 0x56, 0x4f, 0x8e,
+  0x98, 0xbb, 0x76, 0xd8, 0x2b, 0x9c, 0x9c, 0x4a, 0x5d, 0x57, 0xf7, 0x85,
+  0x43, 0xdc, 0x50, 0x98, 0xe6, 0x8b, 0xb2, 0x3c, 0x4f, 0xab, 0x8d, 0x20,
+  0x9e, 0x98, 0x06, 0x4e, 0x15, 0x3c, 0x30, 0xfc, 0x19, 0xdb, 0x16, 0xe1,
+  0xd6, 0x72, 0x2c, 0xf4, 0x0b, 0x7e, 0x77, 0xcc, 0x36, 0x7d, 0xef, 0x8b,
+  0x48, 0x30, 0xcf, 0x7c, 0x66, 0x67, 0xe9, 0xbb, 0xda, 0x28, 0xc1, 0x04,
+  0x7b, 0x34, 0x74, 0x6a, 0xbd, 0xd5, 0xeb, 0x25, 0xb3, 0x2c, 0xbb, 0x19,
+  0x45, 0xb2, 0x83, 0x9d, 0x53, 0x05, 0x21, 0xb2, 0x08, 0x7e, 0x4c, 0xb8,
+  0x9a, 0xba, 0x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  0x71, 0xd5, 0x0c, 0x86, 0x09, 0x8d, 0xcb, 0x2d, 0x72, 0x85, 0x7f, 0x2b,
+  0xcb, 0x62, 0x8b, 0x17, 0x34, 0xb9, 0xd4, 0xfa, 0x62, 0x57, 0x12, 0xaf,
+  0x03, 0x29, 0x3a, 0x12, 0xe6, 0x1f, 0x6f, 0xce, 0x9c, 0x86, 0xf9, 0x42,
+  0x86, 0x1a, 0xcc, 0x20, 0x9d, 0xdf, 0xa0, 0xde, 0xe7, 0xbb, 0x02, 0x49,
+  0x2e, 0xb9, 0x4d, 0xea, 0xe6, 0xd9, 0xfb, 0x46, 0x1e, 0xb7, 0xb2, 0xad,
+  0x0a, 0x8f, 0xbf, 0x15, 0x24, 0x04, 0x97, 0x51, 0xe9, 0x31, 0x94, 0x28,
+  0x0e, 0x04, 0x09, 0x3a, 0x2f, 0xe9, 0xc9, 0x4e, 0x65, 0x01, 0x57, 0x10,
+  0x01, 0xc6, 0x52, 0xf9, 0x2a, 0x82, 0x54, 0x84, 0x61, 0x72, 0x3d, 0x7b,
+  0xa9, 0x34, 0x51, 0x21, 0xd2, 0xae, 0xd1, 0xd2, 0x67, 0x02, 0x14, 0xc6,
+  0x3c, 0xec, 0x3c, 0x63, 0xac, 0x15, 0x52, 0x61, 0xcb, 0xb0, 0xaa, 0x32,
+  0xdd, 0x59, 0x37, 0x39, 0x97, 0x70, 0xa5, 0xd8, 0x3c, 0xc2, 0x0c, 0x18,
+  0x4b, 0x82, 0x21, 0x87, 0x07, 0x19, 0xea, 0xb3, 0xd1, 0x40, 0x96, 0x89,
+  0x73, 0x75, 0xdb, 0xae, 0x38, 0x62, 0xcb, 0x16, 0x58, 0xcf, 0x1d, 0x3b,
+  0x09, 0xe9, 0x23, 0x2e, 0xb1, 0x25, 0x8a, 0x19, 0x06, 0xf9, 0x6b, 0xed,
+  0x5f, 0x44, 0x98, 0xad, 0x74, 0x68, 0xa2, 0xfa, 0x68, 0x6e, 0x46, 0x94,
+  0xfb, 0x30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+  0xe1, 0x93, 0xef, 0x6c, 0x84, 0x13, 0x9d, 0x64, 0x73, 0x94, 0x03, 0x28,
+  0x43, 0xf0, 0x78, 0x3b, 0xab, 0x8f, 0x3b, 0xdd, 0xe6, 0x3c, 0x87, 0xce,
+  0x8e, 0xd6, 0xf9, 0x36, 0x03, 0x90, 0x43, 0x7d, 0xfa, 0x62, 0xf2, 0x9d,
+  0x77, 0x9c, 0xbd, 0xad, 0x77, 0x58, 0xb2, 0x66, 0x05, 0x03, 0x57, 0x8c,
+  0xe2, 0x6b, 0xa3, 0xad, 0x28, 0x99, 0xd7, 0xd7, 0x0f, 0x21, 0x73, 0x33,
+  0x90, 0x80, 0xcc, 0x83, 0xa5, 0x5d, 0x47, 0xe6, 0xfe, 0xfe, 0xb4, 0x83,
+  0xe1, 0x3d, 0x22, 0x2f, 0x88, 0xb0, 0x29, 0x71, 0xab, 0x8f, 0xba, 0xd9,
+  0xb1, 0x48, 0x14, 0x1d, 0x86, 0x08, 0xd3, 0x38, 0x3f, 0x8e, 0xbe, 0xcd,
+  0x0b, 0x01, 0x7d, 0xeb, 0x76, 0xc6, 0x09, 0xbc, 0x8f, 0xbe, 0x35, 0x55,
+  0x20, 0x63, 0xda, 0xf6, 0x49, 0x3b, 0x24, 0x6b, 0x8f, 0x58, 0x7d, 0x08,
+  0x87, 0x70, 0x85, 0x34, 0x74, 0x94, 0xe3, 0x7c, 0x40, 0x34, 0xce, 0xb5,
+  0x1f, 0x41, 0x08, 0x52, 0x5d, 0x98, 0xd3, 0xdc, 0x43, 0xe3, 0x3e, 0x30,
+  0x1b, 0xbc, 0x94, 0x10, 0xc9, 0x6a, 0xaa, 0x54, 0x38, 0xe7, 0x82, 0x9f,
+  0xb8, 0xa6, 0xc9, 0x56, 0xe0, 0x03, 0x81, 0x5c, 0x04, 0x07, 0xb1, 0x85,
+  0x15, 0x96, 0x45, 0x71, 0x25, 0xea, 0x0c, 0xd1, 0x76, 0x84, 0x38, 0xd8,
+  0x3d, 0x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0xcb, 0xc6, 0x17,
+  0xa6, 0xdd, 0x5a, 0x95, 0xf5, 0x22, 0x16, 0x87, 0x45, 0x72, 0x97, 0x79,
+  0x6a, 0x03, 0xf8, 0x92, 0xe4, 0x5e, 0xe4, 0x96, 0x2d, 0x06, 0x2e, 0xe7,
+  0x4d, 0x10, 0x74, 0x50, 0xc2, 0x31, 0x41, 0x8a, 0xfd, 0x1d, 0x88, 0x05,
+  0x08, 0x84, 0x02, 0x36, 0x76, 0x42, 0x9b, 0x43, 0x30, 0x44, 0xab, 0xca,
+  0x0b, 0x7e, 0x1a, 0x5c, 0xe5, 0x66, 0x57, 0x8b, 0x01, 0xdd, 0x72, 0x8e,
+  0x39, 0x4a, 0xbf, 0xc1, 0x64, 0x57, 0x73, 0xcf, 0x8b, 0x16, 0x5e, 0x02,
+  0x16, 0x3f, 0x25, 0xc0, 0x04, 0x70, 0xea, 0x1f, 0xb3, 0xaa, 0x84, 0xce,
+  0x9c, 0xcc, 0x21, 0x5e, 0x5a, 0x51, 0xa2, 0x18, 0x9c, 0x8e, 0xc6, 0x36,
+  0x23, 0xaa, 0x98, 0x4a, 0xfa, 0xa4, 0x2d, 0x59, 0x68, 0x4b, 0x6d, 0x2c,
+  0x60, 0x73, 0xc7, 0x5f, 0x58, 0xe3, 0x58, 0x31, 0x39, 0x6c, 0x82, 0xa0,
+  0xb2, 0x45, 0x8a, 0x38, 0x48, 0xa8, 0x6b, 0x7a, 0x47, 0x09, 0xf9, 0xae,
+  0x63, 0xa2, 0xee, 0x00, 0x85, 0xd7, 0xac, 0xe2, 0x65, 0x49, 0x96, 0x0b,
+  0xa1, 0x63, 0x2c, 0xe1, 0xb4, 0xca, 0x97, 0x0d, 0xe7, 0x99, 0x49, 0x62,
+  0xcc, 0xda, 0x1c, 0x6e, 0xf3, 0xdb, 0xe5, 0xbc, 0x3c, 0x4f, 0xe7, 0x02,
+  0xe6, 0x21, 0x61, 0xa9, 0xea, 0x9e, 0x6a, 0x95, 0x88, 0x00,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32, 0x29, 0x5e, 0x93,
+  0xf7, 0x48, 0xc1, 0xa2, 0xb8, 0x10, 0x5e, 0xd3, 0x94, 0x5e, 0x96, 0x3a,
+  0xcb, 0xbc, 0x64, 0xf4, 0x9c, 0x35, 0x01, 0x84, 0x35, 0x15, 0x2d, 0x36,
+  0x35, 0xe7, 0xf4, 0x72, 0x58, 0x10, 0xd9, 0x75, 0xef, 0xac, 0x05, 0x40,
+  0x6f, 0xc8, 0xe4, 0xab, 0xbc, 0xc8, 0xeb, 0x2b, 0x68, 0x6a, 0x0b, 0x44,
+  0xc2, 0x5c, 0x66, 0x61, 0x5d, 0x1f, 0x73, 0x79, 0x0a, 0xf7, 0x30, 0xba,
+  0x31, 0x55, 0xae, 0x42, 0x84, 0x3a, 0xef, 0x90, 0x64, 0xc6, 0x4a, 0xa5,
+  0x6e, 0x02, 0x53, 0x76, 0xd3, 0xec, 0xab, 0x22, 0xef, 0x8a, 0xc8, 0xf7,
+  0xd5, 0x90, 0x47, 0x51, 0x63, 0x82, 0xd5, 0xf5, 0x4a, 0x8c, 0xc6, 0x6a,
+  0x47, 0x26, 0x9b, 0x20, 0x83, 0x93, 0x89, 0xe1, 0x4e, 0x74, 0x57, 0x41,
+  0x1f, 0xad, 0x28, 0xd3, 0xc0, 0x7c, 0xf6, 0x83, 0xd1, 0x9c, 0xc6, 0xcf,
+  0xec, 0xc7, 0x5b, 0x0f, 0xab, 0x39, 0xbf, 0xd7, 0xd1, 0x24, 0x90, 0xf4,
+  0x23, 0x41, 0x0e, 0x64, 0x38, 0xfb, 0x8c, 0xff, 0x88, 0x5b, 0x84, 0x09,
+  0xdc, 0xe5, 0xd5, 0xeb, 0x17, 0xc0, 0xa0, 0x75, 0x79, 0xc8, 0x2e, 0x37,
+  0xa8, 0x0b, 0x04, 0x40, 0xd4, 0x41, 0x9a, 0x55, 0x14, 0x13, 0x5c, 0xe0,
+  0x65, 0xac, 0x89, 0x7f, 0xd6, 0x86, 0xeb, 0x20, 0xdd, 0x63, 0x8e, 0x42,
+  0xc3, 0x38, 0x32, 0xe3, 0xe4, 0x38, 0xe3, 0x9a, 0x9b, 0x1b, 0x5f, 0x6c,
+  0x44, 0x60, 0x03, 0x36, 0x9e, 0x7b, 0xf5, 0x86, 0x6a, 0x57, 0xce, 0x77,
+  0xe3, 0xaf, 0xc8, 0x7e, 0x02, 0xfc, 0x22, 0xf7, 0x29, 0x5b, 0xc0, 0x89,
+  0x3c, 0xf1, 0x40, 0x41, 0x4d, 0x2d, 0x10, 0x54, 0xf1, 0x76, 0x24, 0x32,
+  0x43, 0xa4, 0x65, 0x04, 0xe3, 0xd6, 0x9a, 0xbb, 0xaa, 0x1e, 0x1b, 0x01,
+  0xac, 0x40, 0x71, 0x27, 0x16, 0xbc, 0x9c, 0x82, 0x34, 0x9d, 0x8d, 0x89,
+  0x47, 0xc4, 0x43, 0xa1, 0x60, 0x50, 0xa3, 0x95, 0x12, 0x34, 0x09, 0x9b,
+  0x19, 0xcc, 0xd7, 0x97, 0x97, 0xd1, 0x78, 0x69, 0xb3, 0x04, 0xd8, 0x78,
+  0xcc, 0xf9, 0xc2, 0x88, 0x2f, 0x24, 0x1d, 0x43, 0x2a, 0xed, 0xcf, 0xd2,
+  0x72, 0x3c, 0x21, 0xf2, 0x8c, 0x37, 0x8b, 0xe7, 0x7e, 0x22, 0x6c, 0x8f,
+  0x5f, 0x80, 0xc8, 0x40, 0xe8, 0x00, 0x06, 0x35, 0xfa, 0xd4, 0x3a, 0x05,
+  0x2e, 0x52, 0x43, 0x19, 0x77, 0x12, 0xb7, 0x36, 0x47, 0xda, 0xa2, 0xa8,
+  0xfe, 0x01, 0xb7, 0x9b, 0x93, 0x19, 0x5f, 0x12, 0xe5, 0x50, 0x97, 0x90,
+  0xd7, 0xb1, 0x10, 0xd1, 0x40, 0x32, 0xeb, 0x48, 0x8d, 0x4e, 0xb4, 0xf2,
+  0x9f, 0x98, 0x9d, 0x28, 0x67, 0xae, 0x6b, 0xa3, 0x97, 0x0c, 0x3a, 0x39,
+  0x89, 0x22, 0x5a, 0xbb, 0x98, 0x23, 0xca, 0x00, 0x24, 0xa6, 0xe1, 0x6c,
+  0x85, 0x3e, 0x68, 0x42, 0xd7, 0x8a, 0x4a, 0xfa, 0xae, 0x61, 0x46, 0xdb,
+  0x74, 0x48, 0x38, 0x75, 0xb1, 0x0b, 0x76, 0xb3, 0xb7, 0xff, 0xe9, 0xa7,
+  0x51, 0x23, 0x23, 0xe3, 0x20, 0x19, 0x1a, 0xc4, 0x32, 0x05, 0x90, 0x57,
+  0x52, 0x73, 0x1e, 0x04, 0x56, 0xab, 0x75, 0xad, 0xa4, 0x1a, 0xe3, 0xa6,
+  0xd7, 0xd0, 0xd8, 0x4c, 0x51, 0x4d, 0x0b, 0x08, 0x1c, 0xc2, 0xc5, 0x48,
+  0x15, 0x00, 0xd7, 0x58, 0xe4, 0x3d, 0x0a, 0x88, 0x88, 0x11, 0xb5, 0x62,
+  0x3a, 0x09, 0xa2, 0xb8, 0xe4, 0xbb, 0x31, 0x74, 0x97, 0x11, 0x2d, 0x28,
+  0xa3, 0x8e, 0x23, 0x49, 0x89, 0xae, 0x7a, 0x70, 0x27, 0x36, 0x12, 0x0d,
+  0xac, 0x3a, 0xcf, 0x2c, 0x80, 0x1e, 0xd7, 0xef, 0xed, 0xa0, 0x66, 0x72,
+  0xfe, 0x58, 0x91, 0x7c, 0xc1, 0x95, 0xf0, 0x4c, 0xf3, 0x9d, 0xe6, 0x08,
+  0x8a, 0xe5, 0x32, 0x6b, 0xc2, 0x7c, 0x69, 0x2f, 0xd3, 0x68, 0x4d, 0xe3,
+  0x91, 0xd3, 0x20, 0xe9, 0xde, 0xcf, 0xa5, 0x52, 0x53, 0x7e, 0xa1, 0x07,
+  0x54, 0x0b, 0xc7, 0x7d, 0xc1, 0x32, 0xf3, 0x73, 0x8b, 0xd3, 0x5b, 0x28,
+  0x87, 0xfa, 0x22, 0x0a, 0x8b, 0xec, 0xf2, 0xae, 0x08, 0xa6, 0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0f, 0xa7, 0xf1, 0x75, 0x1d, 0x7c, 0xc1, 0xbf, 0x10, 0xb5,
+  0xaf, 0x6b, 0x16, 0xda, 0x83, 0xbe, 0x93, 0x7c, 0xc8, 0xee, 0x28, 0x89,
+  0x99, 0xc2, 0x7f, 0x97, 0x4b, 0xa4, 0x25, 0x2b, 0x32, 0x47, 0xc3, 0xc8,
+  0x1c, 0xa4, 0x53, 0xa4, 0xe7, 0x25, 0x67, 0x63, 0x35, 0x61, 0x79, 0x1d,
+  0x2a, 0xef, 0x41, 0x7b, 0xcb, 0x79, 0x38, 0x08, 0x77, 0x1c, 0x8b, 0x87,
+  0xb5, 0x1d, 0x07, 0xd7, 0xc6, 0x59, 0x18, 0x26, 0x47, 0x91, 0x3a, 0x6a,
+  0x0e, 0x52, 0x91, 0x7f, 0x23, 0x39, 0x8d, 0xc0, 0x23, 0xa1, 0x72, 0xa1,
+  0xdc, 0x32, 0x47, 0xb0, 0x2d, 0xb8, 0x08, 0x3b, 0x79, 0x6d, 0x18, 0x58,
+  0xf3, 0xaf, 0x31, 0x47, 0x96, 0xf8, 0xd6, 0x25, 0xe7, 0xed, 0xa2, 0x9c,
+  0xcf, 0xc4, 0xa7, 0x66, 0xa8, 0x9e, 0x37, 0xd8, 0x96, 0xdd, 0x36, 0x22,
+  0x08, 0x96, 0x42, 0xfc, 0x6c, 0xd2, 0x6d, 0x44, 0x70, 0x12, 0x5f, 0x38,
+  0x5b, 0xe7, 0x5c, 0x30, 0x0c, 0x50, 0x25, 0x41, 0xf8, 0x7f, 0x45, 0xf8,
+  0xcb, 0x79, 0x46, 0xc6, 0x28, 0x8b, 0x1f, 0x31, 0x12, 0xab, 0x72, 0xc4,
+  0xa2, 0x93, 0xd8, 0x73, 0xa3, 0x07, 0x87, 0x66, 0x68, 0x11, 0x24, 0x10,
+  0xf4, 0xfd, 0x0d, 0x19, 0x66, 0xd9, 0xe7, 0xa0, 0xc5, 0x31, 0x71, 0xe9,
+  0xc4, 0x27, 0x6b, 0x43, 0x79, 0xb0, 0x42, 0xe1, 0x69, 0x4b, 0xfe, 0x24,
+  0x16, 0x68, 0x2f, 0xe2, 0x87, 0x66, 0x2f, 0x9b, 0x35, 0x0e, 0x5e, 0xf8,
+  0x41, 0x42, 0x29, 0x47, 0xbb, 0x07, 0x5e, 0xa1, 0x53, 0xfe, 0x2c, 0xde,
+  0xbc, 0x8f, 0x3e, 0x27, 0xa3, 0x42, 0x8f, 0xb4, 0xfc, 0x6b, 0xda, 0xdf,
+  0xb3, 0xed, 0x7f, 0x12, 0x01, 0x7c, 0x63, 0x48, 0xb6, 0x78, 0xb7, 0x67,
+  0x2e, 0xa2, 0x5f, 0x8d, 0xaa, 0xd6, 0xb2, 0xd1, 0xb2, 0x29, 0x48, 0x18,
+  0xa2, 0x80, 0xc1, 0xb1, 0xaa, 0x1c, 0xd6, 0x89, 0x6b, 0x08, 0x5b, 0x8a,
+  0xd4, 0x42, 0x9a, 0x87, 0x59, 0xc6, 0xae, 0xca, 0xc8, 0x02, 0x80, 0x10,
+  0x56, 0xb9, 0x40, 0x09, 0x87, 0xd9, 0x01, 0x3b, 0xd1, 0x1d, 0x78, 0x55,
+  0xee, 0xa7, 0xf2, 0x39, 0xb4, 0x8f, 0x28, 0x46, 0xb7, 0x2d, 0x91, 0x12,
+  0x74, 0x65, 0x58, 0x31, 0x23, 0x3e, 0x7a, 0x05, 0xdc, 0x37, 0x36, 0x37,
+  0xc4, 0xca, 0x82, 0x8e, 0x52, 0x76, 0x70, 0x08, 0x78, 0x6a, 0x4a, 0x00,
+  0x25, 0x62, 0xdb, 0x19, 0x45, 0xa4, 0x91, 0x03, 0x62, 0xed, 0xf6, 0x4c,
+  0x78, 0x08, 0x85, 0xaa, 0x46, 0x33, 0x9e, 0x68, 0x0b, 0x96, 0x30, 0x54,
+  0x9a, 0xbd, 0x25, 0x96, 0xc6, 0x58, 0x57, 0x75, 0xa9, 0x07, 0x69, 0xb2,
+  0xf1, 0xd9, 0xd6, 0x46, 0x3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 0x2d, 0x92, 0xe1, 0xec, 0x41, 0x3a, 0x8b, 0x78, 0x19, 0xc3,
+  0x74, 0xf1, 0x4e, 0x6f, 0xa8, 0x31, 0x11, 0xa3, 0x9e, 0xde, 0xcc, 0x7a,
+  0x40, 0x72, 0xc9, 0xec, 0x44, 0x21, 0x90, 0x5c, 0x59, 0x80, 0x92, 0x24,
+  0x0e, 0xbf, 0x7f, 0xe9, 0xd5, 0xeb, 0xd4, 0x28, 0x4b, 0xa6, 0x17, 0x11,
+  0x48, 0xfb, 0x60, 0x68, 0x33, 0x17, 0x2a, 0x3c, 0x26, 0x27, 0xeb, 0x2c,
+  0xcb, 0x96, 0xb6, 0x96, 0x55, 0x4e, 0x19, 0xae, 0x14, 0xdd, 0x03, 0xaf,
+  0x2a, 0xd5, 0x11, 0xa3, 0x8a, 0xd4, 0x3d, 0xa3, 0x13, 0xd6, 0x31, 0xf6,
+  0x22, 0x37, 0x10, 0x10, 0x49, 0x6e, 0xdd, 0xdd, 0xa7, 0xfb, 0x9f, 0x9a,
+  0xbb, 0xf9, 0x8e, 0xaa, 0x48, 0xb9, 0x25, 0xe3, 0x22, 0x04, 0xd1, 0xe6,
+  0xce, 0x3c, 0xb7, 0xae, 0x06, 0xa6, 0x0b, 0x60, 0x53, 0x52, 0x43, 0x8d,
+  0x20, 0x03, 0x95, 0xe0, 0xa8, 0x84, 0x88, 0x79, 0x66, 0x11, 0x65, 0xc1,
+  0x24, 0x64, 0x94, 0xd6, 0x89, 0x23, 0xc9, 0xc6, 0x1e, 0x01, 0x1b, 0xc9,
+  0x8e, 0x8a, 0x31, 0x1b, 0x96, 0xf2, 0xf6, 0xe8, 0xec, 0xad, 0xf9, 0x67,
+  0x72, 0x76, 0xf2, 0xb6, 0x07, 0x12, 0xba, 0x61, 0x20, 0x30, 0x2c, 0x9a,
+  0x86, 0xaf, 0xd0, 0x32, 0xb7, 0xe1, 0x62, 0x29, 0x8e, 0x9f, 0xd9, 0x0e,
+  0x85, 0x17, 0x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, 0x82, 0xa1, 0xe8, 0x2b, 0x67, 0x64, 0x28, 0xa9, 0x34, 0x5f,
+  0x0c, 0x9e, 0x2f, 0x79, 0x57, 0x08, 0x36, 0x5d, 0x61, 0x74, 0x0b, 0x8a,
+  0x86, 0x98, 0xd9, 0x45, 0x03, 0xec, 0x23, 0xa2, 0xb8, 0xf8, 0xd2, 0x9a,
+  0x95, 0x2c, 0xd0, 0x53, 0xe9, 0xdf, 0x10, 0x6d, 0x98, 0x6c, 0xc8, 0x14,
+  0x5f, 0xa0, 0x37, 0x8d, 0xb4, 0xe7, 0xf4, 0x92, 0x69, 0xd3, 0x9d, 0x29,
+  0x65, 0x54, 0x05, 0x13, 0x3d, 0xf5, 0x37, 0x4d, 0x02, 0x45, 0x28, 0x50,
+  0xd7, 0xf2, 0x82, 0x86, 0x71, 0x9d, 0xda, 0xf8, 0x5c, 0x02, 0xa8, 0x15,
+  0xcb, 0x74, 0x28, 0x04, 0x3c, 0x6b, 0x55, 0xcc, 0x91, 0xe4, 0xd0, 0x46,
+  0xa5, 0x52, 0x31, 0x70, 0x1d, 0x24, 0x85, 0x0f, 0x62, 0xd5, 0x22, 0xc9,
+  0x36, 0x34, 0x50, 0x7b, 0x76, 0xbd, 0xa8, 0x20, 0x44, 0xa0, 0x6f, 0xb1,
+  0x65, 0x8a, 0x84, 0xad, 0xb4, 0x95, 0x17, 0x39, 0xb0, 0x0a, 0xcb, 0x6a,
+  0x1b, 0x39, 0x94, 0x19, 0x95, 0xa1, 0x31, 0xd7, 0xa3, 0x0b, 0xc9, 0x8e,
+  0x18, 0x38, 0xac, 0x28, 0xc7, 0xc1, 0xb1, 0xa6, 0xf1, 0x71, 0x24, 0x6d,
+  0x51, 0xea, 0x41, 0x64, 0x3e, 0x42, 0xd5, 0x38, 0x16, 0x7b, 0xcc, 0x35,
+  0x3c, 0x29, 0x04, 0xb2, 0x2d, 0x8e, 0xc9, 0x89, 0xb1, 0xd5, 0x24, 0x69,
+  0x5f, 0x49, 0xe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10,
+  0x9f, 0xcd, 0x32, 0x98, 0x85, 0x52, 0x6e, 0x5b, 0xe5, 0xf5, 0x07, 0xcc,
+  0x4f, 0x92, 0xd4, 0xbc, 0xd0, 0x21, 0x8c, 0xe7, 0x13, 0x2f, 0x97, 0x5c,
+  0xd0, 0xf1, 0x6c, 0x3e, 0xb9, 0xb7, 0xb2, 0xed, 0x92, 0x94, 0xd8, 0x76,
+  0x85, 0xbd, 0x88, 0x02, 0x7b, 0xca, 0x63, 0x55, 0xf6, 0x00, 0xbc, 0x59,
+  0x8e, 0x0f, 0x4a, 0x4e, 0x8d, 0x9c, 0x6b, 0x49, 0xc3, 0x03, 0x81, 0x4c,
+  0x38, 0x35, 0x9e, 0x6e, 0xbf, 0xad, 0xee, 0xad, 0x85, 0xda, 0x90, 0x30,
+  0x14, 0x93, 0xa6, 0xea, 0x10, 0x54, 0x61, 0xa5, 0x83, 0x50, 0x30, 0xab,
+  0xcc, 0x30, 0xa8, 0x40, 0x06, 0x21, 0xe3, 0xf0, 0xc9, 0x80, 0x93, 0x57,
+  0x65, 0xba, 0x4f, 0xa2, 0xba, 0x02, 0x1d, 0x34, 0x27, 0x8c, 0xce, 0xd9,
+  0xa6, 0x8e, 0xc5, 0xa7, 0x55, 0xc7, 0xbf, 0x86, 0x5b, 0xb3, 0x2d, 0x67,
+  0x56, 0xde, 0x14, 0xb0, 0x2c, 0x41, 0xb1, 0xe8, 0xb2, 0x6f, 0x1a, 0xfe,
+  0x22, 0x56, 0x1b, 0xc0, 0xbb, 0x54, 0xf7, 0x76, 0x42, 0x53, 0x4a, 0xfd,
+  0x21, 0xe7, 0x45, 0x1e, 0xe5, 0xcb, 0xfb, 0x17, 0x50, 0x81, 0x44, 0xb1,
+  0xa5, 0x2d, 0xce, 0x62, 0x6f, 0x98, 0x7a, 0x75, 0x79, 0x49, 0x78, 0x59,
+  0x61, 0xa4, 0x5e, 0x53, 0xbb, 0x84, 0x06, 0x29, 0xa4, 0x64, 0x18, 0x39,
+  0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0x9d, 0x1c, 0x6b, 0xf5, 0x49,
+  0xbd, 0x5f, 0x68, 0x86, 0x08, 0x60, 0x05, 0x18, 0x29, 0x15, 0xf6, 0x94,
+  0x4d, 0xab, 0xb4, 0x36, 0x59, 0x88, 0x67, 0x41, 0xc6, 0x67, 0x0c, 0xe3,
+  0x36, 0xe7, 0xe2, 0x56, 0x79, 0x31, 0x63, 0xa0, 0xd0, 0x96, 0x5d, 0xb7,
+  0xa9, 0x56, 0x59, 0xcc, 0xe8, 0x3a, 0x5e, 0x17, 0x99, 0x02, 0x79, 0xb6,
+  0xca, 0x17, 0x69, 0x95, 0xcf, 0xef, 0x94, 0xc0, 0x6f, 0xb8, 0xc6, 0x37,
+  0x47, 0x5a, 0x91, 0xeb, 0xcc, 0xc1, 0xde, 0x97, 0x41, 0xd4, 0xaa, 0x2d,
+  0x58, 0x05, 0x22, 0x66, 0x4c, 0x2f, 0x71, 0x71, 0xf2, 0x62, 0xad, 0x85,
+  0x04, 0x6b, 0x9b, 0x0f, 0xac, 0x2c, 0x11, 0xcd, 0xe8, 0x85, 0x74, 0xfb,
+  0xd5, 0xab, 0xe3, 0xa3, 0xad, 0xe4, 0xab, 0xac, 0x91, 0xa4, 0x29, 0x0d,
+  0x50, 0xc6, 0x6d, 0xff, 0x2f, 0x24, 0x5b, 0x59, 0x44, 0x61, 0x49, 0x39,
+  0x8e, 0x86, 0x92, 0x89, 0x09, 0x8f, 0xe4, 0x0c, 0xcd, 0xc0, 0xe2, 0xcd,
+  0xa1, 0x29, 0xc2, 0x9d, 0xa7, 0xa1, 0x69, 0xea, 0x1e, 0x95, 0x9d, 0x8f,
+  0x84, 0xed, 0x2a, 0xc2, 0xc4, 0xd8, 0x89, 0x99, 0xec, 0xf7, 0xd6, 0x08,
+  0x04, 0x0c, 0x5a, 0x42, 0xa6, 0xd5, 0xdd, 0x9c, 0xd7, 0xcb, 0x39, 0xb8,
+  0x41, 0x14, 0xe2, 0x68, 0x9e, 0xb9, 0x44, 0x41, 0xa2, 0x7c, 0xa3, 0x38,
+  0x38, 0x3c, 0x58, 0x62, 0xa8, 0x98, 0xaf, 0xb7, 0x70, 0xdf, 0xe8, 0xc2,
+  0x21, 0x6a, 0x85, 0xff, 0xdd, 0xfe, 0x62, 0x1d, 0x1c, 0xdd, 0xd1, 0xad,
+  0x11, 0xc9, 0x75, 0x4e, 0x44, 0x51, 0x54, 0x7d, 0x58, 0x5d, 0x8e, 0x2a,
+  0x71, 0xb6, 0x28, 0x21, 0x22, 0xb9, 0x92, 0xe9, 0x4f, 0x35, 0xdd, 0xbf,
+  0x49, 0x7d, 0x49, 0x15, 0x1d, 0xa8, 0xec, 0xac, 0xbd, 0x5d, 0x32, 0xea,
+  0xd1, 0x06, 0x29, 0x47, 0x4b, 0xb9, 0x32, 0x57, 0x96, 0x9a, 0x88, 0x7c,
+  0x8b, 0x23, 0xd8, 0xdf, 0x22, 0x2c, 0xea, 0x78, 0xf1, 0xd8, 0x95, 0x94,
+  0xd9, 0x20, 0x53, 0x0c, 0x67, 0xa5, 0xd5, 0x51, 0x8f, 0x81, 0x64, 0xcb,
+  0x89, 0x67, 0x90, 0x8a, 0xc1, 0xb3, 0x4d, 0x87, 0xc5, 0xe7, 0x15, 0x64,
+  0x39, 0x4e, 0x18, 0xa3, 0x42, 0x49, 0x15, 0x63, 0x67, 0x47, 0x04, 0x25,
+  0xe9, 0xdd, 0x67, 0x41, 0x5d, 0x71, 0xdd, 0xef, 0xa6, 0xad, 0x84, 0x86,
+  0x92, 0xa2, 0x59, 0x3b, 0x12, 0x27, 0x81, 0x1e, 0x82, 0x24, 0xfa, 0xe9,
+  0x87, 0x9c, 0xf2, 0x1a, 0x57, 0x24, 0xc9, 0xa5, 0x85, 0x26, 0x72, 0xf1,
+  0x30, 0x6d, 0x49, 0x1a, 0x43, 0x6e, 0x63, 0xca, 0x86, 0xe8, 0x29, 0x21,
+  0x4a, 0x52, 0x12, 0xec, 0x05, 0x40, 0x1e, 0xd6, 0xf1, 0xcc, 0x29, 0x21,
+  0xc2, 0x9e, 0x16, 0x95, 0xd1, 0x90, 0x5e, 0x49, 0x62, 0x62, 0xa4, 0x82,
+  0x85, 0x39, 0xc6, 0x40, 0x00, 0x81, 0xa9, 0xee, 0x46, 0xf0, 0xf5, 0x36,
+  0xaa, 0x8c, 0xcb, 0x63, 0x8d, 0x8d, 0x12, 0xba, 0x40, 0x46, 0x81, 0x56,
+  0x9a, 0xc0, 0x94, 0x65, 0x79, 0x0c, 0x6f, 0xbb, 0xcc, 0xaf, 0xa3, 0x85,
+  0x77, 0x52, 0x3b, 0x30, 0x0a, 0xf2, 0xb0, 0xc3, 0x70, 0xb5, 0xc3, 0xd5,
+  0x23, 0xce, 0x66, 0x6d, 0x80, 0xdc, 0xca, 0xca, 0x06, 0x27, 0x78, 0x0e,
+  0x61, 0x15, 0x68, 0x76, 0xc5, 0x81, 0x21, 0xff, 0x64, 0xf0, 0x8d, 0x91,
+  0x7c, 0x0e, 0x06, 0xb6, 0xf6, 0x0b, 0x99, 0x65, 0x89, 0x3b, 0xb6, 0x28,
+  0x87, 0xf4, 0x8b, 0x22, 0x28, 0x0b, 0xc4, 0xd8, 0x06, 0x22, 0xb4, 0x37,
+  0xca, 0xb8, 0x6c, 0xbe, 0x4e, 0x18, 0x15, 0x6d, 0xf3, 0x67, 0x38, 0x01,
+  0x35, 0x4c, 0x1e, 0xc4, 0x90, 0x7e, 0x18, 0x1d, 0x52, 0xe7, 0xa3, 0x6f,
+  0xa8, 0xb9, 0xbf, 0x0e, 0xac, 0xbd, 0xb8, 0xfb, 0x95, 0x19, 0xf8, 0x27,
+  0xb1, 0x88, 0x21, 0xa7, 0x9f, 0x3a, 0xd8, 0x4f, 0x8a, 0x43, 0x51, 0xc8,
+  0x41, 0x4c, 0x15, 0x47, 0x64, 0x5b, 0x37, 0x9c, 0x9c, 0x31, 0x75, 0x58,
+  0x1d, 0xdc, 0x46, 0x2c, 0x98, 0x5b, 0x64, 0x89, 0x38, 0xc8, 0x62, 0x36,
+  0x2a, 0x2f, 0x46, 0x14, 0x60, 0x6d, 0x98, 0xff, 0x07, 0xc4, 0x32, 0x79,
+  0xa7, 0x8e, 0xf0, 0x46, 0x08, 0xdc, 0x75, 0x36, 0x8b, 0x85, 0x47, 0x51,
+  0x6e, 0x31, 0x49, 0x1d, 0x42, 0xf8, 0x9a, 0xa7, 0xc1, 0x1b, 0x79, 0x20,
+  0x46, 0x7d, 0x7a, 0x5d, 0x2b, 0x4f, 0x83, 0x13, 0x6a, 0x3e, 0x45, 0x60,
+  0x4a, 0xa3, 0xec, 0x8a, 0x21, 0xcb, 0xef, 0x34, 0x6b, 0x52, 0xdf, 0x16,
+  0x6c, 0x09, 0x26, 0xf3, 0xf5, 0x6a, 0xa9, 0x10, 0xdd, 0xeb, 0x43, 0x2d,
+  0xa1, 0xbc, 0x10, 0xf6, 0x36, 0x44, 0x6e, 0x8d, 0x27, 0x32, 0x6c, 0xcd,
+  0x96, 0xde, 0x36, 0x47, 0xec, 0x0e, 0xac, 0xd8, 0x66, 0xde, 0x16, 0xa1,
+  0x1b, 0xd4, 0xe5, 0x47, 0xb8, 0xd8, 0x1f, 0x5a, 0x2b, 0xe1, 0x8f, 0x94,
+  0x7c, 0xab, 0x90, 0xd1, 0x12, 0xcc, 0x95, 0x7c, 0x31, 0x8a, 0x82, 0x5b,
+  0x39, 0x37, 0x9a, 0xad, 0xc7, 0xea, 0x27, 0x7a, 0xf8, 0xb5, 0x55, 0x7d,
+  0x01, 0xe6, 0xb1, 0x7f, 0x33, 0xfa, 0x39, 0x50, 0x84, 0x03, 0x67, 0xab,
+  0xf0, 0x29, 0x25, 0x28, 0x69, 0xb5, 0xe8, 0xbd, 0xa6, 0xd3, 0x59, 0x68,
+  0x18, 0x77, 0x1a, 0x4b, 0x87, 0xa6, 0x66, 0xda, 0x70, 0xf9, 0x4f, 0x23,
+  0x5d, 0x93, 0xa3, 0x1f, 0xe8, 0x0c, 0x90, 0xe3, 0x07, 0x41, 0xd4, 0xf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2e, 0xd2,
+  0x15, 0x9f, 0x60, 0x86, 0x05, 0x94, 0x4f, 0x5d, 0x4e, 0x89, 0x5d, 0x81,
+  0x07, 0x87, 0x68, 0xbb, 0x18, 0x6d, 0x56, 0x26, 0x58, 0x3b, 0xf5, 0xf8,
+  0xa5, 0xf9, 0x17, 0xf7, 0x58, 0x14, 0x53, 0x65, 0x9e, 0xb9, 0x8c, 0xaa,
+  0x5e, 0x4b, 0xef, 0x0b, 0xad, 0x8b, 0x39, 0x32, 0x5c, 0xad, 0x90, 0x6a,
+  0x98, 0x19, 0x3e, 0x64, 0x00, 0x1e, 0xdf, 0xa4, 0x73, 0xc5, 0x42, 0xda,
+  0x7c, 0x99, 0x3c, 0x87, 0xf0, 0x7e, 0x59, 0x56, 0x77, 0x9f, 0x07, 0x68,
+  0x99, 0x54, 0xac, 0x18, 0x0f, 0xd9, 0x88, 0x3f, 0x38, 0xf0, 0x48, 0x8c,
+  0x70, 0x71, 0xc4, 0xc2, 0x74, 0x5d, 0x33, 0x63, 0xc1, 0xec, 0x0d, 0x6a,
+  0xa1, 0x5c, 0x52, 0xc9, 0x0c, 0x17, 0xa0, 0xed, 0xc5, 0xe8, 0xb1, 0x08,
+  0xca, 0x71, 0x00, 0x54, 0xdd, 0x3a, 0x5f, 0x40, 0x5b, 0xa0, 0xf8, 0x30,
+  0xe9, 0x29, 0x92, 0xdb, 0x97, 0x58, 0xa6, 0x0a, 0x19, 0x4e, 0xad, 0x04,
+  0x96, 0xd1, 0x0e, 0xcc, 0x38, 0x07, 0x7d, 0x7d, 0x76, 0xe5, 0x66, 0x19,
+  0x01, 0xa6, 0xa6, 0x25, 0x19, 0x9c, 0xf7, 0x36, 0x6c, 0x3b, 0x19, 0xe8,
+  0x7c, 0x11, 0x88, 0x1c, 0x48, 0x7b, 0xeb, 0x26, 0x49, 0xab, 0xc7, 0x2f,
+  0xe7, 0x12, 0xfc, 0x6f, 0x9a, 0xce, 0x2b, 0x05, 0x4f, 0x6a, 0x05, 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0xe0,
+  0x98, 0xc8, 0x0b, 0x51, 0x84, 0x0b, 0x8e, 0x09, 0x27, 0xdd, 0x08, 0xad,
+  0x01, 0x92, 0x3b, 0x13, 0x45, 0x8f, 0x64, 0xb5, 0x76, 0x68, 0x4a, 0xf2,
+  0x02, 0x8c, 0xbc, 0x7b, 0x44, 0x25, 0x2e, 0x33, 0x63, 0xe3, 0x99, 0x8c,
+  0x42, 0xb0, 0x67, 0xa8, 0x3d, 0x5b, 0x92, 0x9c, 0xeb, 0x37, 0x94, 0x6b,
+  0x47, 0xc7, 0x65, 0x1f, 0x39, 0xf7, 0xdb, 0xe6, 0x67, 0xb0, 0xfa, 0x18,
+  0x03, 0x76, 0x56, 0x4d, 0x2d, 0x19, 0x0c, 0x3c, 0x00, 0xa3, 0xcd, 0x5f,
+  0xb2, 0xaa, 0x94, 0x5c, 0xa3, 0x2d, 0x9a, 0xe9, 0x75, 0x99, 0xcf, 0x12,
+  0x01, 0x68, 0xda, 0x56, 0x1c, 0xba, 0x80, 0x3f, 0xb8, 0xbb, 0x9a, 0x40,
+  0x83, 0x00, 0x42, 0x67, 0x9a, 0xa4, 0xa5, 0xb1, 0x88, 0x39, 0x0f, 0x0b,
+  0x95, 0x8c, 0xd9, 0x81, 0x1c, 0x35, 0x93, 0xd9, 0x44, 0xed, 0xbe, 0x5d,
+  0xbd, 0x85, 0x22, 0x53, 0x24, 0x3f, 0x81, 0x01, 0xa4, 0x54, 0x83, 0x8f,
+  0x1a, 0x91, 0x88, 0x02, 0x78, 0x46, 0x6b, 0xcb, 0xe6, 0x3c, 0xea, 0xd8,
+  0x93, 0x8c, 0x50, 0xb0, 0x33, 0x7e, 0xd6, 0x53, 0x88, 0xa0, 0x05, 0x4a,
+  0x88, 0x1c, 0x4d, 0x9b, 0x65, 0x4c, 0x72, 0x0f, 0xcc, 0x13, 0x98, 0x29,
+  0x80, 0xf1, 0x34, 0x7c, 0x21, 0xe8, 0x1c, 0x4f, 0x6e, 0xe3, 0x09, 0x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 0xee, 0xe9, 0x19,
+  0xdd, 0xff, 0xad, 0xcf, 0xe8, 0xfe, 0xc7, 0x9e, 0x51, 0xe1, 0x6f, 0xf1,
+  0x13, 0xda, 0x77, 0x5a, 0xbb, 0xa3, 0xf3, 0x4e, 0xaf, 0x78, 0xca, 0x3a,
+  0x75, 0x1b, 0x19, 0x34, 0x67, 0x24, 0x52, 0xf0, 0x88, 0x85, 0xf5, 0x58,
+  0x4e, 0x2c, 0x9f, 0x61, 0x05, 0xc0, 0x1d, 0x26, 0xaf, 0xb8, 0x12, 0x89,
+  0x0f, 0x2b, 0x7b, 0xcc, 0xa8, 0x02, 0xe2, 0xae, 0x73, 0x99, 0x86, 0x11,
+  0xe4, 0x91, 0x7c, 0x0a, 0x98, 0xc9, 0x39, 0x07, 0xfa, 0xc3, 0x57, 0xc8,
+  0xf2, 0xb3, 0xc8, 0x8c, 0xd5, 0x8a, 0xbc, 0xa1, 0xc9, 0x8b, 0x25, 0x69,
+  0x2e, 0xbb, 0xe3, 0x5b, 0x35, 0xb3, 0x46, 0xd4, 0xff, 0x2a, 0xa3, 0x45,
+  0x36, 0x32, 0x9e, 0x24, 0x1c, 0x75, 0x86, 0x83, 0x86, 0x59, 0x80, 0x9f,
+  0x83, 0xf2, 0x2b, 0x35, 0x39, 0xed, 0x25, 0x86, 0xc0, 0x2f, 0x83, 0x62,
+  0x67, 0xe7, 0x77, 0x4d, 0x24, 0xfd, 0x95, 0x2a, 0x69, 0x61, 0x19, 0x36,
+  0x6b, 0x09, 0xaf, 0x7f, 0x64, 0x16, 0x72, 0x6b, 0x98, 0x20, 0x48, 0x99,
+  0x16, 0x01, 0x09, 0x8a, 0xd6, 0x23, 0x48, 0x35, 0xa9, 0x2e, 0x61, 0x6b,
+  0x97, 0xbc, 0xb7, 0x20, 0x53, 0xf0, 0x97, 0x4c, 0xc3, 0xbb, 0x35, 0x76,
+  0x5a, 0x60, 0xb7, 0xa3, 0x38, 0xa7, 0x9d, 0x22, 0x1b, 0x08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fa, 0xa7, 0x96, 0x29,
+  0x22, 0x53, 0x71, 0x24, 0x24, 0x53, 0x76, 0xc4, 0xab, 0x59, 0xe8, 0x45,
+  0x10, 0xba, 0x42, 0x92, 0x89, 0x4e, 0x30, 0x1e, 0x0c, 0xa3, 0xfb, 0xea,
+  0x87, 0xa8, 0xf8, 0x33, 0x31, 0x1a, 0x98, 0x94, 0xc4, 0x16, 0x47, 0x95,
+  0x43, 0xb7, 0x5f, 0x53, 0xe6, 0xd4, 0x02, 0x19, 0x3a, 0x97, 0x1f, 0x97,
+  0x78, 0xa4, 0x99, 0x49, 0xe3, 0xb5, 0x5f, 0xbe, 0x20, 0x80, 0x71, 0x71,
+  0x18, 0xd9, 0x68, 0x98, 0x8b, 0xea, 0x45, 0xb7, 0x98, 0x6f, 0x64, 0x46,
+  0x14, 0x42, 0x41, 0xd9, 0x15, 0x02, 0xf2, 0x88, 0xc5, 0x08, 0x32, 0x88,
+  0x80, 0x81, 0x74, 0x81, 0xa2, 0x2c, 0x0c, 0x27, 0x56, 0x7f, 0x5c, 0x67,
+  0xdb, 0x86, 0x60, 0xeb, 0xed, 0xba, 0x9e, 0xa3, 0xbf, 0x9a, 0xc0, 0x2e,
+  0xd7, 0x5c, 0x54, 0xec, 0xa3, 0xe9, 0xd4, 0x5a, 0x9d, 0xa6, 0x78, 0xb7,
+  0xc5, 0xcc, 0x6d, 0x09, 0x6d, 0x29, 0x0b, 0xd9, 0x75, 0xbe, 0x30, 0xc0,
+  0x3f, 0x55, 0x79, 0xf1, 0x51, 0x0c, 0x98, 0xf5, 0xb8, 0x80, 0x55, 0xdb,
+  0x8e, 0xab, 0xb1, 0x03, 0x44, 0xff, 0xaa, 0x2f, 0x65, 0x4e, 0xce, 0xa9,
+  0x17, 0x33, 0x62, 0x16, 0xc4, 0x26, 0x96, 0xa1, 0xfc, 0x9c, 0x85, 0x2b,
+  0x33, 0x9b, 0x45, 0xee, 0x65, 0x94, 0xb7, 0x8d, 0x40, 0xe9, 0xf5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00, 0x88, 0x5d, 0x7d, 0x8f, 0x41, 0xf8, 0x8d, 0x86, 0xc6,
+  0x44, 0xee, 0x23, 0x19, 0x98, 0xb3, 0x1b, 0x6f, 0xf2, 0x77, 0x3d, 0x93,
+  0xd5, 0x79, 0xf2, 0x7c, 0x6e, 0x5e, 0x9c, 0xf7, 0xa4, 0x23, 0x1f, 0x71,
+  0xe5, 0xc3, 0x6f, 0xb3, 0xea, 0x3c, 0xab, 0xca, 0xba, 0x93, 0x39, 0x49,
+  0xb3, 0x15, 0x3c, 0x05, 0xe4, 0x49, 0x99, 0x76, 0x34, 0x8e, 0xb4, 0x7b,
+  0x15, 0x60, 0xdb, 0x64, 0x79, 0x02, 0xbc, 0xb3, 0x0d, 0xca, 0xdf, 0xc4,
+  0x01, 0x40, 0xc9, 0x3f, 0xfc, 0x6b, 0xb8, 0xf1, 0x05, 0x55, 0xdd, 0xca,
+  0xd3, 0xf9, 0x06, 0xaa, 0xab, 0x75, 0x8f, 0x91, 0x50, 0xda, 0xc6, 0x18,
+  0x49, 0xb9, 0xac, 0xac, 0x51, 0x78, 0x28, 0xd9, 0x94, 0xd2, 0x44, 0xc6,
+  0xa2, 0x89, 0x2f, 0x38, 0xe6, 0x2e, 0x3e, 0xba, 0x0e, 0x2a, 0xce, 0xd9,
+  0xe6, 0xda, 0x90, 0x74, 0x7d, 0xa9, 0x17, 0xbf, 0xf1, 0x35, 0xc5, 0xdb,
+  0xf0, 0x50, 0xcf, 0x94, 0xb3, 0x9f, 0x29, 0x9b, 0xef, 0x34, 0xa7, 0x7b,
+  0xe5, 0xef, 0xb3, 0xbe, 0x1f, 0xad, 0xda, 0xfe, 0x82, 0x51, 0x37, 0x3a,
+  0x81, 0x09, 0x14, 0xf3, 0x81, 0x34, 0xcf, 0x19, 0x2b, 0x86, 0x82, 0x2a,
+  0xe0, 0x95, 0x95, 0xa6, 0xcd, 0x0c, 0x9d, 0xef, 0x37, 0xea, 0x46, 0x97,
+  0x4e, 0x47, 0xac, 0xba, 0x1f, 0x26, 0x62, 0x87, 0xa0, 0x4c, 0xd1, 0x9b,
+  0x0a, 0x18, 0xd4, 0x94, 0xc5, 0xe4, 0xa3, 0x82, 0xf5, 0x80, 0x13, 0x2a,
+  0x52, 0xb5, 0xd9, 0xa4, 0xb9, 0x54, 0x3b, 0xd6, 0x30, 0xed, 0x4a, 0xc7,
+  0xc4, 0xe1, 0xbd, 0xce, 0x60, 0x80, 0xf7, 0xfe, 0xe5, 0xde, 0xf8, 0x8b,
+  0xfb, 0xf6, 0xce, 0x89, 0xf4, 0xb1, 0x00, 0x94, 0x07, 0x63, 0x70, 0x76,
+  0x52, 0x9f, 0x29, 0x95, 0x6a, 0x44, 0x77, 0xd2, 0x73, 0xc3, 0x4f, 0xb3,
+  0x00, 0x84, 0x70, 0xd2, 0xc2, 0xad, 0x91, 0x42, 0xf0, 0x9a, 0x56, 0x4c,
+  0xef, 0x81, 0xda, 0x09, 0x9f, 0xc7, 0xf9, 0x90, 0x89, 0xf6, 0x47, 0x31,
+  0x5b, 0x2a, 0x95, 0x85, 0x72, 0xf0, 0x17, 0x74, 0x6a, 0xa9, 0xf8, 0x87,
+  0x82, 0xc7, 0x69, 0xfa, 0x08, 0x2f, 0x07, 0x4c, 0xdd, 0x92, 0x98, 0x40,
+  0xca, 0x45, 0x1a, 0xd8, 0x40, 0x28, 0x13, 0x8c, 0x2b, 0x2d, 0x09, 0x11,
+  0x6c, 0xcc, 0xd8, 0x2a, 0x4a, 0x5b, 0x62, 0x87, 0x8a, 0x83, 0x27, 0x96,
+  0x5e, 0xae, 0x52, 0x63, 0x4e, 0x74, 0xa0, 0x2a, 0x9c, 0x9b, 0x26, 0x6e,
+  0xf2, 0x59, 0x73, 0x45, 0x95, 0xcf, 0x54, 0x33, 0xaa, 0x05, 0x6f, 0x05,
+  0x66, 0xf0, 0x3c, 0xcc, 0x04, 0x3e, 0xef, 0x31, 0xde, 0xf1, 0x86, 0xd1,
+  0xa2, 0x26, 0x0c, 0x3c,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x29,
+  0xc7, 0x4a, 0x76, 0x70, 0x32, 0x50, 0x8e, 0x11, 0x9b, 0x60, 0xc4, 0x56,
+  0x64, 0x94, 0xc0, 0x2b, 0xcd, 0x43, 0x6d, 0x05, 0x70, 0x10, 0x78, 0xd0,
+  0xab, 0x48, 0x54, 0x24, 0xb1, 0x5b, 0x8d, 0xbc, 0xb0, 0xd1, 0xed, 0xed,
+  0xe5, 0xaa, 0x9d, 0x79, 0xe6, 0x0a, 0xde, 0x05, 0x81, 0xc0, 0x0f, 0x6a,
+  0xff, 0xb5, 0x48, 0xc6, 0x42, 0x12, 0xdb, 0xac, 0x74, 0xba, 0xec, 0xb9,
+  0x60, 0x0f, 0xd8, 0xf1, 0xb4, 0xca, 0xc4, 0xde, 0xd0, 0x53, 0xd0, 0x93,
+  0xa1, 0xcc, 0xf8, 0xf0, 0x90, 0x59, 0x35, 0xf5, 0xce, 0x8b, 0x43, 0xb2,
+  0xed, 0xec, 0x98, 0x24, 0x89, 0x85, 0xf2, 0xfb, 0x4d, 0x49, 0xe0, 0xc5,
+  0x54, 0xd5, 0x8e, 0x00, 0x39, 0x4b, 0x36, 0x6d, 0x51, 0xad, 0x76, 0xbd,
+  0x6d, 0xfe, 0xa2, 0x27, 0x77, 0xec, 0xbb, 0x2f, 0x41, 0x05, 0x31, 0x27,
+  0xa8, 0x32, 0x13, 0xec, 0x0b, 0x50, 0xd3, 0x11, 0x6f, 0xa7, 0x25, 0x20,
+  0x61, 0x2b, 0x56, 0x2f, 0x39, 0x0b, 0xd4, 0x94, 0x6d, 0xb4, 0x20, 0xf5,
+  0x25, 0x84, 0xf0, 0x77, 0x47, 0x16, 0x41, 0x42, 0x64, 0xf6, 0x74, 0x88,
+  0x9f, 0x6c, 0xde, 0x32, 0x6a, 0xe9, 0x88, 0x1e, 0xab, 0xfb, 0x82, 0x4d,
+  0xa4, 0xa6, 0x03, 0xad, 0xb6, 0x54, 0xa6, 0x4a, 0xfc, 0x55, 0xa3, 0x3b,
+  0xf6, 0xa2, 0x15, 0xda, 0x42, 0xe1, 0xff, 0x40, 0x55, 0x1a, 0x46, 0x56,
+  0x4c, 0x02, 0x89, 0x9b, 0x56, 0xc1, 0x2e, 0x9b, 0xbc, 0xcf, 0xc7, 0x00,
+  0xf8, 0x45, 0xf9, 0x45, 0x34, 0x14, 0x28, 0x90, 0x96, 0xcd, 0x68, 0xf6,
+  0x77, 0x76, 0x87, 0xf8, 0xb9, 0x07, 0x0c, 0xa5, 0x0a, 0xbf, 0xed, 0xdb,
+  0x9c, 0x98, 0xd6, 0x41, 0xa1, 0xc7, 0xc9, 0x1e, 0x42, 0x24, 0xbd, 0x7f,
+  0x7b, 0x1b, 0xc1, 0xda, 0x69, 0x27, 0x21, 0x8d, 0x6c, 0x0e, 0x67, 0x38,
+  0x5a, 0xb7, 0x90, 0xe4, 0xb4, 0x0b, 0x6b, 0x01, 0x6b, 0x16, 0x8b, 0xc0,
+  0x26, 0x8d, 0xfb, 0x6a, 0xa1, 0x36, 0x5d, 0x74, 0x49, 0xd9, 0x71, 0x1f,
+  0x4a, 0x8b, 0x36, 0x11, 0x0b, 0x23, 0x80, 0x74, 0x66, 0x96, 0xb7, 0x7d,
+  0x19, 0x0e, 0xad, 0x4d, 0x36, 0xd7, 0x97, 0x30, 0x19, 0x9b, 0xb2, 0xa6,
+  0x39, 0x44, 0x69, 0x73, 0x40, 0x69, 0xb9, 0x86, 0xba, 0xb1, 0x86, 0xc1,
+  0x49, 0xe6, 0x2f, 0x34, 0x02, 0x90, 0xff, 0xda, 0x8f, 0x6b, 0xec, 0x02,
+  0x0c, 0xc5, 0x89, 0xa2, 0x02, 0x42, 0xf6, 0x03, 0xc5, 0xe4, 0xeb, 0x6a,
+  0x39, 0xe7, 0x6e, 0xe3, 0xca, 0x27, 0x44, 0x6c, 0xf5, 0x6c, 0x19, 0x70,
+  0x96, 0x82, 0x3a, 0x9b, 0x0b, 0xd0, 0xd0, 0xaa, 0x15, 0xe4, 0x34, 0x22,
+  0xd8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,
+  0x72, 0x76, 0xe2, 0xdb, 0x12, 0x18, 0xca, 0x82, 0x72, 0x43, 0x51, 0x38,
+  0x2e, 0xca, 0xdf, 0xbb, 0xd5, 0x29, 0x54, 0x0f, 0xe7, 0x8b, 0x8a, 0x2b,
+  0x37, 0x2f, 0x05, 0x6f, 0xa1, 0xb3, 0x5a, 0x91, 0xc4, 0x39, 0x5a, 0xbd,
+  0xa4, 0x6b, 0xf3, 0x67, 0xe1, 0xd5, 0xc6, 0x5e, 0x7b, 0x22, 0x2c, 0x47,
+  0x8e, 0xf3, 0xf0, 0x62, 0x05, 0x4d, 0x35, 0xbc, 0xd4, 0x66, 0x07, 0x73,
+  0x38, 0x08, 0x06, 0x73, 0x9d, 0xce, 0x8d, 0x6e, 0xee, 0x56, 0x25, 0x34,
+  0x3a, 0x16, 0xac, 0x5b, 0x50, 0x14, 0x0c, 0xcb, 0xa9, 0xfa, 0xac, 0x68,
+  0x91, 0x91, 0x25, 0xc3, 0x04, 0x44, 0x06, 0x5d, 0xb3, 0x6b, 0xe1, 0xa6,
+  0xe1, 0x75, 0x59, 0x6e, 0x72, 0x86, 0x60, 0x42, 0x14, 0x9f, 0x91, 0x23,
+  0x51, 0x36, 0x56, 0x7b, 0xaa, 0x74, 0x3c, 0xac, 0x33, 0x8e, 0x71, 0x1b,
+  0x96, 0xea, 0x59, 0x0f, 0xbd, 0xde, 0x77, 0xf6, 0x5c, 0x42, 0x6d, 0xfb,
+  0xe4, 0x0d, 0x5d, 0x49, 0x35, 0x08, 0x55, 0x0b, 0xa9, 0x18, 0x4b, 0x36,
+  0x36, 0xf2, 0xe8, 0x77, 0x21, 0xe3, 0xb2, 0x65, 0x96, 0xb6, 0xd2, 0x48,
+  0xda, 0xcc, 0xd8, 0xda, 0x67, 0xe2, 0xa7, 0x21, 0x6a, 0x68, 0x54, 0x1b,
+  0x17, 0x1b, 0xd1, 0xe8, 0xec, 0xb7, 0xd3, 0x8d, 0xed, 0xfb, 0xca, 0x13,
+  0x6c, 0x58, 0x64, 0x08, 0x97, 0x03, 0x53, 0x15, 0x35, 0x61, 0x59, 0x4b,
+  0xe9, 0x00, 0x3a, 0xb8, 0xed, 0x32, 0x2e, 0xfd, 0xfa, 0xa3, 0x70, 0xac,
+  0x98, 0x83, 0x7d, 0x55, 0x95, 0xfb, 0xee, 0xed, 0x57, 0x7f, 0xd3, 0x9d,
+  0xd9, 0x1a, 0xaa, 0xbe, 0x15, 0x60, 0x39, 0xca, 0x68, 0xbd, 0x92, 0x11,
+  0x3e, 0x7a, 0xab, 0xe0, 0x43, 0xb5, 0x16, 0xde, 0xfd, 0x11, 0x66, 0x2f,
+  0x73, 0x8d, 0x84, 0x64, 0x13, 0x7e, 0x66, 0xf3, 0xd4, 0x44, 0x2c, 0x1a,
+  0xfb, 0xe3, 0xc7, 0x64, 0x0b, 0xfc, 0xea, 0xf0, 0xf1, 0xfe, 0xde, 0xee,
+  0xd6, 0x38, 0xd9, 0xec, 0xdc, 0x6e, 0x5b, 0xf7, 0x4e, 0xb3, 0xbd, 0xdf,
+  0xd9, 0xed, 0x12, 0x94, 0xbb, 0x79, 0xf4, 0xc3, 0xe9, 0x9b, 0xce, 0x24,
+  0x69, 0x07, 0x82, 0x48, 0x82, 0x35, 0x73, 0x74, 0x82, 0x69, 0x40, 0x52,
+  0x8c, 0x4c, 0x14, 0xf1, 0xd5, 0x7f, 0x55, 0xe5, 0x50, 0xf1, 0x06, 0x58,
+  0x8f, 0xc1, 0x71, 0x59, 0xcc, 0x8c, 0x9a, 0x74, 0x02, 0xdc, 0xde, 0x6c,
+  0x60, 0x4e, 0xc1, 0xbd, 0xb3, 0xeb, 0x67, 0xeb, 0xaf, 0x87, 0x74, 0x54,
+  0x8a, 0x30, 0xc4, 0xeb, 0x35, 0x7d, 0x48, 0xa5, 0x16, 0x2c, 0xe6, 0xc4,
+  0xd5, 0xea, 0x32, 0x63, 0xff, 0x06, 0x2c, 0x13, 0xed, 0xd3, 0x76, 0x4b,
+  0x95, 0x0e, 0xc9, 0xda, 0xf9, 0x9c, 0x3c, 0x3a, 0x0f, 0x71, 0x06, 0xd2,
+  0xe3, 0x9b, 0xea, 0xd4, 0x22, 0x03, 0x5d, 0xaa, 0x3e, 0xd4, 0xd2, 0x41,
+  0xdd, 0x93, 0x3a, 0x1e, 0x91, 0x11, 0xf8, 0x51, 0xa7, 0x57, 0xe7, 0x36,
+  0xef, 0x84, 0x0c, 0x94, 0x74, 0x14, 0x09, 0x27, 0x6a, 0xd8, 0x46, 0x34,
+  0x8e, 0x38, 0x81, 0x28, 0x84, 0x86, 0x4a, 0xf9, 0xa6, 0x45, 0x1b, 0x40,
+  0x9e, 0x98, 0x15, 0x31, 0xd6, 0xec, 0x96, 0xaa, 0xb3, 0x1b, 0x35, 0xea,
+  0x49, 0xa8, 0x04, 0xbc, 0xe0, 0xc9, 0x88, 0xc6, 0x53, 0xf9, 0x42, 0x2b,
+  0x4b, 0x94, 0x12, 0x2f, 0x3a, 0xec, 0xb8, 0xe1, 0x48, 0x61, 0xdb, 0xf8,
+  0x76, 0x23, 0xca, 0x46, 0xd9, 0x2f, 0x27, 0xd6, 0x89, 0x8e, 0x67, 0xce,
+  0xf7, 0xc4, 0x71, 0x23, 0xaf, 0x37, 0x92, 0x3e, 0x3f, 0xdb, 0x43, 0x5c,
+  0x73, 0x71, 0x67, 0x1c, 0x7b, 0xe3, 0xba, 0x16, 0x18, 0xeb, 0x9b, 0x6b,
+  0x11, 0xdf, 0xe3, 0x4f, 0x23, 0xc4, 0xf7, 0xe6, 0xe4, 0xec, 0xe8, 0x80,
+  0xb3, 0x7a, 0x54, 0xea, 0xa7, 0x90, 0x4b, 0xcd, 0x39, 0x20, 0xfb, 0x38,
+  0x07, 0x37, 0x20, 0xad, 0x8a, 0x32, 0x63, 0xd3, 0xd9, 0x35, 0x81, 0x62,
+  0x6e, 0x86, 0x51, 0x35, 0xb0, 0xbc, 0x60, 0xed, 0xe0, 0xf9, 0xe0, 0x62,
+  0xc1, 0x60, 0x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8d, 0xab, 0x0e, 0x45, 0x30, 0xf6, 0x70, 0x60, 0xad, 0x61, 0xed,
+  0x58, 0x27, 0x2b, 0x3c, 0x6d, 0x8b, 0xd4, 0x16, 0xdd, 0x20, 0xce, 0xc0,
+  0x8e, 0x04, 0xa6, 0xe7, 0x8d, 0x3e, 0x66, 0x24, 0xec, 0xd3, 0x37, 0x47,
+  0x5f, 0x9f, 0x6c, 0xdd, 0x67, 0x34, 0x6a, 0x27, 0x41, 0xd8, 0x10, 0xb2,
+  0x54, 0xa3, 0x41, 0x25, 0x58, 0x8c, 0x2e, 0xe1, 0xaf, 0x27, 0x93, 0xd1,
+  0x8b, 0xd3, 0x57, 0x54, 0x25, 0x76, 0x62, 0xfe, 0xed, 0xa9, 0x43, 0x30,
+  0xa6, 0x32, 0x18, 0xa3, 0xef, 0x24, 0x3f, 0xb0, 0xd6, 0x60, 0x30, 0x32,
+  0xcf, 0x90, 0x6d, 0x95, 0xe1, 0x43, 0x99, 0x1b, 0x5a, 0x7c, 0x08, 0x6a,
+  0xbe, 0xbb, 0x22, 0xa7, 0xaf, 0xb6, 0xa9, 0x2b, 0x74, 0x49, 0x13, 0xea,
+  0xb1, 0x11, 0xaf, 0xc2, 0x02, 0xb1, 0x60, 0x15, 0x14, 0x4a, 0x48, 0xc4,
+  0xa4, 0x41, 0xbf, 0x46, 0xc6, 0x01, 0xc7, 0x73, 0x6e, 0x99, 0x78, 0x8a,
+  0x05, 0x2c, 0x14, 0x88, 0xa1, 0x57, 0xd4, 0xe0, 0x8e, 0x49, 0x84, 0x24,
+  0x11, 0xc6, 0x86, 0x9c, 0xa3, 0x76, 0xc3, 0x44, 0x7d, 0x68, 0x5d, 0xd9,
+  0x7f, 0x63, 0xb4, 0x4a, 0x92, 0x83, 0x0d, 0xf6, 0x1e, 0x64, 0x45, 0xb9,
+  0xba, 0xbc, 0x62, 0x31, 0xa2, 0x2d, 0x6b, 0x93, 0x22, 0xa9, 0x3e, 0x36,
+  0x5b, 0xb7, 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e3, 0xee,
+  0x08, 0x1e, 0xf0, 0x11, 0xbc, 0x6d, 0xa2, 0x30, 0x3b, 0x3e, 0x28, 0x52,
+  0xea, 0xf2, 0x80, 0xda, 0xb5, 0xce, 0xdb, 0x1e, 0x5a, 0x54, 0x59, 0x09,
+  0xcd, 0x65, 0xa6, 0xfb, 0x72, 0xca, 0xf0, 0x54, 0xd6, 0xd9, 0xd5, 0x01,
+  0x3c, 0x57, 0x21, 0xa9, 0xf0, 0xaa, 0x1e, 0x53, 0x6b, 0xbd, 0x98, 0xb7,
+  0xe6, 0xde, 0xa6, 0x58, 0x19, 0xb5, 0x3d, 0xe7, 0x15, 0xa0, 0x60, 0x02,
+  0xc7, 0xde, 0xd0, 0x4f, 0x9a, 0xed, 0x83, 0xe0, 0x76, 0x11, 0x07, 0x56,
+  0x2c, 0x61, 0x0c, 0x6a, 0x46, 0x48, 0xb6, 0x9e, 0x60, 0x05, 0x78, 0x0e,
+  0x01, 0xb3, 0xec, 0x4a, 0xaa, 0xf9, 0x86, 0x12, 0x53, 0x08, 0x80, 0x10,
+  0x71, 0x5f, 0xd6, 0x01, 0xcc, 0x40, 0x0c, 0x24, 0x6f, 0xa0, 0xf2, 0x4e,
+  0x4a, 0xa1, 0x14, 0x59, 0x14, 0xfb, 0x8b, 0xa3, 0xc7, 0x65, 0x6a, 0x52,
+  0x48, 0xa4, 0x5e, 0x55, 0xd7, 0x94, 0xdc, 0x28, 0xa5, 0xe7, 0x38, 0x02,
+  0xd4, 0xed, 0x87, 0xec, 0x43, 0xe4, 0x14, 0x7b, 0x23, 0x44, 0x64, 0x5e,
+  0x25, 0x00, 0x4b, 0xc9, 0xd7, 0x3c, 0x0a, 0x3b, 0x40, 0x8d, 0x31, 0x21,
+  0x8c, 0x0b, 0x16, 0x62, 0x83, 0x58, 0xec, 0xb2, 0x26, 0xd8, 0xda, 0xc6,
+  0x28, 0x56, 0xee, 0x97, 0x51, 0x5a, 0x4f, 0xf3, 0x5c, 0x4b, 0x99, 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x35, 0xd0, 0x08, 0x80, 0x0f, 0xb5, 0xde, 0x57,
+  0x42, 0xa3, 0x6d, 0xf9, 0x45, 0xcc, 0x07, 0xdd, 0xc5, 0xe8, 0xce, 0x9d,
+  0x27, 0x1f, 0x58, 0x4b, 0x39, 0x12, 0x3e, 0xf6, 0x5d, 0x10, 0x8e, 0x42,
+  0xc1, 0xef, 0x90, 0x82, 0x0c, 0x01, 0xe6, 0x97, 0x05, 0xcb, 0x99, 0xaf,
+  0xf3, 0x69, 0x55, 0xd6, 0xe5, 0x85, 0x24, 0x55, 0x38, 0x9d, 0xf8, 0xd5,
+  0xab, 0x49, 0x72, 0x93, 0x9d, 0x6b, 0xa6, 0xeb, 0x38, 0xf4, 0x1e, 0x50,
+  0xca, 0x05, 0x9c, 0x61, 0x55, 0x9e, 0x35, 0x58, 0x32, 0x8d, 0x35, 0x01,
+  0xfc, 0x13, 0x15, 0xe3, 0x14, 0x70, 0x14, 0xd2, 0xd9, 0x4c, 0x93, 0xd3,
+  0x39, 0x5d, 0x69, 0xc9, 0x32, 0x0b, 0x29, 0x69, 0xce, 0x97, 0xbb, 0xbd,
+  0x8f, 0x3c, 0x0f, 0xeb, 0x79, 0x2a, 0xa5, 0x22, 0xd9, 0x1c, 0x64, 0xb8,
+  0x14, 0xc4, 0x52, 0x31, 0xa3, 0x7d, 0x80, 0x7d, 0x34, 0xc8, 0x42, 0xb1,
+  0x21, 0xa3, 0x72, 0x95, 0x32, 0x18, 0x33, 0x02, 0x4e, 0xca, 0x8a, 0xa2,
+  0x33, 0xbc, 0x22, 0x6e, 0x54, 0x07, 0x6b, 0x55, 0x51, 0x3a, 0x15, 0xc1,
+  0x92, 0x86, 0xe0, 0xd6, 0x37, 0x57, 0x0c, 0x92, 0xa0, 0xbb, 0xe0, 0xc4,
+  0x3d, 0x4a, 0xda, 0x91, 0x62, 0x32, 0x18, 0xbf, 0xbb, 0xa9, 0xbc, 0xdd,
+  0x88, 0xc2, 0x18, 0xca, 0x7e, 0x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 0x9b,
+  0x94, 0xb1, 0xba, 0x1c, 0xa0, 0x0f, 0x00, 0x1e, 0x9c, 0x65, 0x94, 0x45,
+  0xc8, 0xb0, 0x90, 0x34, 0x0b, 0x93, 0x7a, 0x57, 0xdc, 0x42, 0x2a, 0x23,
+  0xdf, 0x1e, 0xf1, 0x01, 0x4d, 0x19, 0xf5, 0xbd, 0x46, 0xbd, 0x97, 0xe8,
+  0xff, 0x1c, 0x7a, 0xeb, 0xab, 0x4a, 0xb6, 0x2e, 0xf7, 0x22, 0xbd, 0x6d,
+  0x5b, 0x8c, 0x3b, 0xc8, 0xbc, 0xfe, 0x83, 0xd1, 0xbc, 0x01, 0x0e, 0x3a,
+  0x4d, 0xeb, 0x0f, 0x1c, 0x9d, 0x33, 0x2b, 0xa3, 0xdb, 0xc3, 0x37, 0x63,
+  0x7b, 0x28, 0xeb, 0x70, 0xbd, 0x81, 0xb1, 0x55, 0x21, 0x45, 0xc3, 0xcf,
+  0xd3, 0x11, 0x84, 0x05, 0x38, 0x54, 0xed, 0xf2, 0x71, 0x97, 0x75, 0x8e,
+  0x85, 0x4a, 0x8b, 0x48, 0x14, 0x78, 0x1d, 0x09, 0x3a, 0xf0, 0x53, 0x29,
+  0x0d, 0xd9, 0x44, 0x04, 0xe3, 0x9e, 0xd5, 0x5b, 0x57, 0x58, 0xa7, 0xf5,
+  0x60, 0x34, 0x86, 0x8d, 0x79, 0x8b, 0xe4, 0x77, 0x11, 0x50, 0x86, 0x9b,
+  0x07, 0x93, 0x95, 0x6c, 0x51, 0x4d, 0xd1, 0x59, 0x69, 0x65, 0xab, 0x76,
+  0x06, 0xf6, 0xe6, 0x4b, 0xe0, 0x47, 0x41, 0xcd, 0x01, 0x8a, 0x86, 0x61,
+  0x72, 0x45, 0x24, 0x71, 0x78, 0x4d, 0x0d, 0x20, 0x84, 0x00, 0x25, 0xcf,
+  0x97, 0x57, 0x55, 0x5a, 0x87, 0x68, 0xcb, 0x93, 0xc9, 0x37, 0x09, 0x23,
+  0x2e, 0x9b, 0xa7, 0xf8, 0x19, 0xcb, 0x85, 0x3d, 0x50, 0xda, 0xdf, 0x53,
+  0x99, 0x40, 0x24, 0xea, 0x28, 0xad, 0x47, 0x01, 0x79, 0x9c, 0x75, 0x21,
+  0x1a, 0xa4, 0x54, 0x68, 0x8d, 0x98, 0x9c, 0x02, 0x30, 0x5d, 0x86, 0x3a,
+  0xb6, 0xc7, 0xe3, 0x6d, 0x08, 0x06, 0xdb, 0xe6, 0x1f, 0x8d, 0x02, 0x14,
+  0x21, 0xbf, 0x5b, 0x35, 0x19, 0x21, 0x45, 0xe8, 0x8c, 0x10, 0x95, 0xe0,
+  0x8e, 0x9f, 0xdf, 0xf9, 0x25, 0x29, 0xff, 0xb1, 0x32, 0xbc, 0x94, 0xf2,
+  0x2e, 0xb3, 0x8a, 0xa0, 0x3f, 0xb2, 0x45, 0x4b, 0xcf, 0x0a, 0x94, 0x12,
+  0x76, 0xcb, 0xd7, 0x02, 0x2c, 0xd4, 0x29, 0xe3, 0x0d, 0xab, 0x21, 0x79,
+  0x00, 0x30, 0x89, 0xbc, 0x51, 0x8b, 0x37, 0xc1, 0x70, 0xa4, 0x6b, 0x4d,
+  0x83, 0x8f, 0xf6, 0x3a, 0xfb, 0x97, 0x9b, 0x1d, 0x9f, 0x2d, 0x57, 0xe7,
+  0x84, 0x03, 0x7d, 0x65, 0x06, 0x19, 0x66, 0xba, 0xb1, 0x43, 0xa7, 0x1d,
+  0xbb, 0xc5, 0x32, 0x23, 0x4b, 0x11, 0x56, 0x4a, 0x57, 0x63, 0x0d, 0x03,
+  0x61, 0x73, 0x14, 0xe0, 0x66, 0x20, 0xc1, 0x72, 0x27, 0x5b, 0xec, 0x66,
+  0xa1, 0xa4, 0x4b, 0xd6, 0xcb, 0x97, 0x19, 0x0b, 0x95, 0xb9, 0xb2, 0x32,
+  0x58, 0x7f, 0x10, 0x48, 0x4c, 0x76, 0x20, 0x6a, 0x8d, 0x54, 0xba, 0x10,
+  0x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2d, 0x60, 0x18, 0x80, 0xf8, 0xa5,
+  0xf3, 0x21, 0x07, 0x7a, 0xf6, 0x64, 0xa0, 0xdb, 0x5e, 0xa8, 0x9b, 0x59,
+  0x95, 0xde, 0x78, 0x5a, 0x32, 0x83, 0x74, 0x5d, 0x90, 0xdf, 0xc7, 0x86,
+  0xb5, 0x99, 0xef, 0x11, 0xb2, 0x52, 0x47, 0x62, 0x7b, 0xea, 0x69, 0x85,
+  0x1c, 0x7d, 0x29, 0x15, 0x43, 0x2d, 0x2d, 0x01, 0x8c, 0x6a, 0x44, 0x8c,
+  0xcb, 0x4c, 0x11, 0x49, 0xec, 0xac, 0x15, 0x06, 0x85, 0x20, 0x50, 0xc6,
+  0xb1, 0x54, 0x1d, 0x67, 0xb1, 0xb2, 0x91, 0xbb, 0x10, 0x25, 0x18, 0x33,
+  0x05, 0xaf, 0x0f, 0x25, 0xb8, 0xd2, 0xe2, 0xca, 0x2e, 0x51, 0xc2, 0xb3,
+  0xbe, 0xca, 0x97, 0xdd, 0x2b, 0x7a, 0xf4, 0x59, 0xf9, 0xd9, 0x68, 0x4b,
+  0x48, 0xbc, 0xbc, 0xce, 0x6a, 0xae, 0xf7, 0x4d, 0xf9, 0x8d, 0xe6, 0xc4,
+  0x5d, 0x91, 0x11, 0x45, 0x2e, 0x2f, 0x98, 0x11, 0x28, 0xa5, 0x80, 0x62,
+  0x2e, 0xc8, 0xc1, 0xd4, 0x03, 0xa1, 0xc2, 0x5e, 0x61, 0xe6, 0x77, 0x30,
+  0xb8, 0x98, 0xb5, 0xba, 0xe0, 0xa8, 0x67, 0x98, 0x02, 0x12, 0x84, 0xf9,
+  0x08, 0x7e, 0x3c, 0x7b, 0x54, 0xca, 0x65, 0xfb, 0x6e, 0x32, 0x7c, 0x64,
+  0xa4, 0xbc, 0xe1, 0xb9, 0xb2, 0x95, 0xcf, 0xef, 0xcd, 0x88, 0xb3, 0x0c,
+  0xe8, 0x42, 0xcc, 0x14, 0x38, 0x7c, 0x94, 0x20, 0xc9, 0xc8, 0xf3, 0xd3,
+  0xab, 0x6c, 0x21, 0x35, 0xb8, 0xba, 0xbb, 0x2e, 0x28, 0x37, 0xbd, 0x85,
+  0x50, 0xdb, 0x63, 0xe2, 0x90, 0xf1, 0x8b, 0x66, 0x39, 0x5e, 0x94, 0xbf,
+  0x98, 0x35, 0x4e, 0x51, 0xd4, 0x33, 0x38, 0x12, 0x70, 0x0f, 0x16, 0xbc,
+  0x29, 0xc4, 0x6f, 0x57, 0x85, 0x55, 0x11, 0x1d, 0x0b, 0x57, 0x30, 0x3a,
+  0xc6, 0x3f, 0x3b, 0x34, 0x23, 0x3e, 0x7a, 0xff, 0xee, 0xcd, 0xe4, 0xdd,
+  0xe9, 0x28, 0x00, 0xac, 0x7c, 0x7b, 0x76, 0xf4, 0x12, 0xe1, 0x74, 0x67,
+  0x27, 0x87, 0x27, 0xc7, 0xc9, 0xe6, 0xee, 0xd6, 0xbd, 0x15, 0xab, 0x7d,
+  0x00, 0xd5, 0xc6, 0xb3, 0xb7, 0x32, 0xcf, 0xb2, 0x43, 0xd8, 0xc4, 0x7c,
+  0xc2, 0xd6, 0xbe, 0x17, 0xda, 0x6a, 0x61, 0xce, 0x93, 0xa5, 0x41, 0x82,
+  0x17, 0x3f, 0x40, 0x64, 0xba, 0x5c, 0xf1, 0x61, 0x94, 0x60, 0x28, 0x17,
+  0x29, 0x19, 0x5c, 0x45, 0x59, 0xc6, 0x91, 0x18, 0x7e, 0xca, 0xec, 0x5a,
+  0x83, 0xdb, 0xe3, 0xae, 0xcc, 0x82, 0x3d, 0x20, 0x01, 0xcc, 0x51, 0x45,
+  0x1d, 0x27, 0x0b, 0x4b, 0x17, 0x8c, 0x4a, 0x43, 0xf8, 0xfb, 0x0e, 0x73,
+  0x28, 0x6f, 0xac, 0xf7, 0xb0, 0x2c, 0xac, 0x48, 0x37, 0x4e, 0x4e, 0xc3,
+  0x42, 0x75, 0xf2, 0xc6, 0x2c, 0x2b, 0xa4, 0x52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7, 0x45, 0xda, 0x7e, 0x50, 0x69, 0xe7, 0x02,
+  0x69, 0x20, 0x15, 0x7e, 0x60, 0x77, 0x29, 0xca, 0x49, 0xeb, 0x0d, 0x68,
+  0x42, 0xc2, 0xb2, 0x6c, 0xb8, 0xf2, 0x01, 0x12, 0x46, 0x20, 0xfc, 0x54,
+  0x30, 0x0e, 0xc6, 0xca, 0xd0, 0xea, 0x46, 0x38, 0x39, 0x1a, 0x2d, 0x93,
+  0xeb, 0x67, 0xb5, 0x2c, 0x0b, 0x97, 0x3b, 0xc8, 0xbe, 0x57, 0x8f, 0xc5,
+  0x45, 0xe5, 0x5f, 0x8e, 0xee, 0x25, 0xf3, 0x94, 0xad, 0x9d, 0x70, 0x5d,
+  0xe6, 0xb3, 0x75, 0x80, 0xc2, 0xd1, 0x7a, 0x3e, 0x41, 0x60, 0x9f, 0xcd,
+  0x51, 0x21, 0xc3, 0x88, 0xcb, 0x1e, 0x8e, 0x64, 0x4e, 0x5a, 0x10, 0x7e,
+  0x72, 0x61, 0x17, 0xf0, 0x3d, 0x15, 0xec, 0xce, 0x12, 0x75, 0x55, 0x59,
+  0x34, 0x86, 0x49, 0x51, 0xd1, 0x05, 0xf4, 0xa4, 0x69, 0x16, 0xc6, 0xab,
+  0xbb, 0x6a, 0x56, 0xeb, 0xf2, 0x06, 0x7c, 0x91, 0xc2, 0xa6, 0x0f, 0x38,
+  0x69, 0x79, 0x7c, 0xcf, 0x55, 0x73, 0x7b, 0xa7, 0x01, 0xcb, 0x6b, 0xaf,
+  0x99, 0x25, 0xc1, 0x86, 0x98, 0x0d, 0xc9, 0x1b, 0xda, 0xe4, 0x4e, 0xbe,
+  0x84, 0xe6, 0x11, 0x70, 0x89, 0x06, 0x73, 0x86, 0x57, 0x61, 0x11, 0x56,
+  0xf5, 0xea, 0x31, 0x0c, 0x88, 0x73, 0x48, 0xb3, 0x1c, 0x25, 0xf6, 0x1e,
+  0x2e, 0x13, 0xe3, 0x55, 0xce, 0xc1, 0x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0x50, 0x0a, 0x6e, 0x99, 0xd6, 0x40, 0x52, 0x12, 0xb7,
+  0x2c, 0xbc, 0x45, 0xf6, 0x32, 0xcc, 0xc7, 0xe5, 0x68, 0x55, 0xc6, 0x7f,
+  0x62, 0xc0, 0x02, 0x33, 0xc3, 0xc3, 0x93, 0x37, 0x6f, 0x8e, 0x0e, 0xbb,
+  0xce, 0x6a, 0x9b, 0xe9, 0xe6, 0xf4, 0x83, 0x68, 0x60, 0x6d, 0xab, 0x96,
+  0x27, 0xf7, 0x4f, 0xa5, 0xe0, 0x52, 0x81, 0x47, 0xe6, 0x2f, 0x25, 0xed,
+  0x93, 0xd1, 0x73, 0x65, 0xfb, 0x03, 0x34, 0xb5, 0x08, 0x31, 0xf8, 0x48,
+  0x34, 0xec, 0x59, 0x41, 0x41, 0x60, 0x89, 0xa6, 0x25, 0xc5, 0x57, 0x46,
+  0x41, 0x19, 0x11, 0xb3, 0xd9, 0xb6, 0x24, 0x12, 0x68, 0xdf, 0x7d, 0x84,
+  0xcc, 0xf8, 0xa1, 0x48, 0x46, 0x1c, 0x95, 0x17, 0x5c, 0x88, 0x62, 0x91,
+  0x56, 0x1f, 0xe0, 0xef, 0xf6, 0x32, 0x23, 0x28, 0x9f, 0x1d, 0x76, 0x2f,
+  0xd3, 0x72, 0x0c, 0xe2, 0x86, 0x4c, 0xf5, 0x9a, 0x7e, 0x45, 0x19, 0xd2,
+  0x3c, 0x18, 0x29, 0xd8, 0x7a, 0xa0, 0xa5, 0x45, 0xf1, 0x7a, 0x91, 0xdd,
+  0xa0, 0x1b, 0xc6, 0xf5, 0x02, 0x4e, 0x4d, 0x58, 0xb0, 0x85, 0x41, 0xd7,
+  0xd9, 0x15, 0x21, 0x19, 0x2b, 0xb4, 0x55, 0x0b, 0x2e, 0x88, 0x62, 0x88,
+  0x8e, 0xa0, 0xba, 0x25, 0xd7, 0x30, 0x58, 0xab, 0x6f, 0xa4, 0xf2, 0x5a,
+  0xc7, 0x0b, 0x17, 0x94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x23, 0xbe, 0xd2,
+  0xe5, 0x9f, 0x0a, 0x16, 0x6e, 0x83, 0x52, 0xbd, 0x23, 0x7e, 0x90, 0x0c,
+  0x46, 0xef, 0x92, 0x83, 0x41, 0xb0, 0x44, 0x27, 0x88, 0x12, 0xac, 0x9b,
+  0x6c, 0xa1, 0x55, 0xe2, 0x10, 0x67, 0x82, 0x9a, 0x56, 0xbe, 0x9c, 0x74,
+  0x05, 0x50, 0x37, 0xa7, 0xdc, 0xd8, 0x5a, 0x34, 0x97, 0x81, 0x03, 0x70,
+  0xa1, 0x25, 0x71, 0xb9, 0x48, 0x6a, 0xcd, 0xc8, 0x80, 0x30, 0x21, 0xb9,
+  0xf2, 0x12, 0x24, 0xcb, 0x71, 0x5d, 0x1c, 0xb0, 0x56, 0x38, 0x32, 0x29,
+  0xa8, 0x68, 0x1a, 0x1a, 0x83, 0x66, 0xec, 0x63, 0xae, 0xb5, 0x82, 0xda,
+  0xb2, 0xac, 0xeb, 0xfc, 0xdc, 0x70, 0xea, 0x4b, 0x61, 0x91, 0x75, 0xc6,
+  0x31, 0x61, 0x9c, 0x26, 0x8e, 0xd5, 0xb4, 0xf8, 0x11, 0x75, 0x58, 0x7c,
+  0x80, 0x67, 0x2a, 0x98, 0x15, 0x62, 0xea, 0x32, 0xa3, 0x63, 0xc6, 0x76,
+  0x9d, 0xa3, 0x69, 0xa6, 0xb6, 0x34, 0x39, 0xaf, 0xf2, 0xec, 0x02, 0x25,
+  0xd5, 0x19, 0x2c, 0x8f, 0xc5, 0xc0, 0xa0, 0x38, 0x1e, 0x50, 0x8b, 0x66,
+  0xe3, 0x64, 0x82, 0x60, 0xe1, 0x1a, 0x88, 0xbe, 0x14, 0x42, 0x4e, 0x01,
+  0x9c, 0x2e, 0x3c, 0xbd, 0xca, 0x10, 0xfc, 0xa0, 0x15, 0x57, 0x55, 0xc5,
+  0xe8, 0x0d, 0xab, 0xad, 0x6c, 0xe1, 0x03, 0x4a, 0xd8, 0x20, 0xdc, 0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90, 0x9b,
+  0x66, 0x83, 0x19, 0xe1, 0xf2, 0x90, 0xba, 0xcd, 0xac, 0x19, 0xea, 0xec,
+  0xa4, 0xe3, 0x60, 0x73, 0x95, 0x2a, 0x04, 0xe9, 0xe8, 0xbf, 0x41, 0x56,
+  0x44, 0x1c, 0xa1, 0x8e, 0x60, 0xaf, 0x70, 0x34, 0xa2, 0xe0, 0x9d, 0x16,
+  0x1f, 0xaf, 0xce, 0x62, 0xd7, 0x8b, 0xae, 0x31, 0x5f, 0xa4, 0x63, 0x41,
+  0xdb, 0x02, 0x3a, 0x28, 0xad, 0x72, 0xac, 0x10, 0x8d, 0x0a, 0x9f, 0x69,
+  0x0c, 0xf0, 0xb3, 0x8d, 0x0c, 0x6a, 0xdd, 0x2e, 0x0f, 0x80, 0xff, 0x84,
+  0x53, 0x41, 0x31, 0xbb, 0xc4, 0xba, 0x4f, 0xc5, 0xac, 0x18, 0x24, 0x22,
+  0x63, 0xcc, 0x4e, 0x0c, 0xca, 0x1d, 0x49, 0x3e, 0xb0, 0x14, 0xd2, 0x18,
+  0x60, 0x46, 0xa6, 0x22, 0xbb, 0x93, 0xb1, 0x5b, 0x12, 0xda, 0x40, 0x53,
+  0x66, 0x18, 0x68, 0x60, 0x0c, 0x90, 0x4a, 0xa4, 0x86, 0xa9, 0x23, 0xc1,
+  0x7c, 0x8d, 0x64, 0x33, 0xa5, 0x8a, 0x2e, 0x69, 0xb9, 0xea, 0x29, 0x76,
+  0x88, 0x1c, 0x9e, 0x22, 0x1e, 0x87, 0x54, 0xa3, 0x11, 0xdb, 0xb7, 0x18,
+  0xc3, 0x3b, 0x07, 0xa4, 0x25, 0xc0, 0x46, 0x24, 0x05, 0xac, 0x8c, 0x3a,
+  0x06, 0x28, 0x34, 0xce, 0x8e, 0xb2, 0xb4, 0x32, 0x04, 0xf7, 0x61, 0x96,
+  0x2b, 0x76, 0xc3, 0xd1, 0x52, 0xb9, 0x6c, 0x77, 0xb2, 0x77, 0xd2, 0x48,
+  0x8f, 0x2c, 0xff, 0xff, 0x8f, 0x64, 0x1a, 0x77, 0x53, 0xe0, 0xd6, 0x09,
+  0xef, 0x09, 0xf2, 0x59, 0xc2, 0x40, 0xc4, 0x71, 0x59, 0x37, 0xa9, 0xad,
+  0xed, 0xc5, 0xaf, 0x75, 0x9a, 0x8b, 0x1f, 0xa6, 0x61, 0xd2, 0x0a, 0xf4,
+  0xcd, 0x02, 0x1e, 0xb9, 0x29, 0x5c, 0x63, 0x2b, 0x82, 0x12, 0x45, 0x23,
+  0x40, 0x3a, 0xfb, 0x2c, 0x13, 0xf0, 0xc2, 0xbf, 0xb8, 0xda, 0x5a, 0xbf,
+  0xb7, 0x02, 0xb6, 0x6b, 0x78, 0xf3, 0x73, 0xef, 0x3e, 0xfe, 0xfc, 0xde,
+  0x0b, 0x99, 0xce, 0x19, 0x5e, 0x93, 0xeb, 0xaf, 0xcd, 0xef, 0x6c, 0xfd,
+  0x63, 0xe8, 0xc1, 0x61, 0x55, 0x0c, 0xdb, 0x8c, 0x30, 0x3b, 0xcb, 0xde,
+  0x10, 0xbd, 0x87, 0xf7, 0x7b, 0x18, 0x5c, 0xa6, 0x5e, 0x60, 0x55, 0x89,
+  0x0d, 0x47, 0x3f, 0xcf, 0x9a, 0x1b, 0x48, 0x71, 0xb4, 0x1e, 0xba, 0x90,
+  0x1e, 0x17, 0x90, 0x25, 0x32, 0x52, 0x48, 0x2c, 0xae, 0x92, 0xd0, 0xb3,
+  0x95, 0xa1, 0x30, 0x48, 0xba, 0x35, 0x89, 0xa8, 0x87, 0x39, 0x38, 0x7d,
+  0xd1, 0x62, 0x79, 0xce, 0x61, 0xde, 0x5a, 0x1b, 0x0d, 0x27, 0x6e, 0x25,
+  0x3d, 0x69, 0xd4, 0x94, 0x3c, 0xe8, 0x7b, 0x1c, 0xec, 0x31, 0x96, 0x63,
+  0x1b, 0x87, 0x11, 0xb2, 0x69, 0x9b, 0x3c, 0x1e, 0xdd, 0xff, 0x56, 0xec,
+  0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a5, 0x37, 0x36, 0x27, 0xf8,
+  0x7b, 0x06, 0xb0, 0x15, 0xd7, 0xaa, 0x45, 0xae, 0x49, 0xe7, 0x62, 0x06,
+  0x43, 0xf5, 0x6f, 0xba, 0xd6, 0xc8, 0x47, 0x4f, 0x54, 0x76, 0x11, 0x2d,
+  0xaa, 0x4b, 0xa9, 0xbb, 0x95, 0xb3, 0xbb, 0x53, 0x9a, 0x09, 0x25, 0x73,
+  0xb2, 0x0d, 0x9d, 0xf7, 0x71, 0x41, 0xd6, 0x78, 0xb2, 0x8e, 0xc1, 0x75,
+  0x22, 0x00, 0x73, 0xa1, 0xef, 0x8d, 0x20, 0x52, 0x31, 0x28, 0x33, 0xd6,
+  0x7b, 0xaa, 0x27, 0xfb, 0xa8, 0x19, 0x52, 0x3a, 0x07, 0xbe, 0xde, 0x2a,
+  0x79, 0xfe, 0xee, 0xed, 0x71, 0x4f, 0x26, 0xf4, 0x84, 0xf6, 0x00, 0x8b,
+  0x35, 0x78, 0x9b, 0x11, 0xba, 0x61, 0x65, 0x78, 0xd7, 0x65, 0x36, 0xf0,
+  0x01, 0x25, 0x55, 0x8a, 0xa5, 0xe9, 0x8b, 0x0d, 0x2f, 0x66, 0x91, 0xf4,
+  0x4b, 0x20, 0xe1, 0x76, 0x71, 0x31, 0x16, 0x7e, 0xfe, 0xf2, 0xc5, 0x3c,
+  0x95, 0xb5, 0x5b, 0x55, 0x88, 0x8d, 0xa1, 0x95, 0x8f, 0xd4, 0xae, 0x54,
+  0x53, 0x7f, 0x07, 0x08, 0x98, 0x43, 0xb6, 0xd9, 0xa6, 0x95, 0x2e, 0x41,
+  0x43, 0xc9, 0xe0, 0xaf, 0x70, 0x67, 0x0d, 0x74, 0x98, 0xa3, 0x2c, 0xf4,
+  0x58, 0xeb, 0x52, 0x20, 0xca, 0xa2, 0x65, 0xc8, 0x6d, 0x3b, 0xc2, 0x30,
+  0x6a, 0x0d, 0x5e, 0xc8, 0xae, 0x73, 0x82, 0xd6, 0x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 0xa3, 0x16,
+  0x0c, 0x49, 0x3c, 0x3e, 0x14, 0x7f, 0x3f, 0x19, 0x93, 0x53, 0xba, 0x53,
+  0xa8, 0xbe, 0x74, 0xd6, 0x4c, 0xb7, 0x31, 0xcf, 0xba, 0x25, 0xfe, 0x59,
+  0xf9, 0x2d, 0x30, 0x24, 0xf9, 0xe1, 0xc6, 0x94, 0x92, 0xce, 0x91, 0x37,
+  0x5e, 0x8e, 0x8f, 0xcb, 0x8a, 0xf7, 0xa4, 0x75, 0x16, 0x0e, 0x42, 0x56,
+  0xe6, 0xa3, 0x7e, 0x4d, 0xfd, 0x94, 0x5e, 0xc2, 0x47, 0x2c, 0x23, 0xbc,
+  0xd0, 0xcb, 0xfb, 0x0c, 0x45, 0x7f, 0x62, 0xcd, 0x4a, 0x46, 0x88, 0xf2,
+  0xa0, 0x8a, 0x04, 0x17, 0xad, 0xeb, 0x40, 0xad, 0x74, 0xfe, 0xa6, 0xf7,
+  0x80, 0x09, 0xd0, 0x00, 0xb8, 0xba, 0x80, 0x2a, 0xf2, 0x98, 0x69, 0x78,
+  0x19, 0x7e, 0x69, 0xa3, 0x49, 0x08, 0xb7, 0x61, 0xe3, 0x5f, 0x37, 0x20,
+  0x05, 0xd3, 0xeb, 0x51, 0xb0, 0x08, 0xa5, 0x5a, 0x28, 0x37, 0x78, 0x2a,
+  0x22, 0x34, 0xd8, 0x45, 0xb1, 0xc4, 0x67, 0x03, 0xe4, 0x3c, 0xe2, 0xa1,
+  0x29, 0x8c, 0x93, 0xef, 0xf3, 0xf9, 0x6c, 0x9a, 0x56, 0x14, 0x10, 0x18,
+  0xde, 0xad, 0x42, 0x26, 0x7c, 0x98, 0xea, 0x92, 0x7a, 0x75, 0x27, 0x47,
+  0x0b, 0x4c, 0xc5, 0xa9, 0x3e, 0x92, 0x45, 0x67, 0x37, 0x03, 0x9e, 0xf9,
+  0xbe, 0x2c, 0x4e, 0x26, 0x1f, 0x5d, 0x63, 0xdc, 0x73, 0xed, 0x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 0x6c, 0x03, 0xf1, 0x05, 0xe7,
+  0xc4, 0x31, 0x59, 0x72, 0xcc, 0x28, 0x4c, 0x57, 0xe4, 0xea, 0x73, 0x6a,
+  0xbe, 0xb7, 0xe4, 0x47, 0x72, 0x99, 0x86, 0xab, 0x8a, 0x33, 0x85, 0x0c,
+  0x57, 0x0a, 0x28, 0x14, 0x9b, 0xac, 0x46, 0x32, 0xba, 0xc4, 0x4b, 0x8a,
+  0xfb, 0x01, 0x37, 0x10, 0x0f, 0xac, 0x16, 0x10, 0x96, 0x16, 0x25, 0xcb,
+  0x42, 0x4b, 0x70, 0xc7, 0x5c, 0x05, 0x8a, 0x7b, 0x51, 0xad, 0x32, 0x09,
+  0xf0, 0x4e, 0xfd, 0x79, 0x92, 0x83, 0xe7, 0x7f, 0x19, 0xe6, 0xbd, 0xa4,
+  0x78, 0xe5, 0xcf, 0xc5, 0xb6, 0x19, 0x43, 0x53, 0xd5, 0xd2, 0x7e, 0xa8,
+  0xc5, 0x67, 0x96, 0xe3, 0x7b, 0x0a, 0x14, 0x37, 0x77, 0x19, 0x45, 0x03,
+  0x5d, 0x12, 0x84, 0x3f, 0xdb, 0x3d, 0xcc, 0x34, 0xea, 0x4c, 0x08, 0x1f,
+  0x16, 0x03, 0x19, 0x6d, 0xa7, 0x39, 0x20, 0xdb, 0xd8, 0x91, 0xd0, 0xc1,
+  0x2b, 0x17, 0xe7, 0x1a, 0xe9, 0xdc, 0x05, 0xc3, 0x1a, 0x0a, 0x96, 0xcc,
+  0x9d, 0xa4, 0x34, 0x86, 0xcc, 0x0b, 0x47, 0x2c, 0xeb, 0x1e, 0xb0, 0x07,
+  0x15, 0xea, 0x23, 0x70, 0x2b, 0x72, 0x69, 0x13, 0xab, 0x52, 0x3b, 0x93,
+  0xa7, 0xd4, 0x8a, 0x8d, 0x37, 0x3c, 0x56, 0xd4, 0x55, 0x6d, 0x5f, 0xa2,
+  0x56, 0x86, 0x41, 0xe9, 0x52, 0x6c, 0xa0, 0x4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, 0x8e, 0xc7, 0x4a, 0x54, 0x4a, 0xdc,
+  0x4e, 0xfc, 0x31, 0xe0, 0xe0, 0x54, 0x49, 0x3c, 0x02, 0xa8, 0xc2, 0xdb,
+  0xa3, 0xaf, 0xde, 0x4d, 0x8e, 0x5e, 0x26, 0x69, 0x04, 0x20, 0x98, 0x68,
+  0x95, 0x77, 0x84, 0x8f, 0x82, 0x69, 0xb4, 0x64, 0x59, 0x4a, 0xef, 0xe3,
+  0xb5, 0x57, 0x77, 0xec, 0xfa, 0xea, 0xbb, 0xc8, 0xd7, 0xe0, 0x20, 0xf2,
+  0xac, 0x67, 0x19, 0xea, 0x1d, 0x3f, 0xe7, 0x08, 0xe7, 0x00, 0x72, 0xda,
+  0x55, 0x46, 0x36, 0x77, 0x7f, 0xb6, 0x14, 0x10, 0x92, 0x85, 0x39, 0x1a,
+  0xec, 0x59, 0x86, 0x64, 0xaf, 0xdc, 0x98, 0xbc, 0xf7, 0x7a, 0xbf, 0x70,
+  0xec, 0x55, 0xda, 0x53, 0x9c, 0x97, 0xc0, 0xa7, 0xf5, 0x12, 0x52, 0x19,
+  0xdc, 0x2d, 0x0b, 0xaf, 0xca, 0x66, 0xde, 0x74, 0xa2, 0x10, 0x82, 0x42,
+  0xe5, 0xc4, 0x5c, 0x00, 0x18, 0x8a, 0xbb, 0x98, 0x06, 0x93, 0xce, 0x2f,
+  0x4b, 0xc3, 0xbe, 0xaf, 0x16, 0x16, 0x37, 0x85, 0xe1, 0xe5, 0xea, 0xad,
+  0x71, 0x28, 0xd5, 0x44, 0x35, 0x08, 0x8a, 0x22, 0xcc, 0x18, 0x53, 0x0a,
+  0x5a, 0x95, 0x3b, 0xac, 0x14, 0x61, 0xc5, 0x26, 0x81, 0x89, 0xa0, 0x40,
+  0xd1, 0x7a, 0xf0, 0x12, 0x06, 0x22, 0x3f, 0x0a, 0x39, 0x76, 0x3d, 0x62,
+  0x6a, 0xf6, 0x54, 0xc6, 0xe8, 0x8f, 0xfd, 0x8f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, 0x6d, 0x58, 0x52, 0x56, 0x15, 0x54,
+  0x4e, 0xd0, 0x7f, 0x39, 0x7d, 0x26, 0xcf, 0x8b, 0xd5, 0xe2, 0xf3, 0x70,
+  0x10, 0x21, 0xeb, 0x20, 0xba, 0x94, 0x98, 0x7f, 0x67, 0x81, 0x17, 0x72,
+  0x23, 0x50, 0x4d, 0xde, 0xa3, 0x7e, 0x0e, 0x35, 0xe4, 0xc0, 0x51, 0xef,
+  0x0a, 0xa6, 0xa9, 0x3a, 0xff, 0x39, 0x6b, 0x7c, 0x42, 0xf7, 0x97, 0xac,
+  0x71, 0xac, 0x96, 0xe3, 0x20, 0x30, 0xb3, 0xb1, 0x65, 0x0f, 0xe5, 0x5d,
+  0xd3, 0xfd, 0x8e, 0x84, 0x15, 0x8b, 0x5f, 0x00, 0x21, 0x07, 0xb2, 0xc6,
+  0xd6, 0x05, 0x28, 0xf5, 0xe7, 0x82, 0x88, 0x2a, 0x62, 0x1b, 0xc4, 0xcb,
+  0x82, 0x4b, 0x84, 0xed, 0x7a, 0x0c, 0xcf, 0x7a, 0x80, 0x45, 0xe1, 0xed,
+  0x1b, 0x2a, 0x18, 0x88, 0xb9, 0x48, 0x43, 0xa3, 0x84, 0x27, 0x77, 0x95,
+  0x0e, 0x5f, 0xee, 0xd1, 0xce, 0xa7, 0xc3, 0xe4, 0xd1, 0xde, 0xb3, 0x21,
+  0x92, 0x57, 0xf0, 0x63, 0x0f, 0x3f, 0xf6, 0xf1, 0xc8, 0x63, 0x23, 0x1e,
+  0xad, 0x11, 0x0b, 0xc6, 0x51, 0x70, 0x7d, 0x07, 0x1a, 0x9d, 0x9e, 0x97,
+  0x2b, 0x4f, 0x42, 0x48, 0xbd, 0x05, 0xd7, 0x60, 0x0d, 0x66, 0x20, 0x37,
+  0x69, 0x4e, 0x24, 0x13, 0xc4, 0x8f, 0x52, 0x26, 0x8e, 0x88, 0x65, 0x2e,
+  0x16, 0x8d, 0x2a, 0xc5, 0x1b, 0xc1, 0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, 0x49,
+  0x10, 0x69, 0xa1, 0x8d, 0x0a, 0x28, 0x7e, 0xc4, 0x4c, 0x6b, 0x88, 0x7c,
+  0x25, 0xf0, 0x8c, 0xd3, 0xb9, 0x91, 0xea, 0x22, 0x6e, 0x9d, 0x89, 0x60,
+  0x73, 0x03, 0x89, 0x7c, 0xd8, 0x95, 0x41, 0xea, 0x15, 0xb4, 0x91, 0xf9,
+  0x0a, 0x3d, 0x3b, 0xc3, 0x2b, 0x81, 0x48, 0x2b, 0x96, 0x5c, 0x14, 0x78,
+  0xdd, 0xa2, 0x40, 0x83, 0xd3, 0x78, 0x18, 0xf4, 0x5a, 0x56, 0xc5, 0xc2,
+  0xb3, 0x77, 0x61, 0x7a, 0xc7, 0x3d, 0xa3, 0x83, 0x81, 0x88, 0x9b, 0xc9,
+  0xa4, 0xc6, 0x85, 0xe7, 0xe6, 0x02, 0x6a, 0x81, 0x0e, 0x47, 0x40, 0xda,
+  0x05, 0xd6, 0x34, 0x06, 0xac, 0x6d, 0x03, 0x6d, 0x5b, 0x23, 0x53, 0x81,
+  0x4b, 0x71, 0xdb, 0x28, 0x5b, 0x97, 0x81, 0xd8, 0x95, 0x04, 0x93, 0x57,
+  0x45, 0x10, 0x3e, 0x06, 0x33, 0x23, 0x17, 0x9d, 0x27, 0x12, 0x61, 0xfd,
+  0x40, 0x30, 0x11, 0x6a, 0xe5, 0x09, 0xad, 0x21, 0xa9, 0x76, 0x10, 0xc9,
+  0xfb, 0xe4, 0x97, 0x36, 0x15, 0x27, 0x95, 0x5e, 0xdb, 0x6a, 0x85, 0x59,
+  0x95, 0xad, 0x22, 0x40, 0x7f, 0xa8, 0x10, 0xf9, 0xb8, 0x5d, 0x52, 0x5d,
+  0x50, 0xf5, 0x7f, 0xd5, 0x99, 0x4e, 0x1f, 0x76, 0xa8, 0x7b, 0x72, 0xb4,
+  0xef, 0x39, 0xd4, 0x0c, 0x77, 0x5d, 0x7f, 0xa8, 0xdb, 0xe5, 0x65, 0x7b,
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+  0x34, 0x4b, 0x3b, 0xb1, 0xb5, 0x8c, 0x69, 0x27, 0xb6, 0x18, 0x20, 0x0d,
+  0x73, 0x05, 0xd5, 0x0d, 0xd0, 0x1f, 0xca, 0x80, 0x35, 0x79, 0x64, 0xb2,
+  0x86, 0x4e, 0xa4, 0x48, 0xf3, 0x47, 0x91, 0x89, 0xc4, 0xc4, 0x21, 0x1f,
+  0x4b, 0x42, 0xea, 0x67, 0x2b, 0x8a, 0xee, 0x5b, 0xe4, 0xe4, 0x33, 0xdf,
+  0x2e, 0x2f, 0x2e, 0x08, 0x8f, 0xc4, 0x10, 0x61, 0x53, 0xe5, 0x46, 0xbb,
+  0x0c, 0xad, 0xcc, 0x54, 0x4a, 0xc4, 0x25, 0x74, 0x73, 0x9f, 0xae, 0x0f,
+  0x46, 0x7c, 0x58, 0x9b, 0x54, 0x11, 0xae, 0x49, 0x0f, 0x39, 0x9c, 0x51,
+  0x82, 0x2c, 0x71, 0xe0, 0xb5, 0x14, 0x11, 0x06, 0x8c, 0xa3, 0x8c, 0x31,
+  0xa7, 0x59, 0x12, 0x76, 0x35, 0x91, 0xfd, 0x1a, 0xd2, 0x70, 0x88, 0x45,
+  0x42, 0x1c, 0xe1, 0x5d, 0x4e, 0xa4, 0xd2, 0xe6, 0x10, 0x4a, 0x04, 0x22,
+  0x50, 0x49, 0xec, 0x85, 0x92, 0x05, 0x23, 0xeb, 0x50, 0x4a, 0x7b, 0x70,
+  0xf9, 0x1a, 0x1e, 0x37, 0x37, 0xf2, 0xcb, 0x9c, 0x60, 0xbe, 0xb2, 0x62,
+  0x5a, 0xdd, 0x2d, 0xfd, 0x7a, 0x88, 0xb3, 0x7f, 0x86, 0x26, 0x15, 0x18,
+  0x82, 0xe2, 0x53, 0x8c, 0x1e, 0x62, 0x64, 0x8f, 0xad, 0x50, 0x1d, 0x42,
+  0x2c, 0x9a, 0xb4, 0xc7, 0xe5, 0x32, 0x20, 0x14, 0x37, 0x7e, 0xb6, 0x38,
+  0x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x21, 0xd3, 0x49,
+  0xb5, 0xee, 0x56, 0xca, 0x96, 0x32, 0xdb, 0x01, 0xc4, 0x14, 0xae, 0x6b,
+  0x99, 0x50, 0xbb, 0x44, 0xb5, 0x97, 0x44, 0xaa, 0x45, 0xa5, 0xef, 0xcd,
+  0xe8, 0x43, 0x4a, 0x4c, 0x93, 0x08, 0xb6, 0x8f, 0x1f, 0x98, 0xfb, 0x12,
+  0xbb, 0x3b, 0x5b, 0x2d, 0x96, 0x8a, 0x76, 0x8f, 0xdc, 0xcb, 0x9c, 0x30,
+  0x52, 0x24, 0x07, 0xb6, 0x2f, 0x29, 0xdb, 0xda, 0x73, 0x25, 0x44, 0x96,
+  0x6d, 0xc3, 0xba, 0x57, 0xa2, 0xd1, 0x68, 0x16, 0xfb, 0x2b, 0xc6, 0xef,
+  0x20, 0x00, 0xed, 0xec, 0x22, 0x08, 0xf2, 0xc1, 0x39, 0xa3, 0x08, 0xc6,
+  0x59, 0x76, 0xbe, 0xba, 0x54, 0xb4, 0x38, 0x9b, 0x58, 0xdb, 0xa6, 0x4a,
+  0xca, 0x0e, 0x05, 0x8c, 0x6c, 0xc6, 0x71, 0xe4, 0xc5, 0x5d, 0x88, 0x9e,
+  0xd9, 0x18, 0x21, 0x2d, 0x9f, 0xae, 0x8b, 0x2f, 0xed, 0x4e, 0x7c, 0xd8,
+  0x99, 0x36, 0xd1, 0x7e, 0xb7, 0x46, 0xbb, 0x4f, 0x17, 0xcd, 0x74, 0x39,
+  0xba, 0x48, 0x51, 0x68, 0x22, 0x48, 0x5a, 0x96, 0x70, 0x73, 0xa1, 0xf7,
+  0xb3, 0xc3, 0xd3, 0xe4, 0xab, 0x54, 0x2a, 0x31, 0x27, 0x9b, 0x86, 0xeb,
+  0x3e, 0x7d, 0xb4, 0xbb, 0xbf, 0xb5, 0x56, 0xc7, 0x68, 0x83, 0x27, 0x53,
+  0x5f, 0x45, 0x19, 0xcb, 0x8c, 0x39, 0x5b, 0x55, 0x85, 0x82, 0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 0xec, 0x12, 0x76, 0x24, 0x5b,
+  0x2d, 0xc8, 0x02, 0xdd, 0x76, 0xcd, 0x10, 0x25, 0xac, 0x57, 0x53, 0x68,
+  0x65, 0x04, 0x81, 0xc3, 0xc9, 0x10, 0x0c, 0x8a, 0x69, 0x4e, 0xac, 0x35,
+  0xa7, 0xb6, 0x46, 0x27, 0x68, 0x0f, 0xfd, 0x70, 0x38, 0xba, 0xc4, 0x1d,
+  0xea, 0xf3, 0x44, 0xdc, 0x75, 0xbc, 0xb2, 0xed, 0x88, 0xfa, 0x85, 0x0e,
+  0x39, 0x30, 0x95, 0xc9, 0xd7, 0xf1, 0x1c, 0xbf, 0xf6, 0x96, 0x7b, 0x63,
+  0x8b, 0x0c, 0x99, 0xf1, 0x58, 0x3a, 0xa3, 0x69, 0xdb, 0xc4, 0x25, 0x29,
+  0x4a, 0x8b, 0xa2, 0x61, 0x8d, 0x7a, 0x56, 0xfa, 0x11, 0xcb, 0xb9, 0x60,
+  0x32, 0x25, 0x60, 0x99, 0xc7, 0xe9, 0x6e, 0x02, 0x6d, 0xf4, 0x34, 0x69,
+  0x13, 0xc5, 0x43, 0xcf, 0x27, 0xe5, 0x28, 0xf7, 0x96, 0xd4, 0x5c, 0x5b,
+  0x3d, 0x33, 0x82, 0x5f, 0xcc, 0xb9, 0x33, 0x6a, 0x00, 0xe0, 0xb8, 0x27,
+  0x18, 0x2d, 0x6d, 0x91, 0x20, 0x33, 0xc8, 0x5a, 0x45, 0x50, 0xe4, 0x63,
+  0x93, 0xba, 0xed, 0xca, 0x88, 0x44, 0x50, 0xe5, 0x38, 0xab, 0x54, 0x0a,
+  0x41, 0x35, 0x5c, 0x6c, 0xd7, 0x21, 0xee, 0xd2, 0x78, 0x36, 0xa9, 0xf8,
+  0xa8, 0x14, 0xc1, 0x13, 0x09, 0x3b, 0x89, 0x80, 0x99, 0x88, 0xc0, 0x3c,
+  0xe9, 0xaf, 0xf9, 0x49, 0x77, 0x52, 0xdd, 0x53, 0xd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x1c, 0xda, 0xcb, 0x52,
+  0x9d, 0x14, 0xc3, 0x88, 0xc1, 0x13, 0xe7, 0x92, 0x0b, 0x67, 0x31, 0xf2,
+  0x39, 0xa2, 0x5b, 0xbd, 0xd2, 0xe5, 0x43, 0xf5, 0x36, 0xb1, 0x05, 0xb1,
+  0x83, 0xb8, 0xfd, 0x2e, 0x50, 0x7c, 0x07, 0xa3, 0x01, 0xcc, 0xb5, 0xb6,
+  0xe6, 0x33, 0x20, 0xc9, 0x53, 0x49, 0x96, 0x92, 0x97, 0x15, 0x34, 0xae,
+  0x27, 0x96, 0x40, 0xdd, 0x33, 0x86, 0x84, 0xee, 0xb4, 0x80, 0x12, 0x95,
+  0xb5, 0x54, 0x1f, 0x2b, 0x38, 0xbe, 0x39, 0x82, 0x02, 0x29, 0xce, 0x69,
+  0x58, 0xd9, 0x2d, 0xa7, 0x9d, 0x87, 0xaa, 0x1c, 0xab, 0x8e, 0x57, 0x9a,
+  0x94, 0xfd, 0x62, 0x72, 0xf8, 0xea, 0x55, 0x2b, 0x45, 0x1d, 0x4b, 0xc7,
+  0xe5, 0x57, 0x18, 0x1f, 0xa9, 0x46, 0xd5, 0x87, 0xac, 0xea, 0xc1, 0xeb,
+  0xa6, 0xb3, 0xb2, 0x30, 0xc7, 0x8f, 0x3c, 0x4a, 0x86, 0x11, 0xe4, 0x8c,
+  0x1c, 0x49, 0x38, 0xf1, 0x24, 0xc3, 0x17, 0x66, 0x98, 0x39, 0xf0, 0x2d,
+  0xaf, 0x56, 0x8b, 0xb4, 0xf8, 0xfd, 0xc1, 0x39, 0xe3, 0xb9, 0x5f, 0xb2,
+  0x5a, 0x7c, 0xae, 0x7c, 0x77, 0x75, 0x48, 0x6b, 0x91, 0xf2, 0x91, 0xa7,
+  0x15, 0xdd, 0x9b, 0x54, 0x97, 0x5d, 0xfc, 0x08, 0x5c, 0x02, 0xd2, 0xcc,
+  0x94, 0xd0, 0x84, 0xb9, 0x71, 0x33, 0x5d, 0x75, 0x82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x3c, 0xf4, 0xc0, 0x0e, 0x65, 0x98, 0x70, 0x81,
+  0x09, 0x46, 0x5e, 0xd1, 0x6f, 0xbd, 0x28, 0xd0, 0x7b, 0x12, 0xae, 0xf5,
+  0xee, 0x92, 0x20, 0xe7, 0xbb, 0x6e, 0x71, 0x00, 0xaa, 0xde, 0xa0, 0x49,
+  0x44, 0xc4, 0x84, 0x63, 0xd9, 0xb5, 0x42, 0x13, 0x12, 0xfc, 0x3e, 0x74,
+  0x85, 0x91, 0x4b, 0xdc, 0x02, 0x72, 0x67, 0x49, 0x76, 0x54, 0x32, 0x3a,
+  0x19, 0x32, 0x8c, 0x3b, 0x64, 0x94, 0x51, 0x4c, 0x3e, 0xe9, 0xab, 0x38,
+  0x6d, 0x2b, 0x85, 0x25, 0x27, 0x66, 0xe8, 0x92, 0x57, 0x3a, 0x94, 0x2a,
+  0x58, 0x54, 0x57, 0x9e, 0x79, 0x33, 0x10, 0x2f, 0x18, 0xb0, 0x1a, 0x46,
+  0x41, 0x5e, 0xdc, 0x08, 0x10, 0x04, 0x12, 0xb1, 0x38, 0x0e, 0x5a, 0x04,
+  0x5f, 0xf7, 0x92, 0x1c, 0x7a, 0x91, 0x7c, 0xc0, 0xbc, 0xef, 0xcc, 0x7d,
+  0xbe, 0x18, 0x27, 0x5f, 0x66, 0x37, 0x69, 0x95, 0xfd, 0x8b, 0x3b, 0xbb,
+  0x5f, 0x0a, 0x92, 0x38, 0x4b, 0xf0, 0xb1, 0x44, 0x42, 0x10, 0xd9, 0x96,
+  0xc6, 0x15, 0xb3, 0x4e, 0xad, 0xb2, 0x30, 0x57, 0x76, 0x22, 0x92, 0xa4,
+  0x75, 0xc4, 0x58, 0xd5, 0xdb, 0x66, 0x98, 0xc7, 0x28, 0xc4, 0x13, 0x9e,
+  0x42, 0xb8, 0x38, 0x77, 0xc8, 0xfb, 0x96, 0x31, 0x80, 0x3e, 0x49, 0x0d,
+  0x25, 0xd3, 0xd9, 0xe0, 0xaf, 0x70, 0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 0x5b, 0xb5, 0x34, 0xf1, 0xc0, 0xb6, 0x29, 0x4d, 0x46, 0x60,
+  0x66, 0x38, 0x6c, 0x8a, 0x52, 0x56, 0xb0, 0x6b, 0xa6, 0xc9, 0xd1, 0x20,
+  0xaa, 0x70, 0xd9, 0x05, 0xb0, 0x05, 0xbc, 0x5b, 0x66, 0x09, 0xed, 0x82,
+  0xbd, 0x35, 0x14, 0x01, 0xb6, 0x3a, 0xaf, 0x9b, 0xbc, 0x59, 0x85, 0x07,
+  0xf5, 0x5c, 0xb1, 0xc6, 0x09, 0x96, 0x87, 0x14, 0x08, 0x6c, 0x86, 0xc3,
+  0xce, 0x21, 0x33, 0x04, 0x62, 0x61, 0x1b, 0xaa, 0xd3, 0xc9, 0x01, 0xb6,
+  0xe7, 0x84, 0x36, 0x32, 0x2f, 0x6f, 0xba, 0x92, 0xd5, 0x0b, 0x68, 0xc0,
+  0x76, 0x74, 0xed, 0xa4, 0x5b, 0xf3, 0xf6, 0x9f, 0xff, 0x43, 0xbf, 0x7c,
+  0x8f, 0x95, 0xfa, 0x4f, 0x5d, 0x29, 0x8d, 0x49, 0x4f, 0x03, 0x6c, 0x18,
+  0xb2, 0xfd, 0x24, 0x7f, 0xa6, 0x55, 0xf9, 0x3b, 0x42, 0x1e, 0x79, 0x69,
+  0x80, 0xc1, 0x46, 0x0d, 0xfe, 0x79, 0x6c, 0x05, 0x1d, 0x69, 0x24, 0x05,
+  0xd8, 0x05, 0x29, 0xa3, 0xe7, 0x77, 0x81, 0xc9, 0x14, 0x64, 0xf8, 0x53,
+  0x31, 0xa4, 0xb2, 0x0d, 0x95, 0x19, 0xc9, 0x25, 0x79, 0x18, 0x00, 0x78,
+  0x45, 0xbb, 0xf8, 0x53, 0x25, 0x88, 0x6a, 0x46, 0xd7, 0x16, 0xb7, 0x21,
+  0x7f, 0x1e, 0x57, 0x7c, 0x35, 0xea, 0x4d, 0xac, 0x7d, 0x2d, 0x90, 0x3d,
+  0xd3, 0x4e, 0x5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0xed, 0x42, 0xba, 0x8f, 0x82, 0x81, 0x21, 0xac, 0xee, 0xbd, 0xa3, 0xf1,
+  0x36, 0x89, 0xdb, 0xbc, 0x2d, 0x7a, 0x80, 0xe8, 0x89, 0x01, 0x99, 0x11,
+  0x05, 0x13, 0x2d, 0x04, 0xd1, 0xf9, 0x8f, 0xfc, 0x2a, 0xce, 0x13, 0xac,
+  0x11, 0xdc, 0x14, 0x0d, 0x67, 0x86, 0x89, 0x60, 0x41, 0xef, 0xdc, 0x84,
+  0x95, 0x7a, 0x82, 0x13, 0xb3, 0xfb, 0x29, 0xb0, 0x68, 0x38, 0x57, 0x2c,
+  0x4f, 0x6b, 0x3b, 0x42, 0x9e, 0x02, 0xb1, 0x02, 0x9a, 0xb0, 0x60, 0x51,
+  0xde, 0xcb, 0x3f, 0x38, 0xac, 0x16, 0x82, 0xd3, 0xb8, 0x67, 0x65, 0x38,
+  0x1b, 0xa2, 0xbb, 0x32, 0xfd, 0x0b, 0xa2, 0x73, 0x1e, 0xad, 0xef, 0x5b,
+  0x51, 0x3b, 0x37, 0xc5, 0x3b, 0x4e, 0xc6, 0x85, 0x2d, 0x8e, 0x7e, 0x21,
+  0x62, 0xe8, 0x40, 0x83, 0xde, 0x73, 0x6a, 0x5b, 0xfb, 0xbc, 0xd7, 0xb7,
+  0xcf, 0x36, 0xb3, 0x91, 0x99, 0x06, 0x3e, 0xf3, 0xd2, 0x1d, 0x59, 0x97,
+  0xa3, 0x74, 0x60, 0xcb, 0x7a, 0xe6, 0x77, 0x49, 0xb4, 0xc6, 0xd0, 0x9a,
+  0xee, 0x1f, 0xef, 0x44, 0xe8, 0xff, 0xef, 0x35, 0x75, 0x6b, 0xa5, 0x8d,
+  0xe4, 0xdf, 0x26, 0x27, 0x6f, 0x92, 0xf2, 0xfc, 0xef, 0x58, 0x5c, 0x76,
+  0xce, 0x23, 0xa5, 0xc2, 0x5e, 0x26, 0x1f, 0xb2, 0x48, 0xc6, 0x12, 0x25,
+  0x56, 0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x9d, 0xed, 0x40, 0xb6, 0x09, 0xe7, 0x76, 0x55, 0xb3, 0x2f, 0xe7, 0xd5,
+  0x04, 0x72, 0x65, 0x20, 0x93, 0x27, 0xb1, 0x88, 0xf5, 0xce, 0x8e, 0xec,
+  0xf7, 0xec, 0x88, 0x76, 0x5d, 0xdb, 0x1d, 0xa1, 0x95, 0xd0, 0x0f, 0x99,
+  0x13, 0x42, 0x1a, 0xbb, 0x28, 0x91, 0x65, 0xe2, 0x28, 0xe5, 0xd7, 0xd0,
+  0x45, 0x74, 0x4f, 0x0c, 0xad, 0x93, 0xf4, 0xe6, 0x1f, 0x7e, 0x0a, 0x0b,
+  0xb1, 0x22, 0xa4, 0x55, 0x46, 0x48, 0x98, 0xd5, 0xd4, 0x53, 0x2d, 0x7f,
+  0x70, 0xcf, 0x55, 0x20, 0x97, 0x90, 0x28, 0x15, 0xd0, 0xe0, 0xd3, 0x84,
+  0x92, 0x6a, 0x7e, 0xc9, 0xaa, 0x52, 0x84, 0xc9, 0xc4, 0x2b, 0x37, 0xf0,
+  0xab, 0x44, 0x3b, 0x62, 0xf2, 0xef, 0xeb, 0x7a, 0x0e, 0x4e, 0x9c, 0x5f,
+  0xdc, 0x99, 0x65, 0xad, 0x7b, 0x71, 0xdf, 0xfc, 0x99, 0xf2, 0x73, 0xca,
+  0x05, 0x3c, 0x73, 0xf4, 0x06, 0x97, 0xc1, 0x59, 0x66, 0x88, 0xc9, 0x8c,
+  0x57, 0xeb, 0xe9, 0xb2, 0x04, 0x48, 0x89, 0xd4, 0xbd, 0x8b, 0xef, 0x90,
+  0x6b, 0xcc, 0xca, 0xe0, 0xe3, 0x64, 0x47, 0x0c, 0x7c, 0xf7, 0x2e, 0x5c,
+  0xab, 0x25, 0x34, 0xe2, 0x82, 0x9a, 0xda, 0x9b, 0xfa, 0x38, 0x76, 0xd8,
+  0x95, 0x82, 0xde, 0x93, 0x99, 0x90, 0xc3, 0x90, 0x24, 0xd3, 0xcb, 0x1e,
+  0x13,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, 0x20, 0xe9, 0x46, 0xfb, 0x49,
+  0xee, 0x3b, 0xa6, 0x14, 0xb4, 0x51, 0xe5, 0x86, 0x17, 0x27, 0x5e, 0xb3,
+  0x0f, 0x9b, 0xa5, 0xf3, 0xec, 0xf6, 0xaf, 0x17, 0x2d, 0xb7, 0xcb, 0x1e,
+  0x25, 0x23, 0x04, 0xe4, 0xef, 0xd1, 0x7d, 0x46, 0x0f, 0x75, 0xd6, 0x22,
+  0x61, 0x85, 0x20, 0xa2, 0xe6, 0x33, 0x97, 0x9f, 0xa5, 0xa6, 0x30, 0x5b,
+  0x2c, 0xea, 0xe0, 0x21, 0x36, 0xe2, 0xfa, 0xf7, 0x44, 0xab, 0xbf, 0x4d,
+  0x0d, 0xcf, 0x88, 0xa6, 0x23, 0xd6, 0xe9, 0x35, 0xa7, 0x3d, 0x89, 0x59,
+  0x97, 0x7c, 0x63, 0xb8, 0x21, 0xdb, 0x28, 0xa8, 0xed, 0x4a, 0xc1, 0x54,
+  0x27, 0xbb, 0x1b, 0x85, 0x60, 0xb4, 0x20, 0x84, 0x2b, 0xd1, 0xed, 0xba,
+  0xc8, 0x9a, 0x94, 0x52, 0x55, 0xcd, 0x07, 0x14, 0x5f, 0x3d, 0xd3, 0x70,
+  0x2d, 0xb3, 0xe9, 0x0d, 0x17, 0x02, 0xa6, 0x38, 0x7f, 0x07, 0x83, 0x1f,
+  0x49, 0xe2, 0x14, 0x80, 0x0a, 0xea, 0xcd, 0xda, 0xba, 0x6f, 0x67, 0x97,
+  0x63, 0xa6, 0x89, 0x31, 0xe5, 0x8d, 0x68, 0x6b, 0x60, 0x14, 0x43, 0xe2,
+  0xbe, 0xd0, 0xb6, 0x63, 0xcd, 0x49, 0x9c, 0x44, 0xa2, 0x88, 0xf6, 0xed,
+  0x76, 0x17, 0x74, 0xb8, 0x29, 0x5c, 0xc2, 0xb6, 0x29, 0x39, 0xa1, 0xa1,
+  0x74, 0xcf, 0x33, 0x91, 0x9c, 0x5f, 0xca, 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, 0xff, 0xfc, 0xc7, 0x03, 0x50,
+  0xc1, 0xcf, 0x21, 0x1c, 0x7e, 0xed, 0x0d, 0xc4, 0x65, 0x28, 0x2b, 0x98,
+  0x01, 0xe8, 0xd6, 0x2e, 0x27, 0xb9, 0x1f, 0xde, 0x9f, 0xbe, 0x3d, 0xf9,
+  0xe1, 0x6f, 0xbf, 0x71, 0x17, 0x5e, 0xbc, 0xe9, 0x8f, 0x48, 0xb4, 0xd0,
+  0xc6, 0x7f, 0xfe, 0x55, 0xbd, 0xad, 0xed, 0xae, 0xdd, 0xfe, 0x50, 0x22,
+  0xa7, 0xe4, 0x8d, 0x20, 0x0e, 0x8a, 0x40, 0x7a, 0xb8, 0x50, 0xab, 0x42,
+  0xf6, 0x38, 0x8b, 0x90, 0x0d, 0xfe, 0x66, 0x79, 0xa0, 0xee, 0xe0, 0xb6,
+  0x85, 0xc1, 0x71, 0x74, 0x51, 0x10, 0x48, 0x8b, 0x8b, 0x10, 0x1e, 0x0a,
+  0x84, 0x10, 0x30, 0x82, 0x86, 0x8c, 0x23, 0x44, 0x79, 0x27, 0x76, 0x41,
+  0x5e, 0x1c, 0x1f, 0xff, 0xfa, 0x55, 0x90, 0x65, 0xe8, 0xac, 0x83, 0xb9,
+  0x25, 0x8a, 0xd2, 0xce, 0x68, 0x64, 0x85, 0x7a, 0x3d, 0x03, 0xeb, 0xca,
+  0x12, 0xbc, 0x39, 0x91, 0xd1, 0x3c, 0x27, 0x6d, 0x62, 0x54, 0x67, 0x46,
+  0x07, 0x48, 0xe1, 0xcb, 0xd4, 0xd2, 0x34, 0x18, 0x58, 0xbd, 0xcd, 0x09,
+  0x0f, 0xf5, 0xe7, 0x41, 0x3c, 0xa7, 0x7b, 0x88, 0xb3, 0x21, 0x78, 0x41,
+  0x39, 0x09, 0x9f, 0xb2, 0x24, 0x4b, 0x0b, 0x41, 0x89, 0x28, 0x52, 0x4e,
+  0xbe, 0x60, 0xa6, 0x67, 0x06, 0x12, 0x82, 0x79,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x7e, 0xf9, 0xea, 0x6d, 0xf2, 0xbc, 0x0d,
+  0xc2, 0x1b, 0xa1, 0xbe, 0x58, 0x72, 0x67, 0x3b, 0x29, 0x72, 0x68, 0x11,
+  0xff, 0x9a, 0xee, 0x85, 0x12, 0x94, 0x85, 0xd3, 0xdb, 0x45, 0x62, 0x75,
+  0x39, 0xfc, 0xcc, 0x8d, 0xa1, 0xb3, 0x1b, 0x86, 0x8d, 0xcd, 0x56, 0xd3,
+  0x2c, 0xf9, 0xc7, 0xbc, 0xbc, 0xac, 0x43, 0x83, 0x11, 0xed, 0xaf, 0x7d,
+  0x79, 0x28, 0x52, 0xab, 0xc5, 0xc0, 0xad, 0x99, 0x28, 0x20, 0x28, 0x51,
+  0x5e, 0x8a, 0x40, 0xf9, 0x67, 0x80, 0x4b, 0x8a, 0xb9, 0x93, 0xbc, 0xa0,
+  0x80, 0x04, 0xd5, 0xeb, 0x36, 0x21, 0x50, 0x5d, 0x65, 0xb7, 0x88, 0x81,
+  0x7a, 0x59, 0x52, 0x11, 0xda, 0xcc, 0x9a, 0x34, 0x6a, 0x49, 0x3b, 0x14,
+  0x82, 0x37, 0x0c, 0x28, 0xa8, 0x0c, 0x90, 0xd2, 0x35, 0x4e, 0xf9, 0x88,
+  0xe3, 0xe4, 0x7b, 0x2a, 0xfa, 0x45, 0xab, 0x77, 0x5e, 0x9a, 0x1f, 0x28,
+  0x90, 0x11, 0xc9, 0xda, 0x33, 0xb4, 0xf4, 0xed, 0xd1, 0xdf, 0xcc, 0xe6,
+  0x40, 0x07, 0x62, 0x44, 0xea, 0xbe, 0x8d, 0x21, 0x40, 0xae, 0x4c, 0x32,
+  0x06, 0xfa, 0xc4, 0xfe, 0xd4, 0x2d, 0x47, 0x0b, 0xa0, 0x2b, 0xf0, 0x22,
+  0xe1, 0xf8, 0x73, 0xad, 0x8a, 0x69, 0x05, 0x59, 0x8e, 0x0c, 0x63, 0x46,
+  0x6e, 0xf0, 0x56, 0x45, 0xc2, 0xcf, 0x52, 0xc6, 0x44, 0xe7, 0x23, 0x29,
+  0x47, 0x31, 0x94, 0x91, 0x38, 0x1d, 0x9a, 0x41, 0x2a, 0x20, 0x31, 0xa5,
+  0xf3, 0xbb, 0x5f, 0x32, 0x5b, 0xf0, 0xca, 0x50, 0xea, 0x05, 0xc4, 0x3f,
+  0xd3, 0x20, 0xd0, 0x21, 0xd8, 0x64, 0xc5, 0xdb, 0x87, 0x2a, 0xd9, 0xdd,
+  0x54, 0x03, 0xc2, 0x37, 0xa4, 0x26, 0xd8, 0xd9, 0x83, 0x2c, 0x39, 0x45,
+  0xeb, 0xfc, 0x1e, 0xb5, 0x2d, 0xae, 0xd2, 0xea, 0x83, 0x58, 0x30, 0x6e,
+  0xdc, 0x42, 0x73, 0x26, 0xcd, 0x3c, 0x44, 0x15, 0xbe, 0xd1, 0xc2, 0x7a,
+  0xba, 0x01, 0x07, 0x5a, 0x1d, 0x8d, 0xa0, 0x18, 0x70, 0xb1, 0x98, 0x53,
+  0xf5, 0x65, 0x89, 0x8b, 0x84, 0x3e, 0x94, 0x8a, 0x69, 0xe6, 0x97, 0x37,
+  0x93, 0x49, 0x04, 0x46, 0x05, 0xc7, 0xcb, 0x3c, 0x68, 0xf6, 0x91, 0x25,
+  0x55, 0xf3, 0xf3, 0xec, 0xe4, 0xf0, 0xe4, 0xd8, 0xfc, 0x72, 0xf4, 0xd5,
+  0xab, 0x1f, 0x9c, 0x36, 0x2b, 0x55, 0xcb, 0x79, 0x23, 0x6c, 0x38, 0x2c,
+  0x95, 0x87, 0x78, 0x3a, 0x6c, 0xa9, 0x11, 0x9c, 0x0e, 0x85, 0x4c, 0xa8,
+  0x96, 0x12, 0xca, 0x01, 0xac, 0x9f, 0xb8, 0x7b, 0x5e, 0xc5, 0x73, 0x82,
+  0xc0, 0xcb, 0x6f, 0x7d, 0x8c, 0x54, 0x9f, 0xcf, 0x71, 0xab, 0x36, 0xc9,
+  0xd0, 0x51, 0xdc, 0xab, 0x96, 0x64, 0x4e, 0x16, 0x01, 0x5f, 0xe3, 0x6d,
+  0xcb, 0xf4, 0x3c, 0x28, 0x0a, 0x8f, 0xc9, 0x35, 0x14, 0x8e, 0x3f, 0xd4,
+  0xe6, 0x14, 0x79, 0x44, 0x6e, 0x57, 0x1c, 0x72, 0x57, 0xc4, 0x05, 0x77,
+  0xcb, 0xd0, 0x9b, 0xa4, 0x1a, 0x6a, 0x1a, 0x43, 0x04, 0x8d, 0x64, 0x63,
+  0x15, 0x2d, 0x24, 0xd2, 0x8e, 0x20, 0x43, 0x40, 0x16, 0xb6, 0xb9, 0xf6,
+  0x9c, 0x64, 0x01, 0x44, 0x22, 0xa0, 0xe0, 0x15, 0x18, 0xa0, 0x3c, 0x18,
+  0x62, 0x11, 0xb2, 0xa2, 0xa8, 0x3a, 0x8c, 0xe6, 0x81, 0x7f, 0xdc, 0x20,
+  0x54, 0x13, 0x40, 0xaf, 0xb6, 0x90, 0x2e, 0x2d, 0x97, 0x46, 0x9f, 0x2c,
+  0x43, 0x13, 0x2a, 0xf6, 0x40, 0x8c, 0x54, 0x6d, 0x4d, 0xb9, 0x5e, 0xd3,
+  0x75, 0xb8, 0x00, 0x41, 0x0e, 0x38, 0x92, 0x09, 0xeb, 0x47, 0xeb, 0xda,
+  0x80, 0x25, 0xe3, 0x1f, 0xab, 0xfc, 0x3a, 0x25, 0x08, 0x16, 0x73, 0xc1,
+  0x8e, 0x46, 0xfc, 0x52, 0xa7, 0x8d, 0xf4, 0x57, 0x35, 0x92, 0xb6, 0x5b,
+  0x79, 0xfc, 0x6b, 0x1a, 0x79, 0xdc, 0x69, 0xe3, 0xea, 0x57, 0x35, 0x32,
+  0x52, 0xbd, 0xe6, 0x93, 0x4f, 0x8e, 0x7e, 0x78, 0x75, 0x96, 0x1c, 0x9e,
+  0xbc, 0x74, 0x07, 0xec, 0x8c, 0x94, 0x6b, 0x26, 0x01, 0x73, 0x65, 0x15,
+  0x86, 0x06, 0x51, 0xab, 0xda, 0x16, 0xdf, 0xe4, 0xe8, 0x4a, 0xc4, 0x20,
+  0xd5, 0x8a, 0xec, 0x92, 0x57, 0x0c, 0x99, 0x8c, 0x08, 0x28, 0xf2, 0xd2,
+  0x78, 0x50, 0x56, 0x5e, 0x12, 0x4f, 0xed, 0x72, 0x13, 0x81, 0xc7, 0x9f,
+  0x56, 0x5c, 0x39, 0xc7, 0xb6, 0x58, 0x30, 0x86, 0x10, 0xe1, 0x76, 0x34,
+  0x2d, 0x53, 0xbc, 0x43, 0x70, 0x26, 0x5e, 0x0d, 0x67, 0x3a, 0xa1, 0x7c,
+  0x32, 0x6a, 0x4b, 0xde, 0xe8, 0x70, 0xfc, 0xac, 0xa6, 0x5d, 0xcd, 0x23,
+  0x6d, 0x91, 0x3b, 0x11, 0xba, 0x30, 0x3a, 0xdc, 0xc7, 0x33, 0x5b, 0x68,
+  0x0b, 0x82, 0x5d, 0x51, 0xb6, 0x44, 0xba, 0x88, 0xb6, 0x69, 0x9b, 0xb0,
+  0xfd, 0xec, 0x49, 0xdc, 0x40, 0x9a, 0xcf, 0xd9, 0x45, 0x20, 0xb9, 0x22,
+  0xf9, 0x2f, 0x9e, 0x75, 0x69, 0xdf, 0x1a, 0x13, 0xcc, 0xf4, 0xe7, 0x14,
+  0xd9, 0x35, 0xe3, 0x63, 0x51, 0xdf, 0x19, 0x89, 0xf9, 0x96, 0xe4, 0x03,
+  0x98, 0xfe, 0x04, 0x7a, 0xda, 0xbd, 0xf9, 0x48, 0x83, 0xf0, 0x15, 0xdf,
+  0xba, 0xac, 0xac, 0x31, 0x55, 0xcd, 0xd0, 0xce, 0x3d, 0xa1, 0x60, 0x62,
+  0x7a, 0x51, 0xe7, 0x14, 0xfb, 0x12, 0x9e, 0x31, 0x09, 0x50, 0xd2, 0x5e,
+  0x15, 0x9b, 0x4c, 0x2a, 0x83, 0x65, 0xb7, 0xcb, 0x79, 0x3e, 0xcd, 0x29,
+  0x84, 0x4e, 0x61, 0x89, 0x4d, 0x57, 0xb4, 0x5e, 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b, 0x32, 0x28, 0x9f, 0x51,
+  0x5e, 0x50, 0x9c, 0x0f, 0xe1, 0xd7, 0x21, 0x0f, 0x89, 0xd7, 0xc7, 0x08,
+  0xe9, 0x97, 0x22, 0x8b, 0xb9, 0x46, 0x59, 0x74, 0x95, 0xbb, 0xd2, 0xf0,
+  0x00, 0xf2, 0x5c, 0xf4, 0x22, 0x38, 0xba, 0x75, 0xd8, 0xdd, 0xb1, 0xeb,
+  0xc0, 0x15, 0xcc, 0x09, 0x64, 0x11, 0xab, 0xf0, 0x3d, 0x95, 0x55, 0xb8,
+  0x49, 0x89, 0xb7, 0x58, 0xe4, 0x22, 0x67, 0x85, 0xb3, 0xb1, 0x1e, 0x90,
+  0x79, 0xc2, 0x5c, 0x4e, 0x42, 0x43, 0x44, 0x48, 0x31, 0x84, 0x05, 0x4e,
+  0xeb, 0xe2, 0xcc, 0x73, 0xb9, 0xcb, 0x86, 0x64, 0x5c, 0xb6, 0xcc, 0x93,
+  0x83, 0xad, 0x88, 0x31, 0x5f, 0x67, 0x55, 0x8f, 0x9b, 0x01, 0xb8, 0xdb,
+  0x9e, 0x50, 0xed, 0x80, 0x37, 0xbd, 0xf9, 0xec, 0xda, 0xf9, 0xdc, 0x10,
+  0xa1, 0x9c, 0xbe, 0x98, 0x4c, 0x94, 0x4c, 0x0e, 0x43, 0x8a, 0x50, 0x5d,
+  0x1d, 0x11, 0xf7, 0x02, 0x34, 0x16, 0xd1, 0xd4, 0xa4, 0x91, 0x4e, 0xa4,
+  0xe1, 0x2e, 0xf3, 0xba, 0x97, 0x0c, 0x99, 0x87, 0xf9, 0xe8, 0x7c, 0x99,
+  0xae, 0x74, 0xc6, 0x37, 0xeb, 0x57, 0x32, 0xae, 0x35, 0x70, 0xd0, 0x12,
+  0xd6, 0x99, 0x00, 0xbd, 0x1a, 0xf1, 0x3a, 0xc3, 0xde, 0x61, 0xf8, 0x11,
+  0x18, 0x99, 0x37, 0x90, 0xfd, 0x70, 0xd2, 0xdf, 0x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 0x34, 0xec, 0xb7, 0x47, 0x93, 0x33, 0x1e, 0x39, 0x7e,
+  0x0b, 0x46, 0xce, 0x40, 0x57, 0xf2, 0x61, 0xe8, 0x18, 0xb4, 0x94, 0x81,
+  0x28, 0x74, 0xd8, 0xf6, 0xd0, 0x7e, 0xa4, 0xb0, 0xec, 0xfe, 0xbe, 0x97,
+  0x72, 0x40, 0x4c, 0x53, 0xe8, 0x84, 0xce, 0x37, 0x7d, 0x30, 0x90, 0x5e,
+  0x06, 0x46, 0x2c, 0x9b, 0x69, 0xa9, 0x73, 0xaf, 0x85, 0x47, 0xae, 0x85,
+  0x25, 0x6e, 0x2a, 0x69, 0xe0, 0x15, 0x83, 0xac, 0xcd, 0xe9, 0xc3, 0x91,
+  0x92, 0x0a, 0x5d, 0x16, 0x4c, 0x14, 0xfc, 0x9c, 0x6b, 0xe7, 0xb1, 0x35,
+  0x12, 0xab, 0xa8, 0xe0, 0x0d, 0x05, 0x1f, 0x6b, 0xd8, 0x2f, 0x49, 0x1b,
+  0x1d, 0x92, 0xdb, 0x67, 0x4a, 0xff, 0x12, 0x29, 0x03, 0x36, 0x77, 0x81,
+  0xe7, 0xee, 0xdf, 0x0b, 0x46, 0xd8, 0xca, 0x8b, 0x15, 0xd7, 0x5f, 0x48,
+  0xab, 0x39, 0x8a, 0x55, 0x1a, 0x26, 0x52, 0x31, 0xc6, 0xc5, 0x4d, 0x11,
+  0xab, 0xab, 0xe5, 0xf5, 0x21, 0xf7, 0x0f, 0x2c, 0x8e, 0x53, 0x77, 0x51,
+  0xa3, 0xd0, 0x25, 0x1d, 0x62, 0x27, 0xeb, 0xc3, 0x04, 0x6d, 0xaf, 0x89,
+  0x71, 0x72, 0x9a, 0x55, 0x54, 0x4a, 0xc7, 0xd0, 0xea, 0xff, 0x70, 0xad,
+  0xf1, 0x21, 0x81, 0x5b, 0x19, 0xd7, 0x26, 0xa9, 0x2f, 0x79, 0x61, 0x76,
+  0x96, 0x3e, 0x21, 0x8c, 0x30,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1f, 0xf9, 0xd8, 0xca,
+  0x25, 0x1a, 0xe0, 0x02, 0x00,
 };
 #define BUF_SIZE 0x10000
 static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
diff --git a/src/tool_hugehelp.h b/src/tool_hugehelp.h
index 9f93969..06f73e5 100644
--- a/src/tool_hugehelp.h
+++ b/src/tool_hugehelp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c
index de7ec4d..58088ea 100644
--- a/src/tool_libinfo.c
+++ b/src/tool_libinfo.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -55,15 +55,18 @@
     { "ftp",    CURLPROTO_FTP    },
     { "ftps",   CURLPROTO_FTPS   },
     { "gopher", CURLPROTO_GOPHER },
+    { "gophers",CURLPROTO_GOPHERS},
     { "http",   CURLPROTO_HTTP   },
     { "https",  CURLPROTO_HTTPS  },
     { "imap",   CURLPROTO_IMAP   },
     { "imaps",  CURLPROTO_IMAPS  },
     { "ldap",   CURLPROTO_LDAP   },
     { "ldaps",  CURLPROTO_LDAPS  },
+    { "mqtt",   CURLPROTO_MQTT   },
     { "pop3",   CURLPROTO_POP3   },
     { "pop3s",  CURLPROTO_POP3S  },
     { "rtmp",   CURLPROTO_RTMP   },
+    { "rtmps",  CURLPROTO_RTMPS  },
     { "rtsp",   CURLPROTO_RTSP   },
     { "scp",    CURLPROTO_SCP    },
     { "sftp",   CURLPROTO_SFTP   },
diff --git a/src/tool_libinfo.h b/src/tool_libinfo.h
index 9563cc3..9479e3c 100644
--- a/src/tool_libinfo.h
+++ b/src/tool_libinfo.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_main.c b/src/tool_main.c
index b604546..9f16a4e 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,6 +23,10 @@
 
 #include <sys/stat.h>
 
+#ifdef WIN32
+#include <tchar.h>
+#endif
+
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
@@ -208,7 +212,6 @@
   /* Main cleanup */
   curl_global_cleanup();
   convert_cleanup();
-  metalink_cleanup();
 #ifdef USE_NSS
   if(PR_Initialized()) {
     /* prevent valgrind from reporting still reachable mem from NSRP arenas */
@@ -225,51 +228,6 @@
   config->last = NULL;
 }
 
-#ifdef WIN32
-/* TerminalSettings for Windows */
-static struct TerminalSettings {
-  HANDLE hStdOut;
-  DWORD dwOutputMode;
-} TerminalSettings;
-
-static void configure_terminal(void)
-{
-  /*
-   * If we're running Windows, enable VT output.
-   * Note: VT mode flag can be set on any version of Windows, but VT
-   * processing only performed on Win10 >= Creators Update)
-   */
-
-  /* Define the VT flags in case we're building with an older SDK */
-#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
-    #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
-#endif
-
-  memset(&TerminalSettings, 0, sizeof(TerminalSettings));
-
-  /* Enable VT output */
-  TerminalSettings.hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
-  if((TerminalSettings.hStdOut != INVALID_HANDLE_VALUE)
-    && (GetConsoleMode(TerminalSettings.hStdOut,
-                       &TerminalSettings.dwOutputMode))) {
-    SetConsoleMode(TerminalSettings.hStdOut,
-                   TerminalSettings.dwOutputMode
-                   | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
-  }
-}
-#else
-#define configure_terminal()
-#endif
-
-static void restore_terminal(void)
-{
-#ifdef WIN32
-  /* Restore Console output mode and codepage to whatever they were
-   * when Curl started */
-  SetConsoleMode(TerminalSettings.hStdOut, TerminalSettings.dwOutputMode);
-#endif
-}
-
 /*
 ** curl tool main function.
 */
@@ -284,7 +242,6 @@
   memset(&global, 0, sizeof(global));
 
 #ifdef WIN32
-#ifdef _tcscmp
   /* Undocumented diagnostic option to list the full paths of all loaded
      modules. This is purposely pre-init. */
   if(argc == 2 && !_tcscmp(argv[1], _T("--dump-module-paths"))) {
@@ -294,7 +251,6 @@
     curl_slist_free_all(head);
     return head ? 0 : 1;
   }
-#endif /* _tcscmp */
   /* win32_init must be called before other init routines. */
   result = win32_init();
   if(result) {
@@ -303,9 +259,6 @@
   }
 #endif
 
-  /* Perform any platform-specific terminal configuration */
-  configure_terminal();
-
   main_checkfds();
 
 #if defined(HAVE_SIGNAL) && defined(SIGPIPE)
@@ -326,9 +279,6 @@
     main_free(&global);
   }
 
-  /* Return the terminal to its original state */
-  restore_terminal();
-
 #ifdef __NOVELL_LIBC__
   if(getenv("_IN_NETWARE_BASH_") == NULL)
     tool_pressanykey();
diff --git a/src/tool_main.h b/src/tool_main.h
index a68287e..74226ce 100644
--- a/src/tool_main.h
+++ b/src/tool_main.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
deleted file mode 100644
index 2ad7115..0000000
--- a/src/tool_metalink.c
+++ /dev/null
@@ -1,937 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-#include "tool_setup.h"
-
-#ifdef USE_METALINK
-
-#include <sys/stat.h>
-#include <stdlib.h>
-
-#ifdef HAVE_FCNTL_H
-#  include <fcntl.h>
-#endif
-
-#undef HAVE_NSS_CONTEXT
-
-#ifdef USE_OPENSSL
-#  include <openssl/md5.h>
-#  include <openssl/sha.h>
-#elif defined(USE_GNUTLS_NETTLE)
-#  include <nettle/md5.h>
-#  include <nettle/sha.h>
-#  define MD5_CTX    struct md5_ctx
-#  define SHA_CTX    struct sha1_ctx
-#  define SHA256_CTX struct sha256_ctx
-#elif defined(USE_GNUTLS)
-#  include <gcrypt.h>
-#  define MD5_CTX    gcry_md_hd_t
-#  define SHA_CTX    gcry_md_hd_t
-#  define SHA256_CTX gcry_md_hd_t
-#elif defined(USE_NSS)
-#  include <nss.h>
-#  include <pk11pub.h>
-#  define MD5_CTX    void *
-#  define SHA_CTX    void *
-#  define SHA256_CTX void *
-#  define HAVE_NSS_CONTEXT
-   static NSSInitContext *nss_context;
-#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
-              (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
-      (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
-              (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
-/* For Apple operating systems: CommonCrypto has the functions we need.
-   The library's headers are even backward-compatible with OpenSSL's
-   headers as long as we define COMMON_DIGEST_FOR_OPENSSL first.
-
-   These functions are available on Tiger and later, as well as iOS 2.0
-   and later. If you're building for an older cat, well, sorry. */
-#  define COMMON_DIGEST_FOR_OPENSSL
-#  include <CommonCrypto/CommonDigest.h>
-#elif defined(USE_WIN32_CRYPTO)
-/* For Windows: If no other crypto library is provided, we fallback
-   to the hash functions provided within the Microsoft Windows CryptoAPI */
-#  include <wincrypt.h>
-/* Custom structure in order to store the required provider and hash handle */
-struct win32_crypto_hash {
-  HCRYPTPROV hCryptProv;
-  HCRYPTHASH hHash;
-};
-/* Custom Microsoft AES Cryptographic Provider defines required for MinGW */
-#  ifndef ALG_SID_SHA_256
-#    define ALG_SID_SHA_256  12
-#  endif
-#  ifndef CALG_SHA_256
-#    define CALG_SHA_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256)
-#  endif
-#  define MD5_CTX    struct win32_crypto_hash
-#  define SHA_CTX    struct win32_crypto_hash
-#  define SHA256_CTX struct win32_crypto_hash
-#else
-#  error "Can't compile METALINK support without a crypto library."
-#endif
-
-#define ENABLE_CURLX_PRINTF
-/* use our own printf() functions */
-#include "curlx.h"
-
-#include "tool_getparam.h"
-#include "tool_paramhlp.h"
-#include "tool_cfgable.h"
-#include "tool_metalink.h"
-#include "tool_operate.h"
-#include "tool_msgs.h"
-
-#include "memdebug.h" /* keep this as LAST include */
-
-/* Copied from tool_getparam.c */
-#define GetStr(str,val) do { \
-  if(*(str)) { \
-    free(*(str)); \
-    *(str) = NULL; \
-  } \
-  if((val)) \
-    *(str) = strdup((val)); \
-  if(!(val)) \
-    return PARAM_NO_MEM; \
-} while(0)
-
-#if defined(USE_OPENSSL)
-/* Functions are already defined */
-#elif defined(USE_GNUTLS_NETTLE)
-
-static int MD5_Init(MD5_CTX *ctx)
-{
-  md5_init(ctx);
-  return 1;
-}
-
-static void MD5_Update(MD5_CTX *ctx,
-                       const unsigned char *input,
-                       unsigned int inputLen)
-{
-  md5_update(ctx, inputLen, input);
-}
-
-static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
-{
-  md5_digest(ctx, 16, digest);
-}
-
-static int SHA1_Init(SHA_CTX *ctx)
-{
-  sha1_init(ctx);
-  return 1;
-}
-
-static void SHA1_Update(SHA_CTX *ctx,
-                        const unsigned char *input,
-                        unsigned int inputLen)
-{
-  sha1_update(ctx, inputLen, input);
-}
-
-static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
-{
-  sha1_digest(ctx, 20, digest);
-}
-
-static int SHA256_Init(SHA256_CTX *ctx)
-{
-  sha256_init(ctx);
-  return 1;
-}
-
-static void SHA256_Update(SHA256_CTX *ctx,
-                          const unsigned char *input,
-                          unsigned int inputLen)
-{
-  sha256_update(ctx, inputLen, input);
-}
-
-static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
-{
-  sha256_digest(ctx, 32, digest);
-}
-
-#elif defined(USE_GNUTLS)
-
-static int MD5_Init(MD5_CTX *ctx)
-{
-  gcry_md_open(ctx, GCRY_MD_MD5, 0);
-  return 1;
-}
-
-static void MD5_Update(MD5_CTX *ctx,
-                       const unsigned char *input,
-                       unsigned int inputLen)
-{
-  gcry_md_write(*ctx, input, inputLen);
-}
-
-static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
-{
-  memcpy(digest, gcry_md_read(*ctx, 0), 16);
-  gcry_md_close(*ctx);
-}
-
-static int SHA1_Init(SHA_CTX *ctx)
-{
-  gcry_md_open(ctx, GCRY_MD_SHA1, 0);
-  return 1;
-}
-
-static void SHA1_Update(SHA_CTX *ctx,
-                        const unsigned char *input,
-                        unsigned int inputLen)
-{
-  gcry_md_write(*ctx, input, inputLen);
-}
-
-static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
-{
-  memcpy(digest, gcry_md_read(*ctx, 0), 20);
-  gcry_md_close(*ctx);
-}
-
-static int SHA256_Init(SHA256_CTX *ctx)
-{
-  gcry_md_open(ctx, GCRY_MD_SHA256, 0);
-  return 1;
-}
-
-static void SHA256_Update(SHA256_CTX *ctx,
-                          const unsigned char *input,
-                          unsigned int inputLen)
-{
-  gcry_md_write(*ctx, input, inputLen);
-}
-
-static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
-{
-  memcpy(digest, gcry_md_read(*ctx, 0), 32);
-  gcry_md_close(*ctx);
-}
-
-#elif defined(USE_NSS)
-
-static int nss_hash_init(void **pctx, SECOidTag hash_alg)
-{
-  PK11Context *ctx;
-
-  /* we have to initialize NSS if not initialized already */
-  if(!NSS_IsInitialized() && !nss_context) {
-    static NSSInitParameters params;
-    params.length = sizeof(params);
-    nss_context = NSS_InitContext("", "", "", "", &params, NSS_INIT_READONLY
-        | NSS_INIT_NOCERTDB   | NSS_INIT_NOMODDB       | NSS_INIT_FORCEOPEN
-        | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
-  }
-
-  ctx = PK11_CreateDigestContext(hash_alg);
-  if(!ctx)
-    return /* failure */ 0;
-
-  if(PK11_DigestBegin(ctx) != SECSuccess) {
-    PK11_DestroyContext(ctx, PR_TRUE);
-    return /* failure */ 0;
-  }
-
-  *pctx = ctx;
-  return /* success */ 1;
-}
-
-static void nss_hash_final(void **pctx, unsigned char *out, unsigned int len)
-{
-  PK11Context *ctx = *pctx;
-  unsigned int outlen;
-  PK11_DigestFinal(ctx, out, &outlen, len);
-  PK11_DestroyContext(ctx, PR_TRUE);
-}
-
-static int MD5_Init(MD5_CTX *pctx)
-{
-  return nss_hash_init(pctx, SEC_OID_MD5);
-}
-
-static void MD5_Update(MD5_CTX *pctx,
-                       const unsigned char *input,
-                       unsigned int input_len)
-{
-  PK11_DigestOp(*pctx, input, input_len);
-}
-
-static void MD5_Final(unsigned char digest[16], MD5_CTX *pctx)
-{
-  nss_hash_final(pctx, digest, 16);
-}
-
-static int SHA1_Init(SHA_CTX *pctx)
-{
-  return nss_hash_init(pctx, SEC_OID_SHA1);
-}
-
-static void SHA1_Update(SHA_CTX *pctx,
-                        const unsigned char *input,
-                        unsigned int input_len)
-{
-  PK11_DigestOp(*pctx, input, input_len);
-}
-
-static void SHA1_Final(unsigned char digest[20], SHA_CTX *pctx)
-{
-  nss_hash_final(pctx, digest, 20);
-}
-
-static int SHA256_Init(SHA256_CTX *pctx)
-{
-  return nss_hash_init(pctx, SEC_OID_SHA256);
-}
-
-static void SHA256_Update(SHA256_CTX *pctx,
-                          const unsigned char *input,
-                          unsigned int input_len)
-{
-  PK11_DigestOp(*pctx, input, input_len);
-}
-
-static void SHA256_Final(unsigned char digest[32], SHA256_CTX *pctx)
-{
-  nss_hash_final(pctx, digest, 32);
-}
-
-#elif defined(USE_WIN32_CRYPTO)
-
-static void win32_crypto_final(struct win32_crypto_hash *ctx,
-                               unsigned char *digest,
-                               unsigned int digestLen)
-{
-  unsigned long length;
-  CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
-  if(length == digestLen)
-    CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);
-  if(ctx->hHash)
-    CryptDestroyHash(ctx->hHash);
-  if(ctx->hCryptProv)
-    CryptReleaseContext(ctx->hCryptProv, 0);
-}
-
-static int MD5_Init(MD5_CTX *ctx)
-{
-  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL,
-                         CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
-    CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash);
-  }
-  return 1;
-}
-
-static void MD5_Update(MD5_CTX *ctx,
-                       const unsigned char *input,
-                       unsigned int inputLen)
-{
-  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
-}
-
-static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
-{
-  win32_crypto_final(ctx, digest, 16);
-}
-
-static int SHA1_Init(SHA_CTX *ctx)
-{
-  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL,
-                         CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
-    CryptCreateHash(ctx->hCryptProv, CALG_SHA1, 0, 0, &ctx->hHash);
-  }
-  return 1;
-}
-
-static void SHA1_Update(SHA_CTX *ctx,
-                        const unsigned char *input,
-                        unsigned int inputLen)
-{
-  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
-}
-
-static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
-{
-  win32_crypto_final(ctx, digest, 20);
-}
-
-static int SHA256_Init(SHA256_CTX *ctx)
-{
-  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_AES,
-                         CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
-    CryptCreateHash(ctx->hCryptProv, CALG_SHA_256, 0, 0, &ctx->hHash);
-  }
-  return 1;
-}
-
-static void SHA256_Update(SHA256_CTX *ctx,
-                          const unsigned char *input,
-                          unsigned int inputLen)
-{
-  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
-}
-
-static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
-{
-  win32_crypto_final(ctx, digest, 32);
-}
-
-#endif /* CRYPTO LIBS */
-
-const struct digest_params MD5_DIGEST_PARAMS[] = {
-  {
-    CURLX_FUNCTION_CAST(digest_init_func, MD5_Init),
-    CURLX_FUNCTION_CAST(digest_update_func, MD5_Update),
-    CURLX_FUNCTION_CAST(digest_final_func, MD5_Final),
-    sizeof(MD5_CTX),
-    16
-  }
-};
-
-const struct digest_params SHA1_DIGEST_PARAMS[] = {
-  {
-    CURLX_FUNCTION_CAST(digest_init_func, SHA1_Init),
-    CURLX_FUNCTION_CAST(digest_update_func, SHA1_Update),
-    CURLX_FUNCTION_CAST(digest_final_func, SHA1_Final),
-    sizeof(SHA_CTX),
-    20
-  }
-};
-
-const struct digest_params SHA256_DIGEST_PARAMS[] = {
-  {
-    CURLX_FUNCTION_CAST(digest_init_func, SHA256_Init),
-    CURLX_FUNCTION_CAST(digest_update_func, SHA256_Update),
-    CURLX_FUNCTION_CAST(digest_final_func, SHA256_Final),
-    sizeof(SHA256_CTX),
-    32
-  }
-};
-
-static const struct metalink_digest_def SHA256_DIGEST_DEF[] = {
-  {"sha-256", SHA256_DIGEST_PARAMS}
-};
-
-static const struct metalink_digest_def SHA1_DIGEST_DEF[] = {
-  {"sha-1", SHA1_DIGEST_PARAMS}
-};
-
-static const struct metalink_digest_def MD5_DIGEST_DEF[] = {
-  {"md5", MD5_DIGEST_PARAMS}
-};
-
-/*
- * The alias of supported hash functions in the order by preference
- * (basically stronger hash comes first). We included "sha-256" and
- * "sha256". The former is the name defined in the IANA registry named
- * "Hash Function Textual Names". The latter is widely (and
- * historically) used in Metalink version 3.
- */
-static const struct metalink_digest_alias digest_aliases[] = {
-  {"sha-256", SHA256_DIGEST_DEF},
-  {"sha256", SHA256_DIGEST_DEF},
-  {"sha-1", SHA1_DIGEST_DEF},
-  {"sha1", SHA1_DIGEST_DEF},
-  {"md5", MD5_DIGEST_DEF},
-  {NULL, NULL}
-};
-
-static struct digest_context *digest_init(const struct digest_params *dparams)
-{
-  struct digest_context *ctxt = malloc(sizeof(*ctxt));
-  if(!ctxt)
-    return ctxt;
-
-  ctxt->digest_hashctx = malloc(dparams->digest_ctxtsize);
-
-  if(!ctxt->digest_hashctx) {
-    free(ctxt);
-    return NULL;
-  }
-
-  ctxt->digest_hash = dparams;
-
-  if(dparams->digest_init(ctxt->digest_hashctx) != 1) {
-    free(ctxt->digest_hashctx);
-    free(ctxt);
-    return NULL;
-  }
-
-  return ctxt;
-}
-
-static int digest_update(struct digest_context *context,
-                         const unsigned char *data,
-                         unsigned int len)
-{
-  (*context->digest_hash->digest_update)(context->digest_hashctx, data, len);
-
-  return 0;
-}
-
-static int digest_final(struct digest_context *context, unsigned char *result)
-{
-  if(result)
-    (*context->digest_hash->digest_final)(result, context->digest_hashctx);
-
-  free(context->digest_hashctx);
-  free(context);
-
-  return 0;
-}
-
-static unsigned char hex_to_uint(const char *s)
-{
-  char buf[3];
-  unsigned long val;
-  buf[0] = s[0];
-  buf[1] = s[1];
-  buf[2] = 0;
-  val = strtoul(buf, NULL, 16);
-  return (unsigned char)(val&0xff);
-}
-
-/*
- * Check checksum of file denoted by filename. The expected hash value
- * is given in hex_hash which is hex-encoded string.
- *
- * This function returns 1 if it succeeds or one of the following
- * integers:
- *
- * 0:
- *   Checksum didn't match.
- * -1:
- *   Could not open file; or could not read data from file.
- * -2:
- *   Hash algorithm not available.
- */
-static int check_hash(const char *filename,
-                      const struct metalink_digest_def *digest_def,
-                      const unsigned char *digest, FILE *error)
-{
-  unsigned char *result;
-  struct digest_context *dctx;
-  int check_ok, flags, fd;
-
-  flags = O_RDONLY;
-#ifdef O_BINARY
-  /* O_BINARY is required in order to avoid binary EOF in text mode */
-  flags |= O_BINARY;
-#endif
-
-  fd = open(filename, flags);
-  if(fd == -1) {
-    fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
-            digest_def->hash_name, strerror(errno));
-    return -1;
-  }
-
-  dctx = digest_init(digest_def->dparams);
-  if(!dctx) {
-    fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
-            digest_def->hash_name, "failed to initialize hash algorithm");
-    close(fd);
-    return -2;
-  }
-
-  result = malloc(digest_def->dparams->digest_resultlen);
-  if(!result) {
-    close(fd);
-    digest_final(dctx, NULL);
-    return -1;
-  }
-  while(1) {
-    unsigned char buf[4096];
-    ssize_t len = read(fd, buf, sizeof(buf));
-    if(len == 0) {
-      break;
-    }
-    else if(len == -1) {
-      fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
-              digest_def->hash_name, strerror(errno));
-      digest_final(dctx, result);
-      close(fd);
-      return -1;
-    }
-    digest_update(dctx, buf, (unsigned int)len);
-  }
-  digest_final(dctx, result);
-  check_ok = memcmp(result, digest,
-                    digest_def->dparams->digest_resultlen) == 0;
-  /* sha*sum style verdict output */
-  if(check_ok)
-    fprintf(error, "Metalink: validating (%s) [%s] OK\n", filename,
-            digest_def->hash_name);
-  else
-    fprintf(error, "Metalink: validating (%s) [%s] FAILED (digest mismatch)\n",
-            filename, digest_def->hash_name);
-
-  free(result);
-  close(fd);
-  return check_ok;
-}
-
-int metalink_check_hash(struct GlobalConfig *config,
-                        struct metalinkfile *mlfile,
-                        const char *filename)
-{
-  int rv;
-  fprintf(config->errors, "Metalink: validating (%s)...\n", filename);
-  if(mlfile->checksum == NULL) {
-    fprintf(config->errors,
-            "Metalink: validating (%s) FAILED (digest missing)\n", filename);
-    return -2;
-  }
-  rv = check_hash(filename, mlfile->checksum->digest_def,
-                  mlfile->checksum->digest, config->errors);
-  return rv;
-}
-
-static struct metalink_checksum *
-checksum_from_hex_digest(const struct metalink_digest_def *digest_def,
-                         const char *hex_digest)
-{
-  struct metalink_checksum *chksum;
-  unsigned char *digest;
-  size_t i;
-  size_t len = strlen(hex_digest);
-  digest = malloc(len/2);
-  if(!digest)
-    return 0;
-
-  for(i = 0; i < len; i += 2) {
-    digest[i/2] = hex_to_uint(hex_digest + i);
-  }
-  chksum = malloc(sizeof(struct metalink_checksum));
-  if(chksum) {
-    chksum->digest_def = digest_def;
-    chksum->digest = digest;
-  }
-  else
-    free(digest);
-  return chksum;
-}
-
-static struct metalink_resource *new_metalink_resource(const char *url)
-{
-  struct metalink_resource *res = malloc(sizeof(struct metalink_resource));
-  if(res) {
-    res->next = NULL;
-    res->url = strdup(url);
-    if(!res->url) {
-      free(res);
-      return NULL;
-    }
-  }
-  return res;
-}
-
-/* Returns nonzero if hex_digest is properly formatted; that is each
-   letter is in [0-9A-Za-z] and the length of the string equals to the
-   result length of digest * 2. */
-static int check_hex_digest(const char *hex_digest,
-                            const struct metalink_digest_def *digest_def)
-{
-  size_t i;
-  for(i = 0; hex_digest[i]; ++i) {
-    char c = hex_digest[i];
-    if(!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||
-         ('A' <= c && c <= 'Z'))) {
-      return 0;
-    }
-  }
-  return digest_def->dparams->digest_resultlen * 2 == i;
-}
-
-static struct metalinkfile *new_metalinkfile(metalink_file_t *fileinfo)
-{
-  struct metalinkfile *f = malloc(sizeof(struct metalinkfile));
-  if(!f)
-    return NULL;
-
-  f->next = NULL;
-  f->filename = strdup(fileinfo->name);
-  if(!f->filename) {
-    free(f);
-    return NULL;
-  }
-  f->checksum = NULL;
-  f->resource = NULL;
-  if(fileinfo->checksums) {
-    const struct metalink_digest_alias *digest_alias;
-    for(digest_alias = digest_aliases; digest_alias->alias_name;
-        ++digest_alias) {
-      metalink_checksum_t **p;
-      for(p = fileinfo->checksums; *p; ++p) {
-        if(curl_strequal(digest_alias->alias_name, (*p)->type) &&
-           check_hex_digest((*p)->hash, digest_alias->digest_def)) {
-          f->checksum =
-            checksum_from_hex_digest(digest_alias->digest_def,
-                                     (*p)->hash);
-          break;
-        }
-      }
-      if(f->checksum) {
-        break;
-      }
-    }
-  }
-  if(fileinfo->resources) {
-    metalink_resource_t **p;
-    struct metalink_resource root, *tail;
-    root.next = NULL;
-    tail = &root;
-    for(p = fileinfo->resources; *p; ++p) {
-      struct metalink_resource *res;
-      /* Filter by type if it is non-NULL. In Metalink v3, type
-         includes the type of the resource. In curl, we are only
-         interested in HTTP, HTTPS and FTP. In addition to them,
-         Metalink v3 file may contain bittorrent type URL, which
-         points to the BitTorrent metainfo file. We ignore it here.
-         In Metalink v4, type was deprecated and all
-         fileinfo->resources point to the target file. BitTorrent
-         metainfo file URL may be appeared in fileinfo->metaurls.
-      */
-      if((*p)->type == NULL ||
-         curl_strequal((*p)->type, "http") ||
-         curl_strequal((*p)->type, "https") ||
-         curl_strequal((*p)->type, "ftp") ||
-         curl_strequal((*p)->type, "ftps")) {
-        res = new_metalink_resource((*p)->url);
-        if(res) {
-          tail->next = res;
-          tail = res;
-        }
-        else {
-          tail = root.next;
-
-          /* clean up the linked list */
-          while(tail) {
-            res = tail->next;
-            free(tail->url);
-            free(tail);
-            tail = res;
-          }
-          free(f->filename);
-          free(f);
-          return NULL;
-        }
-      }
-    }
-    f->resource = root.next;
-  }
-  return f;
-}
-
-int parse_metalink(struct OperationConfig *config, struct OutStruct *outs,
-                   const char *metalink_url)
-{
-  metalink_error_t r;
-  metalink_t* metalink;
-  metalink_file_t **files;
-  bool warnings = FALSE;
-
-  /* metlaink_parse_final deletes outs->metalink_parser */
-  r = metalink_parse_final(outs->metalink_parser, NULL, 0, &metalink);
-  outs->metalink_parser = NULL;
-  if(r != 0) {
-    return -1;
-  }
-  if(metalink->files == NULL) {
-    fprintf(config->global->errors, "Metalink: parsing (%s) WARNING "
-            "(missing or invalid file name)\n",
-            metalink_url);
-    metalink_delete(metalink);
-    return -1;
-  }
-  for(files = metalink->files; *files; ++files) {
-    struct getout *url;
-    /* Skip an entry which has no resource. */
-    if(!(*files)->resources) {
-      fprintf(config->global->errors, "Metalink: parsing (%s) WARNING "
-              "(missing or invalid resource)\n",
-              metalink_url);
-      continue;
-    }
-    if(config->url_get ||
-       ((config->url_get = config->url_list) != NULL)) {
-      /* there's a node here, if it already is filled-in continue to
-         find an "empty" node */
-      while(config->url_get && (config->url_get->flags & GETOUT_URL))
-        config->url_get = config->url_get->next;
-    }
-
-    /* now there might or might not be an available node to fill in! */
-
-    if(config->url_get)
-      /* existing node */
-      url = config->url_get;
-    else
-      /* there was no free node, create one! */
-      url = new_getout(config);
-
-    if(url) {
-      struct metalinkfile *mlfile = new_metalinkfile(*files);
-      if(!mlfile)
-        break;
-
-      if(!mlfile->checksum) {
-        warnings = TRUE;
-        fprintf(config->global->errors,
-                "Metalink: parsing (%s) WARNING (digest missing)\n",
-                metalink_url);
-      }
-      /* Set name as url */
-      GetStr(&url->url, mlfile->filename);
-
-      /* set flag metalink here */
-      url->flags |= GETOUT_URL | GETOUT_METALINK;
-
-      if(config->metalinkfile_list) {
-        config->metalinkfile_last->next = mlfile;
-        config->metalinkfile_last = mlfile;
-      }
-      else {
-        config->metalinkfile_list = config->metalinkfile_last = mlfile;
-      }
-    }
-  }
-  metalink_delete(metalink);
-  return (warnings) ? -2 : 0;
-}
-
-size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
-                         void *userdata)
-{
-  struct per_transfer *per = userdata;
-  struct OutStruct *outs = &per->outs;
-  struct OperationConfig *config = per->config;
-  int rv;
-
-  /*
-   * Once that libcurl has called back tool_write_cb() the returned value
-   * is checked against the amount that was intended to be written, if
-   * it does not match then it fails with CURLE_WRITE_ERROR. So at this
-   * point returning a value different from sz*nmemb indicates failure.
-   */
-  const size_t failure = (sz && nmemb) ? 0 : 1;
-
-  if(!config)
-    return failure;
-
-  rv = metalink_parse_update(outs->metalink_parser, buffer, sz * nmemb);
-  if(rv == 0)
-    return sz * nmemb;
-  else {
-    fprintf(config->global->errors, "Metalink: parsing FAILED\n");
-    return failure;
-  }
-}
-
-/*
- * Returns nonzero if content_type includes mediatype.
- */
-static int check_content_type(const char *content_type, const char *media_type)
-{
-  const char *ptr = content_type;
-  size_t media_type_len = strlen(media_type);
-  for(; *ptr && (*ptr == ' ' || *ptr == '\t'); ++ptr);
-  if(!*ptr) {
-    return 0;
-  }
-  return curl_strnequal(ptr, media_type, media_type_len) &&
-    (*(ptr + media_type_len) == '\0' || *(ptr + media_type_len) == ' ' ||
-     *(ptr + media_type_len) == '\t' || *(ptr + media_type_len) == ';');
-}
-
-int check_metalink_content_type(const char *content_type)
-{
-  return check_content_type(content_type, "application/metalink+xml");
-}
-
-int count_next_metalink_resource(struct metalinkfile *mlfile)
-{
-  int count = 0;
-  struct metalink_resource *res;
-  for(res = mlfile->resource; res; res = res->next, ++count);
-  return count;
-}
-
-static void delete_metalink_checksum(struct metalink_checksum *chksum)
-{
-  if(!chksum)
-    return;
-  Curl_safefree(chksum->digest);
-  Curl_safefree(chksum);
-}
-
-static void delete_metalink_resource(struct metalink_resource *res)
-{
-  if(res == NULL) {
-    return;
-  }
-  Curl_safefree(res->url);
-  Curl_safefree(res);
-}
-
-void delete_metalinkfile(struct metalinkfile *mlfile)
-{
-  struct metalink_resource *res;
-  if(mlfile == NULL) {
-    return;
-  }
-  Curl_safefree(mlfile->filename);
-  delete_metalink_checksum(mlfile->checksum);
-  for(res = mlfile->resource; res;) {
-    struct metalink_resource *next;
-    next = res->next;
-    delete_metalink_resource(res);
-    res = next;
-  }
-  Curl_safefree(mlfile);
-}
-
-void clean_metalink(struct OperationConfig *config)
-{
-  if(config) {
-    while(config->metalinkfile_list) {
-      struct metalinkfile *mlfile = config->metalinkfile_list;
-      config->metalinkfile_list = config->metalinkfile_list->next;
-      delete_metalinkfile(mlfile);
-    }
-    config->metalinkfile_last = 0;
-  }
-}
-
-void metalink_cleanup(void)
-{
-#ifdef HAVE_NSS_CONTEXT
-  if(nss_context) {
-    NSS_ShutdownContext(nss_context);
-    nss_context = NULL;
-  }
-#endif
-}
-
-#endif /* USE_METALINK */
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
deleted file mode 100644
index abf75dd..0000000
--- a/src/tool_metalink.h
+++ /dev/null
@@ -1,165 +0,0 @@
-#ifndef HEADER_CURL_TOOL_METALINK_H
-#define HEADER_CURL_TOOL_METALINK_H
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-#include "tool_setup.h"
-#include "tool_sdecls.h"
-
-struct GlobalConfig;
-struct OperationConfig;
-
-/* returns 1 for success, 0 otherwise (we use OpenSSL *_Init fncs directly) */
-typedef int (*digest_init_func)(void *context);
-
-typedef void (*digest_update_func)(void *context,
-                                   const unsigned char *data,
-                                   unsigned int len);
-typedef void (*digest_final_func)(unsigned char *result, void *context);
-
-struct digest_params {
-  digest_init_func     digest_init;   /* Initialize context procedure */
-  digest_update_func   digest_update; /* Update context with data */
-  digest_final_func    digest_final;  /* Get final result procedure */
-  unsigned int         digest_ctxtsize;  /* Context structure size */
-  unsigned int         digest_resultlen; /* Result length (bytes) */
-};
-
-struct digest_context {
-  const struct digest_params *digest_hash; /* Hash function definition */
-  void                  *digest_hashctx;   /* Hash function context */
-};
-
-struct metalink_digest_def {
-  const char *hash_name;
-  const struct digest_params *dparams;
-};
-
-struct metalink_digest_alias {
-  const char *alias_name;
-  const struct metalink_digest_def *digest_def;
-};
-
-struct metalink_checksum {
-  const struct metalink_digest_def *digest_def;
-  /* raw digest value, not ascii hex digest */
-  unsigned char *digest;
-};
-
-struct metalink_resource {
-  struct metalink_resource *next;
-  char *url;
-};
-
-struct metalinkfile {
-  struct metalinkfile *next;
-  char *filename;
-  struct metalink_checksum *checksum;
-  struct metalink_resource *resource;
-};
-
-#ifdef USE_METALINK
-
-/*
- * curl requires libmetalink 0.1.0 or newer
- */
-#define CURL_REQ_LIBMETALINK_MAJOR  0
-#define CURL_REQ_LIBMETALINK_MINOR  1
-#define CURL_REQ_LIBMETALINK_PATCH  0
-
-#define CURL_REQ_LIBMETALINK_VERS  ((CURL_REQ_LIBMETALINK_MAJOR * 10000) + \
-                                    (CURL_REQ_LIBMETALINK_MINOR * 100) + \
-                                     CURL_REQ_LIBMETALINK_PATCH)
-
-extern const struct digest_params MD5_DIGEST_PARAMS[1];
-extern const struct digest_params SHA1_DIGEST_PARAMS[1];
-extern const struct digest_params SHA256_DIGEST_PARAMS[1];
-
-#include <metalink/metalink.h>
-
-/*
- * Counts the resource in the metalinkfile.
- */
-int count_next_metalink_resource(struct metalinkfile *mlfile);
-
-void delete_metalinkfile(struct metalinkfile *mlfile);
-void clean_metalink(struct OperationConfig *config);
-
-/*
- * Performs final parse operation and extracts information from
- * Metalink and creates metalinkfile structs.
- *
- * This function returns 0 if it succeeds without warnings, or one of
- * the following negative error codes:
- *
- * -1: Parsing failed; or no file is found
- * -2: Parsing succeeded with some warnings.
- */
-int parse_metalink(struct OperationConfig *config, struct OutStruct *outs,
-                   const char *metalink_url);
-
-/*
- * Callback function for CURLOPT_WRITEFUNCTION
- */
-size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
-                         void *userdata);
-
-/*
- * Returns nonzero if content_type includes "application/metalink+xml"
- * media-type. The check is done in case-insensitive manner.
- */
-int check_metalink_content_type(const char *content_type);
-
-/*
- * Check checksum of file denoted by filename.
- *
- * This function returns 1 if the checksum matches or one of the
- * following integers:
- *
- * 0:
- *   Checksum didn't match.
- * -1:
- *   Could not open file; or could not read data from file.
- * -2:
- *   No checksum in Metalink supported, hash algorithm not available, or
- *   Metalink does not contain checksum.
- */
-int metalink_check_hash(struct GlobalConfig *config,
-                        struct metalinkfile *mlfile,
-                        const char *filename);
-
-/*
- * Release resources allocated at global scope.
- */
-void metalink_cleanup(void);
-
-#else /* USE_METALINK */
-
-#define count_next_metalink_resource(x)  0
-#define delete_metalinkfile(x)  (void)x
-#define clean_metalink(x)  (void)x
-
-/* metalink_cleanup() takes no arguments */
-#define metalink_cleanup() Curl_nop_stmt
-
-#endif /* USE_METALINK */
-
-#endif /* HEADER_CURL_TOOL_METALINK_H */
diff --git a/src/tool_msgs.c b/src/tool_msgs.c
index 48877b3..184adba 100644
--- a/src/tool_msgs.c
+++ b/src/tool_msgs.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_msgs.h b/src/tool_msgs.h
index 2c4afd1..c2ab606 100644
--- a/src/tool_msgs.h
+++ b/src/tool_msgs.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_operate.c b/src/tool_operate.c
index e3fec0b..e6ca575 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -66,7 +66,6 @@
 #include "tool_homedir.h"
 #include "tool_libinfo.h"
 #include "tool_main.h"
-#include "tool_metalink.h"
 #include "tool_msgs.h"
 #include "tool_operate.h"
 #include "tool_operhlp.h"
@@ -82,6 +81,7 @@
 #include "tool_help.h"
 #include "tool_hugehelp.h"
 #include "tool_progress.h"
+#include "dynbuf.h"
 
 #include "memdebug.h" /* keep this as LAST include */
 
@@ -99,7 +99,7 @@
 #endif
 
 #define CURL_CA_CERT_ERRORMSG                                               \
-  "More details here: https://curl.haxx.se/docs/sslcerts.html\n\n"          \
+  "More details here: https://curl.se/docs/sslcerts.html\n\n"          \
   "curl failed to verify the legitimacy of the server and therefore "       \
   "could not\nestablish a secure connection to it. To learn more about "    \
   "this situation and\nhow to fix it, please visit the web page mentioned " \
@@ -166,14 +166,14 @@
 
   /* !checksrc! disable FOPENMODE 1 */
   file = fopen(name, "r"); /* VMS */
-  if(file == NULL) {
+  if(!file) {
     return 0;
   }
   count = 0;
   ret_stat = 1;
   while(ret_stat > 0) {
     ret_stat = fread(buffer, 1, sizeof(buffer), file);
-    if(ret_stat != 0)
+    if(ret_stat)
       count += ret_stat;
   }
   fclose(file);
@@ -279,7 +279,7 @@
      *
      * - Stat gives a size but this is UNRELIABLE in VMS As a f.e. a
      * fixed file with implied CC needs to have a byte added for every
-     * record processed, this can by derived from Filesize & recordsize
+     * record processed, this can be derived from Filesize & recordsize
      * for VARiable record files the records need to be counted!  for
      * every record add 1 for linefeed and subtract 2 for the record
      * header for VARIABLE header files only the bare record data needs
@@ -322,6 +322,9 @@
 
     if(uploadfilesize != -1) {
       struct OperationConfig *config = per->config; /* for the macro below */
+#ifdef CURL_DISABLE_LIBCURL_OPTION
+      (void)config;
+#endif
       my_setopt(per->curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
     }
     per->input.fd = per->infd;
@@ -359,28 +362,36 @@
   }
   else
 #endif
-    if(config->synthetic_error) {
-      ;
-    }
-    else if(result && global->showerror) {
+    if(!config->synthetic_error && result && global->showerror) {
       fprintf(global->errors, "curl: (%d) %s\n", result,
               (per->errorbuffer[0]) ? per->errorbuffer :
               curl_easy_strerror(result));
       if(result == CURLE_PEER_FAILED_VERIFICATION)
         fputs(CURL_CA_CERT_ERRORMSG, global->errors);
     }
-
+    else if(config->failwithbody) {
+      /* if HTTP response >= 400, return error */
+      long code = 0;
+      curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
+      if(code >= 400) {
+        if(global->showerror)
+          fprintf(global->errors,
+                  "curl: (%d) The requested URL returned error: %ld\n",
+                  CURLE_HTTP_RETURNED_ERROR, code);
+        result = CURLE_HTTP_RETURNED_ERROR;
+      }
+    }
   /* Set file extended attributes */
   if(!result && config->xattr && outs->fopened && outs->stream) {
     int rc = fwrite_xattr(curl, fileno(outs->stream));
     if(rc)
-      warnf(config->global, "Error setting extended attributes: %s\n",
-            strerror(errno));
+      warnf(config->global, "Error setting extended attributes on '%s': %s\n",
+            outs->filename, strerror(errno));
   }
 
   if(!result && !outs->stream && !outs->bytes) {
     /* we have received no data despite the transfer was successful
-       ==> force cration of an empty output file (if an output file
+       ==> force creation of an empty output file (if an output file
        was specified) */
     long cond_unmet = 0L;
     /* do not create (or even overwrite) the file in case we get no
@@ -396,39 +407,11 @@
     if(!result && rc) {
       /* something went wrong in the writing process */
       result = CURLE_WRITE_ERROR;
-      fprintf(global->errors, "(%d) Failed writing body\n", result);
+      if(global->showerror)
+        fprintf(global->errors, "curl: (%d) Failed writing body\n", result);
     }
   }
 
-#ifdef USE_METALINK
-  if(per->metalink && !per->metalink_next_res)
-    fprintf(global->errors, "Metalink: fetching (%s) from (%s) OK\n",
-            per->mlfile->filename, per->this_url);
-
-  if(!per->metalink && config->use_metalink && result == CURLE_OK) {
-    int rv = parse_metalink(config, outs, per->this_url);
-    if(!rv) {
-      fprintf(config->global->errors, "Metalink: parsing (%s) OK\n",
-              per->this_url);
-    }
-    else if(rv == -1)
-      fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n",
-              per->this_url);
-  }
-  else if(per->metalink && result == CURLE_OK && !per->metalink_next_res) {
-    int rv;
-    (void)fflush(outs->stream);
-    rv = metalink_check_hash(global, per->mlfile, outs->filename);
-    if(!rv)
-      per->metalink_next_res = 1;
-  }
-#endif /* USE_METALINK */
-
-#ifdef USE_METALINK
-  if(outs->metalink_parser)
-    metalink_parser_context_delete(outs->metalink_parser);
-#endif /* USE_METALINK */
-
   /* if retry-max-time is non-zero, make sure we haven't exceeded the
      time */
   if(per->retry_numretries &&
@@ -471,6 +454,7 @@
         curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
 
         switch(response) {
+        case 408: /* Request Timeout */
         case 429: /* Too Many Requests (RFC6585) */
         case 500: /* Internal Server Error */
         case 502: /* Bad Gateway */
@@ -546,7 +530,7 @@
       }
       if(outs->bytes && outs->filename && outs->stream) {
         int rc;
-        /* We have written data to a output file, we truncate file
+        /* We have written data to an output file, we truncate file
          */
         if(!global->mute)
           fprintf(global->errors, "Throwing away %"
@@ -558,9 +542,9 @@
         if(ftruncate(fileno(outs->stream), outs->init)) {
           /* when truncate fails, we can't just append as then we'll
              create something strange, bail out */
-          if(!global->mute)
+          if(global->showerror)
             fprintf(global->errors,
-                    "failed to truncate, exiting\n");
+                    "curl: (23) Failed to truncate file\n");
           return CURLE_WRITE_ERROR;
         }
         /* now seek to the end of the file, the position where we
@@ -574,9 +558,9 @@
         rc = fseek(outs->stream, (long)outs->init, SEEK_SET);
 #endif
         if(rc) {
-          if(!global->mute)
+          if(global->showerror)
             fprintf(global->errors,
-                    "failed seeking to end of file, exiting\n");
+                    "curl: (23) Failed seeking to end of file\n");
           return CURLE_WRITE_ERROR;
         }
         outs->bytes = 0; /* clear for next round */
@@ -586,36 +570,6 @@
       return CURLE_OK;
     }
   } /* if retry_numretries */
-  else if(per->metalink) {
-    /* Metalink: Decide to try the next resource or not. Try the next resource
-       if download was not successful. */
-    long response = 0;
-    if(CURLE_OK == result) {
-      /* TODO We want to try next resource when download was
-         not successful. How to know that? */
-      char *effective_url = NULL;
-      curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
-      if(effective_url &&
-         curl_strnequal(effective_url, "http", 4)) {
-        /* This was HTTP(S) */
-        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
-        if(response != 200 && response != 206) {
-          per->metalink_next_res = 1;
-          fprintf(global->errors,
-                  "Metalink: fetching (%s) from (%s) FAILED "
-                  "(HTTP status code %ld)\n",
-                  per->mlfile->filename, per->this_url, response);
-        }
-      }
-    }
-    else {
-      per->metalink_next_res = 1;
-      fprintf(global->errors,
-              "Metalink: fetching (%s) from (%s) FAILED (%s)\n",
-              per->mlfile->filename, per->this_url,
-              curl_easy_strerror(result));
-    }
-  }
 
   if((global->progressmode == CURL_PROGRESS_BAR) &&
      per->progressbar.calls)
@@ -623,16 +577,14 @@
        newline here */
     fputs("\n", per->progressbar.out);
 
-  if(config->writeout)
-    ourWriteOut(per->curl, per, config->writeout);
-
   /* Close the outs file */
   if(outs->fopened && outs->stream) {
     int rc = fclose(outs->stream);
     if(!result && rc) {
       /* something went wrong in the writing process */
       result = CURLE_WRITE_ERROR;
-      fprintf(global->errors, "(%d) Failed writing body\n", result);
+      if(global->showerror)
+        fprintf(global->errors, "curl: (%d) Failed writing body\n", result);
     }
   }
 
@@ -641,9 +593,13 @@
     /* Ask libcurl if we got a remote file time */
     curl_off_t filetime = -1;
     curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
-    setfiletime(filetime, outs->filename, config->global->errors);
+    setfiletime(filetime, outs->filename, global);
   }
 
+  /* Write the --write-out data before cleanup but after result is final */
+  if(config->writeout)
+    ourWriteOut(config->writeout, per, result);
+
   /* Close function-local opened file descriptors */
   if(per->heads.fopened && per->heads.stream)
     fclose(per->heads.stream);
@@ -666,7 +622,7 @@
   free(per->outfile);
   free(per->uploadfile);
 
-  return CURLE_OK;
+  return result;
 }
 
 static void single_transfer_cleanup(struct OperationConfig *config)
@@ -699,7 +655,6 @@
 {
   CURLcode result = CURLE_OK;
   struct getout *urlnode;
-  struct metalinkfile *mlfile_last = NULL;
   bool orig_noprogress = global->noprogress;
   bool orig_isatty = global->isatty;
   struct State *state = &config->state;
@@ -741,24 +696,7 @@
   while(config->state.urlnode) {
     char *infiles; /* might be a glob pattern */
     struct URLGlob *inglob = state->inglob;
-    bool metalink = FALSE; /* metalink download? */
-    struct metalinkfile *mlfile;
-    struct metalink_resource *mlres;
-
     urlnode = config->state.urlnode;
-    if(urlnode->flags & GETOUT_METALINK) {
-      metalink = 1;
-      if(mlfile_last == NULL) {
-        mlfile_last = config->metalinkfile_list;
-      }
-      mlfile = mlfile_last;
-      mlfile_last = mlfile_last->next;
-      mlres = mlfile->resource;
-    }
-    else {
-      mlfile = NULL;
-      mlres = NULL;
-    }
 
     /* urlnode->url is the full URL (it might be NULL) */
 
@@ -820,12 +758,7 @@
       }
 
       if(!state->urlnum) {
-        if(metalink) {
-          /* For Metalink download, we don't use glob. Instead we use
-             the number of resources as urlnum. */
-          urlnum = count_next_metalink_resource(mlfile);
-        }
-        else if(!config->globoff) {
+        if(!config->globoff) {
           /* Unless explicitly shut off, we expand '{...}' and '[...]'
              expressions and return total number of URLs in pattern set */
           result = glob_url(&state->urls, urlnode->url, &state->urlnum,
@@ -869,6 +802,7 @@
         *added = TRUE;
         per->config = config;
         per->curl = curl;
+        per->urlnum = urlnode->num;
 
         /* default headers output stream is stdout */
         heads = &per->heads;
@@ -881,7 +815,7 @@
             FILE *newfile;
             newfile = fopen(config->headerfile, per->prev == NULL?"wb":"ab");
             if(!newfile) {
-              warnf(config->global, "Failed to open %s\n", config->headerfile);
+              warnf(global, "Failed to open %s\n", config->headerfile);
               result = CURLE_WRITE_ERROR;
               break;
             }
@@ -918,7 +852,7 @@
           /* open file for reading: */
           FILE *file = fopen(config->etag_compare_file, FOPEN_READTEXT);
           if(!file && !config->etag_save_file) {
-            errorf(config->global,
+            errorf(global,
                    "Failed to open %s\n", config->etag_compare_file);
             result = CURLE_READ_ERROR;
             break;
@@ -935,7 +869,7 @@
           if(!header) {
             if(file)
               fclose(file);
-            errorf(config->global,
+            errorf(global,
                    "Failed to allocate memory for custom etag header\n");
             result = CURLE_OUT_OF_MEMORY;
             break;
@@ -961,7 +895,7 @@
             FILE *newfile = fopen(config->etag_save_file, "wb");
             if(!newfile) {
               warnf(
-                config->global,
+                global,
                 "Failed to open %s\n", config->etag_save_file);
 
               result = CURLE_WRITE_ERROR;
@@ -980,51 +914,33 @@
           }
         }
 
-        if(metalink) {
-          /* For Metalink download, use name in Metalink file as
-             filename. */
-          per->outfile = strdup(mlfile->filename);
-          if(!per->outfile) {
-            result = CURLE_OUT_OF_MEMORY;
+        if(state->urls) {
+          result = glob_next_url(&per->this_url, state->urls);
+          if(result)
             break;
-          }
-          per->this_url = strdup(mlres->url);
+        }
+        else if(!state->li) {
+          per->this_url = strdup(urlnode->url);
           if(!per->this_url) {
             result = CURLE_OUT_OF_MEMORY;
             break;
           }
-          per->mlfile = mlfile;
         }
-        else {
-          if(state->urls) {
-            result = glob_next_url(&per->this_url, state->urls);
-            if(result)
-              break;
-          }
-          else if(!state->li) {
-            per->this_url = strdup(urlnode->url);
-            if(!per->this_url) {
-              result = CURLE_OUT_OF_MEMORY;
-              break;
-            }
-          }
-          else
-            per->this_url = NULL;
-          if(!per->this_url)
-            break;
+        else
+          per->this_url = NULL;
+        if(!per->this_url)
+          break;
 
-          if(state->outfiles) {
-            per->outfile = strdup(state->outfiles);
-            if(!per->outfile) {
-              result = CURLE_OUT_OF_MEMORY;
-              break;
-            }
+        if(state->outfiles) {
+          per->outfile = strdup(state->outfiles);
+          if(!per->outfile) {
+            result = CURLE_OUT_OF_MEMORY;
+            break;
           }
         }
 
         if(((urlnode->flags&GETOUT_USEREMOTE) ||
-            (per->outfile && strcmp("-", per->outfile))) &&
-           (metalink || !config->use_metalink)) {
+            (per->outfile && strcmp("-", per->outfile)))) {
 
           /*
            * We have specified a file name to store the result in, or we have
@@ -1049,12 +965,12 @@
             Curl_safefree(storefile);
             if(result) {
               /* bad globbing */
-              warnf(config->global, "bad output glob!\n");
+              warnf(global, "bad output glob!\n");
               break;
             }
           }
 
-          if(config->output_dir) {
+          if(config->output_dir && *config->output_dir) {
             char *d = aprintf("%s/%s", config->output_dir, per->outfile);
             if(!d) {
               result = CURLE_WRITE_ERROR;
@@ -1066,7 +982,7 @@
           /* Create the directory hierarchy, if not pre-existent to a multiple
              file output call */
 
-          if(config->create_dirs || metalink) {
+          if(config->create_dirs) {
             result = create_dir_hierarchy(per->outfile, global->errors);
             /* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */
             if(result)
@@ -1149,7 +1065,7 @@
            * we should warn him/her.
            */
           if(config->proxyanyauth || (authbits>1)) {
-            warnf(config->global,
+            warnf(global,
                   "Using --anyauth or --proxy-anyauth with upload from stdin"
                   " involves a big risk of it not working. Use a temporary"
                   " file or a fixed auth type instead!\n");
@@ -1161,7 +1077,7 @@
           set_binmode(stdin);
           if(!strcmp(per->uploadfile, ".")) {
             if(curlx_nonblock((curl_socket_t)per->infd, TRUE) < 0)
-              warnf(config->global,
+              warnf(global,
                     "fcntl failed on fd=%d: %s\n", per->infd, strerror(errno));
           }
         }
@@ -1258,23 +1174,16 @@
         my_setopt(curl, CURLOPT_WRITEDATA, per);
         my_setopt(curl, CURLOPT_INTERLEAVEDATA, per);
 
-        if(metalink || !config->use_metalink)
-          /* what call to write */
-          my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb);
-#ifdef USE_METALINK
-        else
-          /* Set Metalink specific write callback function to parse
-             XML data progressively. */
-          my_setopt(curl, CURLOPT_WRITEFUNCTION, metalink_write_cb);
-#endif /* USE_METALINK */
+        /* what call to write */
+        my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb);
 
         /* for uploads */
         input->config = config;
         /* Note that if CURLOPT_READFUNCTION is fread (the default), then
          * lib/telnet.c will Curl_poll() on the input file descriptor
-         * rather then calling the READFUNCTION at regular intervals.
+         * rather than calling the READFUNCTION at regular intervals.
          * The circumstances in which it is preferable to enable this
-         * behaviour, by omitting to set the READFUNCTION & READDATA options,
+         * behavior, by omitting to set the READFUNCTION & READDATA options,
          * have not been determined.
          */
         my_setopt(curl, CURLOPT_READDATA, input);
@@ -1443,6 +1352,10 @@
           /* new in libcurl 7.64.0 */
           my_setopt(curl, CURLOPT_HTTP09_ALLOWED,
                     config->http09_allowed ? 1L : 0L);
+          if(result) {
+            errorf(global, "HTTP/0.9 is not supported in this build!\n");
+            return result;
+          }
 
         } /* (built_in_protos & CURLPROTO_HTTP) */
 
@@ -1489,7 +1402,7 @@
         if(config->capath) {
           result = res_setopt_str(curl, CURLOPT_CAPATH, config->capath);
           if(result == CURLE_NOT_BUILT_IN) {
-            warnf(config->global, "ignoring %s, not supported by libcurl\n",
+            warnf(global, "ignoring %s, not supported by libcurl\n",
                   capath_from_env?
                   "SSL_CERT_DIR environment variable":"--capath");
           }
@@ -1506,7 +1419,7 @@
                                    config->capath));
           if(result == CURLE_NOT_BUILT_IN) {
             if(config->proxy_capath) {
-              warnf(config->global,
+              warnf(global,
                     "ignoring --proxy-capath, not supported by libcurl\n");
             }
           }
@@ -1570,7 +1483,7 @@
 
           /* In debug build of curl tool, using
            *    --cert loadmem=<filename>:<password> --cert-type p12
-           *  must do the same thing than classic:
+           *  must do the same thing as classic:
            *    --cert <filename>:<password> --cert-type p12
            *  but is designed to test blob */
 #if defined(CURLDEBUG) || defined(DEBUGBUILD)
@@ -1657,6 +1570,8 @@
           my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
           my_setopt_str(curl, CURLOPT_PROXY_SSLKEYTYPE,
                         config->proxy_key_type);
+          my_setopt_str(curl, CURLOPT_AWS_SIGV4,
+                        config->aws_sigv4);
 
           if(config->insecure_ok) {
             my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
@@ -1667,6 +1582,12 @@
             /* libcurl default is strict verifyhost -> 2L   */
             /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */
           }
+
+          if(config->doh_insecure_ok) {
+            my_setopt(curl, CURLOPT_DOH_SSL_VERIFYPEER, 0L);
+            my_setopt(curl, CURLOPT_DOH_SSL_VERIFYHOST, 0L);
+          }
+
           if(config->proxy_insecure_ok) {
             my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 0L);
             my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 0L);
@@ -1678,6 +1599,9 @@
           if(config->verifystatus)
             my_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
 
+          if(config->doh_verifystatus)
+            my_setopt(curl, CURLOPT_DOH_SSL_VERIFYSTATUS, 1L);
+
           if(config->falsestart)
             my_setopt(curl, CURLOPT_SSL_FALSESTART, 1L);
 
@@ -1688,49 +1612,55 @@
 
           {
             long mask =
-              (config->ssl_allow_beast ? CURLSSLOPT_ALLOW_BEAST : 0) |
+              (config->ssl_allow_beast ?
+               CURLSSLOPT_ALLOW_BEAST : 0) |
+              (config->ssl_no_revoke ?
+               CURLSSLOPT_NO_REVOKE : 0) |
               (config->ssl_revoke_best_effort ?
                CURLSSLOPT_REVOKE_BEST_EFFORT : 0) |
               (config->native_ca_store ?
                CURLSSLOPT_NATIVE_CA : 0) |
-              (config->ssl_no_revoke ? CURLSSLOPT_NO_REVOKE : 0);
+              (config->ssl_auto_client_cert ?
+               CURLSSLOPT_AUTO_CLIENT_CERT : 0);
 
             if(mask)
               my_setopt_bitmask(curl, CURLOPT_SSL_OPTIONS, mask);
           }
 
-          if(config->proxy_ssl_allow_beast)
-            my_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
-                      (long)CURLSSLOPT_ALLOW_BEAST);
+          {
+            long mask =
+              (config->proxy_ssl_allow_beast ?
+               CURLSSLOPT_ALLOW_BEAST : 0) |
+              (config->proxy_ssl_auto_client_cert ?
+               CURLSSLOPT_AUTO_CLIENT_CERT : 0);
+
+            if(mask)
+              my_setopt_bitmask(curl, CURLOPT_PROXY_SSL_OPTIONS, mask);
+          }
         }
 
         if(config->path_as_is)
           my_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
 
-        if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) {
-          if(!config->insecure_ok) {
-            char *home;
-            char *file;
-            result = CURLE_FAILED_INIT;
-            home = homedir(NULL);
-            if(home) {
-              file = aprintf("%s/.ssh/known_hosts", home);
-              if(file) {
-                /* new in curl 7.19.6 */
-                result = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
-                curl_free(file);
-                if(result == CURLE_UNKNOWN_OPTION)
-                  /* libssh2 version older than 1.1.1 */
-                  result = CURLE_OK;
-              }
-              Curl_safefree(home);
+        if((built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) &&
+           !config->insecure_ok) {
+          char *home = homedir(NULL);
+          if(home) {
+            char *file = aprintf("%s/.ssh/known_hosts", home);
+            if(file) {
+              /* new in curl 7.19.6 */
+              result = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
+              curl_free(file);
+              if(result == CURLE_UNKNOWN_OPTION)
+                /* libssh2 version older than 1.1.1 */
+                result = CURLE_OK;
             }
-            else {
-              errorf(global, "Failed to figure out user's home dir!");
-            }
+            Curl_safefree(home);
             if(result)
               break;
           }
+          else
+            warnf(global, "No home dir, couldn't find known_hosts file!");
         }
 
         if(config->no_body || config->remote_time) {
@@ -1743,11 +1673,35 @@
         my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote);
         my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote);
 
-        if(config->cookie)
-          my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
+        if(config->cookies) {
+          struct curlx_dynbuf cookies;
+          struct curl_slist *cl;
+          CURLcode ret;
 
-        if(config->cookiefile)
-          my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
+          /* The maximum size needs to match MAX_NAME in cookie.h */
+          curlx_dyn_init(&cookies, 4096);
+          for(cl = config->cookies; cl; cl = cl->next) {
+            if(cl == config->cookies)
+              ret = curlx_dyn_addf(&cookies, "%s", cl->data);
+            else
+              ret = curlx_dyn_addf(&cookies, ";%s", cl->data);
+
+            if(ret) {
+              result = CURLE_OUT_OF_MEMORY;
+              break;
+            }
+          }
+
+          my_setopt_str(curl, CURLOPT_COOKIE, curlx_dyn_ptr(&cookies));
+          curlx_dyn_free(&cookies);
+        }
+
+        if(config->cookiefiles) {
+          struct curl_slist *cfl;
+
+          for(cfl = config->cookiefiles; cfl; cfl = cfl->next)
+            my_setopt_str(curl, CURLOPT_COOKIEFILE, cfl->data);
+        }
 
         /* new in libcurl 7.9 */
         if(config->cookiejar)
@@ -1928,7 +1882,7 @@
         /* curl 7.17.1 */
         if(!config->nokeepalive) {
           my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
-          if(config->alivetime != 0) {
+          if(config->alivetime) {
             my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime);
             my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime);
           }
@@ -1954,6 +1908,9 @@
         if(config->ftp_pret)
           my_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
 
+        if(config->create_file_mode)
+          my_setopt(curl, CURLOPT_NEW_FILE_PERMS, config->create_file_mode);
+
         if(config->proto_present)
           my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto);
         if(config->proto_redir_present)
@@ -2068,23 +2025,9 @@
         if(config->altsvc)
           my_setopt_str(curl, CURLOPT_ALTSVC, config->altsvc);
 
-#ifdef USE_METALINK
-        if(!metalink && config->use_metalink) {
-          outs->metalink_parser = metalink_parser_context_new();
-          if(outs->metalink_parser == NULL) {
-            result = CURLE_OUT_OF_MEMORY;
-            break;
-          }
-          fprintf(config->global->errors,
-                  "Metalink: parsing (%s) metalink/XML...\n", per->this_url);
-        }
-        else if(metalink)
-          fprintf(config->global->errors,
-                  "Metalink: fetching (%s) from (%s)...\n",
-                  mlfile->filename, per->this_url);
-#endif /* USE_METALINK */
+        if(config->hsts)
+          my_setopt_str(curl, CURLOPT_HSTS, config->hsts);
 
-        per->metalink = metalink;
         /* initialize retry vars for loop below */
         per->retry_sleep_default = (config->retry_delay) ?
           config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */
@@ -2105,7 +2048,7 @@
       }
       else {
         /* Free this URL node data without destroying the
-           the node itself nor modifying next pointer. */
+           node itself nor modifying next pointer. */
         Curl_safefree(urlnode->outfile);
         Curl_safefree(urlnode->infile);
         urlnode->flags = 0;
@@ -2171,7 +2114,7 @@
 
     result = pre_transfer(global, per);
     if(result)
-      break;
+      return result;
 
     /* parallel connect means that we don't set PIPEWAIT since pipewait
        will make libcurl prefer multiplexing */
@@ -2237,11 +2180,11 @@
           long delay;
           struct per_transfer *ended;
           CURL *easy = msg->easy_handle;
-          result = msg->data.result;
+          CURLcode tres = msg->data.result;
           curl_easy_getinfo(easy, CURLINFO_PRIVATE, (void *)&ended);
           curl_multi_remove_handle(multi, easy);
 
-          result = post_per_transfer(global, ended, result, &retry, &delay);
+          tres = post_per_transfer(global, ended, tres, &retry, &delay);
           progress_finalize(ended); /* before it goes away */
           all_added--; /* one fewer added */
           checkmore = TRUE;
@@ -2250,8 +2193,11 @@
             /* we delay retries in full integer seconds only */
             ended->startat = delay ? time(NULL) + delay/1000 : 0;
           }
-          else
+          else {
+            if(tres)
+              result = tres;
             (void)del_per_transfer(ended);
+          }
         }
       } while(msg);
       if(!checkmore) {
@@ -2263,9 +2209,11 @@
       }
       if(checkmore) {
         /* one or more transfers completed, add more! */
-        (void)add_parallel_transfers(global, multi, share,
-                                     &more_transfers,
-                                     &added_transfers);
+        CURLcode tres = add_parallel_transfers(global, multi, share,
+                                               &more_transfers,
+                                               &added_transfers);
+        if(tres)
+          result = tres;
         if(added_transfers)
           /* we added new ones, make sure the loop doesn't exit yet */
           still_running = 1;
@@ -2321,18 +2269,14 @@
 #endif
       result = curl_easy_perform(per->curl);
 
-    /* store the result of the actual transfer */
-    returncode = result;
-
-    result = post_per_transfer(global, per, result, &retry, &delay);
+    returncode = post_per_transfer(global, per, result, &retry, &delay);
     if(retry) {
       tool_go_sleep(delay);
       continue;
     }
 
     /* Bail out upon critical errors or --fail-early */
-    if(result || is_fatal_error(returncode) ||
-       (returncode && global->fail_early))
+    if(is_fatal_error(returncode) || (returncode && global->fail_early))
       bailout = TRUE;
     else {
       /* setup the next one just before we delete this */
@@ -2341,9 +2285,6 @@
         bailout = TRUE;
     }
 
-    /* Release metalink related resources here */
-    delete_metalinkfile(per->mlfile);
-
     per = del_per_transfer(per);
 
     if(bailout)
@@ -2387,7 +2328,7 @@
   capath_from_env = false;
   if(!config->cacert &&
      !config->capath &&
-     !config->insecure_ok) {
+     (!config->insecure_ok || (config->doh_url && !config->doh_insecure_ok))) {
     CURL *curltls = curl_easy_init();
     struct curl_tlssessioninfo *tls_backend_info = NULL;
 
@@ -2512,8 +2453,6 @@
     /* Free list of given URLs */
     clean_getout(per->config);
 
-    /* Release metalink related resources here */
-    clean_metalink(per->config);
     per = del_per_transfer(per);
   }
 
@@ -2528,7 +2467,7 @@
 CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
 {
   CURLcode result = CURLE_OK;
-  char *first_arg = curlx_convert_tchar_to_UTF8(argv[1]);
+  char *first_arg = argc > 1 ? curlx_convert_tchar_to_UTF8(argv[1]) : NULL;
 
   /* Setup proper locale from environment */
 #ifdef HAVE_SETLOCALE
@@ -2537,7 +2476,7 @@
 
   /* Parse .curlrc if necessary */
   if((argc == 1) ||
-     (!curl_strequal(first_arg, "-q") &&
+     (first_arg && strncmp(first_arg, "-q", 2) &&
       !curl_strequal(first_arg, "--disable"))) {
     parseconfig(NULL, global); /* ignore possible failure */
 
diff --git a/src/tool_operate.h b/src/tool_operate.h
index 6cb3bd0..282b785 100644
--- a/src/tool_operate.h
+++ b/src/tool_operate.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,11 +36,8 @@
   long retry_sleep_default;
   long retry_sleep;
   struct timeval retrystart;
-  bool metalink; /* nonzero for metalink download. */
-  bool metalink_next_res;
-  struct metalinkfile *mlfile;
-  struct metalink_resource *mlres;
   char *this_url;
+  unsigned int urlnum; /* the index of the given URL */
   char *outfile;
   bool infdopen; /* TRUE if infd needs closing */
   int infd;
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
index 05c9d86..0a209bf 100644
--- a/src/tool_operhlp.c
+++ b/src/tool_operhlp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,6 @@
 #include "tool_convert.h"
 #include "tool_doswin.h"
 #include "tool_operhlp.h"
-#include "tool_metalink.h"
 
 #include "memdebug.h" /* keep this as LAST include */
 
diff --git a/src/tool_operhlp.h b/src/tool_operhlp.h
index 1e2f027..482f6e5 100644
--- a/src/tool_operhlp.h
+++ b/src/tool_operhlp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_panykey.c b/src/tool_panykey.c
index e7ee995..e570ca1 100644
--- a/src/tool_panykey.c
+++ b/src/tool_panykey.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_panykey.h b/src/tool_panykey.h
index 2e8846c..e1fb1ee 100644
--- a/src/tool_panykey.h
+++ b/src/tool_panykey.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 03cd44f..28a8754 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -43,6 +43,8 @@
   struct getout *node = calloc(1, sizeof(struct getout));
   struct getout *last = config->url_last;
   if(node) {
+    static int outnum = 0;
+
     /* append this new node last in the list */
     if(last)
       last->next = node;
@@ -53,6 +55,7 @@
     config->url_last = node;
 
     node->flags = config->default_node_flags;
+    node->num = outnum++;
   }
   return node;
 }
@@ -129,14 +132,13 @@
  * getparameter a lot, we must check it for NULL before accessing the str
  * data.
  */
-
-ParameterError str2num(long *val, const char *str)
+static ParameterError getnum(long *val, const char *str, int base)
 {
   if(str) {
     char *endptr = NULL;
     long num;
     errno = 0;
-    num = strtol(str, &endptr, 10);
+    num = strtol(str, &endptr, base);
     if(errno == ERANGE)
       return PARAM_NUMBER_TOO_LARGE;
     if((endptr != str) && (endptr == str + strlen(str))) {
@@ -147,6 +149,24 @@
   return PARAM_BAD_NUMERIC; /* badness */
 }
 
+ParameterError str2num(long *val, const char *str)
+{
+  return getnum(val, str, 10);
+}
+
+ParameterError oct2nummax(long *val, const char *str, long max)
+{
+  ParameterError result = getnum(val, str, 8);
+  if(result != PARAM_OK)
+    return result;
+  else if(*val > max)
+    return PARAM_NUMBER_TOO_LARGE;
+  else if(*val < 0)
+    return PARAM_NEGATIVE_NUMERIC;
+
+  return PARAM_OK;
+}
+
 /*
  * Parse the string and write the long in the given address. Return PARAM_OK
  * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
@@ -158,7 +178,7 @@
 
 ParameterError str2unum(long *val, const char *str)
 {
-  ParameterError result = str2num(val, str);
+  ParameterError result = getnum(val, str, 10);
   if(result != PARAM_OK)
     return result;
   if(*val < 0)
diff --git a/src/tool_paramhlp.h b/src/tool_paramhlp.h
index d925b84..32b0fc4 100644
--- a/src/tool_paramhlp.h
+++ b/src/tool_paramhlp.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,6 +33,7 @@
 
 ParameterError str2num(long *val, const char *str);
 ParameterError str2unum(long *val, const char *str);
+ParameterError oct2nummax(long *val, const char *str, long max);
 ParameterError str2unummax(long *val, const char *str, long max);
 ParameterError str2udouble(double *val, const char *str, long max);
 
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index abd493a..d26774f 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_parsecfg.h b/src/tool_parsecfg.h
index 49919a7..5748c87 100644
--- a/src/tool_parsecfg.h
+++ b/src/tool_parsecfg.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_progress.c b/src/tool_progress.c
index 31cd56a..da6c2bc 100644
--- a/src/tool_progress.c
+++ b/src/tool_progress.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -51,7 +51,7 @@
               CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
               (bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
 
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
+#if (SIZEOF_CURL_OFF_T > 4)
 
   else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
     /* 'XXXXM' is good until we're at 10000MB or above */
@@ -227,11 +227,11 @@
     }
     if(dlknown && all_dltotal)
       /* TODO: handle integer overflow */
-      msnprintf(dlpercen, sizeof(dlpercen), "%3d",
+      msnprintf(dlpercen, sizeof(dlpercen), "%3" CURL_FORMAT_CURL_OFF_T,
                 all_dlnow * 100 / all_dltotal);
     if(ulknown && all_ultotal)
       /* TODO: handle integer overflow */
-      msnprintf(ulpercen, sizeof(ulpercen), "%3d",
+      msnprintf(ulpercen, sizeof(ulpercen), "%3" CURL_FORMAT_CURL_OFF_T,
                 all_ulnow * 100 / all_ultotal);
 
     /* get the transfer speed, the higher of the two */
@@ -318,4 +318,12 @@
   /* get the numbers before this transfer goes away */
   all_dlalready += per->dlnow;
   all_ulalready += per->ulnow;
+  if(!per->dltotal_added) {
+    all_dltotal += per->dltotal;
+    per->dltotal_added = TRUE;
+  }
+  if(!per->ultotal_added) {
+    all_ultotal += per->ultotal;
+    per->ultotal_added = TRUE;
+  }
 }
diff --git a/src/tool_progress.h b/src/tool_progress.h
index 34b6098..da9bded 100644
--- a/src/tool_progress.h
+++ b/src/tool_progress.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_sdecls.h b/src/tool_sdecls.h
index ccc9f5a..543a953 100644
--- a/src/tool_sdecls.h
+++ b/src/tool_sdecls.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -22,9 +22,6 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
-#ifdef USE_METALINK
-#  include <metalink/metalink.h>
-#endif /* USE_METALINK */
 
 /*
  * OutStruct variables keep track of information relative to curl's
@@ -58,8 +55,6 @@
  * 'init' member holds original file size or offset at which truncation is
  * taking place. Always zero unless appending to a non-empty regular file.
  *
- * 'metalink_parser' member is a pointer to Metalink XML parser
- * context.
  */
 
 struct OutStruct {
@@ -71,9 +66,6 @@
   FILE *stream;
   curl_off_t bytes;
   curl_off_t init;
-#ifdef USE_METALINK
-  metalink_parser_context_t *metalink_parser;
-#endif /* USE_METALINK */
 };
 
 
@@ -105,6 +97,7 @@
   char          *outfile;   /* where to store the output */
   char          *infile;    /* file to upload, if GETOUT_UPLOAD is set */
   int            flags;     /* options - composed of GETOUT_* bits */
+  int            num;       /* which URL number in an invocation */
 };
 
 #define GETOUT_OUTFILE    (1<<0)  /* set when outfile is deemed done */
@@ -112,7 +105,6 @@
 #define GETOUT_USEREMOTE  (1<<2)  /* use remote file name locally */
 #define GETOUT_UPLOAD     (1<<3)  /* if set, -T has been used */
 #define GETOUT_NOUPLOAD   (1<<4)  /* if set, -T "" has been used */
-#define GETOUT_METALINK   (1<<5)  /* set when Metalink download */
 
 /*
  * 'trace' enumeration represents curl's output look'n feel possibilities.
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
index 0dd7a57..4c86eb3 100644
--- a/src/tool_setopt.c
+++ b/src/tool_setopt.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,6 +31,7 @@
 #include "tool_easysrc.h"
 #include "tool_setopt.h"
 #include "tool_convert.h"
+#include "tool_msgs.h"
 
 #include "memdebug.h" /* keep this as LAST include */
 
@@ -62,6 +63,11 @@
   NVEND,
 };
 
+const struct NameValueUnsigned setopt_nv_CURLHSTS[] = {
+  NV(CURLHSTS_ENABLE),
+  NVEND,
+};
+
 const struct NameValueUnsigned setopt_nv_CURLAUTH[] = {
   NV(CURLAUTH_ANY),             /* combination */
   NV(CURLAUTH_ANYSAFE),         /* combination */
@@ -127,6 +133,7 @@
   NV(CURLSSLOPT_NO_PARTIALCHAIN),
   NV(CURLSSLOPT_REVOKE_BEST_EFFORT),
   NV(CURLSSLOPT_NATIVE_CA),
+  NV(CURLSSLOPT_AUTO_CLIENT_CERT),
   NVEND,
 };
 
@@ -310,7 +317,11 @@
     }
   }
 
- nomem:
+#ifdef DEBUGBUILD
+  if(ret)
+    warnf(config, "option %s returned error (%d)\n", name, (int)ret);
+#endif
+  nomem:
   return ret;
 }
 
diff --git a/src/tool_setopt.h b/src/tool_setopt.h
index 3db88c6..da44298 100644
--- a/src/tool_setopt.h
+++ b/src/tool_setopt.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -64,8 +64,10 @@
 extern const struct NameValue setopt_nv_CURL_NETRC[];
 extern const struct NameValue setopt_nv_CURLPROTO[];
 extern const struct NameValueUnsigned setopt_nv_CURLAUTH[];
+extern const struct NameValueUnsigned setopt_nv_CURLHSTS[];
 
 /* Map options to NameValue sets */
+#define setopt_nv_CURLOPT_HSTS_CTRL setopt_nv_CURLHSTS
 #define setopt_nv_CURLOPT_HTTP_VERSION setopt_nv_CURL_HTTP_VERSION
 #define setopt_nv_CURLOPT_HTTPAUTH setopt_nv_CURLAUTH
 #define setopt_nv_CURLOPT_SSLVERSION setopt_nv_CURL_SSLVERSION
@@ -74,6 +76,7 @@
 #define setopt_nv_CURLOPT_FTP_SSL_CCC setopt_nv_CURLFTPSSL_CCC
 #define setopt_nv_CURLOPT_USE_SSL setopt_nv_CURLUSESSL
 #define setopt_nv_CURLOPT_SSL_OPTIONS setopt_nv_CURLSSLOPT
+#define setopt_nv_CURLOPT_PROXY_SSL_OPTIONS setopt_nv_CURLSSLOPT
 #define setopt_nv_CURLOPT_NETRC setopt_nv_CURL_NETRC
 #define setopt_nv_CURLOPT_PROTOCOLS setopt_nv_CURLPROTO
 #define setopt_nv_CURLOPT_REDIR_PROTOCOLS setopt_nv_CURLPROTO
diff --git a/src/tool_setup.h b/src/tool_setup.h
index 60a7ccd..d8786ec 100644
--- a/src/tool_setup.h
+++ b/src/tool_setup.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_sleep.c b/src/tool_sleep.c
index 0fd74a6..c9ed5a3 100644
--- a/src/tool_sleep.c
+++ b/src/tool_sleep.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_sleep.h b/src/tool_sleep.h
index 59be6aa..ac51941 100644
--- a/src/tool_sleep.h
+++ b/src/tool_sleep.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_strdup.c b/src/tool_strdup.c
index c8e938d..83fbc72 100644
--- a/src/tool_strdup.c
+++ b/src/tool_strdup.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_strdup.h b/src/tool_strdup.h
index e30e403..82ef0eb 100644
--- a/src/tool_strdup.h
+++ b/src/tool_strdup.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index 23238b1..df882b2 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -472,7 +472,7 @@
       if(glob_expand->pos) {
         msnprintf(text, sizeof(text), "%s in URL position %zu:\n%s\n%*s^",
                   glob_expand->error,
-                  glob_expand->pos, url, glob_expand->pos - 1, " ");
+                  glob_expand->pos, url, (int)glob_expand->pos - 1, " ");
         t = text;
       }
       else
diff --git a/src/tool_urlglob.h b/src/tool_urlglob.h
index 5ed7667..687f57c 100644
--- a/src/tool_urlglob.h
+++ b/src/tool_urlglob.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_util.c b/src/tool_util.c
index de98b82..a7535db 100644
--- a/src/tool_util.c
+++ b/src/tool_util.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_util.h b/src/tool_util.h
index 8e4a3f4..4cc0b16 100644
--- a/src/tool_util.h
+++ b/src/tool_util.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_version.h b/src/tool_version.h
index 54f821b..e16b3fb 100644
--- a/src/tool_version.h
+++ b/src/tool_version.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -25,7 +25,7 @@
 
 #define CURL_NAME "curl"
 #define CURL_COPYRIGHT LIBCURL_COPYRIGHT
-#define CURL_VERSION "7.73.0"
+#define CURL_VERSION "7.78.0"
 #define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
 #define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
 #define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
diff --git a/src/tool_vms.c b/src/tool_vms.c
index 7871b20..e250b7a 100644
--- a/src/tool_vms.c
+++ b/src/tool_vms.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,7 +41,7 @@
 
 static int vms_shell = -1;
 
-/* VMS has a DCL shell and and also has Unix shells ported to it.
+/* VMS has a DCL shell and also has Unix shells ported to it.
  * When curl is running under a Unix shell, we want it to be as much
  * like Unix as possible.
  */
@@ -56,7 +56,7 @@
   shell = getenv("SHELL");
 
   /* No shell, means DCL */
-  if(shell == NULL) {
+  if(!shell) {
     vms_shell = 1;
     return 1;
   }
diff --git a/src/tool_vms.h b/src/tool_vms.h
index 1359369..34ac238 100644
--- a/src/tool_vms.h
+++ b/src/tool_vms.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/src/tool_writeout.c b/src/tool_writeout.c
index 393e168..ed7a341 100644
--- a/src/tool_writeout.c
+++ b/src/tool_writeout.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -29,92 +29,293 @@
 
 #include "memdebug.h" /* keep this as LAST include */
 
-static const struct writeoutvar variables[] = {
-  {"url_effective", VAR_EFFECTIVE_URL, 0,
-   CURLINFO_EFFECTIVE_URL, JSON_STRING},
-  {"method", VAR_EFFECTIVE_METHOD, 0,
-   CURLINFO_EFFECTIVE_METHOD, JSON_STRING},
-  {"http_code", VAR_HTTP_CODE, 0,
-   CURLINFO_RESPONSE_CODE, JSON_LONG},
-  {"response_code", VAR_HTTP_CODE, 0,
-   CURLINFO_RESPONSE_CODE, JSON_LONG},
-  {"num_headers", VAR_NUM_HEADERS, 0,
-   0, JSON_LONG},
-  {"http_connect", VAR_HTTP_CODE_PROXY, 0,
-   CURLINFO_HTTP_CONNECTCODE, JSON_LONG},
-  {"time_total", VAR_TOTAL_TIME, 0,
-   CURLINFO_TOTAL_TIME_T, JSON_TIME},
-  {"time_namelookup", VAR_NAMELOOKUP_TIME, 0,
-   CURLINFO_NAMELOOKUP_TIME_T, JSON_TIME},
-  {"time_connect", VAR_CONNECT_TIME, 0,
-   CURLINFO_CONNECT_TIME_T, JSON_TIME},
-  {"time_appconnect", VAR_APPCONNECT_TIME, 0,
-   CURLINFO_APPCONNECT_TIME_T, JSON_TIME},
-  {"time_pretransfer", VAR_PRETRANSFER_TIME, 0,
-   CURLINFO_PRETRANSFER_TIME_T, JSON_TIME},
-  {"time_starttransfer", VAR_STARTTRANSFER_TIME, 0,
-   CURLINFO_STARTTRANSFER_TIME_T, JSON_TIME},
-  {"size_header", VAR_HEADER_SIZE, 0,
-   CURLINFO_HEADER_SIZE, JSON_LONG},
-  {"size_request", VAR_REQUEST_SIZE, 0,
-   CURLINFO_REQUEST_SIZE, JSON_LONG},
-  {"size_download", VAR_SIZE_DOWNLOAD, 0,
-   CURLINFO_SIZE_DOWNLOAD_T, JSON_OFFSET},
-  {"size_upload", VAR_SIZE_UPLOAD, 0,
-   CURLINFO_SIZE_UPLOAD_T, JSON_OFFSET},
-  {"speed_download", VAR_SPEED_DOWNLOAD, 0,
-   CURLINFO_SPEED_DOWNLOAD_T, JSON_OFFSET},
-  {"speed_upload", VAR_SPEED_UPLOAD, 0,
-   CURLINFO_SPEED_UPLOAD_T, JSON_OFFSET},
-  {"content_type", VAR_CONTENT_TYPE, 0,
-   CURLINFO_CONTENT_TYPE, JSON_STRING},
-  {"num_connects", VAR_NUM_CONNECTS, 0,
-   CURLINFO_NUM_CONNECTS, JSON_LONG},
-  {"time_redirect", VAR_REDIRECT_TIME, 0,
-   CURLINFO_REDIRECT_TIME_T, JSON_TIME},
-  {"num_redirects", VAR_REDIRECT_COUNT, 0,
-   CURLINFO_REDIRECT_COUNT, JSON_LONG},
-  {"ftp_entry_path", VAR_FTP_ENTRY_PATH, 0,
-   CURLINFO_FTP_ENTRY_PATH, JSON_STRING},
-  {"redirect_url", VAR_REDIRECT_URL, 0,
-   CURLINFO_REDIRECT_URL, JSON_STRING},
-  {"ssl_verify_result", VAR_SSL_VERIFY_RESULT, 0,
-   CURLINFO_SSL_VERIFYRESULT, JSON_LONG},
-  {"proxy_ssl_verify_result", VAR_PROXY_SSL_VERIFY_RESULT, 0,
-   CURLINFO_PROXY_SSL_VERIFYRESULT, JSON_LONG},
-  {"filename_effective", VAR_EFFECTIVE_FILENAME, 0,
-   0, JSON_FILENAME},
-  {"remote_ip", VAR_PRIMARY_IP, 0,
-   CURLINFO_PRIMARY_IP, JSON_STRING},
-  {"remote_port", VAR_PRIMARY_PORT, 0,
-   CURLINFO_PRIMARY_PORT, JSON_LONG},
-  {"local_ip", VAR_LOCAL_IP, 0,
-   CURLINFO_LOCAL_IP, JSON_STRING},
-  {"local_port", VAR_LOCAL_PORT, 0,
-   CURLINFO_LOCAL_PORT, JSON_LONG},
-  {"http_version", VAR_HTTP_VERSION, 0,
-   CURLINFO_HTTP_VERSION, JSON_VERSION},
-  {"scheme", VAR_SCHEME, 0,
-   CURLINFO_SCHEME, JSON_STRING},
-  {"stdout", VAR_STDOUT, 1,
-   0, JSON_NONE},
-  {"stderr", VAR_STDERR, 1,
-   0, JSON_NONE},
-  {"json", VAR_JSON, 1,
-   0, JSON_NONE},
-  {NULL, VAR_NONE, 1,
-   0, JSON_NONE}
+static int writeTime(FILE *stream, const struct writeoutvar *wovar,
+                     struct per_transfer *per, CURLcode per_result,
+                     bool use_json);
+
+static int writeString(FILE *stream, const struct writeoutvar *wovar,
+                       struct per_transfer *per, CURLcode per_result,
+                       bool use_json);
+
+static int writeLong(FILE *stream, const struct writeoutvar *wovar,
+                     struct per_transfer *per, CURLcode per_result,
+                     bool use_json);
+
+static int writeOffset(FILE *stream, const struct writeoutvar *wovar,
+                       struct per_transfer *per, CURLcode per_result,
+                       bool use_json);
+
+static const char *http_version[] = {
+  "0",   /* CURL_HTTP_VERSION_NONE */
+  "1",   /* CURL_HTTP_VERSION_1_0 */
+  "1.1", /* CURL_HTTP_VERSION_1_1 */
+  "2",   /* CURL_HTTP_VERSION_2 */
+  "3"    /* CURL_HTTP_VERSION_3 */
 };
 
-void ourWriteOut(CURL *curl, struct per_transfer *per, const char *writeinfo)
+/* The designated write function should be the same as the CURLINFO return type
+   with exceptions special cased in the respective function. For example,
+   http_version uses CURLINFO_HTTP_VERSION which returns the version as a long,
+   however it is output as a string and therefore is handled in writeString.
+
+   Yes: "http_version": "1.1"
+   No:  "http_version": 1.1
+
+   Variable names should be in alphabetical order.
+   */
+static const struct writeoutvar variables[] = {
+  {"content_type", VAR_CONTENT_TYPE, CURLINFO_CONTENT_TYPE, writeString},
+  {"errormsg", VAR_ERRORMSG, 0, writeString},
+  {"exitcode", VAR_EXITCODE, 0, writeLong},
+  {"filename_effective", VAR_EFFECTIVE_FILENAME, 0, writeString},
+  {"ftp_entry_path", VAR_FTP_ENTRY_PATH, CURLINFO_FTP_ENTRY_PATH, writeString},
+  {"http_code", VAR_HTTP_CODE, CURLINFO_RESPONSE_CODE, writeLong},
+  {"http_connect", VAR_HTTP_CODE_PROXY, CURLINFO_HTTP_CONNECTCODE, writeLong},
+  {"http_version", VAR_HTTP_VERSION, CURLINFO_HTTP_VERSION, writeString},
+  {"json", VAR_JSON, 0, NULL},
+  {"local_ip", VAR_LOCAL_IP, CURLINFO_LOCAL_IP, writeString},
+  {"local_port", VAR_LOCAL_PORT, CURLINFO_LOCAL_PORT, writeLong},
+  {"method", VAR_EFFECTIVE_METHOD, CURLINFO_EFFECTIVE_METHOD, writeString},
+  {"num_connects", VAR_NUM_CONNECTS, CURLINFO_NUM_CONNECTS, writeLong},
+  {"num_headers", VAR_NUM_HEADERS, 0, writeLong},
+  {"num_redirects", VAR_REDIRECT_COUNT, CURLINFO_REDIRECT_COUNT, writeLong},
+  {"onerror", VAR_ONERROR, 0, NULL},
+  {"proxy_ssl_verify_result", VAR_PROXY_SSL_VERIFY_RESULT,
+   CURLINFO_PROXY_SSL_VERIFYRESULT, writeLong},
+  {"redirect_url", VAR_REDIRECT_URL, CURLINFO_REDIRECT_URL, writeString},
+  {"referer", VAR_REFERER, CURLINFO_REFERER, writeString},
+  {"remote_ip", VAR_PRIMARY_IP, CURLINFO_PRIMARY_IP, writeString},
+  {"remote_port", VAR_PRIMARY_PORT, CURLINFO_PRIMARY_PORT, writeLong},
+  {"response_code", VAR_HTTP_CODE, CURLINFO_RESPONSE_CODE, writeLong},
+  {"scheme", VAR_SCHEME, CURLINFO_SCHEME, writeString},
+  {"size_download", VAR_SIZE_DOWNLOAD, CURLINFO_SIZE_DOWNLOAD_T, writeOffset},
+  {"size_header", VAR_HEADER_SIZE, CURLINFO_HEADER_SIZE, writeLong},
+  {"size_request", VAR_REQUEST_SIZE, CURLINFO_REQUEST_SIZE, writeLong},
+  {"size_upload", VAR_SIZE_UPLOAD, CURLINFO_SIZE_UPLOAD_T, writeOffset},
+  {"speed_download", VAR_SPEED_DOWNLOAD, CURLINFO_SPEED_DOWNLOAD_T,
+   writeOffset},
+  {"speed_upload", VAR_SPEED_UPLOAD, CURLINFO_SPEED_UPLOAD_T, writeOffset},
+  {"ssl_verify_result", VAR_SSL_VERIFY_RESULT, CURLINFO_SSL_VERIFYRESULT,
+   writeLong},
+  {"stderr", VAR_STDERR, 0, NULL},
+  {"stdout", VAR_STDOUT, 0, NULL},
+  {"time_appconnect", VAR_APPCONNECT_TIME, CURLINFO_APPCONNECT_TIME_T,
+   writeTime},
+  {"time_connect", VAR_CONNECT_TIME, CURLINFO_CONNECT_TIME_T, writeTime},
+  {"time_namelookup", VAR_NAMELOOKUP_TIME, CURLINFO_NAMELOOKUP_TIME_T,
+   writeTime},
+  {"time_pretransfer", VAR_PRETRANSFER_TIME, CURLINFO_PRETRANSFER_TIME_T,
+   writeTime},
+  {"time_redirect", VAR_REDIRECT_TIME, CURLINFO_REDIRECT_TIME_T, writeTime},
+  {"time_starttransfer", VAR_STARTTRANSFER_TIME, CURLINFO_STARTTRANSFER_TIME_T,
+   writeTime},
+  {"time_total", VAR_TOTAL_TIME, CURLINFO_TOTAL_TIME_T, writeTime},
+  {"url", VAR_INPUT_URL, 0, writeString},
+  {"url_effective", VAR_EFFECTIVE_URL, CURLINFO_EFFECTIVE_URL, writeString},
+  {"urlnum", VAR_URLNUM, 0, writeLong},
+  {NULL, VAR_NONE, 0, NULL}
+};
+
+static int writeTime(FILE *stream, const struct writeoutvar *wovar,
+                     struct per_transfer *per, CURLcode per_result,
+                     bool use_json)
+{
+  bool valid = false;
+  curl_off_t us = 0;
+
+  (void)per;
+  (void)per_result;
+  DEBUGASSERT(wovar->writefunc == writeTime);
+
+  if(wovar->ci) {
+    if(!curl_easy_getinfo(per->curl, wovar->ci, &us))
+      valid = true;
+  }
+  else {
+    DEBUGASSERT(0);
+  }
+
+  if(valid) {
+    curl_off_t secs = us / 1000000;
+    us %= 1000000;
+
+    if(use_json)
+      fprintf(stream, "\"%s\":", wovar->name);
+
+    fprintf(stream, "%" CURL_FORMAT_CURL_OFF_TU
+            ".%06" CURL_FORMAT_CURL_OFF_TU, secs, us);
+  }
+  else {
+    if(use_json)
+      fprintf(stream, "\"%s\":null", wovar->name);
+  }
+
+  return 1; /* return 1 if anything was written */
+}
+
+static int writeString(FILE *stream, const struct writeoutvar *wovar,
+                       struct per_transfer *per, CURLcode per_result,
+                       bool use_json)
+{
+  bool valid = false;
+  const char *strinfo = NULL;
+
+  DEBUGASSERT(wovar->writefunc == writeString);
+
+  if(wovar->ci) {
+    if(wovar->ci == CURLINFO_HTTP_VERSION) {
+      long version = 0;
+      if(!curl_easy_getinfo(per->curl, CURLINFO_HTTP_VERSION, &version) &&
+         (version >= 0) &&
+         (version < (long)(sizeof(http_version)/sizeof(http_version[0])))) {
+        strinfo = http_version[version];
+        valid = true;
+      }
+    }
+    else {
+      if(!curl_easy_getinfo(per->curl, wovar->ci, &strinfo) && strinfo)
+        valid = true;
+    }
+  }
+  else {
+    switch(wovar->id) {
+    case VAR_ERRORMSG:
+      if(per_result) {
+        strinfo = per->errorbuffer[0] ? per->errorbuffer :
+                  curl_easy_strerror(per_result);
+        valid = true;
+      }
+      break;
+    case VAR_EFFECTIVE_FILENAME:
+      if(per->outs.filename) {
+        strinfo = per->outs.filename;
+        valid = true;
+      }
+      break;
+    case VAR_INPUT_URL:
+      if(per->this_url) {
+        strinfo = per->this_url;
+        valid = true;
+      }
+      break;
+    default:
+      DEBUGASSERT(0);
+      break;
+    }
+  }
+
+  if(valid) {
+    DEBUGASSERT(strinfo);
+    if(use_json) {
+      fprintf(stream, "\"%s\":\"", wovar->name);
+      jsonWriteString(stream, strinfo);
+      fputs("\"", stream);
+    }
+    else
+      fputs(strinfo, stream);
+  }
+  else {
+    if(use_json)
+      fprintf(stream, "\"%s\":null", wovar->name);
+  }
+
+  return 1; /* return 1 if anything was written */
+}
+
+static int writeLong(FILE *stream, const struct writeoutvar *wovar,
+                     struct per_transfer *per, CURLcode per_result,
+                     bool use_json)
+{
+  bool valid = false;
+  long longinfo = 0;
+
+  DEBUGASSERT(wovar->writefunc == writeLong);
+
+  if(wovar->ci) {
+    if(!curl_easy_getinfo(per->curl, wovar->ci, &longinfo))
+      valid = true;
+  }
+  else {
+    switch(wovar->id) {
+    case VAR_NUM_HEADERS:
+      longinfo = per->num_headers;
+      valid = true;
+      break;
+    case VAR_EXITCODE:
+      longinfo = per_result;
+      valid = true;
+      break;
+    case VAR_URLNUM:
+      if(per->urlnum <= INT_MAX) {
+        longinfo = (long)per->urlnum;
+        valid = true;
+      }
+      break;
+    default:
+      DEBUGASSERT(0);
+      break;
+    }
+  }
+
+  if(valid) {
+    if(use_json)
+      fprintf(stream, "\"%s\":%ld", wovar->name, longinfo);
+    else {
+      if(wovar->id == VAR_HTTP_CODE || wovar->id == VAR_HTTP_CODE_PROXY)
+        fprintf(stream, "%03ld", longinfo);
+      else
+        fprintf(stream, "%ld", longinfo);
+    }
+  }
+  else {
+    if(use_json)
+      fprintf(stream, "\"%s\":null", wovar->name);
+  }
+
+  return 1; /* return 1 if anything was written */
+}
+
+static int writeOffset(FILE *stream, const struct writeoutvar *wovar,
+                       struct per_transfer *per, CURLcode per_result,
+                       bool use_json)
+{
+  bool valid = false;
+  curl_off_t offinfo = 0;
+
+  (void)per;
+  (void)per_result;
+  DEBUGASSERT(wovar->writefunc == writeOffset);
+
+  if(wovar->ci) {
+    if(!curl_easy_getinfo(per->curl, wovar->ci, &offinfo))
+      valid = true;
+  }
+  else {
+    DEBUGASSERT(0);
+  }
+
+  if(valid) {
+    if(use_json)
+      fprintf(stream, "\"%s\":", wovar->name);
+
+    fprintf(stream, "%" CURL_FORMAT_CURL_OFF_T, offinfo);
+  }
+  else {
+    if(use_json)
+      fprintf(stream, "\"%s\":null", wovar->name);
+  }
+
+  return 1; /* return 1 if anything was written */
+}
+
+void ourWriteOut(const char *writeinfo, struct per_transfer *per,
+                 CURLcode per_result)
 {
   FILE *stream = stdout;
   const char *ptr = writeinfo;
-  char *stringp = NULL;
-  long longinfo;
-  double doubleinfo;
+  bool done = FALSE;
 
-  while(ptr && *ptr) {
+  while(ptr && *ptr && !done) {
     if('%' == *ptr && ptr[1]) {
       if('%' == ptr[1]) {
         /* an escaped %-letter */
@@ -140,198 +341,10 @@
             if(curl_strequal(ptr, variables[i].name)) {
               match = TRUE;
               switch(variables[i].id) {
-              case VAR_EFFECTIVE_URL:
-                if((CURLE_OK ==
-                    curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &stringp))
-                   && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_EFFECTIVE_METHOD:
-                if((CURLE_OK == curl_easy_getinfo(curl,
-                                                  CURLINFO_EFFECTIVE_METHOD,
-                                                  &stringp))
-                   && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_HTTP_CODE:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo))
-                  fprintf(stream, "%03ld", longinfo);
-                break;
-              case VAR_NUM_HEADERS:
-                fprintf(stream, "%ld", per->num_headers);
-                break;
-              case VAR_HTTP_CODE_PROXY:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE,
-                                     &longinfo))
-                  fprintf(stream, "%03ld", longinfo);
-                break;
-              case VAR_HEADER_SIZE:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_REQUEST_SIZE:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_NUM_CONNECTS:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_REDIRECT_COUNT:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_REDIRECT_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME,
-                                     &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_TOTAL_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_NAMELOOKUP_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME,
-                                     &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_CONNECT_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_APPCONNECT_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
-                                     &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_PRETRANSFER_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
-                                     &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_STARTTRANSFER_TIME:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
-                                     &doubleinfo))
-                  fprintf(stream, "%.6f", doubleinfo);
-                break;
-              case VAR_SIZE_UPLOAD:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &doubleinfo))
-                  fprintf(stream, "%.0f", doubleinfo);
-                break;
-              case VAR_SIZE_DOWNLOAD:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD,
-                                     &doubleinfo))
-                  fprintf(stream, "%.0f", doubleinfo);
-                break;
-              case VAR_SPEED_DOWNLOAD:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD,
-                                     &doubleinfo))
-                  fprintf(stream, "%.3f", doubleinfo);
-                break;
-              case VAR_SPEED_UPLOAD:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &doubleinfo))
-                  fprintf(stream, "%.3f", doubleinfo);
-                break;
-              case VAR_CONTENT_TYPE:
-                if((CURLE_OK ==
-                    curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &stringp))
-                   && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_FTP_ENTRY_PATH:
-                if((CURLE_OK ==
-                    curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &stringp))
-                   && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_REDIRECT_URL:
-                if((CURLE_OK ==
-                    curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &stringp))
-                   && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_SSL_VERIFY_RESULT:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
-                                     &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_PROXY_SSL_VERIFY_RESULT:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
-                                     &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_EFFECTIVE_FILENAME:
-                if(per->outs.filename)
-                  fputs(per->outs.filename, stream);
-                break;
-              case VAR_PRIMARY_IP:
-                if((CURLE_OK == curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP,
-                                                  &stringp)) && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_PRIMARY_PORT:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT,
-                                     &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_LOCAL_IP:
-                if((CURLE_OK == curl_easy_getinfo(curl, CURLINFO_LOCAL_IP,
-                                                  &stringp)) && stringp)
-                  fputs(stringp, stream);
-                break;
-              case VAR_LOCAL_PORT:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT,
-                                     &longinfo))
-                  fprintf(stream, "%ld", longinfo);
-                break;
-              case VAR_HTTP_VERSION:
-                if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION,
-                                     &longinfo)) {
-                  const char *version = "0";
-                  switch(longinfo) {
-                  case CURL_HTTP_VERSION_1_0:
-                    version = "1.0";
-                    break;
-                  case CURL_HTTP_VERSION_1_1:
-                    version = "1.1";
-                    break;
-                  case CURL_HTTP_VERSION_2_0:
-                    version = "2";
-                    break;
-                  case CURL_HTTP_VERSION_3:
-                    version = "3";
-                    break;
-                  }
-
-                  fprintf(stream, version);
-                }
-                break;
-              case VAR_SCHEME:
-                if((CURLE_OK == curl_easy_getinfo(curl, CURLINFO_SCHEME,
-                                                  &stringp)) && stringp)
-                  fputs(stringp, stream);
+              case VAR_ONERROR:
+                if(per_result == CURLE_OK)
+                  /* this isn't error so skip the rest */
+                  done = TRUE;
                 break;
               case VAR_STDOUT:
                 stream = stdout;
@@ -340,8 +353,11 @@
                 stream = stderr;
                 break;
               case VAR_JSON:
-                ourWriteOutJSON(variables, curl, per, stream);
+                ourWriteOutJSON(stream, variables, per, per_result);
+                break;
               default:
+                (void)variables[i].writefunc(stream, &variables[i],
+                                             per, per_result, false);
                 break;
               }
               break;
@@ -385,5 +401,4 @@
       ptr++;
     }
   }
-
 }
diff --git a/src/tool_writeout.h b/src/tool_writeout.h
index 377f0b2..b8f51ff 100644
--- a/src/tool_writeout.h
+++ b/src/tool_writeout.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -26,62 +26,60 @@
 
 typedef enum {
   VAR_NONE,       /* must be the first */
-  VAR_TOTAL_TIME,
-  VAR_NAMELOOKUP_TIME,
-  VAR_CONNECT_TIME,
   VAR_APPCONNECT_TIME,
+  VAR_CONNECT_TIME,
+  VAR_CONTENT_TYPE,
+  VAR_EFFECTIVE_FILENAME,
+  VAR_EFFECTIVE_METHOD,
+  VAR_EFFECTIVE_URL,
+  VAR_ERRORMSG,
+  VAR_EXITCODE,
+  VAR_FTP_ENTRY_PATH,
+  VAR_HEADER_SIZE,
+  VAR_HTTP_CODE,
+  VAR_HTTP_CODE_PROXY,
+  VAR_HTTP_VERSION,
+  VAR_INPUT_URL,
+  VAR_JSON,
+  VAR_LOCAL_IP,
+  VAR_LOCAL_PORT,
+  VAR_NAMELOOKUP_TIME,
+  VAR_NUM_CONNECTS,
+  VAR_NUM_HEADERS,
+  VAR_ONERROR,
   VAR_PRETRANSFER_TIME,
-  VAR_STARTTRANSFER_TIME,
+  VAR_PRIMARY_IP,
+  VAR_PRIMARY_PORT,
+  VAR_PROXY_SSL_VERIFY_RESULT,
+  VAR_REDIRECT_COUNT,
+  VAR_REDIRECT_TIME,
+  VAR_REDIRECT_URL,
+  VAR_REFERER,
+  VAR_REQUEST_SIZE,
+  VAR_SCHEME,
   VAR_SIZE_DOWNLOAD,
   VAR_SIZE_UPLOAD,
   VAR_SPEED_DOWNLOAD,
   VAR_SPEED_UPLOAD,
-  VAR_HTTP_CODE,
-  VAR_HTTP_CODE_PROXY,
-  VAR_HEADER_SIZE,
-  VAR_NUM_HEADERS,
-  VAR_REQUEST_SIZE,
-  VAR_EFFECTIVE_METHOD,
-  VAR_EFFECTIVE_URL,
-  VAR_CONTENT_TYPE,
-  VAR_NUM_CONNECTS,
-  VAR_REDIRECT_TIME,
-  VAR_REDIRECT_COUNT,
-  VAR_FTP_ENTRY_PATH,
-  VAR_REDIRECT_URL,
   VAR_SSL_VERIFY_RESULT,
-  VAR_PROXY_SSL_VERIFY_RESULT,
-  VAR_EFFECTIVE_FILENAME,
-  VAR_PRIMARY_IP,
-  VAR_PRIMARY_PORT,
-  VAR_LOCAL_IP,
-  VAR_LOCAL_PORT,
-  VAR_HTTP_VERSION,
-  VAR_SCHEME,
-  VAR_STDOUT,
+  VAR_STARTTRANSFER_TIME,
   VAR_STDERR,
-  VAR_JSON,
+  VAR_STDOUT,
+  VAR_TOTAL_TIME,
+  VAR_URLNUM,
   VAR_NUM_OF_VARS /* must be the last */
 } writeoutid;
 
-typedef enum {
-  JSON_NONE,
-  JSON_STRING,
-  JSON_LONG,
-  JSON_OFFSET,
-  JSON_TIME,
-  JSON_VERSION,
-  JSON_FILENAME
-} jsontype;
-
 struct writeoutvar {
   const char *name;
   writeoutid id;
-  int is_ctrl;
-  CURLINFO cinfo;
-  jsontype jsontype;
+  CURLINFO ci;
+  int (*writefunc)(FILE *stream, const struct writeoutvar *wovar,
+                   struct per_transfer *per, CURLcode per_result,
+                   bool use_json);
 };
 
-void ourWriteOut(CURL *curl, struct per_transfer *per, const char *writeinfo);
+void ourWriteOut(const char *writeinfo, struct per_transfer *per,
+                 CURLcode per_result);
 
 #endif /* HEADER_CURL_TOOL_WRITEOUT_H */
diff --git a/src/tool_writeout_json.c b/src/tool_writeout_json.c
index bae7f5c..caa1ea6 100644
--- a/src/tool_writeout_json.c
+++ b/src/tool_writeout_json.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,15 +30,7 @@
 #include "tool_writeout.h"
 
 
-static const char *http_version[] = {
-  "0",   /* CURL_HTTP_VERSION_NONE */
-  "1",   /* CURL_HTTP_VERSION_1_0 */
-  "1.1", /* CURL_HTTP_VERSION_1_1 */
-  "2",   /* CURL_HTTP_VERSION_2 */
-  "3"    /* CURL_HTTP_VERSION_3 */
-};
-
-static void jsonEscape(FILE *stream, const char *in)
+void jsonWriteString(FILE *stream, const char *in)
 {
   const char *i = in;
   const char *in_end = in + strlen(in);
@@ -74,130 +66,26 @@
         fputc(*i, stream);
       }
       break;
-    };
-  }
-}
-
-static int writeTime(FILE *str, CURL *curl, const char *key, CURLINFO ci)
-{
-  curl_off_t val = 0;
-  if(CURLE_OK == curl_easy_getinfo(curl, ci, &val)) {
-    curl_off_t s = val / 1000000l;
-    curl_off_t ms = val % 1000000l;
-    fprintf(str, "\"%s\":%" CURL_FORMAT_CURL_OFF_T
-            ".%06" CURL_FORMAT_CURL_OFF_T, key, s, ms);
-    return 1;
-  }
-  return 0;
-}
-
-static int writeString(FILE *str, CURL *curl, const char *key, CURLINFO ci)
-{
-  char *valp = NULL;
-  if((CURLE_OK == curl_easy_getinfo(curl, ci, &valp)) && valp) {
-    fprintf(str, "\"%s\":\"", key);
-    jsonEscape(str, valp);
-    fprintf(str, "\"");
-    return 1;
-  }
-  return 0;
-}
-
-static int writeLong(FILE *str, CURL *curl, const char *key, CURLINFO ci,
-                     struct per_transfer *per, const struct writeoutvar *wovar)
-{
-  if(wovar->id == VAR_NUM_HEADERS) {
-    fprintf(str, "\"%s\":%ld", key, per->num_headers);
-    return 1;
-  }
-  else {
-    long val = 0;
-    if(CURLE_OK == curl_easy_getinfo(curl, ci, &val)) {
-      fprintf(str, "\"%s\":%ld", key, val);
-      return 1;
     }
   }
-  return 0;
 }
 
-static int writeOffset(FILE *str, CURL *curl, const char *key, CURLINFO ci)
-{
-  curl_off_t val = 0;
-  if(CURLE_OK == curl_easy_getinfo(curl, ci, &val)) {
-    fprintf(str, "\"%s\":%" CURL_FORMAT_CURL_OFF_T, key, val);
-    return 1;
-  }
-  return 0;
-}
-
-static int writeFilename(FILE *str, const char *key, const char *filename)
-{
-  if(filename) {
-    fprintf(str, "\"%s\":\"", key);
-    jsonEscape(str, filename);
-    fprintf(str, "\"");
-  }
-  else {
-    fprintf(str, "\"%s\":null", key);
-  }
-  return 1;
-}
-
-static int writeVersion(FILE *str, CURL *curl, const char *key, CURLINFO ci)
-{
-  long version = 0;
-  if(CURLE_OK == curl_easy_getinfo(curl, ci, &version) &&
-     (version >= 0) &&
-     (version < (long)(sizeof(http_version)/sizeof(char *)))) {
-    fprintf(str, "\"%s\":\"%s\"", key, http_version[version]);
-    return 1;
-  }
-  return 0;
-}
-
-void ourWriteOutJSON(const struct writeoutvar mappings[], CURL *curl,
-                     struct per_transfer *per, FILE *stream)
+void ourWriteOutJSON(FILE *stream, const struct writeoutvar mappings[],
+                     struct per_transfer *per, CURLcode per_result)
 {
   int i;
 
   fputs("{", stream);
+
   for(i = 0; mappings[i].name != NULL; i++) {
-    const struct writeoutvar *wovar = &mappings[i];
-    const char *name = mappings[i].name;
-    CURLINFO cinfo = mappings[i].cinfo;
-    int ok = 0;
-
-    if(mappings[i].is_ctrl == 1) {
-      continue;
-    }
-
-    switch(mappings[i].jsontype) {
-    case JSON_STRING:
-      ok = writeString(stream, curl, name, cinfo);
-      break;
-    case JSON_LONG:
-      ok = writeLong(stream, curl, name, cinfo, per, wovar);
-      break;
-    case JSON_OFFSET:
-      ok = writeOffset(stream, curl, name, cinfo);
-      break;
-    case JSON_TIME:
-      ok = writeTime(stream, curl, name, cinfo);
-      break;
-    case JSON_FILENAME:
-      ok = writeFilename(stream, name, per->outs.filename);
-      break;
-    case JSON_VERSION:
-      ok = writeVersion(stream, curl, name, cinfo);
-      break;
-    default:
-      break;
-    }
-
-    if(ok) {
+    if(mappings[i].writefunc &&
+       mappings[i].writefunc(stream, &mappings[i], per, per_result, true))
       fputs(",", stream);
-    }
   }
 
-  fprintf(stream, "\"curl_version\":\"%s\"}", curl_version());
+  /* The variables are sorted in alphabetical order but as a special case
+     curl_version (which is not actually a --write-out variable) is last. */
+  fprintf(stream, "\"curl_version\":\"");
+  jsonWriteString(stream, curl_version());
+  fprintf(stream, "\"}");
 }
diff --git a/src/tool_writeout_json.h b/src/tool_writeout_json.h
index 0390ae5..f6b3a86 100644
--- a/src/tool_writeout_json.h
+++ b/src/tool_writeout_json.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -24,7 +24,9 @@
 #include "tool_setup.h"
 #include "tool_writeout.h"
 
-void ourWriteOutJSON(const struct writeoutvar mappings[], CURL *curl,
-                     struct per_transfer *per, FILE *stream);
+void ourWriteOutJSON(FILE *stream, const struct writeoutvar mappings[],
+                     struct per_transfer *per, CURLcode per_result);
+
+void jsonWriteString(FILE *stream, const char *in);
 
 #endif /* HEADER_CURL_TOOL_WRITEOUT_H */
diff --git a/src/tool_xattr.c b/src/tool_xattr.c
index 592d4a1..08e92fa 100644
--- a/src/tool_xattr.c
+++ b/src/tool_xattr.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,9 +44,10 @@
   /* mappings proposed by
    * https://freedesktop.org/wiki/CommonExtendedAttributes/
    */
-  { "user.xdg.origin.url", CURLINFO_EFFECTIVE_URL },
-  { "user.mime_type",      CURLINFO_CONTENT_TYPE },
-  { NULL,                  CURLINFO_NONE } /* last element, abort loop here */
+  { "user.xdg.referrer.url", CURLINFO_REFERER },
+  { "user.xdg.origin.url",   CURLINFO_EFFECTIVE_URL },
+  { "user.mime_type",        CURLINFO_CONTENT_TYPE },
+  { NULL,                    CURLINFO_NONE } /* last element, abort here */
 };
 
 /* returns TRUE if a new URL is returned, that then needs to be freed */
diff --git a/src/tool_xattr.h b/src/tool_xattr.h
index 0339b9b..8d741aa 100644
--- a/src/tool_xattr.h
+++ b/src/tool_xattr.h
@@ -7,11 +7,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/test-driver b/test-driver
index 89dba1e..9759384 100755
--- a/test-driver
+++ b/test-driver
@@ -42,11 +42,13 @@
 {
   cat <<END
 Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
+  test-driver --test-name NAME --log-file PATH --trs-file PATH
+              [--expect-failure {yes|no}] [--color-tests {yes|no}]
+              [--enable-hard-errors {yes|no}] [--]
               TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
 END
 }
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9f3e475..acd53d3 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -41,7 +41,6 @@
   )
 endfunction()
 
-add_runtests(test           "")
 add_runtests(test-quiet     "-a -s")
 add_runtests(test-am        "-a -am")
 add_runtests(test-full      "-a -p -r")
diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md
index 0f66de2..7a9c482 100644
--- a/tests/FILEFORMAT.md
+++ b/tests/FILEFORMAT.md
@@ -68,6 +68,36 @@
 
     %repeat[100 x hello]%
 
+## Conditional lines
+
+Lines in the test file can be made to appear conditionally on a specific
+feature (see the "features" section below) being set or not set. If the
+specific feature is present, the following lines will be output, otherwise it
+outputs nothing, until a following else or endif clause. Like this:
+
+    %if brotli
+    Accept-Encoding
+    %endif
+
+It can also check for the inversed condition, so if the feature us *not* set by
+the use of an exclamation mark:
+
+    %if !brotli
+    Accept-Encoding: not-brotli
+    %endif
+
+You can also make an "else" clause to get output for the opposite condition,
+like:
+
+    %if brotli
+    Accept-Encoding: brotli
+    %else
+    Accept-Encoding: nothing
+    %endif
+
+**Note** that there can be no nested conditions. You can only do one
+conditional at a time and you can only check for a single feature in it.
+
 # Variables
 
 When the test is preprocessed, a range of "variables" in the test file will be
@@ -87,6 +117,7 @@
 - `%FTPTIME3` - Even longer than %FTPTIME2
 - `%GOPHER6PORT` - IPv6 port number of the Gopher server
 - `%GOPHERPORT` - Port number of the Gopher server
+- `%GOPHERSPORT` - Port number of the Gophers server
 - `%HOST6IP` - IPv6 address of the host running this test
 - `%HOSTIP` - IPv4 address of the host running this test
 - `%HTTP6PORT` - IPv6 port number of the HTTP server
@@ -118,6 +149,7 @@
 - `%SSHPORT` - Port number of the SCP/SFTP server
 - `%SSHSRVMD5` - MD5 of SSH server's public key
 - `%SSH_PWD` - Current directory friendly for the SSH server
+- `%TESTNUMBER` - Number of the test case
 - `%TFTP6PORT` - IPv6 port number of the TFTP server
 - `%TFTPPORT` - Port number of the TFTP server
 - `%USER` - Login ID of the user running the test
@@ -145,12 +177,14 @@
 
 ### `<keywords>`
 A newline-separated list of keywords describing what this test case uses and
-tests. Try to use an already used keyword.  These keywords will be used for
-statistical/informational purposes and for choosing or skipping classes
-of tests.  "Keywords" must begin with an alphabetic character, "-", "["
-or "{" and may actually consist of multiple words separated by spaces
-which are treated together as a single identifier.
+tests. Try to use already used keywords.  These keywords will be used for
+statistical/informational purposes and for choosing or skipping classes of
+tests.  "Keywords" must begin with an alphabetic character, "-", "[" or "{"
+and may actually consist of multiple words separated by spaces which are
+treated together as a single identifier.
 
+When using curl built with Hyper, the keywords must include HTTP or HTTPS for
+'hyper mode' to kick in and make line ending checks work for tests.
 ## `<reply>`
 
 ### `<data [nocheck="yes"] [sendzero="yes"] [base64="yes"] [hex="yes"]>`
@@ -169,7 +203,7 @@
 for auth tests and similar.
 
 `sendzero=yes` means that the (FTP) server will "send" the data even if the
-size is zero bytes. Used to verify curl's behaviour on zero bytes transfers.
+size is zero bytes. Used to verify curl's behavior on zero bytes transfers.
 
 `base64=yes` means that the data provided in the test-file is a chunk of data
 encoded with base64. It is the only way a test case can contain binary
@@ -299,6 +333,8 @@
 - `ftp-ipv6`
 - `ftp`
 - `ftps`
+- `gopher`
+- `gophers`
 - `http-ipv6`
 - `http-proxy`
 - `http-unix`
@@ -333,6 +369,7 @@
 Features testable here are:
 
 - `alt-svc`
+- `c-ares`
 - `cookies`
 - `crypto`
 - `debug`
@@ -340,8 +377,10 @@
 - `getrlimit`
 - `GnuTLS`
 - `GSS-API`
+- `HSTS`
 - `HTTP-auth`
 - `http/2`
+- `hyper`
 - `idn`
 - `ipv6`
 - `Kerberos`
@@ -349,7 +388,6 @@
 - `ld_preload`
 - `libz`
 - `manual`
-- `Metalink`
 - `Mime`
 - `netrc`
 - `NSS`
@@ -359,6 +397,7 @@
 - `proxy`
 - `PSL`
 - `Schannel`
+- `sectransp`
 - `shuffle-dns`
 - `socks`
 - `SPNEGO`
@@ -369,9 +408,11 @@
 - `TLS-SRP`
 - `TrackMemory`
 - `typecheck`
+- `Unicode`
 - `unittest`
 - `unix-sockets`
 - `verbose-strings`
+- `wakeup`
 - `win32`
 
 as well as each protocol that curl supports.  A protocol only needs to be
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7424fe6..8f47bb0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -30,8 +30,7 @@
  serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl      \
  CMakeLists.txt mem-include-scan.pl valgrind.supp extern-scan.pl              \
  manpage-scan.pl nroff-scan.pl http2-server.pl dictserver.py                  \
- negtelnetserver.py smbserver.py curl_test_data.py                            \
- objnames-test08.sh objnames-test10.sh objnames.inc                           \
+ negtelnetserver.py smbserver.py util.py                                      \
  disable-scan.pl manpage-syntax.pl error-codes.pl badsymbols.pl               \
  azure.pm appveyor.pm version-scan.pl options-scan.pl
 
diff --git a/tests/README.md b/tests/README.md
index 4b524a0..db884a2 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -12,6 +12,7 @@
   - OpenSSH or SunSSH (for SCP, SFTP and SOCKS4/5 tests)
   - nghttpx (for HTTP/2 tests)
   - nroff (for --manual tests)
+  - An available `en_US.UTF-8` locale
 
 ### Installation of python-impacket
 
@@ -50,17 +51,15 @@
 
 ### Test servers
 
-  The test suite runs simple FTP, POP3, IMAP, SMTP, HTTP and TFTP stand-alone
-  servers on the ports listed above to which it makes requests. For SSL tests,
-  it runs stunnel to handle encryption to the regular servers. For SSH, it
-  runs a standard OpenSSH server. For SOCKS4/5 tests SSH is used to perform
-  the SOCKS functionality and requires a SSH client and server.
+  The test suite runs stand-alone servers on random ports to which it makes
+  requests. For SSL tests, it runs stunnel to handle encryption to the regular
+  servers. For SSH, it runs a standard OpenSSH server. For SOCKS4/5 tests SSH
+  is used to perform the SOCKS functionality and requires a SSH client and
+  server.
 
-  The base port number (8990), which all the individual port numbers are
-  indexed from, can be set explicitly using runtests.pl' -b option to allow
-  running more than one instance of the test suite simultaneously on one
-  machine, or just move the servers in case you have local services on any of
-  those ports.
+  The listen port numbers for the test servers are picked randomly to allow
+  users to run multiple test cases concurrently and to not collide with other
+  existing services that might listen to ports on the machine.
 
   The HTTP server supports listening on a Unix domain socket, the default
   location is 'http.sock'.
@@ -86,6 +85,8 @@
   line). The latter is meant for local temporary disables and will be ignored
   by git.
 
+  Test cases mentioned in `DISABLED` can still be run if `-f` is provided.
+
   When `-s` is not present, each successful test will display on one line the
   test number and description and on the next line a set of flags, the test
   result, current test sequence, total number of tests to be run and an
@@ -109,7 +110,7 @@
   output text messages or escape sequences on user login.  When these shell
   startup messages or escape sequences are output they might corrupt the
   expected stream of data which flows to the sftp-server or from the ssh
-  client which can result in bad test behaviour or even prevent the test
+  client which can result in bad test behavior or even prevent the test
   server from running.
 
   If the test suite ssh or sftp server fails to start up and logs the message
@@ -160,7 +161,7 @@
 
   gcc provides a tool that can determine the code coverage figures for the
   test suite.  To use it, configure curl with `CFLAGS='-fprofile-arcs
-  -ftest-coverage -g -O0`.  Make sure you run the normal and torture tests to
+  -ftest-coverage -g -O0'`.  Make sure you run the normal and torture tests to
   get more full coverage, i.e. do:
 
     make test
diff --git a/tests/appveyor.pm b/tests/appveyor.pm
index 1b3889d..bc905c1 100644
--- a/tests/appveyor.pm
+++ b/tests/appveyor.pm
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/azure.pm b/tests/azure.pm
index 98d777b..4f64622 100644
--- a/tests/azure.pm
+++ b/tests/azure.pm
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/badsymbols.pl b/tests/badsymbols.pl
index 431e8e4..73daa50 100755
--- a/tests/badsymbols.pl
+++ b/tests/badsymbols.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010-2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010-2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -22,7 +22,7 @@
 ###########################################################################
 #
 # This script grew out of help from Przemyslaw Iskra and Balint Szilakszi
-# a late evening in the #curl IRC channel on freenode.
+# a late evening in the #curl IRC channel.
 #
 
 use strict;
@@ -45,6 +45,14 @@
     $Cpreprocessor = 'cpp';
 }
 
+my $verbose=0;
+
+# verbose mode when -v is the first argument
+if($ARGV[0] eq "-v") {
+    $verbose=1;
+    shift;
+}
+
 # we may get the dir root pointed out
 my $root=$ARGV[0] || ".";
 
@@ -53,7 +61,6 @@
 
 my $incdir = "$root/include/curl";
 
-my $verbose=0;
 my $summary=0;
 my $misses=0;
 
@@ -67,6 +74,7 @@
 
     open H_IN, "-|", "$Cpreprocessor $i$file" || die "Cannot preprocess $file";
     while ( <H_IN> ) {
+        my ($line, $linenum) = ($_, $.);
         if( /^#(line|) (\d+) \"(.*)\"/) {
             # if the included file isn't in our incdir, then we skip this section
             # until next #line
@@ -82,6 +90,9 @@
         if($skipit) {
             next;
         }
+        if (/^#/) {
+            next;
+        }
         if ( /enum\s+(\S+\s+)?{/ .. /}/ ) {
             s/^\s+//;
             chomp;
@@ -90,6 +101,11 @@
                ($_ ne "typedef") &&
                ($_ ne "enum") &&
                ($_ !~ /^[ \t]*$/)) {
+                if($verbose) {
+                    print "Source: $Cpreprocessor $i$file\n";
+                    print "Symbol: $_\n";
+                    print "Line #$linenum: $line\n\n";
+                }
                 push @syms, $_;
             }
         }
@@ -102,7 +118,13 @@
     scanenums($f);
     open H, "<$f";
     while(<H>) {
+        my ($line, $linenum) = ($_, $.);
         if (/^#define +([^ \n]*)/) {
+            if($verbose) {
+                print "Source: $f\n";
+                print "Symbol: $1\n";
+                print "Line #$linenum: $line\n\n";
+            }
             push @syms, $1;
         }
     }
@@ -110,7 +132,7 @@
 }
 
 
-opendir(my $dh, $incdir) || die "Can't opendir: $!";
+opendir(my $dh, $incdir) || die "Can't opendir $incdir: $!";
 my @hfiles = grep { /\.h$/ } readdir($dh);
 closedir $dh;
 
diff --git a/tests/certs/Makefile.am b/tests/certs/Makefile.am
index f5665f7..c406417 100644
--- a/tests/certs/Makefile.am
+++ b/tests/certs/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/certs/scripts/Makefile.am b/tests/certs/scripts/Makefile.am
index 271fb0e..0f381ee 100644
--- a/tests/certs/scripts/Makefile.am
+++ b/tests/certs/scripts/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt
index 480dee6..883d583 100644
--- a/tests/data/CMakeLists.txt
+++ b/tests/data/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/data/DISABLED b/tests/data/DISABLED
index 1806a5d..e04eaa8 100644
--- a/tests/data/DISABLED
+++ b/tests/data/DISABLED
@@ -11,6 +11,10 @@
 836
 882
 938
+# test 1182 kills the test servers as a side effect
+# of running runtests.pl as a child of itself sharing
+# some of the directories.
+1182
 1209
 1211
 # fnmatch differences are just too common to make testing them sensible
@@ -23,3 +27,111 @@
 # test 1801 causes problems on Mac OS X and github
 # https://github.com/curl/curl/issues/380
 1801
+#
+#
+# Tests that are disabled here for Hyper are SUPPOSED to work but
+# still need adjustments in tests or code. Tests that cannot be
+# fixed for hyper should be adjusted for it in the test file.
+#
+# hyper support remains EXPERIMENTAL as long as there's a test number
+# listed below
+%if hyper
+154
+155
+158
+206
+207
+209
+213
+217
+246
+262
+265
+266
+281
+287
+319
+326
+357
+358
+359
+547
+551
+552
+555
+559
+565
+579
+580
+581
+587
+661
+670
+671
+672
+673
+718
+1001
+1002
+1008
+1021
+1033
+1051
+1060
+1061
+1070
+1071
+1074
+1077
+1078
+1115
+1122
+1123
+1124
+1125
+1129
+1130
+1131
+1137
+1138
+1144
+1156
+1160
+1164
+1170
+1171
+1176
+1266
+1267
+1280
+1287
+1288
+1294
+1416
+1417
+1428
+1429
+1430
+1431
+1432
+1455
+1456
+1525
+1526
+1527
+1528
+1533
+1540
+1554
+1556
+1591
+1700
+1701
+1702
+1800
+2002
+2003
+2058
+2059
+2060
+%endif
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 6e694ec..2e10bd4 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,7 @@
 filecheck:
 	@mkdir test-place; \
 	cp "$(top_srcdir)"/tests/data/test[0-9]* test-place/; \
-	rm test-place/*~; \
+	rm -f test-place/*~; \
 	for f in $(EXTRA_DIST); do \
 	  if test -f "$(top_srcdir)/tests/data/$$f"; then \
 	    rm -f "test-place/$$f"; \
@@ -45,6 +45,3 @@
 	RC=$$? ; \
 	rm -rf test-place ; \
 	exit $$RC
-
-show:
-	@echo $(EXTRA_DIST)
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index 8a63358..1636969 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -58,17 +58,18 @@
 test316 test317 test318 test319 test320 test321 test322 test323 test324 \
 test325 test326 test327 test328 test329 test330 test331 test332 test333 \
 test334 test335 test336 test337 test338 test339 test340 test341 test342 \
-test343 test344 test345 test346 test347 test348 \
-test350 test351 test352 test353 test354 test355 test356 test357 test358 \
-test359 \
+test343 test344 test345 test346 test347 test348 test349 test350 test351 \
+test352 test353 test354 test355 test356 test357 test358 test359 test360 \
+test361 test362 test363 test364 \
+\
 test393 test394 test395 test396 test397 \
 \
 test400 test401 test402 test403 test404 test405 test406 test407 test408 \
-test409 \
+test409 test410 \
 \
 test430 test431 test432 test433 test434 \
 \
-test490 test491 test492 \
+test490 test491 test492 test493 test494 \
 \
 test500 test501 test502 test503 test504 test505 test506 test507 test508 \
 test509 test510 test511 test512 test513 test514 test515 test516 test517 \
@@ -79,20 +80,21 @@
 test554 test555 test556 test557 test558 test559 test560 test561 test562 \
 test563 test564 test565 test566 test567 test568 test569 test570 test571 \
 test572 test573 test574 test575 test576 test577 test578 test579 test580 \
-test581 test582 test583         test585 test586 test587 test588 test589 \
+test581 test582 test583 test584 test585 test586 test587 test588 test589 \
 test590 test591 test592 test593 test594 test595 test596 test597 test598 \
 test599 test600 test601 test602 test603 test604 test605 test606 test607 \
 test608 test609 test610 test611 test612 test613 test614 test615 test616 \
 test617 test618 test619 test620 test621 test622 test623 test624 test625 \
 test626 test627 test628 test629 test630 test631 test632 test633 test634 \
 test635 test636 test637 test638 test639 test640 test641 test642 \
-test643 test644 test645 test646 test647 test648 test649 test650 test651 \
+test643         test645 test646 test647 test648 test649 test650 test651 \
 test652 test653 test654 test655 test656 test658 test659 test660 test661 \
 test662 test663 test664 test665 test666 test667 test668 test669 \
-test670 test671 test672 test673 test674 \
+test670 test671 test672 test673 test674 test675 test676 test677 test678 \
 \
 test700 test701 test702 test703 test704 test705 test706 test707 test708 \
 test709 test710 test711 test712 test713 test714 test715 test716 test717 \
+test718 \
 \
 test800 test801 test802 test803 test804 test805 test806 test807 test808 \
 test809 test810 test811 test812 test813 test814 test815 test816 test817 \
@@ -114,6 +116,7 @@
 test945 test946 test947 test948 test949 test950 test951 test952 test953 \
 test954 test955 test956 test957 test958 test959 test960 test961 test962 \
 test963 test964 test965 test966 test967 test968 test969 test970 test971 \
+test972 \
 \
 test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \
 test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \
@@ -136,20 +139,23 @@
 test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
 test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 \
 test1160 test1161 test1162 test1163 test1164 test1165 test1166 test1167 \
-test1168          test1170 test1171 test1172 test1173 test1174 test1175 \
-test1176 test1177 test1178 test1179 \
+test1168 test1169 test1170 test1171 test1172 test1173 test1174 test1175 \
+test1176 test1177 test1178 test1179 test1180 test1181 test1182 test1183 \
+\
+test1188 \
 \
 test1190 test1191 test1192 test1193 test1194 test1195 test1196 test1197 \
-\
+test1198 test1199 \
 test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
 test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
-test1216 test1217 test1218 test1219 test1220 test1221 test1222 test1223 \
+test1216 test1217 test1218 test1219 test1220                   test1223 \
 test1224 test1225 test1226 test1227 test1228 test1229 test1230 test1231 \
 test1232 test1233 test1234 test1235 test1236 test1237 test1238 test1239 \
 test1240 test1241 test1242 test1243 test1244 test1245 test1246 test1247 \
 test1248 test1249 test1250 test1251 test1252 test1253 test1254 test1255 \
 test1256 test1257 test1258 test1259 test1260 test1261 test1262 test1263 \
 test1264 test1265 test1266 test1267 test1268 test1269 test1270 test1271 \
+test1272 test1273 \
 \
 test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
 test1288 test1289 test1290 test1291 test1292 test1293 test1294 test1295 \
@@ -185,29 +191,33 @@
 \
 test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
 test1558 test1559 test1560 test1561 test1562 test1563 test1564 test1565 \
-test1566 test1567 \
+test1566 test1567 test1568 test1569 test1570 \
 \
 test1590 test1591 test1592 test1593 test1594 test1595 test1596 \
 \
 test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
-test1608 test1609 test1610 test1611 test1612 \
+test1608 test1609 test1610 test1611 test1612 test1613 \
 \
 test1620 test1621 \
 \
-test1630 test1631 test1632 test1633 \
+test1630 test1631 test1632 test1633 test1634 \
 \
 test1650 test1651 test1652 test1653 test1654 test1655 \
+test1660 test1661 \
 \
-test1700 test1701 test1702 \
+test1700 test1701 test1702 test1703 \
 \
 test1800 test1801 \
 \
                                     test1904 test1905 test1906 test1907 \
-test1908 test1909 test1910 test1911 test1912 test1913 test1914 \
+test1908 test1909 test1910 test1911 test1912 test1913 test1914 test1915 \
+test1916 test1917 test1918 \
 \
-test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
-test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
-test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
+test1933 test1934 test1935 test1936 \
+\
+test2000 test2001 test2002 test2003 test2004 \
+\
+                                                               test2023 \
 test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
 test2032          test2034 test2035 test2036 test2037 test2038 test2039 \
 test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
@@ -217,8 +227,12 @@
 test2064 test2065 test2066 test2067 test2068 test2069 test2070 \
          test2071 test2072 test2073 test2074 test2075 test2076 test2077 \
 test2078 \
-test2080 \
+test2080 test2081 \
+\
 test2100 \
 \
+test2200 test2201 test2202 test2203 test2204 test2205 \
+\
 test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 \
-test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015
+test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015 \
+test3016 test3017 test3018 test3019 test3020
diff --git a/tests/data/test1 b/tests/data/test1
index 461375b..f39a08b 100644
--- a/tests/data/test1
+++ b/tests/data/test1
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP GET
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test10 b/tests/data/test10
index c5053b5..5b5534b 100644
--- a/tests/data/test10
+++ b/tests/data/test10
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -26,9 +26,9 @@
 simple HTTP PUT from file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/10 -T log/test10.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test10.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /we/want/10 HTTP/1.1

+PUT /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test100 b/tests/data/test100
index 72f9c85..e680a7b 100644
--- a/tests/data/test100
+++ b/tests/data/test100
@@ -36,7 +36,7 @@
 FTP dir list PASV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/test-100/
+ftp://%HOSTIP:%FTPPORT/test-%TESTNUMBER/
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-CWD test-100

+CWD test-%TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test1000 b/tests/data/test1000
index e6f8eef..37f210e 100644
--- a/tests/data/test1000
+++ b/tests/data/test1000
@@ -24,7 +24,7 @@
 FTP dir list PASV with -I
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1000/ -I
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER/ -I
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-CWD 1000

+CWD %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1001 b/tests/data/test1001
index 6edaade..59d2ff8 100644
--- a/tests/data/test1001
+++ b/tests/data/test1001
@@ -72,9 +72,9 @@
 HTTP POST --digest with PUT and resumed upload and modified method
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1001 -u auser:apasswd --digest -T log/1001 -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -T log/%TESTNUMBER -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
 </command>
-<file name="log/1001">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -82,7 +82,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/1001 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

@@ -90,9 +90,9 @@
 Proxy-Connection: Keep-Alive

 Content-Length: 0

 

-GET http://%HOSTIP:%HTTPPORT/1001 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1001", response="6af4d89c952f4dd4cc215a6878dc499d"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="6af4d89c952f4dd4cc215a6878dc499d"

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1002 b/tests/data/test1002
index 7ec7501..d33f35b 100644
--- a/tests/data/test1002
+++ b/tests/data/test1002
@@ -71,9 +71,9 @@
 HTTP PUT with Digest auth, resumed upload and modified method, twice
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1002.upload1 -T log/1002 http://%HOSTIP:%HTTPPORT/1002.upload2 -T log/1002 -u auser:apasswd --digest -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload1 -T log/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload2 -T log/%TESTNUMBER -u auser:apasswd --digest -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
 </command>
-<file name="log/1002">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -81,7 +81,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload1 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

@@ -89,9 +89,9 @@
 Proxy-Connection: Keep-Alive

 Content-Length: 0

 

-GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload1 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload1", response="198aa9b6acb4b0c71d02a197a5e41f54"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER.upload1", response="198aa9b6acb4b0c71d02a197a5e41f54"

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

 Accept: */*

@@ -100,7 +100,7 @@
 Expect: 100-continue

 

 st
-GET http://%HOSTIP:%HTTPPORT/1002.upload2 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload2 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

@@ -108,9 +108,9 @@
 Proxy-Connection: Keep-Alive

 Content-Length: 0

 

-GET http://%HOSTIP:%HTTPPORT/1002.upload2 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload2 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload2", response="d711f0d2042786d930de635ba0d1a1d0"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER.upload2", response="d711f0d2042786d930de635ba0d1a1d0"

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1003 b/tests/data/test1003
index 08e377a..9adc996 100644
--- a/tests/data/test1003
+++ b/tests/data/test1003
@@ -27,7 +27,7 @@
 FTP with excessively large server command response line
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/1003
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 CWD path

 EPSV

 TYPE I

-SIZE 1003

-RETR 1003

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1004 b/tests/data/test1004
index 05e92a5..cb2b6d6 100644
--- a/tests/data/test1004
+++ b/tests/data/test1004
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP GET with empty proxy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1004 --proxy ""
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy ""
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1004 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1005 b/tests/data/test1005
index 5c0c676..59d98cc 100644
--- a/tests/data/test1005
+++ b/tests/data/test1005
@@ -27,7 +27,7 @@
 FTP with excessively large number of server command response lines
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/1005
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 CWD path

 EPSV

 TYPE I

-SIZE 1005

-RETR 1005

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1006 b/tests/data/test1006
index b37f807..08f7247 100644
--- a/tests/data/test1006
+++ b/tests/data/test1006
@@ -28,7 +28,7 @@
 FTP with excessively large number of server command response lines (boundary condition)
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/1006
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -41,8 +41,8 @@
 CWD path

 EPSV

 TYPE I

-SIZE 1006

-RETR 1006

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1007 b/tests/data/test1007
index db2717a..e3c12b8 100644
--- a/tests/data/test1007
+++ b/tests/data/test1007
@@ -17,9 +17,9 @@
 TFTP send with invalid permission on server
  </name>
  <command>
--T log/test1007.txt tftp://%HOSTIP:%TFTPPORT//invalid-file
+-T log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//invalid-file
 </command>
-<file name="log/test1007.txt">
+<file name="log/test%TESTNUMBER.txt">
 This data will not be sent
 </file>
 </client>
diff --git a/tests/data/test1008 b/tests/data/test1008
index a076fa0..b115c31 100644
--- a/tests/data/test1008
+++ b/tests/data/test1008
@@ -42,7 +42,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -69,7 +69,7 @@
 Content-Type: text/html; charset=iso-8859-1

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -101,7 +101,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com.1008:%HTTPPORT/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
 </command>
 <precheck>
 chkhostname curlhost
@@ -111,20 +111,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.1008:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.1008:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /path/10080002 HTTP/1.1

-Host: test.remote.example.com.1008:%HTTPPORT

+GET /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1009 b/tests/data/test1009
index e1929be..223fcdb 100644
--- a/tests/data/test1009
+++ b/tests/data/test1009
@@ -28,7 +28,7 @@
 TFTP retrieve with --local-port
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT//1009 --local-port 44444-45444
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --local-port 44444-45444
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /1009
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1010 b/tests/data/test1010
index ef073f5..9314ca6 100644
--- a/tests/data/test1010
+++ b/tests/data/test1010
@@ -36,7 +36,7 @@
 FTP dir list nocwd
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT//list/this/path/1010/ ftp://%HOSTIP:%FTPPORT//list/this/path/1010/ --ftp-method nocwd
+ftp://%HOSTIP:%FTPPORT//list/this/path/%TESTNUMBER/ ftp://%HOSTIP:%FTPPORT//list/this/path/%TESTNUMBER/ --ftp-method nocwd
 </command>
 </client>
 
@@ -49,9 +49,9 @@
 PWD

 EPSV

 TYPE A

-LIST /list/this/path/1010

+LIST /list/this/path/%TESTNUMBER

 EPSV

-LIST /list/this/path/1010

+LIST /list/this/path/%TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1011 b/tests/data/test1011
index 6d3297a..1ff01ca 100644
--- a/tests/data/test1011
+++ b/tests/data/test1011
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 301 OK

-Location: moo.html&testcase=/10110002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: moo.html&testcase=/%TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 301 OK

-Location: moo.html&testcase=/10110002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: moo.html&testcase=/%TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -49,7 +49,7 @@
 HTTP POST with 301 redirect
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/blah/1011 -L -d "moo"
+http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d "moo"
 </command>
 </client>
 
@@ -57,14 +57,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /blah/1011 HTTP/1.1

+POST /blah/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooGET /blah/moo.html&testcase=/10110002 HTTP/1.1

+mooGET /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1012 b/tests/data/test1012
index 943db91..af17bb8 100644
--- a/tests/data/test1012
+++ b/tests/data/test1012
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsclose

-Location: moo.html&testcase=/10120002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: moo.html&testcase=/%TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 301 OK swsclose

-Location: moo.html&testcase=/10120002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: moo.html&testcase=/%TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -49,7 +49,7 @@
 HTTP POST with 301 redirect and --post301
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/blah/1012 -L -d "moo" --post301
+http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d "moo" --post301
 </command>
 </client>
 
@@ -57,14 +57,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /blah/1012 HTTP/1.1

+POST /blah/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooPOST /blah/moo.html&testcase=/10120002 HTTP/1.1

+mooPOST /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1013 b/tests/data/test1013
index 9a1e6d4..17a3371 100644
--- a/tests/data/test1013
+++ b/tests/data/test1013
@@ -23,7 +23,7 @@
 --version
 </command>
 <postcheck>
-%SRCDIR/libtest/test1013.pl ../curl-config log/stdout1013 protocols
+%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config log/stdout%TESTNUMBER protocols
 </postcheck>
 </client>
 
diff --git a/tests/data/test1014 b/tests/data/test1014
index 5116aad..875fa77 100644
--- a/tests/data/test1014
+++ b/tests/data/test1014
@@ -23,7 +23,7 @@
 --version
 </command>
 <postcheck>
-%SRCDIR/libtest/test1013.pl ../curl-config log/stdout1014 features
+%SRCDIR/libtest/test1013.pl ../curl-config log/stdout%TESTNUMBER features
 </postcheck>
 </client>
 
diff --git a/tests/data/test1015 b/tests/data/test1015
index c568b86..28412c2 100644
--- a/tests/data/test1015
+++ b/tests/data/test1015
@@ -28,9 +28,9 @@
 --data-urlencode
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1015 --data-urlencode "my name is moo[]" --data-urlencode "y e s=s_i_r" --data-urlencode "v_alue@log/1015.txt" --data-urlencode @log/1015.txt 
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --data-urlencode "my name is moo[]" --data-urlencode "y e s=s_i_r" --data-urlencode "v_alue@log/%TESTNUMBER.txt" --data-urlencode @log/%TESTNUMBER.txt 
 </command>
-<file name="log/1015.txt">
+<file name="log/%TESTNUMBER.txt">
 content to _?!#$'|<>
 </file>
 </client>
@@ -39,14 +39,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /1015 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Content-Length: 133

+Content-Length: 119

 Content-Type: application/x-www-form-urlencoded

 

-my%20name%20is%20moo%5B%5D&y e s=s_i_r&v_alue=content%20to%20_%3F%21%23%24%27%7C%3C%3E%0A&content%20to%20_%3F%21%23%24%27%7C%3C%3E%0A
+my+name+is+moo%5B%5D&y e s=s_i_r&v_alue=content+to+_%3F%21%23%24%27%7C%3C%3E%0A&content+to+_%3F%21%23%24%27%7C%3C%3E%0A
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1016 b/tests/data/test1016
index 01bf100..340dd96 100644
--- a/tests/data/test1016
+++ b/tests/data/test1016
@@ -23,9 +23,9 @@
 X-Y range on a file:// URL to stdout
  </name>
 <command option="no-include">
--r 1-4 file://localhost%FILE_PWD/log/test1016.txt 
+-r 1-4 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt 
 </command>
-<file name="log/test1016.txt">
+<file name="log/test%TESTNUMBER.txt">
 1234567890
 </file>
 </client>
diff --git a/tests/data/test1017 b/tests/data/test1017
index 9790d77..034c87a 100644
--- a/tests/data/test1017
+++ b/tests/data/test1017
@@ -24,9 +24,9 @@
 0-Y range on a file:// URL to stdout
  </name>
 <command option="no-include">
--r 0-3 file://localhost%FILE_PWD/log/test1017.txt 
+-r 0-3 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt 
 </command>
-<file name="log/test1017.txt">
+<file name="log/test%TESTNUMBER.txt">
 1234567890
 </file>
 </client>
diff --git a/tests/data/test1018 b/tests/data/test1018
index ddf1f25..25d8cb1 100644
--- a/tests/data/test1018
+++ b/tests/data/test1018
@@ -23,9 +23,9 @@
 X-X range on a file:// URL to stdout
  </name>
 <command option="no-include">
--r 4-4 file://localhost%FILE_PWD/log/test1018.txt 
+-r 4-4 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt 
 </command>
-<file name="log/test1018.txt">
+<file name="log/test%TESTNUMBER.txt">
 1234567890
 </file>
 </client>
diff --git a/tests/data/test1019 b/tests/data/test1019
index 2a92ae5..02732b4 100644
--- a/tests/data/test1019
+++ b/tests/data/test1019
@@ -24,9 +24,9 @@
 X- range on a file:// URL to stdout
  </name>
 <command option="no-include">
--r 7- file://localhost%FILE_PWD/log/test1019.txt 
+-r 7- file://localhost%FILE_PWD/log/test%TESTNUMBER.txt 
 </command>
-<file name="log/test1019.txt">
+<file name="log/test%TESTNUMBER.txt">
 1234567890
 1234567890
 </file>
diff --git a/tests/data/test102 b/tests/data/test102
index 141bc0f..19be935 100644
--- a/tests/data/test102
+++ b/tests/data/test102
@@ -30,7 +30,7 @@
 FTP RETR PASV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/102
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 
 </client>
@@ -44,8 +44,8 @@
 EPSV

 PASV

 TYPE I

-SIZE 102

-RETR 102

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1020 b/tests/data/test1020
index 0d88532..91c9b63 100644
--- a/tests/data/test1020
+++ b/tests/data/test1020
@@ -24,9 +24,9 @@
 -Y range on a file:// URL to stdout
  </name>
 <command option="no-include">
--r -9 file://localhost%FILE_PWD/log/test1020.txt 
+-r -9 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt 
 </command>
-<file name="log/test1020.txt">
+<file name="log/test%TESTNUMBER.txt">
 1234567890
 1234567890
 </file>
diff --git a/tests/data/test1021 b/tests/data/test1021
index 10a0314..9afe95f 100644
--- a/tests/data/test1021
+++ b/tests/data/test1021
@@ -42,7 +42,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -74,7 +74,7 @@
 Content-Type: text/html; charset=iso-8859-1

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -106,7 +106,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel
 </command>
 <precheck>
 chkhostname curlhost
@@ -116,25 +116,25 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.1021:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.1021:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.1021:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /path/10210002 HTTP/1.1

-Host: test.remote.example.com.1021:%HTTPPORT

+GET /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1022 b/tests/data/test1022
index 6a8b012..e55b51f 100644
--- a/tests/data/test1022
+++ b/tests/data/test1022
@@ -23,7 +23,7 @@
 --version
 </command>
 <postcheck>
-%SRCDIR/libtest/test1022.pl ../curl-config log/stdout1022 version
+%SRCDIR/libtest/test%TESTNUMBER.pl ../curl-config log/stdout%TESTNUMBER version
 </postcheck>
 </client>
 
diff --git a/tests/data/test1023 b/tests/data/test1023
index 9c916a0..18071c6 100644
--- a/tests/data/test1023
+++ b/tests/data/test1023
@@ -23,7 +23,7 @@
 --version
 </command>
 <postcheck>
-%SRCDIR/libtest/test1022.pl ../curl-config log/stdout1023 vernum
+%SRCDIR/libtest/test1022.pl ../curl-config log/stdout%TESTNUMBER vernum
 </postcheck>
 </client>
 
diff --git a/tests/data/test1024 b/tests/data/test1024
index 4971eed..5fba9d3 100644
--- a/tests/data/test1024
+++ b/tests/data/test1024
@@ -12,9 +12,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../data/10240002.txt

+Location: ../data/%TESTNUMBER0002.txt

 Set-Cookie: firstcookie=want; path=/want/

 Content-Length: 69

 

@@ -23,9 +23,9 @@
 </data>
 <data2>
 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../want/10240003.txt

+Location: ../want/%TESTNUMBER0003.txt

 Set-Cookie: nextcookie=data; path=/data/

 Content-Length: 69

 

@@ -34,7 +34,7 @@
 </data2>
 <data3>
 HTTP/1.1 200 Followed here fine

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 52

 

@@ -43,21 +43,21 @@
 </data3>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../data/10240002.txt

+Location: ../data/%TESTNUMBER0002.txt

 Set-Cookie: firstcookie=want; path=/want/

 Content-Length: 69

 

 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../want/10240003.txt

+Location: ../want/%TESTNUMBER0003.txt

 Set-Cookie: nextcookie=data; path=/data/

 Content-Length: 69

 

 HTTP/1.1 200 Followed here fine

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 52

 

@@ -75,24 +75,24 @@
 HTTP Location: following with cookies
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1024 -L -c log/jar1024
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -c log/jar%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1024 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /data/10240002.txt HTTP/1.1

+GET /data/%TESTNUMBER0002.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/10240003.txt HTTP/1.1

+GET /want/%TESTNUMBER0003.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1025 b/tests/data/test1025
index 66f7532..5f96e11 100644
--- a/tests/data/test1025
+++ b/tests/data/test1025
@@ -12,9 +12,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../data/10250002.txt

+Location: ../data/%TESTNUMBER0002.txt

 Set-Cookie: firstcookie=want; path=/want/

 Content-Length: 69

 

@@ -23,9 +23,9 @@
 </data>
 <data2>
 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../want/10250003.txt

+Location: ../want/%TESTNUMBER0003.txt

 Set-Cookie: nextcookie=data; path=/data/

 Content-Length: 69

 

@@ -34,7 +34,7 @@
 </data2>
 <data3>
 HTTP/1.1 200 Followed here fine

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 52

 

@@ -43,21 +43,21 @@
 </data3>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../data/10250002.txt

+Location: ../data/%TESTNUMBER0002.txt

 Set-Cookie: firstcookie=want; path=/want/

 Content-Length: 69

 

 HTTP/1.1 301 This is a weirdo text message

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: ../want/10250003.txt

+Location: ../want/%TESTNUMBER0003.txt

 Set-Cookie: nextcookie=data; path=/data/

 Content-Length: 69

 

 HTTP/1.1 200 Followed here fine

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 52

 

@@ -75,26 +75,26 @@
 HTTP Location: following with command-line and server cookies
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1025 -L -c log/jar1025 -b forcedcookie=yes
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -c log/jar%TESTNUMBER -b forcedcookie=yes
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1025 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: forcedcookie=yes

 

-GET /data/10250002.txt HTTP/1.1

+GET /data/%TESTNUMBER0002.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: forcedcookie=yes

 

-GET /want/10250003.txt HTTP/1.1

+GET /want/%TESTNUMBER0003.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1026 b/tests/data/test1026
index 6bda7a4..a702a1d 100644
--- a/tests/data/test1026
+++ b/tests/data/test1026
@@ -28,7 +28,7 @@
 # Search for these two sentinel lines in the manual output; if they are found,
 # then chances are good the entire manual is there.
 <postcheck>
-perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(CONTRIBUTORS)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' log/stdout1026
+perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(curl\s*-\s*transfer\sa\s*URL)|(CONTRIBUTORS)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' log/stdout%TESTNUMBER
 </postcheck>
 </client>
 
diff --git a/tests/data/test1027 b/tests/data/test1027
index 9c3d6e3..7574203 100644
--- a/tests/data/test1027
+++ b/tests/data/test1027
@@ -25,7 +25,7 @@
 # Search for these two sentinel lines in the help output; if they are found,
 # then chances are good the entire help is there.
 <postcheck>
-perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show version)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' log/stdout1027
+perl -e 'open(IN,$ARGV[0]); my $lines=grep(/(Usage: curl )|(--version\s*Show version)/, <IN>); exit ($lines != 2); # Let this file pass an XML syntax check: </IN>' log/stdout%TESTNUMBER
 </postcheck>
 </client>
 
diff --git a/tests/data/test1028 b/tests/data/test1028
index c10d581..cff3028 100644
--- a/tests/data/test1028
+++ b/tests/data/test1028
@@ -15,11 +15,11 @@
 <reply>
 <data1>
 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/html

 Funny-head: yesyes

-Location: ftp://%HOSTIP:%FTPPORT/10280002

+Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002

 Content-Length: 0

 Connection: close

 

@@ -45,7 +45,7 @@
 HTTP Location: redirect to FTP URL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/10280001 -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -L
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /10280001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -63,17 +63,17 @@
 PWD

 EPSV

 TYPE I

-SIZE 10280002

-RETR 10280002

+SIZE %TESTNUMBER0002

+RETR %TESTNUMBER0002

 QUIT

 </protocol>
 <stdout>
 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/html

 Funny-head: yesyes

-Location: ftp://%HOSTIP:%FTPPORT/10280002

+Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002

 Content-Length: 0

 Connection: close

 

diff --git a/tests/data/test1029 b/tests/data/test1029
index 9a351a4..f39ac6e 100644
--- a/tests/data/test1029
+++ b/tests/data/test1029
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10290002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

@@ -30,14 +30,14 @@
 HTTP Location: and 'redirect_url' check
  </name>
 <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1029 -w '%{redirect_url}\n'
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url} %{url} %{exitcode} %{errormsg}\n'
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1029 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -45,12 +45,12 @@
 </protocol>
 <stdout>
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10290002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

 This server reply is for testing a simple Location: following
-http://%HOSTIP:%HTTPPORT/we/want/our/data/10290002.txt?coolsite=yes
+http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER 0 
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test103 b/tests/data/test103
index 15712f5..308c154 100644
--- a/tests/data/test103
+++ b/tests/data/test103
@@ -27,7 +27,7 @@
 FTP RETR PORT with CWD
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/a/path/103 -P -
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER -P -
 </command>
 </client>
 
@@ -46,8 +46,8 @@
 CWD path

 PORT 127,0,0,1,0,0

 TYPE I

-SIZE 103

-RETR 103

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1030 b/tests/data/test1030
index 735c08b..bd4e18f 100644
--- a/tests/data/test1030
+++ b/tests/data/test1030
@@ -67,9 +67,9 @@
 HTTP PUT with --anyauth authorization (picking Digest)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1030 -T log/put1030 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
 </command>
-<file name="log/put1030">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -80,7 +80,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1030 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -91,9 +91,9 @@
 a second line
 line three
 four is the number of lines
-PUT /1030 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1030", response="01cb59db1ddaac246b072d5f5f0716d9"

+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/%TESTNUMBER", response="01cb59db1ddaac246b072d5f5f0716d9"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

diff --git a/tests/data/test1031 b/tests/data/test1031
index b12785a..c6e4795 100644
--- a/tests/data/test1031
+++ b/tests/data/test1031
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: ?coolsite=yes/10310002.txt
+Location: ?coolsite=yes/%TESTNUMBER0002.txt
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -20,7 +20,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -29,13 +29,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: ?coolsite=yes/10310002.txt
+Location: ?coolsite=yes/%TESTNUMBER0002.txt
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -53,19 +53,19 @@
 HTTP Location: following to a query string
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/this/1031 -L
+http://%HOSTIP:%HTTPPORT/want/this/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/this/1031 HTTP/1.1

+GET /want/this/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/this/1031?coolsite=yes/10310002.txt HTTP/1.1

+GET /want/this/%TESTNUMBER?coolsite=yes/%TESTNUMBER0002.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1032 b/tests/data/test1032
index 0c38ae1..8af07dc 100644
--- a/tests/data/test1032
+++ b/tests/data/test1032
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP HEAD with --range
  </name>
  <command>
---range 1-3 --head http://%HOSTIP:%HTTPPORT/1032
+--range 1-3 --head http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-HEAD /1032 HTTP/1.1

+HEAD /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=1-3

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1033 b/tests/data/test1033
index 908dd32..7d9ff03 100644
--- a/tests/data/test1033
+++ b/tests/data/test1033
@@ -16,7 +16,7 @@
 HTTP/1.1 102 unexpected huh?!
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -40,7 +40,7 @@
 HTTP GET with 102 response!
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1033
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1033 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1034 b/tests/data/test1034
index 89083a2..565a1b7 100644
--- a/tests/data/test1034
+++ b/tests/data/test1034
@@ -40,7 +40,7 @@
 # This host name contains an invalid UTF-8 byte sequence that can't be
 # converted into an IDN name
 <stdin>
-url = "http://invalid-utf8-â.local/page/1034"
+url = "http://invalid-utf8-â.local/page/%TESTNUMBER"
 </stdin>
  <command>
 -K - -x %HOSTIP:%NOLISTENPORT
diff --git a/tests/data/test1035 b/tests/data/test1035
index b67eab2..a2b98cc 100644
--- a/tests/data/test1035
+++ b/tests/data/test1035
@@ -35,7 +35,7 @@
 HTTP over proxy with too long IDN host name
  </name>
  <command>
-http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 -x %HOSTIP:%NOLISTENPORT
+http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/%TESTNUMBER -x %HOSTIP:%NOLISTENPORT
 </command>
 </client>
 
diff --git a/tests/data/test1036 b/tests/data/test1036
index b8ebc4f..4ab61a2 100644
--- a/tests/data/test1036
+++ b/tests/data/test1036
@@ -31,9 +31,9 @@
 FTP download resume from end of file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1036 -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -C -
 </command>
-<file name="log/curl1036.out">
+<file name="log/curl%TESTNUMBER.out">
 This is the start!!
 </file>
 </client>
@@ -47,12 +47,12 @@
 EPSV

 PASV

 TYPE I

-SIZE 1036

+SIZE %TESTNUMBER

 REST 20

-RETR 1036

+RETR %TESTNUMBER

 QUIT

 </protocol>
-<file name="log/curl1036.out">
+<file name="log/curl%TESTNUMBER.out">
 This is the start!!
 expected to be a file without the first part
 but we emulate that
diff --git a/tests/data/test1037 b/tests/data/test1037
index d9cdc0a..d9cacb2 100644
--- a/tests/data/test1037
+++ b/tests/data/test1037
@@ -31,9 +31,9 @@
 FTP download resume from end of empty file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1037 -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -C -
 </command>
-<file name="log/curl1037.out">
+<file name="log/curl%TESTNUMBER.out">
 </file>
 </client>
 
@@ -46,8 +46,8 @@
 EPSV

 PASV

 TYPE I

-SIZE 1037

-RETR 1037

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1038 b/tests/data/test1038
index 9572d78..acac84a 100644
--- a/tests/data/test1038
+++ b/tests/data/test1038
@@ -23,9 +23,9 @@
 FTP PASV upload resume from end of file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1038 -T log/upload1038 -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER -C -
 </command>
-<file name="log/upload1038">
+<file name="log/upload%TESTNUMBER">
 this is the *****cr@p******** that we're gonna upload
 
 worx?
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1038

-APPE 1038

+SIZE %TESTNUMBER

+APPE %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test1039 b/tests/data/test1039
index 654d836..53d7cb5 100644
--- a/tests/data/test1039
+++ b/tests/data/test1039
@@ -23,9 +23,9 @@
 FTP PASV upload resume from end of empty file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1039 -T log/upload1039 -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER -C -
 </command>
-<file name="log/upload1039">
+<file name="log/upload%TESTNUMBER">
 this is the *****cr@p******** that we're gonna upload
 
 worx?
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1039

-STOR 1039

+SIZE %TESTNUMBER

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test104 b/tests/data/test104
index 82df98a..8b44911 100644
--- a/tests/data/test104
+++ b/tests/data/test104
@@ -21,7 +21,7 @@
 FTP --head to get file size only
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/a/path/104 --head
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER --head
 </command>
 </client>
 
@@ -33,9 +33,9 @@
 PWD

 CWD a

 CWD path

-MDTM 104

+MDTM %TESTNUMBER

 TYPE I

-SIZE 104

+SIZE %TESTNUMBER

 REST 0

 QUIT

 </protocol>
diff --git a/tests/data/test1040 b/tests/data/test1040
index d480bb4..8899c5b 100644
--- a/tests/data/test1040
+++ b/tests/data/test1040
@@ -47,9 +47,9 @@
 HTTP GET with resume from end of entirely-downloaded file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1040 -C -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C -
 </command>
-<file name="log/curl1040.out">
+<file name="log/curl%TESTNUMBER.out">
 012345678
 012345678
 012345678
@@ -66,7 +66,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1040 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=100-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1041 b/tests/data/test1041
index 4797cf9..5580b95 100644
--- a/tests/data/test1041
+++ b/tests/data/test1041
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Accept-Ranges: bytes

 Content-Length: 0

@@ -31,7 +31,7 @@
  <name>
 HTTP PUT with resume from end of already-uploaded file
  </name>
-<file name="log/test1041.txt">
+<file name="log/test%TESTNUMBER.txt">
 012345678
 012345678
 012345678
@@ -44,7 +44,7 @@
 012345678
 </file>
  <command>
-http://%HOSTIP:%HTTPPORT/1041 -Tlog/test1041.txt -C -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -Tlog/test%TESTNUMBER.txt -C -
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 # curl doesn't do a HEAD request on the remote file so it has no idea whether
 # it can skip part of the file or not.  Instead, it sends the entire file.
 <protocol>
-PUT /1041 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 0-99/100

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1042 b/tests/data/test1042
index d374d2a..4a33ae8 100644
--- a/tests/data/test1042
+++ b/tests/data/test1042
@@ -59,9 +59,9 @@
 HTTP GET beyond end of entirely-downloaded file, no server resume
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1042 -C 200
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 200
 </command>
-<file name="log/curl1042.out">
+<file name="log/curl%TESTNUMBER.out">
 012345678
 012345678
 012345678
@@ -81,7 +81,7 @@
 33
 </errorcode>
 <protocol>
-GET /1042 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=200-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1043 b/tests/data/test1043
index e200b61..c728b96 100644
--- a/tests/data/test1043
+++ b/tests/data/test1043
@@ -58,9 +58,9 @@
 HTTP GET with resume from end of file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1043 -C -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C -
 </command>
-<file name="log/curl1043.out">
+<file name="log/curl%TESTNUMBER.out">
 012345678
 012345678
 012345678
@@ -71,7 +71,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1043 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=40-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1044 b/tests/data/test1044
index a95f568..c5f3a29 100644
--- a/tests/data/test1044
+++ b/tests/data/test1044
@@ -32,7 +32,7 @@
 FTP download large file info with -I
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/1044 -I
+ftp://%HOSTIP:%FTPPORT/blalbla/%TESTNUMBER -I
 </command>
 </client>
 
@@ -43,9 +43,9 @@
 PASS ftp@example.com

 PWD

 CWD blalbla

-MDTM 1044

+MDTM %TESTNUMBER

 TYPE I

-SIZE 1044

+SIZE %TESTNUMBER

 REST 0

 QUIT

 </protocol>
diff --git a/tests/data/test1045 b/tests/data/test1045
index 9de169b..c2c7df7 100644
--- a/tests/data/test1045
+++ b/tests/data/test1045
@@ -32,7 +32,7 @@
 HTTP GET with numeric localhost --interface
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1045 --interface %CLIENTIP
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --interface %CLIENTIP
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1045 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1046 b/tests/data/test1046
index 0f04b8a..f781098 100644
--- a/tests/data/test1046
+++ b/tests/data/test1046
@@ -36,7 +36,7 @@
 HTTP-IPv6 GET with numeric localhost --interface
  </name>
  <command>
--g "http://%HOST6IP:%HTTP6PORT/1046" --interface ::1
+-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface ::1
 </command>
 # --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out
 <precheck>
@@ -48,7 +48,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1046 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1049 b/tests/data/test1049
index de18bee..713b4bb 100644
--- a/tests/data/test1049
+++ b/tests/data/test1049
@@ -28,7 +28,7 @@
 TFTP retrieve with localhost --interface
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT//1049 --interface %CLIENTIP
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --interface %CLIENTIP
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /1049
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test105 b/tests/data/test105
index cc811ae..74922d5 100644
--- a/tests/data/test105
+++ b/tests/data/test105
@@ -19,7 +19,6 @@
 </data>
 <servercmd>
 REPLY EPSV 500 no such command
-REPLY SIZE 500 no such command
 </servercmd>
 </reply>
 
@@ -32,7 +31,7 @@
 FTP user+password in URL and ASCII transfer
  </name>
  <command>
-ftp://userdude:passfellow@%HOSTIP:%FTPPORT/105 --use-ascii
+ftp://userdude:passfellow@%HOSTIP:%FTPPORT/%TESTNUMBER --use-ascii
 </command>
 </client>
 
@@ -45,8 +44,7 @@
 EPSV

 PASV

 TYPE A

-SIZE 105

-RETR 105

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1051 b/tests/data/test1051
index 7a8eae1..5a1cf34 100644
--- a/tests/data/test1051
+++ b/tests/data/test1051
@@ -13,7 +13,7 @@
 HTTP/1.1 301 Redirect swsclose

 Date: Thu, 29 Jul 2008 14:49:00 GMT

 Server: test-server/fake

-Location: data/10510002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 0

 Connection: close

 

@@ -32,7 +32,7 @@
 HTTP/1.1 301 Redirect swsclose

 Date: Thu, 29 Jul 2008 14:49:00 GMT

 Server: test-server/fake

-Location: data/10510002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 0

 Connection: close

 

@@ -56,9 +56,9 @@
 HTTP PUT with Location: following
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1051 -L -T log/test1051.txt
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test1051.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -80,7 +80,7 @@
 # server says 301 and 100 _after_ the entire PUT body has been sent.
 
 <protocol>
-PUT /want/1051 HTTP/1.1

+PUT /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -96,7 +96,7 @@
 the
    PUT
       feature
-PUT /want/data/10510002.txt?coolsite=yes HTTP/1.1

+PUT /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1052 b/tests/data/test1052
index e0c2f32..8f8ee61 100644
--- a/tests/data/test1052
+++ b/tests/data/test1052
@@ -13,7 +13,7 @@
 HTTP/1.0 301 Redirect swsclose

 Date: Thu, 29 Jul 2008 14:49:00 GMT

 Server: test-server/fake

-Location: data/10520002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 0

 Connection: close

 

@@ -30,7 +30,7 @@
 HTTP/1.0 301 Redirect swsclose

 Date: Thu, 29 Jul 2008 14:49:00 GMT

 Server: test-server/fake

-Location: data/10520002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 0

 Connection: close

 

@@ -52,9 +52,9 @@
 HTTP 1.0 PUT with Location: following
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1052 -0 -L -T log/test1052.txt
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -0 -L -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test1052.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -75,7 +75,7 @@
 # including the full request-body before it responds. So in this test the
 # server says 301 and 200 _after_ the entire PUT body has been sent.
 <protocol>
-PUT /want/1052 HTTP/1.0

+PUT /want/%TESTNUMBER HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -90,7 +90,7 @@
 the
    PUT
       feature
-PUT /want/data/10520002.txt?coolsite=yes HTTP/1.0

+PUT /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1053 b/tests/data/test1053
index 5f3ec29..bd5de25 100644
--- a/tests/data/test1053
+++ b/tests/data/test1053
@@ -15,14 +15,14 @@
 HTTP/1.1 307 Redirect swsclose

 Date: Thu, 29 Jul 2008 14:49:00 GMT

 Server: test-server/fake

-Location: data/10530002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 0

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 11

 Connection: close

@@ -34,12 +34,12 @@
 HTTP/1.1 307 Redirect swsclose

 Date: Thu, 29 Jul 2008 14:49:00 GMT

 Server: test-server/fake

-Location: data/10530002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 0

 Connection: close

 

 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 11

 Connection: close

@@ -58,10 +58,10 @@
 HTTP RFC1867-type formposting from file with Location: following
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1053 -L -F name=daniel -F tool=curl -F file=@log/test1053.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -L -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt
 </command>
 # We create this file before the command is invoked!
-<file name="log/test1053.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo-
 This is a moo-
 bar
@@ -74,7 +74,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/1053 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -90,7 +90,7 @@
 

 curl

 ------------------------------9ef8d6205763

-Content-Disposition: form-data; name="file"; filename="test1053.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
@@ -98,7 +98,7 @@
 bar
 

 ------------------------------9ef8d6205763--

-POST /we/want/data/10530002.txt?coolsite=yes HTTP/1.1

+POST /we/want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -114,7 +114,7 @@
 

 curl

 ------------------------------9ef8d6205763

-Content-Disposition: form-data; name="file"; filename="test1053.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
diff --git a/tests/data/test1054 b/tests/data/test1054
index ac6671f..d8b1d45 100644
--- a/tests/data/test1054
+++ b/tests/data/test1054
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsclose

-Location: moo/testcase/10540002

+Location: moo/testcase/%TESTNUMBER0002

 Date: Thu, 31 Jul 2008 14:49:00 GMT

 Connection: close

 

@@ -26,7 +26,7 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 OK swsclose

-Location: moo/testcase/10540002

+Location: moo/testcase/%TESTNUMBER0002

 Date: Thu, 31 Jul 2008 14:49:00 GMT

 Connection: close

 

@@ -47,11 +47,11 @@
  <name>
 HTTP POST from file with 301 redirect and --post301
  </name>
-<file name="log/test1054.txt">
+<file name="log/test%TESTNUMBER.txt">
 field=data
 </file>
  <command>
-http://%HOSTIP:%HTTPPORT/blah/1054 -L -d @log/test1054.txt --post301
+http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d @log/test%TESTNUMBER.txt --post301
 </command>
 </client>
 
@@ -59,14 +59,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /blah/1054 HTTP/1.1

+POST /blah/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 10

 Content-Type: application/x-www-form-urlencoded

 

-field=dataPOST /blah/moo/testcase/10540002 HTTP/1.1

+field=dataPOST /blah/moo/testcase/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1055 b/tests/data/test1055
index 4788ae7..f6f3753 100644
--- a/tests/data/test1055
+++ b/tests/data/test1055
@@ -15,10 +15,10 @@
 <reply>
 <data>
 HTTP/1.1 307 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/html

-Location: ftp://%HOSTIP:%FTPPORT/1055

+Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER

 Content-Length: 0

 Connection: close

 

@@ -36,9 +36,9 @@
 HTTP PUT Location: redirect to FTP URL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1055 -L -T log/test1055.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -L -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test1055.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -55,7 +55,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1055 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -76,7 +76,7 @@
 PWD

 EPSV

 TYPE I

-STOR 1055

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test1056 b/tests/data/test1056
index 7ccdb21..2bf70cc 100644
--- a/tests/data/test1056
+++ b/tests/data/test1056
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose

-Location: http://[::1%259999]:%HTTP6PORT/moo/10560002

+Location: http://[::1%259999]:%HTTP6PORT/moo/%TESTNUMBER0002

 Date: Thu, 31 Jul 2008 14:49:00 GMT

 Connection: close

 

@@ -27,7 +27,7 @@
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose

-Location: http://[::1%259999]:%HTTP6PORT/moo/10560002

+Location: http://[::1%259999]:%HTTP6PORT/moo/%TESTNUMBER0002

 Date: Thu, 31 Jul 2008 14:49:00 GMT

 Connection: close

 

@@ -53,7 +53,7 @@
 HTTP follow redirect from IPv4 to IPv6 with scope
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/1056 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -61,12 +61,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/1056 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /moo/10560002 HTTP/1.1

+GET /moo/%TESTNUMBER0002 HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1057 b/tests/data/test1057
index b4ef20c..ce3fc0b 100644
--- a/tests/data/test1057
+++ b/tests/data/test1057
@@ -30,7 +30,7 @@
 FTP retrieve a byte-range relative to end of file
  </name>
  <command>
--r -12 ftp://%HOSTIP:%FTPPORT/1057
+-r -12 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -42,9 +42,9 @@
 PWD

 EPSV

 TYPE I

-SIZE 1057

+SIZE %TESTNUMBER

 REST 52

-RETR 1057

+RETR %TESTNUMBER

 ABOR

 QUIT

 </protocol>
diff --git a/tests/data/test1058 b/tests/data/test1058
index d177b5f..ee6c300 100644
--- a/tests/data/test1058
+++ b/tests/data/test1058
@@ -33,14 +33,14 @@
 HTTP range relative to end of file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1058 -r -101
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -r -101
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1058 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=-101

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1059 b/tests/data/test1059
index 32e5aec..95d4b95 100644
--- a/tests/data/test1059
+++ b/tests/data/test1059
@@ -14,7 +14,7 @@
 <reply>
 <connect>
 HTTP/1.1 501 Method not implemented swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 Content-Length: 0

 

@@ -35,7 +35,7 @@
 HTTP CONNECT with proxytunnel to unsupported FTP URL
  </name>
  <command>
-ftp://test-number:1059/wanted/page -p -x %HOSTIP:%HTTPPORT
+ftp://test-number:%TESTNUMBER/wanted/page -p -x %HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -47,8 +47,8 @@
 56
 </errorcode>
 <protocol>
-CONNECT test-number:1059 HTTP/1.1

-Host: test-number:1059

+CONNECT test-number:%TESTNUMBER HTTP/1.1

+Host: test-number:%TESTNUMBER

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test106 b/tests/data/test106
index 56eca64..981e9df 100644
--- a/tests/data/test106
+++ b/tests/data/test106
@@ -29,7 +29,7 @@
 FTP GET with type=A style ASCII URL using %20 codes
  </name>
  <command>
-"ftp://%HOSTIP:%FTPPORT//path%20with%20%20spaces//and%20things2/106;type=A"
+"ftp://%HOSTIP:%FTPPORT//path%20with%20%20spaces//and%20things2/%TESTNUMBER;type=A"
 </command>
 </client>
 
@@ -44,8 +44,7 @@
 CWD and things2

 EPSV

 TYPE A

-SIZE 106

-RETR 106

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1060 b/tests/data/test1060
index 889a390..7eab061 100644
--- a/tests/data/test1060
+++ b/tests/data/test1060
@@ -825,7 +825,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -851,7 +851,7 @@
 Server: no
 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -875,26 +875,26 @@
 HTTP proxy CONNECT auth Digest, large headers and data
  </name>
  <command>
-http://test.remote.haxx.se.1060:8990/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.haxx.se.1060:8990 HTTP/1.1

-Host: test.remote.haxx.se.1060:8990

+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.haxx.se.1060:8990 HTTP/1.1

-Host: test.remote.haxx.se.1060:8990

-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1060:8990", response="e1fbed39c26f4efe284adc0e576ff638"

+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.%TESTNUMBER:8990", response="e1fbed39c26f4efe284adc0e576ff638"

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /path/10600002 HTTP/1.1

-Host: test.remote.haxx.se.1060:8990

+GET /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1061 b/tests/data/test1061
index 1c1c3b1..c7fcedb 100644
--- a/tests/data/test1061
+++ b/tests/data/test1061
@@ -830,7 +830,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -856,7 +856,7 @@
 Server: no
 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -880,26 +880,26 @@
 HTTP proxy CONNECT auth Digest, large headers and chunked data
  </name>
  <command>
-http://test.remote.haxx.se.1061:8990/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.haxx.se.1061:8990 HTTP/1.1

-Host: test.remote.haxx.se.1061:8990

+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.haxx.se.1061:8990 HTTP/1.1

-Host: test.remote.haxx.se.1061:8990

-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1061:8990", response="4e23449fa93224834299e7282a70472c"

+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.%TESTNUMBER:8990", response="4e23449fa93224834299e7282a70472c"

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /path/10610002 HTTP/1.1

-Host: test.remote.haxx.se.1061:8990

+GET /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1062 b/tests/data/test1062
index d96686e..df72e66 100644
--- a/tests/data/test1062
+++ b/tests/data/test1062
@@ -28,7 +28,7 @@
 FTP with excessively long server command response lines, boundary condition
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/1062
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -41,8 +41,8 @@
 CWD path

 EPSV

 TYPE I

-SIZE 1062

-RETR 1062

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1063 b/tests/data/test1063
index de2085d..ca1ba14 100644
--- a/tests/data/test1063
+++ b/tests/data/test1063
@@ -28,9 +28,9 @@
 # This range value is 2**32+7, which will be truncated to the valid value 7
 # if the large file support is not working correctly
  <command>
--r 4294967303- file://localhost%FILE_PWD/log/test1063.txt 
+-r 4294967303- file://localhost%FILE_PWD/log/test%TESTNUMBER.txt 
 </command>
-<file name="log/test1063.txt">
+<file name="log/test%TESTNUMBER.txt">
 1234567890
 1234567890
 </file>
diff --git a/tests/data/test1064 b/tests/data/test1064
index 3d2f4d2..8101484 100644
--- a/tests/data/test1064
+++ b/tests/data/test1064
@@ -35,9 +35,9 @@
 HTTP PUT twice
  </name>
  <command>
--H "Expect:" -T log/1064 http://%HOSTIP:%HTTPPORT/1064.upload1 -T log/1064 http://%HOSTIP:%HTTPPORT/10640002.upload2
+-H "Expect:" -T log/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload1 -T log/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002.upload2
 </command>
-<file name="log/1064">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -45,14 +45,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1064.upload1 HTTP/1.1

+PUT /%TESTNUMBER.upload1 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 5

 

 test
-PUT /10640002.upload2 HTTP/1.1

+PUT /%TESTNUMBER0002.upload2 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1065 b/tests/data/test1065
index 1d27ffb..8bef0e1 100644
--- a/tests/data/test1065
+++ b/tests/data/test1065
@@ -36,9 +36,9 @@
 HTTP PUT with one file but two URLs
  </name>
  <command>
--H "Expect:" -T log/1065 http://%HOSTIP:%HTTPPORT/1065.upload1 http://%HOSTIP:%HTTPPORT/10650002.url2
+-H "Expect:" -T log/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER.upload1 http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002.url2
 </command>
-<file name="log/1065">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -46,14 +46,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1065.upload1 HTTP/1.1

+PUT /%TESTNUMBER.upload1 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 5

 

 test
-GET /10650002.url2 HTTP/1.1

+GET /%TESTNUMBER0002.url2 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1066 b/tests/data/test1066
index 8175af1..1fbd7dc 100644
--- a/tests/data/test1066
+++ b/tests/data/test1066
@@ -35,19 +35,19 @@
 HTTP --dump-header - with two URLs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1066 http://%HOSTIP:%HTTPPORT/want/10660001 --dump-header -
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER0001 --dump-header -
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1066 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/10660001 HTTP/1.1

+GET /want/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1067 b/tests/data/test1067
index 4706a0a..e5023f5 100644
--- a/tests/data/test1067
+++ b/tests/data/test1067
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/10670002.txt?coolsite=yes
+Location: data/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -20,7 +20,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -29,13 +29,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/10670002.txt?coolsite=yes
+Location: data/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -53,25 +53,28 @@
 HTTP Location: following with auto-referer
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1067 -L --referer "firstone.html;auto"
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER --silent --location --referer "firstone.html;auto" --write-out "%{stderr}|%{referer}|"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1067 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Referer: firstone.html

 

-GET /want/data/10670002.txt?coolsite=yes HTTP/1.1

+GET /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Referer: http://%HOSTIP:%HTTPPORT/want/1067

+Referer: http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER

 

 </protocol>
+<stderr nonewline="yes">
+|http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER|
+</stderr>
 </verify>
 </testcase>
diff --git a/tests/data/test1068 b/tests/data/test1068
index 15a702d..bf3ae4e 100644
--- a/tests/data/test1068
+++ b/tests/data/test1068
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 

 blablabla
@@ -29,7 +29,7 @@
 HTTP PUT from stdin
 </name>
  <command>
-http://%HOSTIP:%HTTPPORT/bzz/1068 -T -
+http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER -T -
 </command>
 <stdin>
 more than one byte
@@ -39,7 +39,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /bzz/1068 HTTP/1.1

+PUT /bzz/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1069 b/tests/data/test1069
index c47c357..2eb6659 100644
--- a/tests/data/test1069
+++ b/tests/data/test1069
@@ -20,7 +20,7 @@
 HTTP 1.0 PUT from stdin with no content length
 </name>
  <command>
-http://%HOSTIP:%HTTPPORT/bzz/1069 -T - -0
+http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER -T - -0
 </command>
 <stdin>
 this data can't be sent
diff --git a/tests/data/test107 b/tests/data/test107
index 25b6452..911de45 100644
--- a/tests/data/test107
+++ b/tests/data/test107
@@ -15,7 +15,7 @@
  <name>
 FTP PASV upload file
  </name>
-<file name="log/test107.txt">
+<file name="log/test%TESTNUMBER.txt">
 data
     to
       see
@@ -24,7 +24,7 @@
   so does it?
 </file>
  <command>
-ftp://%HOSTIP:%FTPPORT/107 -T log/test107.txt
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 PWD

 EPSV

 TYPE I

-STOR 107

+STOR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1070 b/tests/data/test1070
index 6056e5d..3e4d37a 100644
--- a/tests/data/test1070
+++ b/tests/data/test1070
@@ -32,9 +32,9 @@
 HTTP POST with server closing connection before (all) data is received
  </name>
  <command>
- -d @log/input1070 http://%HOSTIP:%HTTPPORT/1070 -H "Expect: 100-continue"
+ -d @log/input%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H "Expect: 100-continue"
 </command>
-<file name="log/input1070">
+<file name="log/input%TESTNUMBER">
 This creates the named file with this content before the test case is run,
 which is useful if the test case needs a file to act on. We create this file
 rather large (larger than your typical TCP packet) so that not all of it can nor
@@ -49,7 +49,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /1070 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1071 b/tests/data/test1071
index d89b74b..6c69472 100644
--- a/tests/data/test1071
+++ b/tests/data/test1071
@@ -73,9 +73,9 @@
 Downgraded HTTP PUT to HTTP 1.0 with authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1071 -T log/put1071 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
 </command>
-<file name="log/put1071">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -86,7 +86,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1071 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -97,9 +97,9 @@
 a second line
 line three
 four is the number of lines
-PUT /1071 HTTP/1.0

+PUT /%TESTNUMBER HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1071", response="df4cef6b52a30e65d472dd848d2055a1"

+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/%TESTNUMBER", response="df4cef6b52a30e65d472dd848d2055a1"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

diff --git a/tests/data/test1072 b/tests/data/test1072
index 128f094..c0d4c18 100644
--- a/tests/data/test1072
+++ b/tests/data/test1072
@@ -40,7 +40,7 @@
 HTTP chunked PUT to HTTP 1.0 server with authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1072 -T - -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T - -u testuser:testpass --anyauth
 </command>
 <stdin>
 This is data we upload with PUT
@@ -56,14 +56,18 @@
 25
 </errorcode>
 <protocol>
-PUT /1072 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Transfer-Encoding: chunked

 Expect: 100-continue

 

+%if hyper
+7A

+%else
 7a

+%endif
 This is data we upload with PUT
 it comes from stdin so MUST be sent
 with chunked encoding
diff --git a/tests/data/test1073 b/tests/data/test1073
index 80f5ec0..3f6d703 100644
--- a/tests/data/test1073
+++ b/tests/data/test1073
@@ -18,7 +18,7 @@
 HTTP/1.0 301 Redirect swsclose

 Server: testcurl

 Content-Type: text/plain

-Location: /newlocation/10730002

+Location: /newlocation/%TESTNUMBER0002

 Content-Length: 0

 Connection: close

 

@@ -34,7 +34,7 @@
 HTTP chunked PUT to HTTP 1.0 server with redirect
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1073 -T - -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T - -L
 </command>
 <stdin>
 This is data we upload with PUT
@@ -50,14 +50,18 @@
 25
 </errorcode>
 <protocol>
-PUT /1073 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Transfer-Encoding: chunked

 Expect: 100-continue

 

+%if hyper
+7A

+%else
 7a

+%endif
 This is data we upload with PUT
 it comes from stdin so MUST be sent
 with chunked encoding
diff --git a/tests/data/test1074 b/tests/data/test1074
index 840d461..55a956e 100644
--- a/tests/data/test1074
+++ b/tests/data/test1074
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 9

 Connection: Keep-Alive

 

@@ -19,7 +19,7 @@
 </data>
 <data1>
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 surprise2
@@ -39,7 +39,7 @@
 HTTP downgrade to HTTP/1.0 on second request
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1074 http://%HOSTIP:%HTTPPORT/wantmore/10740001
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/wantmore/%TESTNUMBER0001
 </command>
 </client>
 
@@ -47,25 +47,25 @@
 <verify>
 <stdout>
 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 9

 Connection: Keep-Alive

 

 surprise
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 surprise2
 </stdout>
 
 <protocol>
-GET /want/1074 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /wantmore/10740001 HTTP/1.0

+GET /wantmore/%TESTNUMBER0001 HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1075 b/tests/data/test1075
index f0f255a..2d111f2 100644
--- a/tests/data/test1075
+++ b/tests/data/test1075
@@ -52,9 +52,9 @@
 HTTP PUT with --anyauth authorization (picking Basic)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1075 -T log/put1075 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
 </command>
-<file name="log/put1075">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -65,7 +65,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1075 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -76,7 +76,7 @@
 a second line
 line three
 four is the number of lines
-PUT /1075 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1076 b/tests/data/test1076
index 8322be2..017a7d1 100644
--- a/tests/data/test1076
+++ b/tests/data/test1076
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose
-Location: moo.html&testcase=/10760002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: moo.html&testcase=/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose
-Location: moo.html&testcase=/10760002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: moo.html&testcase=/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
@@ -49,7 +49,7 @@
 HTTP POST with 302 redirect and --post302
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/blah/1076 -L -d "moo" --post302
+http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d "moo" --post302
 </command>
 </client>
 
@@ -57,14 +57,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /blah/1076 HTTP/1.1

+POST /blah/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooPOST /blah/moo.html&testcase=/10760002 HTTP/1.1

+mooPOST /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1077 b/tests/data/test1077
index 8b1d288..28af6e9 100644
--- a/tests/data/test1077
+++ b/tests/data/test1077
@@ -14,7 +14,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/plain

 Content-Length: 9

@@ -25,7 +25,7 @@
 </data>
 <data2>
 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/plain

 Content-Length: 9

@@ -50,7 +50,7 @@
 FTP over HTTP proxy with downgrade to HTTP 1.0
  </name>
  <command>
--x %HOSTIP:%HTTPPORT ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1077 ftp://%HOSTIP:%HTTPPORT/we/want/that/page/10770002
+-x %HOSTIP:%HTTPPORT ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER0002
 </command>
 </client>
 
@@ -58,13 +58,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1077 HTTP/1.1

+GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/10770002 HTTP/1.0

+GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER0002 HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1078 b/tests/data/test1078
index 65c77ed..6f303d0 100644
--- a/tests/data/test1078
+++ b/tests/data/test1078
@@ -21,7 +21,7 @@
 
 <data nocheck="yes">
 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -43,7 +43,7 @@
 HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
  </name>
  <command>
---proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078
+--proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -54,20 +54,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT %HOSTIP.1078:%HTTPPORT HTTP/1.0

-Host: %HOSTIP.1078:%HTTPPORT

+CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.0

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/1078 HTTP/1.1

-Host: %HOSTIP.1078:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/want/that/page/1078 HTTP/1.0

-Host: %HOSTIP.1078:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.0

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

@@ -77,7 +77,7 @@
 Server: test tunnel 2000

 

 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -86,7 +86,7 @@
 

 contents
 HTTP/1.0 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

diff --git a/tests/data/test1079 b/tests/data/test1079
index 460439d..361c4bd 100644
--- a/tests/data/test1079
+++ b/tests/data/test1079
@@ -49,7 +49,7 @@
 HTTP retry after closed connection and empty response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1079 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
@@ -59,14 +59,14 @@
 52
 </errorcode>
 <protocol>
-GET /1079 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1079 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1079", response="e340c7cdca0950462070f46ee139e9f7"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="e340c7cdca0950462070f46ee139e9f7"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test108 b/tests/data/test108
index eb2ea63..6f6e3c8 100644
--- a/tests/data/test108
+++ b/tests/data/test108
@@ -21,9 +21,9 @@
 FTP PORT upload with CWD
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/CWD/STOR/RETR/108 -T log/upload108 -P -
+ftp://%HOSTIP:%FTPPORT/CWD/STOR/RETR/%TESTNUMBER -T log/upload%TESTNUMBER -P -
 </command>
-<file name="log/upload108">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
  upload this
 </file>
@@ -45,7 +45,7 @@
 CWD RETR

 PORT 127,0,0,1,5,109

 TYPE I

-STOR 108

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test1080 b/tests/data/test1080
index 9fa4857..bc7249a 100644
--- a/tests/data/test1080
+++ b/tests/data/test1080
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10800002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

@@ -30,19 +30,19 @@
 HTTP Location: on two URLs 'redirect_url' check
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1080 http://%HOSTIP:%HTTPPORT/we/want/our/1080 -w '%{redirect_url}\n'
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url}\n'
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1080 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/want/our/1080 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -50,19 +50,19 @@
 </protocol>
 <stdout>
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10800002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

 This server reply is for testing a simple Location: following
-http://%HOSTIP:%HTTPPORT/we/want/our/data/10800002.txt?coolsite=yes
+http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10800002.txt?coolsite=yes

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

 This server reply is for testing a simple Location: following
-http://%HOSTIP:%HTTPPORT/we/want/our/data/10800002.txt?coolsite=yes
+http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1081 b/tests/data/test1081
index 2a5a765..9f5a192 100644
--- a/tests/data/test1081
+++ b/tests/data/test1081
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10810099.txt?coolsite=yes

+Location: data/%TESTNUMBER0099.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

@@ -21,7 +21,7 @@
 </data>
 <data2 nocheck="yes">
 HTTP/1.1 200 Followed here fine swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 41

 

@@ -38,19 +38,19 @@
 HTTP no Location: on second URL 'redirect_url' check
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1081 http://%HOSTIP:%HTTPPORT/we/want/our/10810002 -w '%{redirect_url}\n'
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER0002 -w '%{redirect_url}\n'
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1081 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/want/our/10810002 HTTP/1.1

+GET /we/want/our/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -58,14 +58,14 @@
 </protocol>
 <stdout>
 HTTP/1.1 301 This is a weirdo text message swsclose

-Location: data/10810099.txt?coolsite=yes

+Location: data/%TESTNUMBER0099.txt?coolsite=yes

 Content-Length: 62

 Connection: close

 

 This server reply is for testing a simple Location: following
-http://%HOSTIP:%HTTPPORT/we/want/our/data/10810099.txt?coolsite=yes
+http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0099.txt?coolsite=yes
 HTTP/1.1 200 Followed here fine swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 41

 

diff --git a/tests/data/test1082 b/tests/data/test1082
index 0df70af..d4dd0e9 100644
--- a/tests/data/test1082
+++ b/tests/data/test1082
@@ -32,7 +32,7 @@
 HTTP GET with localhost --interface
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1082 --interface localhost
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -4 --interface 127.0.0.1
 </command>
 <precheck>
 perl -e "print 'Test requires default test client host address' if ( '%CLIENTIP' ne '127.0.0.1' );"
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1082 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1083 b/tests/data/test1083
index 89beea0..d7713b1 100644
--- a/tests/data/test1083
+++ b/tests/data/test1083
@@ -36,7 +36,7 @@
 HTTP-IPv6 GET with ip6-localhost --interface
  </name>
  <command>
--g "http://%HOST6IP:%HTTP6PORT/1083" --interface ip6-localhost
+-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface ip6-localhost
 </command>
 <precheck>
 perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1083 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1084 b/tests/data/test1084
index db6ab5e..7a6292b 100644
--- a/tests/data/test1084
+++ b/tests/data/test1084
@@ -27,7 +27,7 @@
 HTTP GET with invalid --interface
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/1084 --interface non-existing-host.haxx.se.
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER --interface non-existing-host.haxx.se.
 </command>
 </client>
 
diff --git a/tests/data/test1085 b/tests/data/test1085
index ac1f062..582fdb0 100644
--- a/tests/data/test1085
+++ b/tests/data/test1085
@@ -29,7 +29,7 @@
 HTTP-IPv6 GET with invalid --interface
  </name>
  <command>
--g "http://%HOST6IP:%NOLISTENPORT/1085" --interface non-existing-host.haxx.se.
+-g "http://%HOST6IP:%NOLISTENPORT/%TESTNUMBER" --interface non-existing-host.haxx.se.
 </command>
 # Ensure the IPv6 stack is operational before running this test (other tests
 # use the startup of the IPv6 test server as a substitute check for this).
diff --git a/tests/data/test1086 b/tests/data/test1086
index 354b2e0..f081ebd 100644
--- a/tests/data/test1086
+++ b/tests/data/test1086
@@ -87,7 +87,7 @@
 FTP download with strict timeout and slow data transfer
  </name>
  <command timeout="1">
-ftp://%HOSTIP:%FTPPORT/1086 -m 7
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -m 7
 </command>
 </client>
 
@@ -103,8 +103,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1086

-RETR 1086

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1087 b/tests/data/test1087
index f674294..b084c9b 100644
--- a/tests/data/test1087
+++ b/tests/data/test1087
@@ -22,18 +22,18 @@
 </data1000>
 <data1001 nocheck="yes">
 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

-Location: http://goto.second.host.now/10871002

+Location: http://goto.second.host.now/%TESTNUMBER1002

 Content-Length: 0

 Connection: close

 

 </data1001>
 <data1002 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

@@ -49,16 +49,16 @@
 Content-Length: 0

 

 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

-Location: http://goto.second.host.now/10871002

+Location: http://goto.second.host.now/%TESTNUMBER1002

 Content-Length: 0

 Connection: close

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

@@ -78,7 +78,7 @@
 HTTP, proxy with --anyauth and Location: to new host
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/10871000 -x %HOSTIP:%HTTPPORT --user iam:myself --location --anyauth
+http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 -x %HOSTIP:%HTTPPORT --user iam:myself --location --anyauth
 </command>
 <features>
 proxy
@@ -89,20 +89,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/10871000 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 HTTP/1.1

 Host: first.host.it.is

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://first.host.it.is/we/want/that/page/10871000 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 HTTP/1.1

 Host: first.host.it.is

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://goto.second.host.now/10871002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER1002 HTTP/1.1

 Host: goto.second.host.now

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1088 b/tests/data/test1088
index 649cb88..9f12f25 100644
--- a/tests/data/test1088
+++ b/tests/data/test1088
@@ -23,18 +23,18 @@
 </data1000>
 <data1001 nocheck="yes">
 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

-Location: http://goto.second.host.now/10881002

+Location: http://goto.second.host.now/%TESTNUMBER1002

 Content-Length: 0

 Connection: close

 

 </data1001>
 <data1003 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

@@ -50,16 +50,16 @@
 Content-Length: 0

 

 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

-Location: http://goto.second.host.now/10881002

+Location: http://goto.second.host.now/%TESTNUMBER1002

 Content-Length: 0

 Connection: close

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/plain

 Funny-head: yesyes

@@ -79,7 +79,7 @@
 HTTP, proxy with --anyauth and Location: to new host using location-trusted
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/10881000 -x %HOSTIP:%HTTPPORT --user iam:myself --location-trusted --anyauth
+http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 -x %HOSTIP:%HTTPPORT --user iam:myself --location-trusted --anyauth
 </command>
 <features>
 proxy
@@ -90,20 +90,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/10881000 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 HTTP/1.1

 Host: first.host.it.is

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://first.host.it.is/we/want/that/page/10881000 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 HTTP/1.1

 Host: first.host.it.is

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://goto.second.host.now/10881002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER1002 HTTP/1.1

 Host: goto.second.host.now

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1089 b/tests/data/test1089
index d4b8791..c8c5307 100644
--- a/tests/data/test1089
+++ b/tests/data/test1089
@@ -13,17 +13,17 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./10890001

+Location: ./%TESTNUMBER0001

 

 monster
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 15

 Connection: close

 Content-Type: text/plain; charset=us-ascii

@@ -43,7 +43,7 @@
 HTTP GET --write-out with redirected fetch
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1089 -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
 </command>
 </client>
 
@@ -51,12 +51,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1089 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /10890001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -65,14 +65,14 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./10890001

+Location: ./%TESTNUMBER0001

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 15

 Connection: close

 Content-Type: text/plain; charset=us-ascii

@@ -81,7 +81,7 @@
 2
 1
 15
-http://%HOSTIP:%HTTPPORT/10890001
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 text/plain; charset=us-ascii
 200
 </stdout>
diff --git a/tests/data/test109 b/tests/data/test109
index c027885..739e90b 100644
--- a/tests/data/test109
+++ b/tests/data/test109
@@ -21,9 +21,9 @@
 FTP PASV upload append
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/109 -T log/upload109 --append
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER --append
 </command>
-<file name="log/upload109">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
  upload this
 </file>
@@ -37,7 +37,7 @@
 PWD

 EPSV

 TYPE I

-APPE 109

+APPE %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test1090 b/tests/data/test1090
index 9ae803f..0551519 100644
--- a/tests/data/test1090
+++ b/tests/data/test1090
@@ -14,17 +14,17 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./10900001

+Location: ./%TESTNUMBER0001

 

 monster
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Transfer-Encoding: chunked

 Connection: close

 Content-Type: text/plain; charset=us-ascii

@@ -50,7 +50,7 @@
 HTTP GET --write-out with redirected fetch and chunked reply
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1090 -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
 </command>
 </client>
 
@@ -58,12 +58,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1090 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /10900001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -72,14 +72,14 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./10900001

+Location: ./%TESTNUMBER0001

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Transfer-Encoding: chunked

 Connection: close

 Content-Type: text/plain; charset=us-ascii

@@ -88,7 +88,7 @@
 2
 1
 15
-http://%HOSTIP:%HTTPPORT/10900001
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 text/plain; charset=us-ascii
 200
 </stdout>
diff --git a/tests/data/test1091 b/tests/data/test1091
index 2466933..788f2dc 100644
--- a/tests/data/test1091
+++ b/tests/data/test1091
@@ -24,7 +24,7 @@
 FTP URL with type=i
  </name>
  <command>
-"ftp://%HOSTIP:%FTPPORT/%2ftmp/moo/1091;type=i" --use-ascii
+"ftp://%HOSTIP:%FTPPORT/%2ftmp/moo/%TESTNUMBER;type=i" --use-ascii
 </command>
 </client>
 
@@ -39,8 +39,8 @@
 CWD moo

 EPSV

 TYPE I

-SIZE 1091

-RETR 1091

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1092 b/tests/data/test1092
index d3ea902..1c3c469 100644
--- a/tests/data/test1092
+++ b/tests/data/test1092
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -36,7 +36,7 @@
 FTP with type=i over HTTP proxy
  </name>
  <command>
-"ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1092;type=i" --use-ascii -x %HOSTIP:%HTTPPORT
+"ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER;type=i" --use-ascii -x %HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1092;type=i HTTP/1.1

+GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER;type=i HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1093 b/tests/data/test1093
index da2d83c..5e1484d 100644
--- a/tests/data/test1093
+++ b/tests/data/test1093
@@ -28,7 +28,7 @@
 TFTP retrieve with mode=i
  </name>
  <command>
-"tftp://%HOSTIP:%TFTPPORT//1093;mode=i" --use-ascii
+"tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER;mode=i" --use-ascii
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /1093
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1094 b/tests/data/test1094
index c7b09ca..3ed53f2 100644
--- a/tests/data/test1094
+++ b/tests/data/test1094
@@ -34,7 +34,7 @@
 TFTP retrieve with mode=netascii
  </name>
  <command>
-"tftp://%HOSTIP:%TFTPPORT//1094;mode=netascii"
+"tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER;mode=netascii"
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /1094
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1095 b/tests/data/test1095
index 3e562b0..efb8413 100644
--- a/tests/data/test1095
+++ b/tests/data/test1095
@@ -59,21 +59,21 @@
 HTTP with Digest and realm with quoted quotes
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1095 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1095 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1095 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="test \"this\" realm!!", nonce="1053604145", uri="/1095", response="a1c7931ece9e8617bae2715045e4f49f"

+Authorization: Digest username="testuser", realm="test \"this\" realm!!", nonce="1053604145", uri="/%TESTNUMBER", response="a1c7931ece9e8617bae2715045e4f49f"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1096 b/tests/data/test1096
index a6c32c3..2eb9d1f 100644
--- a/tests/data/test1096
+++ b/tests/data/test1096
@@ -24,7 +24,7 @@
 Two FTP downloads, with failed RETR but re-used control connection
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/dir/1096 ftp://%HOSTIP:%FTPPORT/dir/1096
+ftp://%HOSTIP:%FTPPORT/dir/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/dir/%TESTNUMBER
 </command>
 </client>
 
@@ -40,11 +40,11 @@
 CWD dir

 EPSV

 TYPE I

-SIZE 1096

-RETR 1096

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 1096

-RETR 1096

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1097 b/tests/data/test1097
index 218d57b..5a73e89 100644
--- a/tests/data/test1097
+++ b/tests/data/test1097
@@ -53,21 +53,21 @@
 HTTP POST using CONNECT with --proxy-ntlm but no auth is required
  </name>
  <command>
-http://test.a.galaxy.far.far.away.1097:%HTTPPORT/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p
+http://test.a.galaxy.far.far.away.%TESTNUMBER:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-CONNECT test.a.galaxy.far.far.away.1097:%HTTPPORT HTTP/1.1

-Host: test.a.galaxy.far.far.away.1097:%HTTPPORT

+CONNECT test.a.galaxy.far.far.away.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.a.galaxy.far.far.away.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-POST /1097 HTTP/1.1

-Host: test.a.galaxy.far.far.away.1097:%HTTPPORT

+POST /%TESTNUMBER HTTP/1.1

+Host: test.a.galaxy.far.far.away.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test1098 b/tests/data/test1098
index a8d25cb..8e31c32 100644
--- a/tests/data/test1098
+++ b/tests/data/test1098
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 

 hello
@@ -36,7 +36,7 @@
  </name>
 
  <command>
-ftp://ftp-site/moo/1098 ftp://ftp-site/moo/1098 --proxy http://%HOSTIP:%HTTPPORT
+ftp://ftp-site/moo/%TESTNUMBER ftp://ftp-site/moo/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -44,13 +44,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://ftp-site/moo/1098 HTTP/1.1

+GET ftp://ftp-site/moo/%TESTNUMBER HTTP/1.1

 Host: ftp-site:21

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET ftp://ftp-site/moo/1098 HTTP/1.1

+GET ftp://ftp-site/moo/%TESTNUMBER HTTP/1.1

 Host: ftp-site:21

 User-Agent: curl/%VERSION

 Accept: */*

@@ -59,12 +59,12 @@
 </protocol>
 <stdout>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 

 hello
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 

 hello
diff --git a/tests/data/test1099 b/tests/data/test1099
index 4a33189..f2fa2f2 100644
--- a/tests/data/test1099
+++ b/tests/data/test1099
@@ -9,7 +9,7 @@
 
 <reply>
 <data nocheck="yes">
-data for 1099
+data for %TESTNUMBER
 </data>
 </reply>
 
@@ -23,7 +23,7 @@
 TFTP get first a non-existing file then an existing
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT/an/invalid-file tftp://%HOSTIP:%TFTPPORT//1099
+tftp://%HOSTIP:%TFTPPORT/an/invalid-file tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
 </command>
 </client>
 
@@ -42,10 +42,10 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /1099
+filename: /%TESTNUMBER
 </protocol>
 <stdout>
-data for 1099
+data for %TESTNUMBER
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test11 b/tests/data/test11
index 3eed8a1..89844ea 100644
--- a/tests/data/test11
+++ b/tests/data/test11
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/110002.txt?coolsite=yes
+Location: data/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -20,7 +20,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -29,13 +29,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/110002.txt?coolsite=yes
+Location: data/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -53,19 +53,19 @@
 simple HTTP Location: following
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/11 -L
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/11 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data/110002.txt?coolsite=yes HTTP/1.1

+GET /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test110 b/tests/data/test110
index b63ba8a..6c892ed 100644
--- a/tests/data/test110
+++ b/tests/data/test110
@@ -30,7 +30,7 @@
 FTP download resume with set limit
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/110 -C 20
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -C 20
 </command>
 </client>
 
@@ -43,9 +43,9 @@
 EPSV

 PASV

 TYPE I

-SIZE 110

+SIZE %TESTNUMBER

 REST 20

-RETR 110

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1100 b/tests/data/test1100
index 5bb8072..d6e101b 100644
--- a/tests/data/test1100
+++ b/tests/data/test1100
@@ -32,7 +32,7 @@
 HTTP/1.1 302 Thanks for this, but we want to redir you!

 Server: Microsoft-IIS/5.0

 Content-Type: text/html; charset=iso-8859-1

-Location: /1100

+Location: /%TESTNUMBER

 Content-Length: 34

 

 This is not the real page either!
@@ -48,7 +48,7 @@
 HTTP/1.1 302 Thanks for this, but we want to redir you!

 Server: Microsoft-IIS/5.0

 Content-Type: text/html; charset=iso-8859-1

-Location: /1100

+Location: /%TESTNUMBER

 Content-Length: 34

 

 HTTP/1.1 200 Thanks for this! swsclose

@@ -80,7 +80,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away" 
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L -d "stuff to send away" 
 </command>
 <precheck>
 chkhostname curlhost
@@ -89,7 +89,7 @@
 
 # Verify data after the test has been "shot"
 <verify>
-POST /1100 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

@@ -97,19 +97,18 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /1100 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 18

 Content-Type: application/x-www-form-urlencoded

 

-stuff to send awayGET /1100 HTTP/1.1

+stuff to send awayGET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-</protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1101 b/tests/data/test1101
index eaf16bd..f7e504f 100644
--- a/tests/data/test1101
+++ b/tests/data/test1101
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 4

 Content-Type: text/html

@@ -34,14 +34,14 @@
 http_proxy=http://non-existing-host.haxx.se:3128/
 </setenv>
  <command>
-http://user:secret@%HOSTIP:%HTTPPORT/gimme/1101
+http://user:secret@%HOSTIP:%HTTPPORT/gimme/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /gimme/1101 HTTP/1.1

+GET /gimme/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpzZWNyZXQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1102 b/tests/data/test1102
index addc7b5..c2fd034 100644
--- a/tests/data/test1102
+++ b/tests/data/test1102
@@ -28,7 +28,7 @@
 FTP OS/400 server name format check
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1102
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,8 +43,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1102

-RETR 1102

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1103 b/tests/data/test1103
index 4d45056..4624c9d 100644
--- a/tests/data/test1103
+++ b/tests/data/test1103
@@ -27,7 +27,7 @@
 FTP non-OS/400 server
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1103
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 SYST

 EPSV

 TYPE I

-SIZE 1103

-RETR 1103

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1104 b/tests/data/test1104
index 2c5b9fc..27c4300 100644
--- a/tests/data/test1104
+++ b/tests/data/test1104
@@ -12,8 +12,8 @@
 <reply>
 <data>
 HTTP/1.1 301 Moved
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Location: /want/data/11040002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Location: /want/data/%TESTNUMBER0002
 Server: test-server/fake
 Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
 Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 13 11:56:27 GMT 2037;
@@ -24,7 +24,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -33,15 +33,15 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 Moved
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Location: /want/data/11040002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Location: /want/data/%TESTNUMBER0002
 Server: test-server/fake
 Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
 Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 13 11:56:27 GMT 2037;
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -59,7 +59,7 @@
 HTTP cookie expiry date at Jan 1 00:00:00 GMT 1970
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1104 -L -x %HOSTIP:%HTTPPORT -c log/cookies1104.jar
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x %HOSTIP:%HTTPPORT -c log/cookies%TESTNUMBER.jar
 </command>
 <features>
 proxy
@@ -69,13 +69,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/want/1104 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://%HOSTIP:%HTTPPORT/want/data/11040002 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/data/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1105 b/tests/data/test1105
index 8142ad2..a06a051 100644
--- a/tests/data/test1105
+++ b/tests/data/test1105
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -32,7 +32,7 @@
 HTTP with cookie parser and header recording
  </name>
  <command>
-"http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword"
+"http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?parm1=this*that/other/thing&parm2=foobar/%TESTNUMBER" -c log/cookie%TESTNUMBER.txt -d "userid=myname&password=mypassword"
 </command>
 <precheck>
 perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105 HTTP/1.1

+POST /we/want/%TESTNUMBER?parm1=this*that/other/thing&parm2=foobar/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -51,9 +51,9 @@
 

 userid=myname&password=mypassword
 </protocol>
-<file name="log/cookie1105.txt" mode="text">
+<file name="log/cookie%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 127.0.0.1	FALSE	"/silly/"	FALSE	0	mismatch	this
diff --git a/tests/data/test1106 b/tests/data/test1106
index e23c33c..f6e5893 100644
--- a/tests/data/test1106
+++ b/tests/data/test1106
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Accept-Ranges: bytes

 Content-Length: 6

@@ -37,7 +37,7 @@
 ftp_proxy=http://%HOSTIP:%HTTPPORT/
 </setenv>
  <command>
-ftp://%HOSTIP:23456/1106
+ftp://%HOSTIP:23456/%TESTNUMBER
 </command>
 
 </client>
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://%HOSTIP:23456/1106 HTTP/1.1

+GET ftp://%HOSTIP:23456/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:23456

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1107 b/tests/data/test1107
index 6adc636..4946e89 100644
--- a/tests/data/test1107
+++ b/tests/data/test1107
@@ -31,7 +31,7 @@
 FTP RETR PASV with PRET
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1107 --ftp-pret
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-pret
 </command>
 
 </client>
@@ -42,11 +42,11 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-PRET RETR 1107

+PRET RETR %TESTNUMBER

 EPSV

 TYPE I

-SIZE 1107

-RETR 1107

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1108 b/tests/data/test1108
index f83eb95..3667b11 100644
--- a/tests/data/test1108
+++ b/tests/data/test1108
@@ -24,7 +24,7 @@
 FTP RETR PASV with PRET not supported
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1108 --ftp-pret
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-pret
 </command>
 
 </client>
@@ -35,7 +35,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-PRET RETR 1108

+PRET RETR %TESTNUMBER

 </protocol>
 # we expect that the server doesn't understand PRET
 <errorcode>
diff --git a/tests/data/test1109 b/tests/data/test1109
index e504ce9..eb209a5 100644
--- a/tests/data/test1109
+++ b/tests/data/test1109
@@ -26,7 +26,7 @@
 HTTP GET with URL that contains fragment after the path
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1109#test
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER#test
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1109 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test111 b/tests/data/test111
index bcaa554..25df3ae 100644
--- a/tests/data/test111
+++ b/tests/data/test111
@@ -23,7 +23,7 @@
 FTP download resume beyond file size
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/111 -C 2000
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -C 2000
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 PWD

 EPSV

 TYPE I

-SIZE 111

+SIZE %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1110 b/tests/data/test1110
index 50bd4d2..a363fef 100644
--- a/tests/data/test1110
+++ b/tests/data/test1110
@@ -27,7 +27,7 @@
 HTTP GET with URL that contains a fragment after the query part
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1110?q=foobar#fragment
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER?q=foobar#fragment
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1110?q=foobar HTTP/1.1

+GET /%TESTNUMBER?q=foobar HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1111 b/tests/data/test1111
index 1ba21bf..1e9203a 100644
--- a/tests/data/test1111
+++ b/tests/data/test1111
@@ -27,7 +27,7 @@
 HTTP GET with URL whose fragment contains a # (which is illegal)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1111?q=foobar#fragment#fragment2
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER?q=foobar#fragment#fragment2
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1111?q=foobar HTTP/1.1

+GET /%TESTNUMBER?q=foobar HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1112 b/tests/data/test1112
index 849f671..b918c73 100644
--- a/tests/data/test1112
+++ b/tests/data/test1112
@@ -89,7 +89,7 @@
 FTPS download with strict timeout and slow data transfer
  </name>
  <command timeout="1">
--k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/1112 -m 16
+-k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/%TESTNUMBER -m 16
 </command>
 </client>
 
@@ -107,8 +107,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1112

-RETR 1112

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1115 b/tests/data/test1115
index 0b1f034..315fce3 100644
--- a/tests/data/test1115
+++ b/tests/data/test1115
@@ -33,14 +33,14 @@
 HTTP GET with unexpected 1xx response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1115
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1115 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1116 b/tests/data/test1116
index ce5305d..7a883bf 100644
--- a/tests/data/test1116
+++ b/tests/data/test1116
@@ -23,8 +23,10 @@
 cccccccccccccccccccccccccccccccc
 

 0

+%if !hyper
 chunky-trailer: header data

 another-header: yes

+%endif
 

 </data>
 <datacheck>
@@ -34,8 +36,10 @@
 Connection: mooo

 

 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccc
+%if !hyper
 chunky-trailer: header data

 another-header: yes

+%endif
 </datacheck>
 </reply>
 
@@ -49,7 +53,7 @@
 HTTP GET with chunked trailer without Trailer:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1116 -D log/heads1116
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -57,20 +61,22 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1116 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/heads1116">
+<file name="log/heads%TESTNUMBER">
 HTTP/1.1 200 funky chunky!

 Server: fakeit/0.9 fakeitbad/1.0

 Transfer-Encoding: chunked

 Connection: mooo

 

+%if !hyper
 chunky-trailer: header data

 another-header: yes

+%endif
 </file>
 </verify>
 
diff --git a/tests/data/test1117 b/tests/data/test1117
index 79c9fd4..50466aa 100644
--- a/tests/data/test1117
+++ b/tests/data/test1117
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 416 Requested Range Not Satisfiable

-Date: Thu, 09 Sep 2010 14:49:00 GMT

+Date: Tue, 09 Sep 2010 14:49:00 GMT

 Accept-Ranges: bytes

 Content-Length: 115

 

@@ -21,7 +21,7 @@
 
 <data1>
 HTTP/1.1 206 Partial Content

-Date: Thu, 09 Sep 2010 14:49:01 GMT

+Date: Tue, 09 Sep 2010 14:49:01 GMT

 Accept-Ranges: bytes

 Content-Range: bytes 10-18/155

 Content-Length: 13

@@ -44,7 +44,7 @@
 HTTP with invalid range then another URL
  </name>
  <command>
--r 10-22 http://%HOSTIP:%HTTPPORT/want/1117 http://%HOSTIP:%HTTPPORT/wantmore/11170001
+-r 10-22 http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/wantmore/%TESTNUMBER0001
 </command>
 </client>
 
@@ -52,14 +52,14 @@
 <verify>
 <stdout>
 HTTP/1.1 416 Requested Range Not Satisfiable

-Date: Thu, 09 Sep 2010 14:49:00 GMT

+Date: Tue, 09 Sep 2010 14:49:00 GMT

 Accept-Ranges: bytes

 Content-Length: 115

 

 This is a long error message that is large enough that the test server is
 guaranteed to split it into two packets.
 HTTP/1.1 206 Partial Content

-Date: Thu, 09 Sep 2010 14:49:01 GMT

+Date: Tue, 09 Sep 2010 14:49:01 GMT

 Accept-Ranges: bytes

 Content-Range: bytes 10-18/155

 Content-Length: 13

@@ -69,13 +69,13 @@
 </stdout>
 
 <protocol>
-GET /want/1117 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=10-22

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /wantmore/11170001 HTTP/1.1

+GET /wantmore/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=10-22

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1118 b/tests/data/test1118
index 702b2df..9024e08 100644
--- a/tests/data/test1118
+++ b/tests/data/test1118
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 URL without slash and @-letter in query
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT?email=name@example.com/1118
+http://%HOSTIP:%HTTPPORT?email=name@example.com/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /?email=name@example.com/1118 HTTP/1.1

+GET /?email=name@example.com/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test112 b/tests/data/test112
index eb3400c..6d23c44 100644
--- a/tests/data/test112
+++ b/tests/data/test112
@@ -20,9 +20,9 @@
 FTP PASV upload resume
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/112 -T log/upload112 -C 40
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER -C 40
 </command>
-<file name="log/upload112">
+<file name="log/upload%TESTNUMBER">
 this is the *****crap******** that we're gonna upload
 
 worx?
@@ -37,7 +37,7 @@
 PWD

 EPSV

 TYPE I

-APPE 112

+APPE %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test1120 b/tests/data/test1120
index 4ea2042..c7cd275 100644
--- a/tests/data/test1120
+++ b/tests/data/test1120
@@ -23,7 +23,7 @@
 FTP with 421 timeout response
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/a/path/1120
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1121 b/tests/data/test1121
index 839c553..823a52e 100644
--- a/tests/data/test1121
+++ b/tests/data/test1121
@@ -27,7 +27,7 @@
 HTTP multiple provided Host: headers
  </name>
  <command>
--H "Host: host1" -H "Host: host2" -H "Host: host3" http://%HOSTIP:%HTTPPORT/1121
+-H "Host: host1" -H "Host: host2" -H "Host: host3" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1121 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: host1

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1122 b/tests/data/test1122
index d5b51a2..8f2fd87 100644
--- a/tests/data/test1122
+++ b/tests/data/test1122
@@ -48,7 +48,7 @@
 HTTP GET gzip transfer-encoded content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1122 --tr-encoding
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --tr-encoding
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1122 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1123 b/tests/data/test1123
index 841a326..5ee8400 100644
--- a/tests/data/test1123
+++ b/tests/data/test1123
@@ -179,7 +179,7 @@
 HTTP GET deflate transfer-encoded content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1123 --tr-encoding
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --tr-encoding
 </command>
 </client>
 
@@ -187,7 +187,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1123 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1124 b/tests/data/test1124
index 61c5cfb..fc3c9cf 100644
--- a/tests/data/test1124
+++ b/tests/data/test1124
@@ -47,7 +47,7 @@
 HTTP GET gzip+chunked transfer-encoded content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1124 --tr-encoding
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --tr-encoding
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1124 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1125 b/tests/data/test1125
index 51e3db7..1bb306b 100644
--- a/tests/data/test1125
+++ b/tests/data/test1125
@@ -48,7 +48,7 @@
 HTTP GET transfer-encoding with custom Connection:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1125 --tr-encoding -H "Connection: close"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --tr-encoding -H "Connection: close"
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1125 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1126 b/tests/data/test1126
index 4f99072..d45f40d 100644
--- a/tests/data/test1126
+++ b/tests/data/test1126
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2003 12:10:00 GMT
 Content-Length: 11
@@ -31,7 +31,7 @@
 HTTP 200 If-Modified-Since with newer document
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1126 -z "dec 12 12:00:00 1999 GMT"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "dec 12 12:00:00 1999 GMT"
 </command>
 </client>
 
@@ -39,7 +39,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1126 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1127 b/tests/data/test1127
index e1453a6..968f80b 100644
--- a/tests/data/test1127
+++ b/tests/data/test1127
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
 Content-Length: 11
@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
 Content-Length: 11
@@ -40,7 +40,7 @@
 HTTP 200 If-Modified-Since with older document
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1127 -z "dec 12 12:00:00 1999 GMT"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "dec 12 12:00:00 1999 GMT"
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1127 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1128 b/tests/data/test1128
index a18f487..193ee40 100644
--- a/tests/data/test1128
+++ b/tests/data/test1128
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
 Content-Length: 11
@@ -21,7 +21,7 @@
 </data>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:01 GMT
+Date: Tue, 09 Nov 2010 14:49:01 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2002 12:10:00 GMT
 Content-Length: 11
@@ -41,7 +41,7 @@
 HTTP 200 If-Modified-Since with old+new documents
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1128 http://%HOSTIP:%HTTPPORT/11280001 -z "dec 12 12:00:00 1999 GMT"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -z "dec 12 12:00:00 1999 GMT"
 </command>
 </client>
 
@@ -49,13 +49,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1128 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT

 

-GET /11280001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -65,14 +65,14 @@
 
 <stdout>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
 Content-Length: 11
 Content-Type: text/html
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:01 GMT
+Date: Tue, 09 Nov 2010 14:49:01 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2002 12:10:00 GMT
 Content-Length: 11
diff --git a/tests/data/test1129 b/tests/data/test1129
index cadf806..df4a9b0 100644
--- a/tests/data/test1129
+++ b/tests/data/test1129
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 404 NOOOOOOOOO
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
@@ -22,7 +22,7 @@
 
 <data1>
 HTTP/1.1 404 NEITHER
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
@@ -41,7 +41,7 @@
 # Client-side
 <client>
 # 1053700 x 'x'
-<file name="log/file1129">
+<file name="log/file%TESTNUMBER">
 %repeat[1053700 x x]%
 </file>
 <server>
@@ -51,7 +51,7 @@
 HTTP POST expect 100-continue with a 404
  </name>
  <command option="no-output">
--d @log/file1129 http://%HOSTIP:%HTTPPORT/1129 http://%HOSTIP:%HTTPPORT/11290001
+-d @log/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 </command>
 </client>
 
@@ -60,14 +60,14 @@
 <verify>
 <stdout>
 HTTP/1.1 404 NOOOOOOOOO
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
 
 -foo-
 HTTP/1.1 404 NEITHER
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
@@ -75,7 +75,7 @@
 -foo-
 </stdout>
 <protocol>
-POST /1129 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -83,7 +83,7 @@
 Content-Type: application/x-www-form-urlencoded

 Expect: 100-continue

 

-POST /11290001 HTTP/1.1

+POST /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test113 b/tests/data/test113
index 0046297..8264a6f 100644
--- a/tests/data/test113
+++ b/tests/data/test113
@@ -21,7 +21,7 @@
 FTP download, failed login: USER not valid
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/113
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1130 b/tests/data/test1130
index 01836cd..50ebedd 100644
--- a/tests/data/test1130
+++ b/tests/data/test1130
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 404 NOOOOOOOOO
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
@@ -22,7 +22,7 @@
 
 <data1>
 HTTP/1.1 404 NEITHER
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
@@ -41,7 +41,7 @@
 # Client-side
 <client>
 # 100 x 'x'
-<file name="log/file1130">
+<file name="log/file%TESTNUMBER">
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 </file>
 <server>
@@ -51,7 +51,7 @@
 HTTP POST forced expect 100-continue with a 404
  </name>
  <command option="no-output">
--d @log/file1130 http://%HOSTIP:%HTTPPORT/1130 http://%HOSTIP:%HTTPPORT/11300001 -H "Expect: 100-continue"
+-d @log/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -H "Expect: 100-continue"
 </command>
 </client>
 
@@ -60,14 +60,14 @@
 <verify>
 <stdout>
 HTTP/1.1 404 NOOOOOOOOO
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
 
 -foo-
 HTTP/1.1 404 NEITHER
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Content-Type: text/html
@@ -75,7 +75,7 @@
 -foo-
 </stdout>
 <protocol>
-POST /1130 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -83,7 +83,7 @@
 Content-Length: 100

 Content-Type: application/x-www-form-urlencoded

 

-POST /11300001 HTTP/1.1

+POST /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1131 b/tests/data/test1131
index 64df118..8ead289 100644
--- a/tests/data/test1131
+++ b/tests/data/test1131
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 400 NOOOOOOOOO
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 9
 Content-Type: text/html
@@ -22,7 +22,7 @@
 
 <data1>
 HTTP/1.1 400 NEITHER
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 9
 Content-Type: text/html
@@ -41,7 +41,7 @@
 # Client-side
 <client>
 # 100 x 'x'
-<file name="log/file1131">
+<file name="log/file%TESTNUMBER">
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 </file>
 <server>
@@ -51,7 +51,7 @@
 HTTP PUT expect 100-continue with a 400
  </name>
  <command option="no-output">
--T log/file1131 http://%HOSTIP:%HTTPPORT/1131 -T log/file1131 http://%HOSTIP:%HTTPPORT/11310001
+-T log/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 </command>
 </client>
 
@@ -60,14 +60,14 @@
 <verify>
 <stdout>
 HTTP/1.1 400 NOOOOOOOOO
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 9
 Content-Type: text/html
 
 FAILURE1
 HTTP/1.1 400 NEITHER
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 9
 Content-Type: text/html
@@ -75,14 +75,14 @@
 FAILURE2
 </stdout>
 <protocol>
-PUT /1131 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 100

 Expect: 100-continue

 

-PUT /11310001 HTTP/1.1

+PUT /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1133 b/tests/data/test1133
index 555bafc..cd15f54 100644
--- a/tests/data/test1133
+++ b/tests/data/test1133
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 10

 

@@ -26,10 +26,10 @@
 HTTP RFC1867-type formposting with filename/data contains ',', ';', '"'
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1133 -F "file=@\"log/test1133,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"log/test1133,and;.txt"' -F 'file3=@"log/test1133,and;.txt";type=m/f,"log/test1133,and;.txt"' -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" -F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"log/test%TESTNUMBER,and;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"log/test%TESTNUMBER,and;.txt"' -F 'file3=@"log/test%TESTNUMBER,and;.txt";type=m/f,"log/test%TESTNUMBER,and;.txt"' -F a="{\"field1\":\"value1\",\"field2\":\"value2\"}" -F 'b=" \\value1;type=\"whatever\" "; type=text/foo; charset=utf-8 ; filename=param_b'
 </command>
 # We create this file before the command is invoked!
-<file name="log/test1133,and;.txt">
+<file name="log/test%TESTNUMBER,and;.txt">
 foo bar
 This is a bar foo
 bar
@@ -43,7 +43,7 @@
 ^(Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).*
 </strip>
 <protocol>
-POST /we/want/1133 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -60,7 +60,7 @@
 foo
 

 ------------------------------24e78000bd32

-Content-Disposition: form-data; name="file2"; filename="test1133,and;.txt"

+Content-Disposition: form-data; name="file2"; filename="test%TESTNUMBER,and;.txt"

 Content-Type: text/plain

 

 foo bar
@@ -72,7 +72,7 @@
 Content-Disposition: form-data; name="file3"

 Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b

 

-Content-Disposition: attachment; filename="test1133,and;.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER,and;.txt"

 Content-Type: m/f

 

 foo bar
@@ -80,7 +80,7 @@
 bar
 foo
 

-Content-Disposition: attachment; filename="test1133,and;.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER,and;.txt"

 Content-Type: text/plain

 

 foo bar
diff --git a/tests/data/test1134 b/tests/data/test1134
index 52aafcc..01ceba1 100644
--- a/tests/data/test1134
+++ b/tests/data/test1134
@@ -14,14 +14,14 @@
 </servercmd>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 10
 
 contents1
 </data>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 10
 
 contents2
@@ -38,7 +38,7 @@
 HTTP connection re-use with different credentials
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1134 -u user1:password1 --next http://%HOSTIP:%HTTPPORT/11340001 -u 2user:password2
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u user1:password1 --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -u 2user:password2
 </command>
 </client>
 
@@ -46,13 +46,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1134 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjE6cGFzc3dvcmQx

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /11340001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic MnVzZXI6cGFzc3dvcmQy

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1136 b/tests/data/test1136
index 75b6ee8..1ce5336 100644
--- a/tests/data/test1136
+++ b/tests/data/test1136
@@ -14,7 +14,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -45,16 +45,16 @@
 TZ=GMT
 </setenv>
 <command>
-http://www.example.ck/1136 http://www.ck/1136 http://z-1.compute-1.amazonaws.com/1136 -b none -c log/jar1136.txt -x %HOSTIP:%HTTPPORT
+http://www.example.ck/%TESTNUMBER http://www.ck/%TESTNUMBER http://z-1.compute-1.amazonaws.com/%TESTNUMBER -b none -c log/jar%TESTNUMBER.txt -x %HOSTIP:%HTTPPORT
 </command>
 
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/jar1136.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .z-1.compute-1.amazonaws.com	TRUE	/	FALSE	0	test5	forbidden5
diff --git a/tests/data/test1137 b/tests/data/test1137
index a2bfcba..aa37325 100644
--- a/tests/data/test1137
+++ b/tests/data/test1137
@@ -31,7 +31,7 @@
 FTP RETR --ignore-content-length
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1137 --ignore-content-length
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ignore-content-length
 </command>
 
 </client>
@@ -45,7 +45,7 @@
 EPSV

 PASV

 TYPE I

-RETR 1137

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1138 b/tests/data/test1138
index a69d40f..6c5f00d 100644
--- a/tests/data/test1138
+++ b/tests/data/test1138
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose

-Location: ../moo.html/?name=آغاز-سم-زدایی-از-بازار-پول&testcase=/11380002    

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: ../moo.html/?name=آغاز-سم-زدایی-از-بازار-پول&testcase=/%TESTNUMBER0002    

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose

-Location: ../moo.html/?name=آغاز-سم-زدایی-از-بازار-پول&testcase=/11380002    

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: ../moo.html/?name=آغاز-سم-زدایی-از-بازار-پول&testcase=/%TESTNUMBER0002    

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -49,7 +49,7 @@
 HTTP redirect with UTF-8 characters
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/1138 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +57,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/1138 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/are/all/moo.html/?name=%d8%a2%d8%ba%d8%a7%d8%b2-%d8%b3%d9%85-%d8%b2%d8%af%d8%a7%db%8c%db%8c-%d8%a7%d8%b2-%d8%a8%d8%a7%d8%b2%d8%a7%d8%b1-%d9%be%d9%88%d9%84&testcase=/11380002 HTTP/1.1

+GET /we/are/all/moo.html/?name=%d8%a2%d8%ba%d8%a7%d8%b2-%d8%b3%d9%85-%d8%b2%d8%af%d8%a7%db%8c%db%8c-%d8%a7%d8%b2-%d8%a8%d8%a7%d8%b2%d8%a7%d8%b1-%d9%be%d9%88%d9%84&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test114 b/tests/data/test114
index 6611aed..8d8cc86 100644
--- a/tests/data/test114
+++ b/tests/data/test114
@@ -21,7 +21,7 @@
 FTP download, failed login: PASS not valid
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/114
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1141 b/tests/data/test1141
index 063d3b2..97faec4 100644
--- a/tests/data/test1141
+++ b/tests/data/test1141
@@ -12,7 +12,7 @@
 <data>
 HTTP/1.1 302 This is a weirdo text message
 Connection: close
-Location: http:///foo.example.com/want/11410001
+Location: http:///foo.example.com/want/%TESTNUMBER0001
 
 This server reply is for testing
 </data>
@@ -26,7 +26,7 @@
 <datacheck>
 HTTP/1.1 302 This is a weirdo text message
 Connection: close
-Location: http:///foo.example.com/want/11410001
+Location: http:///foo.example.com/want/%TESTNUMBER0001
 
 HTTP/1.1 200 hello
 Connection: close
@@ -45,7 +45,7 @@
 HTTP redirect to http:/// (three slashes!)
  </name>
  <command>
-%HOSTIP:%HTTPPORT/want/1141 -L -x http://%HOSTIP:%HTTPPORT
+%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -55,13 +55,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/want/1141 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://foo.example.com/want/11410001 HTTP/1.1

+GET http://foo.example.com/want/%TESTNUMBER0001 HTTP/1.1

 Host: foo.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1142 b/tests/data/test1142
index 3577ac4..b8dc33e 100644
--- a/tests/data/test1142
+++ b/tests/data/test1142
@@ -12,7 +12,7 @@
 <data>
 HTTP/1.1 302 This is a weirdo text message
 Connection: close
-Location: http:////foo.example.com/want/11420001
+Location: http:////foo.example.com/want/%TESTNUMBER0001
 
 This server reply is for testing
 </data>
@@ -26,7 +26,7 @@
 <datacheck>
 HTTP/1.1 302 This is a weirdo text message
 Connection: close
-Location: http:////foo.example.com/want/11420001
+Location: http:////foo.example.com/want/%TESTNUMBER0001
 
 </datacheck>
 </reply>
@@ -40,7 +40,7 @@
 HTTP redirect to http://// (four slashes!)
  </name>
  <command>
-%HOSTIP:%HTTPPORT/want/1142 -L -x http://%HOSTIP:%HTTPPORT
+%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -50,7 +50,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/want/1142 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1143 b/tests/data/test1143
index 8239c44..a3b9740 100644
--- a/tests/data/test1143
+++ b/tests/data/test1143
@@ -26,7 +26,7 @@
 HTTP URL with http:/ (one slash!)
  </name>
  <command>
-http:/%HOSTIP:%HTTPPORT/want/1143
+http:/%HOSTIP:%HTTPPORT/want/%TESTNUMBER
 </command>
 <setenv>
 # Needed for MSYS2 to not treat the argument as a POSIX path list
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1143 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1144 b/tests/data/test1144
index 5883555..1fc852b 100644
--- a/tests/data/test1144
+++ b/tests/data/test1144
@@ -47,7 +47,7 @@
 HTTP HEAD, receive no headers only body
  </name>
  <command>
--I http://%HOSTIP:%HTTPPORT/1144 --http0.9
+-I http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http0.9
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-HEAD /1144 HTTP/1.1

+HEAD /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1145 b/tests/data/test1145
index 287bebf..ce85552 100644
--- a/tests/data/test1145
+++ b/tests/data/test1145
@@ -19,9 +19,9 @@
 # This command should not succeed since we only accept
 # file:/// file://localhost/ file://127.0.0.1/
 <command>
-file://bad-host%PWD/log/test1145.txt
+file://bad-host%PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test1145.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
diff --git a/tests/data/test1146 b/tests/data/test1146
index 636748e..0278ab8 100644
--- a/tests/data/test1146
+++ b/tests/data/test1146
@@ -25,9 +25,9 @@
 --proto-default file
 </name>
 <command option="no-include">
---proto-default file %PWD/log/test1146.txt
+--proto-default file %PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test1146.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
diff --git a/tests/data/test1147 b/tests/data/test1147
index faad899..78cf49a 100644
--- a/tests/data/test1147
+++ b/tests/data/test1147
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,16 +35,18 @@
  <name>
 Get -H headers from a file
  </name>
-<file name="log/heads1147.txt">
+<file name="log/heads%TESTNUMBER.txt">
 One: 1
 Two: 2
 no-colon
 
+%if !hyper
  And A Funny One : wohoo
+%endif
 User-Agent:
 </file>
  <command>
-http://%HOSTIP:%HTTPPORT/1147 -H @log/heads1147.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H @log/heads%TESTNUMBER.txt
 </command>
 </client>
 
@@ -52,12 +54,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1147 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 One: 1

 Two: 2

+%if !hyper
  And A Funny One : wohoo

+%endif
 

 </protocol>
 </verify>
diff --git a/tests/data/test1148 b/tests/data/test1148
index a4839e2..658cfca 100644
--- a/tests/data/test1148
+++ b/tests/data/test1148
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 progress-bar
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1148 -# --stderr log/stderrlog1148
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -# --stderr log/stderrlog%TESTNUMBER
 </command>
 <setenv>
 LC_ALL=
@@ -46,7 +46,7 @@
 #
 <verify>
 <protocol>
-GET /1148 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -56,7 +56,7 @@
 # Check that the progress finished at 100% and has the right bar width.
 # Note the dot in 100.0% is regex to match any character since different
 # locales use different separators.
-<file name="log/stderrlog1148" mode="text">
+<file name="log/stderrlog%TESTNUMBER" mode="text">
 correct
 </file>
 <stripfile>
diff --git a/tests/data/test1149 b/tests/data/test1149
index f0c297d..ac4d1c1 100644
--- a/tests/data/test1149
+++ b/tests/data/test1149
@@ -37,7 +37,7 @@
 FTP dir list multicwd then again nocwd
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/list/this/path/1149/ --ftp-method multicwd --next ftp://%HOSTIP:%FTPPORT/list/this/path/1149/ --ftp-method nocwd
+ftp://%HOSTIP:%FTPPORT/list/this/path/%TESTNUMBER/ --ftp-method multicwd --next ftp://%HOSTIP:%FTPPORT/list/this/path/%TESTNUMBER/ --ftp-method nocwd
 </command>
 </client>
 
@@ -51,13 +51,13 @@
 CWD list

 CWD this

 CWD path

-CWD 1149

+CWD %TESTNUMBER

 EPSV

 TYPE A

 LIST

 CWD /

 EPSV

-LIST list/this/path/1149

+LIST list/this/path/%TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test115 b/tests/data/test115
index f37a7e9..8690278 100644
--- a/tests/data/test115
+++ b/tests/data/test115
@@ -23,7 +23,7 @@
 FTP download, failed PASV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/115
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1150 b/tests/data/test1150
index f951f57..6a07b73 100644
--- a/tests/data/test1150
+++ b/tests/data/test1150
@@ -12,7 +12,7 @@
 # this is returned when we get a GET!
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Content-Type: text/html
 Funny-head: yesyes
@@ -30,7 +30,7 @@
 HTTP proxy with URLs using different ports
  </name>
  <command>
---proxy http://%HOSTIP:%HTTPPORT http://test.remote.example.com.1150:150/path http://test.remote.example.com.1150:1234/path/
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.example.com.%TESTNUMBER:150/path http://test.remote.example.com.%TESTNUMBER:1234/path/
 </command>
 <features>
 proxy
@@ -40,14 +40,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://test.remote.example.com.1150:150/path HTTP/1.1

-Host: test.remote.example.com.1150:150

+GET http://test.remote.example.com.%TESTNUMBER:150/path HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:150

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.example.com.1150:1234/path/ HTTP/1.1

-Host: test.remote.example.com.1150:1234

+GET http://test.remote.example.com.%TESTNUMBER:1234/path/ HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:1234

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1151 b/tests/data/test1151
index e3abcbe..c31382c 100644
--- a/tests/data/test1151
+++ b/tests/data/test1151
@@ -17,7 +17,7 @@
 # 4094 bytes name + 1 byte content is fine
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF=E; domain=127.0.0.1; path=/;
+
 </data>
 </reply>
 
@@ -38,22 +39,22 @@
 HTTP with too long cookies
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1151 -c log/cookies1151.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -c log/cookies%TESTNUMBER.txt
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1151 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/cookies1151.txt" mode="text">
+<file name="log/cookies%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 127.0.0.1	FALSE	/	FALSE	0	FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF	E
diff --git a/tests/data/test1152 b/tests/data/test1152
index aa8c0a7..870215d 100644
--- a/tests/data/test1152
+++ b/tests/data/test1152
@@ -40,7 +40,7 @@
 FTP with uneven quote in PWD response
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/test-1152/
+ftp://%HOSTIP:%FTPPORT/test-%TESTNUMBER/
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-CWD test-1152

+CWD test-%TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test1153 b/tests/data/test1153
index c0e37c1..b481431 100644
--- a/tests/data/test1153
+++ b/tests/data/test1153
@@ -40,7 +40,7 @@
 FTP with quoted double quotes
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/test-1153/
+ftp://%HOSTIP:%FTPPORT/test-%TESTNUMBER/
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-CWD test-1153

+CWD test-%TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test1154 b/tests/data/test1154
index 8213528..ab1adde 100644
--- a/tests/data/test1154
+++ b/tests/data/test1154
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
@@ -33,7 +33,7 @@
 HTTP GET with 100K (too long) response header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1154
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1154 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1155 b/tests/data/test1155
index 90d33bd..65d76b6 100644
--- a/tests/data/test1155
+++ b/tests/data/test1155
@@ -12,9 +12,9 @@
 
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

-Set-Cookie: domain=value;path=/
+Set-Cookie: domain=value;path=/

 

 </data>
 </reply>
@@ -28,25 +28,25 @@
 HTTP cookie with parameter word as name
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1155 -c log/cookies1155.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -c log/cookies%TESTNUMBER.txt
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1155 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/cookies1155.txt" mode="text">
+<file name="log/cookies%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
-127.0.0.1	FALSE	/	FALSE	0	domain	value
+%HOSTIP	FALSE	/	FALSE	0	domain	value
 </file>
 </verify>
 </testcase>
diff --git a/tests/data/test1156 b/tests/data/test1156
index f78dc99..35eb2dc 100644
--- a/tests/data/test1156
+++ b/tests/data/test1156
@@ -52,20 +52,21 @@
 http
 </server>
 <tool>
-lib1156
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP resume/range fail range-error content-range combinations
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1156
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
-<errorcode>
+<stderr mode="text">
+URL: http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER
 0
-</errorcode>
+</stderr>
 </verify>
 </testcase>
diff --git a/tests/data/test1157 b/tests/data/test1157
index baf12ed..8c0bcc3 100644
--- a/tests/data/test1157
+++ b/tests/data/test1157
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,10 +35,10 @@
  <name>
 Get -H headers from empty file
  </name>
-<file name="log/heads1157.txt">
+<file name="log/heads%TESTNUMBER.txt">
 </file>
  <command>
-http://%HOSTIP:%HTTPPORT/1157 -H @log/heads1157.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -H @log/heads%TESTNUMBER.txt
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1157 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1158 b/tests/data/test1158
index f2b40e0..fd21d74 100644
--- a/tests/data/test1158
+++ b/tests/data/test1158
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 10

 

@@ -26,13 +26,13 @@
 HTTP RFC1867-type formposting with filename containing '"'
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/we/want/1158 -F "file=@\"log/test1158\\\".txt\";type=mo/foo;filename=\"test1158\\\".txt\"" -F 'file2=@"log/test1158\".txt"' -F 'file3=@"log/test1158\".txt";type=m/f,"log/test1158\".txt"'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "file=@\"log/test%TESTNUMBER\\\".txt\";type=mo/foo;filename=\"test%TESTNUMBER\\\".txt\"" -F 'file2=@"log/test%TESTNUMBER\".txt"' -F 'file3=@"log/test%TESTNUMBER\".txt";type=m/f,"log/test%TESTNUMBER\".txt"'
 </command>
 <precheck>
 perl -e "print 'Test requires a system supporting double quotes in file names' if ($^O eq 'msys');"
 </precheck>
 # We create this file before the command is invoked!
-<file name=log/test1158".txt>
+<file name=log/test%TESTNUMBER".txt>
 foo bar
 This is a bar foo
 bar
@@ -46,7 +46,7 @@
 ^(Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).*
 </strip>
 <protocol>
-POST /we/want/1158 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -54,7 +54,7 @@
 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32

 

 ------------------------------24e78000bd32

-Content-Disposition: form-data; name="file"; filename="test1158\".txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER\".txt"

 Content-Type: mo/foo

 

 foo bar
@@ -63,7 +63,7 @@
 foo
 

 ------------------------------24e78000bd32

-Content-Disposition: form-data; name="file2"; filename="test1158\".txt"

+Content-Disposition: form-data; name="file2"; filename="test%TESTNUMBER\".txt"

 Content-Type: text/plain

 

 foo bar
@@ -75,7 +75,7 @@
 Content-Disposition: form-data; name="file3"

 Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b

 

-Content-Disposition: attachment; filename="test1158\".txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER\".txt"

 Content-Type: m/f

 

 foo bar
@@ -83,7 +83,7 @@
 bar
 foo
 

-Content-Disposition: attachment; filename="test1158\".txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER\".txt"

 Content-Type: text/plain

 

 foo bar
diff --git a/tests/data/test1159 b/tests/data/test1159
index ea07f23..b09aff0 100644
--- a/tests/data/test1159
+++ b/tests/data/test1159
@@ -30,14 +30,14 @@
 HTTP Location: and 'redirect_url' with non-supported scheme
  </name>
 <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1159 -w '%{redirect_url}\n'
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url}\n'
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1159 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test116 b/tests/data/test116
index 2ed4ab0..f05c1bd 100644
--- a/tests/data/test116
+++ b/tests/data/test116
@@ -29,7 +29,7 @@
 FTP download, failed PORT
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/116 -P 1.2.3.4
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P 1.2.3.4
 </command>
 </client>
 
diff --git a/tests/data/test1160 b/tests/data/test1160
index cc864b3..ac10e5a 100644
--- a/tests/data/test1160
+++ b/tests/data/test1160
@@ -13,7 +13,7 @@
 
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 Set-Cookie:             ÿ=         ;                                                                                                                     ÿ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz†……€zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzúzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz󠁖zzzzzzzzzzzz~zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz¶zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

 

@@ -29,22 +29,22 @@
 HTTP with long funny format cookie
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1160 -c log/cookies1160.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -c log/cookies%TESTNUMBER.txt
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1160 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/cookies1160.txt" mode="text">
+<file name="log/cookies%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 </file>
diff --git a/tests/data/test1161 b/tests/data/test1161
index f7b610e..89c1e65 100644
--- a/tests/data/test1161
+++ b/tests/data/test1161
@@ -12,9 +12,9 @@
 
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

-Set-Cookie: ckyPersistent=permanent;path=;path=/
+Set-Cookie: ckyPersistent=permanent;path=;path=/

 

 </data>
 </reply>
@@ -28,25 +28,25 @@
 HTTP cookie with path set twice
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1161 -c log/cookies1161.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -c log/cookies%TESTNUMBER.txt
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1161 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/cookies1161.txt" mode="text">
+<file name="log/cookies%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
-127.0.0.1	FALSE	/	FALSE	0	ckyPersistent	permanent
+%HOSTIP	FALSE	/	FALSE	0	ckyPersistent	permanent
 </file>
 </verify>
 </testcase>
diff --git a/tests/data/test1164 b/tests/data/test1164
index f62b0f6..6140c2e 100644
--- a/tests/data/test1164
+++ b/tests/data/test1164
@@ -29,7 +29,7 @@
 HTTP/0.9 GET and all zeroes
  </name>
  <command option="force-output">
-http://%HOSTIP:%HTTPPORT/1164 -w '%{size_download}\n' --http0.9
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w '%{size_download}\n' --http0.9
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1164 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1166 b/tests/data/test1166
index 292d09f..609939f 100644
--- a/tests/data/test1166
+++ b/tests/data/test1166
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Set-Cookie: trackyou=want; path=/

 Content-Length: 68

@@ -30,19 +30,19 @@
 HTTP response with cookies but not receiving!
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1166 http://%HOSTIP:%HTTPPORT/want/1166
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1166 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/1166 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1168 b/tests/data/test1168
index b2f08fb..5d0ed3a 100644
--- a/tests/data/test1168
+++ b/tests/data/test1168
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: /data/11680002.txt
+Location: /data/%TESTNUMBER0002.txt
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -20,7 +20,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -29,13 +29,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: /data/11680002.txt
+Location: /data/%TESTNUMBER0002.txt
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -53,20 +53,20 @@
 HTTP redirect with credentials using # in user and password
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/1168 -L -u "catmai#d:#DZaRJYrixKE*gFY"
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -u "catmai#d:#DZaRJYrixKE*gFY"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/1168 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic Y2F0bWFpI2Q6I0RaYVJKWXJpeEtFKmdGWQ==

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /data/11680002.txt HTTP/1.1

+GET /data/%TESTNUMBER0002.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic Y2F0bWFpI2Q6I0RaYVJKWXJpeEtFKmdGWQ==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1169 b/tests/data/test1169
new file mode 100644
index 0000000..e7f7df4
--- /dev/null
+++ b/tests/data/test1169
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+runtests.pl
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<name>
+Verify that runtests.pl accepts an -L option
+</name>
+
+<command type="perl">
+%SRCDIR/runtests.pl -L %SRCDIR/log/test1196-library.pl
+</command>
+# Create a simple perl snippet that lets runtests.pl
+# exit with a code we can check.
+<precheck>
+echo 'exit 123' > %SRCDIR/log/test1196-library.pl
+</precheck>
+
+</client>
+
+<verify>
+<errorcode>
+123
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test117 b/tests/data/test117
index 2caad0d..b9c4b2e 100644
--- a/tests/data/test117
+++ b/tests/data/test117
@@ -22,7 +22,7 @@
 FTP download, failed TYPE
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/117
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1170 b/tests/data/test1170
index 39ff3c8..688fbed 100644
--- a/tests/data/test1170
+++ b/tests/data/test1170
@@ -48,7 +48,7 @@
 HTTP GET transfer-encoding with removed Connection:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1170 --tr-encoding -H "Connection:"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --tr-encoding -H "Connection:"
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1170 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1171 b/tests/data/test1171
index bc98d31..7057e0c 100644
--- a/tests/data/test1171
+++ b/tests/data/test1171
@@ -48,7 +48,7 @@
 HTTP GET transfer-encoding with blanked Connection:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1171 --tr-encoding -H "Connection;"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --tr-encoding -H "Connection;"
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1171 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1172 b/tests/data/test1172
index a099057..5317962 100644
--- a/tests/data/test1172
+++ b/tests/data/test1172
@@ -26,7 +26,7 @@
 HTTP/0.9 GET response denied
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1172 --no-http0.9
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --no-http0.9
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1172 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1174 b/tests/data/test1174
index 7768696..5f45bb8 100644
--- a/tests/data/test1174
+++ b/tests/data/test1174
@@ -26,7 +26,7 @@
 HTTP/0.9 GET response denied by default
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1174
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1174 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1176 b/tests/data/test1176
index ce992e3..bc3711c 100644
--- a/tests/data/test1176
+++ b/tests/data/test1176
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -34,7 +34,7 @@
 HTTP GET
  </name>
  <command option="no-output">
-http://%HOSTIP:%HTTPPORT/1176 -o 'log/base-#0'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o 'log/base-#0'
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1176 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -50,7 +50,7 @@
 </protocol>
 <file name="log/base-#0">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
diff --git a/tests/data/test1178 b/tests/data/test1178
index 91ef78c..f8fa1ca 100644
--- a/tests/data/test1178
+++ b/tests/data/test1178
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -30,7 +30,7 @@
  </name>
 # 400 x 'A' : 600 x 'B' ...
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/1178 -x http://%HOSTIP:%HTTPPORT -U AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:BBBBBBBBBBBBB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AAAAAAAAAAAAAAAAAAAAAAA:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
 </command>
 <features>
 proxy
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/we/want/that/page/1178 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: Basic QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU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JCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkI=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1179 b/tests/data/test1179
index 206ee7c..8dca8ab 100644
--- a/tests/data/test1179
+++ b/tests/data/test1179
@@ -25,7 +25,7 @@
 error when using unknown command line option
 </name>
 <command>
---never-implemented http://never.use.this.example.com/1179
+--never-implemented http://never.use.this.example.com/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test118 b/tests/data/test118
index 94985e3..4d47282 100644
--- a/tests/data/test118
+++ b/tests/data/test118
@@ -25,7 +25,7 @@
 FTP download, failed RETR
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/118
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,8 +41,8 @@
 EPSV

 PASV

 TYPE I

-SIZE 118

-RETR 118

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1180 b/tests/data/test1180
new file mode 100644
index 0000000..1eb9ed6
--- /dev/null
+++ b/tests/data/test1180
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Server: Blafasel/5.0
+Date: Sat, 16 Jan 2021 14:48:30 GMT
+Content-Length: 12
+
+Bla bla bla
+</data>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+proxy
+</features>
+ <name>
+HTTP GET request with proxy and -H "Proxy-Connection: keep-alive"
+ </name>
+ <command>
+--proxy http://%HOSTIP:%HTTPPORT -H "Proxy-Connection: Keep-Alive" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+Proxy-Connection: Keep-Alive

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1181 b/tests/data/test1181
new file mode 100644
index 0000000..367265c
--- /dev/null
+++ b/tests/data/test1181
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK

+Server: Blafasel/5.0

+Date: Sat, 16 Jan 2021 14:48:30 GMT

+Content-Length: 12

+

+Bla bla bla
+</data>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+proxy
+</features>
+ <name>
+HTTP GET request with proxy and --proxy-header "Proxy-Connection: Keep-Alive"
+ </name>
+ <command>
+--proxy http://%HOSTIP:%HTTPPORT --proxy-header "Proxy-Connection: Keep-Alive" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+<protocol>
+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+Proxy-Connection: Keep-Alive

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1182 b/tests/data/test1182
new file mode 100644
index 0000000..105d3d1
--- /dev/null
+++ b/tests/data/test1182
@@ -0,0 +1,36 @@
+<testcase>
+<info>
+<keywords>
+runtests.pl
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<name>
+Verify that runtests.pl accepts an exclude file with the -E option
+</name>
+
+<command type="perl">
+%SRCDIR/runtests.pl -o TESTDIR=%SRCDIR/log/data -o LOGDIR=%SRCDIR/log/log -E %SRCDIR/log/test%TESTNUMBER-exclude-file 1
+</command>
+<precheck>
+mkdir %SRCDIR/log/data ; mkdir %SRCDIR/log/log; cp %SRCDIR/data/test1 %SRCDIR/log/data; echo 'test:1:Test should not run for unit test %TESTNUMBER' > %SRCDIR/log/test%TESTNUMBER-exclude-file
+</precheck>
+<postcheck>
+grep -q "Test should not run for unit test %TESTNUMBER" %SRCDIR/log/stdout%TESTNUMBER
+</postcheck>
+
+</client>
+
+<verify>
+<errorcode>
+1
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1183 b/tests/data/test1183
new file mode 100644
index 0000000..2955bdc
--- /dev/null
+++ b/tests/data/test1183
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK

+Server: Blafasel/5.0

+Date: Sat, 16 Jan 2021 14:48:30 GMT

+Content-Length: 12

+

+Bla bla bla
+</data>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+proxy
+</features>
+ <name>
+%TESTNUMBER used instead of actual test number
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+# Verify that the %TESTNUMBER has been resolved to %TESTNUMBER
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1188 b/tests/data/test1188
new file mode 100644
index 0000000..0cbaaeb
--- /dev/null
+++ b/tests/data/test1188
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--write-out
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 404 Not Found

+Content-Length: 0

+Connection: close

+

+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--write-out with %{onerror} and %{urlnum} to stderr
+ </name>
+<command>
+-f -s -w '%{onerror}%{stderr}%{urlnum} says %{exitcode} %{errormsg}\n' http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/our/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+GET /we/want/our/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+<stderr mode="text">
+0 says 22 The requested URL returned error: 404
+1 says 22 The requested URL returned error: 404
+</stderr>
+# 22 is CURLE_HTTP_RETURNED_ERROR
+<errorcode>
+22
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test119 b/tests/data/test119
index 95d1021..6999e0d 100644
--- a/tests/data/test119
+++ b/tests/data/test119
@@ -24,7 +24,7 @@
 FTP download, failed RETR with PORT
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/119 -P -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 </client>
 
@@ -43,8 +43,8 @@
 PASS ftp@example.com

 PWD

 TYPE I

-SIZE 119

-RETR 119

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1190 b/tests/data/test1190
index 007a150..f866352 100644
--- a/tests/data/test1190
+++ b/tests/data/test1190
@@ -30,7 +30,7 @@
 MQTT SUBSCRIBE
 </name>
 <command option="binary-trace">
-mqtt://%HOSTIP:%MQTTPORT/1190
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1191 b/tests/data/test1191
index a36bc31..69cf33f 100644
--- a/tests/data/test1191
+++ b/tests/data/test1191
@@ -26,7 +26,7 @@
 MQTT PUBLISH
 </name>
 <command option="binary-trace">
-mqtt://%HOSTIP:%MQTTPORT/1191 -d something
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -d something
 </command>
 </client>
 
diff --git a/tests/data/test1192 b/tests/data/test1192
index 691c778..47036ab 100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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1193 b/tests/data/test1193
index 8da9abb..bed10b2 100644
--- a/tests/data/test1193
+++ b/tests/data/test1193
@@ -26,9 +26,9 @@
 MQTT PUBLISH 2k payload
 </name>
 <command option="binary-trace">
-mqtt://%HOSTIP:%MQTTPORT/1193 -d @log/payload1193
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -d @log/payload%TESTNUMBER
 </command>
-<file name="log/payload1193">
+<file name="log/payload%TESTNUMBER">
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
diff --git a/tests/data/test1194 b/tests/data/test1194
index 497891a..cabf6be 100644
--- a/tests/data/test1194
+++ b/tests/data/test1194
@@ -33,7 +33,7 @@
 MQTT SUBSCRIBE with PUBLISH befoire SUBACK
 </name>
 <command option="binary-trace">
-mqtt://%HOSTIP:%MQTTPORT/1194
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1195 b/tests/data/test1195
index 0dfaccd..803bdd9 100644
--- a/tests/data/test1195
+++ b/tests/data/test1195
@@ -34,7 +34,7 @@
 MQTT SUBSCRIBE with short PUBLISH
 </name>
 <command option="binary-trace">
-mqtt://%HOSTIP:%MQTTPORT/1195
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1196 b/tests/data/test1196
index c07efd9..9290144 100644
--- a/tests/data/test1196
+++ b/tests/data/test1196
@@ -35,7 +35,7 @@
 MQTT with error in CONNACK
 </name>
 <command option="binary-trace">
-mqtt://%HOSTIP:%MQTTPORT/1196
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1197 b/tests/data/test1197
index 1abd9ae..8b882c7 100644
--- a/tests/data/test1197
+++ b/tests/data/test1197
@@ -13,17 +13,17 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./11970001

+Location: ./%TESTNUMBER0001

 

 monster
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 15

 Connection: close

 Content-Type: text/plain; charset=us-ascii

@@ -43,7 +43,7 @@
 HTTP POST redirected to GET and --write-out method
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1197 -w "%{method}\n" -L -d "twinkle twinkle little star"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{method}\n" -L -d "twinkle twinkle little star"
 </command>
 </client>
 
@@ -51,14 +51,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /1197 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 27

 Content-Type: application/x-www-form-urlencoded

 

-twinkle twinkle little starGET /11970001 HTTP/1.1

+twinkle twinkle little starGET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -67,14 +67,14 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./11970001

+Location: ./%TESTNUMBER0001

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 15

 Connection: close

 Content-Type: text/plain; charset=us-ascii

diff --git a/tests/data/test1198 b/tests/data/test1198
new file mode 100644
index 0000000..a81e4bb
--- /dev/null
+++ b/tests/data/test1198
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT PUBLISH empty payload, single space topic
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%20 -d ""
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020000
+client PUBLISH 3 000120
+client DISCONNECT 0 e000
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1199 b/tests/data/test1199
new file mode 100644
index 0000000..d710e70
--- /dev/null
+++ b/tests/data/test1199
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT PUBLISH empty payload, no topic
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT -d ""
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020000
+</protocol>
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test12 b/tests/data/test12
index 8f93abb..a7c30d2 100644
--- a/tests/data/test12
+++ b/tests/data/test12
@@ -36,14 +36,14 @@
 HTTP range support
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/12 -r 100-200
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -r 100-200
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/12 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=100-200

 User-Agent: curl/%VERSION

diff --git a/tests/data/test120 b/tests/data/test120
index 85d49f5..45e11a6 100644
--- a/tests/data/test120
+++ b/tests/data/test120
@@ -31,7 +31,7 @@
 ftp download with post-quote delete operation
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/120 -Q "-DELE file"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -Q "-DELE file"
 </command>
 </client>
 
@@ -44,8 +44,8 @@
 EPSV

 PASV

 TYPE I

-SIZE 120

-RETR 120

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 DELE file

 QUIT

 </protocol>
diff --git a/tests/data/test1200 b/tests/data/test1200
index ba1159f..886fa16 100644
--- a/tests/data/test1200
+++ b/tests/data/test1200
@@ -25,7 +25,7 @@
 Gopher index
  </name>
  <command>
-gopher://%HOSTIP:%GOPHERPORT/1/1200
+gopher://%HOSTIP:%GOPHERPORT/1/%TESTNUMBER
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-/1200

+/%TESTNUMBER

 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1201 b/tests/data/test1201
index 29a059a..9f1ba66 100644
--- a/tests/data/test1201
+++ b/tests/data/test1201
@@ -25,7 +25,7 @@
 Gopher selector
  </name>
  <command>
-gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR/1201?
+gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR/%TESTNUMBER?
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-/selector/SELECTOR/1201?

+/selector/SELECTOR/%TESTNUMBER?

 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1202 b/tests/data/test1202
index 6c91a77..aefb6d0 100644
--- a/tests/data/test1202
+++ b/tests/data/test1202
@@ -26,7 +26,7 @@
 Gopher query
  </name>
  <command>
-"gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine%09query%20succeeded/1202"
+"gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine%09query%20succeeded/%TESTNUMBER"
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-/the/search/engine	query succeeded/1202

+/the/search/engine	query succeeded/%TESTNUMBER

 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1203 b/tests/data/test1203
index 02d094d..9f4648e 100644
--- a/tests/data/test1203
+++ b/tests/data/test1203
@@ -29,7 +29,7 @@
 Gopher IPv6 index
  </name>
  <command>
--g gopher://%HOST6IP:%GOPHER6PORT/1/moo/1203
+-g gopher://%HOST6IP:%GOPHER6PORT/1/moo/%TESTNUMBER
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-/moo/1203

+/moo/%TESTNUMBER

 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1204 b/tests/data/test1204
index 5073801..9e8c2b6 100644
--- a/tests/data/test1204
+++ b/tests/data/test1204
@@ -55,19 +55,19 @@
 HTTP with WWW-Authenticate and multiple auths in a single line
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1204 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1204 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1204 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1205 b/tests/data/test1205
index 8509d3f..df77175 100644
--- a/tests/data/test1205
+++ b/tests/data/test1205
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Funny-head: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAendofthem
@@ -30,7 +30,7 @@
 HTTP GET with 18K HTTP header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1205
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1205 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1206 b/tests/data/test1206
index 3f853d1..b192592 100644
--- a/tests/data/test1206
+++ b/tests/data/test1206
@@ -26,7 +26,7 @@
 FTP PORT and 425 on download
  </name>
  <command>
---max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1206 -P -
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 
 </client>
@@ -42,8 +42,8 @@
 PWD

 EPRT |1|
 TYPE I

-SIZE 1206

-RETR 1206

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 <errorcode>
diff --git a/tests/data/test1207 b/tests/data/test1207
index 283e46d..f105df5 100644
--- a/tests/data/test1207
+++ b/tests/data/test1207
@@ -26,7 +26,7 @@
 FTP PORT and 421 on download
  </name>
  <command>
---max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1207 -P -
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 
 </client>
@@ -42,8 +42,8 @@
 PWD

 EPRT |1|
 TYPE I

-SIZE 1207

-RETR 1207

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 <errorcode>
diff --git a/tests/data/test1208 b/tests/data/test1208
index 055aa93..47ceb64 100644
--- a/tests/data/test1208
+++ b/tests/data/test1208
@@ -27,7 +27,7 @@
 FTP PORT download, no data conn and no transient negative reply
  </name>
  <command>
---max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1208 -P -
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 
 </client>
@@ -48,8 +48,8 @@
 PWD

 EPRT |1|
 TYPE I

-SIZE 1208

-RETR 1208

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 </protocol>
 <errorcode>
 28
diff --git a/tests/data/test1209 b/tests/data/test1209
index 76bce5f..4d442d1 100644
--- a/tests/data/test1209
+++ b/tests/data/test1209
@@ -26,7 +26,7 @@
 FTP PORT download, no data conn and no positive preliminary reply
  </name>
  <command>
---max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1209 -P -
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 
 </client>
@@ -48,8 +48,8 @@
 PWD

 EPRT |1|
 TYPE I

-SIZE 1209

-RETR 1209

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 </protocol>
 <errorcode>
 28
diff --git a/tests/data/test121 b/tests/data/test121
index de7a561..b8ec701 100644
--- a/tests/data/test121
+++ b/tests/data/test121
@@ -29,7 +29,7 @@
 ftp download with post- and pre-transfer delete operations
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/121 -Q "-DELE after_transfer" -Q "DELE before_transfer"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -Q "-DELE after_transfer" -Q "DELE before_transfer"
 </command>
 </client>
 
@@ -42,8 +42,8 @@
 DELE before_transfer

 EPSV

 TYPE I

-SIZE 121

-RETR 121

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 DELE after_transfer

 QUIT

 </protocol>
diff --git a/tests/data/test1210 b/tests/data/test1210
index 71053f2..037eb16 100644
--- a/tests/data/test1210
+++ b/tests/data/test1210
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
@@ -39,7 +39,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1210 -J -O
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O
 </command>
 </client>
 
@@ -47,13 +47,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1210 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/1210">
+<file name="log/%TESTNUMBER">
 12345
 </file>
 
diff --git a/tests/data/test1211 b/tests/data/test1211
index 5418a85..6d31357 100644
--- a/tests/data/test1211
+++ b/tests/data/test1211
@@ -26,7 +26,7 @@
 FTP PORT and 425 on download
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1211 -P -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 
 </client>
@@ -43,8 +43,8 @@
 PWD

 EPRT |1|
 TYPE I

-SIZE 1211

-RETR 1211

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 </protocol>
 <errorcode>
 28
diff --git a/tests/data/test1212 b/tests/data/test1212
index 7c2af2e..5a93089 100644
--- a/tests/data/test1212
+++ b/tests/data/test1212
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -31,14 +31,14 @@
  </name>
 
 <command>
-http://user:secret@%HOSTIP:%HTTPPORT/ulion/1212 --socks5 non-existing-host.haxx.se:1080 --noproxy %HOSTIP --max-time 5
+http://user:secret@%HOSTIP:%HTTPPORT/ulion/%TESTNUMBER --socks5 non-existing-host.haxx.se:1080 --noproxy %HOSTIP --max-time 5
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /ulion/1212 HTTP/1.1

+GET /ulion/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpzZWNyZXQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1213 b/tests/data/test1213
index 54a8f2d..6bd4d2c 100644
--- a/tests/data/test1213
+++ b/tests/data/test1213
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -33,7 +33,7 @@
 # for normal server use, and we need to make sure it gets converted to
 # RFC style even for proxies
  <command>
--x %HOSTIP:%HTTPPORT we.want.that.site.com.1213
+-x %HOSTIP:%HTTPPORT we.want.that.site.com.%TESTNUMBER
 </command>
 <features>
 proxy
@@ -43,8 +43,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com.1213/ HTTP/1.1

-Host: we.want.that.site.com.1213

+GET http://we.want.that.site.com.%TESTNUMBER/ HTTP/1.1

+Host: we.want.that.site.com.%TESTNUMBER

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1214 b/tests/data/test1214
index 985fd38..1758693 100644
--- a/tests/data/test1214
+++ b/tests/data/test1214
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -33,7 +33,7 @@
 # for normal server use, and we need to make sure it gets converted to
 # RFC style even for proxies
  <command>
--x %HOSTIP:%HTTPPORT http://we.want.that.site.com.1214?moo=foo
+-x %HOSTIP:%HTTPPORT http://we.want.that.site.com.%TESTNUMBER?moo=foo
 </command>
 <features>
 proxy
@@ -43,8 +43,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com.1214/?moo=foo HTTP/1.1

-Host: we.want.that.site.com.1214

+GET http://we.want.that.site.com.%TESTNUMBER/?moo=foo HTTP/1.1

+Host: we.want.that.site.com.%TESTNUMBER

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1215 b/tests/data/test1215
index 7aa1c42..02e0681 100644
--- a/tests/data/test1215
+++ b/tests/data/test1215
@@ -76,7 +76,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/1215 -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT
 </command>
 <precheck>
 chkhostname curlhost
@@ -86,16 +86,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1216 b/tests/data/test1216
index 6227133..6686c75 100644
--- a/tests/data/test1216
+++ b/tests/data/test1216
@@ -17,7 +17,7 @@
 Content-Type: text/html
 Connection: close
 Content-Length: 21

-
+

 This server says moo
 </data>
 </reply>
@@ -31,9 +31,9 @@
 HTTP cookie domains tailmatching the host name
  </name>
  <command>
-http://example.fake/c/1216 http://bexample.fake/c/1216 -b log/injar1216 -x %HOSTIP:%HTTPPORT
+http://example.fake/c/%TESTNUMBER http://bexample.fake/c/%TESTNUMBER -b log/injar%TESTNUMBER -x %HOSTIP:%HTTPPORT
 </command>
-<file name="log/injar1216">
+<file name="log/injar%TESTNUMBER">
 example.fake	FALSE	/a	FALSE	2139150993	mooo	indeed
 example.fake	FALSE	/b	FALSE	0		moo1	indeed
 example.fake	FALSE	/c	FALSE	2139150993	moo2	indeed
@@ -47,14 +47,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://example.fake/c/1216 HTTP/1.1

+GET http://example.fake/c/%TESTNUMBER HTTP/1.1

 Host: example.fake

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 Cookie: moo3=indeed; moo2=indeed

 

-GET http://bexample.fake/c/1216 HTTP/1.1

+GET http://bexample.fake/c/%TESTNUMBER HTTP/1.1

 Host: bexample.fake

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1217 b/tests/data/test1217
index 1efa4d6..0f4772d 100644
--- a/tests/data/test1217
+++ b/tests/data/test1217
@@ -26,7 +26,7 @@
 FTP with rubbish before name in 257-response
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/get/file/1217 ftp://%HOSTIP:%FTPPORT/get/file/again/1217 --ftp-method singlecwd
+ftp://%HOSTIP:%FTPPORT/get/file/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/get/file/again/%TESTNUMBER --ftp-method singlecwd
 </command>
 </client>
 
@@ -44,13 +44,13 @@
 CWD get/file

 EPSV

 TYPE I

-SIZE 1217

-RETR 1217

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 CWD /this/is/the/path

 CWD get/file/again

 EPSV

-SIZE 1217

-RETR 1217

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1218 b/tests/data/test1218
index b9914d2..ff80233 100644
--- a/tests/data/test1218
+++ b/tests/data/test1218
@@ -16,7 +16,7 @@
 Date: Tue, 25 Sep 2001 19:37:44 GMT
 Set-Cookie: bug=fixed; domain=.example.fake;
 Content-Length: 21

-
+

 This server says moo
 </data>
 </reply>
@@ -30,7 +30,7 @@
 HTTP cookies and domains with same prefix
  </name>
  <command>
-http://example.fake/c/1218 http://example.fake/c/1218 http://bexample.fake/c/1218 -b nonexisting -x %HOSTIP:%HTTPPORT
+http://example.fake/c/%TESTNUMBER http://example.fake/c/%TESTNUMBER http://bexample.fake/c/%TESTNUMBER -b nonexisting -x %HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -40,20 +40,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://example.fake/c/1218 HTTP/1.1

+GET http://example.fake/c/%TESTNUMBER HTTP/1.1

 Host: example.fake

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://example.fake/c/1218 HTTP/1.1

+GET http://example.fake/c/%TESTNUMBER HTTP/1.1

 Host: example.fake

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 Cookie: bug=fixed

 

-GET http://bexample.fake/c/1218 HTTP/1.1

+GET http://bexample.fake/c/%TESTNUMBER HTTP/1.1

 Host: bexample.fake

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1219 b/tests/data/test1219
index e42a211..f579859 100644
--- a/tests/data/test1219
+++ b/tests/data/test1219
@@ -30,7 +30,7 @@
 FTP with no user+password required (230 response)
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1219
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 
 </client>
@@ -41,8 +41,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1219

-RETR 1219

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test122 b/tests/data/test122
index fb1dd05..8d636af 100644
--- a/tests/data/test122
+++ b/tests/data/test122
@@ -25,7 +25,7 @@
 FTP download resume with whole file already downloaded
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/122 -C 5
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -C 5
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 EPSV

 PASV

 TYPE I

-SIZE 122

+SIZE %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1220 b/tests/data/test1220
index c8eb52c..49cbf2c 100644
--- a/tests/data/test1220
+++ b/tests/data/test1220
@@ -21,9 +21,9 @@
 file:// URLs with query string
  </name>
 <command option="no-include">
-file://localhost%FILE_PWD/log/test1220.txt?a_query=foobar#afragment
+file://localhost%FILE_PWD/log/test%TESTNUMBER.txt?a_query=foobar#afragment
 </command>
-<file name="log/test1220.txt">
+<file name="log/test%TESTNUMBER.txt">
 contents in a single file
 </file>
 </client>
diff --git a/tests/data/test1221 b/tests/data/test1221
deleted file mode 100644
index 15700f4..0000000
--- a/tests/data/test1221
+++ /dev/null
@@ -1,53 +0,0 @@
-<testcase>
-<info>
-<keywords>
-build system
-source analysis
-</keywords>
-</info>
-
-#
-# Client-side
-<client>
-<server>
-none
-</server>
-
-<name>
-10 chars object name generation testing
-</name>
-<command option="no-output,no-include" type="shell">
-%SRCDIR/objnames-test10.sh %SRCDIR
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stderr1221" mode="text">
-</file1>
-<file2 name="log/stdout1221">
-Testing curl_10char_object_name...
-
-result: 16AFKPQRST expected: 16AFKPQRST input: 123__678__ABC__FGH__KLM__PQRSTUV
-result: 16AFKPQ expected: 16AFKPQ input: 123__678__ABC__FGH__KLM__PQ.S.UV
-result: 16ABC expected: 16ABC input: 123__678__ABC..FGH..KLM..PQRSTUV
-result: 16 expected: 16 input: 123__678_.ABC._FGH__KLM__PQRSTUV
-result: 123 expected: 123 input: 123.567.90ABCDEFGHIJKLMNOPQRSTUV
-result: 1234567 expected: 1234567 input: 1234567.90A.CDEFGHIJKLMNOPQRSTUV
-result: 1234567890 expected: 1234567890 input: 1234567890.BCD.FGHIJKLMNOPQRSTUV
-result: 1470AB expected: 1470AB input: 12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
-result: 1234567890 expected: 1234567890 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
-result: 159CGHIJKL expected: 159CGHIJKL input: 123_567_90A_CDE_GHIJKLMNOPQRSTUV
-result: 159CDEFGHI expected: 159CDEFGHI input: 123_567_90A_CDEFGHIJKLMNOPQRSTUV
-result: 1590ABCDEF expected: 1590ABCDEF input: 123_567_90ABCDEFGHIJKLMNOPQRSTUV
-result: 1567890ABC expected: 1567890ABC input: 123_567890ABCDEFGHIJKLMNOPQRSTUV
-result: 1234567890 expected: 1234567890 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
-
-
-
-10-characters-or-less generated object names are unique.
-</file2>
-</verify>
-
-</testcase>
diff --git a/tests/data/test1222 b/tests/data/test1222
deleted file mode 100644
index 5eab55b..0000000
--- a/tests/data/test1222
+++ /dev/null
@@ -1,53 +0,0 @@
-<testcase>
-<info>
-<keywords>
-build system
-source analysis
-</keywords>
-</info>
-
-#
-# Client-side
-<client>
-<server>
-none
-</server>
-
-<name>
-8 chars object name generation testing
-</name>
-<command option="no-output,no-include" type="shell">
-%SRCDIR/objnames-test08.sh %SRCDIR
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stderr1222">
-</file1>
-<file2 name="log/stdout1222">
-Testing curl_8char_object_name...
-
-result: 16AFKPQR expected: 16AFKPQR input: 123__678__ABC__FGH__KLM__PQRSTUV
-result: 16AFKPQ expected: 16AFKPQ input: 123__678__ABC__FGH__KLM__PQ.S.UV
-result: 16ABC expected: 16ABC input: 123__678__ABC..FGH..KLM..PQRSTUV
-result: 16 expected: 16 input: 123__678_.ABC._FGH__KLM__PQRSTUV
-result: 123 expected: 123 input: 123.567.90ABCDEFGHIJKLMNOPQRSTUV
-result: 1234567 expected: 1234567 input: 1234567.90A.CDEFGHIJKLMNOPQRSTUV
-result: 12345678 expected: 12345678 input: 1234567890.BCD.FGHIJKLMNOPQRSTUV
-result: 1470AB expected: 1470AB input: 12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
-result: 12345678 expected: 12345678 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
-result: 159CGHIJ expected: 159CGHIJ input: 123_567_90A_CDE_GHIJKLMNOPQRSTUV
-result: 159CDEFG expected: 159CDEFG input: 123_567_90A_CDEFGHIJKLMNOPQRSTUV
-result: 1590ABCD expected: 1590ABCD input: 123_567_90ABCDEFGHIJKLMNOPQRSTUV
-result: 1567890A expected: 1567890A input: 123_567890ABCDEFGHIJKLMNOPQRSTUV
-result: 12345678 expected: 12345678 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
-
-
-
-8-characters-or-less generated object names are unique.
-</file2>
-</verify>
-
-</testcase>
diff --git a/tests/data/test1223 b/tests/data/test1223
index f448f5c..9404adf 100644
--- a/tests/data/test1223
+++ b/tests/data/test1223
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 4
 Connection: close
 Content-Type: text/html
@@ -30,7 +30,7 @@
 HTTP GET -w remote_ip and -w remote_port
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1223 -w 'IP %{remote_ip} and PORT %{remote_port}\n'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w 'IP %{remote_ip} and PORT %{remote_port}\n'
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1223 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -46,7 +46,7 @@
 </protocol>
 <stdout>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 4
 Connection: close
 Content-Type: text/html
diff --git a/tests/data/test1224 b/tests/data/test1224
index 315936b..fc898a7 100644
--- a/tests/data/test1224
+++ b/tests/data/test1224
@@ -27,7 +27,7 @@
 FTP fetch a file from the root directory
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT//1224
+ftp://%HOSTIP:%FTPPORT//%TESTNUMBER
 </command>
 
 </client>
@@ -41,8 +41,8 @@
 CWD /

 EPSV

 TYPE I

-SIZE 1224

-RETR 1224

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1225 b/tests/data/test1225
index 09a1abb..7e4f39b 100644
--- a/tests/data/test1225
+++ b/tests/data/test1225
@@ -27,7 +27,7 @@
 FTP fetch two files using absolute paths
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT//foo/1225 ftp://%HOSTIP:%FTPPORT//foo/bar/1225
+ftp://%HOSTIP:%FTPPORT//foo/%TESTNUMBER ftp://%HOSTIP:%FTPPORT//foo/bar/%TESTNUMBER
 </command>
 
 </client>
@@ -42,14 +42,14 @@
 CWD foo

 EPSV

 TYPE I

-SIZE 1225

-RETR 1225

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 CWD /

 CWD foo

 CWD bar

 EPSV

-SIZE 1225

-RETR 1225

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1226 b/tests/data/test1226
index 6381b12..a22776e 100644
--- a/tests/data/test1226
+++ b/tests/data/test1226
@@ -27,7 +27,7 @@
 FTP fetch a file from the root directory with singlecwd
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT//1226 --ftp-method singlecwd
+ftp://%HOSTIP:%FTPPORT//%TESTNUMBER --ftp-method singlecwd
 </command>
 
 </client>
@@ -41,8 +41,8 @@
 CWD /

 EPSV

 TYPE I

-SIZE 1226

-RETR 1226

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1227 b/tests/data/test1227
index 46b28d5..1cd9bf2 100644
--- a/tests/data/test1227
+++ b/tests/data/test1227
@@ -27,7 +27,7 @@
 FTP fetch a file from the root directory with nocwd
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT//1227 --ftp-method nocwd
+ftp://%HOSTIP:%FTPPORT//%TESTNUMBER --ftp-method nocwd
 </command>
 
 </client>
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE /1227

-RETR /1227

+SIZE /%TESTNUMBER

+RETR /%TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1228 b/tests/data/test1228
index 529c7e5..2a7faff 100644
--- a/tests/data/test1228
+++ b/tests/data/test1228
@@ -29,7 +29,7 @@
 HTTP cookie path match
  </name>
  <command>
-http://example.fake/hoge/1228 http://example.fake/hogege/ -b nonexisting -x %HOSTIP:%HTTPPORT
+http://example.fake/hoge/%TESTNUMBER http://example.fake/hogege/ -b nonexisting -x %HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -39,7 +39,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://example.fake/hoge/1228 HTTP/1.1

+GET http://example.fake/hoge/%TESTNUMBER HTTP/1.1

 Host: example.fake

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1229 b/tests/data/test1229
index 0cb4535..06d8175 100644
--- a/tests/data/test1229
+++ b/tests/data/test1229
@@ -59,21 +59,21 @@
 HTTP with Digest authorization with user name needing escape
  </name>
  <command>
-http://%5cuser%22:password@%HOSTIP:%HTTPPORT/1229 --digest
+http://%5cuser%22:password@%HOSTIP:%HTTPPORT/%TESTNUMBER --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1229 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1229 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="\\user\"", realm="testrealm", nonce="1053604145", uri="/1229", response="f2694d426040712584c156d3de72b8d6"

+Authorization: Digest username="\\user\"", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="f2694d426040712584c156d3de72b8d6"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test123 b/tests/data/test123
index 4bbfce9..1604f0b 100644
--- a/tests/data/test123
+++ b/tests/data/test123
@@ -19,9 +19,9 @@
 FTP upload resume with whole file already downloaded
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/123 -T log/upload123 -C 51
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER -C 51
 </command>
-<file name="log/upload123">
+<file name="log/upload%TESTNUMBER">
 --------------------------------------------------
 </file>
 </client>
diff --git a/tests/data/test1230 b/tests/data/test1230
index a439b17..ef841d0 100644
--- a/tests/data/test1230
+++ b/tests/data/test1230
@@ -14,26 +14,26 @@
 
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 9

-
+

 mooooooo
 </data>
 
 <connect>
 HTTP/1.1 200 welcome dear

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 

 </connect>
 
 <datacheck>
 HTTP/1.1 200 welcome dear

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 9

-
+

 mooooooo
 </datacheck>
 </reply>
@@ -53,9 +53,9 @@
  <name>
 HTTP CONNECT to IPv6 numerical address
  </name>
-# 0x4ce == 1230, the test number
+# 0x4ce == %TESTNUMBER, the test number
  <command>
-http://[1234:1234:1234::4ce]:%HTTPPORT/wanted/page/1230 -p -x %HOSTIP:%HTTPPORT
+http://[1234:1234:1234::4ce]:%HTTPPORT/wanted/page/%TESTNUMBER -p -x %HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -68,7 +68,7 @@
 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /wanted/page/1230 HTTP/1.1

+GET /wanted/page/%TESTNUMBER HTTP/1.1

 Host: [1234:1234:1234::4ce]:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1231 b/tests/data/test1231
index 7b085c5..c37f509 100644
--- a/tests/data/test1231
+++ b/tests/data/test1231
@@ -37,7 +37,7 @@
 HTTP URL with dotdot removal from path
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/../../hej/but/who/../1231?stupid=me/../1231#soo/../1231 http://%HOSTIP:%HTTPPORT/../../hej/but/who/../12310001#/../12310001
+http://%HOSTIP:%HTTPPORT/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER#soo/../%TESTNUMBER http://%HOSTIP:%HTTPPORT/../../hej/but/who/../%TESTNUMBER0001#/../%TESTNUMBER0001
 </command>
 </client>
 
@@ -45,12 +45,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /hej/but/1231?stupid=me/../1231 HTTP/1.1

+GET /hej/but/%TESTNUMBER?stupid=me/../%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /hej/but/12310001 HTTP/1.1

+GET /hej/but/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1232 b/tests/data/test1232
index 7a74cb1..3f91ecf 100644
--- a/tests/data/test1232
+++ b/tests/data/test1232
@@ -39,7 +39,7 @@
 HTTP URL with dotdot removal from path using an HTTP proxy
  </name>
  <command>
---proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1232:8990/../../hej/but/who/../1232?stupid=me/../1232#soo/../1232 http://test.remote.haxx.se.1232:8990/../../hej/but/who/../12320001#/../12320001
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER#soo/../%TESTNUMBER http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER0001#/../%TESTNUMBER0001
 </command>
 <features>
 proxy
@@ -50,14 +50,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://test.remote.haxx.se.1232:8990/hej/but/1232?stupid=me/../1232 HTTP/1.1

-Host: test.remote.haxx.se.1232:8990

+GET http://test.remote.haxx.se.%TESTNUMBER:8990/hej/but/%TESTNUMBER?stupid=me/../%TESTNUMBER HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.haxx.se.1232:8990/hej/but/12320001 HTTP/1.1

-Host: test.remote.haxx.se.1232:8990

+GET http://test.remote.haxx.se.%TESTNUMBER:8990/hej/but/%TESTNUMBER0001 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1233 b/tests/data/test1233
index 1d4d3d5..b5dedca 100644
--- a/tests/data/test1233
+++ b/tests/data/test1233
@@ -26,7 +26,7 @@
 FTP failing to connect to EPSV port, switching to PASV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1233
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -39,8 +39,8 @@
 EPSV

 PASV

 TYPE I

-SIZE 1233

-RETR 1233

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1234 b/tests/data/test1234
index 577ba51..c20b3b4 100644
--- a/tests/data/test1234
+++ b/tests/data/test1234
@@ -19,7 +19,7 @@
 abusing {}-globbing
  </name>
  <command>
-"%HOSTIP:%NOLISTENPORT/1234[0-1]{" "%HOSTIP:%NOLISTENPORT/{}{}{}{"
+"%HOSTIP:%NOLISTENPORT/%TESTNUMBER[0-1]{" "%HOSTIP:%NOLISTENPORT/{}{}{}{"
 </command>
 </client>
 
diff --git a/tests/data/test1235 b/tests/data/test1235
index 3fffb42..b04958e 100644
--- a/tests/data/test1235
+++ b/tests/data/test1235
@@ -34,54 +34,54 @@
 multiple requests using {}{} in the URL
  </name>
  <command>
-"%HOSTIP:%HTTPPORT/{1235,1235}{0001,0002}"
+"%HOSTIP:%HTTPPORT/{%TESTNUMBER,%TESTNUMBER}{0001,0002}"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /12350001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /12350002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /12350001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /12350002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 <stdout>
---_curl_--%HOSTIP:%HTTPPORT/12350001
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 15

 

 the number one
---_curl_--%HOSTIP:%HTTPPORT/12350002
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0002
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 16

 

 two is nice too
---_curl_--%HOSTIP:%HTTPPORT/12350001
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 15

 

 the number one
---_curl_--%HOSTIP:%HTTPPORT/12350002
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0002
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 16

diff --git a/tests/data/test1237 b/tests/data/test1237
index a016e5f..8e9590e 100644
--- a/tests/data/test1237
+++ b/tests/data/test1237
@@ -27,14 +27,14 @@
 URL with 1000+ letter user name + password
  </name>
  <command>
-"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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CQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkI=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1238 b/tests/data/test1238
index 88c9a5b..606dd1f 100644
--- a/tests/data/test1238
+++ b/tests/data/test1238
@@ -37,7 +37,7 @@
  </name>
 # if less than 1000 bytes/sec within 2 seconds, abort!
  <command>
-tftp://%HOSTIP:%TFTPPORT//1238 -Y1000 -y2
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER -Y1000 -y2
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /1238
+filename: /%TESTNUMBER
 </protocol>
 # 28 = CURLE_OPERATION_TIMEDOUT
 <errorcode>
diff --git a/tests/data/test1239 b/tests/data/test1239
index 375d92b..1679ce5 100644
--- a/tests/data/test1239
+++ b/tests/data/test1239
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -34,7 +34,7 @@
 HTTP with -z + -w response_code and simulated 304
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1239 -z "-dec 12 12:00:00 1999 GMT" -w '%{response_code}'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "-dec 12 12:00:00 1999 GMT" -w '%{response_code}'
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1239 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -51,7 +51,7 @@
 </protocol>
 <stdout nonewline="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
 ETag: "21025-dc7-39462498"
diff --git a/tests/data/test124 b/tests/data/test124
index 255d873..f21c28f 100644
--- a/tests/data/test124
+++ b/tests/data/test124
@@ -26,7 +26,7 @@
 FTP download, failed PWD
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/124
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -39,8 +39,8 @@
 EPSV

 PASV

 TYPE I

-SIZE 124

-RETR 124

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1240 b/tests/data/test1240
index 44ce1f6..11a7e0f 100644
--- a/tests/data/test1240
+++ b/tests/data/test1240
@@ -25,19 +25,19 @@
 glob [0-1] with stuff after range (7.33.0 regression)
  </name>
  <command>
-"%HOSTIP:%HTTPPORT/0[0-1]/1240"
+"%HOSTIP:%HTTPPORT/0[0-1]/%TESTNUMBER"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /00/1240 HTTP/1.1

+GET /00/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /01/1240 HTTP/1.1

+GET /01/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1241 b/tests/data/test1241
index 0089828..952fa23 100644
--- a/tests/data/test1241
+++ b/tests/data/test1241
@@ -38,7 +38,7 @@
 HTTP _without_ dotdot removal
  </name>
  <command>
---path-as-is --proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1241:8990/../../hej/but/who/../1241?stupid=me/../1241#soo/../1241 http://test.remote.haxx.se.1241:8990/../../hej/but/who/../12410001#/../12410001
+--path-as-is --proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER#soo/../%TESTNUMBER http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER0001#/../%TESTNUMBER0001
 </command>
 <features>
 proxy
@@ -49,14 +49,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://test.remote.haxx.se.1241:8990/../../hej/but/who/../1241?stupid=me/../1241 HTTP/1.1

-Host: test.remote.haxx.se.1241:8990

+GET http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.haxx.se.1241:8990/../../hej/but/who/../12410001 HTTP/1.1

-Host: test.remote.haxx.se.1241:8990

+GET http://test.remote.haxx.se.%TESTNUMBER:8990/../../hej/but/who/../%TESTNUMBER0001 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1242 b/tests/data/test1242
index 80111eb..9f573a7 100644
--- a/tests/data/test1242
+++ b/tests/data/test1242
@@ -27,7 +27,7 @@
 TFTP retrieve without TFTP options requests
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT//1242 --tftp-no-options
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --tftp-no-options
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 <protocol>
 opcode: 1
 mode: octet
-filename: /1242
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1243 b/tests/data/test1243
index 8a89af0..f8b246f 100644
--- a/tests/data/test1243
+++ b/tests/data/test1243
@@ -16,9 +16,9 @@
 TFTP send without TFTP options requests
  </name>
  <command>
--T log/test1243.txt tftp://%HOSTIP:%TFTPPORT// --tftp-no-options
+-T log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT// --tftp-no-options
 </command>
-<file name="log/test1243.txt">
+<file name="log/test%TESTNUMBER.txt">
 a chunk of
 data
 sent
@@ -38,7 +38,7 @@
 <protocol>
 opcode: 2
 mode: octet
-filename: /test1243.txt
+filename: /test%TESTNUMBER.txt
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test1244 b/tests/data/test1244
index c2ac4a4..fa8ac90 100644
--- a/tests/data/test1244
+++ b/tests/data/test1244
@@ -39,7 +39,7 @@
 HTTP GET same URL - different proxy ports
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1244 -x %HOSTIP:%HTTPPORT --next http://%HOSTIP:%HTTPPORT/124400001 -x %HOSTIP:%HTTPSPORT
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -x %HOSTIP:%HTTPPORT --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER00001 -x %HOSTIP:%HTTPSPORT
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 56
 </errorcode>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/1244 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1245 b/tests/data/test1245
index d60ff2b..0814e7d 100644
--- a/tests/data/test1245
+++ b/tests/data/test1245
@@ -15,10 +15,10 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 0

-Location: ftp://%HOSTIP:%FTPPORT/1245

+Location: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER

 Connection: close

 

 </data>
@@ -35,7 +35,7 @@
 --proto deny must override --proto-redir allow
 </name>
 <command>
---location --proto +all,-ftp --proto-redir -all,+ftp http://%HOSTIP:%HTTPPORT/1245
+--location --proto +all,-ftp --proto-redir -all,+ftp http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1245 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1246 b/tests/data/test1246
index bc3d2b0..4cb0c3a 100644
--- a/tests/data/test1246
+++ b/tests/data/test1246
@@ -38,7 +38,7 @@
 URL with '#' at end of host name instead of '/'
  </name>
  <command>
---proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1246:%HTTPPORT#@127.0.0.1/tricked.html no-scheme-url.com.1246:%HTTPPORT#@127.127.127.127/again.html
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:%HTTPPORT#@127.0.0.1/tricked.html no-scheme-url.com.%TESTNUMBER:%HTTPPORT#@127.127.127.127/again.html
 </command>
 <features>
 proxy
@@ -49,14 +49,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://test.remote.haxx.se.1246:%HTTPPORT/ HTTP/1.1

-Host: test.remote.haxx.se.1246:%HTTPPORT

+GET http://test.remote.haxx.se.%TESTNUMBER:%HTTPPORT/ HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://no-scheme-url.com.1246:%HTTPPORT/ HTTP/1.1

-Host: no-scheme-url.com.1246:%HTTPPORT

+GET http://no-scheme-url.com.%TESTNUMBER:%HTTPPORT/ HTTP/1.1

+Host: no-scheme-url.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1247 b/tests/data/test1247
index ff127eb..02c695c 100644
--- a/tests/data/test1247
+++ b/tests/data/test1247
@@ -23,7 +23,7 @@
 --fail-early
  </name>
  <command>
---fail-early h1234://%HOSTIP:%HTTPPORT/1247 http://%HOSTIP:%HTTPPORT/1247
+--fail-early h1234://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1248 b/tests/data/test1248
index 7410483..721c03e 100644
--- a/tests/data/test1248
+++ b/tests/data/test1248
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -29,14 +29,14 @@
 Access a non-proxied host with using the combination of --proxy option and --noproxy option
 </name>
 <command>
-http://user:secret@%HOSTIP:%HTTPPORT/1248 --proxy http://dummy:%NOLISTENPORT/ --noproxy %HOSTIP --max-time 5
+http://user:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://dummy:%NOLISTENPORT/ --noproxy %HOSTIP --max-time 5
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1248 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpzZWNyZXQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1249 b/tests/data/test1249
index 13a1463..cae3e99 100644
--- a/tests/data/test1249
+++ b/tests/data/test1249
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -32,14 +32,14 @@
 NO_PROXY=%HOSTIP
 </setenv>
 <command>
-http://user:secret@%HOSTIP:%HTTPPORT/1249 --proxy http://dummy:%NOLISTENPORT/ --max-time 5
+http://user:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://dummy:%NOLISTENPORT/ --max-time 5
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1249 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpzZWNyZXQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test125 b/tests/data/test125
index 5677aeb..39b2b32 100644
--- a/tests/data/test125
+++ b/tests/data/test125
@@ -21,7 +21,7 @@
 FTP download, failed CWD
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/to/file/125
+ftp://%HOSTIP:%FTPPORT/path/to/file/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1250 b/tests/data/test1250
index acd670e..4c47cf2 100644
--- a/tests/data/test1250
+++ b/tests/data/test1250
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -33,14 +33,14 @@
 http_proxy=http://dummy:%PROXYPORT/
 </setenv>
 <command>
-http://user:secret@%HOSTIP:%HTTPPORT/1250 --noproxy %HOSTIP --max-time 5
+http://user:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --noproxy %HOSTIP --max-time 5
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1250 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpzZWNyZXQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1251 b/tests/data/test1251
index f5cf513..f5db4d3 100644
--- a/tests/data/test1251
+++ b/tests/data/test1251
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -34,14 +34,14 @@
 NO_PROXY=%HOSTIP
 </setenv>
 <command>
-http://user:secret@%HOSTIP:%HTTPPORT/1251 --max-time 5
+http://user:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --max-time 5
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1251 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpzZWNyZXQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1252 b/tests/data/test1252
index e68fcb9..13fe3b3 100644
--- a/tests/data/test1252
+++ b/tests/data/test1252
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -33,14 +33,14 @@
 NO_PROXY=example.com
 </setenv>
 <command>
-http://%HOSTIP:%HTTPPORT/1252 --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1252 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1253 b/tests/data/test1253
index 7ad1f86..96f0a2d 100644
--- a/tests/data/test1253
+++ b/tests/data/test1253
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -33,7 +33,7 @@
 NO_PROXY=example.com
 </setenv>
 <command>
-http://somewhere.example.com/1253 --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
+http://somewhere.example.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
 </command>
 <features>
 proxy
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://somewhere.example.com/1253 HTTP/1.1

+GET http://somewhere.example.com/%TESTNUMBER HTTP/1.1

 Host: somewhere.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1254 b/tests/data/test1254
index b2f27f9..a39cbd2 100644
--- a/tests/data/test1254
+++ b/tests/data/test1254
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -33,7 +33,7 @@
 NO_PROXY=example.com
 </setenv>
 <command>
-http://somewhere.example.com/1254 --proxy http://%HOSTIP:%HTTPPORT --noproxy ""
+http://somewhere.example.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --noproxy ""
 </command>
 <features>
 proxy
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://somewhere.example.com/1254 HTTP/1.1

+GET http://somewhere.example.com/%TESTNUMBER HTTP/1.1

 Host: somewhere.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1255 b/tests/data/test1255
index 9148a56..7c1fa24 100644
--- a/tests/data/test1255
+++ b/tests/data/test1255
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -34,14 +34,14 @@
 NO_PROXY=example.com
 </setenv>
 <command>
-http://%HOSTIP:%HTTPPORT/1255 --noproxy %HOSTIP
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --noproxy %HOSTIP
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1255 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1256 b/tests/data/test1256
index 1ba0a09..f9f0fdc 100644
--- a/tests/data/test1256
+++ b/tests/data/test1256
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -34,7 +34,7 @@
 NO_PROXY=example.com
 </setenv>
 <command>
-http://somewhere.example.com/1256 --noproxy %HOSTIP
+http://somewhere.example.com/%TESTNUMBER --noproxy %HOSTIP
 </command>
 <features>
 proxy
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://somewhere.example.com/1256 HTTP/1.1

+GET http://somewhere.example.com/%TESTNUMBER HTTP/1.1

 Host: somewhere.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1257 b/tests/data/test1257
index b05c524..82c61ee 100644
--- a/tests/data/test1257
+++ b/tests/data/test1257
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -34,7 +34,7 @@
 NO_PROXY=example.com
 </setenv>
 <command>
-http://somewhere.example.com/1257 --noproxy ""
+http://somewhere.example.com/%TESTNUMBER --noproxy ""
 </command>
 <features>
 proxy
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://somewhere.example.com/1257 HTTP/1.1

+GET http://somewhere.example.com/%TESTNUMBER HTTP/1.1

 Host: somewhere.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1258 b/tests/data/test1258
index 297460c..a4cef15 100644
--- a/tests/data/test1258
+++ b/tests/data/test1258
@@ -13,9 +13,9 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

-Set-Cookie: I-am=here; domain=localhost;
+Set-Cookie: I-am=here; domain=localhost;

 

 boo
 </data>
@@ -30,14 +30,14 @@
 HTTP, use cookies with localhost
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1258 http://%HOSTIP:%HTTPPORT/we/want?hoge=fuga -b non-existing -H "Host: localhost"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want?hoge=fuga -b non-existing -H "Host: localhost"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1258 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: localhost

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1259 b/tests/data/test1259
index 0bfa71c..4e0c6d4 100644
--- a/tests/data/test1259
+++ b/tests/data/test1259
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

-Set-Cookie: I-am=here; domain=localhost;
+Set-Cookie: I-am=here; domain=localhost;

 

 boo
 </data>
@@ -27,14 +27,14 @@
 HTTP URL with semicolon in password
  </name>
  <command>
-"http://user:pass;word@%HOSTIP:%HTTPPORT/we/want/1259"
+"http://user:pass;word@%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1259 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcjpwYXNzO3dvcmQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test126 b/tests/data/test126
index 0872214..f1b2527 100644
--- a/tests/data/test126
+++ b/tests/data/test126
@@ -26,7 +26,7 @@
 FTP download with multiple replies at once in RETR
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/lululul/126
+ftp://%HOSTIP:%FTPPORT/blalbla/lululul/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 CWD lululul

 EPSV

 TYPE I

-SIZE 126

-RETR 126

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1260 b/tests/data/test1260
index b246882..cff79e2 100644
--- a/tests/data/test1260
+++ b/tests/data/test1260
@@ -22,7 +22,7 @@
 HTTP URL with rubbish after port number
  </name>
  <command>
--g "http://[%HOSTIP]:%NOLISTENPORT:80/we/want/1260" "http://%HOSTIP:%NOLISTENPORT:80/we/want/1260" "http://user@example.com:80@localhost"
+-g "http://[%HOSTIP]:%NOLISTENPORT:80/we/want/%TESTNUMBER" "http://%HOSTIP:%NOLISTENPORT:80/we/want/%TESTNUMBER" "http://user@example.com:80@localhost"
 </command>
 </client>
 
diff --git a/tests/data/test1261 b/tests/data/test1261
index ef3cded..0fc3833 100644
--- a/tests/data/test1261
+++ b/tests/data/test1261
@@ -27,17 +27,17 @@
 http
 </server>
  <name>
-'redirect_url' with --location and --max-redir
+'redirect_url' with --location and --max-redirs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1261 -w '%{redirect_url}\n' --location --max-redir 0
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url}\n' --location --max-redirs 0
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1261 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1262 b/tests/data/test1262
index ed526c0..63abe8b 100644
--- a/tests/data/test1262
+++ b/tests/data/test1262
@@ -23,7 +23,7 @@
 FTP request and denied to download an older file with -z
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/1262 -z "-1 jan 2001"
+ftp://%HOSTIP:%FTPPORT/blalbla/%TESTNUMBER -z "-1 jan 2001"
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 PASS ftp@example.com

 PWD

 CWD blalbla

-MDTM 1262

+MDTM %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1263 b/tests/data/test1263
index 88b1377..ef42f20 100644
--- a/tests/data/test1263
+++ b/tests/data/test1263
@@ -23,7 +23,7 @@
 HTTP URL with rubbish after IPv6 bracket
  </name>
  <command>
--g "http://[%HOSTIP]test:%NOLISTENPORT/we/want/1263" "http://[%HOSTIP][%HOSTIP]:%NOLISTENPORT/we/want/1263" "http://user@[::1]@localhost"
+-g "http://[%HOSTIP]test:%NOLISTENPORT/we/want/%TESTNUMBER" "http://[%HOSTIP][%HOSTIP]:%NOLISTENPORT/we/want/%TESTNUMBER" "http://user@[::1]@localhost"
 </command>
 </client>
 
diff --git a/tests/data/test1264 b/tests/data/test1264
index 272db73..54fb6ff 100644
--- a/tests/data/test1264
+++ b/tests/data/test1264
@@ -22,7 +22,7 @@
 HTTP URL with space in host name
  </name>
  <command>
--g "http://127.0.0.1 www.example.com/we/want/1264"
+-g "http://127.0.0.1 www.example.com/we/want/%TESTNUMBER"
 </command>
 </client>
 
diff --git a/tests/data/test1265 b/tests/data/test1265
index 12d5243..b18f2db 100644
--- a/tests/data/test1265
+++ b/tests/data/test1265
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -34,14 +34,14 @@
 NO_PROXY=::1
 </setenv>
 <command>
-http://%HOST6IP:%HTTP6PORT/1265
+http://%HOST6IP:%HTTP6PORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1265 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1266 b/tests/data/test1266
index 1de936e..c5c8ba3 100644
--- a/tests/data/test1266
+++ b/tests/data/test1266
@@ -26,7 +26,7 @@
 HTTP GET with a single-byte HTTP/0.9 response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1266 --http0.9
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http0.9
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1266 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1267 b/tests/data/test1267
index 06500e8..7ca6dde 100644
--- a/tests/data/test1267
+++ b/tests/data/test1267
@@ -26,7 +26,7 @@
 HTTP GET with a invalid HTTP/1 response line start
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1267 --http0.9
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http0.9
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1267 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1268 b/tests/data/test1268
index c5fe5f7..562f376 100644
--- a/tests/data/test1268
+++ b/tests/data/test1268
@@ -23,12 +23,12 @@
 file name argument looks like a flag
  </name>
  <command>
---stderr log/moo1268 --unix-socket -k hej://moo
+--stderr log/moo%TESTNUMBER --unix-socket -k hej://moo
 </command>
 </client>
 
 <verify>
-<file name="log/moo1268" mode="text">
+<file name="log/moo%TESTNUMBER" mode="text">
 Warning: The file name argument '-k' looks like a flag.
 curl: (1) Protocol "hej" not supported or disabled in libcurl
 </file>
diff --git a/tests/data/test1269 b/tests/data/test1269
index 7cf86ca..f68cf9c 100644
--- a/tests/data/test1269
+++ b/tests/data/test1269
@@ -20,7 +20,7 @@
 too large --retry-delay value
  </name>
  <command>
---retry 3 --retry-delay 9223372036854776 http://%HOSTIP:%NOLISTENPORT/1269
+--retry 3 --retry-delay 9223372036854776 http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test127 b/tests/data/test127
index ac46d8d..0b0f4f5 100644
--- a/tests/data/test127
+++ b/tests/data/test127
@@ -23,7 +23,7 @@
 FTP --disable-epsv
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/to/file/127 --disable-epsv
+ftp://%HOSTIP:%FTPPORT/path/to/file/%TESTNUMBER --disable-epsv
 </command>
 </client>
 
@@ -38,8 +38,8 @@
 CWD file

 PASV

 TYPE I

-SIZE 127

-RETR 127

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1270 b/tests/data/test1270
index 680e1e4..0c289d0 100644
--- a/tests/data/test1270
+++ b/tests/data/test1270
@@ -35,14 +35,14 @@
 Basic 'redirect_url'
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1270 -w '%{redirect_url}\n' -s
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url}\n' -s
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1270 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1271 b/tests/data/test1271
index ce89c38..184fd87 100644
--- a/tests/data/test1271
+++ b/tests/data/test1271
@@ -27,16 +27,16 @@
 --write-out from file with empty file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/our/1271 -w @log/blank1271
+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w @log/blank%TESTNUMBER
 </command>
-<file name="log/blank1271">
+<file name="log/blank%TESTNUMBER">
 </file>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/our/1271 HTTP/1.1

+GET /we/want/our/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1272 b/tests/data/test1272
new file mode 100644
index 0000000..fc1baea
--- /dev/null
+++ b/tests/data/test1272
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+GOPHER
+GOPHERS
+INDEX
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+iMenu results		error.host	1
+0Selector 	/bar	bar.foo.invalid	70
+.
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+gophers
+</server>
+ <name>
+Gophers index
+ </name>
+ <command>
+-k gophers://%HOSTIP:%GOPHERSPORT/1/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+/%TESTNUMBER

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1273 b/tests/data/test1273
new file mode 100644
index 0000000..61d475a
--- /dev/null
+++ b/tests/data/test1273
@@ -0,0 +1,78 @@
+<testcase>
+# also verified by 1156 in libcurl API terms
+
+<info>
+<keywords>
+HTTP
+HTTP GET
+Resume
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 416 Invalid range

+Connection: close

+Content-Length: 0

+

+</data>
+
+# The file data that exists at the start of the test must be included in
+# the verification.
+<datacheck>
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+HTTP/1.1 416 Invalid range

+Connection: close

+Content-Length: 0

+

+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+-f and resume transfer of an entirely-downloaded file
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C - -f
+</command>
+<file name="log/curl%TESTNUMBER.out">
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+012345678
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Range: bytes=100-

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test128 b/tests/data/test128
index 743cd12..c9429c5 100644
--- a/tests/data/test128
+++ b/tests/data/test128
@@ -20,9 +20,9 @@
 FTP upload with --crlf
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/128 -T log/upload128 --crlf
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER --crlf
 </command>
-<file name="log/upload128">
+<file name="log/upload%TESTNUMBER">
 file
 with unix newlines
 meant to be
@@ -41,7 +41,7 @@
 PWD

 EPSV

 TYPE I

-STOR 128

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test1280 b/tests/data/test1280
index 0b7bc00..3744dc8 100644
--- a/tests/data/test1280
+++ b/tests/data/test1280
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 
@@ -27,29 +27,29 @@
 simple [a-d] globbing
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/[a-d]/1280
+http://%HOSTIP:%HTTPPORT/[a-d]/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /a/1280 HTTP/1.1

+GET /a/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /b/1280 HTTP/1.1

+GET /b/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /c/1280 HTTP/1.1

+GET /c/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /d/1280 HTTP/1.1

+GET /d/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1281 b/tests/data/test1281
index 661b3c8..f6781d4 100644
--- a/tests/data/test1281
+++ b/tests/data/test1281
@@ -24,7 +24,7 @@
 reject non-numerical port number in URL
  </name>
  <command>
-http://%HOSTIP:alpha/beta/1281
+http://%HOSTIP:alpha/beta/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1282 b/tests/data/test1282
index 197356c..76e7a00 100644
--- a/tests/data/test1282
+++ b/tests/data/test1282
@@ -25,7 +25,7 @@
 FTP with 633 response before gss initialized
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1282
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 
 </client>
diff --git a/tests/data/test1283 b/tests/data/test1283
index d4c0ad9..df0458c 100644
--- a/tests/data/test1283
+++ b/tests/data/test1283
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 Connection: close

 

@@ -30,22 +30,22 @@
 globbing range with same start and stop
 </name>
 <command option="no-output">
-http://%HOSTIP:%HTTPPORT/[a-a][1-1][b-b:1][2-2:1]/1283 -o "log/outfile1283_#1#2#3#4.dump"
+http://%HOSTIP:%HTTPPORT/[a-a][1-1][b-b:1][2-2:1]/%TESTNUMBER -o "log/outfile%TESTNUMBER_#1#2#3#4.dump"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /a1b2/1283 HTTP/1.1

+GET /a1b2/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/outfile1283_a1b2.dump">
+<file name="log/outfile%TESTNUMBER_a1b2.dump">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 Connection: close

 

diff --git a/tests/data/test1284 b/tests/data/test1284
index 4509a9b..dd2d8b8 100644
--- a/tests/data/test1284
+++ b/tests/data/test1284
@@ -60,23 +60,23 @@
 # even when there is a user-specified Content-Length header.
 # https://github.com/curl/curl/pull/1242
 <command>
--H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/1284
+-H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /1284 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /1284 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1284", response="5763079608de439072861a59ac733515"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="5763079608de439072861a59ac733515"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test1285 b/tests/data/test1285
index 62828ba..e5a38e0 100644
--- a/tests/data/test1285
+++ b/tests/data/test1285
@@ -60,9 +60,9 @@
 # even when there is a user-specified Content-Length header.
 # https://github.com/curl/curl/pull/1242
 <command>
--H "Content-Length: 85" -u auser:apasswd --digest -T log/put1285 http://%HOSTIP:%HTTPPORT/1285
+-H "Content-Length: 85" -u auser:apasswd --digest -T log/put%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
-<file name="log/put1285">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -73,15 +73,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1285 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 

-PUT /1285 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1285", response="dc185587d5e8391b347eef194c2a3cd6"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="dc185587d5e8391b347eef194c2a3cd6"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

diff --git a/tests/data/test1286 b/tests/data/test1286
index c64a79b..df0f35f 100644
--- a/tests/data/test1286
+++ b/tests/data/test1286
@@ -22,7 +22,7 @@
 HTTP/1.1 302 Thanks for this, but we want to redir you!

 Server: Microsoft-IIS/5.0

 Content-Type: text/html; charset=iso-8859-1

-Location: /12860001

+Location: /%TESTNUMBER0001

 Content-Length: 0

 

 </data1000>
@@ -44,7 +44,7 @@
 HTTP/1.1 302 Thanks for this, but we want to redir you!

 Server: Microsoft-IIS/5.0

 Content-Type: text/html; charset=iso-8859-1

-Location: /12860001

+Location: /%TESTNUMBER0001

 Content-Length: 0

 

 HTTP/1.1 404 Not Found

@@ -71,7 +71,7 @@
 # This test is to ensure the nonce-count (nc) increases
 # https://github.com/curl/curl/pull/1251
 <command>
--u auser:apasswd --location --digest http://%HOSTIP:%HTTPPORT/1286
+-u auser:apasswd --location --digest http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -89,20 +89,20 @@
 if(s/^(Authorization: Digest )([^\r\n]+)(\r?\n)$//) { $_ = $1 . join(', ', map { s/^(cnonce=)"[a-zA-Z0-9+\/=]+"$/$1REMOVED/; s/^(response=)"[a-f0-9]{32}"$/$1REMOVED/; s/^qop="auth"$/qop=auth/; $_ } sort split(/, */, $2)) . $3; }
 </strippart>
 <protocol>
-GET /1286 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1286 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest cnonce=REMOVED, nc=00000001, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/1286", username="auser"

+Authorization: Digest cnonce=REMOVED, nc=00000001, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/%TESTNUMBER", username="auser"

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /12860001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest cnonce=REMOVED, nc=00000002, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/12860001", username="auser"

+Authorization: Digest cnonce=REMOVED, nc=00000002, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/%TESTNUMBER0001", username="auser"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1287 b/tests/data/test1287
index d53a72b..5493e7d 100644
--- a/tests/data/test1287
+++ b/tests/data/test1287
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/html

 Funny-head: yesyes

@@ -37,7 +37,7 @@
 Transfer-Encoding: chunked

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/html

 Funny-head: yesyes

@@ -58,7 +58,7 @@
 HTTP over proxy-tunnel ignore TE and CL in CONNECT 2xx responses
 </name>
 <command>
--v --proxytunnel -x %HOSTIP:%PROXYPORT http://test.1287:%HTTPPORT/we/want/that/page/1287
+-v --proxytunnel -x %HOSTIP:%PROXYPORT http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -69,20 +69,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT test.1287:%HTTPPORT HTTP/1.1

-Host: test.1287:%HTTPPORT

+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/1287 HTTP/1.1

-Host: test.1287:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/stderr1287" mode="text">
+<file name="log/stderr%TESTNUMBER" mode="text">
 * Ignoring Content-Length in CONNECT 200 response
 * Ignoring Transfer-Encoding in CONNECT 200 response
 </file>
diff --git a/tests/data/test1288 b/tests/data/test1288
index a841709..583fc42 100644
--- a/tests/data/test1288
+++ b/tests/data/test1288
@@ -20,7 +20,7 @@
 
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -42,7 +42,7 @@
 Suppress proxy CONNECT response headers
 </name>
 <command>
---proxytunnel --suppress-connect-headers --dump-header - --include --write-out "\nCONNECT CODE: %{http_connect}\nRECEIVED HEADER BYTE TOTAL: %{size_header}\n" --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.1288:%HTTPPORT/we/want/that/page/1288
+--proxytunnel --suppress-connect-headers --dump-header - --include --write-out "\nCONNECT CODE: %{http_connect}\nRECEIVED HEADER BYTE TOTAL: %{size_header}\n" --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -53,15 +53,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT %HOSTIP.1288:%HTTPPORT HTTP/1.1

-Host: %HOSTIP.1288:%HTTPPORT

+CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/1288 HTTP/1.1

-Host: %HOSTIP.1288:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

@@ -75,8 +75,8 @@
 <stdout>
 HTTP/1.1 200 OK

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Server: test-server/fake

 Content-Type: text/html

diff --git a/tests/data/test129 b/tests/data/test129
index cf1e839..6da58be 100644
--- a/tests/data/test129
+++ b/tests/data/test129
@@ -1,52 +1,57 @@
 <testcase>
 <info>
 <keywords>
-FTP
-EPSV
-TYPE A
-RETR
-type=
+HTTP
+HTTP GET
 </keywords>
 </info>
+
+#
 # Server-side
 <reply>
-<size>
-37
-</size>
-<data>
-data
-    to
-      see
-that FTP
-works
-  so does it?
+<data nocheck="yes">
+HTTP/1.2 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
 </data>
 </reply>
 
+#
 # Client-side
 <client>
 <server>
-ftp
+http
 </server>
  <name>
-FTP GET with type=A style ASCII URL and understated server SIZE
+HTTP/1.2 is rejected
  </name>
  <command>
-"ftp://%HOSTIP:%FTPPORT/129;type=A"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
+#
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-USER anonymous

-PASS ftp@example.com

-PWD

-EPSV

-TYPE A

-SIZE 129

-RETR 129

-QUIT

+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

 </protocol>
+# CURLE_UNSUPPORTED_PROTOCOL
+<errorcode>
+1
+</errorcode>
 </verify>
 </testcase>
diff --git a/tests/data/test1290 b/tests/data/test1290
index 871dcd7..9592478 100644
--- a/tests/data/test1290
+++ b/tests/data/test1290
@@ -29,14 +29,14 @@
 Verify URL globbing ignores []
 </name>
 <command>
-"http://%HOSTIP:%HTTPPORT/we/want/[]/page/1290"
+"http://%HOSTIP:%HTTPPORT/we/want/[]/page/%TESTNUMBER"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/[]/page/1290 HTTP/1.1

+GET /we/want/[]/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1291 b/tests/data/test1291
index a2e505f..5997dcc 100644
--- a/tests/data/test1291
+++ b/tests/data/test1291
@@ -24,14 +24,14 @@
 Attempt to upload 1000 files but fail immediately
 </name>
 <command>
--K log/cmd1291 --fail-early
+-K log/cmd%TESTNUMBER --fail-early
 </command>
 <file name="log/upload-this">
 XXXXXXXx
 </file>
 # generate the config file
 <precheck>
-perl -e 'for(1 .. 1000) { printf("upload-file=log/upload-this\nurl=htttttp://non-existing-host.haxx.se/upload/1291\n", $_);}' > log/cmd1291;
+perl -e 'for(1 .. 1000) { printf("upload-file=log/upload-this\nurl=htttttp://non-existing-host.haxx.se/upload/%TESTNUMBER\n", $_);}' > log/cmd%TESTNUMBER;
 </precheck>
 </client>
 
diff --git a/tests/data/test1292 b/tests/data/test1292
index dee0def..8b8806e 100644
--- a/tests/data/test1292
+++ b/tests/data/test1292
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -30,7 +30,7 @@
 Replaced internal headers with a blank one
  </name>
  <command>
- -H "Host;" -H "Accept;" http://%HOSTIP:%HTTPPORT/1292
+ -H "Host;" -H "Accept;" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1292 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host:

 User-Agent: curl/%VERSION

 Accept:

diff --git a/tests/data/test1293 b/tests/data/test1293
index df72b75..8248861 100644
--- a/tests/data/test1293
+++ b/tests/data/test1293
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 Multipart formpost to two URLs, the first failing
  </name>
  <command>
-http://0 http://%HOSTIP:%HTTPPORT/1293 -F=
+http://0 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F=
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /1293 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1294 b/tests/data/test1294
index 4fa1cb1..7f2a377 100644
--- a/tests/data/test1294
+++ b/tests/data/test1294
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -44,7 +44,7 @@
 CURL_SMALLREQSEND=128
 </setenv>
 <command>
-http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1294 -H "Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to wit, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511"
+http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER -H "Among other public buildings in a certain town, which for many reasons it will be prudent to refrain from mentioning, and to which I will assign no fictitious name, there is one anciently common to most towns, great or small to wit, a workhouse; and in this workhouse was born; on a day and date which I need not trouble myself to repeat, inasmuch as it can be of no possible consequence to the reader, in this stage of the business at all events; the item of mortality whose name is prefixed to the head of this chapter: 511"
 </command>
 </client>
 
@@ -52,7 +52,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1294 HTTP/1.1

+GET /012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1295 b/tests/data/test1295
index 50e5fa2..e3692f5 100644
--- a/tests/data/test1295
+++ b/tests/data/test1295
@@ -9,9 +9,9 @@
 #
 # Server-side
 <reply>
-<data>
+<data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -44,7 +44,7 @@
 CURL_SMALLREQSEND=100
 </setenv>
 <command>
-http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1295 -H "012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679: 300" -d "Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table."
+http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER -H "012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679: 300" -d "Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table." -w '%{size_upload}\n'
 </command>
 </client>
 
@@ -52,7 +52,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1295 HTTP/1.1

+POST /012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -62,5 +62,20 @@
 

 Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table.
 </protocol>
+<stdout>
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+165
+</stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1296 b/tests/data/test1296
index 55b01c4..20dc265 100644
--- a/tests/data/test1296
+++ b/tests/data/test1296
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,14 +35,14 @@
 </name>
 
 <command>
-http://user%0aname:password@%HOSTIP:%HTTPPORT/1296
+http://user%0aname:password@%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1296 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcgpuYW1lOnBhc3N3b3Jk

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1297 b/tests/data/test1297
index 6cffff8..f410362 100644
--- a/tests/data/test1297
+++ b/tests/data/test1297
@@ -33,7 +33,7 @@
 CONNECT to peer that returns nothing
 </name>
 <command>
---proxytunnel --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.1297:%HTTPPORT/we/want/that/page/1297
+--proxytunnel --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -44,15 +44,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT %HOSTIP.1297:%HTTPPORT HTTP/1.1

-Host: %HOSTIP.1297:%HTTPPORT

+CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/1297 HTTP/1.1

-Host: %HOSTIP.1297:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1298 b/tests/data/test1298
index 6a34aa3..2afefac 100644
--- a/tests/data/test1298
+++ b/tests/data/test1298
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP GET special path with --request-target
  </name>
  <command>
---request-target "XXX" "http://%HOSTIP:%HTTPPORT/" -H "Testno: 1298"
+--request-target "XXX" "http://%HOSTIP:%HTTPPORT/" -H "Testno: %TESTNUMBER"
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 1298

+Testno: %TESTNUMBER

 

 </protocol>
 </verify>
diff --git a/tests/data/test1299 b/tests/data/test1299
index 2cf293a..7f3e80e 100644
--- a/tests/data/test1299
+++ b/tests/data/test1299
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -34,7 +34,7 @@
 Send "OPTIONS *" with --request-target
  </name>
  <command>
---request-target '*' -X OPTIONS http://%HOSTIP:%HTTPPORT/ -H "Testno: 1299"
+--request-target '*' -X OPTIONS http://%HOSTIP:%HTTPPORT/ -H "Testno: %TESTNUMBER"
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 1299

+Testno: %TESTNUMBER

 

 </protocol>
 </verify>
diff --git a/tests/data/test13 b/tests/data/test13
index 1216979..72dd191 100644
--- a/tests/data/test13
+++ b/tests/data/test13
@@ -25,14 +25,14 @@
 HTTP custom request 'DELETE'
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/13 -X DELETE
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -X DELETE
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-DELETE /want/13 HTTP/1.1

+DELETE /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test130 b/tests/data/test130
index 85892f1..31447cb 100644
--- a/tests/data/test130
+++ b/tests/data/test130
@@ -37,9 +37,9 @@
 FTP (optional .netrc; no user/pass) dir list PASV
  </name>
  <command>
---netrc-optional --netrc-file log/netrc130 ftp://%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc%TESTNUMBER ftp://%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc130" >
+<file name="log/netrc%TESTNUMBER" >
 # the following two lines were created while testing curl
 # machine %HOSTIP login user1 password commented
 machine %HOSTIP login user1 password passwd1
diff --git a/tests/data/test1304 b/tests/data/test1304
index b402bfc..699a2e4 100644
--- a/tests/data/test1304
+++ b/tests/data/test1304
@@ -18,7 +18,7 @@
  <name>
 netrc parsing unit tests
  </name>
-<file name="log/netrc1304">
+<file name="log/netrc%TESTNUMBER">
 machine example.com login admin password passwd
 machine curl.example.com login none password none
 </file>
diff --git a/tests/data/test1305 b/tests/data/test1305
index 52efbcb..7d14aa8 100644
--- a/tests/data/test1305
+++ b/tests/data/test1305
@@ -20,7 +20,7 @@
 internal hash create/destroy testing
  </name>
 <command>
-1305
+%TESTNUMBER
 </command>
 </client>
 </testcase>
diff --git a/tests/data/test1306 b/tests/data/test1306
index b490efb..7ed4503 100644
--- a/tests/data/test1306
+++ b/tests/data/test1306
@@ -23,7 +23,7 @@
 unit1305
 </tool>
 <command>
-1306
+%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1308 b/tests/data/test1308
index 3755ef8..0c7d1b0 100644
--- a/tests/data/test1308
+++ b/tests/data/test1308
@@ -20,7 +20,7 @@
  <name>
 formpost unit tests
  </name>
-<file name="log/test-1308">
+<file name="log/test-%TESTNUMBER">
 Piece of the file that is to uploaded as a formpost
 </file>
 </client>
diff --git a/tests/data/test131 b/tests/data/test131
index 6e99d8a..63bd021 100644
--- a/tests/data/test131
+++ b/tests/data/test131
@@ -38,9 +38,9 @@
 FTP (optional .netrc; user/no pass) dir list PASV
  </name>
  <command>
---netrc-optional --netrc-file log/netrc131 ftp://user2@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc%TESTNUMBER ftp://user2@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc131" >
+<file name="log/netrc%TESTNUMBER" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1310 b/tests/data/test1310
index cb9db82..11dcfef 100644
--- a/tests/data/test1310
+++ b/tests/data/test1310
@@ -74,10 +74,10 @@
 # set source directory so fake_ntlm can find the test files
 CURL_NTLM_AUTH_SRCDIR=%SRCDIR
 # set the test number
-CURL_NTLM_AUTH_TESTNUM=1310
+CURL_NTLM_AUTH_TESTNUM=%TESTNUMBER
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/1310 -u testuser:anypasswd --ntlm-wb
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:anypasswd --ntlm-wb
 </command>
 <precheck>
 chkhostname curlhost
@@ -87,13 +87,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1310 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1310 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1311 b/tests/data/test1311
index 4078d7b..6d5496f 100644
--- a/tests/data/test1311
+++ b/tests/data/test1311
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1311; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 12345
 </data>
@@ -40,7 +40,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1311 -J -O
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O
 </command>
 </client>
 
@@ -48,13 +48,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1311 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/name1311">
+<file name="log/name%TESTNUMBER">
 12345
 </file>
 
diff --git a/tests/data/test1312 b/tests/data/test1312
index 54659b5..2d48914 100644
--- a/tests/data/test1312
+++ b/tests/data/test1312
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: inline; filename="name1312;weird"
+Content-Disposition: inline; filename="name%TESTNUMBER;weird"
 
 12345
 </data>
@@ -40,7 +40,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-%HOSTIP:%HTTPPORT/1312 -J -O
+%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O
 </command>
 </client>
 
@@ -48,13 +48,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1312 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/name1312;weird">
+<file name="log/name%TESTNUMBER;weird">
 12345
 </file>
 
diff --git a/tests/data/test1313 b/tests/data/test1313
index 3d9c094..b1ac1fc 100644
--- a/tests/data/test1313
+++ b/tests/data/test1313
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: inline; filename='name1313
+Content-Disposition: inline; filename='name%TESTNUMBER
 
 12345
 </data>
@@ -40,7 +40,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1313 -J -O
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O
 </command>
 </client>
 
@@ -48,13 +48,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1313 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/name1313">
+<file name="log/name%TESTNUMBER">
 12345
 </file>
 
diff --git a/tests/data/test1314 b/tests/data/test1314
index 55e3299..343a1c2 100644
--- a/tests/data/test1314
+++ b/tests/data/test1314
@@ -13,7 +13,7 @@
 <data>
 HTTP/1.1 301 This is a weirdo text message swsbounce
 Server: test-server/fake
-Location: //somewhere.example.com/reply/1314
+Location: //somewhere.example.com/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
@@ -32,7 +32,7 @@
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsbounce
 Server: test-server/fake
-Location: //somewhere.example.com/reply/1314
+Location: //somewhere.example.com/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
@@ -54,7 +54,7 @@
 HTTP Location: following a // prefixed url
  </name>
  <command>
-http://firstplace.example.com/want/1314 -L -x http://%HOSTIP:%HTTPPORT
+http://firstplace.example.com/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -64,13 +64,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://firstplace.example.com/want/1314 HTTP/1.1

+GET http://firstplace.example.com/want/%TESTNUMBER HTTP/1.1

 Host: firstplace.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://somewhere.example.com/reply/1314 HTTP/1.1

+GET http://somewhere.example.com/reply/%TESTNUMBER HTTP/1.1

 Host: somewhere.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1315 b/tests/data/test1315
index ffc7bdc..3d3faa8 100644
--- a/tests/data/test1315
+++ b/tests/data/test1315
@@ -29,10 +29,10 @@
 HTTP RFC1867-type formposting - -F with three files, one with explicit type
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1315 -F name=value -F 'file=@log/test1315.txt,log/test1315.txt;type=magic/content,log/test1315.txt'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=value -F 'file=@log/test%TESTNUMBER.txt,log/test%TESTNUMBER.txt;type=magic/content,log/test%TESTNUMBER.txt'
 </command>
 # We create this file before the command is invoked!
-<file name="log/test1315.txt">
+<file name="log/test%TESTNUMBER.txt">
 dummy data
 </file>
 </client>
@@ -43,7 +43,7 @@
 -----+\w+
 </strip>
 <protocol>
-POST /we/want/1315 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -58,19 +58,19 @@
 Content-Disposition: form-data; name="file"

 Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa

 

-Content-Disposition: attachment; filename="test1315.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 dummy data
 

 ------------------------------9ef8d6205763

-Content-Disposition: attachment; filename="test1315.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Type: magic/content

 

 dummy data
 

 ------------------------------9ef8d6205763

-Content-Disposition: attachment; filename="test1315.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 dummy data
diff --git a/tests/data/test1316 b/tests/data/test1316
index d6ea5e1..935c467 100644
--- a/tests/data/test1316
+++ b/tests/data/test1316
@@ -61,7 +61,7 @@
 FTP LIST tunneled through HTTP proxy
  </name>
  <command>
-ftp://ftp.1316:%FTPPORT/ -p -x %HOSTIP:%PROXYPORT
+ftp://ftp.%TESTNUMBER:%FTPPORT/ -p -x %HOSTIP:%PROXYPORT
 </command>
 </client>
 
diff --git a/tests/data/test1317 b/tests/data/test1317
index 7964b10..6ef0652 100644
--- a/tests/data/test1317
+++ b/tests/data/test1317
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP with --resolve
 </name>
 <command>
---resolve example.com:%HTTPPORT:%HOSTIP http://example.com:%HTTPPORT/1317
+--resolve example.com:%HTTPPORT:%HOSTIP http://example.com:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1317 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: example.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1318 b/tests/data/test1318
index 8ce468d..0844852 100644
--- a/tests/data/test1318
+++ b/tests/data/test1318
@@ -12,14 +12,14 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 0
 
 </data>
 <data1>
 HTTP/1.1 200 second version
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 0
 
@@ -36,7 +36,7 @@
 HTTP with --resolve and same host name using different cases
  </name>
  <command>
---resolve MiXeDcAsE.cOm:%HTTPPORT:%HOSTIP http://MiXeDcAsE.cOm:%HTTPPORT/1318 http://mixedcase.com:%HTTPPORT/13180001
+--resolve MiXeDcAsE.cOm:%HTTPPORT:%HOSTIP http://MiXeDcAsE.cOm:%HTTPPORT/%TESTNUMBER http://mixedcase.com:%HTTPPORT/%TESTNUMBER0001
 </command>
 </client>
 
@@ -44,12 +44,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1318 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: MiXeDcAsE.cOm:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /13180001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: mixedcase.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1319 b/tests/data/test1319
index b37a970..ea11925 100644
--- a/tests/data/test1319
+++ b/tests/data/test1319
@@ -56,7 +56,7 @@
 POP3 fetch tunneled through HTTP proxy
  </name>
  <command>
-pop3://pop.1319:%POP3PORT/1319 -p -x %HOSTIP:%PROXYPORT -u user:secret
+pop3://pop.%TESTNUMBER:%POP3PORT/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT -u user:secret
 </command>
 </client>
 
@@ -67,12 +67,12 @@
 CAPA

 USER user

 PASS secret

-RETR 1319

+RETR %TESTNUMBER

 QUIT

 </protocol>
 <proxy>
-CONNECT pop.1319:%POP3PORT HTTP/1.1

-Host: pop.1319:%POP3PORT

+CONNECT pop.%TESTNUMBER:%POP3PORT HTTP/1.1

+Host: pop.%TESTNUMBER:%POP3PORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test132 b/tests/data/test132
index 51cb89c..d33980f 100644
--- a/tests/data/test132
+++ b/tests/data/test132
@@ -37,9 +37,9 @@
 FTP (optional .netrc; user/passwd supplied) dir list PASV
  </name>
  <command>
---netrc-optional --netrc-file log/netrc132 ftp://mary:mark@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc%TESTNUMBER ftp://mary:mark@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc132" >
+<file name="log/netrc%TESTNUMBER" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1320 b/tests/data/test1320
index 2db0e3d..7b43382 100644
--- a/tests/data/test1320
+++ b/tests/data/test1320
@@ -39,7 +39,7 @@
 body

 </stdin>
  <command>
-smtp://smtp.1320:%SMTPPORT/1320 --mail-rcpt recipient@example.com --mail-from sender@example.com -T - -p -x %HOSTIP:%PROXYPORT
+smtp://smtp.%TESTNUMBER:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T - -p -x %HOSTIP:%PROXYPORT
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 1320

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

@@ -61,8 +61,8 @@
 .

 </upload>
 <proxy>
-CONNECT smtp.1320:%SMTPPORT HTTP/1.1

-Host: smtp.1320:%SMTPPORT

+CONNECT smtp.%TESTNUMBER:%SMTPPORT HTTP/1.1

+Host: smtp.%TESTNUMBER:%SMTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test1321 b/tests/data/test1321
index 4607797..88d865e 100644
--- a/tests/data/test1321
+++ b/tests/data/test1321
@@ -52,7 +52,7 @@
 IMAP FETCH tunneled through HTTP proxy
  </name>
  <command>
-'imap://imap.1321:%IMAPPORT/1321/;MAILINDEX=1' -u user:secret -p -x %HOSTIP:%PROXYPORT
+'imap://imap.%TESTNUMBER:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret -p -x %HOSTIP:%PROXYPORT
 </command>
 </client>
 
@@ -62,13 +62,13 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 1321

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
 <proxy>
-CONNECT imap.1321:%IMAPPORT HTTP/1.1

-Host: imap.1321:%IMAPPORT

+CONNECT imap.%TESTNUMBER:%IMAPPORT HTTP/1.1

+Host: imap.%TESTNUMBER:%IMAPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test1322 b/tests/data/test1322
index 71b8cb2..ffd5048 100644
--- a/tests/data/test1322
+++ b/tests/data/test1322
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -37,7 +37,7 @@
 HTTP with --resolve and hostname with trailing dot
 </name>
 <command>
---ipv4 --resolve example.com.:%HTTPPORT:%HOSTIP http://example.com.:%HTTPPORT/1322
+--ipv4 --resolve example.com.:%HTTPPORT:%HOSTIP http://example.com.:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1322 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: example.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1324 b/tests/data/test1324
index 0c89edb..c62e73f 100644
--- a/tests/data/test1324
+++ b/tests/data/test1324
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP with --resolve and [ipv6address]
 </name>
 <command>
---resolve example.com:%HTTP6PORT:%HOST6IP http://example.com:%HTTP6PORT/1324
+--resolve example.com:%HTTP6PORT:%HOST6IP http://example.com:%HTTP6PORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1324 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: example.com:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1325 b/tests/data/test1325
index bbf679d..dea2b2a 100644
--- a/tests/data/test1325
+++ b/tests/data/test1325
@@ -13,28 +13,28 @@
 <reply>
 <data>
 HTTP/1.1 308 OK swsclose

-Location: 13250002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: %TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 308 OK swsclose

-Location: 13250002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: %TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -51,7 +51,7 @@
 HTTP 308-redirect with POST
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/1325 -L -d "moo"
+http://%HOSTIP:%HTTPPORT/we/%TESTNUMBER -L -d "moo"
 </command>
 </client>
 
@@ -59,14 +59,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /we/1325 HTTP/1.1

+POST /we/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooPOST /we/13250002 HTTP/1.1

+mooPOST /we/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1326 b/tests/data/test1326
index 2bcf64b..22c49cf 100644
--- a/tests/data/test1326
+++ b/tests/data/test1326
@@ -29,7 +29,7 @@
 TELNET to HTTP server
  </name>
 <stdin>
-GET /we/want/1326 HTTP/1.0

+GET /we/want/%TESTNUMBER HTTP/1.0

 

 </stdin>
  <command>
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1326 HTTP/1.0

+GET /we/want/%TESTNUMBER HTTP/1.0

 

 </protocol>
 </verify>
diff --git a/tests/data/test1327 b/tests/data/test1327
index a6e3d4f..791189b 100644
--- a/tests/data/test1327
+++ b/tests/data/test1327
@@ -24,15 +24,15 @@
 TELNET check of upload with stdout redirected
  </name>
 <stdin>
-GET /ignore/for/1327 HTTP/1.0

+GET /ignore/for/%TESTNUMBER HTTP/1.0

 

 </stdin>
-<file name="log/1327.txt">
-GET /we/want/1327 HTTP/1.0

+<file name="log/%TESTNUMBER.txt">
+GET /we/want/%TESTNUMBER HTTP/1.0

 

 </file>
  <command option="no-output">
-telnet://%HOSTIP:%HTTPPORT -T log/1327.txt
+telnet://%HOSTIP:%HTTPPORT -T log/%TESTNUMBER.txt
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1327 HTTP/1.0

+GET /we/want/%TESTNUMBER HTTP/1.0

 

 </protocol>
 </verify>
diff --git a/tests/data/test1328 b/tests/data/test1328
index 0fd0c38..b7b3e32 100644
--- a/tests/data/test1328
+++ b/tests/data/test1328
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 404 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Funny-head: yesyes
 
@@ -19,7 +19,7 @@
 </data>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Funny-head: yesyes
@@ -28,7 +28,7 @@
 </data1>
 <datacheck>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Funny-head: yesyes
@@ -47,7 +47,7 @@
 HTTP GET a globbed range with -f
  </name>
  <command>
--f 'http://%HOSTIP:%HTTPPORT/[13280000-13280001]' -o log/#1
+-f 'http://%HOSTIP:%HTTPPORT/[%TESTNUMBER0000-%TESTNUMBER0001]' -o log/#1
 </command>
 </client>
 
@@ -55,12 +55,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /13280000 HTTP/1.1

+GET /%TESTNUMBER0000 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /13280001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1329 b/tests/data/test1329
index 2cec0b8..0ca5b5a 100644
--- a/tests/data/test1329
+++ b/tests/data/test1329
@@ -15,7 +15,7 @@
 /-prefixed proxy name
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/1329 -x "/server"
+http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER -x "/server"
 </command>
 <features>
 proxy
diff --git a/tests/data/test133 b/tests/data/test133
index 0b4d2ff..e9fe83f 100644
--- a/tests/data/test133
+++ b/tests/data/test133
@@ -37,9 +37,9 @@
 FTP (compulsory .netrc; ignored user/passwd) dir list PASV
  </name>
  <command>
--n --netrc-file log/netrc133 ftp://mary:mark@%HOSTIP:%FTPPORT/
+-n --netrc-file log/netrc%TESTNUMBER ftp://mary:mark@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc133" >
+<file name="log/netrc%TESTNUMBER" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1330 b/tests/data/test1330
index f7ac9b0..2cc5aed 100644
--- a/tests/data/test1330
+++ b/tests/data/test1330
@@ -32,8 +32,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <file name="log/memdump">
-MEM unit1330.c: malloc()
-MEM unit1330.c: free()
+MEM unit%TESTNUMBER.c: malloc()
+MEM unit%TESTNUMBER.c: free()
 </file>
 <stripfile>
 s/ =.*//
diff --git a/tests/data/test1331 b/tests/data/test1331
index 09aabf8..4ef0c14 100644
--- a/tests/data/test1331
+++ b/tests/data/test1331
@@ -62,7 +62,7 @@
 HTTP --proxy-anyauth and 407 with cookies
  </name>
  <command>
--U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/1331 --proxy-anyauth -c log/dump1331
+-U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/%TESTNUMBER --proxy-anyauth -c log/dump%TESTNUMBER
 </command>
 <features>
 proxy
@@ -72,13 +72,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://z.x.com/1331 HTTP/1.1

+GET http://z.x.com/%TESTNUMBER HTTP/1.1

 Host: z.x.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://z.x.com/1331 HTTP/1.1

+GET http://z.x.com/%TESTNUMBER HTTP/1.1

 Host: z.x.com

 Proxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1332 b/tests/data/test1332
index 3271b57..b7d201b 100644
--- a/tests/data/test1332
+++ b/tests/data/test1332
@@ -12,28 +12,28 @@
 <reply>
 <data>
 HTTP/1.1 303 OK swsclose
-Location: moo.html&testcase=/13320002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: moo.html&testcase=/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 303 OK swsclose
-Location: moo.html&testcase=/13320002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: moo.html&testcase=/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
@@ -50,7 +50,7 @@
 HTTP POST with 303 redirect and --post303
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/blah/1332 -L -d "moo" --post303
+http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d "moo" --post303
 </command>
 </client>
 
@@ -58,14 +58,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /blah/1332 HTTP/1.1

+POST /blah/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooPOST /blah/moo.html&testcase=/13320002 HTTP/1.1

+mooPOST /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1333 b/tests/data/test1333
index 3ef8ed4..0a991e4 100644
--- a/tests/data/test1333
+++ b/tests/data/test1333
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Accept-Ranges: bytes
 Content-Length: 6
 Connection: close
@@ -31,7 +31,7 @@
 HTTP POST zero length, chunked-encoded
  </name>
  <command>
--d "" --header "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/1333
+-d "" --header "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -39,7 +39,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /1333 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1334 b/tests/data/test1334
index 0885357..b191559 100644
--- a/tests/data/test1334
+++ b/tests/data/test1334
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -38,7 +38,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1334 -O -D log/heads1334
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -46,20 +46,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1334 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1334">
+<file1 name="log/%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1334">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -67,7 +67,7 @@
 

 </file2>
 
-<file3 name="log/stdout1334">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1335 b/tests/data/test1335
index 9cf1f3e..e350760 100644
--- a/tests/data/test1335
+++ b/tests/data/test1335
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -38,7 +38,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1335 -O -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D -
 </command>
 </client>
 
@@ -46,20 +46,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1335 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1335">
+<file1 name="log/%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1335">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

diff --git a/tests/data/test1336 b/tests/data/test1336
index f6fcb94..631f204 100644
--- a/tests/data/test1336
+++ b/tests/data/test1336
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1336; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1336 -O -D log/heads1336
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1336
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -50,29 +50,29 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1336 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1336">
+<file1 name="log/%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1336">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1336; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
-<file3 name="log/stdout1336">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1337 b/tests/data/test1337
index d7f556c..808c8a2 100644
--- a/tests/data/test1337
+++ b/tests/data/test1337
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1337; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1337 -O -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1337
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -50,25 +50,25 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1337 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1337">
+<file1 name="log/%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1337">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1337; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
diff --git a/tests/data/test1338 b/tests/data/test1338
index 8941a64..672e9ae 100644
--- a/tests/data/test1338
+++ b/tests/data/test1338
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -39,7 +39,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1338 -J -O -D log/heads1338
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -47,20 +47,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1338 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1338">
+<file1 name="log/%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1338">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -68,7 +68,7 @@
 

 </file2>
 
-<file3 name="log/stdout1338">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1339 b/tests/data/test1339
index f08e87c..4bc77e9 100644
--- a/tests/data/test1339
+++ b/tests/data/test1339
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -39,7 +39,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1339 -J -O -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D -
 </command>
 </client>
 
@@ -47,20 +47,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1339 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1339">
+<file1 name="log/%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1339">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

diff --git a/tests/data/test134 b/tests/data/test134
index e314b66..00d1732 100644
--- a/tests/data/test134
+++ b/tests/data/test134
@@ -33,13 +33,15 @@
 <server>
 ftp
 </server>
- <name>
+<name>
 FTP (optional .netrc; programmatic user/passwd) dir list PASV
- </name>
- <command>
---netrc-optional --netrc-file log/netrc134 -u romulus:rhemus ftp://mary:mark@%HOSTIP:%FTPPORT/
+</name>
+
+# -u overrides netrc which overrides the URL
+<command>
+--netrc-optional --netrc-file log/netrc%TESTNUMBER -u romulus:rhemus ftp://mary:mark@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc134" >
+<file name="log/netrc%TESTNUMBER" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1340 b/tests/data/test1340
index c2e065d..e48907b 100644
--- a/tests/data/test1340
+++ b/tests/data/test1340
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1340; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -40,7 +40,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1340 -J -O -D log/heads1340 -w "curl: Saved to filename %{filename_effective}\n"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D log/heads%TESTNUMBER -w "curl saved to filename %{filename_effective}\n"
 </command>
 </client>
 
@@ -48,30 +48,30 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1340 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/name1340">
+<file1 name="log/name%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1340">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1340; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
-<file3 name="log/stdout1340" mode="text">
-curl: Saved to filename %PWD/log/name1340
+<file3 name="log/stdout%TESTNUMBER" mode="text">
+curl saved to filename %PWD/log/name%TESTNUMBER
 </file3>
 
 </verify>
diff --git a/tests/data/test1341 b/tests/data/test1341
index 060fc09..cf13a1f 100644
--- a/tests/data/test1341
+++ b/tests/data/test1341
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1341; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -40,7 +40,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1341 -J -O -D - -w "curl: Saved to filename %{filename_effective}\n"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O -D - -w "curl saved to filename %{filename_effective}\n"
 </command>
 </client>
 
@@ -48,27 +48,27 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1341 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/name1341">
+<file1 name="log/name%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1341">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1341; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

-curl: Saved to filename %PWD/log/name1341
+curl saved to filename %PWD/log/name%TESTNUMBER
 </file2>
 
 </verify>
diff --git a/tests/data/test1342 b/tests/data/test1342
index 012b634..6bab283 100644
--- a/tests/data/test1342
+++ b/tests/data/test1342
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -38,7 +38,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1342 -i -O -D log/heads1342
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -46,16 +46,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1342 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1342">
+<file1 name="log/%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -64,9 +64,9 @@
 12345
 </file1>
 
-<file2 name="log/heads1342">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -74,7 +74,7 @@
 

 </file2>
 
-<file3 name="log/stdout1342">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1343 b/tests/data/test1343
index 636afab..3f0d630 100644
--- a/tests/data/test1343
+++ b/tests/data/test1343
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -38,7 +38,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1343 -i -O -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D -
 </command>
 </client>
 
@@ -46,16 +46,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1343 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1343">
+<file1 name="log/%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -64,9 +64,9 @@
 12345
 </file1>
 
-<file2 name="log/stdout1343">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

diff --git a/tests/data/test1344 b/tests/data/test1344
index 4d8bd4a..bb33616 100644
--- a/tests/data/test1344
+++ b/tests/data/test1344
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1344; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1344 -i -O -D log/heads1344
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1344
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -50,37 +50,37 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1344 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1344">
+<file1 name="log/%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1344; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </file1>
 
-<file2 name="log/heads1344">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1344; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
-<file3 name="log/stdout1344">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1345 b/tests/data/test1345
index f69a56a..bd9470c 100644
--- a/tests/data/test1345
+++ b/tests/data/test1345
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1345; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1345 -i -O -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1345
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -50,33 +50,33 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1345 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1345">
+<file1 name="log/%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1345; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </file1>
 
-<file2 name="log/stdout1345">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1345; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
diff --git a/tests/data/test1346 b/tests/data/test1346
index 83cdaa8..32d434d 100644
--- a/tests/data/test1346
+++ b/tests/data/test1346
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -38,7 +38,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1346 -i -O
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O
 </command>
 </client>
 
@@ -46,16 +46,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1346 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1346">
+<file1 name="log/%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -64,7 +64,7 @@
 12345
 </file1>
 
-<file2 name="log/stdout1346">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1347 b/tests/data/test1347
index f16abcd..46e1ae6 100644
--- a/tests/data/test1347
+++ b/tests/data/test1347
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1347; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1347 -i -O
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -O
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1347
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -50,26 +50,26 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1347 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/1347">
+<file1 name="log/%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1347; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </file1>
 
-<file2 name="log/stdout1347">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1348 b/tests/data/test1348
index 5f374cb..df7a620 100644
--- a/tests/data/test1348
+++ b/tests/data/test1348
@@ -31,7 +31,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1348 -O
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O
 </command>
 </client>
 
@@ -44,17 +44,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1348

-RETR file1348

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1348">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1348">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1349 b/tests/data/test1349
index 33906f8..10ba0bd 100644
--- a/tests/data/test1349
+++ b/tests/data/test1349
@@ -31,7 +31,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1349 -O -D log/heads1349
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -44,19 +44,19 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1349

-RETR file1349

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1349">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
 # The final "221 bye bye baby" response to QUIT will not be recorded
 # since that is not considered part of this particular transfer!
-<file2 name="log/heads1349">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -69,14 +69,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1349 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1349">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test135 b/tests/data/test135
index 10eb0ea..353735d 100644
--- a/tests/data/test135
+++ b/tests/data/test135
@@ -32,7 +32,7 @@
 FTP retrieve a byte-range
  </name>
  <command>
--r 4-16 ftp://%HOSTIP:%FTPPORT/135
+-r 4-16 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,9 +44,9 @@
 PWD

 EPSV

 TYPE I

-SIZE 135

+SIZE %TESTNUMBER

 REST 4

-RETR 135

+RETR %TESTNUMBER

 ABOR

 QUIT

 </protocol>
diff --git a/tests/data/test1350 b/tests/data/test1350
index b788597..e9ea522 100644
--- a/tests/data/test1350
+++ b/tests/data/test1350
@@ -31,7 +31,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1350 -O -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D -
 </command>
 </client>
 
@@ -44,19 +44,19 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1350

-RETR file1350

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1350">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
 # The final "221 bye bye baby" response to QUIT will not be recorded
 # since that is not considered part of this particular transfer!
-<file2 name="log/stdout1350">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -69,7 +69,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1350 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1351 b/tests/data/test1351
index 3e9cc21..4c8ed4c 100644
--- a/tests/data/test1351
+++ b/tests/data/test1351
@@ -32,7 +32,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1351 -O -J -D log/heads1351
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -45,19 +45,19 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1351

-RETR file1351

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1351">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
 # The final "221 bye bye baby" response to QUIT will not be recorded
 # since that is not considered part of this particular transfer!
-<file2 name="log/heads1351">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -70,14 +70,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1351 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1351">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1352 b/tests/data/test1352
index cf690af..3af12a8 100644
--- a/tests/data/test1352
+++ b/tests/data/test1352
@@ -32,7 +32,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1352 -O -J -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D -
 </command>
 </client>
 
@@ -45,19 +45,19 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1352

-RETR file1352

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1352">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
 # The final "221 bye bye baby" response to QUIT will not be recorded
 # since that is not considered part of this particular transfer!
-<file2 name="log/stdout1352">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -70,7 +70,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1352 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1353 b/tests/data/test1353
index 8bd751c..3404970 100644
--- a/tests/data/test1353
+++ b/tests/data/test1353
@@ -31,7 +31,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1353 -O -i -D log/heads1353
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -44,19 +44,19 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1353

-RETR file1353

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1353">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
 # The final "221 bye bye baby" response to QUIT will not be recorded
 # since that is not considered part of this particular transfer!
-<file2 name="log/heads1353">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -69,14 +69,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1353 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1353">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1354 b/tests/data/test1354
index 13c5a1b..e5d1563 100644
--- a/tests/data/test1354
+++ b/tests/data/test1354
@@ -31,7 +31,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1354 -O -i -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D -
 </command>
 </client>
 
@@ -44,17 +44,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1354

-RETR file1354

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1354">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1354">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -67,7 +67,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1354 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1355 b/tests/data/test1355
index e7a392c..f008803 100644
--- a/tests/data/test1355
+++ b/tests/data/test1355
@@ -31,7 +31,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1355 -O -i
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i
 </command>
 </client>
 
@@ -44,17 +44,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1355

-RETR file1355

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1355">
+<file1 name="log/file%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1355">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1356 b/tests/data/test1356
index ea610a5..7be2247 100644
--- a/tests/data/test1356
+++ b/tests/data/test1356
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1356 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1356; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1356 -O
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1356
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -55,24 +55,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1356

-RETR file1356

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1356">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1356; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1356">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1357 b/tests/data/test1357
index 3df0ad3..ebb102c 100644
--- a/tests/data/test1357
+++ b/tests/data/test1357
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1357 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1357; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1357 -O -D log/heads1357
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1357
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -55,24 +55,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1357

-RETR file1357

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1357">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1357; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </file1>
 
-<file2 name="log/heads1357">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -85,14 +85,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 214

-150 Binary data connection for 1357 () (214 bytes).

+150 Binary data connection for %TESTNUMBER () (214 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1357">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1358 b/tests/data/test1358
index b0e2795..983e1cd 100644
--- a/tests/data/test1358
+++ b/tests/data/test1358
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1358 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1358; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1358 -O -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1358
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -55,24 +55,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1358

-RETR file1358

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1358">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1358; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </file1>
 
-<file2 name="log/stdout1358">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -85,7 +85,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 214

-150 Binary data connection for 1358 () (214 bytes).

+150 Binary data connection for %TESTNUMBER () (214 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1359 b/tests/data/test1359
index fc7851d..c4fb2ee 100644
--- a/tests/data/test1359
+++ b/tests/data/test1359
@@ -9,15 +9,15 @@
 
 # Server-side
 <reply>
-# file1359 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1359; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </data>
@@ -40,10 +40,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1359 -O -J -D log/heads1359
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1359
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -56,24 +56,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1359

-RETR file1359

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1359">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1359; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </file1>
 
-<file2 name="log/heads1359">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -86,14 +86,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 214

-150 Binary data connection for 1359 () (214 bytes).

+150 Binary data connection for %TESTNUMBER () (214 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1359">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test136 b/tests/data/test136
index 25940b5..63d936b 100644
--- a/tests/data/test136
+++ b/tests/data/test136
@@ -22,7 +22,7 @@
 FTP with user and no password
  </name>
  <command>
--u user: ftp://%HOSTIP:%FTPPORT/136
+-u user: ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -34,8 +34,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 136

-RETR 136

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1360 b/tests/data/test1360
index 0000d60..3f7b435 100644
--- a/tests/data/test1360
+++ b/tests/data/test1360
@@ -9,15 +9,15 @@
 
 # Server-side
 <reply>
-# file1360 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1360; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </data>
@@ -40,10 +40,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -J -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1360
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -56,24 +56,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1360

-RETR file1360

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1360">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1360; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </file1>
 
-<file2 name="log/stdout1360">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -86,7 +86,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 214

-150 Binary data connection for 1360 () (214 bytes).

+150 Binary data connection for %TESTNUMBER () (214 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1361 b/tests/data/test1361
index 884e0b2..3f1f378 100644
--- a/tests/data/test1361
+++ b/tests/data/test1361
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1361 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1361; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1361 -O -i -D log/heads1361
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1361
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -55,24 +55,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1361

-RETR file1361

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1361">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1361; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </file1>
 
-<file2 name="log/heads1361">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -85,14 +85,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 214

-150 Binary data connection for 1361 () (214 bytes).

+150 Binary data connection for %TESTNUMBER () (214 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1361">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1362 b/tests/data/test1362
index 98fffb6..c5a09cb 100644
--- a/tests/data/test1362
+++ b/tests/data/test1362
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1362 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1362; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1362 -O -i -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1362
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -55,24 +55,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1362

-RETR file1362

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1362">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 Connection: close
 Content-Type: text/html
-Content-Disposition: filename=name1362; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 MOOOO
 </file1>
 
-<file2 name="log/stdout1362">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -85,7 +85,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 214

-150 Binary data connection for 1362 () (214 bytes).

+150 Binary data connection for %TESTNUMBER () (214 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1363 b/tests/data/test1363
index c34f05a..e48074b 100644
--- a/tests/data/test1363
+++ b/tests/data/test1363
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1363 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1363; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -39,10 +39,10 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1363 -O -i
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -O -i
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/name1363
+perl %SRCDIR/libtest/notexists.pl log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -55,24 +55,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1363

-RETR file1363

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/file1363">
+<file1 name="log/file%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1363; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1363">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1364 b/tests/data/test1364
index 777d9b2..ac2c423 100644
--- a/tests/data/test1364
+++ b/tests/data/test1364
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -30,10 +30,10 @@
 HTTP GET -o fname without Content-Disposition, -D file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1364 -o log/outfile1364 -D log/heads1364
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/outfile%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1364
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -41,20 +41,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1364 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1364">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1364">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -62,7 +62,7 @@
 

 </file2>
 
-<file3 name="log/stdout1364">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1365 b/tests/data/test1365
index c69ee4b..cee54b3 100644
--- a/tests/data/test1365
+++ b/tests/data/test1365
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -30,10 +30,10 @@
 HTTP GET -o fname without Content-Disposition, -D stdout
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1365 -o log/outfile1365 -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/outfile%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1365
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -41,20 +41,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1365 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1365">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1365">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

diff --git a/tests/data/test1366 b/tests/data/test1366
index c87455f..ae634cf 100644
--- a/tests/data/test1366
+++ b/tests/data/test1366
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1366; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -31,10 +31,10 @@
 HTTP GET -o fname and Content-Disposition, -D file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1366 -o log/outfile1366 -D log/heads1366
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/outfile%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1366 log/name1366
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,29 +42,29 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1366 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1366">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1366">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1366; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
-<file3 name="log/stdout1366">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1367 b/tests/data/test1367
index 68bc333..a74a4c4 100644
--- a/tests/data/test1367
+++ b/tests/data/test1367
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1367; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -31,10 +31,10 @@
 HTTP GET -o fname and Content-Disposition, -D stdout
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1367 -o log/outfile1367 -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/outfile%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1367 log/name1367
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,25 +42,25 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1367 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1367">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1367">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1367; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
diff --git a/tests/data/test1368 b/tests/data/test1368
index 3780517..629a635 100644
--- a/tests/data/test1368
+++ b/tests/data/test1368
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -31,10 +31,10 @@
 HTTP GET -o fname -J without Content-Disposition, -D file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1368 -J -o log/outfile1368 -D log/heads1368
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o log/outfile%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1368
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,20 +42,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1368 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1368">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1368">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -63,7 +63,7 @@
 

 </file2>
 
-<file3 name="log/stdout1368">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1369 b/tests/data/test1369
index 1a59446..08665d1 100644
--- a/tests/data/test1369
+++ b/tests/data/test1369
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -31,10 +31,10 @@
 HTTP GET -o fname -J without Content-Disposition, -D stdout
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1369 -J -o log/outfile1369 -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o log/outfile%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1369
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,20 +42,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1369 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1369">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1369">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

diff --git a/tests/data/test137 b/tests/data/test137
index b8e2726..7766f09 100644
--- a/tests/data/test137
+++ b/tests/data/test137
@@ -25,7 +25,7 @@
 FTP download without size in RETR string
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/lululul/137
+ftp://%HOSTIP:%FTPPORT/blalbla/lululul/%TESTNUMBER
 </command>
 </client>
 
@@ -39,8 +39,8 @@
 CWD lululul

 EPSV

 TYPE I

-SIZE 137

-RETR 137

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1370 b/tests/data/test1370
index ec5e7b5..96e7e74 100644
--- a/tests/data/test1370
+++ b/tests/data/test1370
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1370; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -32,10 +32,10 @@
 HTTP GET -o fname -J and Content-Disposition, -D file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1370 -J -o log/outfile1370 -D log/heads1370
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o log/outfile%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1370 log/name1370
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -43,29 +43,29 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1370 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1370">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/heads1370">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1370; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
-<file3 name="log/stdout1370">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1371 b/tests/data/test1371
index d3e187a..aa5c69a 100644
--- a/tests/data/test1371
+++ b/tests/data/test1371
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1371; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -32,10 +32,10 @@
 HTTP GET -o fname -J and Content-Disposition, -D stdout
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1371 -J -o log/outfile1371 -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -o log/outfile%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1371 log/name1371
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -43,25 +43,25 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1371 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1371">
+<file1 name="log/outfile%TESTNUMBER">
 12345
 </file1>
 
-<file2 name="log/stdout1371">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1371; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
diff --git a/tests/data/test1372 b/tests/data/test1372
index 49c89f9..29c478c 100644
--- a/tests/data/test1372
+++ b/tests/data/test1372
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -30,10 +30,10 @@
 HTTP GET -o fname -i without Content-Disposition, -D file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1372 -i -o log/outfile1372 -D log/heads1372
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o log/outfile%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1372
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -41,16 +41,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1372 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1372">
+<file1 name="log/outfile%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -59,9 +59,9 @@
 12345
 </file1>
 
-<file2 name="log/heads1372">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -69,7 +69,7 @@
 

 </file2>
 
-<file3 name="log/stdout1372">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1373 b/tests/data/test1373
index 3ceaaca..b4c737d 100644
--- a/tests/data/test1373
+++ b/tests/data/test1373
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -30,10 +30,10 @@
 HTTP GET -o fname -i without Content-Disposition, -D stdout
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1373 -i -o log/outfile1373 -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o log/outfile%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1373
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -41,16 +41,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1373 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1373">
+<file1 name="log/outfile%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -59,9 +59,9 @@
 12345
 </file1>
 
-<file2 name="log/stdout1373">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

diff --git a/tests/data/test1374 b/tests/data/test1374
index e143b41..07bd3bb 100644
--- a/tests/data/test1374
+++ b/tests/data/test1374
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1374; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -31,10 +31,10 @@
 HTTP GET -o fname -i and Content-Disposition, -D file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1374 -i -o log/outfile1374 -D log/heads1374
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o log/outfile%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1374 log/name1374
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,37 +42,37 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1374 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1374">
+<file1 name="log/outfile%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1374; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </file1>
 
-<file2 name="log/heads1374">
+<file2 name="log/heads%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1374; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
-<file3 name="log/stdout1374">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1375 b/tests/data/test1375
index f6219a1..2acdb54 100644
--- a/tests/data/test1375
+++ b/tests/data/test1375
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1375; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -31,10 +31,10 @@
 HTTP GET -o fname -i and Content-Disposition, -D stdout
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1375 -i -o log/outfile1375 -D -
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o log/outfile%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1375 log/name1375
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,33 +42,33 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1375 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1375">
+<file1 name="log/outfile%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1375; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </file1>
 
-<file2 name="log/stdout1375">
+<file2 name="log/stdout%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1375; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 </file2>
 
diff --git a/tests/data/test1376 b/tests/data/test1376
index 1d12c4c..f81f35f 100644
--- a/tests/data/test1376
+++ b/tests/data/test1376
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -30,10 +30,10 @@
 HTTP GET -o fname -i without Content-Disposition, without -D
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1376 -i -o log/outfile1376
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o log/outfile%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1376
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -41,16 +41,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1376 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1376">
+<file1 name="log/outfile%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

@@ -59,7 +59,7 @@
 12345
 </file1>
 
-<file2 name="log/stdout1376">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1377 b/tests/data/test1377
index f245616..745f08f 100644
--- a/tests/data/test1377
+++ b/tests/data/test1377
@@ -10,12 +10,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1377; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </data>
@@ -31,10 +31,10 @@
 HTTP GET -o fname -i and Content-Disposition, without -D
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1377 -i -o log/outfile1377
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -i -o log/outfile%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1377 log/name1377
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -42,26 +42,26 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1377 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1377">
+<file1 name="log/outfile%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1377; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 12345
 </file1>
 
-<file2 name="log/stdout1377">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1378 b/tests/data/test1378
index e004afc..d04e740 100644
--- a/tests/data/test1378
+++ b/tests/data/test1378
@@ -23,10 +23,10 @@
 FTP DL, file without Content-Disposition inside, using -o fname
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1378 -o log/download1378
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1378
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -39,17 +39,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1378

-RETR file1378

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1378">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1378">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1379 b/tests/data/test1379
index 81314b6..e611ac6 100644
--- a/tests/data/test1379
+++ b/tests/data/test1379
@@ -23,10 +23,10 @@
 FTP DL, file without C-D inside, using -o fname -D file
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1379 -o log/download1379 -D log/heads1379
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1379
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -39,17 +39,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1379

-RETR file1379

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1379">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/heads1379">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -62,14 +62,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1379 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1379">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test138 b/tests/data/test138
index 8733138..f70eb07 100644
--- a/tests/data/test138
+++ b/tests/data/test138
@@ -28,7 +28,7 @@
 FTP download without size in RETR string and no SIZE command
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/lululul/138
+ftp://%HOSTIP:%FTPPORT/blalbla/lululul/%TESTNUMBER
 </command>
 </client>
 
@@ -42,8 +42,8 @@
 CWD lululul

 EPSV

 TYPE I

-SIZE 138

-RETR 138

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1380 b/tests/data/test1380
index e715270..3cc5261 100644
--- a/tests/data/test1380
+++ b/tests/data/test1380
@@ -23,10 +23,10 @@
 FTP DL, file without C-D inside, using -o fname -D stdout
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1380 -o log/download1380 -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1380
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -39,17 +39,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1380

-RETR file1380

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1380">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1380">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -62,7 +62,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1380 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1381 b/tests/data/test1381
index a55c6b5..a62ee47 100644
--- a/tests/data/test1381
+++ b/tests/data/test1381
@@ -24,10 +24,10 @@
 FTP DL, file without C-D inside, using -o fname -J -D file
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1381 -o log/download1381 -J -D log/heads1381
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -J -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1381
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -40,17 +40,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1381

-RETR file1381

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1381">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/heads1381">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -63,14 +63,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1381 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1381">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1382 b/tests/data/test1382
index a657e1f..8c49877 100644
--- a/tests/data/test1382
+++ b/tests/data/test1382
@@ -24,10 +24,10 @@
 FTP DL, file without C-D inside, using -o fname -J -D stdout
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1382 -o log/download1382 -J -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -J -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1382
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -40,17 +40,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1382

-RETR file1382

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1382">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1382">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -63,7 +63,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1382 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1383 b/tests/data/test1383
index 0694a22..34f3cf6 100644
--- a/tests/data/test1383
+++ b/tests/data/test1383
@@ -23,10 +23,10 @@
 FTP DL, file without C-D inside, using -o fname -i -D file
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1383 -o log/download1383 -i -D log/heads1383
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -i -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1383
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -39,17 +39,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1383

-RETR file1383

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1383">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/heads1383">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -62,14 +62,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1383 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1383">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1384 b/tests/data/test1384
index c07c266..f27d59a 100644
--- a/tests/data/test1384
+++ b/tests/data/test1384
@@ -23,10 +23,10 @@
 FTP DL, file without C-D inside, using -o fname -i -D stdout
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1384 -o log/download1384 -i -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -i -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1384
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -39,17 +39,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1384

-RETR file1384

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1384">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1384">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -62,7 +62,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 10

-150 Binary data connection for 1384 () (10 bytes).

+150 Binary data connection for %TESTNUMBER () (10 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1385 b/tests/data/test1385
index ee35ab7..e35c674 100644
--- a/tests/data/test1385
+++ b/tests/data/test1385
@@ -23,10 +23,10 @@
 FTP DL, file without C-D inside, using -o fname -i, without -D
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1385 -o log/download1385 -i
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -i
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1385
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER
 </postcheck>
 </client>
 
@@ -39,17 +39,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1385

-RETR file1385

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1385">
+<file1 name="log/download%TESTNUMBER">
 fooo
 mooo
 </file1>
 
-<file2 name="log/stdout1385">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1386 b/tests/data/test1386
index c7f5d8a..471493b 100644
--- a/tests/data/test1386
+++ b/tests/data/test1386
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1386 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1386; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -31,10 +31,10 @@
 FTP DL, file with Content-Disposition inside, using -o fname
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1386 -o log/download1386
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1386 log/name1386
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -47,24 +47,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1386

-RETR file1386

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1386">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1386; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1386">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test1387 b/tests/data/test1387
index 2b6c3fc..c8f5ae6 100644
--- a/tests/data/test1387
+++ b/tests/data/test1387
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1387 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1387; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -31,10 +31,10 @@
 FTP DL, file with C-D inside, using -o fname -D file
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1387 -o log/download1387 -D log/heads1387
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1387 log/name1387
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -47,24 +47,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1387

-RETR file1387

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1387">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1387; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/heads1387">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -77,14 +77,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 222

-150 Binary data connection for 1387 () (222 bytes).

+150 Binary data connection for %TESTNUMBER () (222 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1387">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1388 b/tests/data/test1388
index 3d2c59a..479ca42 100644
--- a/tests/data/test1388
+++ b/tests/data/test1388
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1388 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1388; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -31,10 +31,10 @@
 FTP DL, file with C-D inside, using -o fname -D stdout
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1388 -o log/download1388 -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1388 log/name1388
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -47,24 +47,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1388

-RETR file1388

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1388">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1388; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1388">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -77,7 +77,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 222

-150 Binary data connection for 1388 () (222 bytes).

+150 Binary data connection for %TESTNUMBER () (222 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1389 b/tests/data/test1389
index 4aaacd8..eb35d39 100644
--- a/tests/data/test1389
+++ b/tests/data/test1389
@@ -9,15 +9,15 @@
 
 # Server-side
 <reply>
-# file1389 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1389; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -32,10 +32,10 @@
 FTP DL, file with C-D inside, using -o fname -J -D file
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1389 -o log/download1389 -J -D log/heads1389
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -J -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1389 log/name1389
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -48,24 +48,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1389

-RETR file1389

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1389">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1389; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/heads1389">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -78,14 +78,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 222

-150 Binary data connection for 1389 () (222 bytes).

+150 Binary data connection for %TESTNUMBER () (222 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1389">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test139 b/tests/data/test139
index 15a242b..ab04953 100644
--- a/tests/data/test139
+++ b/tests/data/test139
@@ -25,7 +25,7 @@
 FTP download a newer file with -z
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/139 -z "1 jan 1989"
+ftp://%HOSTIP:%FTPPORT/blalbla/%TESTNUMBER -z "1 jan 1989"
 </command>
 </client>
 
@@ -36,11 +36,11 @@
 PASS ftp@example.com

 PWD

 CWD blalbla

-MDTM 139

+MDTM %TESTNUMBER

 EPSV

 TYPE I

-SIZE 139

-RETR 139

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1390 b/tests/data/test1390
index 0668cf7..fc30849 100644
--- a/tests/data/test1390
+++ b/tests/data/test1390
@@ -9,15 +9,15 @@
 
 # Server-side
 <reply>
-# file1390 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1390; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -32,10 +32,10 @@
 FTP DL, file with C-D inside, using -o fname -J -D stdout
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1390 -o log/download1390 -J -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -J -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1390 log/name1390
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -48,24 +48,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1390

-RETR file1390

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1390">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1390; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1390">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -78,7 +78,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 222

-150 Binary data connection for 1390 () (222 bytes).

+150 Binary data connection for %TESTNUMBER () (222 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1391 b/tests/data/test1391
index 09c670a..ce28e5a 100644
--- a/tests/data/test1391
+++ b/tests/data/test1391
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1391 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1391; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -31,10 +31,10 @@
 FTP DL, file with C-D inside, using -o fname -i -D file
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1391 -o log/download1391 -i -D log/heads1391
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -i -D log/heads%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1391 log/name1391
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -47,24 +47,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1391

-RETR file1391

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1391">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1391; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/heads1391">
+<file2 name="log/heads%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -77,14 +77,14 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 222

-150 Binary data connection for 1391 () (222 bytes).

+150 Binary data connection for %TESTNUMBER () (222 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
 s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
 </stripfile2>
 
-<file3 name="log/stdout1391">
+<file3 name="log/stdout%TESTNUMBER">
 </file3>
 
 </verify>
diff --git a/tests/data/test1392 b/tests/data/test1392
index 994c881..99e13c3 100644
--- a/tests/data/test1392
+++ b/tests/data/test1392
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1392 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1392; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -31,10 +31,10 @@
 FTP DL, file with C-D inside, using -o fname -i -D stdout
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1392 -o log/download1392 -i -D -
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -i -D -
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1392 log/name1392
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -47,24 +47,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1392

-RETR file1392

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1392">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1392; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1392">
+<file2 name="log/stdout%TESTNUMBER">
 220-        _   _ ____  _     

 220-    ___| | | |  _ \| |    

 220-   / __| | | | |_) | |    

@@ -77,7 +77,7 @@
 229 Entering Passive Mode (stripped)
 200 I modify TYPE as you wanted

 213 222

-150 Binary data connection for 1392 () (222 bytes).

+150 Binary data connection for %TESTNUMBER () (222 bytes).

 226 File transfer complete

 </file2>
 <stripfile2>
diff --git a/tests/data/test1393 b/tests/data/test1393
index 12f9284..1402eaf 100644
--- a/tests/data/test1393
+++ b/tests/data/test1393
@@ -8,15 +8,15 @@
 
 # Server-side
 <reply>
-# file1393 contents...
+# file%TESTNUMBER contents...
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1393; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </data>
@@ -31,10 +31,10 @@
 FTP DL, file with C-D inside, using -o fname -i, without -D
 </name>
 <command option="no-output,no-include">
-ftp://%HOSTIP:%FTPPORT/path/file1393 -o log/download1393 -i
+ftp://%HOSTIP:%FTPPORT/path/file%TESTNUMBER -o log/download%TESTNUMBER -i
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/file1393 log/name1393
+perl %SRCDIR/libtest/notexists.pl log/file%TESTNUMBER log/name%TESTNUMBER
 </postcheck>
 </client>
 
@@ -47,24 +47,24 @@
 CWD path

 EPSV

 TYPE I

-SIZE file1393

-RETR file1393

+SIZE file%TESTNUMBER

+RETR file%TESTNUMBER

 QUIT

 </protocol>
 
-<file1 name="log/download1393">
+<file1 name="log/download%TESTNUMBER">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 6

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1393; charset=funny; option=strange

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange

 

 MOOOO
 </file1>
 
-<file2 name="log/stdout1393">
+<file2 name="log/stdout%TESTNUMBER">
 </file2>
 
 </verify>
diff --git a/tests/data/test14 b/tests/data/test14
index f6c568e..f2bf610 100644
--- a/tests/data/test14
+++ b/tests/data/test14
@@ -24,14 +24,14 @@
 HTTP HEAD with Connection: close
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/14 -i --head
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -i --head
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-HEAD /want/14 HTTP/1.1

+HEAD /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test140 b/tests/data/test140
index 4d8bc85..36a01cc 100644
--- a/tests/data/test140
+++ b/tests/data/test140
@@ -24,7 +24,7 @@
 FTP download file with -z, expected to not transfer
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/140 -z "1 jan 2004"
+ftp://%HOSTIP:%FTPPORT/blalbla/%TESTNUMBER -z "1 jan 2004"
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 PASS ftp@example.com

 PWD

 CWD blalbla

-MDTM 140

+MDTM %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1400 b/tests/data/test1400
index eea8d3f..08fa023 100644
--- a/tests/data/test1400
+++ b/tests/data/test1400
@@ -31,14 +31,14 @@
 SSL_CERT_FILE=
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1400 --libcurl log/test1400.c
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl log/test%TESTNUMBER.c
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1400 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -55,10 +55,10 @@
 $_ = '' if /CURLOPT_HTTP09_ALLOWED/
 $_ = '' if /CURLOPT_INTERLEAVEDATA/
 </stripfile>
-<file name="log/test1400.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -69,10 +69,13 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1400");
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER");
   curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
   curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+%if ftp
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
+%endif
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1401 b/tests/data/test1401
index b20607c..609b34c 100644
--- a/tests/data/test1401
+++ b/tests/data/test1401
@@ -35,14 +35,14 @@
 SSL_CERT_FILE=
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1401 --libcurl log/test1401.c --basic -u fake:user -H "X-Files: Mulder" -H "X-Men: cyclops, iceman" -A MyUA -b chocolate=chip --proto "=http,ftp,file"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl log/test%TESTNUMBER.c --basic -u fake:user -H "X-Files: Mulder" -H "X-Men: cyclops, iceman" -A MyUA -b chocolate=chip --proto "=http,ftp,file"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1401 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic ZmFrZTp1c2Vy

 User-Agent: MyUA

@@ -60,10 +60,10 @@
 $_ = '' if /CURLOPT_HTTP_VERSION/
 $_ = '' if /CURLOPT_INTERLEAVEDATA/
 </stripfile>
-<file name="log/test1401.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -79,7 +79,7 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1401");
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER");
   curl_easy_setopt(hnd, CURLOPT_USERPWD, "fake:user");
   curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, (long)CURLAUTH_BASIC);
   curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, slist1);
@@ -87,6 +87,9 @@
   curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_COOKIE, "chocolate=chip");
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+%if ftp
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
+%endif
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
   curl_easy_setopt(hnd, CURLOPT_PROTOCOLS, (long)CURLPROTO_FILE |
                                            (long)CURLPROTO_FTP |
diff --git a/tests/data/test1402 b/tests/data/test1402
index 2965547..89515a8 100644
--- a/tests/data/test1402
+++ b/tests/data/test1402
@@ -32,14 +32,14 @@
 SSL_CERT_FILE=
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1402 --libcurl log/test1402.c -d "foo=bar" -d "baz=quux"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl log/test%TESTNUMBER.c -d "foo=bar" -d "baz=quux"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /we/want/1402 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -58,10 +58,10 @@
 $_ = '' if /CURLOPT_HTTP_VERSION/
 $_ = '' if /CURLOPT_INTERLEAVEDATA/
 </stripfile>
-<file name="log/test1402.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -72,12 +72,15 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1402");
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER");
   curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "foo=bar&baz=quux");
   curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)16);
   curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
   curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+%if ftp
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
+%endif
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1403 b/tests/data/test1403
index 6d21ce8..f8964f8 100644
--- a/tests/data/test1403
+++ b/tests/data/test1403
@@ -32,14 +32,14 @@
 SSL_CERT_FILE=
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1403 --libcurl log/test1403.c -G -d "foo=bar" -d "baz=quux"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl log/test%TESTNUMBER.c -G -d "foo=bar" -d "baz=quux"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1403?foo=bar&baz=quux HTTP/1.1

+GET /we/want/%TESTNUMBER?foo=bar&baz=quux HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -55,10 +55,10 @@
 $_ = '' if /CURLOPT_HTTP_VERSION/
 $_ = '' if /CURLOPT_INTERLEAVEDATA/
 </stripfile>
-<file name="log/test1403.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -69,10 +69,13 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1403?foo=bar&baz=quux");
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?foo=bar&baz=quux");
   curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
   curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+%if ftp
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
+%endif
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1404 b/tests/data/test1404
index 8f61ec0..49f66a1 100644
--- a/tests/data/test1404
+++ b/tests/data/test1404
@@ -33,10 +33,10 @@
 SSL_CERT_FILE=
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content;encoder=8bit,log/test1404.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl log/test1404.c
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=value -F 'file=@log/test%TESTNUMBER.txt,log/test%TESTNUMBER.txt;type=magic/content;encoder=8bit,log/test%TESTNUMBER.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl log/test%TESTNUMBER.c
 </command>
 # We create this file before the command is invoked!
-<file name="log/test1404.txt">
+<file name="log/test%TESTNUMBER.txt">
 dummy data
 </file>
 </client>
@@ -47,7 +47,7 @@
 -----+\w+
 </strip>
 <protocol>
-POST /we/want/1404 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -62,20 +62,20 @@
 Content-Disposition: form-data; name="file"

 Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa

 

-Content-Disposition: attachment; filename="test1404.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 dummy data
 

 ------------------------------9ef8d6205763

-Content-Disposition: attachment; filename="test1404.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Type: magic/content

 Content-Transfer-Encoding: 8bit

 

 dummy data
 

 ------------------------------9ef8d6205763

-Content-Disposition: attachment; filename="test1404.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 X-testheader-1: header 1

 X-testheader-2: header 2

@@ -98,10 +98,10 @@
 # CURL_DOES_CONVERSION generates an extra comment.
 $_ = '' if /\/\* "value" \*\//
 </stripfile>
-<file name="log/test1404.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -123,7 +123,7 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1404");
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER");
   mime1 = curl_mime_init(hnd);
   part1 = curl_mime_addpart(mime1);
   curl_mime_data(part1, "value", CURL_ZERO_TERMINATED);
@@ -131,13 +131,13 @@
   part1 = curl_mime_addpart(mime1);
   mime2 = curl_mime_init(hnd);
   part2 = curl_mime_addpart(mime2);
-  curl_mime_filedata(part2, "log/test1404.txt");
+  curl_mime_filedata(part2, "log/test%TESTNUMBER.txt");
   part2 = curl_mime_addpart(mime2);
-  curl_mime_filedata(part2, "log/test1404.txt");
+  curl_mime_filedata(part2, "log/test%TESTNUMBER.txt");
   curl_mime_encoder(part2, "8bit");
   curl_mime_type(part2, "magic/content");
   part2 = curl_mime_addpart(mime2);
-  curl_mime_filedata(part2, "log/test1404.txt");
+  curl_mime_filedata(part2, "log/test%TESTNUMBER.txt");
   curl_mime_headers(part2, slist1, 1);
   slist1 = NULL;
   curl_mime_subparts(part1, mime2);
@@ -147,6 +147,9 @@
   curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
   curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+%if ftp
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
+%endif
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1405 b/tests/data/test1405
index dcc8f80..0a144e1 100644
--- a/tests/data/test1405
+++ b/tests/data/test1405
@@ -36,7 +36,7 @@
 SSL_CERT_FILE=
 </setenv>
  <command>
-ftp://%HOSTIP:%FTPPORT/1405 -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl log/test1405.c
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl log/test%TESTNUMBER.c
 </command>
 </client>
 
@@ -53,15 +53,15 @@
 TYPE I

 NOOP 2

 FAIL HARD

-SIZE 1405

-RETR 1405

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 NOOP 3

 QUIT

 </protocol>
-<file name="log/test1405.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -84,11 +84,12 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "ftp://%HOSTIP:%FTPPORT/1405");
+  curl_easy_setopt(hnd, CURLOPT_URL, "ftp://%HOSTIP:%FTPPORT/%TESTNUMBER");
   curl_easy_setopt(hnd, CURLOPT_QUOTE, slist1);
   curl_easy_setopt(hnd, CURLOPT_POSTQUOTE, slist2);
   curl_easy_setopt(hnd, CURLOPT_PREQUOTE, slist3);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1406 b/tests/data/test1406
index 8803c84..4983747 100644
--- a/tests/data/test1406
+++ b/tests/data/test1406
@@ -28,14 +28,14 @@
 <setenv>
 SSL_CERT_FILE=
 </setenv>
-<file name="log/test1406.eml">
+<file name="log/test%TESTNUMBER.eml">
 From: different

 To: another

 

 body

 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/1406 --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-from sender@example.com -T log/test1406.eml --libcurl log/test1406.c
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-from sender@example.com -T log/test%TESTNUMBER.eml --libcurl log/test%TESTNUMBER.c
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 1406

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com> SIZE=38

 RCPT TO:<recipient.one@example.com>

 RCPT TO:<recipient.two@example.com>

@@ -57,10 +57,10 @@
 body

 .

 </upload>
-<file name="log/test1406.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -76,9 +76,10 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
+  curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER");
   curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
   curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "sender@example.com");
   curl_easy_setopt(hnd, CURLOPT_MAIL_RCPT, slist1);
diff --git a/tests/data/test1407 b/tests/data/test1407
index 917a5de..5dba139 100644
--- a/tests/data/test1407
+++ b/tests/data/test1407
@@ -13,7 +13,7 @@
 # Server-side
 <reply>
 <servercmd>
-REPLY LIST +OK 1407 100\r\n.
+REPLY LIST +OK %TESTNUMBER 100\r\n.
 </servercmd>
 </reply>
 
@@ -30,7 +30,7 @@
 SSL_CERT_FILE=
 </setenv>
 <command>
-pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret --libcurl log/test%TESTNUMBER.c
 </command>
 </client>
 
@@ -41,13 +41,13 @@
 CAPA

 USER user

 PASS secret

-LIST 1407

+LIST %TESTNUMBER

 QUIT

 </protocol>
-<file name="log/test1407.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -58,10 +58,11 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
+  curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/%TESTNUMBER");
   curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
   curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1408 b/tests/data/test1408
index 6d3131f..d4f40f7 100644
--- a/tests/data/test1408
+++ b/tests/data/test1408
@@ -13,7 +13,7 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Content-Type: text/html
@@ -23,7 +23,7 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Content-Type: text/html
@@ -48,7 +48,7 @@
 HTTP receive cookies over IPV6
  </name>
  <command>
--c log/jar1408 -g http://%HOST6IP:%HTTP6PORT/path/14080001 http://%HOST6IP:%HTTP6PORT/path/14080002
+-c log/jar%TESTNUMBER -g http://%HOST6IP:%HTTP6PORT/path/%TESTNUMBER0001 http://%HOST6IP:%HTTP6PORT/path/%TESTNUMBER0002
 </command>
 </client>
 
@@ -56,12 +56,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /path/14080001 HTTP/1.1

+GET /path/%TESTNUMBER0001 HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /path/14080002 HTTP/1.1

+GET /path/%TESTNUMBER0002 HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1409 b/tests/data/test1409
index 8d54b4c..120bf3c 100644
--- a/tests/data/test1409
+++ b/tests/data/test1409
@@ -17,7 +17,7 @@
 Pass in string to -C
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/1409 -C wrong
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER -C wrong
 </command>
 </client>
 
diff --git a/tests/data/test141 b/tests/data/test141
index 694d87c..3fff42d 100644
--- a/tests/data/test141
+++ b/tests/data/test141
@@ -26,7 +26,7 @@
 FTP download info with -I
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/blalbla/141 -I
+ftp://%HOSTIP:%FTPPORT/blalbla/%TESTNUMBER -I
 </command>
 </client>
 
@@ -37,9 +37,9 @@
 PASS ftp@example.com

 PWD

 CWD blalbla

-MDTM 141

+MDTM %TESTNUMBER

 TYPE I

-SIZE 141

+SIZE %TESTNUMBER

 REST 0

 QUIT

 </protocol>
diff --git a/tests/data/test1410 b/tests/data/test1410
index a8b89db..65e52d4 100644
--- a/tests/data/test1410
+++ b/tests/data/test1410
@@ -17,7 +17,7 @@
 Pass in negative number to --max-time
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/1410 --max-time -4
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER --max-time -4
 </command>
 </client>
 
diff --git a/tests/data/test1411 b/tests/data/test1411
index 93e3b4b..a7d23ee 100644
--- a/tests/data/test1411
+++ b/tests/data/test1411
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,10 +36,10 @@
 HTTP with zero size file PUT
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1411 -T log/empty1411
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/empty%TESTNUMBER
 </command>
 # create an empty file
-<file name="log/empty1411">
+<file name="log/empty%TESTNUMBER">
 </file>
 </client>
 
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /1411 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1412 b/tests/data/test1412
index 808ed17..2052170 100644
--- a/tests/data/test1412
+++ b/tests/data/test1412
@@ -94,9 +94,9 @@
 HTTP GET with --anyauth with two URLs (picking Digest) 
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1412 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14120001
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 </command>
-<file name="log/put1412">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -107,25 +107,25 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1412 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1412 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1412", response="0390dbe89e31adca0413d11f91f30e7f"

+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/%TESTNUMBER", response="0390dbe89e31adca0413d11f91f30e7f"

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14120001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14120001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e"

+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/%TESTNUMBER0001", response="0085df91870374c8bf4e94415e7fbf8e"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1413 b/tests/data/test1413
index 96467f1..920417b 100644
--- a/tests/data/test1413
+++ b/tests/data/test1413
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose

-Location: moo.html/14130002#fragmentpart

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: moo.html/%TESTNUMBER0002#fragmentpart

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose

-Location: moo.html/14130002#fragmentpart

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: moo.html/%TESTNUMBER0002#fragmentpart

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -49,7 +49,7 @@
 HTTP redirect with fragment in new URL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/this/1413 -L
+http://%HOSTIP:%HTTPPORT/this/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +57,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /this/1413 HTTP/1.1

+GET /this/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /this/moo.html/14130002 HTTP/1.1

+GET /this/moo.html/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1414 b/tests/data/test1414
index 4440378..33214b0 100644
--- a/tests/data/test1414
+++ b/tests/data/test1414
@@ -32,7 +32,7 @@
 FTP PORT without SIZE or EPRT support
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1414 -P -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -P -
 </command>
 </client>
 
@@ -49,8 +49,8 @@
 EPRT |1|
 PORT
 TYPE I

-SIZE 1414

-RETR 1414

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1415 b/tests/data/test1415
index 7c9e389..79b14e6 100644
--- a/tests/data/test1415
+++ b/tests/data/test1415
@@ -14,7 +14,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 4
 Content-Type: text/html
@@ -44,7 +44,7 @@
 TZ=GMT
 </setenv>
 <command>
-http://example.com/we/want/1415 -b none -c log/jar1415.txt -x %HOSTIP:%HTTPPORT
+http://example.com/we/want/%TESTNUMBER -b none -c log/jar%TESTNUMBER.txt -x %HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -54,7 +54,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://example.com/we/want/1415 HTTP/1.1

+GET http://example.com/we/want/%TESTNUMBER HTTP/1.1

 Host: example.com

 User-Agent: curl/%VERSION

 Accept: */*

@@ -62,9 +62,9 @@
 

 </protocol>
 
-<file name="log/jar1415.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .example.com	TRUE	/	FALSE	2145830400	test7value	test7
diff --git a/tests/data/test1416 b/tests/data/test1416
index f6e9bbf..f3c6ba5 100644
--- a/tests/data/test1416
+++ b/tests/data/test1416
@@ -37,7 +37,7 @@
 HTTP GET with chunked Transfer-Encoding overflowed chunked size
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1416
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1416 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1417 b/tests/data/test1417
index a141b11..a0dd086 100644
--- a/tests/data/test1417
+++ b/tests/data/test1417
@@ -49,7 +49,7 @@
 HTTP GET with chunked encoding and chunked trailer without CRs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1417 -D log/heads1417
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -57,13 +57,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1417 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/heads1417">
+<file name="log/heads%TESTNUMBER">
 HTTP/1.1 200 funky chunky!

 Server: fakeit/0.9 fakeitbad/1.0

 Transfer-Encoding: chunked

diff --git a/tests/data/test1418 b/tests/data/test1418
index 51d2e5f..83c38b0 100644
--- a/tests/data/test1418
+++ b/tests/data/test1418
@@ -87,32 +87,32 @@
 HTTP with --anyauth and connection re-use
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1418 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14180003
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1418 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1418 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/1418", response="986238b7e0077754944c966f56d9bc77"

+Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER", response="986238b7e0077754944c966f56d9bc77"

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14180003 HTTP/1.1

+GET /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14180003 HTTP/1.1

+GET /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/14180003", response="1c6390a67bac3283a9b023402f3b3540"

+Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER0003", response="1c6390a67bac3283a9b023402f3b3540"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1419 b/tests/data/test1419
index 6d05f0b..6be3149 100644
--- a/tests/data/test1419
+++ b/tests/data/test1419
@@ -45,19 +45,19 @@
 HTTP with --anyauth (but no auth!) and connection re-use
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1419 --anyauth http://%HOSTIP:%HTTPPORT/14190003
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1419 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14190003 HTTP/1.1

+GET /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test142 b/tests/data/test142
index e26aa19..f64dddb 100644
--- a/tests/data/test142
+++ b/tests/data/test142
@@ -20,7 +20,7 @@
 FTP URL with 150 dir levels
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/part1/part2/part3/part4/part5/part6/part7/part8/part9/part10/part11/part12/part13/part14/part15/part16/part17/part18/part19/part20/part21/part22/part23/part24/part25/part26/part27/part28/part29/part30/part31/part32/part33/part34/part35/part36/part37/part38/part39/part40/part41/part42/part43/part44/part45/part46/part47/part48/part49/part50/part51/part52/part53/part54/part55/part56/part57/part58/part59/part60/part61/part62/part63/part64/part65/part66/part67/part68/part69/part70/part71/part72/part73/part74/part75/part76/part77/part78/part79/part80/part81/part82/part83/part84/part85/part86/part87/part88/part89/part90/part91/part92/part93/part94/part95/part96/part97/part98/part99/part100/part101/part102/part103/part104/part105/part106/part107/part108/part109/part110/part111/part112/part113/part114/part115/part116/part117/part118/part119/part120/part121/part122/part123/part124/part125/part126/part127/part128/part129/part130/part131/part132/part133/part134/part135/part136/part137/part138/part139/part140/part141/part142/part143/part144/part145/part146/part147/part148/part149/part150/142
+ftp://%HOSTIP:%FTPPORT/part1/part2/part3/part4/part5/part6/part7/part8/part9/part10/part11/part12/part13/part14/part15/part16/part17/part18/part19/part20/part21/part22/part23/part24/part25/part26/part27/part28/part29/part30/part31/part32/part33/part34/part35/part36/part37/part38/part39/part40/part41/part42/part43/part44/part45/part46/part47/part48/part49/part50/part51/part52/part53/part54/part55/part56/part57/part58/part59/part60/part61/part62/part63/part64/part65/part66/part67/part68/part69/part70/part71/part72/part73/part74/part75/part76/part77/part78/part79/part80/part81/part82/part83/part84/part85/part86/part87/part88/part89/part90/part91/part92/part93/part94/part95/part96/part97/part98/part99/part100/part101/part102/part103/part104/part105/part106/part107/part108/part109/part110/part111/part112/part113/part114/part115/part116/part117/part118/part119/part120/part121/part122/part123/part124/part125/part126/part127/part128/part129/part130/part131/part132/part133/part134/part135/part136/part137/part138/part139/part140/part141/part142/part143/part144/part145/part146/part147/part148/part149/part150/%TESTNUMBER
 </command>
 </client>
 
@@ -182,8 +182,8 @@
 CWD part150

 EPSV

 TYPE I

-SIZE 142

-RETR 142

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1420 b/tests/data/test1420
index 03c4584..d100a61 100644
--- a/tests/data/test1420
+++ b/tests/data/test1420
@@ -36,7 +36,7 @@
 SSL_CERT_FILE=
 </setenv>
 <command>
-'imap://%HOSTIP:%IMAPPORT/1420/;MAILINDEX=1' -u user:secret --libcurl log/test1420.c
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret --libcurl log/test%TESTNUMBER.c
 </command>
 </client>
 
@@ -46,14 +46,14 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 1420

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
-<file name="log/test1420.c" mode="text">
+<file name="log/test%TESTNUMBER.c" mode="text">
 /********* Sample code generated by the curl command line tool **********
  * All curl_easy_setopt() options are documented at:
- * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ * https://curl.se/libcurl/c/curl_easy_setopt.html
  ************************************************************************/
 #include <curl/curl.h>
 
@@ -64,9 +64,10 @@
 
   hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
-  curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/1420/;MAILINDEX=1");
+  curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1");
   curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
   curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
   curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
 
   /* Here is a list of options the curl code used that cannot get generated
diff --git a/tests/data/test1421 b/tests/data/test1421
index c219770..5b55547 100644
--- a/tests/data/test1421
+++ b/tests/data/test1421
@@ -33,7 +33,7 @@
 Re-using HTTP proxy connection for two different host names
  </name>
  <command>
---proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1421:8990/ http://different.remote.haxx.se.1421:8990
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.%TESTNUMBER:8990/ http://different.remote.haxx.se.%TESTNUMBER:8990
 </command>
 <features>
 proxy
@@ -56,14 +56,14 @@
 -foo-
 </stdout>
 <protocol>
-GET http://test.remote.haxx.se.1421:8990/ HTTP/1.1

-Host: test.remote.haxx.se.1421:8990

+GET http://test.remote.haxx.se.%TESTNUMBER:8990/ HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://different.remote.haxx.se.1421:8990/ HTTP/1.1

-Host: different.remote.haxx.se.1421:8990

+GET http://different.remote.haxx.se.%TESTNUMBER:8990/ HTTP/1.1

+Host: different.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1422 b/tests/data/test1422
index 4108091..7cd1d13 100644
--- a/tests/data/test1422
+++ b/tests/data/test1422
@@ -11,12 +11,12 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 0

 Connection: close

 Content-Type: text/html

-Content-Disposition: filename=name1422; charset=funny; option=str//nge

+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=str//nge

 

 </data>
 </reply>
@@ -40,7 +40,7 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1422 -J -O file://%PWD/log/name1422
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -J -O file://%PWD/log/name%TESTNUMBER
 </command>
 </client>
 
@@ -48,14 +48,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1422 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/name1422">
+<file1 name="log/name%TESTNUMBER">
 </file1>
 
 </verify>
diff --git a/tests/data/test1423 b/tests/data/test1423
index b0fcef3..2eb1d80 100644
--- a/tests/data/test1423
+++ b/tests/data/test1423
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 0

 Connection: close

@@ -30,10 +30,10 @@
 HTTP GET -o fname without Content-Disposition (empty file)
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1423 -o log/outfile1423 file://%PWD/log/outfile1423
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/outfile%TESTNUMBER file://%PWD/log/outfile%TESTNUMBER
 </command>
 <postcheck>
-perl %SRCDIR/libtest/notexists.pl log/1423
+perl %SRCDIR/libtest/notexists.pl log/%TESTNUMBER
 </postcheck>
 </client>
 
@@ -41,14 +41,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1423 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1423">
+<file1 name="log/outfile%TESTNUMBER">
 </file1>
 
 </verify>
diff --git a/tests/data/test1424 b/tests/data/test1424
index 8f922e6..ebe5f52 100644
--- a/tests/data/test1424
+++ b/tests/data/test1424
@@ -46,11 +46,11 @@
 <name>
 HTTP GET -o fname without Content-Disposition (unmet time condition)
 </name>
-<file name="log/outfile1424">
+<file name="log/outfile%TESTNUMBER">
 original contents
 </file>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1424 -z "dec 12 11:00:00 1999 GMT" -o log/outfile1424
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "dec 12 11:00:00 1999 GMT" -o log/outfile%TESTNUMBER
 </command>
 </client>
 
@@ -58,7 +58,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1424 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -66,7 +66,7 @@
 

 </protocol>
 
-<file1 name="log/outfile1424">
+<file1 name="log/outfile%TESTNUMBER">
 original contents
 </file1>
 
diff --git a/tests/data/test1425 b/tests/data/test1425
index 7122cd6..2bd6d84 100644
--- a/tests/data/test1425
+++ b/tests/data/test1425
Binary files differ
diff --git a/tests/data/test1426 b/tests/data/test1426
index 1344b8e..9ed994a 100644
--- a/tests/data/test1426
+++ b/tests/data/test1426
Binary files differ
diff --git a/tests/data/test1427 b/tests/data/test1427
index 648b1da..adce46a 100644
--- a/tests/data/test1427
+++ b/tests/data/test1427
@@ -15,7 +15,7 @@
 too large -m timeout value
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/1427 -m 184467440737095510
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER -m 184467440737095510
 </command>
 </client>
 
diff --git a/tests/data/test1428 b/tests/data/test1428
index 0ff74d4..ac91fd2 100644
--- a/tests/data/test1428
+++ b/tests/data/test1428
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,7 +29,7 @@
 HTTP/1.1 200 Mighty fine indeed

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -50,7 +50,7 @@
 HTTP over proxy-tunnel with --proxy-header and --header
  </name>
  <command>
-http://test.1428:%HTTPPORT/we/want/that/page/1428 -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self' --header "header-type: server" --proxy-header "header-type: proxy"
+http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self' --header "header-type: server" --proxy-header "header-type: proxy"
 </command>
 <features>
 proxy
@@ -61,16 +61,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT test.1428:%HTTPPORT HTTP/1.1

-Host: test.1428:%HTTPPORT

+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 header-type: proxy

 

 </proxy>
 <protocol>
-GET /we/want/that/page/1428 HTTP/1.1

-Host: test.1428:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 Authorization: Basic aWFtOm15OjtzZWxm

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1429 b/tests/data/test1429
index 4f3989c..9fc3cd2 100644
--- a/tests/data/test1429
+++ b/tests/data/test1429
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 2345 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP GET with 4-digit response code
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1429 --write-out '%{response_code}' --http0.9
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{response_code}' --http0.9
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 <verify>
 <stdout nonewline="yes">
 HTTP/1.1 2345 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -58,7 +58,7 @@
 234
 </stdout>
 <protocol>
-GET /1429 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test143 b/tests/data/test143
index 0f36dd9..be5b335 100644
--- a/tests/data/test143
+++ b/tests/data/test143
@@ -22,7 +22,7 @@
 FTP URL with type=a
  </name>
  <command>
-"ftp://%HOSTIP:%FTPPORT/%2ftmp/moo/143;type=a"
+"ftp://%HOSTIP:%FTPPORT/%2ftmp/moo/%TESTNUMBER;type=a"
 </command>
 </client>
 
@@ -37,8 +37,7 @@
 CWD moo

 EPSV

 TYPE A

-SIZE 143

-RETR 143

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1430 b/tests/data/test1430
index 5acc7f1..3dbeae8 100644
--- a/tests/data/test1430
+++ b/tests/data/test1430
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 -12 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -33,7 +33,7 @@
 HTTP GET with negative response code
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1430
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1430 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1431 b/tests/data/test1431
index 5850087..be6277d 100644
--- a/tests/data/test1431
+++ b/tests/data/test1431
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 2 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -33,7 +33,7 @@
 HTTP GET with single-digit response code
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1431
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1431 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1432 b/tests/data/test1432
index fadbe83..ab76e94 100644
--- a/tests/data/test1432
+++ b/tests/data/test1432
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -34,7 +34,7 @@
 HTTP GET with 100-digit response code and survive
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1432
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1432 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1433 b/tests/data/test1433
index 6656114..ac50816 100644
--- a/tests/data/test1433
+++ b/tests/data/test1433
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -34,7 +34,7 @@
 HTTP GET with 100-digit subversion number in response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1433
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1433 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1434 b/tests/data/test1434
index 55031be..4801ee2 100644
--- a/tests/data/test1434
+++ b/tests/data/test1434
@@ -58,9 +58,9 @@
 HTTP GET resume at exactly the existing file size is fine
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1434 -C 100
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 100
 </command>
-<file name="log/curl1434.out">
+<file name="log/curl%TESTNUMBER.out">
 012345678
 012345678
 012345678
@@ -77,7 +77,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1434 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=100-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1435 b/tests/data/test1435
index 7326249..5e91f02 100644
--- a/tests/data/test1435
+++ b/tests/data/test1435
@@ -28,13 +28,13 @@
 simple HTTP GET over Unix socket
  </name>
  <command>
---unix-socket %HTTPUNIXPATH http://server-interpreted.example.com/1435
+--unix-socket %HTTPUNIXPATH http://server-interpreted.example.com/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /1435 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: server-interpreted.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1436 b/tests/data/test1436
index 040b3b3..38190f4 100644
--- a/tests/data/test1436
+++ b/tests/data/test1436
@@ -42,23 +42,23 @@
 HTTP requests with multiple connections over Unix socket
  </name>
  <command>
---unix-socket %HTTPUNIXPATH http://one.example.com/14360001 http://two.example.com/14360002 http://one.example.com/14360003
+--unix-socket %HTTPUNIXPATH http://one.example.com/%TESTNUMBER0001 http://two.example.com/%TESTNUMBER0002 http://one.example.com/%TESTNUMBER0003
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /14360001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: one.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14360002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: two.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14360003 HTTP/1.1

+GET /%TESTNUMBER0003 HTTP/1.1

 Host: one.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1437 b/tests/data/test1437
index 07346a9..87a36d5 100644
--- a/tests/data/test1437
+++ b/tests/data/test1437
@@ -59,21 +59,21 @@
 HTTP with duplicated WWW-Authenticate parameters
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1437 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1437 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1437 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/1437", response="4376eb639bf8e7343a6e7b56e1b89c4f", algorithm=MD5

+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/%TESTNUMBER", response="4376eb639bf8e7343a6e7b56e1b89c4f", algorithm=MD5

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1438 b/tests/data/test1438
index 1481882..90610a8 100644
--- a/tests/data/test1438
+++ b/tests/data/test1438
@@ -1,6 +1,7 @@
 <testcase>
 <info>
 <keywords>
+HTTP
 protocol
 --write-out
 </keywords>
@@ -9,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -29,7 +30,7 @@
 Check if %{scheme} returns HTTP
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1438 --write-out '%{scheme}'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{scheme}'
 </command>
 </client>
 
@@ -37,7 +38,7 @@
 <verify>
 <stdout nonewline="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -46,7 +47,7 @@
 HTTP
 </stdout>
 <protocol>
-GET /1438 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1439 b/tests/data/test1439
index a76ccf0..9a9196e 100644
--- a/tests/data/test1439
+++ b/tests/data/test1439
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -29,7 +29,7 @@
 Check if %{http_version} returns 1.1
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1439 --write-out '%{http_version}'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{http_version}'
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 <verify>
 <stdout nonewline="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -46,7 +46,7 @@
 1.1
 </stdout>
 <protocol>
-GET /1439 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1443 b/tests/data/test1443
index 7da739e..a59958a 100644
--- a/tests/data/test1443
+++ b/tests/data/test1443
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 Content-Length: 6
@@ -40,12 +40,12 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1443 -O --remote-time
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O --remote-time
 </command>
 # Verify the mtime of the file. The mtime is specifically chosen to be an even
 # number so that it can be represented exactly on a FAT filesystem.
 <postcheck>
-perl -e 'exit((stat("log/1443"))[9] != 960898200)'
+perl -e 'exit((stat("log/%TESTNUMBER"))[9] != 960898200)'
 </postcheck>
 </client>
 
@@ -53,13 +53,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1443 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/1443">
+<file name="log/%TESTNUMBER">
 12345
 </file>
 </verify>
diff --git a/tests/data/test1444 b/tests/data/test1444
index 7eec21b..71b5f0e 100644
--- a/tests/data/test1444
+++ b/tests/data/test1444
@@ -26,12 +26,12 @@
 FTP with --remote-time
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1444 --remote-time
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --remote-time
 </command>
 # Verify the mtime of the file. The mtime is specifically chosen to be an even
 # number so that it can be represented exactly on a FAT filesystem.
 <postcheck>
-perl -e 'exit((stat("log/curl1444.out"))[9] != 1234567890)'
+perl -e 'exit((stat("log/curl%TESTNUMBER.out"))[9] != 1234567890)'
 </postcheck>
 </client>
 
@@ -41,11 +41,11 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-MDTM 1444

+MDTM %TESTNUMBER

 EPSV

 TYPE I

-SIZE 1444

-RETR 1444

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1445 b/tests/data/test1445
index 936c9ae..1811e07 100644
--- a/tests/data/test1445
+++ b/tests/data/test1445
@@ -15,17 +15,17 @@
 file
 </server>
 <precheck>
-perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1445.dir
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 file:// with --remote-time
  </name>
  <command>
-file://localhost%FILE_PWD/log/test1445.dir/plainfile.txt --remote-time
+file://localhost%FILE_PWD/log/test%TESTNUMBER.dir/plainfile.txt --remote-time
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1445.dir && \
-perl -e 'exit((stat("log/curl1445.out"))[9] != 946728000)'
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test%TESTNUMBER.dir && \
+perl -e 'exit((stat("log/curl%TESTNUMBER.out"))[9] != 946728000)'
 </postcheck>
 </client>
 
diff --git a/tests/data/test1446 b/tests/data/test1446
index 637df58..0088375 100644
--- a/tests/data/test1446
+++ b/tests/data/test1446
@@ -18,17 +18,17 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1446.dir
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP with --remote-time
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test1446.dir/rofile.txt --insecure --remote-time
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.dir/rofile.txt --insecure --remote-time
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1446.dir && \
-perl -e 'exit((stat("log/curl1446.out"))[9] != 978264000)'
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test%TESTNUMBER.dir && \
+perl -e 'exit((stat("log/curl%TESTNUMBER.out"))[9] != 978264000)'
 </postcheck>
 </client>
 
diff --git a/tests/data/test1448 b/tests/data/test1448
index 38c0227..600f724 100644
--- a/tests/data/test1448
+++ b/tests/data/test1448
@@ -5,6 +5,7 @@
 HTTP GET
 IDN
 followlocation
+--resolve
 --write-out
 </keywords>
 </info>
@@ -14,16 +15,16 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Content-Type: text/plain
-Location: http://åäö.se:%HTTPPORT/14480001
+Location: http://åäö.se:%HTTPPORT/%TESTNUMBER0001
 
 redirect
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain; charset=us-ascii
 
@@ -52,7 +53,7 @@
  </name>
 
  <command>
-http://åäö.se:%HTTPPORT/1448 --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -L --connect-to %HOSTIP:%HTTPPORT:%HOSTIP:%HTTPPORT
+http://åäö.se:%HTTPPORT/%TESTNUMBER --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -L --connect-to %HOSTIP:%HTTPPORT:%HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -60,12 +61,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1448 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: xn--4cab6c.se:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /14480001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: xn--4cab6c.se:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -74,13 +75,13 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Content-Type: text/plain
-Location: http://åäö.se:%HTTPPORT/14480001
+Location: http://åäö.se:%HTTPPORT/%TESTNUMBER0001
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain; charset=us-ascii
 
diff --git a/tests/data/test1449 b/tests/data/test1449
index 1911b02..ba24ef9 100644
--- a/tests/data/test1449
+++ b/tests/data/test1449
@@ -21,7 +21,7 @@
 FTP download range with integer overflow
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1449 -r 36893488147419103232-
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -r 36893488147419103232-
 </command>
 </client>
 
diff --git a/tests/data/test1451 b/tests/data/test1451
index 9337b8b..cdbd398 100644
--- a/tests/data/test1451
+++ b/tests/data/test1451
@@ -26,7 +26,7 @@
 Basic SMB request
 </name>
 <command>
--u 'curltest:curltest' smb://%HOSTIP:%SMBPORT/TESTS/1451
+-u 'curltest:curltest' smb://%HOSTIP:%SMBPORT/TESTS/%TESTNUMBER
 </command>
 <precheck>
 python -c "__import__('pkgutil').find_loader('impacket') or (__import__('sys').stdout.write('Test only works if Python package impacket is installed\n'), __import__('sys').exit(1))"
diff --git a/tests/data/test1452 b/tests/data/test1452
index 6c76ef8..d1b7fa9 100644
--- a/tests/data/test1452
+++ b/tests/data/test1452
@@ -26,7 +26,7 @@
 Basic TELNET negotiation
  </name>
 <stdin>
-test1452
+test%TESTNUMBER
 </stdin>
  <command>
 telnet://%HOSTIP:%TELNETPORT --upload-file -
@@ -37,7 +37,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <stdout nonewline="yes">
-test1452
+test%TESTNUMBER
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1455 b/tests/data/test1455
index b8a864f..23b76ff 100644
--- a/tests/data/test1455
+++ b/tests/data/test1455
@@ -10,10 +10,10 @@
 
 #
 # Server-side
-<reply name="1455">
+<reply name="%TESTNUMBER">
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -37,7 +37,7 @@
 HTTP GET when PROXY Protocol enabled
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol -H "Testno: 1455"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --haproxy-protocol -H "Testno: %TESTNUMBER"
 </command>
 <features>
 proxy
@@ -52,11 +52,11 @@
 </strippart>
 <protocol>
 proxy-line

-GET /1455 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 1455

+Testno: %TESTNUMBER

 

 </protocol>
 </verify>
diff --git a/tests/data/test1456 b/tests/data/test1456
index 59e0739..4aca9ca 100644
--- a/tests/data/test1456
+++ b/tests/data/test1456
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -40,7 +40,7 @@
 HTTP-IPv6 GET with PROXY protocol
  </name>
  <command>
--g "http://%HOST6IP:%HTTP6PORT/1456" --haproxy-protocol
+-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --haproxy-protocol
 </command>
 <features>
 proxy
@@ -57,7 +57,7 @@
 </strippart>
 <protocol>
 PROXY TCP6 ::1 ::1 %HTTP6PORT

-GET /1456 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1457 b/tests/data/test1457
index ab447ac..235b840 100644
--- a/tests/data/test1457
+++ b/tests/data/test1457
@@ -1,6 +1,7 @@
 <testcase>
 <info>
 <keywords>
+HTTP
 protocol
 --write-out
 </keywords>
@@ -9,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -29,7 +30,7 @@
 Check if %{stderr} and %{stdout} switch between stdout and stderr.
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1457 --silent --write-out 'line1%{stderr}line2%{stdout}line3'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --silent --write-out 'line1%{stderr}line2%{stdout}line3'
 </command>
 </client>
 
@@ -37,7 +38,7 @@
 <verify>
 <stdout nonewline="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -49,7 +50,7 @@
 line2
 </stderr>
 <protocol>
-GET /1457 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1458 b/tests/data/test1458
index c4f25f5..785ceae 100644
--- a/tests/data/test1458
+++ b/tests/data/test1458
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP with wildcard --resolve
 </name>
 <command>
---resolve *:%HTTPPORT:%HOSTIP http://example.com:%HTTPPORT/1458
+--resolve *:%HTTPPORT:%HOSTIP http://example.com:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1458 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: example.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1459 b/tests/data/test1459
index 3e89595..fde8bf1 100644
--- a/tests/data/test1459
+++ b/tests/data/test1459
@@ -13,7 +13,7 @@
 sftp
 </server>
 <precheck>
-mkdir -p %PWD/log/test1459.dir/.ssh
+mkdir -p %PWD/log/test%TESTNUMBER.dir/.ssh
 </precheck>
 <features>
 sftp
@@ -24,12 +24,12 @@
  <command>
 -u : sftp://%HOSTIP:%SSHPORT/ -l
 </command>
-<file name="log/test1459.dir/.ssh/known_hosts">
+<file name="log/test%TESTNUMBER.dir/.ssh/known_hosts">
 |1|qy29Y1x/+/F39AzdG5515YSSw+c=|iB2WX5jrU3ZTWc+ZfGau7HHEvBc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAynDN8cDJ3xNzRjTNNGciSHSxpubxhZ6YnkLdp1TkrGW8n\
 R93Ey5VtBeBblYTRlFXBWJgKFcTKBRJ/O4qBZwbUgt10AHj31i6h8NehfT19tR8wG/YCmj3KtYLHmwdzmW1edEL9G2NdX2KiKYv7/zuly3QvmP0QA0NhWkAz0KdWNM=
 </file>
 <setenv>
-CURL_HOME=%PWD/log/test1459.dir
+CURL_HOME=%PWD/log/test%TESTNUMBER.dir
 </setenv>
 </client>
 
diff --git a/tests/data/test146 b/tests/data/test146
index 3cd4bd5..f9f0117 100644
--- a/tests/data/test146
+++ b/tests/data/test146
@@ -23,7 +23,7 @@
 persistent FTP with different paths
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/first/dir/here/146 ftp://%HOSTIP:%FTPPORT/146
+ftp://%HOSTIP:%FTPPORT/first/dir/here/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,12 +43,12 @@
 CWD here

 EPSV

 TYPE I

-SIZE 146

-RETR 146

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 CWD /

 EPSV

-SIZE 146

-RETR 146

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1460 b/tests/data/test1460
index 1cc1335..8f6b5f2 100644
--- a/tests/data/test1460
+++ b/tests/data/test1460
@@ -14,7 +14,7 @@
   12345
 fooo
 54 3 2 1
-Content-Disposition: filename=name1460; charset=funny; option=strange
+Content-Disposition: filename=name%TESTNUMBER; charset=funny; option=strange
 
 </data>
 </reply>
@@ -37,9 +37,9 @@
 CURL_TESTDIR=%PWD/log
 </setenv>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1460 -Ji -O
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -Ji -O
 </command>
-<file name="log/name1460">
+<file name="log/name%TESTNUMBER">
 initial content
 </file>
 </client>
@@ -51,7 +51,7 @@
 <errorcode>
 2
 </errorcode>
-<file name="log/name1460">
+<file name="log/name%TESTNUMBER">
 initial content
 </file>
 
diff --git a/tests/data/test1461 b/tests/data/test1461
index 4b8f6c4..301dc14 100644
--- a/tests/data/test1461
+++ b/tests/data/test1461
@@ -34,14 +34,14 @@
 Usage: curl [options...] <url>
  -d, --data <data>   HTTP POST data
  -f, --fail          Fail silently (no output at all) on HTTP errors
- -h, --help <category> Get help for commands
+ -h, --help <category>  Get help for commands
  -i, --include       Include protocol response headers in the output
- -o, --output <file> Write to file instead of stdout
+ -o, --output <file>  Write to file instead of stdout
  -O, --remote-name   Write output to a file named as the remote file
  -s, --silent        Silent mode
- -T, --upload-file <file> Transfer local FILE to destination
- -u, --user <user:password> Server user and password
- -A, --user-agent <name> Send User-Agent <name> to server
+ -T, --upload-file <file>  Transfer local FILE to destination
+ -u, --user <user:password>  Server user and password
+ -A, --user-agent <name>  Send User-Agent <name> to server
  -v, --verbose       Make the operation more talkative
  -V, --version       Show version number and quit
 
diff --git a/tests/data/test1462 b/tests/data/test1462
index a9e7af0..ce99029 100644
--- a/tests/data/test1462
+++ b/tests/data/test1462
@@ -43,7 +43,7 @@
  http        HTTP and HTTPS protocol options
  imap        IMAP protocol options
  misc        Options that don't fit into any other category
- output      The output of curl
+ output      Filesystem output
  pop3        POP3 protocol options
  post        HTTP Post specific options
  proxy       All options related to proxies
diff --git a/tests/data/test1463 b/tests/data/test1463
index 7e1fe9b..9326748 100644
--- a/tests/data/test1463
+++ b/tests/data/test1463
@@ -37,8 +37,9 @@
 <stdout mode="text">
 Usage: curl [options...] <url>
 file: FILE protocol options
+     --create-file-mode <mode>  File mode (octal) for created files
  -I, --head          Show document info only
- -r, --range <range> Retrieve only the bytes within RANGE
+ -r, --range <range>  Retrieve only the bytes within RANGE
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1464 b/tests/data/test1464
index 167e80d..2ddacef 100644
--- a/tests/data/test1464
+++ b/tests/data/test1464
@@ -37,8 +37,9 @@
 <stdout mode="text">
 Usage: curl [options...] <url>
 file: FILE protocol options
+     --create-file-mode <mode>  File mode (octal) for created files
  -I, --head          Show document info only
- -r, --range <range> Retrieve only the bytes within RANGE
+ -r, --range <range>  Retrieve only the bytes within RANGE
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1465 b/tests/data/test1465
index d1e5538..ebbd5d6 100644
--- a/tests/data/test1465
+++ b/tests/data/test1465
Binary files differ
diff --git a/tests/data/test147 b/tests/data/test147
index 6651df0..0661186 100644
--- a/tests/data/test147
+++ b/tests/data/test147
@@ -25,7 +25,7 @@
 FTP with --ftp-create-dirs (failing CWD)
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/first/dir/here/147 --ftp-create-dirs
+ftp://%HOSTIP:%FTPPORT/first/dir/here/%TESTNUMBER --ftp-create-dirs
 </command>
 </client>
 
@@ -47,8 +47,8 @@
 CWD here

 EPSV

 TYPE I

-SIZE 147

-RETR 147

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test148 b/tests/data/test148
index 540c8fe..8e9f842 100644
--- a/tests/data/test148
+++ b/tests/data/test148
@@ -22,7 +22,7 @@
 FTP with --ftp-create-dirs (failing MKD)
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/attempt/to/get/this/148 --ftp-create-dirs
+ftp://%HOSTIP:%FTPPORT/attempt/to/get/this/%TESTNUMBER --ftp-create-dirs
 </command>
 </client>
 
diff --git a/tests/data/test149 b/tests/data/test149
index a5d1499..94ca5f7 100644
--- a/tests/data/test149
+++ b/tests/data/test149
@@ -18,9 +18,9 @@
 FTP with multiple uploads
  </name>
  <command>
--T log/upload149 ftp://%HOSTIP:%FTPPORT/dir1/149 -T log/upload149 ftp://%HOSTIP:%FTPPORT/dir2/149
+-T log/upload%TESTNUMBER ftp://%HOSTIP:%FTPPORT/dir1/%TESTNUMBER -T log/upload%TESTNUMBER ftp://%HOSTIP:%FTPPORT/dir2/%TESTNUMBER
 </command>
-<file name="log/upload149">
+<file name="log/upload%TESTNUMBER">
 send away this contents
 </file>
 </client>
@@ -39,14 +39,14 @@
 CWD dir1

 EPSV

 TYPE I

-STOR 149

+STOR %TESTNUMBER

 CWD /

 CWD dir2

 EPSV

-STOR 149

+STOR %TESTNUMBER

 QUIT

 </protocol>
-<file name="log/upload149">
+<file name="log/upload%TESTNUMBER">
 send away this contents
 </file>
 </verify>
diff --git a/tests/data/test15 b/tests/data/test15
index a82fa0c..ad7c06c 100644
--- a/tests/data/test15
+++ b/tests/data/test15
@@ -9,7 +9,7 @@
 # Server-side
 <reply>
 <data nocheck="yes">
-HTTP/1.4 200 OK

+HTTP/1.1 200 OK

 Fake: yes

 Fake: yes

 Fake: yes

@@ -28,24 +28,24 @@
 --write-out test
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/15 --write-out "%{url_effective} %{http_code} %{size_download}\n"
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER --write-out "%{url_effective} %{http_code} %{size_download}\n"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <stdout>
-HTTP/1.4 200 OK

+HTTP/1.1 200 OK

 Fake: yes

 Fake: yes

 Fake: yes

 Content-Length: 26

 

 Repeated nonsense-headers
-http://%HOSTIP:%HTTPPORT/want/15 200 26
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER 200 26
 </stdout>
 <protocol>
-GET /want/15 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test150 b/tests/data/test150
index 2179163..a23b573 100644
--- a/tests/data/test150
+++ b/tests/data/test150
@@ -74,7 +74,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm --fail
 </command>
 <precheck>
 chkhostname curlhost
@@ -84,15 +84,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /150 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /150 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1500 b/tests/data/test1500
index cd3131e..241f227 100644
--- a/tests/data/test1500
+++ b/tests/data/test1500
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 all good!

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Content-Length: 12

@@ -31,14 +31,14 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib1500
+lib%TESTNUMBER
 </tool>
 
  <name>
 curl_multi_wait
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1500
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 </testcase>
diff --git a/tests/data/test1501 b/tests/data/test1501
index 8c7e13a..9a10e0e 100644
--- a/tests/data/test1501
+++ b/tests/data/test1501
@@ -24,13 +24,13 @@
 ftp
 </server>
 <tool>
-lib1501
+lib%TESTNUMBER
 </tool>
  <name>
 FTP with multi interface and slow LIST response 
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/1501/
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER/
 </command>
 </client>
 # Verify data after the test has been "shot"
@@ -42,7 +42,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-CWD 1501

+CWD %TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test1502 b/tests/data/test1502
index 9e7bcf2..859a98f 100644
--- a/tests/data/test1502
+++ b/tests/data/test1502
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -32,13 +32,13 @@
 http
 </server>
 <tool>
-lib1502
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP multi with CURLOPT_RESOLVE, cleanup sequence UA
  </name>
  <command>
-http://google.com:%HTTPPORT/1502 %HTTPPORT %HOSTIP
+http://google.com:%HTTPPORT/%TESTNUMBER %HTTPPORT %HOSTIP
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1502 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: google.com:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1503 b/tests/data/test1503
index 2886394..a093ac3 100644
--- a/tests/data/test1503
+++ b/tests/data/test1503
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -32,13 +32,13 @@
 http
 </server>
 <tool>
-lib1503
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP multi with CURLOPT_RESOLVE, cleanup sequence PA
  </name>
  <command>
-http://google.com:%HTTPPORT/1503 %HTTPPORT %HOSTIP
+http://google.com:%HTTPPORT/%TESTNUMBER %HTTPPORT %HOSTIP
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1503 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: google.com:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1504 b/tests/data/test1504
index 5ca6607..8dc4f18 100644
--- a/tests/data/test1504
+++ b/tests/data/test1504
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -32,13 +32,13 @@
 http
 </server>
 <tool>
-lib1504
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP multi with CURLOPT_RESOLVE, cleanup sequence UB
  </name>
  <command>
-http://google.com:%HTTPPORT/1504 %HTTPPORT %HOSTIP
+http://google.com:%HTTPPORT/%TESTNUMBER %HTTPPORT %HOSTIP
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1504 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: google.com:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1505 b/tests/data/test1505
index 14e1141..9ddac46 100644
--- a/tests/data/test1505
+++ b/tests/data/test1505
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -32,13 +32,13 @@
 http
 </server>
 <tool>
-lib1505
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP multi with CURLOPT_RESOLVE, cleanup sequence PB
  </name>
  <command>
-http://google.com:%HTTPPORT/1505 %HTTPPORT %HOSTIP
+http://google.com:%HTTPPORT/%TESTNUMBER %HTTPPORT %HOSTIP
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1505 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: google.com:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1506 b/tests/data/test1506
index 815fef9..07d3aac 100644
--- a/tests/data/test1506
+++ b/tests/data/test1506
@@ -11,7 +11,7 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -19,7 +19,7 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -27,7 +27,7 @@
 </data2>
 <data3>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -35,7 +35,7 @@
 </data3>
 <data4>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -49,32 +49,32 @@
 http
 </server>
 <tool>
-lib1506
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP GET connection cache limit (CURLMOPT_MAXCONNECTS)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/path/1506 %HOSTIP %HTTPPORT
+http://%HOSTIP:%HTTPPORT/path/%TESTNUMBER %HOSTIP %HTTPPORT
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /path/15060001 HTTP/1.1

+GET /path/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15060002 HTTP/1.1

+GET /path/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15060003 HTTP/1.1

+GET /path/%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15060004 HTTP/1.1

+GET /path/%TESTNUMBER0004 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

@@ -82,7 +82,7 @@
 <strip>
 ^Host:.*
 </strip>
-<file name="log/stderr1506" mode="text">
+<file name="log/stderr%TESTNUMBER" mode="text">
 * Connection #0 to host server1.example.com left intact
 * Connection #1 to host server2.example.com left intact
 * Connection #2 to host server3.example.com left intact
diff --git a/tests/data/test1507 b/tests/data/test1507
index ab7b47e..8208752 100644
--- a/tests/data/test1507
+++ b/tests/data/test1507
@@ -18,7 +18,7 @@
 smtp
 </server>
 <tool>
-lib1507
+lib%TESTNUMBER
 </tool>
 
 # based on bug report #1184
@@ -32,7 +32,7 @@
 body
 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/1507
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,9 +40,9 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 1507

-MAIL FROM:<1507-realuser@example.com>

-RCPT TO:<1507-recipient@example.com>

+EHLO %TESTNUMBER

+MAIL FROM:<%TESTNUMBER-realuser@example.com>

+RCPT TO:<%TESTNUMBER-recipient@example.com>

 DATA

 </protocol>
 <upload>
diff --git a/tests/data/test1508 b/tests/data/test1508
index fbdc322..02cb90a 100644
--- a/tests/data/test1508
+++ b/tests/data/test1508
@@ -12,19 +12,19 @@
 none
 </server>
 <tool>
-lib1508
+lib%TESTNUMBER
 </tool>
  <name>
 Close a multi handle without using it
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/path/1508
+http://%HOSTIP:%NOLISTENPORT/path/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/stdout1508">
+<file name="log/stdout%TESTNUMBER">
 We are done
 </file>
 </verify>
diff --git a/tests/data/test1509 b/tests/data/test1509
index faffc5d..baa0a30 100644
--- a/tests/data/test1509
+++ b/tests/data/test1509
@@ -22,7 +22,7 @@
 
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -33,7 +33,7 @@
 Server: the beast that eats naughty clients

 

 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -51,7 +51,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1509
+lib%TESTNUMBER
 </tool>
 <features>
 proxy
@@ -60,9 +60,9 @@
 simple multi http:// through proxytunnel with authentication info
  </name>
  <command>
-http://the.old.moo.1509:%HTTPPORT/1509 %HOSTIP:%PROXYPORT
+http://the.old.moo.%TESTNUMBER:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
 </command>
-<file name="log/test1509.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
@@ -74,14 +74,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT the.old.moo.1509:%HTTPPORT HTTP/1.1

-Host: the.old.moo.1509:%HTTPPORT

+CONNECT the.old.moo.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /1509 HTTP/1.1

-Host: the.old.moo.1509:%HTTPPORT

+GET /%TESTNUMBER HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Accept: */*

 

 [DISCONNECT]
diff --git a/tests/data/test151 b/tests/data/test151
index 03a55b4..d05c7a0 100644
--- a/tests/data/test151
+++ b/tests/data/test151
@@ -28,14 +28,14 @@
 HTTP GET with an error code that might trick authentication
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/151
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /151 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1510 b/tests/data/test1510
index 2767f60..d021dfe 100644
--- a/tests/data/test1510
+++ b/tests/data/test1510
@@ -11,7 +11,7 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -19,7 +19,7 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -27,7 +27,7 @@
 </data2>
 <data3>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -35,7 +35,7 @@
 </data3>
 <data4>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -49,32 +49,32 @@
 http
 </server>
 <tool>
-lib1510
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/path/1510 %HOSTIP %HTTPPORT
+http://%HOSTIP:%HTTPPORT/path/%TESTNUMBER %HOSTIP %HTTPPORT
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /path/15100001 HTTP/1.1

+GET /path/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15100002 HTTP/1.1

+GET /path/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15100003 HTTP/1.1

+GET /path/%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15100004 HTTP/1.1

+GET /path/%TESTNUMBER0004 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

@@ -82,7 +82,7 @@
 <strip>
 ^Host:.*
 </strip>
-<file name="log/stderr1510" mode="text">
+<file name="log/stderr%TESTNUMBER" mode="text">
 * Connection #0 to host server1.example.com left intact
 * Connection #1 to host server2.example.com left intact
 * Connection #2 to host server3.example.com left intact
diff --git a/tests/data/test1511 b/tests/data/test1511
index d2b26e5..094ccf9 100644
--- a/tests/data/test1511
+++ b/tests/data/test1511
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fakem

 Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT

 Content-Type: text/html

@@ -21,7 +21,7 @@
 
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fakem

 Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT

 Content-Type: text/html

@@ -29,7 +29,7 @@
 Connection: close

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fakem

 Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT

 Content-Type: text/html

@@ -50,13 +50,13 @@
 http
 </features>
 <tool>
-lib1511
+lib%TESTNUMBER
 </tool>
 <name>
 HTTP GET time conditions in repeated requests
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1511
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1512 b/tests/data/test1512
index a5de5cd..7c04660 100644
--- a/tests/data/test1512
+++ b/tests/data/test1512
@@ -10,7 +10,7 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -18,7 +18,7 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -26,7 +26,7 @@
 </data2>
 <data3>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -34,7 +34,7 @@
 </data3>
 <data4>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -48,24 +48,24 @@
 http
 </server>
 <tool>
-lib1512
+lib%TESTNUMBER
 </tool>
  <name>
 GLOBAL CACHE test over two easy performs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/path/1512 %HOSTIP %HTTPPORT
+http://%HOSTIP:%HTTPPORT/path/%TESTNUMBER %HOSTIP %HTTPPORT
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /path/15120001 HTTP/1.1

+GET /path/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/15120002 HTTP/1.1

+GET /path/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1513 b/tests/data/test1513
index ba0c18a..189d3e3 100644
--- a/tests/data/test1513
+++ b/tests/data/test1513
@@ -22,7 +22,7 @@
 http
 </server>
 <tool>
-lib1513
+lib%TESTNUMBER
 </tool>
  <name>
 return failure immediately from progress callback
@@ -30,7 +30,7 @@
 
 # this server/host won't be used for real
  <command>
-http://%HOSTIP:%HTTPPORT/1513
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1514 b/tests/data/test1514
index 6c09ae3..b34406e 100644
--- a/tests/data/test1514
+++ b/tests/data/test1514
@@ -15,6 +15,7 @@
 Date: Sun, 19 Jan 2014 18:50:58 GMT

 Server: test-server/fake swsclose

 Connection: close

+

 </data>
 </reply>
 
@@ -24,13 +25,13 @@
 http
 </server>
 <tool>
-lib1514
+lib%TESTNUMBER
 </tool>
 <name>
 HTTP POST with read callback and unknown data size
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1514
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -39,7 +40,7 @@
 # Content-Length header is not present
 # Transfer-Encoding header is added automatically
 <protocol>
-POST /1514 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

diff --git a/tests/data/test1515 b/tests/data/test1515
index 7417924..c75671a 100644
--- a/tests/data/test1515
+++ b/tests/data/test1515
@@ -43,13 +43,13 @@
 http
 </server>
 <tool>
-lib1515
+lib%TESTNUMBER
 </tool>
 <name>
 caching of manual libcurl DNS entries after DNS cache timeout
 </name>
 <command>
-path/1515 %HOSTIP %HTTPPORT
+path/%TESTNUMBER %HOSTIP %HTTPPORT
 </command>
 </client>
 
diff --git a/tests/data/test1516 b/tests/data/test1516
index bf2cd15..79f0275 100644
--- a/tests/data/test1516
+++ b/tests/data/test1516
@@ -45,7 +45,7 @@
 caching of manual libcurl DNS entries after dead connection
 </name>
 <command>
-/path/1516 %HOSTIP %HTTPPORT
+/path/%TESTNUMBER %HOSTIP %HTTPPORT
 </command>
 </client>
 
diff --git a/tests/data/test1517 b/tests/data/test1517
index d0a4aec..5150ff6 100644
--- a/tests/data/test1517
+++ b/tests/data/test1517
@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1517
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP POST, server responds before completed send
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1517
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 s/^(this is what we post to the silly web server)(\r)?\n//
 </strippart>
 <protocol>
-POST /1517 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 45

diff --git a/tests/data/test1518 b/tests/data/test1518
index 134ea4a..9b3f6be 100644
--- a/tests/data/test1518
+++ b/tests/data/test1518
@@ -29,14 +29,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1518
+lib%TESTNUMBER
 </tool>
 
  <name>
 Extract Location: with broken URL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1518
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -49,11 +49,11 @@
 <protocol>
 </protocol>
 <stdout>
-res: 0
-status: 302
-redirects: 0
-effectiveurl: http://%HOSTIP:%HTTPPORT/1518
-redirecturl: http://1.2 .4.5/test
+res 0
+status 302
+redirects 0
+effectiveurl http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+redirecturl http://1.2 .4.5/test
 </stdout>
 <errorcode>
 0
diff --git a/tests/data/test1519 b/tests/data/test1519
index 292a49c..2eadb17 100644
--- a/tests/data/test1519
+++ b/tests/data/test1519
@@ -36,7 +36,7 @@
 Extract Location: with broken absolute URL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1519
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -49,11 +49,11 @@
 <protocol>
 </protocol>
 <stdout>
-res: 0
-status: 302
-redirects: 0
-effectiveurl: http://%HOSTIP:%HTTPPORT/1519
-redirecturl: http://%HOSTIP:%HTTPPORT/h%20ttp://1.2.4.5/test
+res 0
+status 302
+redirects 0
+effectiveurl http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+redirecturl http://%HOSTIP:%HTTPPORT/h%20ttp://1.2.4.5/test
 </stdout>
 <errorcode>
 0
diff --git a/tests/data/test152 b/tests/data/test152
index 2c48b03..a558ed5 100644
--- a/tests/data/test152
+++ b/tests/data/test152
@@ -29,14 +29,14 @@
 HTTP GET with an error code that might trick authentication and --fail
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/152 --fail
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /152 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1520 b/tests/data/test1520
index 5f9344d..fc031ad 100644
--- a/tests/data/test1520
+++ b/tests/data/test1520
@@ -13,7 +13,7 @@
 smtp
 </server>
 <tool>
-lib1520
+lib%TESTNUMBER
 </tool>
 
  <name>
@@ -32,7 +32,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/1520
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 1520

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test1521 b/tests/data/test1521
index 791a50d..f086243 100644
--- a/tests/data/test1521
+++ b/tests/data/test1521
@@ -12,7 +12,7 @@
 none
 </server>
 <tool>
-lib1521
+lib%TESTNUMBER
 </tool>
 
  <name>
diff --git a/tests/data/test1522 b/tests/data/test1522
index 91d6a33..07dfb82 100644
--- a/tests/data/test1522
+++ b/tests/data/test1522
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -29,7 +29,7 @@
 http
 </server>
 <tool>
-lib1522
+lib%TESTNUMBER
 </tool>
 
 <name>
@@ -37,7 +37,7 @@
 </name>
 
 <command>
-http://%HOSTIP:%HTTPPORT/1522
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1523 b/tests/data/test1523
index 015f505..de31a43 100644
--- a/tests/data/test1523
+++ b/tests/data/test1523
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Connection: close
 Funny-head: yesyes
@@ -27,7 +27,7 @@
 http
 </server>
 <tool>
-lib1523
+lib%TESTNUMBER
 </tool>
 
 <name>
@@ -35,7 +35,7 @@
 </name>
 
 <command>
-http://%HOSTIP:%HTTPPORT/1523
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 <killserver>
 http
diff --git a/tests/data/test1524 b/tests/data/test1524
index 3490540..39da646 100644
--- a/tests/data/test1524
+++ b/tests/data/test1524
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 303 OK swsclose
-Location: moo.html&testcase=/15240002
+Location: moo.html&testcase=/%TESTNUMBER0002
 Connection: close
 
 </data>
@@ -24,7 +24,7 @@
 </data2>
 <datacheck>
 HTTP/1.1 303 OK swsclose
-Location: moo.html&testcase=/15240002
+Location: moo.html&testcase=/%TESTNUMBER0002
 Connection: close
 
 HTTP/1.1 200 OK swsclose
@@ -45,9 +45,9 @@
 HTTP PUT with 303 redirect
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/blah/1524 -L -T log/upload1524.txt
+http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -T log/upload%TESTNUMBER.txt
 </command>
-<file name="log/upload1524.txt">
+<file name="log/upload%TESTNUMBER.txt">
 moo
 </file>
 </client>
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-PUT /blah/1524 HTTP/1.1

+PUT /blah/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -64,7 +64,7 @@
 Expect: 100-continue

 

 moo
-GET /blah/moo.html&testcase=/15240002 HTTP/1.1

+GET /blah/moo.html&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1525 b/tests/data/test1525
index 673e048..05c6863 100644
--- a/tests/data/test1525
+++ b/tests/data/test1525
@@ -18,7 +18,7 @@
 </connect>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -27,7 +27,7 @@
 HTTP/1.1 200 OK

 

 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -41,13 +41,13 @@
 http-proxy
 </server>
 <tool>
-lib1525
+lib%TESTNUMBER
 </tool>
  <name>
 CURLOPT_PROXYHEADER is ignored CURLHEADER_UNIFIED
  </name>
  <command>
- http://the.old.moo.1525:%HTTPPORT/1525 %HOSTIP:%PROXYPORT
+ http://the.old.moo.%TESTNUMBER:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
@@ -57,15 +57,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT the.old.moo.1525:%HTTPPORT HTTP/1.1

-Host: the.old.moo.1525:%HTTPPORT

+CONNECT the.old.moo.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Proxy-Connection: Keep-Alive

 User-Agent: Http Agent

 

 </proxy>
 <protocol>
-PUT /1525 HTTP/1.1

-Host: the.old.moo.1525:%HTTPPORT

+PUT /%TESTNUMBER HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Accept: */*

 User-Agent: Http Agent

 Content-Length: 13

diff --git a/tests/data/test1526 b/tests/data/test1526
index f6fb44d..c1204b9 100644
--- a/tests/data/test1526
+++ b/tests/data/test1526
@@ -19,7 +19,7 @@
 </connect>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -29,7 +29,7 @@
 Server: present

 

 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -43,13 +43,13 @@
 http-proxy
 </server>
 <tool>
-lib1526
+lib%TESTNUMBER
 </tool>
  <name>
 CURLOPT_PROXYHEADER: separate host/proxy headers
  </name>
  <command>
- http://the.old.moo.1526:%HTTPPORT/1526 %HOSTIP:%PROXYPORT
+ http://the.old.moo.%TESTNUMBER:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
@@ -59,15 +59,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT the.old.moo.1526:%HTTPPORT HTTP/1.1

-Host: the.old.moo.1526:%HTTPPORT

+CONNECT the.old.moo.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Proxy-Connection: Keep-Alive

 User-Agent: Proxy Agent

 

 </proxy>
 <protocol>
-PUT /1526 HTTP/1.1

-Host: the.old.moo.1526:%HTTPPORT

+PUT /%TESTNUMBER HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Accept: */*

 User-Agent: Http Agent

 Content-Length: 13

diff --git a/tests/data/test1527 b/tests/data/test1527
index 6bb87d1..d50df90 100644
--- a/tests/data/test1527
+++ b/tests/data/test1527
@@ -18,7 +18,7 @@
 </connect>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -28,7 +28,7 @@
 We-are: good

 

 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -42,13 +42,13 @@
 http-proxy
 </server>
 <tool>
-lib1527
+lib%TESTNUMBER
 </tool>
  <name>
 Check same headers are generated with CURLOPT_HEADEROPT == CURLHEADER_UNIFIED
  </name>
  <command>
- http://the.old.moo.1527:%HTTPPORT/1527 %HOSTIP:%PROXYPORT
+ http://the.old.moo.%TESTNUMBER:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
@@ -58,16 +58,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT the.old.moo.1527:%HTTPPORT HTTP/1.1

-Host: the.old.moo.1527:%HTTPPORT

+CONNECT the.old.moo.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Proxy-Connection: Keep-Alive

 User-Agent: Http Agent

 Expect: 100-continue

 

 </proxy>
 <protocol>
-PUT /1527 HTTP/1.1

-Host: the.old.moo.1527:%HTTPPORT

+PUT /%TESTNUMBER HTTP/1.1

+Host: the.old.moo.%TESTNUMBER:%HTTPPORT

 Accept: */*

 User-Agent: Http Agent

 Expect: 100-continue

diff --git a/tests/data/test1528 b/tests/data/test1528
index 72c0a32..f6449ae 100644
--- a/tests/data/test1528
+++ b/tests/data/test1528
@@ -18,7 +18,7 @@
 </connect>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -35,13 +35,13 @@
 http-proxy
 </server>
 <tool>
-lib1528
+lib%TESTNUMBER
 </tool>
  <name>
 Separately specified proxy/server headers sent in a proxy GET
  </name>
  <command>
- http://the.old.moo:%HTTPPORT/1528 %HOSTIP:%PROXYPORT
+ http://the.old.moo:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
@@ -51,7 +51,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-GET http://the.old.moo:%HTTPPORT/1528 HTTP/1.1

+GET http://the.old.moo:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: the.old.moo:%HTTPPORT

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test1529 b/tests/data/test1529
index f7be503..68136aa 100644
--- a/tests/data/test1529
+++ b/tests/data/test1529
@@ -23,13 +23,13 @@
 http-proxy
 </server>
 <tool>
-lib1529
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP request-injection in URL sent over proxy
  </name>
  <command>
- "http://the.old.moo:%HTTPPORT/1529" %HOSTIP:%PROXYPORT
+ "http://the.old.moo:%HTTPPORT/%TESTNUMBER" %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
diff --git a/tests/data/test153 b/tests/data/test153
index a582595..c51824f 100644
--- a/tests/data/test153
+++ b/tests/data/test153
@@ -81,7 +81,7 @@
 HTTP with Digest authorization with stale=true
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1530001 -u testuser:testpass --digest http://%HOSTIP:%HTTPPORT/1530002
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -u testuser:testpass --digest http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002
 </command>
 </client>
 
@@ -91,31 +91,31 @@
 ^Authorization.*cnonce
 </strip>
 <protocol>
-GET /1530001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1530001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530001", response="f4f83139396995bac665f24a1f1055c7"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER0001", response="f4f83139396995bac665f24a1f1055c7"

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1530002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1530002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530002", response="f84511b014fdd0ba6494f42871079c32"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER0002", response="f84511b014fdd0ba6494f42871079c32"

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1530002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/1530002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5

+Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/%TESTNUMBER0002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm=MD5

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1530 b/tests/data/test1530
index 8372d29..0fbd21c 100644
--- a/tests/data/test1530
+++ b/tests/data/test1530
@@ -13,7 +13,7 @@
 http
 </features>
 <tool>
-lib1530
+lib%TESTNUMBER
 </tool>
  <name>
 CURLOPT_OPENSOCKETFUNCTION returns bad socket
diff --git a/tests/data/test1531 b/tests/data/test1531
index d58deb6..e590af0 100644
--- a/tests/data/test1531
+++ b/tests/data/test1531
Binary files differ
diff --git a/tests/data/test1532 b/tests/data/test1532
index 5b2afc7..582f05a 100644
--- a/tests/data/test1532
+++ b/tests/data/test1532
@@ -23,13 +23,13 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1532
+lib%TESTNUMBER
 </tool>
 <name>
 Test CURLINFO_RESPONSE_CODE
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1532
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1532 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1533 b/tests/data/test1533
index 5651816..7f06d20 100644
--- a/tests/data/test1533
+++ b/tests/data/test1533
@@ -14,7 +14,7 @@
 </servercmd>
 <data nocheck="yes">
 HTTP/1.1 401 Authorization Required

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 15

 
@@ -27,13 +27,13 @@
 http
 </server>
 <tool>
-lib1533
+lib%TESTNUMBER
 </tool>
 <name>
 HTTP with CURLOPT_KEEP_SENDING_ON_ERROR and an early error response
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1533
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,25 +44,25 @@
 120
 </errorcode>
 <protocol nonewline="yes">
-POST /1533 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-POST /1533 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-POST /1533 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-aaaPOST /1533 HTTP/1.1

+aaaPOST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 3

diff --git a/tests/data/test1534 b/tests/data/test1534
index 5ebf57d..4672e0b 100644
--- a/tests/data/test1534
+++ b/tests/data/test1534
@@ -24,13 +24,13 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1534
+lib%TESTNUMBER
 </tool>
 <name>
 CURLINFO_FILETIME init and reset
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1534
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1534 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1535 b/tests/data/test1535
index 226190d..477f3fa 100644
--- a/tests/data/test1535
+++ b/tests/data/test1535
@@ -24,13 +24,13 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1535
+lib%TESTNUMBER
 </tool>
 <name>
 Test CURLINFO_RESPONSE_CODE CURLINFO_PROTOCOL
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1535
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1535 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1536 b/tests/data/test1536
index a6e5a66..ea7ce39 100644
--- a/tests/data/test1536
+++ b/tests/data/test1536
@@ -24,13 +24,13 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1536
+lib%TESTNUMBER
 </tool>
 <name>
 Test CURLINFO_RESPONSE_CODE CURLINFO_SCHEME
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1536
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1536 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1537 b/tests/data/test1537
index 33d8ab3..c999e9a 100644
--- a/tests/data/test1537
+++ b/tests/data/test1537
@@ -16,7 +16,7 @@
 none
 </server>
 <tool>
-lib1537
+lib%TESTNUMBER
 </tool>
 
 <name>
diff --git a/tests/data/test1538 b/tests/data/test1538
index 03481d5..f375412 100644
--- a/tests/data/test1538
+++ b/tests/data/test1538
@@ -17,7 +17,7 @@
 none
 </server>
 <tool>
-lib1538
+lib%TESTNUMBER
 </tool>
 
 <name>
@@ -81,7 +81,7 @@
 e46: Unknown error
 e47: Number of redirects hit maximum amount
 e48: An unknown option was passed in to libcurl
-e49: Malformed telnet option
+e49: Malformed option provided in a setopt
 e50: Unknown error
 e51: Unknown error
 e52: Server returned nothing (no headers, no data)
@@ -130,7 +130,8 @@
 e95: HTTP/3 error
 e96: QUIC connection error
 e97: proxy handshake error
-e98: Unknown error
+e98: SSL Client Certificate required
+e99: Unknown error
 m-1: Please call curl_multi_perform() soon
 m0: No error
 m1: Invalid multi handle
diff --git a/tests/data/test1539 b/tests/data/test1539
index b8546f2..3ef12fe 100644
--- a/tests/data/test1539
+++ b/tests/data/test1539
@@ -24,13 +24,13 @@
 http
 </server>
 <tool>
-lib1539
+lib%TESTNUMBER
 </tool>
 <name>
 HTTP 1.0 POST with read callback and unknown data size
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1539
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test154 b/tests/data/test154
index 616051c..c0f7651 100644
--- a/tests/data/test154
+++ b/tests/data/test154
@@ -70,9 +70,9 @@
 HTTP PUT with --anyauth authorization (picking Digest)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/154 -T log/put154 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
 </command>
-<file name="log/put154">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -83,16 +83,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /154 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

 Expect: 100-continue

 

-PUT /154 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/154", response="b71551e12d1c456e47d8388ecb2edeca"

+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/%TESTNUMBER", response="b71551e12d1c456e47d8388ecb2edeca"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

diff --git a/tests/data/test1540 b/tests/data/test1540
index 1c1cf5d..818cbb6 100644
--- a/tests/data/test1540
+++ b/tests/data/test1540
@@ -42,20 +42,20 @@
 http
 </server>
 <tool>
-lib1540
+lib%TESTNUMBER
 </tool>
  <name>
 chunked with trailers and pausing the receive
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1540
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1540 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test155 b/tests/data/test155
index 6e19a4f..8eabab6 100644
--- a/tests/data/test155
+++ b/tests/data/test155
@@ -93,12 +93,12 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
 </command>
 <precheck>
 chkhostname curlhost
 </precheck>
-<file name="log/put155">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -109,23 +109,23 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /155 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

 Expect: 100-continue

 

-PUT /155 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 

-PUT /155 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

diff --git a/tests/data/test1550 b/tests/data/test1550
index c305dd6..bfb80a1 100644
--- a/tests/data/test1550
+++ b/tests/data/test1550
@@ -16,14 +16,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1550
+lib%TESTNUMBER
 </tool>
 
  <name>
 verify setting pipeling blocklisting options
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/1550
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER
 </command>
 </client>
 </testcase>
diff --git a/tests/data/test1551 b/tests/data/test1551
index c41a146..4c60db8 100644
--- a/tests/data/test1551
+++ b/tests/data/test1551
@@ -9,15 +9,15 @@
 <reply>
 <data>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
-Location: /15510002
+Location: /%TESTNUMBER0002
 
 -foo-
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 11
 
 redirected
@@ -35,32 +35,32 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1551
+lib%TESTNUMBER
 </tool>
 
  <name>
 re-run redirected transfer without setting URL again
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1551
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /1551 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /15510002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /1551 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /15510002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1552 b/tests/data/test1552
index 48e55cb..9468f41 100644
--- a/tests/data/test1552
+++ b/tests/data/test1552
@@ -36,10 +36,10 @@
  </name>
 # tool is what to use instead of 'curl'
 <tool>
-lib1552
+lib%TESTNUMBER
 </tool>
  <command>
-'imap://%HOSTIP:%IMAPPORT/1552/;MAILINDEX=1'
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1'
 </command>
 </client>
 
diff --git a/tests/data/test1553 b/tests/data/test1553
index 5e793b3..bc83032 100644
--- a/tests/data/test1553
+++ b/tests/data/test1553
@@ -36,12 +36,12 @@
  </name>
 # tool is what to use instead of 'curl'
 <tool>
-lib1553
+lib%TESTNUMBER
 </tool>
 
 # this MUST use a host name that doesn't resolve
 <command>
-imap://non-existing-host.haxx.se:%IMAPPORT/1553
+imap://non-existing-host.haxx.se:%IMAPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1554 b/tests/data/test1554
index fffa6ad..c16195c 100644
--- a/tests/data/test1554
+++ b/tests/data/test1554
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 29
@@ -92,10 +92,10 @@
 HTTP with shared connection cache
 </name>
 <tool>
-lib1554
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/1554
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1555 b/tests/data/test1555
index 19512c5..547ec39 100644
--- a/tests/data/test1555
+++ b/tests/data/test1555
@@ -22,7 +22,7 @@
 http
 </server>
 <tool>
-lib1555
+lib%TESTNUMBER
 </tool>
  <name>
 verify api is protected against calls from callbacks
@@ -30,7 +30,7 @@
 
 # this server/host won't be used for real
  <command>
-http://%HOSTIP:%HTTPPORT/1555
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1556 b/tests/data/test1556
index f64e76e..40a2e12 100644
--- a/tests/data/test1556
+++ b/tests/data/test1556
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -33,13 +33,13 @@
 http
 </server>
 <tool>
-lib1556
+lib%TESTNUMBER
 </tool>
  <name>
 send long HTTP headers to header callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1556
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1556 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1557 b/tests/data/test1557
index 16e2a2c..031809f 100644
--- a/tests/data/test1557
+++ b/tests/data/test1557
@@ -14,7 +14,7 @@
 none
 </server>
 <tool>
-lib1557
+lib%TESTNUMBER
 </tool>
 
 <name>
diff --git a/tests/data/test1558 b/tests/data/test1558
index f1538c2..26854c2 100644
--- a/tests/data/test1558
+++ b/tests/data/test1558
@@ -17,16 +17,16 @@
 file
 </features>
 <tool>
-lib1558
+lib%TESTNUMBER
 </tool>
 
 <name>
 CURLINFO_PROTOCOL for file:// transfer
 </name>
 <command>
-file://%FILE_PWD/log/data1558
+file://%FILE_PWD/log/data%TESTNUMBER
 </command>
-<file name="log/data1558">
+<file name="log/data%TESTNUMBER">
 hello
 </file>
 </client>
diff --git a/tests/data/test1559 b/tests/data/test1559
index cbed6fb..41fdf3a 100644
--- a/tests/data/test1559
+++ b/tests/data/test1559
@@ -18,7 +18,7 @@
 http
 </features>
 <tool>
-lib1559
+lib%TESTNUMBER
 </tool>
 
 <name>
diff --git a/tests/data/test156 b/tests/data/test156
index fafedc2..94bb339 100644
--- a/tests/data/test156
+++ b/tests/data/test156
@@ -28,9 +28,9 @@
 HTTP PUT with --anyauth (when the server requires none)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/156 -T log/put156 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
 </command>
-<file name="log/put156">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /156 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1560 b/tests/data/test1560
index 0a132a1..e8767b2 100644
--- a/tests/data/test1560
+++ b/tests/data/test1560
@@ -28,7 +28,7 @@
 URL API
  </name>
 <tool>
-lib1560
+lib%TESTNUMBER
 </tool>
 </client>
 
diff --git a/tests/data/test1561 b/tests/data/test1561
index bfdb439..b6f8f2b 100644
--- a/tests/data/test1561
+++ b/tests/data/test1561
@@ -14,10 +14,10 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Set-Cookie: super=secret; domain=example.com; path=/1561; secure;
-Set-Cookie: supersuper=secret; domain=example.com; path=/1561/login/; secure;
+Set-Cookie: super=secret; domain=example.com; path=/%TESTNUMBER; secure;
+Set-Cookie: supersuper=secret; domain=example.com; path=/%TESTNUMBER/login/; secure;
 Set-Cookie: __Secure-SID=12345; Domain=example.com
 Set-Cookie: __Secure-SID=12346; Secure; Domain=example.com
 Set-Cookie: supersupersuper=secret; __Secure-SID=12346; Secure; Domain=example.com
@@ -33,15 +33,15 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Set-Cookie: super=secret; domain=example.com; path=/1561; httponly;
-Set-Cookie: super=secret; domain=example.com; path=/1561/; httponly;
+Set-Cookie: super=secret; domain=example.com; path=/%TESTNUMBER; httponly;
+Set-Cookie: super=secret; domain=example.com; path=/%TESTNUMBER/; httponly;
 Set-Cookie: super=secret; domain=example.com; path=/15; httponly;
 Set-Cookie: public=yes; domain=example.com; path=/foo;
-Set-Cookie: supersuper=secret; domain=example.com; path=/1561/login/en;
-Set-Cookie: supersuper=secret; domain=example.com; path=/1561/login;
-Set-Cookie: secureoverhttp=yes; domain=example.com; path=/1561; secure;
+Set-Cookie: supersuper=secret; domain=example.com; path=/%TESTNUMBER/login/en;
+Set-Cookie: supersuper=secret; domain=example.com; path=/%TESTNUMBER/login;
+Set-Cookie: secureoverhttp=yes; domain=example.com; path=/%TESTNUMBER; secure;
 Set-Cookie: __Secure-SID=22345; Domain=example.com
 Set-Cookie: __Secure-SID=22346; Secure; Domain=example.com
 Set-Cookie: __Host-SID=32345
@@ -69,32 +69,32 @@
 Cookies set over HTTP can't override secure ones
 </name>
 <command>
--k https://%HOSTIP:%HTTPSPORT/15610001 -L -c log/jar1561.txt -H "Host: www.example.com"  http://%HOSTIP:%HTTPPORT/15610002 -L -c log/jar1561.txt -H "Host: www.example.com"
+-k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0001 -L -c log/jar%TESTNUMBER.txt -H "Host: www.example.com"  http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 -L -c log/jar%TESTNUMBER.txt -H "Host: www.example.com"
 </command>
 </client>
 <verify>
 <protocol>
-GET /15610001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: www.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /15610002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: www.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/jar1561.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .example.com	TRUE	/foo	FALSE	0	public	yes
 www.example.com	FALSE	/	TRUE	0	__Host-SID	12346
 .example.com	TRUE	/	TRUE	0	supersupersuper	secret
 .example.com	TRUE	/	TRUE	0	__Secure-SID	12346
-.example.com	TRUE	/1561/login/	TRUE	0	supersuper	secret
+.example.com	TRUE	/%TESTNUMBER/login/	TRUE	0	supersuper	secret
 #HttpOnly_.example.com	TRUE	/15	FALSE	0	super	secret
 </file>
 
diff --git a/tests/data/test1562 b/tests/data/test1562
index af29f54..b9755aa 100644
--- a/tests/data/test1562
+++ b/tests/data/test1562
@@ -13,7 +13,7 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Set-Cookie: foo=123; path=/; secure;
 Content-Length: 7
@@ -22,7 +22,7 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Set-Cookie: foo=; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/
 Content-Length: 7
@@ -44,23 +44,23 @@
 Expire secure cookies over HTTPS
 </name>
 <command>
--k https://%HOSTIP:%HTTPSPORT/15620001 -H "Host: www.example.com" https://%HOSTIP:%HTTPSPORT/15620002 -b "non-existing" https://%HOSTIP:%HTTPSPORT/15620001
+-k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0001 -H "Host: www.example.com" https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0002 -b "non-existing" https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0001
 </command>
 </client>
 <verify>
 <protocol>
-GET /15620001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: www.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /15620002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: www.example.com

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: foo=123

 

-GET /15620001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: www.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1563 b/tests/data/test1563
index 7d88ddc..6bf3ad9 100644
--- a/tests/data/test1563
+++ b/tests/data/test1563
@@ -11,7 +11,7 @@
 <reply>
 <data1>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 Location: gopher://www.example.co.uk
@@ -29,7 +29,7 @@
 Make sure redirects to CURLPROTO_GOPHER are forbidden by default
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/15630001 -L -H "Host: www.example.com"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -L -H "Host: www.example.com"
 </command>
 </client>
 <verify>
@@ -37,7 +37,7 @@
 1
 </errorcode>
 <protocol>
-GET /15630001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: www.example.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1564 b/tests/data/test1564
index 279665b..59cef71 100644
--- a/tests/data/test1564
+++ b/tests/data/test1564
@@ -12,11 +12,14 @@
 
 # Client-side
 <client>
+<features>
+wakeup
+</features>
 <server>
 none
 </server>
 <tool>
-lib1564
+lib%TESTNUMBER
 </tool>
 <name>
 wakeup before poll with no easy handles
diff --git a/tests/data/test1565 b/tests/data/test1565
index f554e0f..15374bf 100644
--- a/tests/data/test1565
+++ b/tests/data/test1565
@@ -21,11 +21,14 @@
 
 # Client-side
 <client>
+<features>
+wakeup
+</features>
 <server>
 http
 </server>
 <tool>
-lib1565
+lib%TESTNUMBER
 </tool>
 <name>
 wakeup from another thread
diff --git a/tests/data/test1566 b/tests/data/test1566
index 90cb40a..b954c2a 100644
--- a/tests/data/test1566
+++ b/tests/data/test1566
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 304 Not modified
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -32,12 +32,12 @@
 --etag-compare that gets a 304 back shouldn't overwrite the file
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/1566 -o log/output1566 --etag-compare log/etag1566
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/output%TESTNUMBER --etag-compare log/etag%TESTNUMBER
 </command>
-<file name="log/etag1566">
+<file name="log/etag%TESTNUMBER">
 "123456"
 </file>
-<file1 name="log/output1566">
+<file1 name="log/output%TESTNUMBER">
 downloaded already
 </file1>
 
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1566 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -56,7 +56,7 @@
 </protocol>
 
 # verify that the target file is untouched
-<file name="log/output1566">
+<file name="log/output%TESTNUMBER">
 downloaded already
 </file>
 </verify>
diff --git a/tests/data/test1567 b/tests/data/test1567
index ff779df..3e6ce88 100644
--- a/tests/data/test1567
+++ b/tests/data/test1567
@@ -13,7 +13,7 @@
 <data>
 HTTP/1.1 302 OK
 Content-Length: 6
-Location: /15670002
+Location: /%TESTNUMBER0002
 
 -foo-
 </data>
@@ -36,32 +36,32 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib1567
+lib%TESTNUMBER
 </tool>
 
  <name>
 re-run redirected transfer without setting CURLU URL again
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1567
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /1567 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /15670002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /1567 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /15670002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1568 b/tests/data/test1568
new file mode 100644
index 0000000..409f11f
--- /dev/null
+++ b/tests/data/test1568
@@ -0,0 +1,87 @@
+<testcase>
+# based on test 64
+
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 401 Authorization Required swsclose

+Server: Apache/1.3.27 (Darwin) PHP/4.1.2

+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"

+Content-Type: text/html; charset=iso-8859-1

+Content-Length: 26

+

+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets a
+# Authorization: Digest line passed-in from the client
+<data1000>
+HTTP/1.1 200 OK swsclose

+Server: Apache/1.3.27 (Darwin) PHP/4.1.2

+Content-Type: text/html; charset=iso-8859-1

+Content-Length: 23

+

+This IS the real page!
+</data1000>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsclose

+Server: Apache/1.3.27 (Darwin) PHP/4.1.2

+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"

+Content-Type: text/html; charset=iso-8859-1

+Content-Length: 26

+

+HTTP/1.1 200 OK swsclose

+Server: Apache/1.3.27 (Darwin) PHP/4.1.2

+Content-Type: text/html; charset=iso-8859-1

+Content-Length: 23

+

+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+<name>
+HTTP with Digest authorization on custom CURLOPT_PORT
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+<command>
+http://%HOSTIP/%TESTNUMBER %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: lib%TESTNUMBER

+Accept: */*

+

+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="9cbbd857a37e45f2bcad5c7d088191df"

+User-Agent: lib%TESTNUMBER

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1569 b/tests/data/test1569
new file mode 100644
index 0000000..3342f84
--- /dev/null
+++ b/tests/data/test1569
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+<servercmd>
+REPLY EPSV 500 no such command
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP first type=A then regular URL
+ </name>
+<tool>
+lib%TESTNUMBER
+</tool>
+<command>
+"ftp://%HOSTIP:%FTPPORT/%TESTNUMBER;type=A" ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous

+PASS ftp@example.com

+PWD

+EPSV

+PASV

+TYPE A

+RETR %TESTNUMBER

+PASV

+TYPE I

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

+QUIT

+</protocol>
+</verify>
+<stdout>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</stdout>
+
+</testcase>
diff --git a/tests/data/test157 b/tests/data/test157
index fee7a6a..63e611c 100644
--- a/tests/data/test157
+++ b/tests/data/test157
@@ -28,14 +28,14 @@
 HTTP GET with --anyauth (when the server requires none)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/157 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /157 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1570 b/tests/data/test1570
new file mode 100644
index 0000000..40c87ef
--- /dev/null
+++ b/tests/data/test1570
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+<servercmd>
+REPLY EPSV 500 no such command
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP first type=D then regular URL
+ </name>
+<tool>
+lib1569
+</tool>
+<command>
+"ftp://%HOSTIP:%FTPPORT/%TESTNUMBER;type=D" ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous

+PASS ftp@example.com

+PWD

+EPSV

+PASV

+TYPE A

+NLST

+PASV

+TYPE I

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

+QUIT

+</protocol>
+</verify>
+<stdout>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</stdout>
+
+</testcase>
diff --git a/tests/data/test158 b/tests/data/test158
index 238399a..2fbaf65 100644
--- a/tests/data/test158
+++ b/tests/data/test158
@@ -24,7 +24,7 @@
 HTTP multipart formpost with only a 100 reply
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/158 -F name=daniel
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F name=daniel
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 ^-----------------------.*
 </strip>
 <protocol>
-POST /158 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test159 b/tests/data/test159
index bb94583..05968eb 100644
--- a/tests/data/test159
+++ b/tests/data/test159
@@ -60,7 +60,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -0
 </command>
 <precheck>
 chkhostname curlhost
@@ -70,7 +70,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /159 HTTP/1.0

+GET /%TESTNUMBER HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1590 b/tests/data/test1590
index b605022..bfaa754 100644
--- a/tests/data/test1590
+++ b/tests/data/test1590
@@ -41,7 +41,7 @@
 
 # it is important this uses a host name that resolves successfully
 <command>
-imap://localhost:%IMAPPORT/1590
+imap://localhost:%IMAPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1591 b/tests/data/test1591
index ce0c268..4bc02dd 100644
--- a/tests/data/test1591
+++ b/tests/data/test1591
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 </data>
 </reply>
@@ -28,10 +28,10 @@
 HTTP PUT with trailers at the end
 </name>
 <tool>
-lib1591
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/bzz/1591
+http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER
 </command>
 <stdin>
 more than one byte
@@ -41,14 +41,18 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /bzz/1591 HTTP/1.1

+PUT /bzz/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

 Trailer: my-super-awesome-trailer, my-other-awesome-trailer

 Expect: 100-continue

 

+%if hyper
+E

+%else
 e

+%endif
 Hello Cloud!

 

 0

diff --git a/tests/data/test1592 b/tests/data/test1592
index d1346e1..a2c0f1c 100644
--- a/tests/data/test1592
+++ b/tests/data/test1592
@@ -14,14 +14,14 @@
 none
 </server>
 <tool>
-lib1592
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP request, remove handle while resolving, don't block
  </name>
 
  <command>
-http://a-site-never-accessed.example.org/1592
+http://a-site-never-accessed.example.org/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1593 b/tests/data/test1593
index 6719a32..60d9f0b 100644
--- a/tests/data/test1593
+++ b/tests/data/test1593
@@ -27,17 +27,17 @@
 HTTP custom header overrides CURLOPT_TIMECONDITION
 </name>
 <tool>
-lib1593
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/1593
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 # Note here the lack of If-Modified-Since
 <protocol>
-GET /1593 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1594 b/tests/data/test1594
index f29fdd6..a93f89d 100644
--- a/tests/data/test1594
+++ b/tests/data/test1594
@@ -28,22 +28,22 @@
 HTTP Retry-After header parsing and extraction
 </name>
 <tool>
-lib1594
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/1594
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /1594 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

 </protocol>
 <stdout>
-Retry-After: 22
+Retry-After 22
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1595 b/tests/data/test1595
index 0216788..4dade7c 100644
--- a/tests/data/test1595
+++ b/tests/data/test1595
@@ -30,19 +30,19 @@
 lib1594
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/1595
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /1595 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

 </protocol>
 <stdout>
-Retry-After: 0
+Retry-After 0
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1596 b/tests/data/test1596
index 62ceab4..f05f0ec 100644
--- a/tests/data/test1596
+++ b/tests/data/test1596
@@ -28,22 +28,22 @@
 HTTP Retry-After header parsing using a date
 </name>
 <tool>
-lib1596
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/1596
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /1596 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

 </protocol>
 <stdout>
-Retry-After: 172066
+Retry-After 172066
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test16 b/tests/data/test16
index f8510ad..240fd37 100644
--- a/tests/data/test16
+++ b/tests/data/test16
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -31,7 +31,7 @@
 HTTP with proxy authorization
  </name>
  <command>
- -U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x %HOSTIP:%HTTPPORT http://we.want.that.site.com/16
+ -U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x %HOSTIP:%HTTPPORT http://we.want.that.site.com/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com/16 HTTP/1.1

+GET http://we.want.that.site.com/%TESTNUMBER HTTP/1.1

 Host: we.want.that.site.com

 Proxy-Authorization: Basic ZmFrZUB1c2VyOmxvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29uZw==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test160 b/tests/data/test160
index 4b1c5ed..778787e 100644
--- a/tests/data/test160
+++ b/tests/data/test160
@@ -10,14 +10,14 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 9

 

 surprise
 </data>
 <data1>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 surprise2
@@ -37,7 +37,7 @@
 HTTP with delayed close, conn reuse, connection reset and retry
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/160 http://%HOSTIP:%HTTPPORT/wantmore/1600001
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/wantmore/%TESTNUMBER0001
 </command>
 </client>
 
@@ -45,24 +45,24 @@
 <verify>
 <stdout>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 9

 

 surprise
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 surprise2
 </stdout>
 
 <protocol>
-GET /want/160 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /wantmore/1600001 HTTP/1.1

+GET /wantmore/%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test161 b/tests/data/test161
index 91a3388..53508e4 100644
--- a/tests/data/test161
+++ b/tests/data/test161
@@ -25,7 +25,7 @@
 FTP RETR PASV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/161
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 161

-RETR 161

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 </protocol>
 # CURLE_PARTIAL_FILE = 18
 <errorcode>
diff --git a/tests/data/test1613 b/tests/data/test1613
new file mode 100644
index 0000000..040fae3
--- /dev/null
+++ b/tests/data/test1613
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+--request-target
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK

+Date: Sat, 29 Feb 2020 16:10:44 GMT

+Server: Blafasel/1.1

+Last-Modified: Sat, 29 Feb 2020 16:10:44 GMT

+Content-Length: 0

+Connection: close

+Content-Type: text/html

+

+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Send "OPTIONS *" with --request-target to a proxy
+</name>
+<features>
+proxy
+</features>
+<command>
+--request-target '*' -X OPTIONS --proxy http://%HOSTIP:%HTTPPORT/ -H "Testno: %TESTNUMBER" http://www.example.org/
+</command>
+</client>
+
+<verify>
+<protocol>
+OPTIONS * HTTP/1.1

+Host: www.example.org

+User-Agent: curl/%VERSION

+Accept: */*

+Proxy-Connection: Keep-Alive

+Testno: %TESTNUMBER

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test162 b/tests/data/test162
index d154745..3fa291d 100644
--- a/tests/data/test162
+++ b/tests/data/test162
@@ -38,14 +38,14 @@
 HTTP GET asking for --proxy-ntlm when some other authentication is required
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/162 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --fail
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --fail
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/162 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test163 b/tests/data/test163
index e4f7206..344f104 100644
--- a/tests/data/test163
+++ b/tests/data/test163
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 10
 
@@ -27,10 +27,10 @@
 HTTP multipart formpost with contents from a file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/163 -F "name=<log/field163" -F tool=curl
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=<log/field%TESTNUMBER" -F tool=curl
 </command>
 # We create this file before the command is invoked!
-<file name="log/field163">
+<file name="log/field%TESTNUMBER">
 contents
 from
 a
@@ -49,7 +49,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/163 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1630 b/tests/data/test1630
index 7bf4066..4a983a9 100644
--- a/tests/data/test1630
+++ b/tests/data/test1630
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -32,7 +32,7 @@
 HTTPS-proxy with Basic auth to HTTP without auth
  </name>
  <command>
- -U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x https://%HOSTIP:%HTTPSPROXYPORT http://we.want.that.site.com/1630 --proxy-insecure
+ -U fake@user:loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x https://%HOSTIP:%HTTPSPROXYPORT http://we.want.that.site.com/%TESTNUMBER --proxy-insecure
 </command>
 <features>
 proxy
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-GET http://we.want.that.site.com/1630 HTTP/1.1

+GET http://we.want.that.site.com/%TESTNUMBER HTTP/1.1

 Host: we.want.that.site.com

 Proxy-Authorization: Basic ZmFrZUB1c2VyOmxvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29uZw==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1631 b/tests/data/test1631
index be4a24a..4c05987 100644
--- a/tests/data/test1631
+++ b/tests/data/test1631
@@ -12,7 +12,7 @@
 # This is the HTTPS proxy response
 <connect>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -43,7 +43,7 @@
 FTP through HTTPS-proxy
  </name>
  <command>
--p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/1631 --proxy-insecure
+-p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER --proxy-insecure
 </command>
 <features>
 http
@@ -78,8 +78,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 1631

-RETR 1631

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1632 b/tests/data/test1632
index 296137b..eceb6c5 100644
--- a/tests/data/test1632
+++ b/tests/data/test1632
@@ -12,7 +12,7 @@
 # This is the HTTPS proxy response
 <connect>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -22,7 +22,7 @@
 
 # This is the FTP server response. The Life and Adventures of Robinson Crusoe
 <data>
-I was born in the year 1632, in the city of York, of a good family, though not
+I was born in the year %TESTNUMBER, in the city of York, of a good family, though not
 of that country, myfather being a foreigner of Bremen, who settled first at
 Hull.  He got a good estate by merchandise,and leaving off his trade, lived
 afterwards at York, from whence he had married my mother, whoserelations were
@@ -52,7 +52,7 @@
 FTP through HTTPS-proxy, with connection re-use
  </name>
  <command>
--p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/1632 --proxy-insecure ftp://ftp.site.thru.https.proxy:%FTPPORT/16320002
+-p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER --proxy-insecure ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER0002
 </command>
 <features>
 http
@@ -93,11 +93,11 @@
 PWD

 EPSV

 TYPE I

-SIZE 1632

-RETR 1632

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 16320002

-RETR 16320002

+SIZE %TESTNUMBER0002

+RETR %TESTNUMBER0002

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1633 b/tests/data/test1633
index 6b6e1eb..5cf89c2 100644
--- a/tests/data/test1633
+++ b/tests/data/test1633
@@ -14,7 +14,7 @@
 Accept-Ranges: bytes
 Content-Length: 0
 Connection: close
-Location: /16330002
+Location: /%TESTNUMBER0002
 
 </data>
 <data2>
@@ -30,7 +30,7 @@
 Accept-Ranges: bytes
 Content-Length: 0
 Connection: close
-Location: /16330002
+Location: /%TESTNUMBER0002
 
 HTTP/1.1 429 too many requests
 Retry-After: 1
@@ -41,7 +41,7 @@
 Accept-Ranges: bytes
 Content-Length: 0
 Connection: close
-Location: /16330002
+Location: /%TESTNUMBER0002
 
 HTTP/1.1 429 too many requests
 Retry-After: 1
@@ -57,11 +57,11 @@
 <server>
 http
 </server>
- <name>
-HTTP GET
- </name>
- <command>
-http://%HOSTIP:%HTTPPORT/1633 -d moo --retry 1 -L
+<name>
+--retry with a 429 response and Retry-After:
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -d moo --retry 1 -L
 </command>
 </client>
 
@@ -69,26 +69,26 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /1633 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooGET /16330002 HTTP/1.1

+mooGET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-POST /1633 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 3

 Content-Type: application/x-www-form-urlencoded

 

-mooGET /16330002 HTTP/1.1

+mooGET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1634 b/tests/data/test1634
new file mode 100644
index 0000000..f8b1b7b
--- /dev/null
+++ b/tests/data/test1634
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 429 too many requests swsbounce
+Retry-After: 1
+Content-Length: 4
+
+moo
+</data>
+<data1>
+HTTP/1.1 200 OK
+Content-Length: 4
+Connection: close
+
+hey
+</data1>
+
+<datacheck>
+HTTP/1.1 429 too many requests swsbounce
+Retry-After: 1
+Content-Length: 4
+
+HTTP/1.1 200 OK
+Content-Length: 4
+Connection: close
+
+hey
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+--retry with a 429 response and Retry-After: and --fail
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1  --fail
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test164 b/tests/data/test164
index 97e2c5e..09310a0 100644
--- a/tests/data/test164
+++ b/tests/data/test164
@@ -48,14 +48,14 @@
 HTTP range with multiple ranges
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/164 -r 0-10,12-15
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -r 0-10,12-15
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/164 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=0-10,12-15

 User-Agent: curl/%VERSION

diff --git a/tests/data/test165 b/tests/data/test165
index 3553942..dfd2131 100644
--- a/tests/data/test165
+++ b/tests/data/test165
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Content-Type: text/html

 Funny-head: yesyes

@@ -42,7 +42,7 @@
 HTTP over proxy with IDN host name
  </name>
  <command>
-http://www.åäö.se/page/165 -x %HOSTIP:%HTTPPORT http://www.große.de/page/165
+http://www.åäö.se/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT http://www.große.de/page/%TESTNUMBER
 </command>
 </client>
 
@@ -50,13 +50,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://www.xn--4cab6c.se/page/165 HTTP/1.1

+GET http://www.xn--4cab6c.se/page/%TESTNUMBER HTTP/1.1

 Host: www.xn--4cab6c.se

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://www.xn--groe-xna.de/page/165 HTTP/1.1

+GET http://www.xn--groe-xna.de/page/%TESTNUMBER HTTP/1.1

 Host: www.xn--groe-xna.de

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1653 b/tests/data/test1653
index 59ec3f3..fff7f6e 100644
--- a/tests/data/test1653
+++ b/tests/data/test1653
@@ -14,7 +14,7 @@
 unittest
 </features>
 <name>
-urlapi
+urlapi port number parsing
 </name>
 </client>
 </testcase>
diff --git a/tests/data/test1654 b/tests/data/test1654
index 6155635..ef66574 100644
--- a/tests/data/test1654
+++ b/tests/data/test1654
@@ -24,9 +24,9 @@
 alt-svc
 </name>
 <command>
-log/1654
+log/%TESTNUMBER
 </command>
-<file name="log/1654" mode="text">
+<file name="log/%TESTNUMBER" mode="text">
 h2 example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 1
 # a comment
 h2 foo.example.com 443 h3 shiny.example.com 8443 "20291231 23:30:00" 0 1
@@ -38,8 +38,8 @@
 </file>
 </client>
 <verify>
-<file name="log/1654-out" mode="text">
-# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html
+<file name="log/%TESTNUMBER-out" mode="text">
+# Your alt-svc cache. https://curl.se/docs/alt-svc.html
 # This file was generated by libcurl! Edit at your own risk.
 h2 example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 1
 h2 foo.example.com 443 h3 shiny.example.com 8443 "20291231 23:30:00" 0 1
diff --git a/tests/data/test166 b/tests/data/test166
index 697a245..3ee1d69 100644
--- a/tests/data/test166
+++ b/tests/data/test166
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 10
 
@@ -27,10 +27,10 @@
 HTTP formpost a file with spaces in name
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/166 -F "name=@log/fie ld 166"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=@log/fie ld %TESTNUMBER"
 </command>
 # We create this file before the command is invoked!
-<file name="log/fie ld 166">
+<file name="log/fie ld %TESTNUMBER">
 data inside the file
 </file>
 </client>
@@ -41,7 +41,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/166 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -49,7 +49,7 @@
 Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991

 

 ------------------------------b0b3d6d23991

-Content-Disposition: form-data; name="name"; filename="fie ld 166"

+Content-Disposition: form-data; name="name"; filename="fie ld %TESTNUMBER"

 Content-Type: application/octet-stream

 

 data inside the file
diff --git a/tests/data/test1660 b/tests/data/test1660
new file mode 100644
index 0000000..3ddd8d4
--- /dev/null
+++ b/tests/data/test1660
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+unittest
+HSTS
+</keywords>
+</info>
+
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+HSTS
+</features>
+
+<file name="log/input%TESTNUMBER">
+# Your HSTS cache. https://curl.se/docs/hsts.html
+# This file was generated by libcurl! Edit at your own risk.
+.readfrom.example "20211001 04:47:41"
+.old.example "20161001 04:47:41"
+</file>
+
+# This date is exactly "20190124 22:34:21" UTC
+<setenv>
+CURL_TIME=1548369261
+</setenv>
+<name>
+HSTS
+</name>
+<command>
+-
+</command>
+</client>
+
+<verify>
+<stdout>
+readfrom.example [readfrom.example]: 1633063661 includeSubDomains
+'old.example' is not HSTS
+'readfrom.example' is not HSTS
+example.com [example.com]: 1579905261
+example.com [example.com]: 1569905261
+example.com [example.com]: 1569905261
+example.com [example.com]: 1569905261 includeSubDomains
+example.org [example.org]: 1579905261
+Input 8: error 43
+Input 9: error 43
+this.example [this.example]: 1548400797
+'this.example' is not HSTS
+Input 12: error 43
+Input 13: error 43
+Input 14: error 43
+3.example.com [example.com]: 1569905261 includeSubDomains
+3.example.com [example.com]: 1569905261 includeSubDomains
+foo.example.com [example.com]: 1569905261 includeSubDomains
+'foo.xample.com' is not HSTS
+'forexample.net' is not HSTS
+'forexample.net' is not HSTS
+'example.net' is not HSTS
+expire.example [expire.example]: 1548369268
+Number of entries: 3
+expire.example [expire.example]: 1548369268
+expire.example [expire.example]: 1548369268
+expire.example [expire.example]: 1548369268
+expire.example [expire.example]: 1548369268
+expire.example [expire.example]: 1548369268
+expire.example [expire.example]: 1548369268
+expire.example [expire.example]: 1548369268
+'expire.example' is not HSTS
+'expire.example' is not HSTS
+'expire.example' is not HSTS
+</stdout>
+<file name="log/hsts%TESTNUMBER" mode="text">
+# Your HSTS cache. https://curl.se/docs/hsts.html
+# This file was generated by libcurl! Edit at your own risk.
+.example.com "20191001 04:47:41"
+example.org "20200124 22:34:21"
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1661 b/tests/data/test1661
new file mode 100644
index 0000000..0e02d78
--- /dev/null
+++ b/tests/data/test1661
@@ -0,0 +1,22 @@
+<testcase>
+<info>
+<keywords>
+unittest
+bufref
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+bufref unit tests
+ </name>
+</client>
+</testcase>
diff --git a/tests/data/test167 b/tests/data/test167
index 5067e77..832cc35 100644
--- a/tests/data/test167
+++ b/tests/data/test167
@@ -51,24 +51,24 @@
 HTTP with proxy-requiring-Basic to site-requiring-Digest
  </name>
  <command>
-http://data.from.server.requiring.digest.hohoho.com/167 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot
+http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

 Proxy-Authorization: Basic Zm9vOmJhcg==

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

 Proxy-Authorization: Basic Zm9vOmJhcg==

-Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/167", response="13c7c02a252cbe1c46d8669898a3be26"

+Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="13c7c02a252cbe1c46d8669898a3be26"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test168 b/tests/data/test168
index ddad8bb..d552a71 100644
--- a/tests/data/test168
+++ b/tests/data/test168
@@ -65,30 +65,30 @@
 HTTP with proxy-requiring-Digest to site-requiring-Digest
  </name>
  <command>
-http://data.from.server.requiring.digest.hohoho.com/168 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-digest --digest --user digest:alot
+http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-digest --digest --user digest:alot
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

-Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"

+Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="fb8608e00ad9239a3dedb14bc8575976"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

-Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"

-Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/168", response="ca87f2d768a231e2d637a55698d5c416"

+Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="fb8608e00ad9239a3dedb14bc8575976"

+Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="ca87f2d768a231e2d637a55698d5c416"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test169 b/tests/data/test169
index 6d30b2a..a5e5ba5 100644
--- a/tests/data/test169
+++ b/tests/data/test169
@@ -92,7 +92,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
+http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
 </command>
 <precheck>
 chkhostname curlhost
@@ -102,23 +102,23 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

-Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"

+Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/%TESTNUMBER", response="95d48591985a03c4b49cb962aa7bd3e6"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test17 b/tests/data/test17
index de03c1d..8e5bf82 100644
--- a/tests/data/test17
+++ b/tests/data/test17
@@ -11,7 +11,7 @@
 <data>
 HTTP/1.1 200 OK
 Funny-head: yesyes
-Content-Length: 27

+Content-Length: 27
 
 This is the proof it works
 </data>
@@ -37,14 +37,14 @@
 --max-time 180
  </stdin>
  <command>
--K - %HOSTIP:%HTTPPORT/that.site.com/17
+-K - %HOSTIP:%HTTPPORT/that.site.com/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-MOOO /that.site.com/17 HTTP/1.1

+MOOO /that.site.com/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: agent007 license to drill	

 Accept: */*

diff --git a/tests/data/test170 b/tests/data/test170
index 58c2a3f..28874a9 100644
--- a/tests/data/test170
+++ b/tests/data/test170
@@ -27,14 +27,14 @@
 HTTP POST with --proxy-ntlm and no SSL with no response
  </name>
  <command>
-http://a.galaxy.far.far.away/170 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -F "dummy=value"
+http://a.galaxy.far.far.away/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -F "dummy=value"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST http://a.galaxy.far.far.away/170 HTTP/1.1

+POST http://a.galaxy.far.far.away/%TESTNUMBER HTTP/1.1

 Host: a.galaxy.far.far.away

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test1700 b/tests/data/test1700
index ff1e272..9cf8739 100644
--- a/tests/data/test1700
+++ b/tests/data/test1700
Binary files differ
diff --git a/tests/data/test1701 b/tests/data/test1701
index d898617..c4687d9 100644
--- a/tests/data/test1701
+++ b/tests/data/test1701
Binary files differ
diff --git a/tests/data/test1702 b/tests/data/test1702
index 1575767..b679c7b 100644
--- a/tests/data/test1702
+++ b/tests/data/test1702
Binary files differ
diff --git a/tests/data/test1703 b/tests/data/test1703
new file mode 100644
index 0000000..a6a4d9f
--- /dev/null
+++ b/tests/data/test1703
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
+<reply>
+<data>
+foo
+   bar
+bar
+   foo
+moo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+<features>
+Unicode
+win32
+</features>
+<name>
+basic file:// file with UTF-8 characters
+</name>
+<command option="no-include">
+file://localhost%FILE_PWD/log/%E3%83%86%E3%82%B9%E3%83%88%TESTNUMBER.txt
+</command>
+<file name="log/テスト%TESTNUMBER.txt">
+foo
+   bar
+bar
+   foo
+moo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test171 b/tests/data/test171
index d6a8230..c4f5b6c 100644
--- a/tests/data/test171
+++ b/tests/data/test171
@@ -31,7 +31,7 @@
 HTTP, get cookie with dot prefixed full domain
  </name>
  <command>
--c log/jar171 -x %HOSTIP:%HTTPPORT http://z.x.com/171
+-c log/jar%TESTNUMBER -x %HOSTIP:%HTTPPORT http://z.x.com/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -41,16 +41,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://z.x.com/171 HTTP/1.1

+GET http://z.x.com/%TESTNUMBER HTTP/1.1

 Host: z.x.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

 </protocol>
-<file name="log/jar171" mode="text">
+<file name="log/jar%TESTNUMBER" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .z.x.com	TRUE	/	FALSE	0	XToken	xt
diff --git a/tests/data/test172 b/tests/data/test172
index dda8a38..9dbe64c 100644
--- a/tests/data/test172
+++ b/tests/data/test172
@@ -27,11 +27,11 @@
 HTTP with cookies file and custom added cookie
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/172 -b log/jar172.txt -b "tool=curl; name=fool"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b log/jar%TESTNUMBER.txt -b "tool=curl; name=fool"
 </command>
-<file name="log/jar172.txt">
+<file name="log/jar%TESTNUMBER.txt">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .%HOSTIP	TRUE	/silly/	FALSE	0	ismatch	this
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/172 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test173 b/tests/data/test173
index 1484cbe..0968616 100644
--- a/tests/data/test173
+++ b/tests/data/test173
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 11
 
@@ -28,7 +28,7 @@
 HTTP RFC1867-formpost a file from stdin with "faked" filename
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/173 -F field1=contents1 -F "fileupload=@-;filename=/dev/null;type=text/x-null;format=x-curl"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F field1=contents1 -F "fileupload=@-;filename=/dev/null;type=text/x-null;format=x-curl"
 </command>
 
 <stdin>
@@ -49,7 +49,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/173 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test174 b/tests/data/test174
index e5a9d6f..d8090c5 100644
--- a/tests/data/test174
+++ b/tests/data/test174
@@ -29,14 +29,14 @@
 HTTP POST --anyauth to server not requiring any auth at all
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/174 -u testuser:testpass --anyauth -d "junkelijunk"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth -d "junkelijunk"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /174 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test175 b/tests/data/test175
index 8b49a32..5385434 100644
--- a/tests/data/test175
+++ b/tests/data/test175
@@ -56,21 +56,21 @@
 HTTP POST --digest to server not requiring any auth at all
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/175 -u auser:apasswd --digest -d "junkelijunk"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -d "junkelijunk"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /175 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /175 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test176 b/tests/data/test176
index 5fe310f..07ace47 100644
--- a/tests/data/test176
+++ b/tests/data/test176
@@ -58,14 +58,14 @@
 HTTP POST --ntlm to server not requiring any auth at all
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/176 -u auser:apasswd --ntlm -d "junkelijunk"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --ntlm -d "junkelijunk"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /176 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

@@ -73,7 +73,7 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /176 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test177 b/tests/data/test177
index e31f1b7..c190f05 100644
--- a/tests/data/test177
+++ b/tests/data/test177
@@ -13,7 +13,7 @@
 <data>
 HTTP/1.1 302 *MOVED* swsclose swsbounce

 Server: Microsoft-IIS/6.0

-Location: /mooooo/177

+Location: /mooooo/%TESTNUMBER

 Content-Type: text/html; charset=iso-8859-1

 

 </data>
@@ -32,14 +32,14 @@
 HTTP POST --digest to server doing a 302-location response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/177 -u auser:apasswd --digest -d "junkelijunk"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -d "junkelijunk"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /177 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test178 b/tests/data/test178
index b67e353..ca59e9d 100644
--- a/tests/data/test178
+++ b/tests/data/test178
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: -6
 Content-Type: text/html
 Funny-head: yesyes
@@ -19,8 +19,11 @@
 moooooooooooo
 </data>
 <datacheck>
+%if hyper
+%else
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+%endif
 </datacheck>
 </reply>
 
@@ -34,7 +37,7 @@
 HTTP response with negative Content-Length
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/178
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -42,14 +45,21 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /178 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
+
+# Hyper curl returns unsupported protocol
+# bullt-in curl returns weird_server_reply
 <errorcode>
+%if hyper
+1
+%else
 8
+%endif
 </errorcode>
 </verify>
 </testcase>
diff --git a/tests/data/test179 b/tests/data/test179
index 9f7bded..b5aaec2 100644
--- a/tests/data/test179
+++ b/tests/data/test179
@@ -16,7 +16,7 @@
 Date: Tue, 25 Sep 2001 19:37:44 GMT
 Content-Type: text/html
 Connection: close
-Content-Length: 21

+Content-Length: 21
 
 This server says moo
 </data>
@@ -31,9 +31,9 @@
 HTTP using proxy and cookies with path checks
  </name>
  <command>
-http://supertrooper.fake/c/179 -b log/injar179 -x %HOSTIP:%HTTPPORT
+http://supertrooper.fake/c/%TESTNUMBER -b log/injar%TESTNUMBER -x %HOSTIP:%HTTPPORT
 </command>
-<file name="log/injar179">
+<file name="log/injar%TESTNUMBER">
 supertrooper.fake	FALSE	/a	FALSE	2139150993	mooo	indeed
 supertrooper.fake	FALSE	/b	FALSE	0		moo1	indeed
 supertrooper.fake	FALSE	/c	FALSE	2139150993	moo2	indeed
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://supertrooper.fake/c/179 HTTP/1.1

+GET http://supertrooper.fake/c/%TESTNUMBER HTTP/1.1

 Host: supertrooper.fake

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test18 b/tests/data/test18
index 0fe92f7..11b953e 100644
--- a/tests/data/test18
+++ b/tests/data/test18
@@ -41,43 +41,43 @@
 multiple requests using {} in URL
  </name>
  <command>
-"%HOSTIP:%HTTPPORT/{18,180002,180003}"
+"%HOSTIP:%HTTPPORT/{%TESTNUMBER,%TESTNUMBER0002,%TESTNUMBER0003}"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /18 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /180002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /180003 HTTP/1.1

+GET /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 <stdout>
---_curl_--%HOSTIP:%HTTPPORT/18
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 4

 

 moo
---_curl_--%HOSTIP:%HTTPPORT/180002
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0002
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 4

 

 foo
---_curl_--%HOSTIP:%HTTPPORT/180003
+--_curl_--%HOSTIP:%HTTPPORT/%TESTNUMBER0003
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 4

diff --git a/tests/data/test180 b/tests/data/test180
index 1074e26..32ecd00 100644
--- a/tests/data/test180
+++ b/tests/data/test180
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -27,9 +27,9 @@
 HTTP 1.0 PUT
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/180 -T log/test180.txt --http1.0
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt --http1.0
 </command>
-<file name="log/test180.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /we/want/180 HTTP/1.0

+PUT /we/want/%TESTNUMBER HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1800 b/tests/data/test1800
index 89f4292..85e247c 100644
--- a/tests/data/test1800
+++ b/tests/data/test1800
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 Ignored!
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 Content-Length: 6
@@ -33,14 +33,14 @@
 HTTP/2 upgrade refused
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1800 --http2
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http2
 </command>
 
 </client>
 
 <verify>
 <protocol>
-GET /1800 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test1801 b/tests/data/test1801
index 15367d2..9494e92 100644
--- a/tests/data/test1801
+++ b/tests/data/test1801
@@ -12,7 +12,7 @@
 HTTP/1.1 101 Switching!
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 Content-Length: 6
@@ -43,14 +43,14 @@
 HTTP/2 upgrade with lying server
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/1801 --http2
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http2
 </command>
 
 </client>
 
 <verify>
 <protocol>
-GET /1801 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test181 b/tests/data/test181
index c2f8135..f496c29 100644
--- a/tests/data/test181
+++ b/tests/data/test181
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -27,9 +27,9 @@
 HTTP 1.0 POST
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/181 --data-binary @log/test181.txt --http1.0
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --data-binary @log/test%TESTNUMBER.txt --http1.0
 </command>
-<file name="log/test181.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /we/want/181 HTTP/1.0

+POST /we/want/%TESTNUMBER HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test182 b/tests/data/test182
index f640a0e..cb1e4f0 100644
--- a/tests/data/test182
+++ b/tests/data/test182
@@ -23,7 +23,7 @@
 FTP download an empty file
 </name>
 <command>
-ftp://%HOSTIP:%FTPPORT/182
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -35,8 +35,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 182

-RETR 182

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test183 b/tests/data/test183
index d72081c..77d9d04 100644
--- a/tests/data/test183
+++ b/tests/data/test183
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

 

 moo
@@ -28,7 +28,7 @@
 HTTP GET two URLs over a single proxy with persistent connection
  </name>
  <command>
-http://deathstar.another.galaxy/183 http://a.galaxy.far.far.away/183 --proxy http://%HOSTIP:%HTTPPORT
+http://deathstar.another.galaxy/%TESTNUMBER http://a.galaxy.far.far.away/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -38,13 +38,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://deathstar.another.galaxy/183 HTTP/1.1

+GET http://deathstar.another.galaxy/%TESTNUMBER HTTP/1.1

 Host: deathstar.another.galaxy

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://a.galaxy.far.far.away/183 HTTP/1.1

+GET http://a.galaxy.far.far.away/%TESTNUMBER HTTP/1.1

 Host: a.galaxy.far.far.away

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test184 b/tests/data/test184
index 1afb10d..9c795a2 100644
--- a/tests/data/test184
+++ b/tests/data/test184
@@ -12,27 +12,27 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsbounce

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

-Location: http://yet.another.host/184
+Location: http://yet.another.host/%TESTNUMBER
 

 moo
 </data>
 <data1>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

 

 moo
 </data1>
 <datacheck>
 HTTP/1.1 301 OK swsbounce

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

-Location: http://yet.another.host/184
+Location: http://yet.another.host/%TESTNUMBER
 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

 

 moo
@@ -48,7 +48,7 @@
 HTTP replace Host: when following Location: to new host
  </name>
  <command>
-http://deathstar.another.galaxy/184 -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
+http://deathstar.another.galaxy/%TESTNUMBER -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -58,13 +58,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://deathstar.another.galaxy/184 HTTP/1.1

+GET http://deathstar.another.galaxy/%TESTNUMBER HTTP/1.1

 Host: another.visitor.stay.a.while.stay.foreeeeeever

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://yet.another.host/184 HTTP/1.1

+GET http://yet.another.host/%TESTNUMBER HTTP/1.1

 Host: yet.another.host

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test185 b/tests/data/test185
index ba48fd8..d614c10 100644
--- a/tests/data/test185
+++ b/tests/data/test185
@@ -12,27 +12,27 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsbounce

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

-Location: go/west/185

+Location: go/west/%TESTNUMBER

 

 moo
 </data>
 <data1>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

 

 moo
 </data1>
 <datacheck>
 HTTP/1.1 301 OK swsbounce

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

-Location: go/west/185

+Location: go/west/%TESTNUMBER

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 4

 

 moo
@@ -48,7 +48,7 @@
 HTTP replace Host: when following Location: on the same host
  </name>
  <command>
-http://deathstar.another.galaxy/185 -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
+http://deathstar.another.galaxy/%TESTNUMBER -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -58,13 +58,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://deathstar.another.galaxy/185 HTTP/1.1

+GET http://deathstar.another.galaxy/%TESTNUMBER HTTP/1.1

 Host: another.visitor.stay.a.while.stay.foreeeeeever

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://deathstar.another.galaxy/go/west/185 HTTP/1.1

+GET http://deathstar.another.galaxy/go/west/%TESTNUMBER HTTP/1.1

 Host: another.visitor.stay.a.while.stay.foreeeeeever

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test186 b/tests/data/test186
index f5a75c6..35232b8 100644
--- a/tests/data/test186
+++ b/tests/data/test186
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 11
 
@@ -28,7 +28,7 @@
 HTTP RFC1867-type formposting with types on text fields
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/186 -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html;charset=verymoo"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html;charset=verymoo"
 </command>
 # We create this file before the command is invoked!
 </client>
@@ -39,7 +39,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/186 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test187 b/tests/data/test187
index a186541..2d5d0a8 100644
--- a/tests/data/test187
+++ b/tests/data/test187
@@ -11,9 +11,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: /root/1870002.txt?coolsite=yes
+Location: /root/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -21,7 +21,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -30,13 +30,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: /root/1870002.txt?coolsite=yes
+Location: /root/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -54,19 +54,19 @@
 HTTP redirect with bad host name separation and slash in parameters
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT?oh=what-weird=test/187 -L
+http://%HOSTIP:%HTTPPORT?oh=what-weird=test/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /?oh=what-weird=test/187 HTTP/1.1

+GET /?oh=what-weird=test/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /root/1870002.txt?coolsite=yes HTTP/1.1

+GET /root/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test188 b/tests/data/test188
index 14e95c8..8e8848e 100644
--- a/tests/data/test188
+++ b/tests/data/test188
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsbounce
-Location: /188
+Location: /%TESTNUMBER
 Content-Length: 3
 
 OK
@@ -29,7 +29,7 @@
 
 <datacheck>
 HTTP/1.1 301 OK swsbounce
-Location: /188
+Location: /%TESTNUMBER
 Content-Length: 3
 
 HTTP/1.1 200 OK 
@@ -51,20 +51,20 @@
 HTTP GET with resume and redirect
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/188 -C 50 -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 50 -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /188 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=50-

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /188 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=50-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test189 b/tests/data/test189
index 3435a52..e747d35 100644
--- a/tests/data/test189
+++ b/tests/data/test189
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 301 OK swsbounce
-Location: /189
+Location: /%TESTNUMBER
 Content-Length: 3
 
 OK
@@ -25,7 +25,7 @@
 
 <datacheck>
 HTTP/1.1 301 OK swsbounce
-Location: /189
+Location: /%TESTNUMBER
 Content-Length: 3
 
 HTTP/1.1 200 OK 
@@ -45,20 +45,20 @@
 HTTP GET with resume and redirect (to a page that doesn't resume)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/189 -C 50 -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 50 -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /189 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=50-

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /189 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=50-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test190 b/tests/data/test190
index 6f5d66a..3a20ba2 100644
--- a/tests/data/test190
+++ b/tests/data/test190
@@ -24,7 +24,7 @@
 FTP download with strict timeout and slow CWD
  </name>
  <command timeout="1">
-ftp://%HOSTIP:%FTPPORT/path/to/file/190 -m %FTPTIME2
+ftp://%HOSTIP:%FTPPORT/path/to/file/%TESTNUMBER -m %FTPTIME2
 </command>
 </client>
 
diff --git a/tests/data/test1904 b/tests/data/test1904
index f75e87d..5254c63 100644
--- a/tests/data/test1904
+++ b/tests/data/test1904
@@ -14,7 +14,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -30,7 +30,7 @@
 HTTP/1.1 204 Sure go ahead

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -51,7 +51,7 @@
 HTTP CONNECT with 204 response
  </name>
  <command>
-http://test.1904:%HTTPPORT/we/want/that/page/1904 -p --proxy %HOSTIP:%PROXYPORT
+http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p --proxy %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
@@ -62,15 +62,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT test.1904:%HTTPPORT HTTP/1.1

-Host: test.1904:%HTTPPORT

+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/1904 HTTP/1.1

-Host: test.1904:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test1905 b/tests/data/test1905
index 1fafddf..4d04f81 100644
--- a/tests/data/test1905
+++ b/tests/data/test1905
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -30,24 +30,24 @@
 CURLOPT_COOKIELIST set to "FLUSH" of a shared cookie object
  </name>
 <tool>
-lib1905
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/we/want/1905
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/1905 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

 </protocol>
-<file name="log/cookies1905" mode="text">
+<file name="log/cookies%TESTNUMBER" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 %HOSTIP	FALSE	/we/want/	FALSE	0	secondcookie	present
diff --git a/tests/data/test1906 b/tests/data/test1906
index 0c476a1..c43b0a9 100644
--- a/tests/data/test1906
+++ b/tests/data/test1906
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -27,20 +27,20 @@
 CURLOPT_CURLU and CURLOPT_PORT
  </name>
 <tool>
-lib1906
+lib%TESTNUMBER
 </tool>
 
 # The tool does two requesets, the first sets CURLOPT_PORT to 1
 # the second resets the port again and expects that request to work.
 <command>
-http://%HOSTIP:%HTTPPORT/1906
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1906 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test1907 b/tests/data/test1907
index 85cabde..8536add 100644
--- a/tests/data/test1907
+++ b/tests/data/test1907
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -27,24 +27,24 @@
 CURLINFO_EFFECTIVE_URL with non-scheme URL
  </name>
 <tool>
-lib1907
+lib%TESTNUMBER
 </tool>
 
 <command>
-%HOSTIP:%HTTPPORT/hello/../1907
+%HOSTIP:%HTTPPORT/hello/../%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1907 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

 </protocol>
 <stdout>
-Effective URL: http://%HOSTIP:%HTTPPORT/1907
+Effective URL: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test1908 b/tests/data/test1908
index b63e03ad..0ac0e86 100644
--- a/tests/data/test1908
+++ b/tests/data/test1908
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -47,22 +47,22 @@
 CURL_ALTSVC_HTTP="yeah"
 </setenv>
 <tool>
-lib1908
+lib%TESTNUMBER
 </tool>
 
 <command>
-%HOSTIP:%HTTPPORT/1908
+%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1908 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /1908 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

@@ -72,8 +72,8 @@
 # matches
 s/\"([^\"]*)\"/TIMESTAMP/
 </stripfile>
-<file name="log/altsvc-1908" mode="text">
-# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html
+<file name="log/altsvc-%TESTNUMBER" mode="text">
+# Your alt-svc cache. https://curl.se/docs/alt-svc.html
 # This file was generated by libcurl! Edit at your own risk.
 h1 127.0.0.1 %HTTPPORT h2 3dbbdetxoyw4nsp6c3cc456oj2ays6s43ezxzsfxxri3h5xqd.example 443 TIMESTAMP 1 0
 </file>
diff --git a/tests/data/test1909 b/tests/data/test1909
index ba08252..64e7b05 100644
--- a/tests/data/test1909
+++ b/tests/data/test1909
@@ -36,7 +36,7 @@
 HTTP GET --retry-all-errors to overcome partial transfer
  </name>
  <command option="no-output,no-include">
---retry 1 --retry-all-errors -o log/outfile1909 http://%HOSTIP:%HTTPPORT/1909
+--retry 1 --retry-all-errors -o log/outfile%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,19 +44,19 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1909 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /1909 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 
-<file1 name="log/outfile1909">
+<file1 name="log/outfile%TESTNUMBER">
 data
 </file1>
 
diff --git a/tests/data/test191 b/tests/data/test191
index 86fa29f..1fde768 100644
--- a/tests/data/test191
+++ b/tests/data/test191
@@ -21,7 +21,7 @@
 FTP URL with ?-letters in username and password 
  </name>
  <command>
-"ftp://use%3fr:pass%3fword@%HOSTIP:%FTPPORT/191"
+"ftp://use%3fr:pass%3fword@%HOSTIP:%FTPPORT/%TESTNUMBER"
 </command>
 </client>
 
@@ -33,8 +33,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 191

-RETR 191

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test1910 b/tests/data/test1910
index cd44c02..67dfff9 100644
--- a/tests/data/test1910
+++ b/tests/data/test1910
@@ -11,16 +11,16 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 0
-Location: /19100002
+Location: /%TESTNUMBER0002
 
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 4
@@ -39,23 +39,23 @@
 HTTP credentials with newline and redirect
 </name>
 <tool>
-lib1910
+lib%TESTNUMBER
 </tool>
 
 <command>
-%HOSTIP:%HTTPPORT/1910
+%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /1910 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcgpuYW1lOnBhc3MKd29yZA==

 Accept: */*

 

-GET /19100002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dXNlcgpuYW1lOnBhc3MKd29yZA==

 Accept: */*

diff --git a/tests/data/test1911 b/tests/data/test1911
index ec5f531..07e87a6 100644
--- a/tests/data/test1911
+++ b/tests/data/test1911
@@ -18,7 +18,7 @@
 verify that curl_easy_setopt() rejects too long string inputs
 </name>
 <tool>
-lib1911
+lib%TESTNUMBER
 </tool>
 
 </client>
diff --git a/tests/data/test1912 b/tests/data/test1912
index ed6b27b..85dca0d 100644
--- a/tests/data/test1912
+++ b/tests/data/test1912
@@ -19,7 +19,7 @@
 Cross validate that gcc-typecheck macros match the option types.
 </name>
 <tool>
-lib1912
+lib%TESTNUMBER
 </tool>
 
 </client>
diff --git a/tests/data/test1913 b/tests/data/test1913
index daf7490..b9ac2cb 100644
--- a/tests/data/test1913
+++ b/tests/data/test1913
@@ -24,11 +24,11 @@
 FTP with NOBODY set, getting a missing file
 </name>
 <tool>
-lib1913
+lib%TESTNUMBER
 </tool>
 
 <command>
-ftp://%HOSTIP:%FTPPORT/not-there/1913
+ftp://%HOSTIP:%FTPPORT/not-there/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test1915 b/tests/data/test1915
new file mode 100644
index 0000000..c47840a
--- /dev/null
+++ b/tests/data/test1915
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HSTS
+CURLOPT_HSTSREADFUNCTION
+</keywords>
+</info>
+
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<features>
+HSTS
+http
+</features>
+<server>
+none
+</server>
+
+# require debug so that alt-svc can work over plain old HTTP
+<name>
+HSTS read/write callbacks
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<command>
+http://%HOSTIP:%NOLISTENPORT/not-there/%TESTNUMBER
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# it fails because there's nothing on that port
+<errorcode>
+7
+</errorcode>
+<stdout>
+[0/4] 1.example.com 20300320 01:02:03
+[1/4] 2.example.com 20300320 01:02:03
+[2/4] 3.example.com 20300320 01:02:03
+[3/4] 4.example.com 20300320 01:02:03
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1916 b/tests/data/test1916
new file mode 100644
index 0000000..afde1cc
--- /dev/null
+++ b/tests/data/test1916
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT PUBLISH
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT PUBLISH with no POSTFIELDSIZE set
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+<command option="binary-trace">
+"mqtt://%HOSTIP:%MQTTPORT/%20"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020000
+client PUBLISH 3 000120
+client DISCONNECT 0 e000
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1917 b/tests/data/test1917
new file mode 100644
index 0000000..a2cb981
--- /dev/null
+++ b/tests/data/test1917
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT PUBLISH
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+
+# require HTTP too as otherwise CURLOPT_POST doesn't exist
+<features>
+mqtt
+http
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT PUBLISH with CURLOPT_POST set (no payload)
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+<command option="binary-trace">
+"mqtt://%HOSTIP:%MQTTPORT/%20"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020000
+</protocol>
+<errorcode>
+43
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1918 b/tests/data/test1918
new file mode 100644
index 0000000..e9fe441
--- /dev/null
+++ b/tests/data/test1918
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+curl_easy_option
+curl_easy_option_by_name
+curl_easy_option_by_id
+</keywords>
+</info>
+
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<name>
+curl_easy_option_by_name() and curl_easy_option_by_id()
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test192 b/tests/data/test192
index 9a54a1a..7edf316 100644
--- a/tests/data/test192
+++ b/tests/data/test192
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 8
 Connection: close
 
@@ -29,7 +29,7 @@
 HTTP GET -w num_connects with one simple connect
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/192 -w "%{num_connects}\n"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /192 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -46,7 +46,7 @@
 
 <stdout>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 8
 Connection: close
 
diff --git a/tests/data/test193 b/tests/data/test193
index 6a9c674..4403b2c 100644
--- a/tests/data/test193
+++ b/tests/data/test193
@@ -13,16 +13,16 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 8
 Connection: close
-Location: ./193
+Location: ./%TESTNUMBER
 
 monster
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 8
 Connection: close
 
@@ -41,7 +41,7 @@
 HTTP GET -w num_connects with redirected fetch (2 connects)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/193 -w "%{num_connects}\n" -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" -L
 </command>
 </client>
 
@@ -49,12 +49,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /193 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /193 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -63,13 +63,13 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 8
 Connection: close
-Location: ./193
+Location: ./%TESTNUMBER
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 8
 Connection: close
 
diff --git a/tests/data/test1933 b/tests/data/test1933
new file mode 100644
index 0000000..d2aabb1
--- /dev/null
+++ b/tests/data/test1933
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+CURLOPT_AWS_SIGV4
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 302 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+Location: /%TESTNUMBER0002
+
+</data>
+<data2>
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+
+</data2>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# this relies on the debug feature which allow to set the time
+<features>
+SSL
+debug
+crypto
+</features>
+
+<name>
+HTTP AWS_SIGV4 with one provider and auth cred via URL
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<command>
+http://xxx:yyy@%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+^Content-Type:.*
+^Accept:.*
+</strip>
+<protocol>
+GET /%TESTNUMBER/testapi/test HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;x-xxx-date, Signature=d2c2dff48c59ec49dc31ef94f18c5dc1ac3eae2a70d51633a4342dadc0683664

+X-Xxx-Date: 19700101T000000Z

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1934 b/tests/data/test1934
new file mode 100644
index 0000000..35fa318
--- /dev/null
+++ b/tests/data/test1934
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+CURLOPT_AWS_SIGV4
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+Location: /%TESTNUMBER0002
+
+</data>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+
+</data2>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# this relies on the debug feature which allow to set the time
+<features>
+SSL
+debug
+crypto
+</features>
+
+<name>
+HTTP AWS_SIGV4 with two providers
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+^Content-Type:.*
+^Accept:.*
+</strip>
+<protocol>
+GET /%TESTNUMBER/testapi/test HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/0/127/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=938937ca7da6bb3dbf15e30928265ec6f061532d035d2afda92fa7cb10feb196

+X-Yyy-Date: 19700101T000000Z

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1935 b/tests/data/test1935
new file mode 100644
index 0000000..6d48f32
--- /dev/null
+++ b/tests/data/test1935
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+CURLOPT_AWS_SIGV4
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+Location: /%TESTNUMBER0002
+
+</data>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+
+</data2>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# this relies on the debug feature which allow to set the time
+<features>
+SSL
+debug
+crypto
+</features>
+
+<name>
+HTTP AWS_SIGV4 with two providers and region
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+^Content-Type:.*
+^Accept:.*
+</strip>
+<protocol>
+GET /%TESTNUMBER/testapi/test HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/rrr/127/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=240750deb9263d4c8ece71c016f3919b56e518249390ef075740f94ef8df846f

+X-Yyy-Date: 19700101T000000Z

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1936 b/tests/data/test1936
new file mode 100644
index 0000000..366abd6
--- /dev/null
+++ b/tests/data/test1936
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+CURLOPT_AWS_SIGV4
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+Location: /%TESTNUMBER0002
+
+</data>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+
+</data2>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# this relies on the debug feature which allow to set the time
+<features>
+SSL
+debug
+crypto
+</features>
+
+<name>
+HTTP AWS_SIGV4 with two providers, region and service
+</name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER/testapi/test
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+^Content-Type:.*
+^Accept:.*
+</strip>
+<protocol>
+GET /%TESTNUMBER/testapi/test HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: XXX4-HMAC-SHA256 Credential=xxx/19700101/rrr/sss/xxx4_request, SignedHeaders=content-type;host;x-yyy-date, Signature=f32cf87977cea5d3274b524b53e5d28f4aac54c372f710ae0cc3a9ececaf169f

+X-Yyy-Date: 19700101T000000Z

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test194 b/tests/data/test194
index 323ac0f..924e9a9 100644
--- a/tests/data/test194
+++ b/tests/data/test194
@@ -36,6 +36,7 @@
 Content-Range: bytes */87

 Content-Type: image/gif

 Connection: close

+

 </datacheck>
 
 </reply>
@@ -49,14 +50,14 @@
 HTTP resume transfer with the whole file already downloaded and --fail
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/194 -C 87 --fail
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -C 87 --fail
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/194 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=87-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test195 b/tests/data/test195
index 3059e8d..920ab8a 100644
--- a/tests/data/test195
+++ b/tests/data/test195
@@ -21,7 +21,7 @@
 FTP response 530 after PASS, temporarily not allowed access
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/195
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test196 b/tests/data/test196
index 31f724b..715a6ce 100644
--- a/tests/data/test196
+++ b/tests/data/test196
@@ -22,7 +22,7 @@
 FTP transient error, retry request once
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/196 --retry 1
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --retry 1
 </command>
 </client>
 
diff --git a/tests/data/test197 b/tests/data/test197
index 052a0ad..7019873 100644
--- a/tests/data/test197
+++ b/tests/data/test197
@@ -11,14 +11,14 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 503 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 21
 
 server not available
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Connection: close
 
@@ -37,7 +37,7 @@
 HTTP GET --retry on 503 error with output to stdout
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/197 --retry 1000
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1000
 </command>
 </client>
 
@@ -45,12 +45,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /197 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /197 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -59,12 +59,12 @@
 
 <stdout>
 HTTP/1.1 503 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 21
 
 server not available
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Connection: close
 
diff --git a/tests/data/test198 b/tests/data/test198
index 56dd74b..08fafde 100644
--- a/tests/data/test198
+++ b/tests/data/test198
@@ -11,14 +11,14 @@
 <reply>
 <data>
 HTTP/1.1 503 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 21
 
 server not available
 </data>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Connection: close
 
@@ -27,7 +27,7 @@
 
 <datacheck>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Connection: close
 
@@ -46,7 +46,7 @@
 HTTP GET --retry on 503 error with output to file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/198 --retry 1000
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1000
 </command>
 </client>
 
@@ -54,12 +54,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /198 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /198 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test199 b/tests/data/test199
index 69a3cec..b997c5c 100644
--- a/tests/data/test199
+++ b/tests/data/test199
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP with -d, -G and {}
  </name>
  <command>
--d "foo=moo&moo=poo" "http://%HOSTIP:%HTTPPORT/{199,199}" -G
+-d "foo=moo&moo=poo" "http://%HOSTIP:%HTTPPORT/{%TESTNUMBER,%TESTNUMBER}" -G
 </command>
 </client>
 
@@ -43,12 +43,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /199?foo=moo&moo=poo HTTP/1.1

+GET /%TESTNUMBER?foo=moo&moo=poo HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /199?foo=moo&moo=poo HTTP/1.1

+GET /%TESTNUMBER?foo=moo&moo=poo HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2 b/tests/data/test2
index bd53ed5..80e47b0 100644
--- a/tests/data/test2
+++ b/tests/data/test2
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,7 +29,7 @@
 HTTP GET with user and password
  </name>
  <command>
- -u fake:user http://%HOSTIP:%HTTPPORT/2
+ -u fake:user http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -37,15 +37,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic ZmFrZTp1c2Vy

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<data>
-[insert full protocol verifiction dump here]
-</data>
 </verify>
 </testcase>
diff --git a/tests/data/test200 b/tests/data/test200
index d8adda7..e7c5146 100644
--- a/tests/data/test200
+++ b/tests/data/test200
@@ -24,9 +24,9 @@
 basic file:// file
  </name>
 <command option="no-include">
-file://localhost%FILE_PWD/log/test200.txt
+file://localhost%FILE_PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test200.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
diff --git a/tests/data/test2000 b/tests/data/test2000
index a91dcd2..32604c6 100644
--- a/tests/data/test2000
+++ b/tests/data/test2000
@@ -32,9 +32,9 @@
 FTP RETR followed by FILE
  </name>
 <command option="no-include">
-ftp://%HOSTIP:%FTPPORT/2000 file://localhost%FILE_PWD/log/test2000.txt
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER file://localhost%FILE_PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test2000.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
@@ -52,8 +52,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 2000

-RETR 2000

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 <stdout>
diff --git a/tests/data/test2001 b/tests/data/test2001
index 4286f1d..e85fd1f 100644
--- a/tests/data/test2001
+++ b/tests/data/test2001
@@ -15,7 +15,7 @@
 <reply>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -49,9 +49,9 @@
 HTTP GET followed by FTP RETR followed by FILE
  </name>
 <command option="no-include">
-http://%HOSTIP:%HTTPPORT/20010001 ftp://%HOSTIP:%FTPPORT/20010002 file://localhost%FILE_PWD/log/test2001.txt
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test2001.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
@@ -64,7 +64,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20010001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -74,8 +74,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 20010002

-RETR 20010002

+SIZE %TESTNUMBER0002

+RETR %TESTNUMBER0002

 QUIT

 </protocol>
 <stdout>
diff --git a/tests/data/test2002 b/tests/data/test2002
index cad7cdf..68144f8 100644
--- a/tests/data/test2002
+++ b/tests/data/test2002
@@ -17,7 +17,7 @@
 <reply>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -58,9 +58,9 @@
 HTTP GET followed by FTP RETR followed by FILE followed by TFTP RRQ
  </name>
 <command option="no-include">
-http://%HOSTIP:%HTTPPORT/20020001 ftp://%HOSTIP:%FTPPORT/20020002 file://localhost%FILE_PWD/log/test2002.txt tftp://%HOSTIP:%TFTPPORT//20020003
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003
 </command>
-<file name="log/test2002.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
@@ -73,7 +73,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20020001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -83,14 +83,14 @@
 PWD

 EPSV

 TYPE I

-SIZE 20020002

-RETR 20020002

+SIZE %TESTNUMBER0002

+RETR %TESTNUMBER0002

 opcode: 1
 mode: octet
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /20020003
+filename: /%TESTNUMBER0003
 QUIT

 </protocol>
 <stdout>
diff --git a/tests/data/test2003 b/tests/data/test2003
index 12b4722..76d8521 100644
--- a/tests/data/test2003
+++ b/tests/data/test2003
@@ -17,7 +17,7 @@
 <reply>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -58,9 +58,9 @@
 HTTP GET followed by FTP RETR followed by FILE followed by TFTP RRQ then again in reverse order
  </name>
 <command option="no-include">
-http://%HOSTIP:%HTTPPORT/20030001 ftp://%HOSTIP:%FTPPORT/20030002 file://localhost%FILE_PWD/log/test2003.txt tftp://%HOSTIP:%TFTPPORT//20030003 tftp://%HOSTIP:%TFTPPORT//20030003 file://localhost%FILE_PWD/log/test2003.txt ftp://%HOSTIP:%FTPPORT/20030002 http://%HOSTIP:%HTTPPORT/20030001
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003 tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER0003 file://localhost%FILE_PWD/log/test%TESTNUMBER.txt ftp://%HOSTIP:%FTPPORT/%TESTNUMBER0002 http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 </command>
-<file name="log/test2003.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
@@ -73,7 +73,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20030001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -83,24 +83,24 @@
 PWD

 EPSV

 TYPE I

-SIZE 20030002

-RETR 20030002

+SIZE %TESTNUMBER0002

+RETR %TESTNUMBER0002

 opcode: 1
 mode: octet
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /20030003
+filename: /%TESTNUMBER0003
 opcode: 1
 mode: octet
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /20030003
+filename: /%TESTNUMBER0003
 EPSV

-SIZE 20030002

-RETR 20030002

-GET /20030001 HTTP/1.1

+SIZE %TESTNUMBER0002

+RETR %TESTNUMBER0002

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2004 b/tests/data/test2004
index f9add83..6ef9c6c 100644
--- a/tests/data/test2004
+++ b/tests/data/test2004
@@ -30,9 +30,9 @@
 TFTP RRQ followed by SFTP retrieval followed by FILE followed by SCP retrieval then again in reverse order
  </name>
 <command option="no-include">
---key curl_client_key --pubkey curl_client_key.pub -u %USER: tftp://%HOSTIP:%TFTPPORT//2004 sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test2004.txt file://localhost%FILE_PWD/log/test2004.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/test2004.txt file://localhost%FILE_PWD/log/test2004.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test2004.txt tftp://%HOSTIP:%TFTPPORT//2004 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.txt file://localhost%FILE_PWD/log/test%TESTNUMBER.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.txt file://localhost%FILE_PWD/log/test%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --insecure
 </command>
-<file name="log/test2004.txt">
+<file name="log/test%TESTNUMBER.txt">
 This is test data
 for several protocols
 </file>
@@ -47,13 +47,13 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /2004
+filename: /%TESTNUMBER
 opcode: 1
 mode: octet
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /2004
+filename: /%TESTNUMBER
 </protocol>
 <stdout>
 Test data file
diff --git a/tests/data/test2005 b/tests/data/test2005
deleted file mode 100644
index f26bf23..0000000
--- a/tests/data/test2005
+++ /dev/null
@@ -1,91 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 37
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2005; charset=funny; option=strange
-Funny-head: yesyes
-
-Data delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, HTTP resource
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2005.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2005.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2005">
-   <verification>
-    <hash type="sha256">a430d26389c69b7a245a9ad692cf20b4dc026fb7c2ff8a2c164c49a77130d6d9</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2005</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2005 log/name2005
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2005 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2005">
-Data delivered from an HTTP resource
-</file1>
-<file2 name="log/stdout2005">
-</file2>
-<file3 name="log/stderr2005" mode="text">
-Metalink: parsing (file://%PWD/log/test2005.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2005.metalink) OK
-Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005)...
-Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005) OK
-Metalink: validating (log/download2005)...
-Metalink: validating (log/download2005) [sha-256] OK
-</file3>
-<stripfile3>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile3>
-</verify>
-</testcase>
diff --git a/tests/data/test2006 b/tests/data/test2006
deleted file mode 100644
index addf86f..0000000
--- a/tests/data/test2006
+++ /dev/null
@@ -1,122 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-FILE
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 14:49:01 GMT
-Server: test-server/fake
-Content-Length: 42
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2006; charset=funny; option=strange
-Funny-head: yesyes
-
-Some data delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-# This relies on the debug feature to allow us to set directory to store the
-# -O output in, using the CURL_TESTDIR variable. This test might use it upon
-# failure only, successful execution won't actually use it.
-<features>
-debug
-file
-Metalink
-</features>
-<server>
-http
-</server>
- <name>
-Metalink local XML file, HTTP resource, using -O -D file
- </name>
-<setenv>
-CURL_TESTDIR=%PWD/log
-</setenv>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2006.metalink -O -D log/heads2006
-</command>
-# local metalink file written before test command runs
-<file name="log/test2006.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2006">
-   <verification>
-    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
-    <hash type="sha256">319cb6be756734b7ff689628ca3265580cdae6a0e38f42d4ac612ff4fba143b0</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2006</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2006 log/name2006
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2006 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2006">
-Some data delivered from an HTTP resource
-</file1>
-
-# The Content-Length replace here is to handle with 4/5 digit port number in
-# the content
-<stripfile2>
-s/Last-Modified:.*//
-s/Content-Length: 49[67]/Content-Length: yeps/
-</stripfile2>
-<file2 name="log/heads2006">
-Content-Length: yeps

-Accept-ranges: bytes

-
-

-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 14:49:01 GMT
-Server: test-server/fake
-Content-Length: 42
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2006; charset=funny; option=strange
-Funny-head: yesyes
-
-</file2>
-<file3 name="log/stdout2006">
-</file3>
-<file4 name="log/stderr2006" mode="text">
-Metalink: parsing (file://%PWD/log/test2006.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2006.metalink) OK
-Metalink: fetching (log/download2006) from (http://%HOSTIP:%HTTPPORT/2006)...
-Metalink: fetching (log/download2006) from (http://%HOSTIP:%HTTPPORT/2006) OK
-Metalink: validating (log/download2006)...
-Metalink: validating (log/download2006) [sha-256] OK
-</file4>
-<stripfile4>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile4>
-</verify>
-</testcase>
diff --git a/tests/data/test2007 b/tests/data/test2007
deleted file mode 100644
index 4c45615..0000000
--- a/tests/data/test2007
+++ /dev/null
@@ -1,122 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
--J
-FILE
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 14:50:02 GMT
-Server: test-server/fake
-Content-Length: 42
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2007; charset=funny; option=strange
-Funny-head: yesyes
-
-Something delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-# This relies on the debug feature to allow us to set directory to store the
-# -O and -J output in, using the CURL_TESTDIR variable. This test might use
-# it upon failure only, successful execution won't actually use it.
-<features>
-debug
-file
-Metalink
-</features>
-<server>
-http
-</server>
- <name>
-Metalink local XML file, HTTP resource, using -O -J -D file
- </name>
-<setenv>
-CURL_TESTDIR=%PWD/log
-</setenv>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2007.metalink -J -O -D log/heads2007
-</command>
-# local metalink file written before test command runs
-<file name="log/test2007.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2007">
-   <verification>
-    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
-    <hash type="sha256">52899e30f80e3490632d505653204e1fb5b02bda141048704ce9a0ed00b8a3f5</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2007</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2007 log/name2007
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2007 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2007">
-Something delivered from an HTTP resource
-</file1>
-# The Content-Length replace here is to handle with 4/5 digit port number in
-# the content
-<stripfile2>
-s/Last-Modified:.*//
-s/Content-Length: 49[67]/Content-Length: yeps/
-</stripfile2>
-<file2 name="log/heads2007">
-Content-Length: yeps

-Accept-ranges: bytes

-
-

-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 14:50:02 GMT
-Server: test-server/fake
-Content-Length: 42
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2007; charset=funny; option=strange
-Funny-head: yesyes
-
-</file2>
-<file3 name="log/stdout2007">
-</file3>
-<file4 name="log/stderr2007" mode="text">
-Metalink: parsing (file://%PWD/log/test2007.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2007.metalink) OK
-Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007)...
-Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007) OK
-Metalink: validating (log/download2007)...
-Metalink: validating (log/download2007) [sha-256] OK
-</file4>
-<stripfile4>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile4>
-</verify>
-</testcase>
diff --git a/tests/data/test2008 b/tests/data/test2008
deleted file mode 100644
index ec41adb..0000000
--- a/tests/data/test2008
+++ /dev/null
@@ -1,114 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-FILE
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 15:23:48 GMT
-Server: test-server/fake
-Content-Length: 43
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2008; charset=funny; option=strange
-Funny-head: yesyes
-
-Some stuff delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<features>
-file
-Metalink
-</features>
-<server>
-http
-</server>
- <name>
-Metalink local XML file, HTTP resource, using -o fname -D file
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2008.metalink -o log/outfile2008 -D log/heads2008
-</command>
-# local metalink file written before test command runs
-<file name="log/test2008.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2008">
-   <verification>
-    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
-    <hash type="sha256">711b1b566b536c5baae9b36f2f5c1830a7c8ff126d1afa2febc5b59f8d0aab54</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2008</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2008 log/name2008 log/outfile2008
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2008 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2008">
-Some stuff delivered from an HTTP resource
-</file1>
-# The Content-Length replace here is to handle with 4/5 digit port number in
-# the content
-<stripfile2>
-s/Last-Modified:.*//
-s/Content-Length: 49[67]/Content-Length: yeps/
-</stripfile2>
-<file2 name="log/heads2008">
-Content-Length: yeps

-Accept-ranges: bytes

-
-

-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 15:23:48 GMT
-Server: test-server/fake
-Content-Length: 43
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2008; charset=funny; option=strange
-Funny-head: yesyes
-
-</file2>
-<file3 name="log/stdout2008">
-</file3>
-<file4 name="log/stderr2008" mode="text">
-Metalink: parsing (file://%PWD/log/test2008.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2008.metalink) OK
-Metalink: fetching (log/download2008) from (http://%HOSTIP:%HTTPPORT/2008)...
-Metalink: fetching (log/download2008) from (http://%HOSTIP:%HTTPPORT/2008) OK
-Metalink: validating (log/download2008)...
-Metalink: validating (log/download2008) [sha-256] OK
-</file4>
-<stripfile4>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile4>
-</verify>
-</testcase>
diff --git a/tests/data/test2009 b/tests/data/test2009
deleted file mode 100644
index aa71a0a..0000000
--- a/tests/data/test2009
+++ /dev/null
@@ -1,115 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
--J
-FILE
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 16:27:17 GMT
-Server: test-server/fake
-Content-Length: 46
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2009; charset=funny; option=strange
-Funny-head: yesyes
-
-Some contents delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<features>
-file
-Metalink
-</features>
-<server>
-http
-</server>
- <name>
-Metalink local XML file, HTTP resource, using -o fname -J -D file
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2009.metalink -J -o log/outfile2009 -D log/heads2009
-</command>
-# local metalink file written before test command runs
-<file name="log/test2009.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2009">
-   <verification>
-    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
-    <hash type="sha256">e4c5b83384ba7d5f8e201d61747a14f29baacd7dfadce0fbd56661db4bba72b2</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2009</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2009 log/name2009 log/outfile2009
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2009 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2009">
-Some contents delivered from an HTTP resource
-</file1>
-# The Content-Length replace here is to handle with 4/5 digit port number in
-# the content
-<stripfile2>
-s/Last-Modified:.*//
-s/Content-Length: 49[67]/Content-Length: yeps/
-</stripfile2>
-<file2 name="log/heads2009">
-Content-Length: yeps

-Accept-ranges: bytes

-
-

-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 16:27:17 GMT
-Server: test-server/fake
-Content-Length: 46
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2009; charset=funny; option=strange
-Funny-head: yesyes
-
-</file2>
-<file3 name="log/stdout2009">
-</file3>
-<file4 name="log/stderr2009" mode="text">
-Metalink: parsing (file://%PWD/log/test2009.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2009.metalink) OK
-Metalink: fetching (log/download2009) from (http://%HOSTIP:%HTTPPORT/2009)...
-Metalink: fetching (log/download2009) from (http://%HOSTIP:%HTTPPORT/2009) OK
-Metalink: validating (log/download2009)...
-Metalink: validating (log/download2009) [sha-256] OK
-</file4>
-<stripfile4>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile4>
-</verify>
-</testcase>
diff --git a/tests/data/test201 b/tests/data/test201
index 254e241..8e9f190 100644
--- a/tests/data/test201
+++ b/tests/data/test201
@@ -21,7 +21,7 @@
 missing file:// file
  </name>
  <command>
-file://localhost/%PWD/log/non-existant-file.txt
+file://localhost/%PWD/log/non-existent-file.txt
 </command>
 </client>
 
diff --git a/tests/data/test2010 b/tests/data/test2010
deleted file mode 100644
index cd0c483..0000000
--- a/tests/data/test2010
+++ /dev/null
@@ -1,114 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-FILE
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 17:37:27 GMT
-Server: test-server/fake
-Content-Length: 41
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2010; charset=funny; option=strange
-Funny-head: yesyes
-
-Contents delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<features>
-file
-Metalink
-</features>
-<server>
-http
-</server>
- <name>
-Metalink local XML file, HTTP resource, using -o fname -D file
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2010.metalink -o log/outfile2010 -D log/heads2010
-</command>
-# local metalink file written before test command runs
-<file name="log/test2010.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2010">
-   <verification>
-    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
-    <hash type="sha256">19dcb4e2a99b9cd02c30b1ed6c55869b7ef8cda9f985648909c48a6dbb54356c</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2010</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2010 log/name2010 log/outfile2010
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2010 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2010">
-Contents delivered from an HTTP resource
-</file1>
-# The Content-Length replace here is to handle with 4/5 digit port number in
-# the content
-<stripfile2>
-s/Last-Modified:.*//
-s/Content-Length: 49[67]/Content-Length: yeps/
-</stripfile2>
-<file2 name="log/heads2010">
-Content-Length: yeps

-Accept-ranges: bytes

-
-

-HTTP/1.1 200 OK
-Date: Thu, 21 Jun 2012 17:37:27 GMT
-Server: test-server/fake
-Content-Length: 41
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2010; charset=funny; option=strange
-Funny-head: yesyes
-
-</file2>
-<file3 name="log/stdout2010">
-</file3>
-<file4 name="log/stderr2010" mode="text">
-Metalink: parsing (file://%PWD/log/test2010.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2010.metalink) OK
-Metalink: fetching (log/download2010) from (http://%HOSTIP:%HTTPPORT/2010)...
-Metalink: fetching (log/download2010) from (http://%HOSTIP:%HTTPPORT/2010) OK
-Metalink: validating (log/download2010)...
-Metalink: validating (log/download2010) [sha-256] OK
-</file4>
-<stripfile4>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile4>
-</verify>
-</testcase>
diff --git a/tests/data/test2011 b/tests/data/test2011
deleted file mode 100644
index 1d081af..0000000
--- a/tests/data/test2011
+++ /dev/null
@@ -1,91 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 37
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2011; charset=funny; option=strange
-Funny-head: yesyes
-
-Data delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, HTTP resource, hash mismatch
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2011.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2011.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2011">
-   <verification>
-    <hash type="sha256">badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2011</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2011 log/name2011
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2011 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2011">
-Data delivered from an HTTP resource
-</file1>
-<file2 name="log/stdout2011">
-</file2>
-<file3 name="log/stderr2011" mode="text">
-Metalink: parsing (file://%PWD/log/test2011.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2011.metalink) OK
-Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011)...
-Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011) OK
-Metalink: validating (log/download2011)...
-Metalink: validating (log/download2011) [sha-256] FAILED (digest mismatch)
-</file3>
-<stripfile3>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile3>
-</verify>
-</testcase>
diff --git a/tests/data/test2012 b/tests/data/test2012
deleted file mode 100644
index ae627a9..0000000
--- a/tests/data/test2012
+++ /dev/null
@@ -1,90 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 46
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2012; charset=funny; option=strange
-Funny-head: yesyes
-
-Some contents delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, HTTP resource, without hash
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2012.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2012.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2012">
-   <verification>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2012</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2012 log/name2012
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<protocol>
-GET /2012 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-User-Agent: curl/%VERSION

-Accept: */*

-

-</protocol>
-<file1 name="log/download2012">
-Some contents delivered from an HTTP resource
-</file1>
-<file2 name="log/stdout2012">
-</file2>
-<file3 name="log/stderr2012" mode="text">
-Metalink: parsing (file://%PWD/log/test2012.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2012.metalink) WARNING (digest missing)
-Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012)...
-Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012) OK
-Metalink: validating (log/download2012)...
-Metalink: validating (log/download2012) FAILED (digest missing)
-</file3>
-<stripfile3>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile3>
-</verify>
-</testcase>
diff --git a/tests/data/test2013 b/tests/data/test2013
deleted file mode 100644
index f4d0c24..0000000
--- a/tests/data/test2013
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2013; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix absolute path
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2013.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2013.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="/tmp/download2013">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2013</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2013 log/name2013 /tmp/download2013
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2013">
-</file1>
-<file2 name="log/stderr2013" mode="text">
-Metalink: parsing (file://%PWD/log/test2013.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2013.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2013.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2014 b/tests/data/test2014
deleted file mode 100644
index 65d2ec7..0000000
--- a/tests/data/test2014
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2014; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix path relative to current
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2014.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2014.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="./log/download2014">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2014</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2014 log/name2014 log/download2014
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2014">
-</file1>
-<file2 name="log/stderr2014" mode="text">
-Metalink: parsing (file://%PWD/log/test2014.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2014.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2014.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2015 b/tests/data/test2015
deleted file mode 100644
index d356f88..0000000
--- a/tests/data/test2015
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2015; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix path relative to upper
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2015.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2015.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="../tests/log/download2015">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2015</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2015 log/name2015 log/download2015
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2015">
-</file1>
-<file2 name="log/stderr2015" mode="text">
-Metalink: parsing (file://%PWD/log/test2015.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2015.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2015.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2016 b/tests/data/test2016
deleted file mode 100644
index ff2862d..0000000
--- a/tests/data/test2016
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2016; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix path traversal
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2016.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2016.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/../log/download2016">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2016</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2016 log/name2016 log/download2016
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2016">
-</file1>
-<file2 name="log/stderr2016" mode="text">
-Metalink: parsing (file://%PWD/log/test2016.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2016.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2016.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2017 b/tests/data/test2017
deleted file mode 100644
index 11c71c3..0000000
--- a/tests/data/test2017
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2017; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix home path traversal
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2017.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2017.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="~/download2017">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2017</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2017 log/name2017
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2017">
-</file1>
-<file2 name="log/stderr2017" mode="text">
-Metalink: parsing (file://%PWD/log/test2017.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2017.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2017.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2018 b/tests/data/test2018
deleted file mode 100644
index 9fb433d..0000000
--- a/tests/data/test2018
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2018; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix questionable file name I
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2018.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2018.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/.download2018">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2018</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2018 log/name2018 log/.download2018
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2018">
-</file1>
-<file2 name="log/stderr2018" mode="text">
-Metalink: parsing (file://%PWD/log/test2018.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2018.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2018.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2019 b/tests/data/test2019
deleted file mode 100644
index abd8cad..0000000
--- a/tests/data/test2019
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2019; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix questionable file name II
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2019.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2019.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name=".">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2019</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2019 log/name2019
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2019">
-</file1>
-<file2 name="log/stderr2019" mode="text">
-Metalink: parsing (file://%PWD/log/test2019.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2019.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2019.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test202 b/tests/data/test202
index ad9d854..f5efc07 100644
--- a/tests/data/test202
+++ b/tests/data/test202
@@ -20,9 +20,9 @@
 two file:// URLs to stdout
  </name>
 <command option="no-include">
-file://localhost%FILE_PWD/log/test202.txt FILE://localhost%FILE_PWD/log/test202.txt
+file://localhost%FILE_PWD/log/test%TESTNUMBER.txt FILE://localhost%FILE_PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test202.txt">
+<file name="log/test%TESTNUMBER.txt">
 contents in a single file
 </file>
 </client>
diff --git a/tests/data/test2020 b/tests/data/test2020
deleted file mode 100644
index 584f6df..0000000
--- a/tests/data/test2020
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2020; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix questionable file name III
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2020.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2020.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="..">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2020</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2020 log/name2020
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2020">
-</file1>
-<file2 name="log/stderr2020" mode="text">
-Metalink: parsing (file://%PWD/log/test2020.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2020.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2020.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2021 b/tests/data/test2021
deleted file mode 100644
index b0921d4..0000000
--- a/tests/data/test2021
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2021; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix questionable file name IV
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2021.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2021.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2021 >/dev/null">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2021</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2021 log/name2021 log/download2021
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2021">
-</file1>
-<file2 name="log/stderr2021" mode="text">
-Metalink: parsing (file://%PWD/log/test2021.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2021.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2021.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2022 b/tests/data/test2022
deleted file mode 100644
index e904473..0000000
--- a/tests/data/test2022
+++ /dev/null
@@ -1,78 +0,0 @@
-<testcase>
-<info>
-<keywords>
-Metalink
-HTTP
-HTTP GET
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data nocheck="yes">
-HTTP/1.1 200 OK
-Date: Wed, 20 Jun 2012 14:49:00 GMT
-Server: test-server/fake
-Content-Length: 56
-Connection: close
-Content-Type: text/html
-Content-Disposition: filename=name2022; charset=funny; option=strange
-Funny-head: yesyes
-
-Data that should not be delivered from an HTTP resource
-</data>
-</reply>
-
-#
-# Client-side
-<client>
-<server>
-http
-</server>
-<features>
-file
-Metalink
-</features>
- <name>
-Metalink local XML file, attempt Unix questionable file name V
- </name>
-<command option="no-output,no-include">
---metalink file://%PWD/log/test2022.metalink
-</command>
-# local metalink file written before test command runs
-<file name="log/test2022.metalink">
-<?xml version="1.0" encoding="utf-8"?>
-<metalink version="3.0" xmlns="http://www.metalinker.org/">
- <files>
-  <file name="log/download2022 |/dev/null">
-   <verification>
-    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
-   </verification>
-   <resources maxconnections="1">
-    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2022</url>
-   </resources>
-  </file>
- </files>
-</metalink>
-</file>
-<postcheck>
-perl %SRCDIR/libtest/notexists.pl log/2022 log/name2022 log/download2022
-</postcheck>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<file1 name="log/stdout2022">
-</file1>
-<file2 name="log/stderr2022" mode="text">
-Metalink: parsing (file://%PWD/log/test2022.metalink) metalink/XML...
-Metalink: parsing (file://%PWD/log/test2022.metalink) WARNING (missing or invalid file name)
-Metalink: parsing (file://%PWD/log/test2022.metalink) FAILED
-</file2>
-<stripfile2>
-$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
-</stripfile2>
-</verify>
-</testcase>
diff --git a/tests/data/test2023 b/tests/data/test2023
index 0b155b2..08fb5cc 100644
--- a/tests/data/test2023
+++ b/tests/data/test2023
@@ -119,7 +119,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2023 basic basic
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER basic basic
 </command>
 <precheck>
 chkhostname curlhost
@@ -129,27 +129,27 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20230100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20230200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

 

-GET /20230300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20230400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20230500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

diff --git a/tests/data/test2024 b/tests/data/test2024
index c062b4c..d371e5d 100644
--- a/tests/data/test2024
+++ b/tests/data/test2024
@@ -133,7 +133,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2024 basic digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER basic digest
 </command>
 <precheck>
 chkhostname curlhost
@@ -143,29 +143,29 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20240100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20240200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20240200", response="ed646c565f79e2dd9fa37cb5a621213c"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER0200", response="ed646c565f79e2dd9fa37cb5a621213c"

 Accept: */*

 

-GET /20240300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20240400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20240400", response="9741ced8caacc6124770187b36f007c5"

+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/%TESTNUMBER0400", response="9741ced8caacc6124770187b36f007c5"

 Accept: */*

 

-GET /20240500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20240500", response="5bc77ec8c2d443b27a1b55f1fd8fbb13"

+Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/%TESTNUMBER0500", response="5bc77ec8c2d443b27a1b55f1fd8fbb13"

 Accept: */*

 

 </protocol>
diff --git a/tests/data/test2025 b/tests/data/test2025
index 7a8fff1..5ab8b85 100644
--- a/tests/data/test2025
+++ b/tests/data/test2025
@@ -215,7 +215,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2025 basic ntlm
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER basic ntlm
 </command>
 <precheck>
 chkhostname curlhost
@@ -225,42 +225,42 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20250100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20250200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20250200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20250300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20250400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20250400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20250500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20250500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

diff --git a/tests/data/test2026 b/tests/data/test2026
index a505737..963587e 100644
--- a/tests/data/test2026
+++ b/tests/data/test2026
@@ -169,7 +169,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2026 digest basic
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER digest basic
 </command>
 <precheck>
 chkhostname curlhost
@@ -179,35 +179,35 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20260100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /20260100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20260100", response="5f992a2e761ab926256419f7c685f85b"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER0100", response="5f992a2e761ab926256419f7c685f85b"

 Accept: */*

 

-GET /20260200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

 

-GET /20260300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /20260300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20260300", response="132242e602882251929be93228c830ae"

+Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/%TESTNUMBER0300", response="132242e602882251929be93228c830ae"

 Accept: */*

 

-GET /20260400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20260500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

diff --git a/tests/data/test2027 b/tests/data/test2027
index 3983e88..ecc5a63 100644
--- a/tests/data/test2027
+++ b/tests/data/test2027
@@ -192,7 +192,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2027 digest digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER digest digest
 </command>
 <precheck>
 chkhostname curlhost
@@ -202,42 +202,42 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20270100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /20270100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20270100", response="f7fd60eefaff5225971bf9b3d80d6ba6"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER0100", response="f7fd60eefaff5225971bf9b3d80d6ba6"

 Accept: */*

 

-GET /20270200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20270200", response="785ca3ef511999f7e9c178195f5b388c"

+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/%TESTNUMBER0200", response="785ca3ef511999f7e9c178195f5b388c"

 Accept: */*

 

-GET /20270300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /20270300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/20270300", response="4c735d2360fd6848e7cb32a11ae3612b"

+Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/%TESTNUMBER0300", response="4c735d2360fd6848e7cb32a11ae3612b"

 Accept: */*

 

-GET /20270400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"

+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/%TESTNUMBER0400", response="f5906785511fb60a2af8b1cd53008ead"

 Accept: */*

 

-GET /20270400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"

+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/%TESTNUMBER0400", response="f5906785511fb60a2af8b1cd53008ead"

 Accept: */*

 

-GET /20270500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20270500", response="8ef4d935fd964a46c3965c0863b52cf1"

+Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/%TESTNUMBER0500", response="8ef4d935fd964a46c3965c0863b52cf1"

 Accept: */*

 

 </protocol>
diff --git a/tests/data/test2028 b/tests/data/test2028
index c7b70c8..8895612 100644
--- a/tests/data/test2028
+++ b/tests/data/test2028
@@ -251,7 +251,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2028 digest ntlm
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER digest ntlm
 </command>
 <precheck>
 chkhostname curlhost
@@ -261,50 +261,50 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20280100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /20280100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20280100", response="53c80666f5e3a4a55f92a66aaf0078bb"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER0100", response="53c80666f5e3a4a55f92a66aaf0078bb"

 Accept: */*

 

-GET /20280200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20280200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20280300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /20280300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/20280300", response="1aa5d90da9803ca12d04b24e0f19476e"

+Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/%TESTNUMBER0300", response="1aa5d90da9803ca12d04b24e0f19476e"

 Accept: */*

 

-GET /20280400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20280400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20280500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20280500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

diff --git a/tests/data/test2029 b/tests/data/test2029
index 67313c4..53b433e 100644
--- a/tests/data/test2029
+++ b/tests/data/test2029
@@ -188,7 +188,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2029 ntlm basic
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm basic
 </command>
 <precheck>
 chkhostname curlhost
@@ -198,37 +198,37 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20290100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20290100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20290200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

 

-GET /20290300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20290300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20290400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz

 Accept: */*

 

-GET /20290500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

diff --git a/tests/data/test203 b/tests/data/test203
index ee850cb..d193563 100644
--- a/tests/data/test203
+++ b/tests/data/test203
@@ -29,9 +29,9 @@
 MSYS2_ARG_CONV_EXCL=file:
 </setenv>
 <command option="no-include">
-file:%FILE_PWD/log/test203.txt
+file:%FILE_PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test203.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
diff --git a/tests/data/test2030 b/tests/data/test2030
index 1d281ab..dc3dfe8 100644
--- a/tests/data/test2030
+++ b/tests/data/test2030
@@ -240,7 +240,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2030 ntlm digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm digest
 </command>
 <precheck>
 chkhostname curlhost
@@ -250,44 +250,44 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20300100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20300100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20300200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20300200", response="2f2d784ba53a0a307758a90e98d25c27"

+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/%TESTNUMBER0200", response="2f2d784ba53a0a307758a90e98d25c27"

 Accept: */*

 

-GET /20300300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20300300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20300400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"

+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/%TESTNUMBER0400", response="d6262e9147db08c62ff2f53b515861e8"

 Accept: */*

 

-GET /20300400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"

+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/%TESTNUMBER0400", response="d6262e9147db08c62ff2f53b515861e8"

 Accept: */*

 

-GET /20300500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20300500", response="198757e61163a779cf24ed4c49c1ad7d"

+Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/%TESTNUMBER0500", response="198757e61163a779cf24ed4c49c1ad7d"

 Accept: */*

 

 </protocol>
diff --git a/tests/data/test2031 b/tests/data/test2031
index dabba37..6a83995 100644
--- a/tests/data/test2031
+++ b/tests/data/test2031
@@ -254,7 +254,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER ntlm ntlm
 </command>
 <precheck>
 chkhostname curlhost
@@ -264,52 +264,52 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20310100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20310100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20310200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20310200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20310300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20310300 HTTP/1.1

+GET /%TESTNUMBER0300 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20310400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20310400 HTTP/1.1

+GET /%TESTNUMBER0400 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 

-GET /20310500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20310500 HTTP/1.1

+GET /%TESTNUMBER0500 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

diff --git a/tests/data/test2032 b/tests/data/test2032
index 52574fe..08ac715 100644
--- a/tests/data/test2032
+++ b/tests/data/test2032
@@ -86,7 +86,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/2032
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 <precheck>
 chkhostname curlhost
@@ -96,22 +96,22 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20320100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

 

-GET /20320100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 Accept: */*

 

-GET /20320200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 

-GET /20320200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

diff --git a/tests/data/test2034 b/tests/data/test2034
index 57e3d86..3ddd420 100644
--- a/tests/data/test2034
+++ b/tests/data/test2034
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -34,7 +34,7 @@
 simple HTTPS GET with DER public key pinning
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der https://localhost:%HTTPSPORT/2034
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2034 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2035 b/tests/data/test2035
index 7002a5b..8380022 100644
--- a/tests/data/test2035
+++ b/tests/data/test2035
@@ -26,7 +26,7 @@
 HTTPS wrong DER pinnedpubkey but right CN
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.der https://localhost:%HTTPSPORT/2035
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.der https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
diff --git a/tests/data/test2037 b/tests/data/test2037
index 84a6676..f43215f 100644
--- a/tests/data/test2037
+++ b/tests/data/test2037
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -34,7 +34,7 @@
 simple HTTPS GET with PEM public key pinning
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem https://localhost:%HTTPSPORT/2037
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -45,9 +45,8 @@
 #
 # Verify data after the test has been "shot"
 <verify>
-</strip>
 <protocol>
-GET /2037 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2038 b/tests/data/test2038
index 63d935a..d9bf7c6 100644
--- a/tests/data/test2038
+++ b/tests/data/test2038
@@ -26,7 +26,7 @@
 HTTPS wrong PEM pinnedpubkey but right CN
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pem https://localhost:%HTTPSPORT/2038
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pem https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
diff --git a/tests/data/test2039 b/tests/data/test2039
index 1595ded..a10852a 100644
--- a/tests/data/test2039
+++ b/tests/data/test2039
@@ -37,9 +37,9 @@
 FTP (optional .netrc with 'default' override; no user/pass) dir list PASV
  </name>
  <command>
---netrc-optional --netrc-file log/netrc2039 ftp://%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc%TESTNUMBER ftp://%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc2039" >
+<file name="log/netrc%TESTNUMBER" >
 # the following two lines were created while testing curl
 default login userdef password passwddef
 machine %HOSTIP login user1 password passwd1
diff --git a/tests/data/test204 b/tests/data/test204
index 5dad014..dcf0bb5 100644
--- a/tests/data/test204
+++ b/tests/data/test204
@@ -16,9 +16,9 @@
 "upload" with file://
  </name>
 <command option="no-include">
-file://localhost%FILE_PWD/log/result204.txt -T log/upload204.txt
+file://localhost%FILE_PWD/log/result%TESTNUMBER.txt -T log/upload%TESTNUMBER.txt
 </command>
-<file name="log/upload204.txt">
+<file name="log/upload%TESTNUMBER.txt">
 data
 in
 file
@@ -29,7 +29,7 @@
 
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/result204.txt">
+<file name="log/result%TESTNUMBER.txt">
 data
 in
 file
diff --git a/tests/data/test2040 b/tests/data/test2040
index cec8a6b..56a6179 100644
--- a/tests/data/test2040
+++ b/tests/data/test2040
@@ -41,20 +41,20 @@
 HTTP Basic authorization, then without authorization
 </name>
 <command option="no-output,no-include">
--u testuser:testpass http://%HOSTIP:%HTTPPORT/20400100 --next --no-basic http://%HOSTIP:%HTTPPORT/20400200
+-u testuser:testpass http://%HOSTIP:%HTTPPORT/%TESTNUMBER0100 --next --no-basic http://%HOSTIP:%HTTPPORT/%TESTNUMBER0200
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /20400100 HTTP/1.1

+GET /%TESTNUMBER0100 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /20400200 HTTP/1.1

+GET /%TESTNUMBER0200 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2041 b/tests/data/test2041
index d10abaa..e4a2391 100644
--- a/tests/data/test2041
+++ b/tests/data/test2041
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -34,7 +34,7 @@
 simple HTTPS GET with base64-sha256 public key pinning
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//+JYNkp2GTGRgrvZMUkOxbFJQQqYpwNE6toGmBjz00D8= https://localhost:%HTTPSPORT/2041
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//+JYNkp2GTGRgrvZMUkOxbFJQQqYpwNE6toGmBjz00D8= https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2041 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2042 b/tests/data/test2042
index 2181e53..b6b9bcc 100644
--- a/tests/data/test2042
+++ b/tests/data/test2042
@@ -26,7 +26,7 @@
 HTTPS wrong base64-sha256 pinnedpubkey but right CN
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//bSIggTf+ikMG0CtmDlpMVBd7yi7H1md4URogRPqerso= https://localhost:%HTTPSPORT/2042
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//bSIggTf+ikMG0CtmDlpMVBd7yi7H1md4URogRPqerso= https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
diff --git a/tests/data/test2046 b/tests/data/test2046
index e85c00f..8845326 100644
--- a/tests/data/test2046
+++ b/tests/data/test2046
@@ -5,6 +5,7 @@
 HTTP GET
 IDN
 followlocation
+--resolve
 --write-out
 </keywords>
 </info>
@@ -14,16 +15,16 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Content-Type: text/plain
-Location: ./20460001
+Location: ./%TESTNUMBER0001
 
 redirect
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain; charset=us-ascii
 
@@ -52,7 +53,7 @@
  </name>
 
  <command>
-http://åäö.se:%HTTPPORT/2046 --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
+http://åäö.se:%HTTPPORT/%TESTNUMBER --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
 </command>
 </client>
 
@@ -60,12 +61,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2046 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: xn--4cab6c.se:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /20460001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: xn--4cab6c.se:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -74,13 +75,13 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Content-Type: text/plain
-Location: ./20460001
+Location: ./%TESTNUMBER0001
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain; charset=us-ascii
 
@@ -88,7 +89,7 @@
 1
 1
 3
-http://åäö.se:%HTTPPORT/20460001
+http://åäö.se:%HTTPPORT/%TESTNUMBER0001
 text/plain; charset=us-ascii
 200
 </stdout>
diff --git a/tests/data/test2047 b/tests/data/test2047
index cda2f91..a4ab391 100644
--- a/tests/data/test2047
+++ b/tests/data/test2047
@@ -15,16 +15,16 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 302 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Content-Type: text/plain
-Location: ./20470001
+Location: ./%TESTNUMBER0001
 
 redirect
 </data>
 <data1 nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain; charset=us-ascii
 
@@ -54,7 +54,7 @@
  </name>
 
  <command>
-http://åäö.se/2047 -x %HOSTIP:%HTTPPORT -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
+http://åäö.se/%TESTNUMBER -x %HOSTIP:%HTTPPORT -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
 </command>
 </client>
 
@@ -62,13 +62,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://xn--4cab6c.se/2047 HTTP/1.1

+GET http://xn--4cab6c.se/%TESTNUMBER HTTP/1.1

 Host: xn--4cab6c.se

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://xn--4cab6c.se/20470001 HTTP/1.1

+GET http://xn--4cab6c.se/%TESTNUMBER0001 HTTP/1.1

 Host: xn--4cab6c.se

 User-Agent: curl/%VERSION

 Accept: */*

@@ -78,13 +78,13 @@
 
 <stdout>
 HTTP/1.1 302 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Content-Type: text/plain
-Location: ./20470001
+Location: ./%TESTNUMBER0001
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain; charset=us-ascii
 
@@ -92,7 +92,7 @@
 1
 1
 3
-http://åäö.se/20470001
+http://åäö.se/%TESTNUMBER0001
 text/plain; charset=us-ascii
 200
 </stdout>
diff --git a/tests/data/test2048 b/tests/data/test2048
index 787f584..f14c8fb 100644
--- a/tests/data/test2048
+++ b/tests/data/test2048
@@ -26,7 +26,7 @@
 pinnedpubkey no-match must fail even when insecure
 </name>
 <command>
---insecure --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost.nn-sv.pub.der https://localhost:%HTTPSPORT/2048
+--insecure --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost.nn-sv.pub.der https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test2049 b/tests/data/test2049
index 0653e59..2b0c645 100644
--- a/tests/data/test2049
+++ b/tests/data/test2049
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -31,7 +31,7 @@
  </name>
 
  <command>
-http://www1.example.com:8081/2049 --connect-to ::%HOSTIP:%HTTPPORT --next http://www2.example.com:8082/2049 --connect-to :8082:%HOSTIP:%HTTPPORT --next http://www3.example.com:8083/2049 --connect-to www3.example.com::%HOSTIP:%HTTPPORT --next http://www4.example.com:8084/2049 --connect-to www4.example.com:8084:%HOSTIP:%HTTPPORT
+http://www1.example.com:8081/%TESTNUMBER --connect-to ::%HOSTIP:%HTTPPORT --next http://www2.example.com:8082/%TESTNUMBER --connect-to :8082:%HOSTIP:%HTTPPORT --next http://www3.example.com:8083/%TESTNUMBER --connect-to www3.example.com::%HOSTIP:%HTTPPORT --next http://www4.example.com:8084/%TESTNUMBER --connect-to www4.example.com:8084:%HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -39,22 +39,22 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2049 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www1.example.com:8081

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2049 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www2.example.com:8082

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2049 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www3.example.com:8083

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2049 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www4.example.com:8084

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test205 b/tests/data/test205
index f83c531..de04997 100644
--- a/tests/data/test205
+++ b/tests/data/test205
@@ -17,9 +17,9 @@
 "upload" with file://
  </name>
 <command option="no-include">
-file://localhost/%PWD/log/nonexisting/result205.txt -T log/upload205.txt
+file://localhost/%PWD/log/nonexisting/result%TESTNUMBER.txt -T log/upload%TESTNUMBER.txt
 </command>
-<file name="log/upload205.txt">
+<file name="log/upload%TESTNUMBER.txt">
 data
 in
 file
diff --git a/tests/data/test2050 b/tests/data/test2050
index d4b7e64..8d63a8d 100644
--- a/tests/data/test2050
+++ b/tests/data/test2050
@@ -20,7 +20,7 @@
 
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -31,7 +31,7 @@
 HTTP/1.1 200 Connection established
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -51,7 +51,7 @@
  </name>
 
  <command>
-http://www.example.com.2050/2050 --connect-to ::connect.example.com.2050:%HTTPPORT -x %HOSTIP:%PROXYPORT
+http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT
 </command>
 <features>
 proxy
@@ -62,15 +62,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT connect.example.com.2050:%HTTPPORT HTTP/1.1

-Host: connect.example.com.2050:%HTTPPORT

+CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: connect.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /2050 HTTP/1.1

-Host: www.example.com.2050

+GET /%TESTNUMBER HTTP/1.1

+Host: www.example.com.%TESTNUMBER

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2051 b/tests/data/test2051
index 97f1138..bd823bf 100644
--- a/tests/data/test2051
+++ b/tests/data/test2051
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -31,7 +31,7 @@
  </name>
 
  <command>
-http://%HOSTIP:%HTTPPORT/2051 -w "%{num_connects}\n" --next --connect-to ::%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/2051 -w "%{num_connects}\n" --next http://%HOSTIP:%HTTPPORT/2051 -w "%{num_connects}\n"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" --next --connect-to ::%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n" --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
 </command>
 </client>
 
@@ -39,17 +39,17 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2051 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2051 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2051 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -58,7 +58,7 @@
 
 <stdout>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
diff --git a/tests/data/test2052 b/tests/data/test2052
index 70549db..dd04f32 100644
--- a/tests/data/test2052
+++ b/tests/data/test2052
@@ -4,6 +4,7 @@
 HTTP
 HTTP GET
 CURLOPT_CONNECT_TO
+--resolve
 </keywords>
 </info>
 
@@ -12,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -31,7 +32,7 @@
  </name>
 
  <command>
-http://www.example.com:%HTTPPORT/2052 --resolve www.example.com:%HTTPPORT:%HOSTIP -w "%{num_connects}\n" --next --resolve -www.example.com:%HTTPPORT --connect-to ::%HOSTIP:%HTTPPORT http://www.example.com:%HTTPPORT/2052 -w "%{num_connects}\n"
+http://www.example.com:%HTTPPORT/%TESTNUMBER --resolve www.example.com:%HTTPPORT:%HOSTIP -w "%{num_connects}\n" --next --resolve -www.example.com:%HTTPPORT --connect-to ::%HOSTIP:%HTTPPORT http://www.example.com:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
 </command>
 </client>
 
@@ -39,12 +40,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2052 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www.example.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2052 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www.example.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -53,7 +54,7 @@
 
 <stdout>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
diff --git a/tests/data/test2053 b/tests/data/test2053
index abf1366..41035eb 100644
--- a/tests/data/test2053
+++ b/tests/data/test2053
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -31,7 +31,7 @@
  </name>
 
  <command>
-http://10.0.0.1:8081/2053 --connect-to 10.0.0.1:8081:%HOSTIP:%HTTPPORT --next http://[fc00::1]:8082/2053 --connect-to [fc00::1]:8082:%HOSTIP:%HTTPPORT
+http://10.0.0.1:8081/%TESTNUMBER --connect-to 10.0.0.1:8081:%HOSTIP:%HTTPPORT --next http://[fc00::1]:8082/%TESTNUMBER --connect-to [fc00::1]:8082:%HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -39,12 +39,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2053 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: 10.0.0.1:8081

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2053 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: [fc00::1]:8082

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2054 b/tests/data/test2054
index a79c59c..022d132 100644
--- a/tests/data/test2054
+++ b/tests/data/test2054
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -31,7 +31,7 @@
  </name>
 
  <command>
-http://%HOSTIP:%HTTPPORT/2054 --connect-to foo::bar: --connect-to :123::456 --next http://www.example.com:%HTTPPORT/2054 --connect-to www.example.com::%HOSTIP: --connect-to www.example.com::foo: --next http://%HOSTIP:8083/2054 --connect-to :8083::%HTTPPORT --connect-to :8083::123 --next http://www.example.com:8084/2054 --connect-to www.example.com:8084:%HOSTIP:%HTTPPORT --connect-to www.example.com:8084:foo:123
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --connect-to foo::bar: --connect-to :123::456 --next http://www.example.com:%HTTPPORT/%TESTNUMBER --connect-to www.example.com::%HOSTIP: --connect-to www.example.com::foo: --next http://%HOSTIP:8083/%TESTNUMBER --connect-to :8083::%HTTPPORT --connect-to :8083::123 --next http://www.example.com:8084/%TESTNUMBER --connect-to www.example.com:8084:%HOSTIP:%HTTPPORT --connect-to www.example.com:8084:foo:123
 </command>
 </client>
 
@@ -39,22 +39,22 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2054 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2054 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www.example.com:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2054 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:8083

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2054 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: www.example.com:8084

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2055 b/tests/data/test2055
index 5608b81..2c62b25 100644
--- a/tests/data/test2055
+++ b/tests/data/test2055
@@ -21,7 +21,7 @@
 
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -32,7 +32,7 @@
 HTTP/1.1 200 Connection established
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 3
 Content-Type: text/plain
 
@@ -55,7 +55,7 @@
 proxy
 </features>
  <command>
-http://www.example.com.2055/2055 --connect-to ::connect.example.com.2055:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
+http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
 </command>
 </client>
 
@@ -63,15 +63,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT connect.example.com.2055:%HTTPPORT HTTP/1.1

-Host: connect.example.com.2055:%HTTPPORT

+CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: connect.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /2055 HTTP/1.1

-Host: www.example.com.2055

+GET /%TESTNUMBER HTTP/1.1

+Host: www.example.com.%TESTNUMBER

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2056 b/tests/data/test2056
index fc3d147..d262e09 100644
--- a/tests/data/test2056
+++ b/tests/data/test2056
@@ -47,14 +47,14 @@
 CURL_STUB_GSS_CREDS="KRB5_Alice"
 </setenv>
 <command>
--u: --negotiate http://%HOSTIP:%HTTPPORT/2056
+-u: --negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2056 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Negotiate IktSQjVfQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjE6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test2057 b/tests/data/test2057
index f9c3790..c5443cc 100644
--- a/tests/data/test2057
+++ b/tests/data/test2057
@@ -63,20 +63,20 @@
 CURL_STUB_GSS_CREDS="NTLM_Alice"
 </setenv>
 <command>
--u: --negotiate http://%HOSTIP:%HTTPPORT/2057
+-u: --negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2057 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Negotiate Ik5UTE1fQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjI6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2057 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Negotiate Ik5UTE1fQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjM6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test2058 b/tests/data/test2058
index e1a8014..daff038 100644
--- a/tests/data/test2058
+++ b/tests/data/test2058
@@ -72,9 +72,9 @@
 HTTP POST --digest with PUT, resumed upload, modified method and SHA-256
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2058 -u auser:apasswd --digest -T log/2058 -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -T log/%TESTNUMBER -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
 </command>
-<file name="log/2058">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -82,7 +82,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/2058 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

@@ -90,9 +90,9 @@
 Proxy-Connection: Keep-Alive

 Content-Length: 0

 

-GET http://%HOSTIP:%HTTPPORT/2058 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/2058", response="fbed69f9f3fd304c8f1acb1a43eb32688b933c0e28055c16b926cbcec070aeed", algorithm=SHA-256

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="fbed69f9f3fd304c8f1acb1a43eb32688b933c0e28055c16b926cbcec070aeed", algorithm=SHA-256

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2059 b/tests/data/test2059
index 4b3ed0f..7ce80a3 100644
--- a/tests/data/test2059
+++ b/tests/data/test2059
@@ -72,9 +72,9 @@
 HTTP POST --digest with PUT, resumed upload, modified method, SHA-512-256 and userhash=true
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2059 -u auser:apasswd --digest -T log/2059 -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -T log/%TESTNUMBER -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
 </command>
-<file name="log/2059">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -82,7 +82,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/2059 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

@@ -90,9 +90,9 @@
 Proxy-Connection: Keep-Alive

 Content-Length: 0

 

-GET http://%HOSTIP:%HTTPPORT/2059 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="fddc3bc7b753b73ab0848fd83cb20cbbca971258eb8d20c941dd5e0b010d66be", realm="testrealm", nonce="1053604144", uri="/2059", response="fc09be8192851e284e73e8b719b32a2f6f91cca0594e68713da8c49dc2c1656e", algorithm=SHA-512-256, userhash=true

+Authorization: Digest username="fddc3bc7b753b73ab0848fd83cb20cbbca971258eb8d20c941dd5e0b010d66be", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="fc09be8192851e284e73e8b719b32a2f6f91cca0594e68713da8c49dc2c1656e", algorithm=SHA-512-256, userhash=true

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test206 b/tests/data/test206
index 4943264..f92ff83 100644
--- a/tests/data/test206
+++ b/tests/data/test206
@@ -30,7 +30,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -55,7 +55,7 @@
 Server: no
 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -79,26 +79,26 @@
 HTTP proxy CONNECT auth Digest
  </name>
  <command>
-http://test.remote.haxx.se.206:8990/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.haxx.se.206:8990 HTTP/1.1

-Host: test.remote.haxx.se.206:8990

+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.haxx.se.206:8990 HTTP/1.1

-Host: test.remote.haxx.se.206:8990

-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.206:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"

+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.%TESTNUMBER:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /path/2060002 HTTP/1.1

-Host: test.remote.haxx.se.206:8990

+GET /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2060 b/tests/data/test2060
index dfb4bd5..e0b4505 100644
--- a/tests/data/test2060
+++ b/tests/data/test2060
@@ -72,9 +72,9 @@
 HTTP POST --digest with PUT, resumed upload, modified method, SHA-512-256 and userhash=false
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2060 -u auser:apasswd --digest -T log/2060 -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -T log/%TESTNUMBER -x  http://%HOSTIP:%HTTPPORT -C 2 -X GET
 </command>
-<file name="log/2060">
+<file name="log/%TESTNUMBER">
 test
 </file>
 </client>
@@ -82,7 +82,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/2060 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

@@ -90,9 +90,9 @@
 Proxy-Connection: Keep-Alive

 Content-Length: 0

 

-GET http://%HOSTIP:%HTTPPORT/2060 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/2060", response="3ce1e25ffa611bdbe90e2ab367b9602fa223db9f6de76ac667f0d6157e2178a6", algorithm=SHA-512-256

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="3ce1e25ffa611bdbe90e2ab367b9602fa223db9f6de76ac667f0d6157e2178a6", algorithm=SHA-512-256

 Content-Range: bytes 2-4/5

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2061 b/tests/data/test2061
index 6953423..702bc64 100644
--- a/tests/data/test2061
+++ b/tests/data/test2061
@@ -59,21 +59,21 @@
 HTTP with RFC7616 SHA256 Digest authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2061 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2061 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2061 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/2061", response="9dc55255f1a2537b838311674b621d45346b862a81631bb20e4ce356ef25062d", algorithm=SHA-256

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="9dc55255f1a2537b838311674b621d45346b862a81631bb20e4ce356ef25062d", algorithm=SHA-256

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2062 b/tests/data/test2062
index 6075263..e05a42f 100644
--- a/tests/data/test2062
+++ b/tests/data/test2062
@@ -59,21 +59,21 @@
 HTTP with RFC7616 SHA-512-256 Digest authorization and userhash=false
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2062 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2062 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2062 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/2062", response="2af735ec3508f4dff99248ffbbe9de9002bfd7cc770cfa2b026cb334042a54e3", algorithm=SHA-512-256

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="2af735ec3508f4dff99248ffbbe9de9002bfd7cc770cfa2b026cb334042a54e3", algorithm=SHA-512-256

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2063 b/tests/data/test2063
index 557e593..0854c80 100644
--- a/tests/data/test2063
+++ b/tests/data/test2063
@@ -59,21 +59,21 @@
 HTTP with RFC7616 SHA-512-256 Digest authorization and userhash=true
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2063 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2063 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2063 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="75af8a3500f771e58a52093a25e7905d6e428a511285c12ea1420c73078dfd61", realm="testrealm", nonce="1053604145", uri="/2063", response="43f7ab531dff687b5dc75617daa59d1fd67d648341d6d2655ca65ef5064cfb51", algorithm=SHA-512-256, userhash=true

+Authorization: Digest username="75af8a3500f771e58a52093a25e7905d6e428a511285c12ea1420c73078dfd61", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="43f7ab531dff687b5dc75617daa59d1fd67d648341d6d2655ca65ef5064cfb51", algorithm=SHA-512-256, userhash=true

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2064 b/tests/data/test2064
index fc196f2..77810ec 100644
--- a/tests/data/test2064
+++ b/tests/data/test2064
@@ -59,21 +59,21 @@
 HTTP with RFC7616 Digest authorization with bad password and SHA256
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2064 -u testuser:test2pass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:test2pass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2064 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2064 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/2064", response="a9c3ec1036068b336cbabefe9dfcad52ee8b89bc7c91ddbb5bb415c6acdf38a5", algorithm=SHA-256

+Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/%TESTNUMBER", response="a9c3ec1036068b336cbabefe9dfcad52ee8b89bc7c91ddbb5bb415c6acdf38a5", algorithm=SHA-256

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2065 b/tests/data/test2065
index f352e6b..3d7afea 100644
--- a/tests/data/test2065
+++ b/tests/data/test2065
@@ -59,21 +59,21 @@
 HTTP with RFC7616 Digest authorization with bad password, SHA-512-256 and userhash=false
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2065 -u testuser:test2pass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:test2pass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2065 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2065 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/2065", response="5a5f20b0e601aeddc6f96422c2332d49ff431c49ab143b5f836ef76e9ac78f5e", algorithm=SHA-512-256

+Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/%TESTNUMBER", response="5a5f20b0e601aeddc6f96422c2332d49ff431c49ab143b5f836ef76e9ac78f5e", algorithm=SHA-512-256

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2066 b/tests/data/test2066
index 31a143d..1f8d198 100644
--- a/tests/data/test2066
+++ b/tests/data/test2066
@@ -59,21 +59,21 @@
 HTTP with RFC7616 Digest authorization with bad password, SHA-512-256 and userhash=true
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2066 -u testuser:test2pass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:test2pass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2066 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2066 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="75af8a3500f771e58a52093a25e7905d6e428a511285c12ea1420c73078dfd61", realm="testrealm", nonce="2053604145", uri="/2066", response="a2e2ae589f575fb132991d6f550ef14bf7ef697d2fef1242d2498f07eafc77dc", algorithm=SHA-512-256, userhash=true

+Authorization: Digest username="75af8a3500f771e58a52093a25e7905d6e428a511285c12ea1420c73078dfd61", realm="testrealm", nonce="2053604145", uri="/%TESTNUMBER", response="a2e2ae589f575fb132991d6f550ef14bf7ef697d2fef1242d2498f07eafc77dc", algorithm=SHA-512-256, userhash=true

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2067 b/tests/data/test2067
index 0ae4076..4fdd4dc 100644
--- a/tests/data/test2067
+++ b/tests/data/test2067
@@ -60,23 +60,23 @@
 # even when there is a user-specified Content-Length header.
 # https://github.com/curl/curl/pull/1242
 <command>
--H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/2067
+-H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /2067 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /2067 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/2067", response="67b97af219c92fa7e8685e5bebb8e74892f6c6792e911c52bd2dfbf0b49272eb", algorithm=SHA-256

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="67b97af219c92fa7e8685e5bebb8e74892f6c6792e911c52bd2dfbf0b49272eb", algorithm=SHA-256

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test2068 b/tests/data/test2068
index 21003bd..429e5d5 100644
--- a/tests/data/test2068
+++ b/tests/data/test2068
@@ -60,23 +60,23 @@
 # even when there is a user-specified Content-Length header.
 # https://github.com/curl/curl/pull/1242
 <command>
--H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/2068
+-H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /2068 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /2068 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/2068", response="4bc9c97a72f1856bcec9b0e1518c6b7ee28773f91357d56840bdc30bd89ca68f", algorithm=SHA-512-256

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="4bc9c97a72f1856bcec9b0e1518c6b7ee28773f91357d56840bdc30bd89ca68f", algorithm=SHA-512-256

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test2069 b/tests/data/test2069
index fb3d15d..41a0c74 100644
--- a/tests/data/test2069
+++ b/tests/data/test2069
@@ -60,23 +60,23 @@
 # even when there is a user-specified Content-Length header.
 # https://github.com/curl/curl/pull/1242
 <command>
--H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/2069
+-H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /2069 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /2069 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="fddc3bc7b753b73ab0848fd83cb20cbbca971258eb8d20c941dd5e0b010d66be", realm="testrealm", nonce="1053604144", uri="/2069", response="ff13d977110a471f30de75e747976e4de78d7a3d2425cd23ff46e67f4bc9ead7", algorithm=SHA-512-256, userhash=true

+Authorization: Digest username="fddc3bc7b753b73ab0848fd83cb20cbbca971258eb8d20c941dd5e0b010d66be", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="ff13d977110a471f30de75e747976e4de78d7a3d2425cd23ff46e67f4bc9ead7", algorithm=SHA-512-256, userhash=true

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test207 b/tests/data/test207
index 1ce2338..73d363c 100644
--- a/tests/data/test207
+++ b/tests/data/test207
@@ -41,7 +41,7 @@
 HTTP GET with chunked Transfer-Encoding closed prematurely
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/207
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /207 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2070 b/tests/data/test2070
index 1039e84..7258638 100644
--- a/tests/data/test2070
+++ b/tests/data/test2070
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -38,7 +38,7 @@
 CURL_SSL_BACKEND=schannel
  </setenv>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/2070
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -50,7 +50,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2070 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2072 b/tests/data/test2072
index 1bab158..1791670 100644
--- a/tests/data/test2072
+++ b/tests/data/test2072
@@ -24,12 +24,12 @@
 file:// with unix path resolution behavior for the case of extra slashes
 </name>
 <command option="no-include">
-file:////%PWD/log/test2072.txt
+file:////%PWD/log/test%TESTNUMBER.txt
 </command>
 <precheck>
 perl -e "print 'Test requires a unix system' if ( $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'msys');"
 </precheck>
-<file name="log/test2072.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
diff --git a/tests/data/test2073 b/tests/data/test2073
index 160ddbb..dd36415 100644
--- a/tests/data/test2073
+++ b/tests/data/test2073
@@ -10,14 +10,14 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 10
 
 contents1
 </data>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 10
 
 contents2
@@ -34,7 +34,7 @@
 HTTP form posts with handle reset
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2073 -F 'name=a;filename=a.pdf' --next http://%HOSTIP:%HTTPPORT/2073 -F 'name=b;filename=b.jpg'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F 'name=a;filename=a.pdf' --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER -F 'name=b;filename=b.jpg'
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /2073 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -55,7 +55,7 @@
 Content-Type: application/pdf

 

 a

-POST /2073 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test2074 b/tests/data/test2074
index e3e1812..e7b6003 100644
--- a/tests/data/test2074
+++ b/tests/data/test2074
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP GET
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/2074 --oauth2-bearer mF_9.B5f-4.1JqM
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2074 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Bearer mF_9.B5f-4.1JqM

 User-Agent: curl/%VERSION

diff --git a/tests/data/test2076 b/tests/data/test2076
index 5974286..646b7df 100644
--- a/tests/data/test2076
+++ b/tests/data/test2076
@@ -51,21 +51,21 @@
 HTTP with digest auth and URI contains query
 </name>
 <command>
-"http://%HOSTIP:%HTTPPORT/2076?query" -u testuser:testpass --digest
+"http://%HOSTIP:%HTTPPORT/%TESTNUMBER?query" -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /2076?query HTTP/1.1

+GET /%TESTNUMBER?query HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /2076?query HTTP/1.1

+GET /%TESTNUMBER?query HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/2076?query", response="5758bd3bbde7f33236e6ccd278eb59af"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER?query", response="5758bd3bbde7f33236e6ccd278eb59af"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test2077 b/tests/data/test2077
index 0c600f5..44a1974 100644
--- a/tests/data/test2077
+++ b/tests/data/test2077
@@ -29,7 +29,7 @@
 curl --fail --negotiate to unauthenticated service fails
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/2077 -u : --fail --negotiate
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u : --fail --negotiate
 </command>
 </client>
 
diff --git a/tests/data/test2078 b/tests/data/test2078
index c881b04..387352a 100644
--- a/tests/data/test2078
+++ b/tests/data/test2078
@@ -29,7 +29,7 @@
 curl --negotiate should not send empty POST request only
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/2078 -u : --negotiate --data name=value
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u : --negotiate --data name=value
 </command>
 </client>
 
@@ -39,7 +39,7 @@
 0
 </errorcode>
 <protocol nonewline="yes">
-POST /2078 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test208 b/tests/data/test208
index abb30df..d081b51 100644
--- a/tests/data/test208
+++ b/tests/data/test208
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -33,9 +33,9 @@
 HTTP PUT to a FTP URL with username+password - over HTTP proxy
  </name>
  <command>
--x http://%HOSTIP:%HTTPPORT ftp://daniel:mysecret@host.com/we/want/208 -T log/test208.txt
+-x http://%HOSTIP:%HTTPPORT ftp://daniel:mysecret@host.com/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test208.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -51,7 +51,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT ftp://daniel:mysecret@host.com/we/want/208 HTTP/1.1

+PUT ftp://daniel:mysecret@host.com/we/want/%TESTNUMBER HTTP/1.1

 Host: host.com:21

 Authorization: Basic ZGFuaWVsOm15c2VjcmV0

 User-Agent: curl/%VERSION

diff --git a/tests/data/test2080 b/tests/data/test2080
index 47e376e..9a33703 100644
--- a/tests/data/test2080
+++ b/tests/data/test2080
Binary files differ
diff --git a/tests/data/test2081 b/tests/data/test2081
new file mode 100644
index 0000000..a6733e7
--- /dev/null
+++ b/tests/data/test2081
@@ -0,0 +1,66 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+referer
+followlocation
+--write-out
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 301 This is a weirdo text message swsclose

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

+Content-Length: 62

+Connection: close

+

+This server reply is for testing a simple Location: following
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+Automatic referrer credential and anchor stripping check
+ </name>
+ <command>
+http://user:pass@%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER#anchor --location --referer ';auto' --write-out '%{referer}\n'
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+52
+</errorcode>
+<protocol>
+GET /we/want/our/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: Basic dXNlcjpwYXNz

+User-Agent: curl/%VERSION

+Accept: */*

+

+GET /we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: Basic dXNlcjpwYXNz

+User-Agent: curl/%VERSION

+Accept: */*

+Referer: http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER

+

+</protocol>
+<stdout>
+HTTP/1.1 301 This is a weirdo text message swsclose

+Location: data/%TESTNUMBER0002.txt?coolsite=yes

+Content-Length: 62

+Connection: close

+

+http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test209 b/tests/data/test209
index afe16bf..59a293d 100644
--- a/tests/data/test209
+++ b/tests/data/test209
@@ -33,7 +33,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -60,7 +60,7 @@
 Content-Type: text/html; charset=iso-8859-1

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -92,7 +92,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com.209:%HTTPPORT/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
 </command>
 <precheck>
 chkhostname curlhost
@@ -102,20 +102,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.209:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.209:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-GET /path/2090002 HTTP/1.1

-Host: test.remote.example.com.209:%HTTPPORT

+GET /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test210 b/tests/data/test210
index c6fb703..1703164 100644
--- a/tests/data/test210
+++ b/tests/data/test210
@@ -23,7 +23,7 @@
 Get two FTP files from the same remote dir: no second CWD
  </name>
 <command option="no-include">
-ftp://%HOSTIP:%FTPPORT/a/path/210 ftp://%HOSTIP:%FTPPORT/a/path/210
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER
 </command>
 <stdout>
 data blobb
@@ -41,11 +41,11 @@
 CWD path

 EPSV

 TYPE I

-SIZE 210

-RETR 210

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 210

-RETR 210

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test2100 b/tests/data/test2100
index 4352f61..1fa0f23 100644
--- a/tests/data/test2100
+++ b/tests/data/test2100
Binary files differ
diff --git a/tests/data/test211 b/tests/data/test211
index 96d0573..0fe6e6f 100644
--- a/tests/data/test211
+++ b/tests/data/test211
@@ -24,7 +24,7 @@
 Get two FTP files with no remote EPSV support
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/a/path/211 ftp://%HOSTIP:%FTPPORT/a/path/211
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER
 </command>
 <stdout>
 data blobb
@@ -43,11 +43,11 @@
 EPSV

 PASV

 TYPE I

-SIZE 211

-RETR 211

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 PASV

-SIZE 211

-RETR 211

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test212 b/tests/data/test212
index 444525f..175759a 100644
--- a/tests/data/test212
+++ b/tests/data/test212
@@ -29,7 +29,7 @@
 Get two FTP files with no remote EPRT support
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/a/path/212 ftp://%HOSTIP:%FTPPORT/a/path/212 -P -
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER -P -
 </command>
 <stdout>
 data blobb
@@ -53,11 +53,11 @@
 EPRT |1|

 PORT 

 TYPE I

-SIZE 212

-RETR 212

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 PORT 

-SIZE 212

-RETR 212

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test213 b/tests/data/test213
index bb57997..b9ddc1c 100644
--- a/tests/data/test213
+++ b/tests/data/test213
@@ -33,7 +33,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -60,7 +60,7 @@
 Content-Type: text/html; charset=iso-8859-1

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -92,7 +92,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
 </command>
 <precheck>
 chkhostname curlhost
@@ -102,20 +102,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0

-Host: test.remote.example.com.213:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.0

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0

-Host: test.remote.example.com.213:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.0

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-POST /path/2130002 HTTP/1.1

-Host: test.remote.example.com.213:%HTTPPORT

+POST /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 6

diff --git a/tests/data/test214 b/tests/data/test214
index 3f305ee..bb3390f 100644
--- a/tests/data/test214
+++ b/tests/data/test214
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,7 +29,7 @@
 HTTP URL with escaped { and }
  </name>
 <command>
-"http://%HOSTIP:%HTTPPORT/\{\}\/214"
+"http://%HOSTIP:%HTTPPORT/\{\}\/%TESTNUMBER"
 </command>
 <setenv>
 # Needed for MSYS2 to not convert all backslashes to forward slashes
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /{}\/214 HTTP/1.1

+GET /{}\/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test215 b/tests/data/test215
index 987fd99..5fd8fc6 100644
--- a/tests/data/test215
+++ b/tests/data/test215
@@ -34,7 +34,7 @@
 Get two FTP dir listings from the same remote dir: no second CWD
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/a/path/215/ ftp://%HOSTIP:%FTPPORT/a/path/215/
+ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER/ ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER/
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 PWD

 CWD a

 CWD path

-CWD 215

+CWD %TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test216 b/tests/data/test216
index 404e9c9..0e74110 100644
--- a/tests/data/test216
+++ b/tests/data/test216
@@ -18,9 +18,9 @@
 FTP upload two files to the same dir
  </name>
  <command>
--T log/upload.216 ftp://%HOSTIP:%FTPPORT/a/path/216/ -T log/upload.216 ftp://%HOSTIP:%FTPPORT/a/path/216/%2e%2eanotherup.216
+-T log/upload.%TESTNUMBER ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER/ -T log/upload.%TESTNUMBER ftp://%HOSTIP:%FTPPORT/a/path/%TESTNUMBER/%2e%2eanotherup.%TESTNUMBER
 </command>
-<file name="log/upload.216">
+<file name="log/upload.%TESTNUMBER">
 upload this file twice
 </file>
 </client>
@@ -33,12 +33,12 @@
 PWD

 CWD a

 CWD path

-CWD 216

+CWD %TESTNUMBER

 EPSV

 TYPE I

-STOR upload.216

+STOR upload.%TESTNUMBER

 EPSV

-STOR ..anotherup.216

+STOR ..anotherup.%TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test217 b/tests/data/test217
index b067344..d791416 100644
--- a/tests/data/test217
+++ b/tests/data/test217
@@ -32,7 +32,7 @@
 HTTP proxy CONNECT to proxy returning 405
  </name>
  <command>
-http://test.remote.example.com.217:%HTTPPORT/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n"
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n"
 </command>
 <features>
 proxy
@@ -42,8 +42,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.example.com.217:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.217:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test218 b/tests/data/test218
index 4951c26..dc71442 100644
--- a/tests/data/test218
+++ b/tests/data/test218
@@ -29,9 +29,9 @@
 HTTP PUT from a file but enforce chunked transfer-encoding
  </name>
  <command>
- -T log/file218 -H "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/218
+ -T log/file%TESTNUMBER -H "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
-<file name="log/file218">
+<file name="log/file%TESTNUMBER">
 just some tiny teeny contents
 </file>
 </client>
@@ -40,14 +40,18 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /218 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Transfer-Encoding: chunked

 Expect: 100-continue

 

+%if hyper
+1E

+%else
 1e

+%endif
 just some tiny teeny contents
 

 0

diff --git a/tests/data/test219 b/tests/data/test219
index 2b63895..74a8551 100644
--- a/tests/data/test219
+++ b/tests/data/test219
@@ -24,7 +24,7 @@
 try using proxy with unsupported scheme
  </name>
  <command>
--x foo://%HOSTIP:%NOLISTENPORT/219 http://%HOSTIP:%NOLISTENPORT/219
+-x foo://%HOSTIP:%NOLISTENPORT/%TESTNUMBER http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test22 b/tests/data/test22
index 57dd7dd..f5593c4 100644
--- a/tests/data/test22
+++ b/tests/data/test22
@@ -26,14 +26,14 @@
 get HTTP with URL > 10000 bytes
  </name>
  <command>
-%HOSTIP:%HTTPPORT/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test220 b/tests/data/test220
index 4b2e416..844bb02 100644
--- a/tests/data/test220
+++ b/tests/data/test220
@@ -47,7 +47,7 @@
 HTTP GET gzip compressed content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/220 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -55,14 +55,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /220 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test2200 b/tests/data/test2200
new file mode 100644
index 0000000..64d6550
--- /dev/null
+++ b/tests/data/test2200
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+
+# error 5 - "Connection Refused, not authorized. Wrong data supplied"
+<servercmd>
+error-CONNACK 5
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT SUBSCRIBE with user and password
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -u fakeuser:fakepasswd
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d51545404c2003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 2e 00044d51545404c2003c000c6375726c
+server CONNACK 2 20020005
+</protocol>
+
+# 8 is CURLE_WEIRD_SERVER_REPLY
+<errorcode>
+8
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test2201 b/tests/data/test2201
new file mode 100644
index 0000000..7c804e8
--- /dev/null
+++ b/tests/data/test2201
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT PUBLISH
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT PUBLISH with user and password valid
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -d something -u testuser:testpasswd
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d51545404c2003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 2e 00044d51545404c2003c000c6375726c
+server CONNACK 2 20020000
+client PUBLISH f 000432323031736f6d657468696e67
+client DISCONNECT 0 e000
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2202 b/tests/data/test2202
new file mode 100644
index 0000000..9bb0379
--- /dev/null
+++ b/tests/data/test2202
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT PUBLISH
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+
+# error 5 - "Connection Refused, not authorized. Wrong data supplied"
+<servercmd>
+error-CONNACK 5
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT PUBLISH with invalid user and password
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -d something -u fakeuser:fakepasswd
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d51545404c2003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 2e 00044d51545404c2003c000c6375726c
+server CONNACK 2 20020005
+</protocol>
+
+
+# 8 is CURLE_WEIRD_SERVER_REPLY
+<errorcode>
+8
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test2203 b/tests/data/test2203
new file mode 100644
index 0000000..b47ca4d
--- /dev/null
+++ b/tests/data/test2203
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+
+# error 5 - "Connection Refused, not authorized. No user or password supplied"
+<servercmd>
+error-CONNACK 5
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT with error in CONNACK
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020005
+</protocol>
+
+# 8 is CURLE_WEIRD_SERVER_REPLY
+<errorcode>
+8
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test2204 b/tests/data/test2204
new file mode 100644
index 0000000..fb03dd3
--- /dev/null
+++ b/tests/data/test2204
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 31 31 39 30   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT SUBSCRIBE with user and password
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -u testuser:testpasswd
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d51545404c2003c000c6375726c).*/$1/
+</strippart>
+<protocol>
+client CONNECT 2e 00044d51545404c2003c000c6375726c
+server CONNACK 2 20020000
+client SUBSCRIBE 9 000100043232303400
+server SUBACK 3 9003000100
+server PUBLISH c 300c00043232303468656c6c6f0a
+server DISCONNECT 0 e000
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2205 b/tests/data/test2205
new file mode 100644
index 0000000..9bc8d32
--- /dev/null
+++ b/tests/data/test2205
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT with very long user name
+</name>
+<file name="log/input%TESTNUMBER">
+user = %repeat[65536 x a]%:fakepasswd
+</file>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -K log/input%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d51545404c2003c000c6375726c).*/$1/
+</strippart>
+# 8 is CURLE_WEIRD_SERVER_REPLY
+<errorcode>
+8
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test221 b/tests/data/test221
index 3fab37f..2d769bc 100644
--- a/tests/data/test221
+++ b/tests/data/test221
@@ -47,7 +47,7 @@
 HTTP GET gzip compressed content with broken gzip header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/221 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -55,14 +55,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /221 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 <errorcode>
diff --git a/tests/data/test222 b/tests/data/test222
index 27d169f..3f6e7c9 100644
--- a/tests/data/test222
+++ b/tests/data/test222
@@ -178,7 +178,7 @@
 HTTP GET deflate compressed content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/222 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -186,14 +186,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /222 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test223 b/tests/data/test223
index 52bbb7c..4d0dddc 100644
--- a/tests/data/test223
+++ b/tests/data/test223
@@ -68,7 +68,7 @@
 HTTP GET deflate compressed content with broken deflate header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/223 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -76,14 +76,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /223 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 <errorcode>
diff --git a/tests/data/test224 b/tests/data/test224
index b632ffd..4fc8420 100644
--- a/tests/data/test224
+++ b/tests/data/test224
@@ -83,7 +83,7 @@
 HTTP GET gzip compressed content with huge comment and extra field
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/224 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -91,14 +91,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /224 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test225 b/tests/data/test225
index a644712..5c8efd9 100644
--- a/tests/data/test225
+++ b/tests/data/test225
@@ -14,7 +14,7 @@
 FTP %0a-code in URL's name part
  </name>
  <command>
-ftp://bad%0auser:passwd@%HOSTIP:%FTPPORT/225%0a
+ftp://bad%0auser:passwd@%HOSTIP:%FTPPORT/%TESTNUMBER%0a
 </command>
 </client>
 
diff --git a/tests/data/test226 b/tests/data/test226
index 9fc4bda..9395457 100644
--- a/tests/data/test226
+++ b/tests/data/test226
@@ -15,7 +15,7 @@
 FTP %0d-code in URL's CWD part
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/226%0d
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER%0d
 </command>
 </client>
 
diff --git a/tests/data/test227 b/tests/data/test227
index 5b6d98c..18622df 100644
--- a/tests/data/test227
+++ b/tests/data/test227
@@ -31,7 +31,7 @@
 FTP with quote ops
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/227 -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD"
 </command>
 </client>
 
@@ -48,8 +48,8 @@
 TYPE I

 NOOP 2

 FAIL HARD

-SIZE 227

-RETR 227

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 NOOP 3

 QUIT

 </protocol>
diff --git a/tests/data/test228 b/tests/data/test228
index f581583..7ac4ca4 100644
--- a/tests/data/test228
+++ b/tests/data/test228
@@ -30,7 +30,7 @@
 FTP RETR with ACCT
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/228 --ftp-account "one count"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count"
 </command>
 </client>
 
@@ -44,8 +44,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 228

-RETR 228

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test229 b/tests/data/test229
index d337468..75dc103 100644
--- a/tests/data/test229
+++ b/tests/data/test229
@@ -23,7 +23,7 @@
 FTP RETR with bad ACCT
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/229 --ftp-account "one count"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count"
 </command>
 </client>
 
diff --git a/tests/data/test230 b/tests/data/test230
index eb696da..a8c04be 100644
--- a/tests/data/test230
+++ b/tests/data/test230
@@ -179,7 +179,7 @@
 HTTP GET multiply compressed content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/230 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -187,14 +187,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /230 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test231 b/tests/data/test231
index 7254953..c925eb1 100644
--- a/tests/data/test231
+++ b/tests/data/test231
@@ -23,9 +23,9 @@
 file:// with resume
  </name>
 <command option="no-include">
-file://localhost%FILE_PWD/log/test231.txt -C 10
+file://localhost%FILE_PWD/log/test%TESTNUMBER.txt -C 10
 </command>
-<file name="log/test231.txt">
+<file name="log/test%TESTNUMBER.txt">
 A01234567
 B01234567
 C01234567
diff --git a/tests/data/test232 b/tests/data/test232
index e0e7034..32fdc6a 100644
--- a/tests/data/test232
+++ b/tests/data/test232
@@ -178,7 +178,7 @@
 HTTP GET deflate raw-compressed content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/232 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -186,14 +186,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /232 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test233 b/tests/data/test233
index eb732ea..d089975 100644
--- a/tests/data/test233
+++ b/tests/data/test233
@@ -13,11 +13,11 @@
 <reply>
 <data>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/2330002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
@@ -25,7 +25,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -36,16 +36,16 @@
 
 <datacheck>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/2330002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -65,7 +65,7 @@
 HTTP, proxy, site+proxy auth and Location: to new host
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/233 -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location
+http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location
 </command>
 <features>
 proxy
@@ -76,7 +76,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/233 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: first.host.it.is

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 Authorization: Basic aWFtOm15c2VsZg==

@@ -84,7 +84,7 @@
 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://goto.second.host.now/2330002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1

 Host: goto.second.host.now

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 User-Agent: curl/%VERSION

diff --git a/tests/data/test234 b/tests/data/test234
index 3c5146a..5e9258f 100644
--- a/tests/data/test234
+++ b/tests/data/test234
@@ -15,11 +15,11 @@
 <reply>
 <data>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/2340002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
@@ -27,7 +27,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -38,16 +38,16 @@
 
 <datacheck>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/2340002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -67,7 +67,7 @@
 HTTP, proxy, site+proxy auth and Location: to new host using location-trusted
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/234 -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location-trusted
+http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location-trusted
 </command>
 <features>
 proxy
@@ -78,7 +78,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/234 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: first.host.it.is

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 Authorization: Basic aWFtOm15c2VsZg==

@@ -86,7 +86,7 @@
 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://goto.second.host.now/2340002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1

 Host: goto.second.host.now

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 Authorization: Basic aWFtOm15c2VsZg==

diff --git a/tests/data/test235 b/tests/data/test235
index 94abb95..e1f2a2f 100644
--- a/tests/data/test235
+++ b/tests/data/test235
@@ -21,9 +21,9 @@
 FTP resumed upload but no file present remotely
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/235 -T log/upload235 -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/upload%TESTNUMBER -C -
 </command>
-<file name="log/upload235">
+<file name="log/upload%TESTNUMBER">
 this is the *****crap******** that we're gonna upload
 
 worx?
@@ -38,8 +38,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 235

-STOR 235

+SIZE %TESTNUMBER

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test236 b/tests/data/test236
index 92e34bc..3a89add 100644
--- a/tests/data/test236
+++ b/tests/data/test236
@@ -24,9 +24,9 @@
 FTP resume upload but denied access to remote file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/236 -T log/file236.txt -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/file%TESTNUMBER.txt -C -
 </command>
-<file name="log/file236.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 </file>
 </client>
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 236

-STOR 236

+SIZE %TESTNUMBER

+STOR %TESTNUMBER

 QUIT

 </protocol>
 
diff --git a/tests/data/test237 b/tests/data/test237
index e9147dc..18ee6d9 100644
--- a/tests/data/test237
+++ b/tests/data/test237
@@ -21,7 +21,7 @@
 FTP getting bad host in 227-response to PASV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/237 --disable-epsv
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --disable-epsv
 </command>
 </client>
 
diff --git a/tests/data/test238 b/tests/data/test238
index ea54509..748ad46 100644
--- a/tests/data/test238
+++ b/tests/data/test238
@@ -21,7 +21,7 @@
 FTP getting bad port in response to EPSV
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/238
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test239 b/tests/data/test239
index b9e1872..3ba2885 100644
--- a/tests/data/test239
+++ b/tests/data/test239
@@ -67,7 +67,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
 </command>
 <precheck>
 chkhostname curlhost
@@ -77,7 +77,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1

+POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

@@ -86,9 +86,9 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1

+POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test24 b/tests/data/test24
index 54147ed..bbd5f03 100644
--- a/tests/data/test24
+++ b/tests/data/test24
@@ -3,6 +3,7 @@
 <keywords>
 HTTP
 HTTP GET
+--fail
 </keywords>
 </info>
 # Server-side
@@ -24,14 +25,14 @@
 HTTP GET fail silently on HTTP error return
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/24 --fail --silent --show-error
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail --silent --show-error
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /24 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -40,8 +41,8 @@
 <errorcode>
 22
 </errorcode>
-<file2 name="log/stderr24" mode="text">
-curl: (22) The requested URL returned error: 404 BAD BOY
+<file2 name="log/stderr%TESTNUMBER" mode="text">
+curl: (22) The requested URL returned error: 404
 </file2>
 </verify>
 </testcase>
diff --git a/tests/data/test240 b/tests/data/test240
index 0d452ee..068a2eb 100644
--- a/tests/data/test240
+++ b/tests/data/test240
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -38,7 +38,7 @@
 HTTP-IPv6 GET
  </name>
  <command>
--g "http://%HOST6IP:%HTTP6PORT/240"
+-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER"
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /240 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test241 b/tests/data/test241
index e530aaf..8fb619c 100644
--- a/tests/data/test241
+++ b/tests/data/test241
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 6
 
@@ -33,7 +33,7 @@
 HTTP-IPv6 GET (using ip6-localhost)
  </name>
  <command>
--g "http://ip6-localhost:%HTTP6PORT/241"
+-g "http://ip6-localhost:%HTTP6PORT/%TESTNUMBER"
 </command>
 <precheck>
 ./server/resolve --ipv6 ip6-localhost
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /241 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: ip6-localhost:%HTTP6PORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test242 b/tests/data/test242
index aee927e..5045559 100644
--- a/tests/data/test242
+++ b/tests/data/test242
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 
@@ -33,7 +33,7 @@
 HTTP-IPv6 GET with username+password in URL
  </name>
  <command>
--g "http://foobar:barfoo@%HOST6IP:%HTTP6PORT/242"
+-g "http://foobar:barfoo@%HOST6IP:%HTTP6PORT/%TESTNUMBER"
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /242 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOST6IP:%HTTP6PORT

 Authorization: Basic Zm9vYmFyOmJhcmZvbw==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test243 b/tests/data/test243
index 87826a8..337fef7 100644
--- a/tests/data/test243
+++ b/tests/data/test243
@@ -88,7 +88,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit"
 </command>
 <precheck>
 chkhostname curlhost
@@ -98,7 +98,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1

+POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -106,7 +106,7 @@
 Content-Length: 6

 Content-Type: application/x-www-form-urlencoded

 

-postitPOST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1

+postitPOST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

@@ -115,9 +115,9 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1

+POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test244 b/tests/data/test244
index 080163d..6755994 100644
--- a/tests/data/test244
+++ b/tests/data/test244
@@ -35,7 +35,7 @@
 FTP dir listing with nocwd and URL encoded path
  </name>
  <command>
---ftp-method nocwd ftp://%HOSTIP:%FTPPORT/fir%23t/th%69rd/244/
+--ftp-method nocwd ftp://%HOSTIP:%FTPPORT/fir%23t/th%69rd/%TESTNUMBER/
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 PWD

 EPSV

 TYPE A

-LIST fir#t/third/244

+LIST fir#t/third/%TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test245 b/tests/data/test245
index 5750b4f..2d19f0d 100644
--- a/tests/data/test245
+++ b/tests/data/test245
@@ -57,23 +57,23 @@
 HTTP POST --digest
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/245 -u auser:apasswd --digest -d "junkelijunk"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -d "junkelijunk"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /245 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /245 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/245", response="379a439b1737ba257c1d2f103914b18b"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="379a439b1737ba257c1d2f103914b18b"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test246 b/tests/data/test246
index b5469f3..22b3833 100644
--- a/tests/data/test246
+++ b/tests/data/test246
@@ -67,23 +67,23 @@
 HTTP POST --digest with server doing a 100 before 401 response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/246 -u auser:apasswd --digest -d "junkelijunk"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -d "junkelijunk"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /246 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /246 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/246", response="761e6fc9a760c39d587092e8d840e740"

+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="761e6fc9a760c39d587092e8d840e740"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 11

diff --git a/tests/data/test247 b/tests/data/test247
index 2720144..7e79d39 100644
--- a/tests/data/test247
+++ b/tests/data/test247
@@ -19,7 +19,7 @@
  <name>
 FTP upload time condition evaluates TRUE => skip upload
  </name>
-<file name="log/test247.txt">
+<file name="log/test%TESTNUMBER.txt">
 data
     to
       see
@@ -28,7 +28,7 @@
   so does it?
 </file>
  <command>
-ftp://%HOSTIP:%FTPPORT/247 -T log/test247.txt -z "apr 1 2005 08:00:00"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt -z "apr 1 2005 08:00:00"
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-MDTM 247

+MDTM %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test248 b/tests/data/test248
index d254a95..8881c99 100644
--- a/tests/data/test248
+++ b/tests/data/test248
@@ -19,7 +19,7 @@
  <name>
 FTP upload time condition evaluates FALSE => upload anyway
  </name>
-<file name="log/test248.txt">
+<file name="log/test%TESTNUMBER.txt">
 data
     to
       see
@@ -28,7 +28,7 @@
   so does it?
 </file>
  <command>
-ftp://%HOSTIP:%FTPPORT/248 -T log/test248.txt -z "apr 1 2005 08:00:00"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt -z "apr 1 2005 08:00:00"
 </command>
 </client>
 
@@ -46,10 +46,10 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-MDTM 248

+MDTM %TESTNUMBER

 EPSV

 TYPE I

-STOR 248

+STOR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test249 b/tests/data/test249
index 6b3dc6e..4f1ef6a 100644
--- a/tests/data/test249
+++ b/tests/data/test249
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 304 Not Modified swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 1910 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -32,7 +32,7 @@
 HTTP 304 response with "illegal" Content-Length: header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/249 -z "dec 12 12:00:00 1999 GMT"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "dec 12 12:00:00 1999 GMT"
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /249 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test25 b/tests/data/test25
index d694cdc..61080ca 100644
--- a/tests/data/test25
+++ b/tests/data/test25
@@ -12,7 +12,7 @@
 <data>
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
@@ -21,37 +21,37 @@
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
 HTTP/1.1 301 This is a weirdo text message
 Server: test-server/fake
-Location: data/reply/25
+Location: data/reply/%TESTNUMBER
 Content-Length: 32
 Connection: close
 
@@ -67,39 +67,39 @@
 looping HTTP Location: following with --max-redirs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/25 -L --max-redirs 5
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L --max-redirs 5
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/25 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data/reply/25 HTTP/1.1

+GET /want/data/reply/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data/reply/data/reply/25 HTTP/1.1

+GET /want/data/reply/data/reply/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data/reply/data/reply/data/reply/25 HTTP/1.1

+GET /want/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1

+GET /want/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1

+GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test256 b/tests/data/test256
index e873d57..6816bb7 100644
--- a/tests/data/test256
+++ b/tests/data/test256
@@ -29,9 +29,9 @@
 HTTP resume request over proxy with auth without server supporting it
  </name>
  <command option="no-output">
--x http://%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/want/256 -C - --no-include -o log/fewl256.txt -U daniel:stenberg
+-x http://%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -C - --no-include -o log/fewl%TESTNUMBER.txt -U daniel:stenberg
 </command>
-<file name="log/fewl256.txt">
+<file name="log/fewl%TESTNUMBER.txt">
 This text is here to simulate a partly downloaded file to resume
 download on.
 </file>
@@ -46,7 +46,7 @@
 33
 </errorcode>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/want/256 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: Basic ZGFuaWVsOnN0ZW5iZXJn

 Range: bytes=78-

@@ -57,7 +57,7 @@
 </protocol>
 
 # the download target file must remain untouched
-<file name="log/fewl256.txt">
+<file name="log/fewl%TESTNUMBER.txt">
 This text is here to simulate a partly downloaded file to resume
 download on.
 </file>
diff --git a/tests/data/test257 b/tests/data/test257
index e43baf5..701abb7 100644
--- a/tests/data/test257
+++ b/tests/data/test257
@@ -14,9 +14,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: http://anotherone.com/2570002
+Location: http://anotherone.com/%TESTNUMBER0002
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -24,16 +24,16 @@
 </data>
 <data2>
 HTTP/1.1 302 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: http://athird.com/2570003
+Location: http://athird.com/%TESTNUMBER0003
 
 If this is received, the location following worked
 
 </data2>
 <data3>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -42,18 +42,18 @@
 </data3>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: http://anotherone.com/2570002
+Location: http://anotherone.com/%TESTNUMBER0002
 Connection: close
 
 HTTP/1.1 302 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: http://athird.com/2570003
+Location: http://athird.com/%TESTNUMBER0003
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -71,13 +71,13 @@
 HTTP Location: following with --netrc-optional
  </name>
  <command>
-http://supersite.com/want/257 -L -x http://%HOSTIP:%HTTPPORT --netrc-optional --netrc-file log/netrc257
+http://supersite.com/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT --netrc-optional --netrc-file log/netrc%TESTNUMBER
 </command>
 <features>
 proxy
 </features>
 # netrc auth for two out of three sites:
-<file name="log/netrc257">
+<file name="log/netrc%TESTNUMBER">
 machine supersite.com login user1 password passwd1
 machine anotherone.com login user2 password passwd2
 </file>
@@ -86,21 +86,21 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://supersite.com/want/257 HTTP/1.1

+GET http://supersite.com/want/%TESTNUMBER HTTP/1.1

 Host: supersite.com

 Authorization: Basic dXNlcjE6cGFzc3dkMQ==

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://anotherone.com/2570002 HTTP/1.1

+GET http://anotherone.com/%TESTNUMBER0002 HTTP/1.1

 Host: anotherone.com

 Authorization: Basic dXNlcjI6cGFzc3dkMg==

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://athird.com/2570003 HTTP/1.1

+GET http://athird.com/%TESTNUMBER0003 HTTP/1.1

 Host: athird.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test258 b/tests/data/test258
index c89d5f3..c0f8c18 100644
--- a/tests/data/test258
+++ b/tests/data/test258
@@ -17,7 +17,7 @@
 # sent!
 <data>
 HTTP/1.1 407 no, tell me who you are first swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
 Proxy-Connection: close
@@ -34,7 +34,7 @@
 </data1000>
 <datacheck>
 HTTP/1.1 407 no, tell me who you are first swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
 Proxy-Connection: close
@@ -64,10 +64,10 @@
 HTTP POST multipart without Expect: header using proxy anyauth (Digest)
  </name>
  <command>
--x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/258 -F name=daniel -F tool=curl -F file=@log/test258.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
+-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
 </command>
 # We create this file before the command is invoked!
-<file name="log/test258.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo-
 This is a moo-
 bar
@@ -80,7 +80,7 @@
 ^(Content-Type: multipart/form-data;|------).*
 </strip>
 <protocol>
-POST http://remotehost:54321/we/want/258 HTTP/1.1

+POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1

 Host: remotehost:54321

 User-Agent: curl/%VERSION

 Accept: */*

@@ -97,7 +97,7 @@
 

 curl

 ------------------------------7c633d5c27ce

-Content-Disposition: form-data; name="file"; filename="test258.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
@@ -105,9 +105,9 @@
 bar
 

 ------------------------------7c633d5c27ce--

-POST http://remotehost:54321/we/want/258 HTTP/1.1

+POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1

 Host: remotehost:54321

-Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"

+Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="2501654ca391f0b5c8c12a1da77e34cd"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

@@ -123,7 +123,7 @@
 

 curl

 ------------------------------7c633d5c27ce

-Content-Disposition: form-data; name="file"; filename="test258.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
diff --git a/tests/data/test259 b/tests/data/test259
index d1da024..4b5deee 100644
--- a/tests/data/test259
+++ b/tests/data/test259
@@ -15,7 +15,7 @@
 # sent!
 <data>
 HTTP/1.1 407 no, tell me who you are first
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
 Content-Length: 0
@@ -31,7 +31,7 @@
 </data1000>
 <datacheck>
 HTTP/1.1 407 no, tell me who you are first
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Proxy-Authenticate: Digest realm="many secrets", nonce="911"
 Content-Length: 0
@@ -60,10 +60,10 @@
 HTTP POST multipart with Expect: header using proxy anyauth (Digest)
  </name>
  <command>
--x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/259 -F name=daniel -F tool=curl -F file=@log/test259.txt -U uuuser:pppassword --proxy-anyauth -H "Expect: 100-continue"
+-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt -U uuuser:pppassword --proxy-anyauth -H "Expect: 100-continue"
 </command>
 # We create this file before the command is invoked!
-<file name="log/test259.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo-
 This is a moo-
 bar
@@ -76,7 +76,7 @@
 ^(Content-Type: multipart/form-data;|------).*
 </strip>
 <protocol>
-POST http://remotehost:54321/we/want/259 HTTP/1.1

+POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1

 Host: remotehost:54321

 User-Agent: curl/%VERSION

 Accept: */*

@@ -94,7 +94,7 @@
 

 curl

 ------------------------------7c633d5c27ce

-Content-Disposition: form-data; name="file"; filename="test259.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
@@ -102,9 +102,9 @@
 bar
 

 ------------------------------7c633d5c27ce--

-POST http://remotehost:54321/we/want/259 HTTP/1.1

+POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1

 Host: remotehost:54321

-Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/259", response="b479994d13e60f3aa192a67c5892ddc5"

+Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

@@ -121,7 +121,7 @@
 

 curl

 ------------------------------7c633d5c27ce

-Content-Disposition: form-data; name="file"; filename="test259.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
diff --git a/tests/data/test26 b/tests/data/test26
index 073fed3..cd8ba42 100644
--- a/tests/data/test26
+++ b/tests/data/test26
@@ -25,14 +25,14 @@
 specify more -o than URLs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/26 -o - -o -
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -o - -o -
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/26 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test260 b/tests/data/test260
index 1e6dbe2..b706e60 100644
--- a/tests/data/test260
+++ b/tests/data/test260
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP GET URL without slash but with questionmark
  </name>
  <command>
-"http://%HOSTIP:%HTTPPORT?260"
+"http://%HOSTIP:%HTTPPORT?%TESTNUMBER"
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /?260 HTTP/1.1

+GET /?%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test261 b/tests/data/test261
index e3639bf..8a68ba9 100644
--- a/tests/data/test261
+++ b/tests/data/test261
@@ -27,7 +27,7 @@
 FTP RETR with 226 response code to TYPE
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/261
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 261

-RETR 261

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test262 b/tests/data/test262
index 8f803cf..1e03f27 100644
--- a/tests/data/test262
+++ b/tests/data/test262
Binary files differ
diff --git a/tests/data/test263 b/tests/data/test263
index 6c054a1..7a2bff9 100644
--- a/tests/data/test263
+++ b/tests/data/test263
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Content-Type: text/html
 
@@ -34,7 +34,7 @@
 HTTP-IPv6 GET with proxy specified using IPv6-numerical address
  </name>
  <command>
--g -x "http://%HOST6IP:%HTTP6PORT" http://veryveryremotesite.com/263
+-g -x "http://%HOST6IP:%HTTP6PORT" http://veryveryremotesite.com/%TESTNUMBER
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://veryveryremotesite.com/263 HTTP/1.1

+GET http://veryveryremotesite.com/%TESTNUMBER HTTP/1.1

 Host: veryveryremotesite.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test264 b/tests/data/test264
index 836c979..c4c3652 100644
--- a/tests/data/test264
+++ b/tests/data/test264
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

 Content-Length: 26

 

@@ -28,7 +28,7 @@
 HTTP with proxy string including http:// and user+password
  </name>
  <command>
-http://we.want.that.site.com/264 -x http://f%61ke:user@%HOSTIP:%HTTPPORT
+http://we.want.that.site.com/%TESTNUMBER -x http://f%61ke:user@%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com/264 HTTP/1.1

+GET http://we.want.that.site.com/%TESTNUMBER HTTP/1.1

 Host: we.want.that.site.com

 Proxy-Authorization: Basic ZmFrZTp1c2Vy

 User-Agent: curl/%VERSION

diff --git a/tests/data/test265 b/tests/data/test265
index c620473..889cf06 100644
--- a/tests/data/test265
+++ b/tests/data/test265
@@ -34,7 +34,7 @@
 # this is returned when we get a GET!
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -61,7 +61,7 @@
 Content-Type: text/html; charset=iso-8859-1

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 7
 Connection: close
 Content-Type: text/html
@@ -93,7 +93,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com.265:%HTTPPORT/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
 </command>
 <precheck>
 chkhostname curlhost
@@ -103,20 +103,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.265:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.265:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

-POST /path/2650002 HTTP/1.1

-Host: test.remote.example.com.265:%HTTPPORT

+POST /path/%TESTNUMBER0002 HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 6

diff --git a/tests/data/test266 b/tests/data/test266
index 0997ae7..6b5d2e6 100644
--- a/tests/data/test266
+++ b/tests/data/test266
@@ -49,7 +49,7 @@
 HTTP GET with chunked Transfer-Encoding and chunked trailer
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/266 -D log/heads266
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -D log/heads%TESTNUMBER
 </command>
 </client>
 
@@ -57,13 +57,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /266 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/heads266">
+<file name="log/heads%TESTNUMBER">
 HTTP/1.1 200 funky chunky!

 Server: fakeit/0.9 fakeitbad/1.0

 Transfer-Encoding: chunked

diff --git a/tests/data/test267 b/tests/data/test267
index ed10b22..a07f67e 100644
--- a/tests/data/test267
+++ b/tests/data/test267
@@ -73,7 +73,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/267 -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no"
 </command>
 <precheck>
 chkhostname curlhost
@@ -83,7 +83,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /267 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

@@ -93,9 +93,9 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST /267 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Header1: yes

diff --git a/tests/data/test268 b/tests/data/test268
index 70a5a73..851af41 100644
--- a/tests/data/test268
+++ b/tests/data/test268
@@ -35,7 +35,7 @@
 HTTP POST a non-existing file
  </name>
  <command>
- -d @nonesuchfile http://%HOSTIP:%HTTPPORT/268
+ -d @nonesuchfile http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /268 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test269 b/tests/data/test269
index ffecfed..36014c8 100644
--- a/tests/data/test269
+++ b/tests/data/test269
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Accept-Ranges: bytes
 Content-Length: 677654
@@ -26,6 +26,9 @@
 #
 # Client-side
 <client>
+<features>
+!hyper
+</features>
 <server>
 http
 </server>
@@ -33,7 +36,7 @@
 HTTP --ignore-content-length
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/269 --ignore-content-length
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --ignore-content-length
 </command>
 </client>
 
@@ -41,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /269 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test27 b/tests/data/test27
index 54b4f8a..4147413 100644
--- a/tests/data/test27
+++ b/tests/data/test27
@@ -27,25 +27,25 @@
 Get same cookie page several times
  </name>
  <command>
-"http://%HOSTIP:%HTTPPORT/want/{27,27,27}" -b none
+"http://%HOSTIP:%HTTPPORT/want/{%TESTNUMBER,%TESTNUMBER,%TESTNUMBER}" -b none
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/27 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/27 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: thewinneris=nowayyouwin

 

-GET /want/27 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test270 b/tests/data/test270
index f4eea97..983e0d2 100644
--- a/tests/data/test270
+++ b/tests/data/test270
@@ -30,7 +30,7 @@
 FTP RETR PASV --ftp-skip-pasv-ip
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/270 --ftp-skip-pasv-ip --disable-epsv
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-skip-pasv-ip --disable-epsv
 </command>
 </client>
 
@@ -42,8 +42,8 @@
 PWD

 PASV

 TYPE I

-SIZE 270

-RETR 270

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test271 b/tests/data/test271
index 1557fd0..a9a4436 100644
--- a/tests/data/test271
+++ b/tests/data/test271
@@ -27,7 +27,7 @@
 TFTP retrieve
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT//271
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /271
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test272 b/tests/data/test272
index f728a2a..c959ff3 100644
--- a/tests/data/test272
+++ b/tests/data/test272
@@ -22,7 +22,7 @@
 FTP timed conditioned get file with identical time stamp 
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/272 -z "2004 jan 1 12:12:12 UTC"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -z "2004 jan 1 12:12:12 UTC"
 </command>
 
 </client>
@@ -33,7 +33,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-MDTM 272

+MDTM %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test273 b/tests/data/test273
index 45c2935..b2b023a 100644
--- a/tests/data/test273
+++ b/tests/data/test273
@@ -59,21 +59,21 @@
 HTTP with two Digest authorization headers
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/273 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /273 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /273 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/273", response="576ae57b1db0039f8c0de43ef58e49e3"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="576ae57b1db0039f8c0de43ef58e49e3"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test274 b/tests/data/test274
index dd1b816..b0f74b4 100644
--- a/tests/data/test274
+++ b/tests/data/test274
@@ -28,14 +28,14 @@
 HTTP Location: following with --max-redirs 0
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/274 -L --max-redirs 0
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L --max-redirs 0
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/274 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test275 b/tests/data/test275
index cff99d5..c6b6b56 100644
--- a/tests/data/test275
+++ b/tests/data/test275
@@ -22,7 +22,7 @@
 
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 9
@@ -34,7 +34,7 @@
 Connected-fine: sure

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 9
@@ -54,7 +54,7 @@
 HTTP CONNECT with proxytunnel getting two URLs from the same host
  </name>
  <command>
-http://remotesite.com.275:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.275:%HTTPPORT/we/want/that/page/275
+http://remotesite.com.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -65,22 +65,22 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT remotesite.com.275:%HTTPPORT HTTP/1.1

-Host: remotesite.com.275:%HTTPPORT

+CONNECT remotesite.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: remotesite.com.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/275 HTTP/1.1

-Host: remotesite.com.275:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: remotesite.com.%TESTNUMBER:%HTTPPORT

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/want/that/page/275 HTTP/1.1

-Host: remotesite.com.275:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: remotesite.com.%TESTNUMBER:%HTTPPORT

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test276 b/tests/data/test276
index 2fa554d..07a1aae 100644
--- a/tests/data/test276
+++ b/tests/data/test276
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/2760002.txt?coolsite=http://anotherurl/?a_second/2760002
+Location: data/%TESTNUMBER0002.txt?coolsite=http://anotherurl/?a_second/%TESTNUMBER0002
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -20,7 +20,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -29,13 +29,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/2760002.txt?coolsite=http://anotherurl/?a_second/2760002
+Location: data/%TESTNUMBER0002.txt?coolsite=http://anotherurl/?a_second/%TESTNUMBER0002
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -53,19 +53,19 @@
 HTTP Location: following with multiple question marks in URLs
  </name>
  <command>
-"http://%HOSTIP:%HTTPPORT/want?uri=http://anything/276?secondq/276" -L
+"http://%HOSTIP:%HTTPPORT/want?uri=http://anything/%TESTNUMBER?secondq/%TESTNUMBER" -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want?uri=http://anything/276?secondq/276 HTTP/1.1

+GET /want?uri=http://anything/%TESTNUMBER?secondq/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /data/2760002.txt?coolsite=http://anotherurl/?a_second/2760002 HTTP/1.1

+GET /data/%TESTNUMBER0002.txt?coolsite=http://anotherurl/?a_second/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test277 b/tests/data/test277
index 7b60d40..466b793 100644
--- a/tests/data/test277
+++ b/tests/data/test277
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 11
 
@@ -27,7 +27,7 @@
 HTTP RFC1867-type formposting with custom Content-Type
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/277 -F name=daniel -H "Content-Type: text/info"
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -F name=daniel -H "Content-Type: text/info"
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
 </strippart>
 <protocol>
-POST /want/277 HTTP/1.1

+POST /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test278 b/tests/data/test278
index d706c33..7cbd470 100644
--- a/tests/data/test278
+++ b/tests/data/test278
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

 Content-Length: 27

 

@@ -28,7 +28,7 @@
 HTTP with proxy string including http:// and user+empty password
  </name>
  <command>
-http://we.want.that.site.com/278 -x http://f%61ke:@%HOSTIP:%HTTPPORT
+http://we.want.that.site.com/%TESTNUMBER -x http://f%61ke:@%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com/278 HTTP/1.1

+GET http://we.want.that.site.com/%TESTNUMBER HTTP/1.1

 Host: we.want.that.site.com

 Proxy-Authorization: Basic ZmFrZTo=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test279 b/tests/data/test279
index d26ddd9..cc91922 100644
--- a/tests/data/test279
+++ b/tests/data/test279
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

 Content-Length: 27

 

@@ -29,7 +29,7 @@
 HTTP with proxy string including http:// and user only
  </name>
  <command>
-http://we.want.that.site.com/279 -x http://f%61ke@%HOSTIP:%HTTPPORT
+http://we.want.that.site.com/%TESTNUMBER -x http://f%61ke@%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -39,7 +39,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com/279 HTTP/1.1

+GET http://we.want.that.site.com/%TESTNUMBER HTTP/1.1

 Host: we.want.that.site.com

 Proxy-Authorization: Basic ZmFrZTo=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test28 b/tests/data/test28
index 703c6d3..1966cc8 100644
--- a/tests/data/test28
+++ b/tests/data/test28
@@ -9,9 +9,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location:  /online/1,1795,Welcome,00.html/280002.txt?logout=TRUE
+Location:  /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -19,7 +19,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -28,13 +28,17 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location:  /online/1,1795,Welcome,00.html/280002.txt?logout=TRUE
+%if hyper
+Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE
+%else
+Location:  /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE
+%endif
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -52,19 +56,19 @@
 HTTP Location: following with extra spaces in header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/28 -L
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/28 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /online/1,1795,Welcome,00.html/280002.txt?logout=TRUE HTTP/1.1

+GET /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test280 b/tests/data/test280
index de7534e..71c147c 100644
--- a/tests/data/test280
+++ b/tests/data/test280
@@ -41,7 +41,7 @@
 FTP --ftp-alternative-to-user on USER failure
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/280/ --ftp-alternative-to-user "USER replacement"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER/ --ftp-alternative-to-user "USER replacement"
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 USER replacement

 PASS ftp@example.com

 PWD

-CWD 280

+CWD %TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test281 b/tests/data/test281
index f78b0c1..4210f7b 100644
--- a/tests/data/test281
+++ b/tests/data/test281
@@ -11,14 +11,11 @@
 HTTP/1.1 100 Continue
 
 HTTP/1.1 401 Bad Auth swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 WWW-Authenticate: Basic Realm=authenticate
 Server: test-server/fake
-</data>
-<datacheck>
-HTTP/1.1 100 Continue
 
-</datacheck>
+</data>
 
 </reply>
 
@@ -31,9 +28,9 @@
 HTTP PUT from file with 100 + 401 responses and -f without auth given
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/281 -f -T log/test281.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -f -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test281.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -47,7 +44,7 @@
 22
 </errorcode>
 <protocol>
-PUT /we/want/281 HTTP/1.1

+PUT /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test282 b/tests/data/test282
index 578c102..4fb9e59 100644
--- a/tests/data/test282
+++ b/tests/data/test282
@@ -25,7 +25,7 @@
 HTTP GET with no response body or headers
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/282
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /282 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test284 b/tests/data/test284
index 9b946ec..bee74f4 100644
--- a/tests/data/test284
+++ b/tests/data/test284
@@ -51,7 +51,7 @@
 TFTP retrieve of boundary case 512 byte file
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT//284
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
 </command>
 </client>
 
@@ -64,7 +64,7 @@
 tsize: 0
 blksize: 512
 timeout: 6
-filename: /284
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test285 b/tests/data/test285
index 09bfe31..23fe66e 100644
--- a/tests/data/test285
+++ b/tests/data/test285
@@ -16,9 +16,9 @@
 TFTP send
  </name>
  <command>
--T log/test285.txt tftp://%HOSTIP:%TFTPPORT//
+-T log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//
 </command>
-<file name="log/test285.txt">
+<file name="log/test%TESTNUMBER.txt">
 a chunk of
 data
 sent
@@ -41,7 +41,7 @@
 tsize: 32
 blksize: 512
 timeout: 6
-filename: /test285.txt
+filename: /test%TESTNUMBER.txt
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test286 b/tests/data/test286
index 505352a..3fa774b 100644
--- a/tests/data/test286
+++ b/tests/data/test286
@@ -16,9 +16,9 @@
 TFTP send of boundary case 512 byte file
  </name>
  <command>
--T log/test286.txt tftp://%HOSTIP:%TFTPPORT//
+-T log/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT//
 </command>
-<file name="log/test286.txt">
+<file name="log/test%TESTNUMBER.txt">
 A chunk of data which exactly fits into
 a 512 byte TFTP block, testing a boundary
 condition in the TFTP transmit code.
@@ -89,7 +89,7 @@
 tsize: 512
 blksize: 512
 timeout: 6
-filename: /test286.txt
+filename: /test%TESTNUMBER.txt
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test287 b/tests/data/test287
index 7c29f7f..71ab8d5 100644
--- a/tests/data/test287
+++ b/tests/data/test287
@@ -28,7 +28,7 @@
 HTTP proxy CONNECT with custom User-Agent header
  </name>
  <command>
-http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2015" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel --proxy-header "User-Agent: looser/2007"
+http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER -H "User-Agent: looser/2015" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel --proxy-header "User-Agent: looser/2007"
 </command>
 <features>
 proxy
@@ -38,8 +38,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.example.com.287:%HTTPPORT HTTP/1.1

-Host: test.remote.example.com.287:%HTTPPORT

+CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT

 Proxy-Connection: Keep-Alive

 User-Agent: looser/2007

 

diff --git a/tests/data/test288 b/tests/data/test288
index 26e1b84..6ee19d4 100644
--- a/tests/data/test288
+++ b/tests/data/test288
@@ -31,9 +31,9 @@
 all_proxy=http://fake:user@%HOSTIP:%NOLISTENPORT/
 </setenv>
 <command option="no-include">
-file://localhost%FILE_PWD/log/test288.txt
+file://localhost%FILE_PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test288.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
diff --git a/tests/data/test289 b/tests/data/test289
index 2720e2e..481eacf 100644
--- a/tests/data/test289
+++ b/tests/data/test289
@@ -17,7 +17,7 @@
 FTP resume upload but denied access to local file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/289 -T log/illegal-nonexistent-file -C -
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/illegal-nonexistent-file -C -
 </command>
 </client>
 
diff --git a/tests/data/test29 b/tests/data/test29
index b8a59c3..bb9916e 100644
--- a/tests/data/test29
+++ b/tests/data/test29
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 _data_result_data_
@@ -30,14 +30,14 @@
 HTTP with 2 secs timeout
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/29 -m 2
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -m 2
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/29 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test290 b/tests/data/test290
index 6078a2a..9e59311 100644
--- a/tests/data/test290
+++ b/tests/data/test290
@@ -21,7 +21,7 @@
 FTP download maximum filesize exceeded
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/290 --max-filesize 30
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --max-filesize 30
 </command>
 </client>
 
@@ -36,7 +36,7 @@
 PWD

 EPSV

 TYPE I

-SIZE 290

+SIZE %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test291 b/tests/data/test291
index 18e039e..45f041e 100644
--- a/tests/data/test291
+++ b/tests/data/test291
@@ -27,7 +27,7 @@
 FTP download maximum filesize not exceeded
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/291 --max-filesize 100
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --max-filesize 100
 </command>
 </client>
 
@@ -39,8 +39,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 291

-RETR 291

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test292 b/tests/data/test292
index 12d131d..91e2d66 100644
--- a/tests/data/test292
+++ b/tests/data/test292
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP GET with maximum filesize not exceeded
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/292 --max-filesize 1000
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-filesize 1000
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /292 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test293 b/tests/data/test293
index 2181a82..aaeefc4 100644
--- a/tests/data/test293
+++ b/tests/data/test293
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -37,7 +37,7 @@
 HTTP GET with maximum filesize exceeded
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/293 --max-filesize 2
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-filesize 2
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 63
 </errorcode>
 <protocol>
-GET /293 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test294 b/tests/data/test294
index a9752a2..4dc90e3 100644
--- a/tests/data/test294
+++ b/tests/data/test294
@@ -42,7 +42,7 @@
 FTP --ftp-account on ACCT request
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/294/ --ftp-account "data for acct"
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER/ --ftp-account "data for acct"
 </command>
 </client>
 
@@ -54,7 +54,7 @@
 PASS ftp@example.com

 ACCT data for acct

 PWD

-CWD 294

+CWD %TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test295 b/tests/data/test295
index 5b1ddcf..206c1ab 100644
--- a/tests/data/test295
+++ b/tests/data/test295
@@ -27,7 +27,7 @@
 FTP ACCT request without --ftp-account
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/295/
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER/
 </command>
 </client>
 
diff --git a/tests/data/test296 b/tests/data/test296
index 2008c8b..3c36a16 100644
--- a/tests/data/test296
+++ b/tests/data/test296
@@ -25,7 +25,7 @@
 FTP CWD with --ftp-method multicwd
  </name>
  <command>
---ftp-method multicwd ftp://%HOSTIP:%FTPPORT/first/second/third/296
+--ftp-method multicwd ftp://%HOSTIP:%FTPPORT/first/second/third/%TESTNUMBER
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 CWD third

 EPSV

 TYPE I

-SIZE 296

-RETR 296

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test297 b/tests/data/test297
index 36573f8..e4cdd85 100644
--- a/tests/data/test297
+++ b/tests/data/test297
@@ -25,7 +25,7 @@
 FTP CWD with --ftp-method singlecwd
  </name>
  <command>
---ftp-method singlecwd ftp://%HOSTIP:%FTPPORT/first/second/third/297
+--ftp-method singlecwd ftp://%HOSTIP:%FTPPORT/first/second/third/%TESTNUMBER
 </command>
 </client>
 
@@ -38,8 +38,8 @@
 CWD first/second/third

 EPSV

 TYPE I

-SIZE 297

-RETR 297

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test298 b/tests/data/test298
index 09b127f..20c8ecc 100644
--- a/tests/data/test298
+++ b/tests/data/test298
@@ -25,7 +25,7 @@
 FTP CWD with --ftp-method nocwd
  </name>
  <command>
---ftp-method nocwd ftp://%HOSTIP:%FTPPORT/first/second/th%69rd/298
+--ftp-method nocwd ftp://%HOSTIP:%FTPPORT/first/second/th%69rd/%TESTNUMBER
 </command>
 </client>
 
@@ -37,8 +37,8 @@
 PWD

 EPSV

 TYPE I

-SIZE first/second/third/298

-RETR first/second/third/298

+SIZE first/second/third/%TESTNUMBER

+RETR first/second/third/%TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test299 b/tests/data/test299
index b3fa473..9b3fd0c 100644
--- a/tests/data/test299
+++ b/tests/data/test299
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -33,14 +33,14 @@
 FTP over HTTP proxy with user:pass not in url
  </name>
  <command>
--x http://%HOSTIP:%HTTPPORT -u michal:aybabtu ftp://host.com/we/want/299
+-x http://%HOSTIP:%HTTPPORT -u michal:aybabtu ftp://host.com/we/want/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://michal:aybabtu@host.com/we/want/299 HTTP/1.1

+GET ftp://michal:aybabtu@host.com/we/want/%TESTNUMBER HTTP/1.1

 Host: host.com:21

 Authorization: Basic bWljaGFsOmF5YmFidHU=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test3 b/tests/data/test3
index 0dc3b46..f28d0cc 100644
--- a/tests/data/test3
+++ b/tests/data/test3
@@ -36,7 +36,7 @@
 HTTP POST with auth and contents but with content-length set to 0
  </name>
  <command>
- -d "fooo=mooo&pooo=clue&doo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HTTPPORT/3
+ -d "fooo=mooo&pooo=clue&doo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /3 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic ZmFrZTotdXNlcg==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test30 b/tests/data/test30
index ab4425d..2a84b4c 100644
--- a/tests/data/test30
+++ b/tests/data/test30
@@ -21,14 +21,14 @@
 HTTP with no data in server reply
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/30
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/30 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test300 b/tests/data/test300
index 63e308d..efbf97f 100644
--- a/tests/data/test300
+++ b/tests/data/test300
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -32,7 +32,7 @@
 simple HTTPS GET
  </name>
  <command>
--k https://%HOSTIP:%HTTPSPORT/300
+-k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /300 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test3000 b/tests/data/test3000
index 1fc58f2..db5299e 100644
--- a/tests/data/test3000
+++ b/tests/data/test3000
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -33,7 +33,7 @@
 HTTPS GET to localhost, first subject alt name matches, CN does not match
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/3000
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /3000 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test3001 b/tests/data/test3001
index a16bdb4..534a5cd 100644
--- a/tests/data/test3001
+++ b/tests/data/test3001
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -33,7 +33,7 @@
 HTTPS GET to localhost, last subject alt name matches, CN does not match
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/3001
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /3001 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test3002 b/tests/data/test3002
index ac68202..b6c94ec 100644
--- a/tests/data/test3002
+++ b/tests/data/test3002
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/3002 --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 3002

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<invalid.one>

 RCPT TO:<recipient.two@example.com>

diff --git a/tests/data/test3003 b/tests/data/test3003
index 7515aff..23e86c0 100644
--- a/tests/data/test3003
+++ b/tests/data/test3003
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/3003 --mail-rcpt-allowfails --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt invalid.five --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt invalid.five --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 3003

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient.one@example.com>

 RCPT TO:<recipient.two@example.com>

diff --git a/tests/data/test3004 b/tests/data/test3004
index e021cde..1f646ee 100644
--- a/tests/data/test3004
+++ b/tests/data/test3004
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/3004 --mail-rcpt-allowfails --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt invalid.three --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt invalid.three --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 3004

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient.one@example.com>

 RCPT TO:<recipient.two@example.com>

diff --git a/tests/data/test3005 b/tests/data/test3005
index 256555a..ffaa475 100644
--- a/tests/data/test3005
+++ b/tests/data/test3005
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/3005 --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt recipient.two@example.com --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt recipient.two@example.com --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 3005

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<invalid.one>

 RCPT TO:<recipient.two@example.com>

diff --git a/tests/data/test3006 b/tests/data/test3006
index f54d71c..9753d74 100644
--- a/tests/data/test3006
+++ b/tests/data/test3006
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/3006 --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt invalid.two --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-rcpt invalid.two --mail-rcpt invalid.three --mail-rcpt invalid.four --mail-rcpt invalid.five --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 3006

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<invalid.one>

 RCPT TO:<invalid.two>

diff --git a/tests/data/test3007 b/tests/data/test3007
index b0d6902..74497ed 100644
--- a/tests/data/test3007
+++ b/tests/data/test3007
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/3007 --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt-allowfails --mail-rcpt invalid.one --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 3007

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<invalid.one>

 QUIT

diff --git a/tests/data/test3008 b/tests/data/test3008
index 0010eeb..31aa4f7 100644
--- a/tests/data/test3008
+++ b/tests/data/test3008
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 --output-dir
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/this/is/the/3008 -O --output-dir %PWD/log
+http://%HOSTIP:%HTTPPORT/this/is/the/%TESTNUMBER -O --output-dir %PWD/log
 </command>
 </client>
 
@@ -44,13 +44,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /this/is/the/3008 HTTP/1.1

+GET /this/is/the/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/3008">
+<file name="log/%TESTNUMBER">
 -foo-
 </file>
 </verify>
diff --git a/tests/data/test3009 b/tests/data/test3009
index f9bf11b..213e8ae 100644
--- a/tests/data/test3009
+++ b/tests/data/test3009
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 --output-dir a non-existing directory
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/this/is/the/3009 -O --output-dir %PWD/not-there
+http://%HOSTIP:%HTTPPORT/this/is/the/%TESTNUMBER -O --output-dir %PWD/not-there
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /this/is/the/3009 HTTP/1.1

+GET /this/is/the/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test301 b/tests/data/test301
index 760497a..167a718 100644
--- a/tests/data/test301
+++ b/tests/data/test301
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes
@@ -33,7 +33,7 @@
 HTTPS GET with user and password
  </name>
  <command>
--k -u fake:user https://%HOSTIP:%HTTPSPORT/301
+-k -u fake:user https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /301 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 Authorization: Basic ZmFrZTp1c2Vy

 User-Agent: curl/%VERSION

diff --git a/tests/data/test3010 b/tests/data/test3010
index 1372a79..df5aadb 100644
--- a/tests/data/test3010
+++ b/tests/data/test3010
@@ -11,17 +11,17 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 301 Moved Permanently
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 0
 Retry-After: 2
-Location: /30100002
+Location: /%TESTNUMBER0002
 
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 0
@@ -39,19 +39,19 @@
 HTTP retry-after reset
 </name>
 <tool>
-lib3010
+lib%TESTNUMBER
 </tool>
 
 <command>
-%HOSTIP:%HTTPPORT/3010
+%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <stdout>
-Retry-After: 2
-Retry-After: 0
+Retry-After 2
+Retry-After 0
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test3011 b/tests/data/test3011
index 267d6ee..c282cdb 100644
--- a/tests/data/test3011
+++ b/tests/data/test3011
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 --output-dir with --create-dirs
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/this/is/the/3011 -O --output-dir %PWD/log/tmp --create-dirs
+http://%HOSTIP:%HTTPPORT/this/is/the/%TESTNUMBER -O --output-dir %PWD/log/tmp --create-dirs
 </command>
 </client>
 
@@ -44,13 +44,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /this/is/the/3011 HTTP/1.1

+GET /this/is/the/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/tmp/3011">
+<file name="log/tmp/%TESTNUMBER">
 -foo-
 </file>
 </verify>
diff --git a/tests/data/test3012 b/tests/data/test3012
index b4441cb..1889c93 100644
--- a/tests/data/test3012
+++ b/tests/data/test3012
@@ -11,14 +11,14 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
 Accept-Ranges: bytes
 Content-Length: 6
 Connection: close
-Content-Disposition: inline; filename="MMM3012MMM"
+Content-Disposition: inline; filename="MMM%TESTNUMBERMMM"
 Content-Type: text/html
 Funny-head: yesyes
 
@@ -39,7 +39,7 @@
 --output-dir with -J
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/this/is/the/3012 -OJ --output-dir %PWD/log
+http://%HOSTIP:%HTTPPORT/this/is/the/%TESTNUMBER -OJ --output-dir %PWD/log
 </command>
 </client>
 
@@ -47,13 +47,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /this/is/the/3012 HTTP/1.1

+GET /this/is/the/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/MMM3012MMM">
+<file name="log/MMM%TESTNUMBERMMM">
 -foo-
 </file>
 </verify>
diff --git a/tests/data/test3013 b/tests/data/test3013
index 206b9e3..9c0ce44 100644
--- a/tests/data/test3013
+++ b/tests/data/test3013
@@ -11,14 +11,14 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
 Accept-Ranges: bytes
 Content-Length: 6
 Connection: close
-Content-Disposition: inline; filename="MMM3013MMM"
+Content-Disposition: inline; filename="MMM%TESTNUMBERMMM"
 Content-Type: text/html
 Funny-head: yesyes
 
@@ -39,7 +39,7 @@
 Two --output-dir with --next in between
 </name>
 <command option="no-output,no-include">
-http://%HOSTIP:%HTTPPORT/this/is/the/3013 -O --output-dir %PWD/log http://%HOSTIP:%HTTPPORT/another/3013 -o second3013 --output-dir %PWD/log
+http://%HOSTIP:%HTTPPORT/this/is/the/%TESTNUMBER -O --output-dir %PWD/log http://%HOSTIP:%HTTPPORT/another/%TESTNUMBER -o second%TESTNUMBER --output-dir %PWD/log
 </command>
 </client>
 
@@ -47,21 +47,21 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /this/is/the/3013 HTTP/1.1

+GET /this/is/the/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /another/3013 HTTP/1.1

+GET /another/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/3013">
+<file name="log/%TESTNUMBER">
 -foo-
 </file>
-<file2 name="log/second3013">
+<file2 name="log/second%TESTNUMBER">
 -foo-
 </file2>
 </verify>
diff --git a/tests/data/test3014 b/tests/data/test3014
index e36a0e0..eb5c705 100644
--- a/tests/data/test3014
+++ b/tests/data/test3014
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
@@ -37,7 +37,7 @@
 <verify>
 <stdout nonewline="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 9
 Connection: close
 Content-Type: text/plain
diff --git a/tests/data/test3015 b/tests/data/test3015
index 9c86d02..523d06a 100644
--- a/tests/data/test3015
+++ b/tests/data/test3015
@@ -18,7 +18,7 @@
 Content-Length: 8

 Connection: close

 Content-Type: text/plain

-Location: ./30150001

+Location: ./%TESTNUMBER0001

 

 monster
 </data>
@@ -50,7 +50,7 @@
 HTTP GET -w num_headers with redirected fetch (2 connects)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/3015 -w "%{num_headers}\n" -L -o/dev/null
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{num_headers}\n" -L -o/dev/null
 </command>
 </client>
 
@@ -58,12 +58,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /3015 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /30150001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test3016 b/tests/data/test3016
new file mode 100644
index 0000000..d04633c
--- /dev/null
+++ b/tests/data/test3016
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+FILE
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+file
+</server>
+<name>
+GET a directory using file://
+</name>
+<!-- doesn't work on win32, see #6379 -->
+<features>
+!win32
+</features>
+<command>
+file://%PWD/
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test3017 b/tests/data/test3017
new file mode 100644
index 0000000..4d907b3
--- /dev/null
+++ b/tests/data/test3017
@@ -0,0 +1,67 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 33 30 31 37   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+<servercmd>
+excessive-remaining TRUE
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT SUBSCRIBE with pathological PUBLISH length
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -m 3
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+# on windows the disconnect is never seen - no idea why
+<strip>
+^server DISCONNECT 0 e000
+</strip>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020000
+client SUBSCRIBE 9 000100043330313700
+server SUBACK 3 9003000100
+server PUBLISH c 30ffffff8000043330313768656c6c6f0a
+</protocol>
+
+# 8 is CURLE_WEIRD_SERVER_REPLY
+<errorcode>
+8
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test3018 b/tests/data/test3018
new file mode 100644
index 0000000..71e06b5
--- /dev/null
+++ b/tests/data/test3018
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+MQTT
+MQTT SUBSCRIBE
+--max-filesize
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+hello
+</data>
+<datacheck hex="yes">
+00 04 33 30 31 38   68 65 6c 6c 6f 5b 4c 46 5d 0a
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+mqtt
+</features>
+<server>
+mqtt
+</server>
+<name>
+MQTT SUBSCRIBE with PUBLISH larger than --max-filesize
+</name>
+<command option="binary-trace">
+mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER --max-filesize 11
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# These are hexadecimal protocol dumps from the client
+#
+# Strip out the random part of the client id from the CONNECT message
+# before comparison
+<strippart>
+s/^(.* 00044d5154540402003c000c6375726c).*/$1/
+</strippart>
+# on windows the disconnect is never seen - no idea why
+<strip>
+^server DISCONNECT 0 e000
+</strip>
+<protocol>
+client CONNECT 18 00044d5154540402003c000c6375726c
+server CONNACK 2 20020000
+client SUBSCRIBE 9 000100043330313800
+server SUBACK 3 9003000100
+server PUBLISH c 300c00043330313868656c6c6f0a
+</protocol>
+
+# 63 is CURLE_FILESIZE_EXCEEDED
+<errorcode>
+63
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test3019 b/tests/data/test3019
new file mode 100644
index 0000000..0403278
--- /dev/null
+++ b/tests/data/test3019
@@ -0,0 +1,36 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--resolve
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP with invalid --resolve syntax
+</name>
+<command>
+--resolve %HTTPPORT:example.com:%HOSTIP http://example.com:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+49
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test302 b/tests/data/test302
index bdef98e..755d4b2 100644
--- a/tests/data/test302
+++ b/tests/data/test302
@@ -33,7 +33,7 @@
 HTTPS GET over HTTP proxy fails
  </name>
  <command>
--k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test:302/slash/302
+-k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test:%TESTNUMBER/slash/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test3020 b/tests/data/test3020
new file mode 100644
index 0000000..25bf6dd
--- /dev/null
+++ b/tests/data/test3020
@@ -0,0 +1,36 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--connect-to
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP with invalid --connect-to syntax
+</name>
+<command>
+--connect-to ::example.com:example.com http://example.com:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+49
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test303 b/tests/data/test303
index e05da5b..318cbe6 100644
--- a/tests/data/test303
+++ b/tests/data/test303
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 _data_result_data_
@@ -33,14 +33,14 @@
 HTTPS with 8 secs timeout
  </name>
  <command>
--k https://%HOSTIP:%HTTPSPORT/want/303 -m 8
+-k https://%HOSTIP:%HTTPSPORT/want/%TESTNUMBER -m 8
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/303 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test304 b/tests/data/test304
index 50baf1c..b403072 100644
--- a/tests/data/test304
+++ b/tests/data/test304
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Content-Length: 10

+Content-Length: 10
 
 blablabla
 </data>
@@ -30,10 +30,10 @@
 HTTPS multipart formpost
  </name>
  <command>
--k https://%HOSTIP:%HTTPSPORT/we/want/304 -F name=daniel -F tool=curl -F file=@log/test304.txt
+-k https://%HOSTIP:%HTTPSPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt
 </command>
 # We create this file before the command is invoked!
-<file name="log/test304.txt">
+<file name="log/test%TESTNUMBER.txt">
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 </file>
 </client>
@@ -44,7 +44,7 @@
 ^(Content-Type: multipart/form-data;|------).*
 </strip>
 <protocol>
-POST /we/want/304 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -60,7 +60,7 @@
 

 curl

 ------------------------------c3b2ef7f0bb8

-Content-Disposition: form-data; name="file"; filename="test304.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-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305 b/tests/data/test305
index f60226c..4ca5789 100644
--- a/tests/data/test305
+++ b/tests/data/test305
@@ -19,7 +19,7 @@
 insecure HTTPS without permission
  </name>
  <command>
-https://%HOSTIP:%HTTPSPORT/want/305 --cacert moooo
+https://%HOSTIP:%HTTPSPORT/want/%TESTNUMBER --cacert moooo
 </command>
 </client>
 
diff --git a/tests/data/test306 b/tests/data/test306
index b9150af..ee88702 100644
--- a/tests/data/test306
+++ b/tests/data/test306
@@ -37,6 +37,7 @@
 <client>
 <features>
 SSL
+!hyper
 </features>
 <server>
 https
@@ -45,7 +46,7 @@
 HTTPS GET, receive no headers only data!
  </name>
  <command>
--k https://%HOSTIP:%HTTPSPORT/306 --http0.9
+-k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --http0.9
 </command>
 </client>
 
@@ -53,7 +54,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /306 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test307 b/tests/data/test307
index 5fb9faa..4c004ae 100644
--- a/tests/data/test307
+++ b/tests/data/test307
@@ -29,14 +29,14 @@
 https
 </server>
 <precheck>
-perl %SRCDIR/libtest/test307.pl %CURL
+perl %SRCDIR/libtest/test%TESTNUMBER.pl %CURL
 </precheck>
 
  <name>
 simple HTTPS GET with openssl engine
  </name>
  <command>
---engine openssl -k https://%HOSTIP:%HTTPSPORT/307
+--engine openssl -k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /307 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test308 b/tests/data/test308
index 1a3c8ec..7534ed6 100644
--- a/tests/data/test308
+++ b/tests/data/test308
@@ -21,7 +21,7 @@
 simple HTTPS GET with invalid crypto engine
  </name>
  <command>
---engine invalid-crypto-engine-xyzzy -k https://%HOSTIP:%HTTPSPORT/308
+--engine invalid-crypto-engine-xyzzy -k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test309 b/tests/data/test309
index c766fca..0a3b529 100644
--- a/tests/data/test309
+++ b/tests/data/test309
@@ -12,9 +12,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: https://127.0.0.1:%HTTPSPORT/data/3090002.txt?coolsite=yes

+Location: https://%HOSTIP:%HTTPSPORT/data/%TESTNUMBER0002.txt?coolsite=yes

 Connection: close

 

 This server reply is for testing a simple Location: following to HTTPS URL
@@ -22,7 +22,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 52

 

@@ -31,13 +31,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: https://127.0.0.1:%HTTPSPORT/data/3090002.txt?coolsite=yes

+Location: https://%HOSTIP:%HTTPSPORT/data/%TESTNUMBER0002.txt?coolsite=yes

 Connection: close

 

 HTTP/1.1 200 Followed here fine swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 52

 

@@ -59,19 +59,19 @@
 HTTP Location: redirect to HTTPS URL
  </name>
  <command>
--k http://%HOSTIP:%HTTPPORT/want/309 -L
+-k http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/309 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /data/3090002.txt?coolsite=yes HTTP/1.1

+GET /data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test31 b/tests/data/test31
index 0bf5633..2ccb032 100644
--- a/tests/data/test31
+++ b/tests/data/test31
@@ -8,14 +8,21 @@
 </keywords>
 </info>
 # Server-side
+#
+# The cookies set come in two versions. This is because when curl is built
+# with Hyper, the API provides the headers already "sanitized" so we cannot
+# compapare with the exact server contents unlesss it too sends the data
+# "clean".
+
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 4

 Content-Type: text/html

 Funny-head: yesyes

+%if !hyper
 Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure

 Set-Cookie:ismatch=this  ; domain=127.0.0.1; path=/silly/

 Set-Cookie: overwrite=this  ; domain=127.0.0.1; path=/overwrite/

@@ -57,6 +64,49 @@
 Set-Cookie: withspaces2 =before equals;

 Set-Cookie: prespace=  yes before;

 Set-Cookie: securewithspace=after    ; secure =

+%else
+Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure

+Set-Cookie: ismatch=this  ; domain=127.0.0.1; path=/silly/

+Set-Cookie: overwrite=this  ; domain=127.0.0.1; path=/overwrite/

+Set-Cookie: overwrite=this2  ; domain=127.0.0.1; path=/overwrite

+Set-Cookie: sec1value=secure1  ; domain=127.0.0.1; path=/secure1/ ; secure

+Set-Cookie: sec2value=secure2  ; domain=127.0.0.1; path=/secure2/ ; secure=

+Set-Cookie: sec3value=secure3  ; domain=127.0.0.1; path=/secure3/ ; secure=

+Set-Cookie: sec4value=secure4  ; secure=; domain=127.0.0.1; path=/secure4/ ;

+Set-Cookie: sec5value=secure5  ; secure; domain=127.0.0.1; path=/secure5/ ;

+Set-Cookie: sec6value=secure6  ; secure ; domain=127.0.0.1; path=/secure6/ ;

+Set-Cookie: sec7value=secure7  ; secure   ; domain=127.0.0.1; path=/secure7/ ;

+Set-Cookie: sec8value=secure8  ; secure= ; domain=127.0.0.1; path=/secure8/ ;

+Set-Cookie: secure=very1  ; secure=; domain=127.0.0.1; path=/secure9/;

+Set-Cookie: httpo1=value1  ; domain=127.0.0.1; path=/p1/; httponly

+Set-Cookie: httpo2=value2  ; domain=127.0.0.1; path=/p2/; httponly=

+Set-Cookie: httpo3=value3  ; httponly; domain=127.0.0.1; path=/p3/;

+Set-Cookie: httpo4=value4  ; httponly=; domain=127.0.0.1; path=/p4/;

+Set-Cookie: httponly=myvalue1  ; domain=127.0.0.1; path=/p4/; httponly

+Set-Cookie: httpandsec=myvalue2  ; domain=127.0.0.1; path=/p4/; httponly; secure

+Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure

+Set-Cookie: httpandsec3=myvalue4  ; domain=127.0.0.1; path=/p4/; httponly; secure=

+Set-Cookie: httpandsec4=myvalue5  ; domain=127.0.0.1; path=/p4/; httponly=; secure=

+Set-Cookie: httpandsec5=myvalue6  ; domain=127.0.0.1; path=/p4/; secure; httponly=

+Set-Cookie: httpandsec6=myvalue7  ; domain=127.0.0.1; path=/p4/; secure=; httponly=

+Set-Cookie: httpandsec7=myvalue8  ; domain=127.0.0.1; path=/p4/; secure; httponly

+Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly

+Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;

+Set-Cookie: eat=this; domain=moo.foo.moo;

+Set-Cookie: eat=this-too; domain=.foo.moo;

+Set-Cookie: nodomainnovalue

+Set-Cookie: nodomain=value; expires=Fri Feb 13 11:56:27 GMT 2037

+Set-Cookie: novalue; domain=reallysilly

+Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030

+Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030

+Set-Cookie: magic=yessir; path=/silly/; HttpOnly

+Set-Cookie: blexp=yesyes; domain=127.0.0.1; domain=127.0.0.1; expiry=totally bad;

+Set-Cookie: partialip=nono; domain=.0.0.1;

+Set-Cookie: withspaces=  yes  within and around    ;

+Set-Cookie: withspaces2 =before equals;

+Set-Cookie: prespace=  yes before;

+Set-Cookie: securewithspace=after    ; secure =

+%endif
 

 boo
 </data>
@@ -77,7 +127,7 @@
 TZ=GMT
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b none -c log/jar%TESTNUMBER.txt
 </command>
 <precheck>
 perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
@@ -87,15 +137,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/31 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/jar31.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 127.0.0.1	FALSE	/we/want/	FALSE	0	prespace	yes before
diff --git a/tests/data/test310 b/tests/data/test310
index 128c917..c31085b 100644
--- a/tests/data/test310
+++ b/tests/data/test310
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
 
@@ -33,7 +33,7 @@
 simple HTTPS GET
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/310
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /310 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: localhost:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test311 b/tests/data/test311
index 87f4ddd..0e05b63 100644
--- a/tests/data/test311
+++ b/tests/data/test311
@@ -25,7 +25,7 @@
 HTTPS wrong subjectAltName but right CN
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/311
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
diff --git a/tests/data/test312 b/tests/data/test312
index 6a79f59..f013a7c 100644
--- a/tests/data/test312
+++ b/tests/data/test312
@@ -25,7 +25,7 @@
 HTTPS GET to localhost and null-prefixed CN cert
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/312
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
diff --git a/tests/data/test313 b/tests/data/test313
index c54495a..d87a464 100644
--- a/tests/data/test313
+++ b/tests/data/test313
@@ -21,7 +21,7 @@
 CRL test
  </name>
  <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --crlfile %SRCDIR/certs/Server-localhost-sv.crl https://localhost:%HTTPSPORT/313
+--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --crlfile %SRCDIR/certs/Server-localhost-sv.crl https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
diff --git a/tests/data/test314 b/tests/data/test314
index 899200d..cdc36af 100644
--- a/tests/data/test314
+++ b/tests/data/test314
@@ -174,7 +174,7 @@
 HTTP GET brotli compressed content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/314 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -182,14 +182,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /314 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test315 b/tests/data/test315
index 605bb0f..3073251 100644
--- a/tests/data/test315
+++ b/tests/data/test315
@@ -64,7 +64,7 @@
 HTTP GET brotli compressed content with broken header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/315 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -72,14 +72,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /315 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 <errorcode>
diff --git a/tests/data/test316 b/tests/data/test316
index 6b95b37..be7de17 100644
--- a/tests/data/test316
+++ b/tests/data/test316
@@ -174,7 +174,7 @@
 HTTP GET brotli compressed content of size more than CURL_MAX_WRITE_SIZE
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/316 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -182,14 +182,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /316 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test317 b/tests/data/test317
index b7723c7..a8cfd61 100644
--- a/tests/data/test317
+++ b/tests/data/test317
@@ -13,11 +13,11 @@
 <reply>
 <data>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/3170002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
@@ -25,7 +25,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -36,16 +36,16 @@
 
 <datacheck>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/3170002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -65,7 +65,7 @@
 HTTP with custom Authorization: and redirect to new host
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/317 -x %HOSTIP:%HTTPPORT -H "Authorization: s3cr3t" --proxy-user testing:this --location
+http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT -H "Authorization: s3cr3t" --proxy-user testing:this --location
 </command>
 <features>
 proxy
@@ -76,7 +76,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/317 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: first.host.it.is

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 User-Agent: curl/%VERSION

@@ -84,7 +84,7 @@
 Proxy-Connection: Keep-Alive

 Authorization: s3cr3t

 

-GET http://goto.second.host.now/3170002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1

 Host: goto.second.host.now

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 User-Agent: curl/%VERSION

diff --git a/tests/data/test318 b/tests/data/test318
index 6e3621e..94a53e8 100644
--- a/tests/data/test318
+++ b/tests/data/test318
@@ -13,11 +13,11 @@
 <reply>
 <data>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/3180002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
@@ -25,7 +25,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -36,16 +36,16 @@
 
 <datacheck>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/3180002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -65,7 +65,7 @@
 HTTP with custom Authorization: and redirect to new host
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/318 -x %HOSTIP:%HTTPPORT -H "Authorization: s3cr3t" --proxy-user testing:this --location-trusted
+http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT -H "Authorization: s3cr3t" --proxy-user testing:this --location-trusted
 </command>
 <features>
 proxy
@@ -76,7 +76,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/318 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: first.host.it.is

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 User-Agent: curl/%VERSION

@@ -84,7 +84,7 @@
 Proxy-Connection: Keep-Alive

 Authorization: s3cr3t

 

-GET http://goto.second.host.now/3180002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1

 Host: goto.second.host.now

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 User-Agent: curl/%VERSION

diff --git a/tests/data/test319 b/tests/data/test319
index 855ea3e..a27c99f 100644
--- a/tests/data/test319
+++ b/tests/data/test319
@@ -37,7 +37,7 @@
 HTTP GET gzip transfer-encoded data in raw mode
  </name>
  <command option="no-include">
-http://%HOSTIP:%HTTPPORT/319 --raw
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --raw
  </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /319 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test32 b/tests/data/test32
index e2c5edf..d5762f4 100644
--- a/tests/data/test32
+++ b/tests/data/test32
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP with -d and -G
  </name>
  <command>
--d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/32 -G
+-d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/%TESTNUMBER -G
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /32?foo=moo&moo=poo HTTP/1.1

+GET /%TESTNUMBER?foo=moo&moo=poo HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test320 b/tests/data/test320
index 87311d4..88f99cc 100644
--- a/tests/data/test320
+++ b/tests/data/test320
@@ -58,7 +58,7 @@
 <verify>
 <protocol>
 </protocol>
-<file name="log/curl320.out">
+<file name="log/curl%TESTNUMBER.out">
 HTTP/1.0 200 OK

 Content-type: text/html

 

diff --git a/tests/data/test323 b/tests/data/test323
index 6439b4d..c46c02a 100644
--- a/tests/data/test323
+++ b/tests/data/test323
@@ -19,7 +19,7 @@
 TLS-SRP to non-TLS-SRP server
  </name>
 <command>
---insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword badpass https://%HOSTIP:%HTTPSPORT/want/323
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword badpass https://%HOSTIP:%HTTPSPORT/want/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test324 b/tests/data/test324
index 461e54c..159f36b 100644
--- a/tests/data/test324
+++ b/tests/data/test324
@@ -19,7 +19,7 @@
 TLS-SRP with server cert checking
  </name>
 <command> # no --insecure
---tlsauthtype SRP --tlsuser jsmith --tlspassword abc https://%HOSTIP:%HTTPTLSPORT/want/323
+--tlsauthtype SRP --tlsuser jsmith --tlspassword abc https://%HOSTIP:%HTTPTLSPORT/want/fails
 </command>
 </client>
 
diff --git a/tests/data/test325 b/tests/data/test325
index 93d7e21..4bdf2aa 100644
--- a/tests/data/test325
+++ b/tests/data/test325
@@ -12,19 +12,19 @@
 <reply>
 <data>
 HTTP/1.1 301 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
-Location: http://somewhere/325
+Location: http://somewhere/%TESTNUMBER
 
 MooMoo
 </data>
 <datacheck>
 HTTP/1.1 301 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 7
-Location: http://somewhere/325
+Location: http://somewhere/%TESTNUMBER
 
 </datacheck>
 </reply>
@@ -42,7 +42,7 @@
 HTTPS with attempted redirect to denied HTTP
  </name>
  <command>
--k https://%HOSTIP:%HTTPSPORT/325 --proto-redir -http --location
+-k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --proto-redir -http --location
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /325 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test326 b/tests/data/test326
index 09ca9c0..25f201e 100644
--- a/tests/data/test326
+++ b/tests/data/test326
@@ -46,7 +46,7 @@
 HTTP GET chunked data in raw mode
  </name>
  <command option="no-include">
-http://%HOSTIP:%HTTPPORT/326 --raw
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --raw
  </command>
 </client>
 
@@ -54,7 +54,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /326 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test327 b/tests/data/test327
index 808a4e9..73cedb6 100644
--- a/tests/data/test327
+++ b/tests/data/test327
@@ -16,7 +16,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -25,7 +25,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -43,28 +43,28 @@
 HTTP with cookiejar without cookies left
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/327 -b none -c log/cookies327 http://%HOSTIP:%HTTPPORT/we/want/3270002
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b none -c log/cookies%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER0002
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/327 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/want/3270002 HTTP/1.1

+GET /we/want/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: foobar=name

 

 </protocol>
-<file name="log/cookies327" mode="text">
+<file name="log/cookies%TESTNUMBER" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 </file>
diff --git a/tests/data/test328 b/tests/data/test328
index bc353a5..f17af3c 100644
--- a/tests/data/test328
+++ b/tests/data/test328
@@ -11,12 +11,12 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Type: text/html
 Content-Encoding: none
 Content-Length: 38
 
-Q: What did 0 say to 8? A: Nice Belt!
+Q- What did 0 say to 8? A- Nice Belt!
 </data>
 </reply>
 
@@ -35,7 +35,7 @@
 HTTP with "Content-Encoding: none
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/hello/328 --compressed
+http://%HOSTIP:%HTTPPORT/hello/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 ^Accept-Encoding:.*
 </strip>
 <protocol>
-GET /hello/328 HTTP/1.1

+GET /hello/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test329 b/tests/data/test329
index e766c83..d25f968 100644
--- a/tests/data/test329
+++ b/tests/data/test329
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -30,9 +30,12 @@
 
 # Client-side
 <client>
-<file name="log/jar329.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 .host.foo.com	TRUE	/we/want/	FALSE	2147483647	test	no
 </file>
+<file name="log/jar%TESTNUMBER-2.txt" mode="text">
+.host.foo.com	TRUE	/we/want/	FALSE	2147483647	tester	yes
+</file>
 <server>
 http
 </server>
@@ -46,23 +49,24 @@
 TZ=GMT
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/329 -b log/jar329.txt -H "Host: host.foo.com" http://%HOSTIP:%HTTPPORT/we/want/3290002
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b log/jar%TESTNUMBER.txt -b log/jar%TESTNUMBER-2.txt -H "Host: host.foo.com" http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER0002
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/329 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: host.foo.com

 User-Agent: curl/%VERSION

 Accept: */*

-Cookie: test=no

+Cookie: tester=yes; test=no

 

-GET /we/want/3290002 HTTP/1.1

+GET /we/want/%TESTNUMBER0002 HTTP/1.1

 Host: host.foo.com

 User-Agent: curl/%VERSION

 Accept: */*

+Cookie: tester=yes

 

 </protocol>
 </verify>
diff --git a/tests/data/test33 b/tests/data/test33
index 6b3c9d7..1b9c898 100644
--- a/tests/data/test33
+++ b/tests/data/test33
@@ -23,7 +23,7 @@
  <name>
 HTTP PUT with resume
  </name>
-<file name="log/test33.txt">
+<file name="log/test%TESTNUMBER.txt">
 012345678
 012345678
 012345678
@@ -36,14 +36,14 @@
 012345678
 </file>
  <command>
-http://%HOSTIP:%HTTPPORT/33 -Tlog/test33.txt -C 50
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -Tlog/test%TESTNUMBER.txt -C 50
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /33 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Content-Range: bytes 50-99/100

 User-Agent: curl/%VERSION

diff --git a/tests/data/test330 b/tests/data/test330
index 40cc097..d145fc0 100644
--- a/tests/data/test330
+++ b/tests/data/test330
@@ -2,6 +2,7 @@
 <info>
 <keywords>
 HTTP
+HTTP proxy
 followlocation
 cookies
 </keywords>
@@ -11,11 +12,11 @@
 <reply>
 <data>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/3170002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
@@ -23,7 +24,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -34,16 +35,16 @@
 
 <datacheck>
 HTTP/1.1 302 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
-Location: http://goto.second.host.now/3170002
+Location: http://goto.second.host.now/%TESTNUMBER0002
 Content-Length: 8
 Connection: close
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -63,7 +64,7 @@
 HTTP with custom Cookie: and redirect to new host
  </name>
  <command>
-http://first.host.it.is/we/want/that/page/317 -x %HOSTIP:%HTTPPORT -H "Cookie: test=yes" --location
+http://first.host.it.is/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT -H "Cookie: test=yes" --location
 </command>
 <features>
 proxy
@@ -74,14 +75,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://first.host.it.is/we/want/that/page/317 HTTP/1.1

+GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: first.host.it.is

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 Cookie: test=yes

 

-GET http://goto.second.host.now/3170002 HTTP/1.1

+GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1

 Host: goto.second.host.now

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test331 b/tests/data/test331
index f6b0085..8fc6898 100644
--- a/tests/data/test331
+++ b/tests/data/test331
@@ -3,6 +3,7 @@
 <keywords>
 HTTP
 HTTP GET
+HTTP proxy
 cookies
 </keywords>
 </info>
@@ -11,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 4
@@ -21,7 +22,7 @@
 </data>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Content-Length: 0
@@ -39,7 +40,7 @@
 HTTP with cookie using host name 'moo'
  </name>
  <command>
--x http://%HOSTIP:%HTTPPORT http://moo/we/want/331 -b none http://moo/we/want/3310002
+-x http://%HOSTIP:%HTTPPORT http://moo/we/want/%TESTNUMBER -b none http://moo/we/want/%TESTNUMBER0002
 </command>
 <features>
 proxy
@@ -49,13 +50,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://moo/we/want/331 HTTP/1.1

+GET http://moo/we/want/%TESTNUMBER HTTP/1.1

 Host: moo

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://moo/we/want/3310002 HTTP/1.1

+GET http://moo/we/want/%TESTNUMBER0002 HTTP/1.1

 Host: moo

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test332 b/tests/data/test332
index 3688c2b..4f4c28b 100644
--- a/tests/data/test332
+++ b/tests/data/test332
@@ -26,7 +26,7 @@
 TFTP retrieve with blksize 400
  </name>
  <command>
-tftp://%HOSTIP:%TFTPPORT//332 --tftp-blksize 400
+tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --tftp-blksize 400
 </command>
 </client>
 
@@ -39,7 +39,7 @@
 tsize: 0
 blksize: 400
 timeout: 6
-filename: /332
+filename: /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test333 b/tests/data/test333
index 0fd0591..e0fc450 100644
--- a/tests/data/test333
+++ b/tests/data/test333
@@ -20,7 +20,7 @@
 Try a non-boolean command line option with --no-
  </name>
  <command>
---no-proxy "hey" http://%HOSTIP:%NOLISTENPORT/333
+--no-proxy "hey" http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test334 b/tests/data/test334
index f43af23..1593350 100644
--- a/tests/data/test334
+++ b/tests/data/test334
@@ -25,14 +25,14 @@
 HTTP 204 No content with chunked header
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/want/334
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/334 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test335 b/tests/data/test335
index e3e1950..558d2ca 100644
--- a/tests/data/test335
+++ b/tests/data/test335
@@ -67,30 +67,30 @@
 HTTP with proxy Digest and site Digest with creds in URLs
  </name>
  <command>
-http://digest:alot@data.from.server.requiring.digest.hohoho.com/335 --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest
+http://digest:alot@data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://data.from.server.requiring.digest.hohoho.com/335 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/335 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

-Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/335", response="f61609cd8f5bb205ef4e169b2c5626cb"

+Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://data.from.server.requiring.digest.hohoho.com/335 HTTP/1.1

+GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1

 Host: data.from.server.requiring.digest.hohoho.com

-Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/335", response="f61609cd8f5bb205ef4e169b2c5626cb"

-Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/335", response="08a2e2e684047f4219a38ddc189ac00c"

+Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"

+Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="08a2e2e684047f4219a38ddc189ac00c"

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test336 b/tests/data/test336
index 85477c9..89e9bff 100644
--- a/tests/data/test336
+++ b/tests/data/test336
@@ -35,7 +35,7 @@
 FTP range download when SIZE doesn't work
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/336 --use-ascii --range 3-6
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --range 3-6
 </command>
 </client>
 
@@ -47,10 +47,10 @@
 PWD

 EPSV

 PASV

-TYPE A

-SIZE 336

+TYPE I

+SIZE %TESTNUMBER

 REST 3

-RETR 336

+RETR %TESTNUMBER

 ABOR

 QUIT

 </protocol>
diff --git a/tests/data/test337 b/tests/data/test337
index 80086dd..f8ca685 100644
--- a/tests/data/test337
+++ b/tests/data/test337
@@ -35,7 +35,7 @@
 FTP range download with SIZE returning extra crap
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/337 --use-ascii --range 3-6
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --range 3-6
 </command>
 </client>
 
@@ -47,10 +47,10 @@
 PWD

 EPSV

 PASV

-TYPE A

-SIZE 337

+TYPE I

+SIZE %TESTNUMBER

 REST 3

-RETR 337

+RETR %TESTNUMBER

 ABOR

 QUIT

 </protocol>
diff --git a/tests/data/test338 b/tests/data/test338
index 83fe726..4de5970 100644
--- a/tests/data/test338
+++ b/tests/data/test338
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -38,7 +38,7 @@
 ANYAUTH connection reuse of non-authed connection
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/338 --next http://%HOSTIP:%HTTPPORT/338 --anyauth -u foo:moo
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER --anyauth -u foo:moo
 </command>
 </client>
 
@@ -46,12 +46,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /338 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /338 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test339 b/tests/data/test339
index eca3594..8d5b90b 100644
--- a/tests/data/test339
+++ b/tests/data/test339
@@ -16,16 +16,16 @@
 Connection: mooo

 ETag: W/"asdf"

 

-40
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-30
-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-21;heresatest=moooo
+40

+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

+30

+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

+21;heresatest=moooo

 cccccccccccccccccccccccccccccccc
-
-0
-chunky-trailer: header data
-
+

+0

+chunky-trailer: header data

+

 </data>
 </reply>
 
@@ -39,7 +39,7 @@
 Check if --etag-save saved correct etag to a file
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/339 --etag-save log/etag339
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-save log/etag%TESTNUMBER
 </command>
 </client>
 
@@ -47,13 +47,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /339 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/etag339">
+<file name="log/etag%TESTNUMBER">
 W/"asdf"
 </file>
 </verify>
diff --git a/tests/data/test34 b/tests/data/test34
index fa4928d..3119ce2 100644
--- a/tests/data/test34
+++ b/tests/data/test34
@@ -45,7 +45,7 @@
 HTTP GET with chunked Transfer-Encoding
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/34
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /34 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test340 b/tests/data/test340
index d834d76..6c15dc1 100644
--- a/tests/data/test340
+++ b/tests/data/test340
@@ -22,7 +22,7 @@
 FTP using %00 in path with singlecwd
  </name>
  <command>
---ftp-method singlecwd ftp://%HOSTIP:%FTPPORT/%00first/second/third/340
+--ftp-method singlecwd ftp://%HOSTIP:%FTPPORT/%00first/second/third/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test341 b/tests/data/test341
index 726000d..3c9f72a 100644
--- a/tests/data/test341
+++ b/tests/data/test341
@@ -39,7 +39,7 @@
 Try to open a non existing file with --etag-compare should return an error
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/341 --etag-compare log/etag341
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-compare log/etag%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test342 b/tests/data/test342
index 5a1615f..ca8957a 100644
--- a/tests/data/test342
+++ b/tests/data/test342
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 304 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -33,11 +33,11 @@
 <name>
 Check if --etag-compare set correct etag in header
 </name>
-<file name="log/etag342">
+<file name="log/etag%TESTNUMBER">
 "21025-dc7-39462498"
 </file>
 <command>
-http://%HOSTIP:%HTTPPORT/342 --etag-compare log/etag342
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-compare log/etag%TESTNUMBER
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /342 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test343 b/tests/data/test343
index 6e80776..faf6c9a 100644
--- a/tests/data/test343
+++ b/tests/data/test343
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-11111"
@@ -33,11 +33,11 @@
 <name>
 Both --etag-compare and --etag-save to save new Etag
 </name>
-<file name="log/etag343">
+<file name="log/etag%TESTNUMBER">
 "21025-dc7-39462498"
 </file>
 <command>
-http://%HOSTIP:%HTTPPORT/343 --etag-compare log/etag343 --etag-save log/out343
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-compare log/etag%TESTNUMBER --etag-save log/out%TESTNUMBER
 </command>
 </client>
 
@@ -45,14 +45,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /343 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 If-None-Match: "21025-dc7-39462498"

 

 </protocol>
-<file name="log/out343">
+<file name="log/out%TESTNUMBER">
 "21025-dc7-11111"
 </file>
 </verify>
diff --git a/tests/data/test344 b/tests/data/test344
index 5672366..ec671d4 100644
--- a/tests/data/test344
+++ b/tests/data/test344
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-11111"
@@ -34,7 +34,7 @@
 Both --etag-compare and -save store new Etag using non-existing file
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/344 --etag-compare log/etag344 --etag-save log/etag344
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-compare log/etag%TESTNUMBER --etag-save log/etag%TESTNUMBER
 </command>
 </client>
 
@@ -42,14 +42,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /344 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 If-None-Match: ""

 

 </protocol>
-<file name="log/etag344">
+<file name="log/etag%TESTNUMBER">
 "21025-dc7-11111"
 </file>
 </verify>
diff --git a/tests/data/test345 b/tests/data/test345
index 8768732..5619d44 100644
--- a/tests/data/test345
+++ b/tests/data/test345
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-11111"
@@ -33,11 +33,11 @@
 <name>
 Both --etag-compare and -save store new Etag using one pre-existing file
 </name>
-<file name="log/etag345">
+<file name="log/etag%TESTNUMBER">
 "21025-dc7-39462498"
 </file>
 <command>
-http://%HOSTIP:%HTTPPORT/345 --etag-compare log/etag345 --etag-save log/etag345
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-compare log/etag%TESTNUMBER --etag-save log/etag%TESTNUMBER
 </command>
 </client>
 
@@ -45,14 +45,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /345 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 If-None-Match: "21025-dc7-39462498"

 

 </protocol>
-<file name="log/etag345">
+<file name="log/etag%TESTNUMBER">
 "21025-dc7-11111"
 </file>
 </verify>
diff --git a/tests/data/test346 b/tests/data/test346
index 3ec7a1a..c15ae71 100644
--- a/tests/data/test346
+++ b/tests/data/test346
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -38,14 +38,14 @@
 HTTP GET over proxy with credentials using blank passwords
 </name>
 <command>
--x http://%HOSTIP:%HTTPPORT/346 -U puser: -u suser: http://remote.example/346
+-x http://%HOSTIP:%HTTPPORT/%TESTNUMBER -U puser: -u suser: http://remote.example/%TESTNUMBER
 </command>
 </client>
 
 #
 <verify>
 <protocol>
-GET http://remote.example/346 HTTP/1.1

+GET http://remote.example/%TESTNUMBER HTTP/1.1

 Host: remote.example

 Proxy-Authorization: Basic cHVzZXI6

 Authorization: Basic c3VzZXI6

diff --git a/tests/data/test347 b/tests/data/test347
index 3d55a5b..ef85d9d 100644
--- a/tests/data/test347
+++ b/tests/data/test347
@@ -16,16 +16,16 @@
 Connection: mooo

 ETag:  

 

-40
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-30
-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-21;heresatest=moooo
+40

+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

+30

+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

+21;heresatest=moooo

 cccccccccccccccccccccccccccccccc
-
-0
-chunky-trailer: header data
-
+

+0

+chunky-trailer: header data

+

 </data>
 </reply>
 
@@ -39,7 +39,7 @@
 --etag-save with blank incoming header
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/347 --etag-save log/etag347
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-save log/etag%TESTNUMBER
 </command>
 </client>
 
@@ -47,13 +47,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /347 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/etag347">
+<file name="log/etag%TESTNUMBER">
 </file>
 </verify>
 
diff --git a/tests/data/test348 b/tests/data/test348
index befd9fb..8832a38 100644
--- a/tests/data/test348
+++ b/tests/data/test348
@@ -21,7 +21,7 @@
  <name>
 FTP upload file with 552 disk full response
  </name>
-<file name="log/test348.txt">
+<file name="log/test%TESTNUMBER.txt">
 data
     to
       see
@@ -30,7 +30,7 @@
   so does it?
 </file>
  <command>
-ftp://%HOSTIP:%FTPPORT/348 -T log/test348.txt
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 PWD

 EPSV

 TYPE I

-STOR 348

+STOR %TESTNUMBER

 QUIT

 </protocol>
 # 70 - CURLE_REMOTE_DISK_FULL
diff --git a/tests/data/test349 b/tests/data/test349
new file mode 100644
index 0000000..7abd057
--- /dev/null
+++ b/tests/data/test349
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--fail-with-body
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.0 404 BAD BOY swsclose
+Content-Type: text/html
+
+This silly page doesn't reaaaaaly exist so you should not get it.
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET --fail-with-body on HTTP error return
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail-with-body
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+<errorcode>
+22
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test35 b/tests/data/test35
index 5b6aba0..b5feb19 100644
--- a/tests/data/test35
+++ b/tests/data/test35
Binary files differ
diff --git a/tests/data/test354 b/tests/data/test354
index a694932..cdd8270 100644
--- a/tests/data/test354
+++ b/tests/data/test354
@@ -30,7 +30,7 @@
 FTP without password
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/354
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 
 </client>
@@ -42,8 +42,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 354

-RETR 354

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test355 b/tests/data/test355
index 1cab2dd..98e5907 100644
--- a/tests/data/test355
+++ b/tests/data/test355
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Content-Type: text/html
@@ -34,9 +34,9 @@
 load Alt-Svc from file and use
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/355 --alt-svc ""
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --alt-svc ""
 </command>
-<file name="log/altsvc-355">
+<file name="log/altsvc-%TESTNUMBER">
 h1 example.com 80 h1 %HOSTIP %HTTPPORT "20290222 22:19:28" 0 0
 </file>
 </client>
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /355 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test356 b/tests/data/test356
index 469ab0d..0f87958 100644
--- a/tests/data/test356
+++ b/tests/data/test356
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Content-Type: text/html
@@ -40,7 +40,7 @@
 CURL_ALTSVC_HTTP="yeah"
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/356 --alt-svc "log/altsvc-356"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --alt-svc "log/altsvc-%TESTNUMBER"
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /356 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -59,8 +59,8 @@
 # matches
 s/\"([^\"]*)\"/TIMESTAMP/
 </stripfile>
-<file name="log/altsvc-356" mode="text">
-# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html
+<file name="log/altsvc-%TESTNUMBER" mode="text">
+# Your alt-svc cache. https://curl.se/docs/alt-svc.html
 # This file was generated by libcurl! Edit at your own risk.
 h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0
 </file>
diff --git a/tests/data/test357 b/tests/data/test357
index 9e7ed86..8ddcdc9 100644
--- a/tests/data/test357
+++ b/tests/data/test357
@@ -11,14 +11,14 @@
 # 417 means the server didn't like the Expect header
 <data>
 HTTP/1.1 417 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 0
 
 </data>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 10
 
@@ -26,12 +26,12 @@
 </data1>
 <datacheck>
 HTTP/1.1 417 OK swsbounce
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 0
 
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 10
 
@@ -51,9 +51,9 @@
 HTTP PUT with Expect: 100-continue and 417 response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/357 -T log/test357.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
-<file name="log/test357.txt">
+<file name="log/test%TESTNUMBER.txt">
 Weird
      file
          to
@@ -69,14 +69,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /we/want/357 HTTP/1.1

+PUT /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 78

 Expect: 100-continue

 

-PUT /we/want/357 HTTP/1.1

+PUT /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test358 b/tests/data/test358
index 82ff8ad..d1ddc1b 100644
--- a/tests/data/test358
+++ b/tests/data/test358
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Content-Type: text/html
@@ -43,9 +43,9 @@
 CURL_ALTSVC_HTTP="yeah"
 </setenv>
  <command>
---http2 --alt-svc "log/altsvc-358" "http://%HOSTIP:%HTTPPORT/358" "http://%HOSTIP:%HTTPPORT/358"
+--http2 --alt-svc "log/altsvc-%TESTNUMBER" "http://%HOSTIP:%HTTPPORT/%TESTNUMBER" "http://%HOSTIP:%HTTPPORT/%TESTNUMBER"
 </command>
-<file name="log/altsvc-358">
+<file name="log/altsvc-%TESTNUMBER">
 h2 %HOSTIP %HTTPPORT h2 %HOSTIP %HTTP2PORT "20290222 22:19:28" 0 0
 </file>
 
@@ -60,33 +60,32 @@
 Upgrade: h2c

 

 HTTP/2 200 

-date: Thu, 09 Nov 2010 14:49:00 GMT

+date: Tue, 09 Nov 2010 14:49:00 GMT

 content-length: 6

 content-type: text/html

 funny-head: yesyes

 alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0

-server: nghttpx

 via: 1.1 nghttpx

 

 -foo-
 HTTP/2 200 

-date: Thu, 09 Nov 2010 14:49:00 GMT

+date: Tue, 09 Nov 2010 14:49:00 GMT

 content-length: 6

 content-type: text/html

 funny-head: yesyes

 alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0

-server: nghttpx

 via: 1.1 nghttpx

 

 -foo-
 </stdout>
 <stripfile>
+s/^server: nghttpx.*\r?\n//
 # strip out the (dynamic) expire date from the file so that the rest
 # matches
 s/\"2([^\"]*)\"/TIMESTAMP/
 </stripfile>
-<file name="log/altsvc-358" mode="text">
-# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html
+<file name="log/altsvc-%TESTNUMBER" mode="text">
+# Your alt-svc cache. https://curl.se/docs/alt-svc.html
 # This file was generated by libcurl! Edit at your own risk.
 h2 %HOSTIP %HTTPPORT h2 %HOSTIP %HTTP2PORT TIMESTAMP 0 0
 </file>
diff --git a/tests/data/test359 b/tests/data/test359
index c0faee2..c1b1cb8 100644
--- a/tests/data/test359
+++ b/tests/data/test359
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Content-Length: 6
 Connection: close
 Content-Type: text/html
@@ -43,9 +43,9 @@
 CURL_ALTSVC_HTTP="yeah"
 </setenv>
  <command>
---http2 --alt-svc "log/altsvc-359" "http://%HOSTIP:%HTTPSPORT/359" "http://%HOSTIP:%HTTPSPORT/359"
+--http2 --alt-svc "log/altsvc-%TESTNUMBER" "http://%HOSTIP:%HTTPSPORT/%TESTNUMBER" "http://%HOSTIP:%HTTPSPORT/%TESTNUMBER"
 </command>
-<file name="log/altsvc-359">
+<file name="log/altsvc-%TESTNUMBER">
 h2 %HOSTIP %HTTPSPORT h2 %HOSTIP %HTTP2PORT "20290222 22:19:28" 0 0
 </file>
 
@@ -60,33 +60,32 @@
 Upgrade: h2c

 

 HTTP/2 200 

-date: Thu, 09 Nov 2010 14:49:00 GMT

+date: Tue, 09 Nov 2010 14:49:00 GMT

 content-length: 6

 content-type: text/html

 funny-head: yesyes

 alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0

-server: nghttpx

 via: 1.1 nghttpx

 

 -foo-
 HTTP/2 200 

-date: Thu, 09 Nov 2010 14:49:00 GMT

+date: Tue, 09 Nov 2010 14:49:00 GMT

 content-length: 6

 content-type: text/html

 funny-head: yesyes

 alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0

-server: nghttpx

 via: 1.1 nghttpx

 

 -foo-
 </stdout>
 <stripfile>
+s/^server: nghttpx.*\r?\n//
 # strip out the (dynamic) expire date from the file so that the rest
 # matches
 s/\"2([^\"]*)\"/TIMESTAMP/
 </stripfile>
-<file name="log/altsvc-359" mode="text">
-# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html
+<file name="log/altsvc-%TESTNUMBER" mode="text">
+# Your alt-svc cache. https://curl.se/docs/alt-svc.html
 # This file was generated by libcurl! Edit at your own risk.
 h2 %HOSTIP %HTTPSPORT h2 %HOSTIP %HTTP2PORT TIMESTAMP 0 0
 </file>
diff --git a/tests/data/test36 b/tests/data/test36
index 91db26e..fb4c885 100644
--- a/tests/data/test36
+++ b/tests/data/test36
@@ -42,7 +42,7 @@
 HTTP GET with bad chunked Transfer-Encoding
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/36
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 56
 </errorcode>
 <protocol>
-GET /36 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test360 b/tests/data/test360
new file mode 100644
index 0000000..e67c847
--- /dev/null
+++ b/tests/data/test360
@@ -0,0 +1,28 @@
+<testcase>
+<info>
+<keywords>
+--fail
+--fail-with-body
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+Error on both --fail-with-body and --fail
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail-with-body --fail
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+2
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test361 b/tests/data/test361
new file mode 100644
index 0000000..ec13586
--- /dev/null
+++ b/tests/data/test361
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--fail-with-body
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.0 404 BAD BOY swsclose
+Content-Type: text/html
+
+This silly page doesn't reaaaaaly exist so you should not get it.
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET --fail-with-body on HTTP error return - twice
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail-with-body
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+<errorcode>
+22
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test362 b/tests/data/test362
new file mode 100644
index 0000000..ad852c2
--- /dev/null
+++ b/tests/data/test362
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+FTP
+EPSV
+STOR
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP resume upload file with nothing to start from
+ </name>
+<file name="log/test%TESTNUMBER.txt">
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</file>
+ <command>
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt --continue-at -
+</command>
+</client>
+
+<verify>
+<upload>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</upload>
+<protocol>
+USER anonymous

+PASS ftp@example.com

+PWD

+EPSV

+TYPE I

+SIZE %TESTNUMBER

+STOR %TESTNUMBER

+QUIT

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test363 b/tests/data/test363
new file mode 100644
index 0000000..cd8fc43
--- /dev/null
+++ b/tests/data/test363
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+HTTP CONNECT
+proxytunnel
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+
+contents
+</data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed

+

+</connect>
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed

+

+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+
+contents
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+debug
+proxy
+</features>
+<server>
+http
+http-proxy
+</server>
+ <name>
+CONNECT with short sends
+ </name>
+<setenv>
+# make the first send cut off after this amount of data
+CURL_SMALLREQSEND=48
+# make repeated sends small too
+CURL_SMALLSENDS=40
+</setenv>
+ <command>
+http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

+User-Agent: curl/%VERSION

+Proxy-Connection: Keep-Alive

+

+</proxy>
+<protocol nonewline="yes">
+POST /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+Content-Length: 27

+Content-Type: application/x-www-form-urlencoded

+

+datatopost=ohthatsfunyesyes
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test364 b/tests/data/test364
new file mode 100644
index 0000000..5afb8c9
--- /dev/null
+++ b/tests/data/test364
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTPS PUT
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK swsclose
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+
+blablabla
+</data>
+</reply>
+
+# Client-side
+<client>
+<features>
+SSL
+</features>
+<server>
+https
+</server>
+ <name>
+HTTPS PUT of small file
+ </name>
+ <command>
+-k https://%HOSTIP:%HTTPSPORT/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt
+</command>
+<file name="log/test%TESTNUMBER.txt">
+%repeat[200 x banana]%
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+PUT /we/want/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPSPORT

+User-Agent: curl/%VERSION

+Accept: */*

+Content-Length: 1201

+Expect: 100-continue

+

+%repeat[200 x banana]%
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test37 b/tests/data/test37
index 1dedfde..f879859 100644
--- a/tests/data/test37
+++ b/tests/data/test37
@@ -23,7 +23,7 @@
 HTTP GET with nothing returned from server
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/37
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 52
 </errorcode>
 <protocol>
-GET /37 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test38 b/tests/data/test38
index 518aae9..0558700 100644
--- a/tests/data/test38
+++ b/tests/data/test38
@@ -28,9 +28,9 @@
 HTTP resume request without server supporting it
  </name>
  <command option="no-output">
-http://%HOSTIP:%HTTPPORT/want/38 -C - --no-include -o log/fewl38.txt
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -C - --no-include -o log/fewl%TESTNUMBER.txt
 </command>
-<file name="log/fewl38.txt">
+<file name="log/fewl%TESTNUMBER.txt">
 This text is here to simulate a partly downloaded file to resume
 download on.
 </file>
@@ -42,7 +42,7 @@
 33
 </errorcode>
 <protocol>
-GET /want/38 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=78-

 User-Agent: curl/%VERSION

@@ -51,7 +51,7 @@
 </protocol>
 
 # the download target file must remain untouched
-<file name="log/fewl38.txt">
+<file name="log/fewl%TESTNUMBER.txt">
 This text is here to simulate a partly downloaded file to resume
 download on.
 </file>
diff --git a/tests/data/test39 b/tests/data/test39
index de9a516..8b00ada 100644
--- a/tests/data/test39
+++ b/tests/data/test39
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 10

 

@@ -26,10 +26,10 @@
 HTTP RFC1867-type formposting with filename= and type=
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/39 -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test39.txt;type=moo/foobar;filename=fakerfile" -F file2=@log/test39.txt -F "file3=@\"log/test39.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"log/test39.txt"; filename="A\\AA\"\"\\\"ZZZ"'
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test%TESTNUMBER.txt;type=moo/foobar;filename=fakerfile" -F file2=@log/test%TESTNUMBER.txt -F "file3=@\"log/test%TESTNUMBER.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"log/test%TESTNUMBER.txt"; filename="A\\AA\"\"\\\"ZZZ"'
 </command>
 # We create this file before the command is invoked!
-<file name="log/test39.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo bar
 This is a bar foo
 bar
@@ -43,7 +43,7 @@
 ^(Content-Type: multipart/form-data;|-------).*
 </strip>
 <protocol>
-POST /we/want/39 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -76,7 +76,7 @@
 foo
 

 ------------------------------24e78000bd32

-Content-Disposition: form-data; name="file2"; filename="test39.txt"

+Content-Disposition: form-data; name="file2"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo bar
diff --git a/tests/data/test393 b/tests/data/test393
index 67ce1c1..797b4f1 100644
--- a/tests/data/test393
+++ b/tests/data/test393
@@ -13,12 +13,16 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
 Accept-Ranges: bytes
+%if hyper
+Content-Length: 3689348814741910323
+%else
 Content-Length: 36893488147419103232
+%endif
 Connection: close
 Content-Type: text/html
 Funny-head: yesyes
@@ -37,7 +41,7 @@
 HTTP max-filesize and out-of-range Content-Length
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/393 --max-filesize 2000000
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --max-filesize 2000000
 </command>
 </client>
 
@@ -48,7 +52,7 @@
 63
 </errorcode>
 <protocol>
-GET /393 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test394 b/tests/data/test394
index ec7a06d..9d2779d 100644
--- a/tests/data/test394
+++ b/tests/data/test394
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -36,7 +36,7 @@
 HTTP with rubbish in Content-Length
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/394
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,10 +44,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <errorcode>
+%if hyper
+1
+%else
 8
+%endif
 </errorcode>
 <protocol>
-GET /394 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test395 b/tests/data/test395
index fae55db..541b66b 100644
--- a/tests/data/test395
+++ b/tests/data/test395
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP and out-of-range Content-Length
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/395
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,11 +43,18 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /395 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
+
+# hyper cannot work with too-large content-length
+%if hyper
+<errorcode>
+1
+</errorcode>
+%endif
 </verify>
 </testcase>
diff --git a/tests/data/test396 b/tests/data/test396
index 01be58a..11dd1a9 100644
--- a/tests/data/test396
+++ b/tests/data/test396
@@ -178,7 +178,7 @@
 HTTP GET zstd compressed content
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/396 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -186,14 +186,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /396 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test397 b/tests/data/test397
index 0afd21c..4ad130a 100644
--- a/tests/data/test397
+++ b/tests/data/test397
@@ -174,7 +174,7 @@
 HTTP GET zstd compressed content of size more than CURL_MAX_WRITE_SIZE
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/397 --compressed
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --compressed
 </command>
 </client>
 
@@ -182,14 +182,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^Accept-Encoding: .*/Accept-Encoding: xxx/
+s/^Accept-Encoding: [a-zA-Z, ]*/Accept-Encoding: xxx/
 </strippart>
 <protocol>
-GET /397 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Accept-Encoding: xxx
+Accept-Encoding: xxx

 

 </protocol>
 </verify>
diff --git a/tests/data/test4 b/tests/data/test4
index fe5789a..c0b4f05 100644
--- a/tests/data/test4
+++ b/tests/data/test4
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -30,7 +30,7 @@
 Replaced internal and added custom HTTP headers
  </name>
  <command>
- -H "extra-header: here" -H "Accept: replaced" -H "X-Custom-Header;" -H "X-Test: foo; " -H "X-Test:" -H "X-Test2: foo;" -H "X-Test3:  " -H "X-Test4;  " -H "X-Test5;ignored" http://%HOSTIP:%HTTPPORT/4 http://%HOSTIP:%HTTPPORT/4
+ -H "extra-header: here" -H "Accept: replaced" -H "X-Custom-Header;" -H "X-Test: foo; " -H "X-Test:" -H "X-Test2: foo;" -H "X-Test3:  " -H "X-Test4;  " -H "X-Test5;ignored" http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /4 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 extra-header: here

@@ -47,7 +47,7 @@
 X-Test: foo; 

 X-Test2: foo;

 

-GET /4 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 extra-header: here

diff --git a/tests/data/test40 b/tests/data/test40
index 42bd8e1..ad437d0 100644
--- a/tests/data/test40
+++ b/tests/data/test40
@@ -11,28 +11,32 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose

-Location: ../moo.html/?name=d a niel&testcase=/400002    

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: ../moo.html/?name=d a niel&testcase=/%TESTNUMBER0002    

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose

-Location: ../moo.html/?name=d a niel&testcase=/400002    

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+%if !hyper
+Location: ../moo.html/?name=d a niel&testcase=/%TESTNUMBER0002    

+%else
+Location: ../moo.html/?name=d a niel&testcase=/%TESTNUMBER0002

+%endif
+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -49,7 +53,7 @@
 HTTP redirect with whitespace after ? (and conversion)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/40 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +61,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/40 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/are/all/moo.html/?name=d+a+niel&testcase=/400002 HTTP/1.1

+GET /we/are/all/moo.html/?name=d+a+niel&testcase=/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test401 b/tests/data/test401
index 1bb9fb1..ac4af97 100644
--- a/tests/data/test401
+++ b/tests/data/test401
@@ -19,7 +19,7 @@
  <name>
 FTPS PASV upload file
  </name>
-<file name="log/test401.txt">
+<file name="log/test%TESTNUMBER.txt">
 data
     to
       see
@@ -28,7 +28,7 @@
   so does it?
 </file>
  <command>
--k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/401 -T log/test401.txt
+-k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 PWD

 EPSV

 TYPE I

-STOR 401

+STOR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test402 b/tests/data/test402
index 3060c99..5c7bc67 100644
--- a/tests/data/test402
+++ b/tests/data/test402
@@ -19,7 +19,7 @@
 FTP SSL required on non-SSL server
  </name>
  <command>
--k --ftp-ssl-reqd ftp://%HOSTIP:%FTPPORT/402
+-k --ftp-ssl-reqd ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test405 b/tests/data/test405
index 28d8b57..fc291d1 100644
--- a/tests/data/test405
+++ b/tests/data/test405
@@ -19,7 +19,7 @@
 FTPS operation to FTP port
  </name>
  <command>
--m 5 -k ftps://%HOSTIP:%FTPPORT/path/to/file/405
+-m 5 -k ftps://%HOSTIP:%FTPPORT/path/to/file/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test407 b/tests/data/test407
index ca06838..4f2591e 100644
--- a/tests/data/test407
+++ b/tests/data/test407
@@ -29,7 +29,7 @@
 Get two FTPS files from the same remote dir: no second CWD
  </name>
  <command>
--k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/a/path/407 ftps://%HOSTIP:%FTPSPORT/a/path/407
+-k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/a/path/%TESTNUMBER ftps://%HOSTIP:%FTPSPORT/a/path/%TESTNUMBER
 </command>
 <stdout>
 data blobb
@@ -49,11 +49,11 @@
 CWD path

 EPSV

 TYPE I

-SIZE 407

-RETR 407

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 407

-RETR 407

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test408 b/tests/data/test408
index 68b42b2..2516fc3 100644
--- a/tests/data/test408
+++ b/tests/data/test408
@@ -25,9 +25,9 @@
 FTPS PORT upload with CWD
  </name>
  <command>
--k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/CWD/STOR/RETR/408 -T log/upload408 -P -
+-k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/CWD/STOR/RETR/%TESTNUMBER -T log/upload%TESTNUMBER -P -
 </command>
-<file name="log/upload408">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
  upload this
 </file>
@@ -51,7 +51,7 @@
 CWD RETR

 PORT 127,0,0,1,5,109

 TYPE I

-STOR 408

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test409 b/tests/data/test409
index 00100bc..ea6e795 100644
--- a/tests/data/test409
+++ b/tests/data/test409
@@ -19,7 +19,7 @@
  <name>
 FTPS PASV upload file
  </name>
-<file name="log/test409.txt">
+<file name="log/test%TESTNUMBER.txt">
 data
     to
       see
@@ -28,7 +28,7 @@
   so does it?
 </file>
  <command>
--k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/409 -T log/test409.txt
+-k --ftp-ssl-control ftps://%HOSTIP:%FTPSPORT/%TESTNUMBER -T log/test%TESTNUMBER.txt
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 PWD

 EPSV

 TYPE I

-STOR 409

+STOR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test41 b/tests/data/test41
index 08eca38..aaf0ae7 100644
--- a/tests/data/test41
+++ b/tests/data/test41
@@ -19,7 +19,7 @@
 HTTP formpost with missing file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/41 -F moo=@boo
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -F moo=@boo
 </command>
 </client>
 
diff --git a/tests/data/test410 b/tests/data/test410
new file mode 100644
index 0000000..06999fb
--- /dev/null
+++ b/tests/data/test410
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+
+MooMoo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+</features>
+<server>
+https
+</server>
+ <name>
+HTTPS GET with very long request header
+ </name>
+# 14 characters repeated 3500 times makes 49000 bytes
+<file name="log/file%TESTNUMBER">
+Long: %repeat[3500 x header content]%
+</file>
+ <command>
+-k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER -H @log/file%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPSPORT

+User-Agent: curl/%VERSION

+Accept: */*

+Long: %repeat[3500 x header content]%

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test42 b/tests/data/test42
index abb3412..835f181 100644
--- a/tests/data/test42
+++ b/tests/data/test42
@@ -11,28 +11,32 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose

-Location: ../m o o.html/420002    

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: ../m o o.html/%TESTNUMBER0002    

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 </data>
 <data2>
 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose

-Location: ../m o o.html/420002    

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+%if !hyper
+Location: ../m o o.html/%TESTNUMBER0002    

+%else
+Location: ../m o o.html/%TESTNUMBER0002

+%endif
+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 HTTP/1.1 200 OK swsclose

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Connection: close

 

 body
@@ -49,7 +53,7 @@
 HTTP redirect with whitespace in path (and conversion)
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/42 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +61,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/42 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/are/all/m%20o%20o.html/420002 HTTP/1.1

+GET /we/are/all/m%20o%20o.html/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test43 b/tests/data/test43
index 28035c8..4e7408b 100644
--- a/tests/data/test43
+++ b/tests/data/test43
@@ -11,9 +11,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/430002.txt?coolsite=yes
+Location: data/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -21,7 +21,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -30,13 +30,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data/430002.txt?coolsite=yes
+Location: data/%TESTNUMBER0002.txt?coolsite=yes
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -54,7 +54,7 @@
 HTTP Location: following over HTTP proxy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/43 -L -x %HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x %HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -64,13 +64,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/want/43 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://%HOSTIP:%HTTPPORT/want/data/430002.txt?coolsite=yes HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test430 b/tests/data/test430
index 4a669ff..e3aae0b 100644
--- a/tests/data/test430
+++ b/tests/data/test430
@@ -37,21 +37,21 @@
 #
 # Client-side
 <client>
-<file1 name="log/config430-a">
+<file1 name="log/config%TESTNUMBER-a">
 --next
-url = %HOSTIP:%HTTPPORT/4300001
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0001
 header = "a: a"
 data = "a"
 </file1>
-<file2 name="log/config430-b">
+<file2 name="log/config%TESTNUMBER-b">
 --next
-url = %HOSTIP:%HTTPPORT/4300002
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0002
 header = "b: b"
 data = "b"
 </file2>
-<file3 name="log/config430-c">
+<file3 name="log/config%TESTNUMBER-c">
 --next
-url = %HOSTIP:%HTTPPORT/4300003
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0003
 header = "c: c"
 data = "c"
 </file3>
@@ -63,7 +63,7 @@
 Three -K uses with --next and --data in each
  </name>
  <command>
--K log/config430-a -K log/config430-b -K log/config430-c
+-K log/config%TESTNUMBER-a -K log/config%TESTNUMBER-b -K log/config%TESTNUMBER-c
 </command>
 </client>
 
@@ -71,7 +71,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /4300001 HTTP/1.1

+POST /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -79,7 +79,7 @@
 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

-aPOST /4300002 HTTP/1.1

+aPOST /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -87,7 +87,7 @@
 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

-bPOST /4300003 HTTP/1.1

+bPOST /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test431 b/tests/data/test431
index 8f04548..bebe620 100644
--- a/tests/data/test431
+++ b/tests/data/test431
@@ -37,15 +37,15 @@
 #
 # Client-side
 <client>
-<file1 name="log/config431-a">
+<file1 name="log/config%TESTNUMBER-a">
 --next
-url = %HOSTIP:%HTTPPORT/4310001
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0001
 header = "a: a"
 data = "a"
 </file1>
-<file2 name="log/config431-b">
+<file2 name="log/config%TESTNUMBER-b">
 --next
-url = %HOSTIP:%HTTPPORT/4310002
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0002
 header = "b: b"
 data = "b"
 </file2>
@@ -57,7 +57,7 @@
 Two -K uses with --next and then one on cmdline
  </name>
  <command>
--K log/config431-a -K log/config431-b --next -d c %HOSTIP:%HTTPPORT/4310003 -H "c: c"
+-K log/config%TESTNUMBER-a -K log/config%TESTNUMBER-b --next -d c %HOSTIP:%HTTPPORT/%TESTNUMBER0003 -H "c: c"
 </command>
 </client>
 
@@ -65,7 +65,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /4310001 HTTP/1.1

+POST /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -73,7 +73,7 @@
 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

-aPOST /4310002 HTTP/1.1

+aPOST /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -81,7 +81,7 @@
 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

-bPOST /4310003 HTTP/1.1

+bPOST /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test432 b/tests/data/test432
index a7bc378..e7fe45b 100644
--- a/tests/data/test432
+++ b/tests/data/test432
@@ -37,20 +37,20 @@
 #
 # Client-side
 <client>
-<file1 name="log/config432">
+<file1 name="log/config%TESTNUMBER">
 --next
-url = %HOSTIP:%HTTPPORT/4320001
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0001
 header = "a: a"
 data = "a"
 --next
-url = %HOSTIP:%HTTPPORT/4320002
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0002
 header = "b: b"
 data = "b"
-config = "log/config432-c"
+config = "log/config%TESTNUMBER-c"
 </file1>
-<file2 name="log/config432-c">
+<file2 name="log/config%TESTNUMBER-c">
 --next
-url = %HOSTIP:%HTTPPORT/4320003
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER0003
 header = "c: c"
 data = "c"
 </file2>
@@ -62,7 +62,7 @@
 Use -K with --next and --config from within
  </name>
  <command>
--K log/config432
+-K log/config%TESTNUMBER
 </command>
 </client>
 
@@ -70,7 +70,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /4320001 HTTP/1.1

+POST /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -78,7 +78,7 @@
 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

-aPOST /4320002 HTTP/1.1

+aPOST /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -86,7 +86,7 @@
 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

-bPOST /4320003 HTTP/1.1

+bPOST /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test433 b/tests/data/test433
index e7cb4d2..34ea4a7 100644
--- a/tests/data/test433
+++ b/tests/data/test433
@@ -9,10 +9,10 @@
 # Server-side
 <reply>
 <data>
-HTTP/1.1 200 OK
-Content-Length: 6
-Content-Type: text/1
-
+HTTP/1.1 200 OK

+Content-Length: 6

+Content-Type: text/1

+

 -foo-
 </data>
 </reply>
@@ -30,12 +30,14 @@
 </server>
 <setenv>
 XDG_CONFIG_HOME=%PWD/log
+HOME=
+CURL_HOME=
 </setenv>
 <name>
 Verify XDG_CONFIG_HOME use to find .curlrc
 </name>
 <command>
-%HOSTIP:%HTTPPORT/433
+%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /433 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test434 b/tests/data/test434
index a2bcc0c..d411b16 100644
--- a/tests/data/test434
+++ b/tests/data/test434
@@ -1,7 +1,7 @@
 <testcase>
-
 <info>
 <keywords>
+HTTP
 --config
 </keywords>
 </info>
@@ -19,8 +19,8 @@
 
 #
 <client>
-<file name="log/config434" nonewline="yes">
-url = %HOSTIP:%HTTPPORT/434
+<file name="log/config%TESTNUMBER" nonewline="yes">
+url = %HOSTIP:%HTTPPORT/%TESTNUMBER
 </file>
 <server>
 http
@@ -29,14 +29,14 @@
 -K with a single line without newline
 </name>
 <command>
--K log/config434
+-K log/config%TESTNUMBER
 </command>
 </client>
 
 #
 <verify>
 <protocol>
-GET /434 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test44 b/tests/data/test44
index 4b1fa45..0ec2f4b 100644
--- a/tests/data/test44
+++ b/tests/data/test44
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -27,10 +27,10 @@
 HTTP RFC1867-type formposting without Expect: header
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/44 -F name=daniel -F tool=curl -F file=@log/test44.txt -H "Expect:"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt -H "Expect:"
 </command>
 # We create this file before the command is invoked!
-<file name="log/test44.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo-
 This is a moo-
 bar
@@ -43,7 +43,7 @@
 ^(Content-Type: multipart/form-data;|------).*
 </strip>
 <protocol>
-POST /we/want/44 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -59,7 +59,7 @@
 

 curl

 ------------------------------7c633d5c27ce

-Content-Disposition: form-data; name="file"; filename="test44.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
diff --git a/tests/data/test45 b/tests/data/test45
index 1381920..0368882 100644
--- a/tests/data/test45
+++ b/tests/data/test45
@@ -10,9 +10,9 @@
 <reply>
 <data>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data.cgi?moo=http://&/450002
+Location: data.cgi?moo=http://&/%TESTNUMBER0002
 Connection: close
 
 This server reply is for testing a simple Location: following
@@ -20,7 +20,7 @@
 </data>
 <data2>
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -29,13 +29,13 @@
 </data2>
 <datacheck>
 HTTP/1.1 301 This is a weirdo text message swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
-Location: data.cgi?moo=http://&/450002
+Location: data.cgi?moo=http://&/%TESTNUMBER0002
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 52
 
@@ -53,19 +53,19 @@
 simple HTTP Location: without protocol in initial URL
  </name>
  <command>
-%HOSTIP:%HTTPPORT/want/45 -L
+%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/45 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /want/data.cgi?moo=http://&/450002 HTTP/1.1

+GET /want/data.cgi?moo=http://&/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test46 b/tests/data/test46
index c54a7f1..91e24cb 100644
--- a/tests/data/test46
+++ b/tests/data/test46
@@ -5,6 +5,7 @@
 HTTP GET
 cookies
 cookiejar
+--resolve
 </keywords>
 </info>
 
@@ -42,11 +43,11 @@
 TZ=GMT
 </setenv>
  <command>
-domain..tld:%HTTPPORT/want/46 --resolve domain..tld:%HTTPPORT:%HOSTIP -c log/jar46 -b log/injar46
+domain..tld:%HTTPPORT/want/%TESTNUMBER --resolve domain..tld:%HTTPPORT:%HOSTIP -c log/jar%TESTNUMBER -b log/injar%TESTNUMBER
 </command>
-<file name="log/injar46">
+<file name="log/injar%TESTNUMBER">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This is generated by libcurl!  Do not edit.
 
 www.fake.come	FALSE	/	FALSE	2147483647	cookiecliente	si
@@ -60,16 +61,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/46 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: domain..tld:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: empty=; mooo2=indeed2; mooo=indeed

 

 </protocol>
-<file name="log/jar46" mode="text">
+<file name="log/jar%TESTNUMBER" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 domain..tld	FALSE	/want/	FALSE	0	simplyhuge	zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz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zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
diff --git a/tests/data/test47 b/tests/data/test47
index 2048f52..e506b34 100644
--- a/tests/data/test47
+++ b/tests/data/test47
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 -foo- within foo -!foo-
@@ -28,7 +28,7 @@
 simple HTTP 1.0 GET
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/47 -0
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -0
 </command>
 </client>
 
@@ -36,7 +36,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /47 HTTP/1.0

+GET /%TESTNUMBER HTTP/1.0

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test48 b/tests/data/test48
index 36bf656..c983768 100644
--- a/tests/data/test48
+++ b/tests/data/test48
@@ -14,7 +14,7 @@
 </servercmd>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 
 </data>
 </reply>
@@ -29,7 +29,7 @@
 HTTP with -d and -G and -I
  </name>
  <command>
--d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/48 -G -I http://%HOSTIP:%HTTPPORT/48
+-d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/%TESTNUMBER -G -I http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -37,12 +37,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-HEAD /48?foo=moo&moo=poo HTTP/1.1

+HEAD /%TESTNUMBER?foo=moo&moo=poo HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-HEAD /48?foo=moo&moo=poo HTTP/1.1

+HEAD /%TESTNUMBER?foo=moo&moo=poo HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test49 b/tests/data/test49
index 9192f92..79890d6 100644
--- a/tests/data/test49
+++ b/tests/data/test49
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose
-Location: ../moo.html/490002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: ../moo.html/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose
-Location: ../moo.html/490002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: ../moo.html/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
@@ -49,7 +49,7 @@
 HTTP follow redirect with ../
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/49 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +57,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/49 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/are/all/moo.html/490002 HTTP/1.1

+GET /we/are/all/moo.html/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test490 b/tests/data/test490
index 6f77b71..2d4cf16 100644
--- a/tests/data/test490
+++ b/tests/data/test490
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,9 +35,9 @@
 Two globbed HTTP PUTs
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/490 -T '{log/in490,log/in490}'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T '{log/in%TESTNUMBER,log/in%TESTNUMBER}'
 </command>
-<file name="log/in490">
+<file name="log/in%TESTNUMBER">
 surprise!
 </file>
 </client>
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /490 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -54,7 +54,7 @@
 Expect: 100-continue

 

 surprise!
-PUT /490 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test491 b/tests/data/test491
index 87cebf1..5f2c27d 100644
--- a/tests/data/test491
+++ b/tests/data/test491
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,9 +35,9 @@
 Two globbed HTTP PUTs, the second upload file is missing
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/491 -T '{log/in491,log/bad491}'
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T '{log/in%TESTNUMBER,log/bad%TESTNUMBER}'
 </command>
-<file name="log/in491">
+<file name="log/in%TESTNUMBER">
 surprise!
 </file>
 </client>
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /491 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test492 b/tests/data/test492
index ab3c01f..aedaf5b 100644
--- a/tests/data/test492
+++ b/tests/data/test492
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,13 +35,13 @@
 Two globbed HTTP PUTs to two globbed URLs
  </name>
  <command>
-'http://%HOSTIP:%HTTPPORT/{one,two}/' -T '{log/first492,log/second492}' -H "Testno: 492"
+'http://%HOSTIP:%HTTPPORT/{one,two}/' -T '{log/first%TESTNUMBER,log/second%TESTNUMBER}' -H "Testno: %TESTNUMBER"
 </command>
-<file name="log/first492">
-first 492 contents
+<file name="log/first%TESTNUMBER">
+first %TESTNUMBER contents
 </file>
-<file1 name="log/second492">
-second 492 contents
+<file1 name="log/second%TESTNUMBER">
+second %TESTNUMBER contents
 </file1>
 </client>
 
@@ -49,42 +49,42 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /one/first492 HTTP/1.1

+PUT /one/first%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 492

+Testno: %TESTNUMBER

 Content-Length: 19

 Expect: 100-continue

 

-first 492 contents
-PUT /two/first492 HTTP/1.1

+first %TESTNUMBER contents
+PUT /two/first%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 492

+Testno: %TESTNUMBER

 Content-Length: 19

 Expect: 100-continue

 

-first 492 contents
-PUT /one/second492 HTTP/1.1

+first %TESTNUMBER contents
+PUT /one/second%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 492

+Testno: %TESTNUMBER

 Content-Length: 20

 Expect: 100-continue

 

-second 492 contents
-PUT /two/second492 HTTP/1.1

+second %TESTNUMBER contents
+PUT /two/second%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Testno: 492

+Testno: %TESTNUMBER

 Content-Length: 20

 Expect: 100-continue

 

-second 492 contents
+second %TESTNUMBER contents
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test493 b/tests/data/test493
new file mode 100644
index 0000000..142b0c1
--- /dev/null
+++ b/tests/data/test493
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HSTS
+url_effective
+</keywords>
+</info>
+
+<reply>
+
+# we use this as response to a CONNECT
+<connect nocheck="yes">
+HTTP/1.1 403 not OK at all

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Server: test-server/fake

+Content-Length: 6

+Connection: close

+Funny-head: yesyes

+

+-foo-
+</connect>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<features>
+HSTS
+proxy
+https
+</features>
+
+<file name="log/input%TESTNUMBER">
+.hsts.example "20311001 04:47:41"
+</file>
+
+<name>
+HSTS and %{url_effective} after upgrade
+</name>
+<command>
+-x http://%HOSTIP:%HTTPPORT http://this.hsts.example/%TESTNUMBER --hsts log/input%TESTNUMBER -w '%{url_effective}\n'
+</command>
+</client>
+
+<verify>
+# we let it CONNECT to the server to confirm HSTS but deny from there
+<protocol>
+CONNECT this.hsts.example:443 HTTP/1.1

+Host: this.hsts.example:443

+User-Agent: curl/%VERSION

+Proxy-Connection: Keep-Alive

+

+</protocol>
+<stdout>
+HTTP/1.1 403 not OK at all

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Server: test-server/fake

+Content-Length: 6

+Connection: close

+Funny-head: yesyes

+

+https://this.hsts.example/%TESTNUMBER
+</stdout>
+# Proxy CONNECT aborted
+<errorcode>
+56
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test494 b/tests/data/test494
new file mode 100644
index 0000000..4417446
--- /dev/null
+++ b/tests/data/test494
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+FTP
+EPSV
+netrc
+macdef
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+blipp
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+skip 'macdef' when parsing netrc
+ </name>
+ <command>
+--netrc --netrc-file log/netrc%TESTNUMBER ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
+</command>
+<file name="log/netrc%TESTNUMBER" >
+
+macdef testmacro
+	bin
+	cd default
+	cd login
+	put login.bin
+	cd ..
+	cd password
+	put password.bin
+	quit
+
+machine %HOSTIP login user1 password passwd1
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER user1

+PASS passwd1

+PWD

+EPSV

+TYPE I

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

+QUIT

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test5 b/tests/data/test5
index 6138820..4e8cd46 100644
--- a/tests/data/test5
+++ b/tests/data/test5
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,7 +29,7 @@
 HTTP over proxy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/5#5 -x %HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER#5 -x %HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/we/want/that/page/5 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test50 b/tests/data/test50
index 777caa2..308095e 100644
--- a/tests/data/test50
+++ b/tests/data/test50
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose
-Location: ../../moo.html/500002
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Location: ../../moo.html/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose
-Location: ../../moo.html/500002
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Location: ../../moo.html/%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 body
@@ -49,7 +49,7 @@
 HTTP follow redirect with ../../
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/50 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +57,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/50 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/are/moo.html/500002 HTTP/1.1

+GET /we/are/moo.html/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test500 b/tests/data/test500
index 56a5c91..514d0b9 100644
--- a/tests/data/test500
+++ b/tests/data/test500
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -38,18 +38,18 @@
 simple libcurl HTTP GET tool
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/500 log/ip500
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/ip%TESTNUMBER
 </command>
 </client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/ip500">
-IP: %HOSTIP
+<file name="log/ip%TESTNUMBER">
+IP %HOSTIP
 </file>
 <protocol>
-GET /500 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test501 b/tests/data/test501
index 8b3dac7..b86642f 100644
--- a/tests/data/test501
+++ b/tests/data/test501
@@ -19,14 +19,14 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib501
+lib%TESTNUMBER
 </tool>
 
  <name>
 simple libcurl attempt operation without URL set
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/501
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test502 b/tests/data/test502
index f8d776b..1121257 100644
--- a/tests/data/test502
+++ b/tests/data/test502
@@ -23,16 +23,16 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib502
+lib%TESTNUMBER
 </tool>
 
  <name>
 simple multi file:// get
  </name>
  <command>
-file://%PWD/log/test502.txt
+file://%PWD/log/test%TESTNUMBER.txt
 </command>
-<file name="log/test502.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar swsclose
 bar
diff --git a/tests/data/test503 b/tests/data/test503
index 472149d..1ad7a55 100644
--- a/tests/data/test503
+++ b/tests/data/test503
@@ -22,7 +22,7 @@
 </connect>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -32,7 +32,7 @@
 HTTP/1.1 200 Mighty fine indeed

 

 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -48,7 +48,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib503
+lib%TESTNUMBER
 </tool>
 <features>
 proxy
@@ -57,9 +57,9 @@
 simple multi http:// through proxytunnel with authentication info
  </name>
  <command>
-http://machine.503:%HTTPPORT/503 %HOSTIP:%PROXYPORT
+http://machine.%TESTNUMBER:%HTTPPORT/%TESTNUMBER %HOSTIP:%PROXYPORT
 </command>
-<file name="log/test503.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo
    bar
 bar
@@ -71,15 +71,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT machine.503:%HTTPPORT HTTP/1.1

-Host: machine.503:%HTTPPORT

+CONNECT machine.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: machine.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: Basic dGVzdDppbmc=

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /503 HTTP/1.1

-Host: machine.503:%HTTPPORT

+GET /%TESTNUMBER HTTP/1.1

+Host: machine.%TESTNUMBER:%HTTPPORT

 Authorization: Basic dGVzdDppbmc=

 Accept: */*

 

diff --git a/tests/data/test504 b/tests/data/test504
index 351ae74..05061e2 100644
--- a/tests/data/test504
+++ b/tests/data/test504
@@ -25,14 +25,14 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib504
+lib%TESTNUMBER
 </tool>
 
  <name>
 simple multi through local proxy without listener
  </name>
  <command>
-http://%HOSTIP:%NOLISTENPORT/504 %HOSTIP:%NOLISTENPORT
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER %HOSTIP:%NOLISTENPORT
 </command>
 </client>
 
diff --git a/tests/data/test505 b/tests/data/test505
index a5e5d31..13ddc62 100644
--- a/tests/data/test505
+++ b/tests/data/test505
@@ -16,16 +16,16 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib505
+lib%TESTNUMBER
 </tool>
 
  <name>
 FTP upload with rename after transfer
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/505 log/upload505
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER log/upload%TESTNUMBER
 </command>
-<file name="log/upload505">
+<file name="log/upload%TESTNUMBER">
 Contents
 of
 a file
@@ -57,9 +57,9 @@
 PWD

 EPSV

 TYPE I

-STOR 505

-RNFR 505

-RNTO 505-forreal

+STOR %TESTNUMBER

+RNFR %TESTNUMBER

+RNTO %TESTNUMBER-forreal

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test506 b/tests/data/test506
index f821ad1..44f3afd 100644
--- a/tests/data/test506
+++ b/tests/data/test506
@@ -12,7 +12,7 @@
 <reply>
 <data1>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Set-Cookie: test1=one; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
@@ -24,7 +24,7 @@
 </data1>
 <data2>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:01 GMT
+Date: Tue, 09 Nov 2010 14:49:01 GMT
 Server: test-server/fake
 Content-Type: text/html
 Set-Cookie: test4=four; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
@@ -35,7 +35,7 @@
 </data2>
 <data3>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:02 GMT
+Date: Tue, 09 Nov 2010 14:49:02 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes
@@ -55,10 +55,11 @@
 <server>
 http
 </server>
-# don't run this with the threaded-resolver since the events might trigger in
-# a different order!
+# don't run this with the threaded-resolver or c-ares since the events might
+# trigger in a different order!
 <features>
 !threaded-resolver
+!c-ares
 </features>
 <name>
 HTTP with shared cookie list (and dns cache)
@@ -70,10 +71,10 @@
 TZ=GMT
 </setenv>
 <tool>
-lib506
+lib%TESTNUMBER
 </tool>
 <command>
-http://%HOSTIP:%HTTPPORT/506
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -232,9 +233,9 @@
 unlock: share  [Pigs in space]: 99
 GLOBAL_CLEANUP
 </stdout>
-<file name="log/jar506" mode="text">
+<file name="log/jar%TESTNUMBER" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 www.host.foo.com	FALSE	/	FALSE	1993463787	test6	six_more
diff --git a/tests/data/test507 b/tests/data/test507
index 9549bd9..49d7517 100644
--- a/tests/data/test507
+++ b/tests/data/test507
@@ -21,7 +21,7 @@
 multi interface get with non-existing host name
 </name>
 <tool>
-lib507
+lib%TESTNUMBER
 </tool>
 <command>
 http://non-existing-host.haxx.se/
diff --git a/tests/data/test508 b/tests/data/test508
index 2b8a2d5..143fe31 100644
--- a/tests/data/test508
+++ b/tests/data/test508
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -27,14 +27,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib508
+lib%TESTNUMBER
 </tool>
 
  <name>
 send HTTP POST using read callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/508
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 s/^(this is what we post to the silly web server)\r\n/$1\n/ if($has_charconv)
 </strippart>
 <protocol>
-POST /508 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 45

diff --git a/tests/data/test509 b/tests/data/test509
index 0e0dd21..4cdbe80 100644
--- a/tests/data/test509
+++ b/tests/data/test509
@@ -19,7 +19,7 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib509
+lib%TESTNUMBER
 </tool>
 
 <name>
diff --git a/tests/data/test51 b/tests/data/test51
index 7d9740a..9bb2865 100644
--- a/tests/data/test51
+++ b/tests/data/test51
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose
-Location: ../../../../../../../510002
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Location: ../../../../../../../%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose
-Location: ../../../../../../../510002
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Location: ../../../../../../../%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 body
@@ -49,7 +49,7 @@
 HTTP follow redirect with excessive ../
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/51 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +57,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/51 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /510002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test510 b/tests/data/test510
index a7acbe8..b673fa1 100644
--- a/tests/data/test510
+++ b/tests/data/test510
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -28,14 +28,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib510
+lib%TESTNUMBER
 </tool>
 
  <name>
 send HTTP POST using read callback, using chunked transfer-encoding
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/510
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /510 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

@@ -56,7 +56,11 @@
 two

 5

 three

+%if hyper
+1D

+%else
 1d

+%endif
 and a final longer crap: four

 0

 

diff --git a/tests/data/test511 b/tests/data/test511
index 1a251fd..994907a 100644
--- a/tests/data/test511
+++ b/tests/data/test511
@@ -21,14 +21,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib511
+lib%TESTNUMBER
 </tool>
 
  <name>
 FTP with FILETIME and NOBODY but missing file
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/511
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 USER anonymous

 PASS ftp@example.com

 PWD

-MDTM 511

+MDTM %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test512 b/tests/data/test512
index dd5cc0a..6598d31 100644
--- a/tests/data/test512
+++ b/tests/data/test512
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: yes

 Connection: close

 

@@ -26,14 +26,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib512
+lib%TESTNUMBER
 </tool>
 
  <name>
 simple curl_easy_duplicate() test
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/512
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /512 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test513 b/tests/data/test513
index 00e0f77..df0a962 100644
--- a/tests/data/test513
+++ b/tests/data/test513
@@ -18,7 +18,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib513
+lib%TESTNUMBER
 </tool>
 
  <name>
@@ -26,7 +26,7 @@
  </name>
 # the 1s post-command delay helps to prevent a spurious failure on s390
  <command delay="1">
-http://%HOSTIP:%HTTPPORT/513
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -34,12 +34,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /513 HTTP/1.1

+%if !hyper
+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 1

 Content-Type: application/x-www-form-urlencoded

 

+%endif
 </protocol>
 # 42 - aborted by callback
 <errorcode>
diff --git a/tests/data/test514 b/tests/data/test514
index 82f8041..1d5f380 100644
--- a/tests/data/test514
+++ b/tests/data/test514
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -30,14 +30,14 @@
 http
 </server>
 <tool>
-lib514
+lib%TESTNUMBER
 </tool>
  <name>
 First set options to POST and then to make HEAD
  </name>
 # the 1s post-command delay helps to prevent a spurious failure on s390
  <command delay="1">
-http://%HOSTIP:%HTTPPORT/514
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-HEAD /514 HTTP/1.1

+HEAD /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test515 b/tests/data/test515
index bea2fe6..42d153b 100644
--- a/tests/data/test515
+++ b/tests/data/test515
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 3

 

@@ -25,14 +25,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib515
+lib%TESTNUMBER
 </tool>
 
  <name>
 make a POSTFIELDS set to NULL with POSTFIELDSIZE set to zero
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/515
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /515 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 0

diff --git a/tests/data/test516 b/tests/data/test516
index c41d15e..c441cfb 100644
--- a/tests/data/test516
+++ b/tests/data/test516
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 3

 

@@ -26,14 +26,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib516
+lib%TESTNUMBER
 </tool>
 
  <name>
 make a HTTPPOST set to NULL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/516
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /516 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 0

diff --git a/tests/data/test517 b/tests/data/test517
index f58f4ed..0152c0f 100644
--- a/tests/data/test517
+++ b/tests/data/test517
@@ -17,7 +17,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib517
+lib%TESTNUMBER
 </tool>
 
  <name>
diff --git a/tests/data/test518 b/tests/data/test518
index 0c88147..042b6d7 100644
--- a/tests/data/test518
+++ b/tests/data/test518
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -35,19 +35,19 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib518
+lib%TESTNUMBER
 </tool>
 # precheck is a command line to run before the test, to see if we can execute
 # the test or not
 <precheck>
-./libtest/lib518 check
+./libtest/lib%TESTNUMBER check
 </precheck>
 
  <name>
 HTTP GET with more than FD_SETSIZE descriptors open
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/518
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /518 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test519 b/tests/data/test519
index 9760560..9b47ed2 100644
--- a/tests/data/test519
+++ b/tests/data/test519
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsbounce

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 8

 

@@ -19,7 +19,7 @@
 </data>
 <data1>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 9

 

@@ -27,13 +27,13 @@
 </data1>
 <datacheck>
 HTTP/1.1 200 OK swsbounce

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 8

 

 content
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 9

 

@@ -48,14 +48,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib519
+lib%TESTNUMBER
 </tool>
 
  <name>
 GET same URL twice with different users
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/519
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -63,12 +63,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /519 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic bW9uc3Rlcjp1bmRlcmJlZA==

 Accept: */*

 

-GET /519 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic YW5vdGhlcm1vbnN0ZXI6aW53YXJkcm9iZQ==

 Accept: */*

diff --git a/tests/data/test52 b/tests/data/test52
index 196ff04..662a4ef 100644
--- a/tests/data/test52
+++ b/tests/data/test52
@@ -11,28 +11,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose
-Location: ./520002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: ./%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose
-Location: ./520002
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Location: ./%TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
 Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 
 body
@@ -49,7 +49,7 @@
 HTTP follow redirect with ./-prefix
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/are/all/twits/52 -L
+http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 </client>
 
@@ -57,12 +57,12 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/are/all/twits/52 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /we/are/all/twits/520002 HTTP/1.1

+GET /we/are/all/twits/%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test521 b/tests/data/test521
index 90f51b3..b8b7896 100644
--- a/tests/data/test521
+++ b/tests/data/test521
@@ -33,13 +33,13 @@
 ftp
 </server>
 <tool>
-lib521
+lib%TESTNUMBER
 </tool>
  <name>
 FTP dir list PASV with CURLOPT_PORT
  </name>
  <command>
-ftp://%HOSTIP/521/ %FTPPORT
+ftp://%HOSTIP/%TESTNUMBER/ %FTPPORT
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 USER xxx

 PASS yyy

 PWD

-CWD 521

+CWD %TESTNUMBER

 EPSV

 TYPE A

 LIST

diff --git a/tests/data/test522 b/tests/data/test522
index 8fc07c3..6691a29 100644
--- a/tests/data/test522
+++ b/tests/data/test522
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -36,7 +36,7 @@
 HTTP GET with CURLOPT_PORT
  </name>
  <command>
-http://%HOSTIP/522 %HTTPPORT
+http://%HOSTIP/%TESTNUMBER %HTTPPORT
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /522 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic eHh4Onl5eQ==

 Accept: */*

diff --git a/tests/data/test523 b/tests/data/test523
index 03d456b..88cda7a 100644
--- a/tests/data/test523
+++ b/tests/data/test523
@@ -14,7 +14,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -32,14 +32,14 @@
 http
 </server>
 <tool>
-lib523
+lib%TESTNUMBER
 </tool>
  <name>
 HTTP GET with proxy and CURLOPT_PORT
  </name>
 # first URL then proxy
  <command>
-http://www.example.com:999/523 http://%HOSTIP:%HTTPPORT
+http://www.example.com:999/%TESTNUMBER http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -50,7 +50,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://www.example.com:19999/523 HTTP/1.1

+GET http://www.example.com:19999/%TESTNUMBER HTTP/1.1

 Host: www.example.com:19999

 Authorization: Basic eHh4Onl5eQ==

 Accept: */*

diff --git a/tests/data/test524 b/tests/data/test524
index c609466..13246e2 100644
--- a/tests/data/test524
+++ b/tests/data/test524
@@ -18,7 +18,7 @@
 ftp
 </server>
 <tool>
-lib524
+lib%TESTNUMBER
 </tool>
  <name>
 FTP upload with target URL ending with slash
diff --git a/tests/data/test525 b/tests/data/test525
index 7bd494e..ce37399 100644
--- a/tests/data/test525
+++ b/tests/data/test525
@@ -20,15 +20,15 @@
 ftp
 </server>
 <tool>
-lib525
+lib%TESTNUMBER
 </tool>
  <name>
 FTP PORT upload using multi interface
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/525 log/upload525
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER log/upload%TESTNUMBER
 </command>
-<file name="log/upload525">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
  upload this
 </file>
@@ -48,7 +48,7 @@
 CWD path

 PORT 127,0,0,1,5,109

 TYPE I

-STOR 525

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test526 b/tests/data/test526
index 70e6dcd..be2e4be 100644
--- a/tests/data/test526
+++ b/tests/data/test526
@@ -27,13 +27,13 @@
 ftp
 </server>
 <tool>
-lib526
+lib%TESTNUMBER
 </tool>
  <name>
 FTP RETR same file using different handles but same connection
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/526
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -46,17 +46,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE 526

-RETR 526

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 526

-RETR 526

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 526

-RETR 526

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 526

-RETR 526

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test527 b/tests/data/test527
index 98892a9..be2e4be 100644
--- a/tests/data/test527
+++ b/tests/data/test527
@@ -27,13 +27,13 @@
 ftp
 </server>
 <tool>
-lib527
+lib%TESTNUMBER
 </tool>
  <name>
 FTP RETR same file using different handles but same connection
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/527
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -46,17 +46,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE 527

-RETR 527

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 527

-RETR 527

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 527

-RETR 527

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 527

-RETR 527

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test528 b/tests/data/test528
index 1d2e415..a55768b 100644
--- a/tests/data/test528
+++ b/tests/data/test528
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 47

 

@@ -37,26 +37,26 @@
 HTTP GET same file using different handles but same connection
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/path/528
+http://%HOSTIP:%HTTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /path/528 HTTP/1.1

+GET /path/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/528 HTTP/1.1

+GET /path/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/528 HTTP/1.1

+GET /path/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /path/528 HTTP/1.1

+GET /path/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test529 b/tests/data/test529
index 1614720..141166c 100644
--- a/tests/data/test529
+++ b/tests/data/test529
@@ -20,15 +20,15 @@
 ftp
 </server>
 <tool>
-lib529
+lib%TESTNUMBER
 </tool>
  <name>
 FTP PORT upload using multi interface (weird cleanup function sequence)
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/529 log/upload529
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER log/upload%TESTNUMBER
 </command>
-<file name="log/upload529">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
  upload this
 </file>
@@ -48,7 +48,7 @@
 CWD path

 PORT 127,0,0,1,5,109

 TYPE I

-STOR 529

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test53 b/tests/data/test53
index bffd063..e3b9ec9 100644
--- a/tests/data/test53
+++ b/tests/data/test53
@@ -29,9 +29,9 @@
 HTTP, junk session cookies
  </name>
  <command>
-%HOSTIP:%HTTPPORT/want/53 -b log/injar53 -j
+%HOSTIP:%HTTPPORT/want/%TESTNUMBER -b log/injar%TESTNUMBER -j
 </command>
-<file name="log/injar53">
+<file name="log/injar%TESTNUMBER">
 %HOSTIP	FALSE	/	FALSE	2139150993	mooo	indeed
 %HOSTIP	FALSE	/	FALSE	0		moo1	indeed
 %HOSTIP	FALSE	/	FALSE	1		moo2	indeed
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/53 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test531 b/tests/data/test531
index 8a7cee5..17ccf68 100644
--- a/tests/data/test531
+++ b/tests/data/test531
@@ -29,9 +29,9 @@
 FTP PORT upload using multi interface and get 425 response
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/531 log/upload531
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER log/upload%TESTNUMBER
 </command>
-<file name="log/upload531">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
 don't upload this
 </file>
@@ -51,7 +51,7 @@
 CWD path

 PORT 127,0,0,1,5,109

 TYPE I

-STOR 531

+STOR %TESTNUMBER

 QUIT

 </protocol>
 
diff --git a/tests/data/test532 b/tests/data/test532
index dc45db1..f36d044 100644
--- a/tests/data/test532
+++ b/tests/data/test532
@@ -27,13 +27,13 @@
 ftp
 </server>
 <tool>
-lib532
+lib%TESTNUMBER
 </tool>
  <name>
 FTP RETR same file using reset handles between each transfer
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/532
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -46,17 +46,17 @@
 CWD path

 EPSV

 TYPE I

-SIZE 532

-RETR 532

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 532

-RETR 532

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 532

-RETR 532

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 532

-RETR 532

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test533 b/tests/data/test533
index a67c8c8..4e94f88 100644
--- a/tests/data/test533
+++ b/tests/data/test533
@@ -25,13 +25,13 @@
 ftp
 </server>
 <tool>
-lib533
+lib%TESTNUMBER
 </tool>
  <name>
 FTP RETR a non-existing file twice using the multi interface
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/533 ftp://%HOSTIP:%FTPPORT/path/533
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -44,11 +44,11 @@
 CWD path

 EPSV

 TYPE I

-SIZE 533

-RETR 533

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 533

-RETR 533

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test534 b/tests/data/test534
index ba3f721..764fe66 100644
--- a/tests/data/test534
+++ b/tests/data/test534
@@ -32,7 +32,7 @@
 FTP RETR twice using multi: non-existing host and non-existing file
  </name>
  <command>
-ftp://non-existing-host.haxx.se/path/534 ftp://%HOSTIP:%FTPPORT/path/534
+ftp://non-existing-host.haxx.se/path/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -45,8 +45,8 @@
 CWD path

 EPSV

 TYPE I

-SIZE 534

-RETR 534

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test535 b/tests/data/test535
index 6837d2a..f9e6c39 100644
--- a/tests/data/test535
+++ b/tests/data/test535
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 404 Badness

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 ETag: "21025-dc7-39462498"

 Content-Length: 6

 Content-Type: text/html

@@ -20,7 +20,7 @@
 </data>
 <data1>
 HTTP/1.1 200 Fine

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 13

 Connection: close

 Content-Type: text/html

@@ -48,7 +48,7 @@
 HTTP GET multi two files with FAILONERROR
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/535 http://%HOSTIP:%HTTPPORT/5350001
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
 </command>
 </client>
 
@@ -56,11 +56,11 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /535 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /5350001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test537 b/tests/data/test537
index 14e285f..ab718fd 100644
--- a/tests/data/test537
+++ b/tests/data/test537
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -35,19 +35,19 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib537
+lib%TESTNUMBER
 </tool>
 # precheck is a command line to run before the test, to see if we can execute
 # the test or not
 <precheck>
-./libtest/lib537 check
+./libtest/lib%TESTNUMBER check
 </precheck>
 
  <name>
 HTTP GET with a HUGE number of file descriptors open
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/537
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /537 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test538 b/tests/data/test538
index d2fecd3..ff53a8e 100644
--- a/tests/data/test538
+++ b/tests/data/test538
@@ -27,7 +27,7 @@
 FTP multi-interface download, failed login: PASS not valid
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/538
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test539 b/tests/data/test539
index a698340..12f04e9 100644
--- a/tests/data/test539
+++ b/tests/data/test539
@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib539
+lib%TESTNUMBER
 </tool>
 
  <name>
 Two FTP fetches using different CURLOPT_FTP_FILEMETHOD
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/to/the/file/539
+ftp://%HOSTIP:%FTPPORT/path/to/the/file/%TESTNUMBER
 </command>
 </client>
 
@@ -58,13 +58,13 @@
 CWD path/to/the/file

 EPSV

 TYPE I

-SIZE 539

-RETR 539

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 SYST

 CWD /

 EPSV

 TYPE A

-LIST path/to/the/file/539.

+LIST path/to/the/file/%TESTNUMBER.

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test54 b/tests/data/test54
index 24f0819..a9efc29 100644
--- a/tests/data/test54
+++ b/tests/data/test54
@@ -11,7 +11,7 @@
 <data>
 HTTP/1.1 302 This is a weirdo text message swsclose
 Connection: close
-Location:  
+Location: 
 
 This server reply is for testing
 </data>
@@ -26,14 +26,14 @@
 HTTP with blank Location:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/54 -L
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/54 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test540 b/tests/data/test540
index 8f53b07..3e24048 100644
--- a/tests/data/test540
+++ b/tests/data/test540
@@ -62,7 +62,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib540
+lib%TESTNUMBER
 </tool>
 <features>
 !SSPI
@@ -73,32 +73,32 @@
 HTTP proxy auth Digest multi API re-using connection
  </name>
  <command>
-http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
+http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://test.remote.example.com/path/540 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: custom.set.host.name

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.example.com/path/540 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: custom.set.host.name

-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"

+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/%TESTNUMBER", response="ca507dcf189196b6a5374d3233042261"

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.example.com/path/540 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: custom.set.host.name

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.example.com/path/540 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: custom.set.host.name

-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"

+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/%TESTNUMBER", response="ca507dcf189196b6a5374d3233042261"

 Accept: */*

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test541 b/tests/data/test541
index 622daa0..2dc75f8 100644
--- a/tests/data/test541
+++ b/tests/data/test541
@@ -16,16 +16,16 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib541
+lib%TESTNUMBER
 </tool>
 
  <name>
 FTP upload and upload same file again without rewind
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/541 log/upload541
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER log/upload%TESTNUMBER
 </command>
-<file name="log/upload541">
+<file name="log/upload%TESTNUMBER">
 Contents
 of
 a file
@@ -48,9 +48,9 @@
 PWD

 EPSV

 TYPE I

-STOR 541

+STOR %TESTNUMBER

 EPSV

-STOR 541

+STOR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test542 b/tests/data/test542
index 5afe124..0d918fb 100644
--- a/tests/data/test542
+++ b/tests/data/test542
@@ -28,13 +28,13 @@
 ftp
 </server>
 <tool>
-lib542
+lib%TESTNUMBER
 </tool>
  <name>
 FTP a file with NOBODY yes and HEADER no
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/542
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 
 </client>
@@ -49,7 +49,7 @@
 PASS ftp@example.com

 PWD

 TYPE I

-SIZE 542

+SIZE %TESTNUMBER

 REST 0

 QUIT

 </protocol>
diff --git a/tests/data/test543 b/tests/data/test543
index f7e687c..2abaa69 100644
--- a/tests/data/test543
+++ b/tests/data/test543
@@ -12,7 +12,7 @@
 none
 </server>
 <tool>
-lib543
+lib%TESTNUMBER
 </tool>
  <name>
 curl_easy_escape
diff --git a/tests/data/test544 b/tests/data/test544
index 4bf9a6c..3904897 100644
--- a/tests/data/test544
+++ b/tests/data/test544
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 3

 

@@ -26,14 +26,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib544
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP POST text data using CURLOPT_COPYPOSTFIELDS
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/544
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /544 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 4

diff --git a/tests/data/test545 b/tests/data/test545
index f2a5ddd..a06b8eb 100644
--- a/tests/data/test545
+++ b/tests/data/test545
Binary files differ
diff --git a/tests/data/test546 b/tests/data/test546
index 00dca99..6db456f 100644
--- a/tests/data/test546
+++ b/tests/data/test546
@@ -38,7 +38,7 @@
 FTP RETR a non-existing file then a found one using the multi interface
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/546 ftp://%HOSTIP:%FTPPORT/path/546
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
@@ -51,11 +51,11 @@
 CWD path

 EPSV

 TYPE I

-SIZE 546

-RETR 546

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 EPSV

-SIZE 546

-RETR 546

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 <stdout>
diff --git a/tests/data/test547 b/tests/data/test547
index 5401e06..93ee790 100644
--- a/tests/data/test547
+++ b/tests/data/test547
@@ -72,7 +72,7 @@
 </server>
 # tool to use
 <tool>
-lib547
+lib%TESTNUMBER
 </tool>
 <features>
 NTLM
@@ -91,7 +91,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com/path/547 http://%HOSTIP:%HTTPPORT testuser:testpass
+http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
@@ -101,7 +101,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST http://test.remote.example.com/path/547 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

@@ -109,7 +109,7 @@
 Content-Type: application/x-www-form-urlencoded

 

 this is the blurb we want to upload
-POST http://test.remote.example.com/path/547 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

@@ -117,9 +117,9 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST http://test.remote.example.com/path/547 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 Proxy-Connection: Keep-Alive

 Content-Length: 36

diff --git a/tests/data/test548 b/tests/data/test548
index 3ce5ae1..72e816b 100644
--- a/tests/data/test548
+++ b/tests/data/test548
@@ -72,7 +72,7 @@
 </server>
 # tool to use
 <tool>
-lib548
+lib%TESTNUMBER
 </tool>
 <features>
 NTLM
@@ -91,7 +91,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com/path/548 http://%HOSTIP:%HTTPPORT testuser:testpass
+http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
@@ -101,7 +101,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST http://test.remote.example.com/path/548 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

@@ -109,7 +109,7 @@
 Content-Type: application/x-www-form-urlencoded

 

 this is the blurb we want to upload
-POST http://test.remote.example.com/path/548 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

@@ -117,9 +117,9 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST http://test.remote.example.com/path/548 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 Proxy-Connection: Keep-Alive

 Content-Length: 36

diff --git a/tests/data/test549 b/tests/data/test549
index 93c442a..9f6ade6 100644
--- a/tests/data/test549
+++ b/tests/data/test549
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -35,14 +35,14 @@
 proxy
 </features>
 <tool>
-lib549
+lib%TESTNUMBER
 </tool>
  <name>
 FTP RETR over proxy with CURLOPT_PROXY_TRANSFER_MODE
  </name>
 # first URL then proxy
  <command>
-ftp://www.example.com/moo/549 http://%HOSTIP:%HTTPPORT 
+ftp://www.example.com/moo/%TESTNUMBER http://%HOSTIP:%HTTPPORT 
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://www.example.com/moo/549;type=i HTTP/1.1

+GET ftp://www.example.com/moo/%TESTNUMBER;type=i HTTP/1.1

 Host: www.example.com:21

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test55 b/tests/data/test55
index 216f13c..8786d40 100644
--- a/tests/data/test55
+++ b/tests/data/test55
@@ -9,26 +9,26 @@
 <reply>
 <data>
 HTTP/1.1 302 OK swsclose
-Location: 550002
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Location: %TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 </data>
 <data2>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose
-Location: 550002
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Location: %TESTNUMBER0002
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:50:00 GMT
+Date: Tue, 09 Nov 2010 14:50:00 GMT
 Connection: close
 
 body
@@ -43,18 +43,18 @@
 HTTP follow redirect with single slash in path
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/55 -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -L
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /55 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /550002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test550 b/tests/data/test550
index bd8f422..233546b 100644
--- a/tests/data/test550
+++ b/tests/data/test550
@@ -13,7 +13,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -42,7 +42,7 @@
  </name>
 # first URL then proxy
  <command>
-ftp://www.example.com/moo/550 http://%HOSTIP:%HTTPPORT ascii
+ftp://www.example.com/moo/%TESTNUMBER http://%HOSTIP:%HTTPPORT ascii
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://www.example.com/moo/550;type=a HTTP/1.1

+GET ftp://www.example.com/moo/%TESTNUMBER;type=a HTTP/1.1

 Host: www.example.com:21

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test551 b/tests/data/test551
index 30c0ed9..2a6b1f5 100644
--- a/tests/data/test551
+++ b/tests/data/test551
@@ -69,14 +69,14 @@
 HTTP proxy auth Digest with POST data from read callback
  </name>
  <command>
-http://test.remote.example.com/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT s1lly:pers0n
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST http://test.remote.example.com/path/551 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

@@ -84,9 +84,9 @@
 Content-Type: application/x-www-form-urlencoded

 

 this is the blurb we want to upload
-POST http://test.remote.example.com/path/551 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

-Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/551", response="3325240726fbdaf1e61f3a0dd40b930c"

+Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/%TESTNUMBER", response="3325240726fbdaf1e61f3a0dd40b930c"

 Accept: */*

 Proxy-Connection: Keep-Alive

 Content-Length: 36

diff --git a/tests/data/test552 b/tests/data/test552
index 9ad37bd..15d531c 100644
--- a/tests/data/test552
+++ b/tests/data/test552
@@ -51,7 +51,7 @@
 </server>
 # tool to use
 <tool>
-lib552
+lib%TESTNUMBER
 </tool>
 <features>
 !SSPI
@@ -62,23 +62,23 @@
 HTTP proxy auth Digest with 70K POST data from read callback
  </name>
  <command>
-http://test.remote.example.com/path/552 http://s1lly:pers0n@%HOSTIP:%HTTPPORT/
+http://test.remote.example.com/path/%TESTNUMBER http://s1lly:pers0n@%HOSTIP:%HTTPPORT/
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST http://test.remote.example.com/path/552 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

 Content-Length: 70000

 Content-Type: application/x-www-form-urlencoded

 

-%repeat[7000 x test data%00]%POST http://test.remote.example.com/path/552 HTTP/1.1

+%repeat[7000 x test data%00]%POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

-Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/552", response="be7aedc47d821b6d847c445ded782c43"

+Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/%TESTNUMBER", response="be7aedc47d821b6d847c445ded782c43"

 Accept: */*

 Proxy-Connection: Keep-Alive

 Content-Length: 70000

diff --git a/tests/data/test553 b/tests/data/test553
index 3ddb532..f640ba4 100644
--- a/tests/data/test553
+++ b/tests/data/test553
@@ -27,7 +27,7 @@
 </server>
 # tool to use
 <tool>
-lib553
+lib%TESTNUMBER
 </tool>
 <features>
 </features>
@@ -35,14 +35,14 @@
 HTTP post with huge request headers and post data from callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/path/553
+http://%HOSTIP:%HTTPPORT/path/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /path/553 HTTP/1.1

+POST /path/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Header0: %repeat[5000 x A]%

diff --git a/tests/data/test554 b/tests/data/test554
index 24d9c04..8488be6 100644
--- a/tests/data/test554
+++ b/tests/data/test554
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -20,14 +20,14 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

 

 hello
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -43,14 +43,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib554
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP multi-part formpost using read callback for the file part
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/554
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -65,7 +65,7 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /554 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 744

@@ -96,7 +96,7 @@
 

 blah blah

 --------------------------------

-POST /554 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 758

diff --git a/tests/data/test555 b/tests/data/test555
index 506cbb4..b19949f 100644
--- a/tests/data/test555
+++ b/tests/data/test555
@@ -77,7 +77,7 @@
 </server>
 # tool to use
 <tool>
-lib555
+lib%TESTNUMBER
 </tool>
 <features>
 NTLM
@@ -96,7 +96,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com/path/555 http://%HOSTIP:%HTTPPORT testuser:testpass
+http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
@@ -106,7 +106,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST http://test.remote.example.com/path/555 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

@@ -114,7 +114,7 @@
 Content-Type: application/x-www-form-urlencoded

 

 this is the blurb we want to upload
-POST http://test.remote.example.com/path/555 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

@@ -122,9 +122,9 @@
 Content-Length: 0

 Content-Type: application/x-www-form-urlencoded

 

-POST http://test.remote.example.com/path/555 HTTP/1.1

+POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 Accept: */*

 Proxy-Connection: Keep-Alive

 Content-Length: 36

diff --git a/tests/data/test556 b/tests/data/test556
index 72a8b9e..6384084 100644
--- a/tests/data/test556
+++ b/tests/data/test556
@@ -25,7 +25,7 @@
 http
 </server>
 <tool>
-lib556
+lib%TESTNUMBER
 </tool>
  <name>
 send and recv HTTP
@@ -39,7 +39,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /556 HTTP/1.2

+GET /%TESTNUMBER HTTP/1.1

 Host: ninja

 

 </protocol>
diff --git a/tests/data/test557 b/tests/data/test557
index ad9350f..1963774 100644
--- a/tests/data/test557
+++ b/tests/data/test557
@@ -17,7 +17,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib557
+lib%TESTNUMBER
 </tool>
 
 <name>
diff --git a/tests/data/test558 b/tests/data/test558
index f313e81..6df7988 100644
--- a/tests/data/test558
+++ b/tests/data/test558
@@ -21,7 +21,7 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib558
+lib%TESTNUMBER
 </tool>
 
 <name>
@@ -36,11 +36,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <file name="log/memdump">
-MEM lib558.c: malloc()
-MEM lib558.c: free()
+MEM easy.c: malloc()
+MEM lib%TESTNUMBER.c: malloc()
+MEM lib%TESTNUMBER.c: free()
 MEM dynbuf.c: realloc()
 MEM dynbuf.c: realloc()
 MEM escape.c: free()
+MEM easy.c: free()
 </file>
 <stripfile>
 s/^MEM escape.c:\d+ free\(\(nil\)\)[\n]$//
diff --git a/tests/data/test559 b/tests/data/test559
index f08a5f8..878fe2b 100644
--- a/tests/data/test559
+++ b/tests/data/test559
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -31,14 +31,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib559
+lib%TESTNUMBER
 </tool>
 
 <name>
 use tiny CURLOPT_BUFFERSIZE
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/559
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test56 b/tests/data/test56
index 394ac35..b070119 100644
--- a/tests/data/test56
+++ b/tests/data/test56
@@ -38,21 +38,25 @@
 #
  </stdin>
  <command>
--K - %HOSTIP:%HTTPPORT/that.site.com/56
+-K - %HOSTIP:%HTTPPORT/that.site.com/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /that.site.com/56 HTTP/1.1

+POST /that.site.com/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: %repeat[99999 x a]%

 Accept: */*

 Transfer-Encoding: chunked

 Content-Type: application/x-www-form-urlencoded

 

+%if hyper
+C

+%else
 c

+%endif
 we post this

 0

 

diff --git a/tests/data/test560 b/tests/data/test560
index 72a35e4..0f9befb 100644
--- a/tests/data/test560
+++ b/tests/data/test560
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 7

 

@@ -30,13 +30,13 @@
 https
 </server>
 <tool>
-lib560
+lib%TESTNUMBER
 </tool>
  <name>
 simple HTTPS GET with multi interface
  </name>
  <command>
-https://%HOSTIP:%HTTPSPORT/560
+https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /560 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPSPORT

 Accept: */*

 

diff --git a/tests/data/test561 b/tests/data/test561
index 2f24461..a630185 100644
--- a/tests/data/test561
+++ b/tests/data/test561
@@ -14,7 +14,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -43,7 +43,7 @@
  </name>
 # first URL then proxy
  <command>
-"ftp://www.example.com/moo/561;type=i" http://%HOSTIP:%HTTPPORT ascii
+"ftp://www.example.com/moo/%TESTNUMBER;type=i" http://%HOSTIP:%HTTPPORT ascii
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://www.example.com/moo/561;type=i HTTP/1.1

+GET ftp://www.example.com/moo/%TESTNUMBER;type=i HTTP/1.1

 Host: www.example.com:21

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test562 b/tests/data/test562
index 070cf7a..f442a63 100644
--- a/tests/data/test562
+++ b/tests/data/test562
@@ -20,7 +20,7 @@
 ftp
 </server>
 <tool>
-lib562
+lib%TESTNUMBER
 </tool>
  <name>
 FTP a type=A URL and CURLOPT_PORT set
@@ -29,7 +29,7 @@
 # note that we need quotes around the URL below to make sure the shell doesn't
 # treat the semicolon as a separator!
  <command>
-'ftp://%HOSTIP:23456/562;type=A' %FTPPORT
+'ftp://%HOSTIP:23456/%TESTNUMBER;type=A' %FTPPORT
 </command>
 
 </client>
@@ -45,8 +45,7 @@
 PWD

 EPSV

 TYPE A

-SIZE 562

-RETR 562

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test563 b/tests/data/test563
index eb9372e..c19b902 100644
--- a/tests/data/test563
+++ b/tests/data/test563
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Accept-Ranges: bytes

 Content-Length: 6

@@ -41,7 +41,7 @@
 # note that we need quotes around the URL below to make sure the shell doesn't
 # treat the semicolon as a separator!
  <command>
-"ftp://%HOSTIP:23456/563;type=A" %FTPPORT
+"ftp://%HOSTIP:23456/%TESTNUMBER;type=A" %FTPPORT
 </command>
 
 </client>
@@ -49,7 +49,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://%HOSTIP:%FTPPORT/563;type=A HTTP/1.1

+GET ftp://%HOSTIP:%FTPPORT/%TESTNUMBER;type=A HTTP/1.1

 Host: %HOSTIP:%FTPPORT

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test564 b/tests/data/test564
index 3078e2d..3d866f2 100644
--- a/tests/data/test564
+++ b/tests/data/test564
@@ -30,13 +30,13 @@
 socks4
 </server>
 <tool>
-lib564
+lib%TESTNUMBER
 </tool>
  <name>
 FTP RETR a file over a SOCKS proxy using the multi interface
  </name>
 <command>
-ftp://%HOSTIP:%FTPPORT/path/564 %HOSTIP:%SOCKSPORT
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %HOSTIP:%SOCKSPORT
 </command>
 <features>
 proxy
@@ -52,8 +52,8 @@
 CWD path

 EPSV

 TYPE I

-SIZE 564

-RETR 564

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 <stdout>
diff --git a/tests/data/test565 b/tests/data/test565
index ae8518c..92a7a70 100644
--- a/tests/data/test565
+++ b/tests/data/test565
@@ -63,14 +63,14 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib565
+lib%TESTNUMBER
 </tool>
 
  <name>
 send HTTP POST using read callback, chunked transfer-encoding and Digest
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/565
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -78,7 +78,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /565 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

@@ -86,9 +86,9 @@
 

 0

 

-POST /565 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/565", response="877424f750af047634dbd94f9933217b"

+Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="877424f750af047634dbd94f9933217b"

 Accept: */*

 Transfer-Encoding: chunked

 Content-Type: application/x-www-form-urlencoded

@@ -100,7 +100,11 @@
 two

 5

 three

+%if hyper
+1D

+%else
 1d

+%endif
 and a final longer crap: four

 0

 

diff --git a/tests/data/test566 b/tests/data/test566
index 9923d8f..09144f5 100644
--- a/tests/data/test566
+++ b/tests/data/test566
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -30,25 +30,25 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib566
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP GET with CURLINFO_CONTENT_LENGTH_DOWNLOAD and 0 bytes transfer
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/566 log/ip566
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/ip%TESTNUMBER
 </command>
-</client> 
+</client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/ip566">
-CL: 0
+<file name="log/ip%TESTNUMBER">
+CL 0
 </file>
 <protocol>
-GET /566 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test567 b/tests/data/test567
index 4f91c85..f6cdec4 100644
--- a/tests/data/test567
+++ b/tests/data/test567
@@ -25,23 +25,23 @@
 rtsp
 </server>
 <tool>
-lib567
+lib%TESTNUMBER
 </tool>
 
 <name>
 simple RTSP OPTIONS command
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/567
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-OPTIONS rtsp://%HOSTIP:%RTSPPORT/567 RTSP/1.0

+OPTIONS rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER RTSP/1.0

 CSeq: 1

-User-Agent: test567

-Test-Number: 567

+User-Agent: test%TESTNUMBER

+Test-Number: %TESTNUMBER

 

 </protocol>
 </verify>
diff --git a/tests/data/test568 b/tests/data/test568
index 372866d..7dd23ca 100644
--- a/tests/data/test568
+++ b/tests/data/test568
@@ -51,17 +51,17 @@
 rtsp
 </server>
 <tool>
-lib568
+lib%TESTNUMBER
 </tool>
 
 <name>
 RTSP Announce (PUT and POST style) test
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/568
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER
 </command>
 # file written before test command runs
-<file name="log/file568.txt">
+<file name="log/file%TESTNUMBER.txt">
 v=0
 o=mhandley 2890844526 2890845468 IN IP4 126.16.64.4
 s=SDP Seminar
@@ -81,7 +81,7 @@
 ^If-Modified-Since:.*
 </strip>
 <protocol>
-ANNOUNCE rtsp://%HOSTIP:%RTSPPORT/5680001 RTSP/1.0

+ANNOUNCE rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0001 RTSP/1.0

 CSeq: 1

 Content-Length: 306

 Content-Type: application/sdp

@@ -97,17 +97,17 @@
 a=recvonly
 m=audio 3456 RTP/AVP 0
 m=video 2232 RTP/AVP 31
-DESCRIBE rtsp://%HOSTIP:%RTSPPORT/5680002 RTSP/1.0

+DESCRIBE rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0002 RTSP/1.0

 CSeq: 2

 Accept: application/sdp

 

-ANNOUNCE rtsp://%HOSTIP:%RTSPPORT/5680003 RTSP/1.0

+ANNOUNCE rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0003 RTSP/1.0

 CSeq: 3

 Content-Type: posty goodness

 Content-Length: 35

 

 postyfield=postystuff&project=curl
-OPTIONS rtsp://%HOSTIP:%RTSPPORT/5680004 RTSP/1.0

+OPTIONS rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0004 RTSP/1.0

 CSeq: 4

 

 </protocol>
diff --git a/tests/data/test569 b/tests/data/test569
index 924832c..043c244 100644
--- a/tests/data/test569
+++ b/tests/data/test569
@@ -59,14 +59,14 @@
 rtsp
 </server>
 <tool>
-lib569
+lib%TESTNUMBER
 </tool>
 
 <name>
 RTSP Session ID parsing
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/569 log/idfile569.txt
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER log/idfile%TESTNUMBER.txt
 </command>
 </client>
 
@@ -75,32 +75,32 @@
 ^If-Modified-Since:.*
 </strip>
 <protocol>
-SETUP rtsp://%HOSTIP:%RTSPPORT/5690001 RTSP/1.0

+SETUP rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0001 RTSP/1.0

 CSeq: 1

 Transport: Fake/NotReal/JustATest;foo=baz

 

-TEARDOWN rtsp://%HOSTIP:%RTSPPORT/5690002 RTSP/1.0

+TEARDOWN rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0002 RTSP/1.0

 CSeq: 2

 Session: 00.+1-am-aSe55ion_id\$yes-i-am\$

 

-SETUP rtsp://%HOSTIP:%RTSPPORT/5690003 RTSP/1.0

+SETUP rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0003 RTSP/1.0

 CSeq: 3

 Transport: Fake/NotReal/JustATest;foo=baz

 

-TEARDOWN rtsp://%HOSTIP:%RTSPPORT/5690004 RTSP/1.0

+TEARDOWN rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0004 RTSP/1.0

 CSeq: 4

 Session: \$extraspaces

 

-SETUP rtsp://%HOSTIP:%RTSPPORT/5690005 RTSP/1.0

+SETUP rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0005 RTSP/1.0

 CSeq: 5

 Transport: Fake/NotReal/JustATest;foo=baz

 

-TEARDOWN rtsp://%HOSTIP:%RTSPPORT/5690006 RTSP/1.0

+TEARDOWN rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0006 RTSP/1.0

 CSeq: 6

 Session: A

 

 </protocol>
-<file name="log/idfile569.txt">
+<file name="log/idfile%TESTNUMBER.txt">
 Got Session ID: [00.+1-am-aSe55ion_id\$yes-i-am\$]
 Got Session ID: [\$extraspaces]
 Got Session ID: [A]
diff --git a/tests/data/test57 b/tests/data/test57
index 5011e6e..f379d74 100644
--- a/tests/data/test57
+++ b/tests/data/test57
@@ -26,7 +26,7 @@
 HTTP content-type with spaces in
  </name>
  <command>
--w "%{content_type}\n" http://%HOSTIP:%HTTPPORT/57 -o log/out57
+-w "%{content_type}\n" http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/out%TESTNUMBER
 </command>
 </client>
 
@@ -36,7 +36,7 @@
 text/html; charset=ISO-8859-4
 </stdout>
 <protocol>
-GET /57 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test570 b/tests/data/test570
index 431c79a..c1a0348 100644
--- a/tests/data/test570
+++ b/tests/data/test570
@@ -43,14 +43,14 @@
 rtsp
 </server>
 <tool>
-lib570
+lib%TESTNUMBER
 </tool>
 
 <name>
 RTSP CSeq and Session Mismatch checks
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/570
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -59,14 +59,14 @@
 ^If-Modified-Since:.*
 </strip>
 <protocol>
-OPTIONS rtsp://%HOSTIP:%RTSPPORT/5700001 RTSP/1.0

+OPTIONS rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0001 RTSP/1.0

 CSeq: 1

 

-SETUP rtsp://%HOSTIP:%RTSPPORT/5700002 RTSP/1.0

+SETUP rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0002 RTSP/1.0

 CSeq: 999

 Transport: RAW/RAW/UDP;unicast;client_port=3056-3057

 

-PLAY rtsp://%HOSTIP:%RTSPPORT/5700003 RTSP/1.0

+PLAY rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0003 RTSP/1.0

 CSeq: 1000

 Session: asdf

 

diff --git a/tests/data/test571 b/tests/data/test571
index 842410a..3cc1b98 100644
--- a/tests/data/test571
+++ b/tests/data/test571
@@ -71,14 +71,14 @@
 rtsp
 </server>
 <tool>
-lib571
+lib%TESTNUMBER
 </tool>
 
 <name>
 RTSP RTP Interleaving Test
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/571 log/protofile571.txt
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER log/protofile%TESTNUMBER.txt
 </command>
 </client>
 
@@ -99,7 +99,7 @@
 RTP: message size 24, channel 1
 </stdout>
 
-<file name="log/protofile571.txt">
+<file name="log/protofile%TESTNUMBER.txt">
 $99
 </file>
 </verify>
diff --git a/tests/data/test572 b/tests/data/test572
index 7f04447..0a47055 100644
--- a/tests/data/test572
+++ b/tests/data/test572
@@ -66,17 +66,17 @@
 rtsp
 </server>
 <tool>
-lib572
+lib%TESTNUMBER
 </tool>
 
 <name>
 RTSP GET_PARAMETER (Put/Heartbeat/Post)
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/572
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER
 </command>
 # file written before test command runs
-<file name="log/file572.txt">
+<file name="log/file%TESTNUMBER.txt">
 scale
 speed
 </file>
@@ -87,11 +87,11 @@
 ^If-Modified-Since:.*
 </strip>
 <protocol>
-SETUP rtsp://%HOSTIP:%RTSPPORT/5720001 RTSP/1.0

+SETUP rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0001 RTSP/1.0

 CSeq: 1

 Transport: Planes/Trains/Automobiles

 

-GET_PARAMETER rtsp://%HOSTIP:%RTSPPORT/5720002 RTSP/1.0

+GET_PARAMETER rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0002 RTSP/1.0

 CSeq: 2

 Session: getparams-test

 Content-Length: 12

@@ -99,11 +99,11 @@
 

 scale
 speed
-GET_PARAMETER rtsp://%HOSTIP:%RTSPPORT/5720003 RTSP/1.0

+GET_PARAMETER rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0003 RTSP/1.0

 CSeq: 3

 Session: getparams-test

 

-GET_PARAMETER rtsp://%HOSTIP:%RTSPPORT/5720004 RTSP/1.0

+GET_PARAMETER rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0004 RTSP/1.0

 CSeq: 4

 Session: getparams-test

 Content-Length: 24

@@ -111,7 +111,7 @@
 

 packets_received
 jitter
-OPTIONS rtsp://%HOSTIP:%RTSPPORT/5720005 RTSP/1.0

+OPTIONS rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER0005 RTSP/1.0

 CSeq: 5

 Session: getparams-test

 

diff --git a/tests/data/test573 b/tests/data/test573
index b76f259..cab270b 100644
--- a/tests/data/test573
+++ b/tests/data/test573
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -32,21 +32,21 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib573
+lib%TESTNUMBER
 </tool>
 
  <name>
 verify connect time with multi interface
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/573
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /573 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test574 b/tests/data/test574
index cb41f03..436e182 100644
--- a/tests/data/test574
+++ b/tests/data/test574
@@ -22,7 +22,7 @@
 ftp
 </server>
 <tool>
-lib574
+lib%TESTNUMBER
 </tool>
 <name>
 FTP wildcard download - changed fnmatch, 2x perform (Unix LIST response)
diff --git a/tests/data/test575 b/tests/data/test575
index 8133834..e84a39f 100644
--- a/tests/data/test575
+++ b/tests/data/test575
@@ -21,7 +21,7 @@
 ftp
 </server>
 <tool>
-lib575
+lib%TESTNUMBER
 </tool>
  <name>
 FTP wildcard download - dup_handle and multi interface
diff --git a/tests/data/test576 b/tests/data/test576
index 74a3aed..2a1b941 100644
--- a/tests/data/test576
+++ b/tests/data/test576
@@ -19,7 +19,7 @@
 ftp
 </server>
 <tool>
-lib576
+lib%TESTNUMBER
 </tool>
  <name>
 FTP wildcard download - skip/parser_correctness/CURLOPT_FNMATCH_FUNCTION (Unix)
diff --git a/tests/data/test577 b/tests/data/test577
index 5255492..d880f28 100644
--- a/tests/data/test577
+++ b/tests/data/test577
@@ -34,13 +34,13 @@
 Funny RTSP version in response
 </name>
 <command>
-rtsp://%HOSTIP:%RTSPPORT/577
+rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-OPTIONS rtsp://%HOSTIP:%RTSPPORT/577 RTSP/1.0

+OPTIONS rtsp://%HOSTIP:%RTSPPORT/%TESTNUMBER RTSP/1.0

 CSeq: 1

 User-Agent: test567

 Test-Number: 567

diff --git a/tests/data/test578 b/tests/data/test578
index 788ed72..2ff8a1f 100644
--- a/tests/data/test578
+++ b/tests/data/test578
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT

 ETag: "21025-dc7-39462498"

@@ -31,21 +31,21 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib578
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP POST lower than MAX_INITIAL_POST_SIZE with progress callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/578 log/ip578
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/ip%TESTNUMBER
 </command>
 </client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/ip578">
+<file name="log/ip%TESTNUMBER">
 PASSED, UL data matched data size
 </file>
 </verify>
diff --git a/tests/data/test579 b/tests/data/test579
index e352e3d..e4b072b 100644
--- a/tests/data/test579
+++ b/tests/data/test579
@@ -61,21 +61,21 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib579
+lib%TESTNUMBER
 </tool>
 
  <name>
 small chunked HTTP POSTs with digest auth. and progress callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/579 log/ip579
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/ip%TESTNUMBER
 </command>
 </client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/ip579">
+<file name="log/ip%TESTNUMBER">
 Progress callback called with UL 0 out of 0
 Progress callback called with UL 8 out of 0
 Progress callback called with UL 16 out of 0
diff --git a/tests/data/test58 b/tests/data/test58
index f2eafe2..01d7189 100644
--- a/tests/data/test58
+++ b/tests/data/test58
@@ -9,7 +9,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -26,9 +26,9 @@
 HTTP PUT from file with weird letters
 </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/ -T log/58te[]st.txt -g
+http://%HOSTIP:%HTTPPORT/we/want/ -T log/%TESTNUMBERte[]st.txt -g
 </command>
-<file name="log/58te[]st.txt">
+<file name="log/%TESTNUMBERte[]st.txt">
 a few bytes
 </file>
 </client>
@@ -36,7 +36,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /we/want/58te%5B%5Dst.txt HTTP/1.1

+PUT /we/want/%TESTNUMBERte%5B%5Dst.txt HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test580 b/tests/data/test580
index b448ee3..c19a52a 100644
--- a/tests/data/test580
+++ b/tests/data/test580
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 302 eat this!

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Location: this-is-the-first.html

 Content-Length: 0

@@ -39,14 +39,14 @@
 multi interface, multiple Location: headers
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/580
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /580 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test581 b/tests/data/test581
index 92871c3..50b99e3 100644
--- a/tests/data/test581
+++ b/tests/data/test581
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 all good!

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Content-Length: 0

@@ -39,14 +39,14 @@
 multi interface, multiple Content-Type: headers
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/581
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /581 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test582 b/tests/data/test582
index 8ac6bc8..ddf17e3 100644
--- a/tests/data/test582
+++ b/tests/data/test582
@@ -18,15 +18,15 @@
 sftp
 </server>
 <tool>
-lib582
+lib%TESTNUMBER
 </tool>
  <name>
 SFTP upload using multi interface
  </name>
  <command>
-Sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload582.txt %PWD/log/file582.txt %USER:
+Sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload%TESTNUMBER.txt %PWD/log/file%TESTNUMBER.txt %USER:
 </command>
-<file name="log/file582.txt">
+<file name="log/file%TESTNUMBER.txt">
 Moooooooooooo
  upload this
 </file>
@@ -41,7 +41,7 @@
 </strip>
 <protocol>
 </protocol>
-<file name="log/file582.txt">
+<file name="log/file%TESTNUMBER.txt">
 Moooooooooooo
  upload this
 </file>
diff --git a/tests/data/test583 b/tests/data/test583
index e7d9596..029cdac 100644
--- a/tests/data/test583
+++ b/tests/data/test583
@@ -18,7 +18,7 @@
 sftp
 </server>
 <tool>
-lib583
+lib%TESTNUMBER
 </tool>
  <name>
 SFTP with multi interface, remove handle early
@@ -29,7 +29,7 @@
 # name resolve will cause it to return rather quickly and thus we could trigger
 # the problem we're looking to verify.
  <command>
-sftp://localhost:%SSHPORT%SSH_PWD/log/upload583.txt %USER:
+sftp://localhost:%SSHPORT%SSH_PWD/log/upload%TESTNUMBER.txt %USER:
 </command>
 </client>
 
diff --git a/tests/data/test584 b/tests/data/test584
new file mode 100644
index 0000000..fb23444
--- /dev/null
+++ b/tests/data/test584
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+HTTP MIME
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK swsclose

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Server: test-server/fake

+Content-Length: 3

+

+OK
+</data>
+<datacheck>
+HTTP/1.1 200 OK swsclose

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Server: test-server/fake

+Content-Length: 3

+

+OK
+HTTP/1.1 200 OK swsclose

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Server: test-server/fake

+Content-Length: 3

+

+OK
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool to invoke
+<tool>
+lib%TESTNUMBER
+</tool>
+
+ <name>
+CURLOPT_MIMEPOST first set then set to NULL
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^--------------------------[a-z0-9]*/--------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
+</strippart>
+<protocol>
+POST /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Accept: */*

+Content-Length: 144

+Content-Type: multipart/form-data; boundary=------------------------

+

+--------------------------

+Content-Disposition: form-data; name="fake"

+

+party

+----------------------------

+POST /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Accept: */*

+Content-Length: 0

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test585 b/tests/data/test585
index ecde4be..213edef 100644
--- a/tests/data/test585
+++ b/tests/data/test585
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 302 eat this!

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Location: this-is-the-first.html

 Content-Length: 0

@@ -23,7 +23,7 @@
 <datacheck>
 [OPEN] counter: 1
 HTTP/1.1 302 eat this!

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Location: this-is-the-first.html

 Content-Length: 0

@@ -43,21 +43,21 @@
 </features>
 # tool is what to use instead of 'curl'
 <tool>
-lib585
+lib%TESTNUMBER
 </tool>
 
  <name>
 socket open/close callbacks
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/585
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /585 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test586 b/tests/data/test586
index c0857bd..18d614b 100644
--- a/tests/data/test586
+++ b/tests/data/test586
@@ -38,7 +38,7 @@
 FTP and open/close socket callbacks
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/586
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -51,8 +51,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 586

-RETR 586

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test587 b/tests/data/test587
index 0d9530e..a40e4bf 100644
--- a/tests/data/test587
+++ b/tests/data/test587
@@ -21,14 +21,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib587
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP multi-part formpost with aborted read callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/587
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /587 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 744

diff --git a/tests/data/test588 b/tests/data/test588
index b30828c..1eb262f 100644
--- a/tests/data/test588
+++ b/tests/data/test588
@@ -35,9 +35,9 @@
 FTP PORT upload using multi interface, EPRT doesn't work
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/588 log/upload588
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER log/upload%TESTNUMBER
 </command>
-<file name="log/upload588">
+<file name="log/upload%TESTNUMBER">
 Moooooooooooo
  upload this
 </file>
@@ -58,7 +58,7 @@
 EPRT |1|
 PORT
 TYPE I

-STOR 588

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <upload>
diff --git a/tests/data/test589 b/tests/data/test589
index 81f7881..02fe543 100644
--- a/tests/data/test589
+++ b/tests/data/test589
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 3

 

@@ -27,14 +27,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib589
+lib%TESTNUMBER
 </tool>
 
  <name>
 make a HTTP MIME POST set to NULL
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/589
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-POST /589 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 0

diff --git a/tests/data/test59 b/tests/data/test59
index b93f99d..809e472 100644
--- a/tests/data/test59
+++ b/tests/data/test59
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 hej 
@@ -27,7 +27,7 @@
 HTTP URL with slash but with "parameter"
  </name>
  <command>
-"http://%HOSTIP:%HTTPPORT?mooo/59"
+"http://%HOSTIP:%HTTPPORT?mooo/%TESTNUMBER"
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /?mooo/59 HTTP/1.1

+GET /?mooo/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test590 b/tests/data/test590
index cb24cbb..045b037 100644
--- a/tests/data/test590
+++ b/tests/data/test590
@@ -70,7 +70,7 @@
 </server>
 # tool to use
 <tool>
-lib590
+lib%TESTNUMBER
 </tool>
 <features>
 NTLM
@@ -89,7 +89,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.example.com/path/590 http://%HOSTIP:%HTTPPORT
+http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT
 </command>
 <precheck>
 chkhostname curlhost
@@ -100,20 +100,20 @@
 <verify>
 
 <protocol>
-GET http://test.remote.example.com/path/590 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.example.com/path/590 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://test.remote.example.com/path/590 HTTP/1.1

+GET http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1

 Host: test.remote.example.com

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAgACAHAAAAAIAAgAcgAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAAIWYOdZV0iKA8ytf+dU+Bz9TpMJ4mBKu221lY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAgACAHAAAAAIAAgAcgAAAAAAAAAAAAAAhoIBAAQt1KW5CgG4YdWWcfXyfXBz1ZMCzYp37xYjBiAizmw58O6eQS7yR66eqYGWeSwl9W1lY3VybGhvc3Q=

 Accept: */*

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test591 b/tests/data/test591
index e1dfcd3..843ddb3 100644
--- a/tests/data/test591
+++ b/tests/data/test591
@@ -1,7 +1,7 @@
 <testcase>
 #
 # For this test the server rejects the EPRT command,
-# code in lib591 makes use of curl_multi_timeout()
+# code in lib%TESTNUMBER makes use of curl_multi_timeout()
 # and server does not establish data connection.
 #
 <info>
@@ -31,16 +31,16 @@
 ftp
 </server>
 <tool>
-lib591
+lib%TESTNUMBER
 </tool>
  <name>
 FTP multi PORT and 425 on upload
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/591 %FTPTIME2 log/upload591
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %FTPTIME2 log/upload%TESTNUMBER
 </command>
-<file name="log/upload591">
-Moooooooooooo for 591
+<file name="log/upload%TESTNUMBER">
+Moooooooooooo for %TESTNUMBER
  upload this
 </file>
 </client>
@@ -60,7 +60,7 @@
 EPRT |1|
 PORT
 TYPE I

-STOR 591

+STOR %TESTNUMBER

 QUIT

 </protocol>
 # CURLE_FTP_ACCEPT_FAILED = 10
diff --git a/tests/data/test592 b/tests/data/test592
index 6151ccc..fc9f15d 100644
--- a/tests/data/test592
+++ b/tests/data/test592
@@ -37,10 +37,10 @@
 FTP multi PORT and 421 on upload
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/592 %FTPTIME2 log/upload592
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %FTPTIME2 log/upload%TESTNUMBER
 </command>
-<file name="log/upload592">
-Moooooooooooo for 592
+<file name="log/upload%TESTNUMBER">
+Moooooooooooo for %TESTNUMBER
  upload this
 </file>
 </client>
@@ -61,7 +61,7 @@
 EPRT |1|
 PORT
 TYPE I

-STOR 592

+STOR %TESTNUMBER

 QUIT

 </protocol>
 # CURLE_FTP_ACCEPT_FAILED = 10
diff --git a/tests/data/test593 b/tests/data/test593
index a136000..47c1d94 100644
--- a/tests/data/test593
+++ b/tests/data/test593
@@ -37,10 +37,10 @@
 FTP multi PORT upload, no data conn and no transient neg. reply
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/593 %FTPTIME2 log/upload593
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %FTPTIME2 log/upload%TESTNUMBER
 </command>
-<file name="log/upload593">
-Moooooooooooo for 593
+<file name="log/upload%TESTNUMBER">
+Moooooooooooo for %TESTNUMBER
  upload this
 </file>
 </client>
@@ -60,7 +60,7 @@
 EPRT |1|
 PORT
 TYPE I

-STOR 593

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <errorcode>
diff --git a/tests/data/test594 b/tests/data/test594
index d6144ae..5a46450 100644
--- a/tests/data/test594
+++ b/tests/data/test594
@@ -37,10 +37,10 @@
 FTP multi PORT upload, no data conn and no positive prelim. reply
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/path/594 %FTPTIME2 log/upload594
+ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %FTPTIME2 log/upload%TESTNUMBER
 </command>
-<file name="log/upload594">
-Moooooooooooo for 594
+<file name="log/upload%TESTNUMBER">
+Moooooooooooo for %TESTNUMBER
  upload this
 </file>
 </client>
@@ -60,7 +60,7 @@
 EPRT |1|
 PORT
 TYPE I

-STOR 594

+STOR %TESTNUMBER

 QUIT

 </protocol>
 <errorcode>
diff --git a/tests/data/test595 b/tests/data/test595
index 0099a85..4d2f62b 100644
--- a/tests/data/test595
+++ b/tests/data/test595
@@ -36,7 +36,7 @@
 verify close callbacks with passive FTP
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/595 log/ip595
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER log/ip%TESTNUMBER
 </command>
 </client>
 
@@ -49,8 +49,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 595

-RETR 595

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test596 b/tests/data/test596
index 9377289..64bd52b 100644
--- a/tests/data/test596
+++ b/tests/data/test596
@@ -36,7 +36,7 @@
 verify close callbacks with active FTP
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/596 log/ip596 activeftp
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER log/ip%TESTNUMBER activeftp
 </command>
 </client>
 
@@ -52,8 +52,8 @@
 PWD

 EPRT |1|
 TYPE I

-SIZE 596

-RETR 596

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test597 b/tests/data/test597
index 3eb9ed8..6ab5788 100644
--- a/tests/data/test597
+++ b/tests/data/test597
@@ -12,7 +12,7 @@
 ftp
 </server>
 <tool>
-lib597
+lib%TESTNUMBER
 </tool>
  <name>
 FTP connect only option
diff --git a/tests/data/test598 b/tests/data/test598
index 89b8e6f..5e52315 100644
--- a/tests/data/test598
+++ b/tests/data/test598
@@ -14,7 +14,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 Connection: close

 Content-Type: text/html

@@ -25,14 +25,14 @@
 # since the request runs twice
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 Connection: close

 Content-Type: text/html

 

 -foo-
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 6

 Connection: close

 Content-Type: text/html

@@ -49,14 +49,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib598
+lib%TESTNUMBER
 </tool>
 
  <name>
 curl_easy_reset with referer and other strings set
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/598
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -64,14 +64,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /598 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: the-moo agent next generation

 Accept: */*

 Referer: http://example.com/the-moo

 Cookie: name=moo

 

-GET /598 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test599 b/tests/data/test599
index 9a6c412..5911b96 100644
--- a/tests/data/test599
+++ b/tests/data/test599
@@ -11,9 +11,9 @@
 <reply>
 <data>
 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: 5990001

+Location: %TESTNUMBER0001

 Content-Length: 6

 Connection: close

 Content-Type: text/html

@@ -22,7 +22,7 @@
 </data>
 <data1>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Transfer-Encoding: chunked

 Connection: close

@@ -37,15 +37,15 @@
 
 <datacheck>
 HTTP/1.1 302 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

-Location: 5990001

+Location: %TESTNUMBER0001

 Content-Length: 6

 Connection: close

 Content-Type: text/html

 

 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Transfer-Encoding: chunked

 Connection: close

@@ -63,7 +63,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib599
+lib%TESTNUMBER
 </tool>
 
 # Bug 3510057 pointed out that when following a location to a larger chunked
@@ -72,15 +72,15 @@
 HTTP GET with progress callback and redirects changing content sizes
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/599 log/ip599
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/ip%TESTNUMBER
 </command>
 </client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/ip599">
-CL: -1
+<file name="log/ip%TESTNUMBER">
+CL -1
 </file>
 </verify>
 </testcase>
diff --git a/tests/data/test6 b/tests/data/test6
index 09664cd..d8231cb 100644
--- a/tests/data/test6
+++ b/tests/data/test6
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,18 +29,18 @@
 HTTP with simple cookie send
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/6 -b "name=contents;name2=content2"
+http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER -b "name=contents;name2=content2" -b name3=content3
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/that/page/6 HTTP/1.1

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

-Cookie: name=contents;name2=content2

+Cookie: name=contents;name2=content2;name3=content3

 

 </protocol>
 </verify>
diff --git a/tests/data/test60 b/tests/data/test60
index 09cd54f..d23918b 100644
--- a/tests/data/test60
+++ b/tests/data/test60
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 

 blablabla
@@ -28,7 +28,7 @@
 HTTP PUT from stdin with wrong content-length
 </name>
  <command>
-http://%HOSTIP:%HTTPPORT/bzz/60 -T - -H "Content-Length: 1"
+http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER -T - -H "Content-Length: 1"
 </command>
 <stdin>
 more than one byte
@@ -38,12 +38,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /bzz/60 HTTP/1.1

+PUT /bzz/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Transfer-Encoding: chunked

+%if !hyper
 Content-Length: 1

+%endif
 Expect: 100-continue

 

 13

diff --git a/tests/data/test600 b/tests/data/test600
index f9415e0..88a6055 100644
--- a/tests/data/test600
+++ b/tests/data/test600
@@ -24,9 +24,9 @@
 SFTP retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file600.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file600.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test601 b/tests/data/test601
index c89b645..cadeeaf 100644
--- a/tests/data/test601
+++ b/tests/data/test601
@@ -24,9 +24,9 @@
 SCP retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file601.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file601.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test602 b/tests/data/test602
index dd300c7..56d2747 100644
--- a/tests/data/test602
+++ b/tests/data/test602
@@ -21,9 +21,9 @@
 SFTP put
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file602.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.602 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.%TESTNUMBER --insecure
 </command>
-<file name="log/file602.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test603 b/tests/data/test603
index b96c405..b873f15 100644
--- a/tests/data/test603
+++ b/tests/data/test603
@@ -21,9 +21,9 @@
 SCP upload
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file603.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.603 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.%TESTNUMBER --insecure
 </command>
-<file name="log/file603.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test608 b/tests/data/test608
index b4d0105..f919e9c 100644
--- a/tests/data/test608
+++ b/tests/data/test608
@@ -24,14 +24,14 @@
 SFTP post-quote rename
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/file608.txt %PWD/log/file608-renamed.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file608.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/file%TESTNUMBER.txt %PWD/log/file%TESTNUMBER-renamed.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
 # Verify that the file was renamed properly, then rename the file back to what
 # it was so the verify section works and the file can be cleaned up.
 <postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/log/file608.txt move %PWD/log/file608-renamed.txt %PWD/log/file608.txt
+perl %SRCDIR/libtest/test610.pl gone %PWD/log/file%TESTNUMBER.txt move %PWD/log/file%TESTNUMBER-renamed.txt %PWD/log/file%TESTNUMBER.txt
 </postcheck>
-<file name="log/file608.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test file for rename test
 </file>
 </client>
@@ -39,7 +39,7 @@
 #
 # Verify data after the test has been "shot"
 <verify>
-<file name="log/file608.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test file for rename test
 </file>
 <valgrind>
diff --git a/tests/data/test609 b/tests/data/test609
index 5aa9eec..66057d2 100644
--- a/tests/data/test609
+++ b/tests/data/test609
@@ -25,9 +25,9 @@
 SFTP post-quote mkdir failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-mkdir %PWD/log/file609.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file609.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-mkdir %PWD/log/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file609.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test file for mkdir test
 </file>
 </client>
diff --git a/tests/data/test61 b/tests/data/test61
index 67bee52..6d98ba7 100644
--- a/tests/data/test61
+++ b/tests/data/test61
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Type: text/html

 Funny-head: yesyes

@@ -23,7 +23,7 @@
 Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure

 Set-Cookie: test5=name; domain=anything.com; path=/ ; secure

 Set-Cookie: fake=fooledyou; domain=..com; path=/;

-Set-Cookie: supercookie=fooledyou; domain=.com; path=/;^M
+Set-Cookie: supercookie=fooledyou; domain=.com; path=/;

 Content-Length: 4

 

 boo
@@ -45,22 +45,22 @@
 TZ=GMT
 </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -c log/jar%TESTNUMBER.txt -H "Host: www.host.foo.com"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/61 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: www.host.foo.com

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/jar61.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .host.foo.com	TRUE	/we/want/	FALSE	2118138987	test2	yes
diff --git a/tests/data/test610 b/tests/data/test610
index d097421..d9eb2e6 100644
--- a/tests/data/test610
+++ b/tests/data/test610
@@ -21,18 +21,18 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test610.dir
+perl %SRCDIR/libtest/test%TESTNUMBER.pl mkdir %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP post-quote rmdir
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rmdir %PWD/log/test610.dir" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file610.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rmdir %PWD/log/test%TESTNUMBER.dir" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/log/test610.dir
+perl %SRCDIR/libtest/test%TESTNUMBER.pl gone %PWD/log/test%TESTNUMBER.dir
 </postcheck>
-<file name="log/file610.txt">
+<file name="log/file%TESTNUMBER.txt">
 Dummy test file for rmdir test
 </file>
 </client>
diff --git a/tests/data/test611 b/tests/data/test611
index 6362002..ee2a185 100644
--- a/tests/data/test611
+++ b/tests/data/test611
@@ -21,18 +21,18 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test611.dir
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP post-quote rename
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/test611.dir %PWD/log/test611.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file611.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/test%TESTNUMBER.dir %PWD/log/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test611.new
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test%TESTNUMBER.new
 </postcheck>
-<file name="log/file611.txt">
+<file name="log/file%TESTNUMBER.txt">
 Dummy test file for rename test
 </file>
 </client>
diff --git a/tests/data/test612 b/tests/data/test612
index ae18afb..1d6fade 100644
--- a/tests/data/test612
+++ b/tests/data/test612
@@ -24,12 +24,12 @@
 SFTP post-quote remove file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file612.txt -Q "-rm %PWD/log/file612.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.612  --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt -Q "-rm %PWD/log/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.%TESTNUMBER  --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/log/test612.txt
+perl %SRCDIR/libtest/test610.pl gone %PWD/log/test%TESTNUMBER.txt
 </postcheck>
-<file name="log/file612.txt">
+<file name="log/file%TESTNUMBER.txt">
 Dummy test file for remove test
 </file>
 </client>
diff --git a/tests/data/test613 b/tests/data/test613
index 0383987..d02e3bb 100644
--- a/tests/data/test613
+++ b/tests/data/test613
@@ -23,16 +23,16 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test613.dir
+perl %SRCDIR/libtest/test%TESTNUMBER.pl prepare %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP directory retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test613.dir/ --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.dir/ --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test613.dir %PWD/log/curl613.out
+perl %SRCDIR/libtest/test%TESTNUMBER.pl postprocess %PWD/log/test%TESTNUMBER.dir %PWD/log/curl%TESTNUMBER.out
 </postcheck>
 </client>
 
diff --git a/tests/data/test614 b/tests/data/test614
index c6fe491..c0af263 100644
--- a/tests/data/test614
+++ b/tests/data/test614
@@ -24,16 +24,16 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test614.dir
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP pre-quote chmod
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "chmod 444 %PWD/log/test614.dir/plainfile.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test614.dir/ --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "chmod 444 %PWD/log/test%TESTNUMBER.dir/plainfile.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.dir/ --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test614.dir %PWD/log/curl614.out
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test%TESTNUMBER.dir %PWD/log/curl%TESTNUMBER.out
 </postcheck>
 </client>
 
diff --git a/tests/data/test615 b/tests/data/test615
index 5f4859c..09a825b 100644
--- a/tests/data/test615
+++ b/tests/data/test615
@@ -14,18 +14,18 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test615.dir
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP put remote failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file615.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test615.dir/rofile.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.dir/rofile.txt --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test615.dir
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test%TESTNUMBER.dir
 </postcheck>
-<file name="log/file615.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test616 b/tests/data/test616
index 14c3d33..ec03c31 100644
--- a/tests/data/test616
+++ b/tests/data/test616
@@ -23,9 +23,9 @@
 SFTP retrieval of empty file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file616.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file616.txt">
+<file name="log/file%TESTNUMBER.txt">
 </file>
 </client>
 
diff --git a/tests/data/test617 b/tests/data/test617
index 67f0c9a..3c067e3 100644
--- a/tests/data/test617
+++ b/tests/data/test617
@@ -23,9 +23,9 @@
 SCP retrieval of empty file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file617.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file617.txt">
+<file name="log/file%TESTNUMBER.txt">
 </file>
 </client>
 
diff --git a/tests/data/test618 b/tests/data/test618
index feb095e..f5e2c7b 100644
--- a/tests/data/test618
+++ b/tests/data/test618
@@ -15,9 +15,9 @@
 SFTP retrieval of two files
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file618.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file618.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file618.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test619 b/tests/data/test619
index 6c1273c..0f86d8a 100644
--- a/tests/data/test619
+++ b/tests/data/test619
@@ -15,9 +15,9 @@
 SCP retrieval of two files
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file619.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file619.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file619.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test62 b/tests/data/test62
index 03afba6..92396d9 100644
--- a/tests/data/test62
+++ b/tests/data/test62
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

 

 boo
@@ -29,11 +29,11 @@
 HTTP, send cookies when using custom Host:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/62 http://%HOSTIP:%HTTPPORT/we/want/62?hoge=fuga -b log/jar62.txt -H "Host: www.host.foo.com"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?hoge=fuga -b log/jar%TESTNUMBER.txt -H "Host: www.host.foo.com"
 </command>
-<file name="log/jar62.txt">
+<file name="log/jar%TESTNUMBER.txt">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 #HttpOnly_.foo.com	TRUE	/we/want/	FALSE	2147483647	test	yes
@@ -47,13 +47,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/62 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: www.host.foo.com

 User-Agent: curl/%VERSION

 Accept: */*

 Cookie: test2=yes; test=yes

 

-GET /we/want/62?hoge=fuga HTTP/1.1

+GET /we/want/%TESTNUMBER?hoge=fuga HTTP/1.1

 Host: www.host.foo.com

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test620 b/tests/data/test620
index 4638255..fea44ac 100644
--- a/tests/data/test620
+++ b/tests/data/test620
@@ -16,9 +16,9 @@
 SFTP retrieval of missing file followed by good file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/not-a-valid-file-moooo sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file620.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/not-a-valid-file-moooo sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file620.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test621 b/tests/data/test621
index f0ac9b7..368baf6 100644
--- a/tests/data/test621
+++ b/tests/data/test621
@@ -16,9 +16,9 @@
 SCP retrieval of missing file followed by good file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/not-a-valid-file-moooo scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file621.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/not-a-valid-file-moooo scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file621.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test622 b/tests/data/test622
index 7b5fd5b..c4f8508 100644
--- a/tests/data/test622
+++ b/tests/data/test622
@@ -22,9 +22,9 @@
 SFTP put failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file622.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/nonexistent-directory/nonexistent-file --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/nonexistent-directory/nonexistent-file --insecure
 </command>
-<file name="log/file622.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test623 b/tests/data/test623
index e2914c9..d1afb40 100644
--- a/tests/data/test623
+++ b/tests/data/test623
@@ -22,9 +22,9 @@
 SCP upload failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file623.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/nonexistent-directory/nonexistent-file --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/nonexistent-directory/nonexistent-file --insecure
 </command>
-<file name="log/file623.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test624 b/tests/data/test624
index 8aaf527..8daa935 100644
--- a/tests/data/test624
+++ b/tests/data/test624
@@ -22,12 +22,12 @@
 SFTP put with --ftp-create-dirs
  </name>
  <command>
---ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file624.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test624.dir/upload.624 --insecure
+--ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.dir/upload.%TESTNUMBER --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl move %PWD/log/test624.dir/upload.624 %PWD/log/upload.624 rmdir %PWD/log/test624.dir
+perl %SRCDIR/libtest/test610.pl move %PWD/log/test%TESTNUMBER.dir/upload.%TESTNUMBER %PWD/log/upload.%TESTNUMBER rmdir %PWD/log/test%TESTNUMBER.dir
 </postcheck>
-<file name="log/file624.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test625 b/tests/data/test625
index 1fe9b55..e6f0d77 100644
--- a/tests/data/test625
+++ b/tests/data/test625
@@ -22,12 +22,12 @@
 SFTP put with --ftp-create-dirs twice
  </name>
  <command>
---ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file625.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test625.a/upload.625 -T log/file625.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test625.b/upload.625 --insecure
+--ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.a/upload.%TESTNUMBER -T log/file%TESTNUMBER.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test%TESTNUMBER.b/upload.%TESTNUMBER --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl move %PWD/log/test625.a/upload.625 %PWD/log/upload.625 rmdir %PWD/log/test625.a rm %PWD/log/test625.b/upload.625 rmdir %PWD/log/test625.b
+perl %SRCDIR/libtest/test610.pl move %PWD/log/test%TESTNUMBER.a/upload.%TESTNUMBER %PWD/log/upload.%TESTNUMBER rmdir %PWD/log/test%TESTNUMBER.a rm %PWD/log/test%TESTNUMBER.b/upload.%TESTNUMBER rmdir %PWD/log/test%TESTNUMBER.b
 </postcheck>
-<file name="log/file625.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh upload test
 </file>
diff --git a/tests/data/test626 b/tests/data/test626
index edf2aa5..0580f53 100644
--- a/tests/data/test626
+++ b/tests/data/test626
@@ -22,9 +22,9 @@
 SFTP invalid quote command
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "invalid-command foo bar" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file626.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "invalid-command foo bar" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file626.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test file for rename test
 </file>
 </client>
diff --git a/tests/data/test627 b/tests/data/test627
index 01c5221..60b830e 100644
--- a/tests/data/test627
+++ b/tests/data/test627
@@ -24,12 +24,12 @@
 SFTP quote remove file with NOBODY
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -I -Q "rm %PWD/log/file627.txt" sftp://%HOSTIP:%SSHPORT --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -I -Q "rm %PWD/log/file%TESTNUMBER.txt" sftp://%HOSTIP:%SSHPORT --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl gone %PWD/log/test627.txt
+perl %SRCDIR/libtest/test610.pl gone %PWD/log/test%TESTNUMBER.txt
 </postcheck>
-<file name="log/file627.txt">
+<file name="log/file%TESTNUMBER.txt">
 Dummy test file for remove test
 </file>
 </client>
diff --git a/tests/data/test63 b/tests/data/test63
index b330c6a..bf8ebfc 100644
--- a/tests/data/test63
+++ b/tests/data/test63
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

 Content-Length: 26
 

@@ -31,7 +31,7 @@
 http_proxy=http://fake:user@%HOSTIP:%HTTPPORT/
 </setenv>
  <command>
-http://we.want.that.site.com/63
+http://we.want.that.site.com/%TESTNUMBER
 </command>
 <features>
 proxy
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://we.want.that.site.com/63 HTTP/1.1

+GET http://we.want.that.site.com/%TESTNUMBER HTTP/1.1

 Host: we.want.that.site.com

 Proxy-Authorization: Basic ZmFrZTp1c2Vy

 User-Agent: curl/%VERSION

diff --git a/tests/data/test633 b/tests/data/test633
index 913d981..f9ad869 100644
--- a/tests/data/test633
+++ b/tests/data/test633
@@ -24,9 +24,9 @@
 SFTP retrieval with byte range
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file633.txt -r 5-9 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt -r 5-9 --insecure
 </command>
-<file name="log/file633.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test634 b/tests/data/test634
index fc250f9..9cf9320 100644
--- a/tests/data/test634
+++ b/tests/data/test634
@@ -25,9 +25,9 @@
 SFTP retrieval with byte range past end of file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file634.txt -r 5-99 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt -r 5-99 --insecure
 </command>
-<file name="log/file634.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test635 b/tests/data/test635
index 16ef66c..5974ee8 100644
--- a/tests/data/test635
+++ b/tests/data/test635
@@ -24,9 +24,9 @@
 SFTP retrieval with byte range relative to end of file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file635.txt -r -9 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt -r -9 --insecure
 </command>
-<file name="log/file635.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test636 b/tests/data/test636
index 0ea3509..6bce35b 100644
--- a/tests/data/test636
+++ b/tests/data/test636
@@ -25,9 +25,9 @@
 SFTP retrieval with X- byte range
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file636.txt -r 5- --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt -r 5- --insecure
 </command>
-<file name="log/file636.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test637 b/tests/data/test637
index 71b8126..5425067 100644
--- a/tests/data/test637
+++ b/tests/data/test637
@@ -23,9 +23,9 @@
 SFTP retrieval with invalid X- range
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file637.txt -r 99- --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt -r 99- --insecure
 </command>
-<file name="log/file637.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test638 b/tests/data/test638
index fdc140c..85d5909 100644
--- a/tests/data/test638
+++ b/tests/data/test638
@@ -23,18 +23,18 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test638.dir
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP post-quote rename * asterisk accept-fail
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test638.dir %PWD/log/test638.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file638.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test%TESTNUMBER.dir %PWD/log/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test638.new
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test%TESTNUMBER.new
 </postcheck>
-<file name="log/file638.txt">
+<file name="log/file%TESTNUMBER.txt">
 Dummy test file for rename test
 </file>
 </client>
diff --git a/tests/data/test639 b/tests/data/test639
index d80c8c1..e63cdf6 100644
--- a/tests/data/test639
+++ b/tests/data/test639
@@ -23,18 +23,18 @@
 sftp
 </server>
 <precheck>
-perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test639.dir
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test%TESTNUMBER.dir
 </precheck>
  <name>
 SFTP post-quote rename * asterisk accept-fail
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test639-not-exists-dir %PWD/log/test639.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file639.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test%TESTNUMBER-not-exists-dir %PWD/log/test%TESTNUMBER.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
 <postcheck>
-perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test639.dir
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test%TESTNUMBER.dir
 </postcheck>
-<file name="log/file639.txt">
+<file name="log/file%TESTNUMBER.txt">
 Dummy test file for rename test
 </file>
 </client>
diff --git a/tests/data/test64 b/tests/data/test64
index 1e7a96e..8067f1a 100644
--- a/tests/data/test64
+++ b/tests/data/test64
@@ -59,21 +59,21 @@
 HTTP with Digest authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/64 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /64 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /64 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="c55f7f30d83d774a3d2dcacf725abaca"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test640 b/tests/data/test640
index 9d1ade4..2046dab 100644
--- a/tests/data/test640
+++ b/tests/data/test640
@@ -23,9 +23,9 @@
 SFTP --head retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file640.txt --insecure --head
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure --head
 </command>
-<file name="log/file640.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test641 b/tests/data/test641
index 9f168aa..df1788a 100644
--- a/tests/data/test641
+++ b/tests/data/test641
@@ -23,9 +23,9 @@
 SCP --head retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file641.txt --insecure --head
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure --head
 </command>
-<file name="log/file641.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test642 b/tests/data/test642
index 6ae52bb..4fa5282 100644
--- a/tests/data/test642
+++ b/tests/data/test642
@@ -24,9 +24,9 @@
 SFTP retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: --compressed-ssh sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file642.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: --compressed-ssh sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt --insecure
 </command>
-<file name="log/file642.txt">
+<file name="log/file%TESTNUMBER.txt">
 Test data
 for ssh test
 </file>
diff --git a/tests/data/test643 b/tests/data/test643
index e8da2b1..65bb990 100644
--- a/tests/data/test643
+++ b/tests/data/test643
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,14 +21,14 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

 

 hello
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -44,14 +44,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib643
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP multi-part mimepost using read callback for the file part
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/643
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -66,7 +66,7 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /643 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 640

@@ -96,7 +96,7 @@
 

 blah blah

 --------------------------------

-POST /643 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 654

diff --git a/tests/data/test644 b/tests/data/test644
deleted file mode 100644
index 99337ae..0000000
--- a/tests/data/test644
+++ /dev/null
@@ -1,60 +0,0 @@
-<testcase>
-<info>
-<keywords>
-HTTP
-HTTP POST
-HTTP MIME POST
-flaky
-</keywords>
-</info>
-
-#
-# Server-side
-<reply>
-<data>
-</data>
-</reply>
-
-# Client-side
-<client>
-<server>
-http
-</server>
-# tool is what to use instead of 'curl'
-<tool>
-lib644
-</tool>
-
- <name>
-HTTP multi-part formpost with aborted read callback
- </name>
- <command>
-http://%HOSTIP:%HTTPPORT/644
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<strippart>
-s/^--------------------------[a-z0-9]*/------------------------------/
-s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
-</strippart>
-<protocol>
-POST /644 HTTP/1.1

-Host: %HOSTIP:%HTTPPORT

-Accept: */*

-Content-Length: 640

-Content-Type: multipart/form-data; boundary=----------------------------

-

-------------------------------

-Content-Disposition: form-data; name="sendfile"; filename="postit2.c"

-

-
-</protocol>
-# CURLE_ABORTED_BY_CALLBACK (42)
-<errorcode>
-42
-</errorcode>
-</verify>
-</testcase>
diff --git a/tests/data/test645 b/tests/data/test645
index eeb15f9..d5ce825 100644
--- a/tests/data/test645
+++ b/tests/data/test645
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,14 +21,14 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

 

 hello
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -44,14 +44,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib645
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP multi-part chunked mimepost using read callback for the file part
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/645
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -66,7 +66,7 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /645 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

@@ -108,7 +108,11 @@
 1

 
 

+%if hyper
+19A

+%else
 19a

+%endif
 

 ------------------------------

 Content-Disposition: form-data; name="filename"

@@ -127,7 +131,7 @@
 

 0

 

-POST /645 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

@@ -169,7 +173,11 @@
 1

 
 

+%if hyper
+19A

+%else
 19a

+%endif
 

 ------------------------------

 Content-Disposition: form-data; name="filename"

diff --git a/tests/data/test646 b/tests/data/test646
index a53c340..4c4297c 100644
--- a/tests/data/test646
+++ b/tests/data/test646
Binary files differ
diff --git a/tests/data/test647 b/tests/data/test647
index de2b467..a609ad9 100644
--- a/tests/data/test647
+++ b/tests/data/test647
@@ -22,9 +22,9 @@
 IMAP APPEND multipart using mime API
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/647 -F "=(;type=multipart/alternative" -F "= <body>This is the html version</body>;type=text/html" -F "=This is the plain text version" -F "=)" -F "=@log/test647.txt" -H "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)" -H "From: Fred Foobar <foobar@example.com>" -H "To: joe@example.com" -H "Message-Id: <B27397-0100000@example.com>" -H "Subject: afternoon meeting" -u user:secret
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -F "=(;type=multipart/alternative" -F "= <body>This is the html version</body>;type=text/html" -F "=This is the plain text version" -F "=)" -F "=@log/test%TESTNUMBER.txt" -H "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)" -H "From: Fred Foobar <foobar@example.com>" -H "To: joe@example.com" -H "Message-Id: <B27397-0100000@example.com>" -H "Subject: afternoon meeting" -u user:secret
 </command>
-<file name="log/test647.txt">
+<file name="log/test%TESTNUMBER.txt">
 This is an attached file.
 
 It may contain any type of data.
@@ -41,7 +41,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 APPEND 647 (\Seen) {892}

+A003 APPEND %TESTNUMBER (\Seen) {892}

 A004 LOGOUT

 </protocol>
 <upload>
@@ -67,7 +67,7 @@
 --------------------------------

 

 ------------------------------

-Content-Disposition: attachment; filename="test647.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 

 This is an attached file.
 
diff --git a/tests/data/test648 b/tests/data/test648
index a2b227b..15a75e7 100644
--- a/tests/data/test648
+++ b/tests/data/test648
@@ -27,9 +27,9 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/648 --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is the e-mail inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@log/test648.txt;encoder=base64" -H "From: different" -H "To: another"
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is the e-mail inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@log/test%TESTNUMBER.txt;encoder=base64" -H "From: different" -H "To: another"
 </command>
-<file name="log/test648.txt">
+<file name="log/test%TESTNUMBER.txt">
 This is an attached file.
 
 It may contain any type of data and will be encoded in base64 for transfer.
@@ -44,7 +44,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-EHLO 648

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

@@ -63,7 +63,7 @@
 This is the e-mail inline text with a very long line containing the special=

  character =3D and that should be split by encoder.

 ------------------------------

-Content-Disposition: attachment; filename="test648.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Transfer-Encoding: base64

 

 VGhpcyBpcyBhbiBhdHRhY2hlZCBmaWxlLgoKSXQgbWF5IGNvbnRhaW4gYW55IHR5cGUgb2YgZGF0

diff --git a/tests/data/test649 b/tests/data/test649
index 46c01cd..0f759f0 100644
--- a/tests/data/test649
+++ b/tests/data/test649
@@ -27,9 +27,9 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/649 --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is valid;encoder=7bit' -F "=@log/test649.txt;encoder=7bit" -H "From: different" -H "To: another"
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is valid;encoder=7bit' -F "=@log/test%TESTNUMBER.txt;encoder=7bit" -H "From: different" -H "To: another"
 </command>
-<file name="log/test649.txt">
+<file name="log/test%TESTNUMBER.txt">
 This is an attached file (in french: pièce jointe).
 
 It contains at least an 8-bit byte value.
@@ -44,7 +44,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-EHLO 649

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

@@ -60,7 +60,7 @@
 

 This is valid

 ------------------------------

-Content-Disposition: attachment; filename="test649.txt"

+Content-Disposition: attachment; filename="test%TESTNUMBER.txt"

 Content-Transfer-Encoding: 7bit

 

 This is an attached file (in french: pi
diff --git a/tests/data/test65 b/tests/data/test65
index 6065231..f1ce72b 100644
--- a/tests/data/test65
+++ b/tests/data/test65
@@ -59,21 +59,21 @@
 HTTP with Digest authorization with bad password
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/65 -u testuser:test2pass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:test2pass --digest
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /65 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /65 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/65", response="66d68d3251f1839576ba7c766cf9205b"

+Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/%TESTNUMBER", response="66d68d3251f1839576ba7c766cf9205b"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test650 b/tests/data/test650
index 03fe438..0e4c5d3 100644
--- a/tests/data/test650
+++ b/tests/data/test650
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -28,7 +28,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib650
+lib%TESTNUMBER
 </tool>
 
  <name>
@@ -38,9 +38,9 @@
  Some data from stdin
 </stdin>
  <command>
-http://%HOSTIP:%HTTPPORT/650 log/test650.filedata
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/test%TESTNUMBER.filedata
 </command>
-<file name="log/test650.filedata">
+<file name="log/test%TESTNUMBER.filedata">
 This is data from a file.
 </file>
 </client>
@@ -56,7 +56,7 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /650 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

@@ -80,25 +80,33 @@
 Content-Type: multipart/mixed; boundary=----------------------------

 

 ------------------------------

-Content-Disposition: attachment; filename="test650.filedata"

+Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"

 Content-Type: application/octet-stream

 

 This is data from a file.
 

 ------------------------------

-Content-Disposition: attachment; filename="test650.filedata"

+Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"

 Content-Type: text/whatever

 

 

+%if hyper
+A5

+%else
 a5

+%endif
 This is data from a file.
 

 ------------------------------

-Content-Disposition: attachment; filename="test650.filedata"

+Content-Disposition: attachment; filename="test%TESTNUMBER.filedata"

 Content-Type: text/whatever

 

 

+%if hyper
+AF

+%else
 af

+%endif
 This is data from a file.
 

 --------------------------------

@@ -107,7 +115,11 @@
 Content-Disposition: form-data; name="filecontents"

 

 

+%if hyper
+10F

+%else
 10f

+%endif
 This is data from a file.
 

 ------------------------------

diff --git a/tests/data/test651 b/tests/data/test651
index dd5736a..be2cbe4 100644
--- a/tests/data/test651
+++ b/tests/data/test651
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -28,7 +28,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib651
+lib%TESTNUMBER
 </tool>
 
  <name>
@@ -38,9 +38,9 @@
  Some data from stdin
 </stdin>
  <command>
-http://%HOSTIP:%HTTPPORT/651 log/test651.filedata
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER log/test%TESTNUMBER.filedata
 </command>
-<file name="log/test651.filedata">
+<file name="log/test%TESTNUMBER.filedata">
 This is data from a file.
 </file>
 </client>
@@ -56,7 +56,7 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /651 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 17139

diff --git a/tests/data/test652 b/tests/data/test652
index c91dcf2..f4b9972 100644
--- a/tests/data/test652
+++ b/tests/data/test652
@@ -18,14 +18,14 @@
 smtp
 </server>
 <tool>
-lib652
+lib%TESTNUMBER
 </tool>
 
  <name>
 SMTP with encoded huge mime data contents
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/652
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-EHLO 652

+EHLO %TESTNUMBER

 MAIL FROM:<somebody@example.com>

 RCPT TO:<someone@example.com>

 DATA

diff --git a/tests/data/test653 b/tests/data/test653
index d7be059..db62c98 100644
--- a/tests/data/test653
+++ b/tests/data/test653
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,14 +21,14 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

 

 hello
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -44,14 +44,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib653
+lib%TESTNUMBER
 </tool>
 
  <name>
 Reuse of handle after altering mime data
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/653
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -66,7 +66,7 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /653 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 150

@@ -77,7 +77,7 @@
 

 short value

 --------------------------------

-POST /653 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 167

diff --git a/tests/data/test654 b/tests/data/test654
index 9d4bf45..d8da0da 100644
--- a/tests/data/test654
+++ b/tests/data/test654
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,14 +21,14 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

 

 hello
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -44,16 +44,16 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib654
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP duplicate easy handle with mime data
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/654
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
-<file name="log/file654.txt">
+<file name="log/file%TESTNUMBER.txt">
 This is data from a file
 </file>
 </client>
@@ -69,28 +69,32 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /654 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 0

 

-POST /654 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

 Content-Type: multipart/form-data; boundary=----------------------------

 Expect: 100-continue

 

+%if hyper
+1AF

+%else
 1af

+%endif
 ------------------------------

 Content-Disposition: form-data; name="greeting"

 Content-Type: application/X-Greeting

 Content-Transfer-Encoding: base64

-X-Test-Number: 654

+X-Test-Number: %TESTNUMBER

 

 aGVsbG8=

 ------------------------------

-Content-Disposition: form-data; filename="file654.txt"

+Content-Disposition: form-data; filename="file%TESTNUMBER.txt"

 Content-Type: text/plain

 

 This is data from a file
diff --git a/tests/data/test655 b/tests/data/test655
index d98729c..3f9bc78 100644
--- a/tests/data/test655
+++ b/tests/data/test655
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -29,14 +29,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib655
+lib%TESTNUMBER
 </tool>
 
  <name>
 resolver start callback
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/655
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test658 b/tests/data/test658
index acf1846..df5be76 100644
--- a/tests/data/test658
+++ b/tests/data/test658
@@ -9,7 +9,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -27,19 +27,19 @@
 http
 </server>
 <tool>
-lib658
+lib%TESTNUMBER
 </tool>
 <name>
 Pass URL to libcurl with CURLOPT_CURLU
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/658
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /658 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test659 b/tests/data/test659
index f191a8e..ef7cf12 100644
--- a/tests/data/test659
+++ b/tests/data/test659
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -28,7 +28,7 @@
 http
 </server>
 <tool>
-lib659
+lib%TESTNUMBER
 </tool>
 <name>
 CURLOPT_CURLU without the path set - over proxy
@@ -43,7 +43,7 @@
 
 <verify>
 <protocol>
-GET http://www.example.com:80/ HTTP/1.1

+GET http://www.example.com/ HTTP/1.1

 Host: www.example.com

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test66 b/tests/data/test66
index 23bb9e9..0e66289 100644
--- a/tests/data/test66
+++ b/tests/data/test66
@@ -15,6 +15,9 @@
 
 # Client-side
 <client>
+<features>
+!hyper
+</features>
 <server>
 http
 </server>
@@ -22,7 +25,7 @@
 HTTP GET without headers in the response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/66 --http0.9
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http0.9
 </command>
 </client>
 
@@ -30,7 +33,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /66 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test660 b/tests/data/test660
index d480bc3..b53d47b 100644
--- a/tests/data/test660
+++ b/tests/data/test660
@@ -19,7 +19,7 @@
  </name>
 
 <command>
-imap://%HOSTIP:%IMAPPORT/660
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER
 </command>
 
 </client>
diff --git a/tests/data/test661 b/tests/data/test661
index 067612b..ccfdf41 100644
--- a/tests/data/test661
+++ b/tests/data/test661
@@ -19,7 +19,7 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib661
+lib%TESTNUMBER
 </tool>
 
  <name>
@@ -40,22 +40,22 @@
 CWD /folderA

 EPSV

 TYPE I

-RETR 661

+RETR %TESTNUMBER

 CWD /folderB

 EPSV

-RETR 661

+RETR %TESTNUMBER

 QUIT

 USER anonymous

 PASS ftp@example.com

 PWD

 EPSV

 TYPE I

-RETR /folderA/661

+RETR /folderA/%TESTNUMBER

 CWD /folderB

 EPSV

-RETR 661

+RETR %TESTNUMBER

 EPSV

-RETR /folderA/661

+RETR /folderA/%TESTNUMBER

 QUIT

 USER anonymous

 PASS ftp@example.com

diff --git a/tests/data/test662 b/tests/data/test662
index 3140c61..5edaf05 100644
--- a/tests/data/test662
+++ b/tests/data/test662
@@ -3,6 +3,7 @@
 <keywords>
 HTTP
 HTTP GET
+HTTP proxy
 followlocation
 </keywords>
 </info>
@@ -11,28 +12,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK

-Location: http://example.net/tes t case=/6620002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: http://example.net/tes t case=/%TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 

 </data>
 <data2>
 HTTP/1.1 200 OK

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 5

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK

-Location: http://example.net/tes t case=/6620002

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: http://example.net/tes t case=/%TESTNUMBER0002

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 

 HTTP/1.1 200 OK

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 5

 

 body
@@ -49,7 +50,7 @@
 HTTP redirect with whitespace in absolute Location: URL
  </name>
  <command>
-http://example.com/please/gimme/662 -L -x http://%HOSTIP:%HTTPPORT
+http://example.com/please/gimme/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -60,13 +61,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://example.com/please/gimme/662 HTTP/1.1

+GET http://example.com/please/gimme/%TESTNUMBER HTTP/1.1

 Host: example.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://example.net/tes%20t%20case=/6620002 HTTP/1.1

+GET http://example.net/tes%20t%20case=/%TESTNUMBER0002 HTTP/1.1

 Host: example.net

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test663 b/tests/data/test663
index 487be25..7269258 100644
--- a/tests/data/test663
+++ b/tests/data/test663
@@ -7,6 +7,7 @@
 <keywords>
 HTTP
 HTTP GET
+HTTP proxy
 followlocation
 </keywords>
 </info>
@@ -15,28 +16,28 @@
 <reply>
 <data>
 HTTP/1.1 302 OK

-Location: http://example.net/there/it/is/../../tes t case=/6630002? yes no

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: http://example.net/there/it/is/../../tes t case=/%TESTNUMBER0002? yes no

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 

 </data>
 <data2>
 HTTP/1.1 200 OK

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 5

 

 body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK

-Location: http://example.net/there/it/is/../../tes t case=/6630002? yes no

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Location: http://example.net/there/it/is/../../tes t case=/%TESTNUMBER0002? yes no

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 0

 

 HTTP/1.1 200 OK

 Location: this should be ignored

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Length: 5

 

 body
@@ -53,7 +54,7 @@
 HTTP redirect with dotdots and whitespaces in absolute Location: URL
  </name>
  <command>
-http://example.com/please/../gimme/663?foobar#hello -L -x http://%HOSTIP:%HTTPPORT
+http://example.com/please/../gimme/%TESTNUMBER?foobar#hello -L -x http://%HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -64,13 +65,13 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://example.com/gimme/663?foobar HTTP/1.1

+GET http://example.com/gimme/%TESTNUMBER?foobar HTTP/1.1

 Host: example.com

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://example.net/there/tes%20t%20case=/6630002?+yes+no HTTP/1.1

+GET http://example.net/there/tes%20t%20case=/%TESTNUMBER0002?+yes+no HTTP/1.1

 Host: example.net

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test664 b/tests/data/test664
index 6bea4ed..69a75df 100644
--- a/tests/data/test664
+++ b/tests/data/test664
@@ -24,9 +24,9 @@
 SFTP correct host key
  </name>
  <command>
---hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file664.txt
+--hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt
 </command>
-<file name="log/file664.txt">
+<file name="log/file%TESTNUMBER.txt">
 test
 </file>
 </client>
diff --git a/tests/data/test665 b/tests/data/test665
index 689fa31..aa20bbf 100644
--- a/tests/data/test665
+++ b/tests/data/test665
@@ -24,9 +24,9 @@
 SCP correct host key
  </name>
  <command>
---hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file665.txt
+--hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file%TESTNUMBER.txt
 </command>
-<file name="log/file665.txt">
+<file name="log/file%TESTNUMBER.txt">
 test
 </file>
 </client>
diff --git a/tests/data/test666 b/tests/data/test666
index bb60caf..d8b3356 100644
--- a/tests/data/test666
+++ b/tests/data/test666
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 3

 

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake

 Content-Length: 3

 

@@ -36,14 +36,14 @@
 http
 </server>
 <tool>
-lib666
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP mime post with binary-encoded huge data contents
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/666
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /666 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 17225

diff --git a/tests/data/test667 b/tests/data/test667
index 2a18375..e54e15b 100644
--- a/tests/data/test667
+++ b/tests/data/test667
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib667
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP chunked mimepost using single-byte read callback with encoder
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/667
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -59,14 +59,18 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /667 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

 Content-Type: multipart/form-data; boundary=----------------------------

 Expect: 100-continue

 

+%if hyper
+7F

+%else
 7f

+%endif
 ------------------------------

 Content-Disposition: form-data; name="field"

 Content-Transfer-Encoding: base64

diff --git a/tests/data/test668 b/tests/data/test668
index af0a720..0606e37 100644
--- a/tests/data/test668
+++ b/tests/data/test668
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -37,16 +37,16 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib668
+lib%TESTNUMBER
 </tool>
 
  <name>
 HTTP mimepost early end of data detection
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/668
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
-<file name="log/file668.txt">
+<file name="log/file%TESTNUMBER.txt">
 This is data from a file
 </file>
 </client>
@@ -62,14 +62,18 @@
 # boundary string and since 5 of them are in the body contents, we see
 # (5*12) == 60 bytes less
 <protocol>
-POST /668 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Transfer-Encoding: chunked

 Content-Type: multipart/form-data; boundary=----------------------------

 Expect: 100-continue

 

+%if hyper
+C1

+%else
 c1

+%endif
 ------------------------------

 Content-Disposition: form-data; name="field1"

 

@@ -83,7 +87,7 @@
 91

 

 ------------------------------

-Content-Disposition: form-data; name="field3"; filename="file668.txt"

+Content-Disposition: form-data; name="field3"; filename="file%TESTNUMBER.txt"

 Content-Type: text/plain

 

 

diff --git a/tests/data/test669 b/tests/data/test669
index 47b974c..20c02a6 100644
--- a/tests/data/test669
+++ b/tests/data/test669
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -28,7 +28,7 @@
 HTTP custom Content-Type with parameter
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/669 -H 'Content-type: multipart/form-data; charset=utf-8' -F name=daniel -F tool=curl
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -H 'Content-type: multipart/form-data; charset=utf-8' -F name=daniel -F tool=curl
 </command>
 </client>
 
@@ -39,7 +39,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /we/want/669 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test67 b/tests/data/test67
index 8138c74..0e50450 100644
--- a/tests/data/test67
+++ b/tests/data/test67
@@ -73,7 +73,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/67 -u testuser:testpass --ntlm
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm
 </command>
 <precheck>
 chkhostname curlhost
@@ -83,15 +83,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /67 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /67 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test670 b/tests/data/test670
index 19a51a4..4d1056c 100644
--- a/tests/data/test670
+++ b/tests/data/test670
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib670
+lib%TESTNUMBER
 </tool>
 
  <name>
 Request pause from mime read callback: multi
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/670
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /670 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 142

diff --git a/tests/data/test671 b/tests/data/test671
index eada50a..b6550aa 100644
--- a/tests/data/test671
+++ b/tests/data/test671
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib671
+lib%TESTNUMBER
 </tool>
 
  <name>
 Request pause from mime read callback: easy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/671
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /671 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 142

diff --git a/tests/data/test672 b/tests/data/test672
index 9c5f245..43d183e 100644
--- a/tests/data/test672
+++ b/tests/data/test672
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib672
+lib%TESTNUMBER
 </tool>
 
  <name>
 Request pause from form read callback: multi
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/672
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /672 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 142

diff --git a/tests/data/test673 b/tests/data/test673
index efed272..e263810 100644
--- a/tests/data/test673
+++ b/tests/data/test673
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -21,7 +21,7 @@
 </data>
 <datacheck>
 HTTP/1.1 200 OK

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Server: test-server/fake swsclose

 Connection: close

 Content-Type: text/html

@@ -37,14 +37,14 @@
 </server>
 # tool is what to use instead of 'curl'
 <tool>
-lib673
+lib%TESTNUMBER
 </tool>
 
  <name>
 Request pause from form read callback: easy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/673
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 <protocol>
-POST /673 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 142

diff --git a/tests/data/test674 b/tests/data/test674
index 38ed39e..1afe1f6 100644
--- a/tests/data/test674
+++ b/tests/data/test674
@@ -10,7 +10,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -28,23 +28,23 @@
 http
 </server>
 <tool>
-lib674
+lib%TESTNUMBER
 </tool>
 <name>
 Set CURLOPT_CURLU and dupe the handle
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/674
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
 <verify>
 <protocol>
-GET /674 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

-GET /674 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 

diff --git a/tests/data/test675 b/tests/data/test675
new file mode 100644
index 0000000..b0933be
--- /dev/null
+++ b/tests/data/test675
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK swsclose

+Date: Thu, 09 Nov 2010 14:49:00 GMT

+Content-Type: text/html

+Content-Length: 26
+

+the content would go here
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP connection re-use and different credentials
+ </name>
+
+<command>
+http://user1:foo1@%HOSTIP:%HTTPPORT/user1/%TESTNUMBER http://user2:foo2@%HOSTIP:%HTTPPORT/user2/%TESTNUMBER
+</command>
+<features>
+proxy
+</features>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /user1/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: Basic dXNlcjE6Zm9vMQ==

+User-Agent: curl/%VERSION

+Accept: */*

+

+GET /user2/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+Authorization: Basic dXNlcjI6Zm9vMg==

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test676 b/tests/data/test676
new file mode 100644
index 0000000..a3916e5
--- /dev/null
+++ b/tests/data/test676
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP set cookie
+cookies
+CURLOPT_REFERER
+curl_easy_reset
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Content-Length: 6

+Connection: close

+Content-Type: text/html

+

+-foo-
+</data>
+
+# since the request runs twice
+<datacheck>
+HTTP/1.1 200 OK

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Content-Length: 6

+Connection: close

+Content-Type: text/html

+

+-foo-
+HTTP/1.1 200 OK

+Date: Tue, 09 Nov 2010 14:49:00 GMT

+Content-Length: 6

+Connection: close

+Content-Type: text/html

+

+-foo-
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<file name="log/cookies676">
+%HOSTIP	TRUE	/we/want/	FALSE	2118138987	proven	yes
+</file>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib%TESTNUMBER
+</tool>
+
+ <name>
+verify setting CURLOPT_COOKIEFILE to NULL again
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: the-moo agent next generation

+Accept: */*

+Cookie: proven=yes

+

+GET /we/want/%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: the-moo agent next generation

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test677 b/tests/data/test677
new file mode 100644
index 0000000..e3d9041
--- /dev/null
+++ b/tests/data/test677
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+CONNECT_ONLY
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP with CONNECT_ONLY, custom command then exit
+ </name>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<command>
+imap://%HOSTIP:%IMAPPORT/677
+</command>
+
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY

+A1 IDLE

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test678 b/tests/data/test678
new file mode 100644
index 0000000..69ae232
--- /dev/null
+++ b/tests/data/test678
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+PEM certificate
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 7
+
+MooMoo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+SSL
+</features>
+<server>
+https Server-localhost-sv.pem
+</server>
+ <name>
+HTTPS GET using CURLOPT_CAINFO_BLOB
+ </name>
+<tool>
+lib%TESTNUMBER
+</tool>
+# provide URL and ca-cert
+<command>
+https://localhost:%HTTPSPORT/%TESTNUMBER %SRCDIR/certs/EdelCurlRoot-ca.crt
+</command>
+# Ensure that we're running on localhost because we're checking the host name
+<precheck>
+./libtest/lib%TESTNUMBER check
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: localhost:%HTTPSPORT

+User-Agent: CURLOPT_CAINFO_BLOB

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test68 b/tests/data/test68
index 57ab258..cd3378b 100644
--- a/tests/data/test68
+++ b/tests/data/test68
@@ -72,7 +72,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/68 -u testuser:testpass --ntlm
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm
 </command>
 <precheck>
 chkhostname curlhost
@@ -82,15 +82,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /68 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /68 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test69 b/tests/data/test69
index cc3178a..edaa3d8 100644
--- a/tests/data/test69
+++ b/tests/data/test69
@@ -89,7 +89,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
 </command>
 <precheck>
 chkhostname curlhost
@@ -99,20 +99,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /69 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /69 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /69 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test7 b/tests/data/test7
index 317b235..06df71d 100644
--- a/tests/data/test7
+++ b/tests/data/test7
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
@@ -32,22 +32,22 @@
 HTTP with cookie parser and header recording
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/7 -b none -D log/heads7.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b none -D log/heads%TESTNUMBER.txt
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/7 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/heads7.txt">
+<file name="log/heads%TESTNUMBER.txt">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes swsclose
diff --git a/tests/data/test70 b/tests/data/test70
index 7057153..622b9a9 100644
--- a/tests/data/test70
+++ b/tests/data/test70
@@ -62,21 +62,21 @@
 HTTP with Digest *OR* NTLM authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/70 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /70 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /70 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/70", response="2c9a6f00af0d86497b177b90e90c688a"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/%TESTNUMBER", response="2c9a6f00af0d86497b177b90e90c688a"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test700 b/tests/data/test700
index f43590d..23e0037 100644
--- a/tests/data/test700
+++ b/tests/data/test700
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -37,7 +37,7 @@
 HTTP GET via SOCKS4 proxy
  </name>
  <command>
---socks4 %HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/700
+--socks4 %HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /700 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test701 b/tests/data/test701
index 3b687ff..db22d66 100644
--- a/tests/data/test701
+++ b/tests/data/test701
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -37,7 +37,7 @@
 HTTP GET via SOCKS5 proxy
  </name>
  <command>
---socks5 %HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/701
+--socks5 %HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /701 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test704 b/tests/data/test704
index 9e821c6..b9abc45 100644
--- a/tests/data/test704
+++ b/tests/data/test704
@@ -23,7 +23,7 @@
 Attempt connect to non-listening SOCKS4 proxy
  </name>
  <command>
---socks4 %HOSTIP:%NOLISTENPORT http://%HOSTIP:%HTTPPORT/704
+--socks4 %HOSTIP:%NOLISTENPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 <features>
 proxy
diff --git a/tests/data/test705 b/tests/data/test705
index e7ba012..5d3692d 100644
--- a/tests/data/test705
+++ b/tests/data/test705
@@ -23,7 +23,7 @@
 Attempt connect to non-listening SOCKS5 proxy
  </name>
  <command>
---socks5 %HOSTIP:%NOLISTENPORT http://%HOSTIP:%HTTPPORT/705
+--socks5 %HOSTIP:%NOLISTENPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 <features>
 proxy
diff --git a/tests/data/test708 b/tests/data/test708
index 85aa95e..ff5b914 100644
--- a/tests/data/test708
+++ b/tests/data/test708
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -40,7 +40,7 @@
 HTTP GET via SOCKS4 proxy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/708
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /708 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test709 b/tests/data/test709
index a263152..9d43c75 100644
--- a/tests/data/test709
+++ b/tests/data/test709
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -40,7 +40,7 @@
 HTTP GET via SOCKS5 set in http_proxy environment variable
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/709
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /709 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test71 b/tests/data/test71
index 0bc76fc..7f8b049 100644
--- a/tests/data/test71
+++ b/tests/data/test71
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Length: 11
 
@@ -30,14 +30,14 @@
 <stdin>
 -F name=daniel
 -F tool=curl
--F file=@log/test71.txt
+-F file=@log/test%TESTNUMBER.txt
 user-agent = ""
 </stdin>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/71 -K -
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -K -
 </command>
 # We create this file before the command is invoked!
-<file name="log/test71.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo-
 This is a moo-
 bar
@@ -50,7 +50,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/71 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Accept: */*

 Content-Length: 408

@@ -65,7 +65,7 @@
 

 curl

 ------------------------------9ef8d6205763

-Content-Disposition: form-data; name="file"; filename="test71.txt"

+Content-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt"

 Content-Type: text/plain

 

 foo-
diff --git a/tests/data/test710 b/tests/data/test710
index 92df2f3..5302022 100644
--- a/tests/data/test710
+++ b/tests/data/test710
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -37,7 +37,7 @@
 HTTP GET via SOCKS5 set with --proxy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/710 --proxy socks5://%HOSTIP:%SOCKSPORT 
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy socks5://%HOSTIP:%SOCKSPORT 
 </command>
 </client>
 
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /710 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test711 b/tests/data/test711
index 3efbb79..a70631a 100644
--- a/tests/data/test711
+++ b/tests/data/test711
@@ -33,7 +33,7 @@
 FTP fetch with all_proxy set to socks5
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/711
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -46,8 +46,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 711

-RETR 711

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test712 b/tests/data/test712
index 252c9ef..0c6a643 100644
--- a/tests/data/test712
+++ b/tests/data/test712
@@ -27,7 +27,7 @@
 FTP fetch with --proxy set to socks5://
  </name>
  <command>
-ftp://%HOSTIP:%FTPPORT/712 --proxy socks5://%HOSTIP:%SOCKSPORT 
+ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --proxy socks5://%HOSTIP:%SOCKSPORT 
 </command>
 </client>
 
@@ -40,8 +40,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 712

-RETR 712

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test713 b/tests/data/test713
index bb79994..1803f8e 100644
--- a/tests/data/test713
+++ b/tests/data/test713
@@ -28,7 +28,7 @@
 FTP fetch with --proxy set to socks5:// and with --connect-to
  </name>
  <command>
-ftp://ftp.example.com/713 --connect-to ::%HOSTIP:%FTPPORT --proxy socks5://%HOSTIP:%SOCKSPORT 
+ftp://ftp.example.com/%TESTNUMBER --connect-to ::%HOSTIP:%FTPPORT --proxy socks5://%HOSTIP:%SOCKSPORT 
 </command>
 </client>
 
@@ -41,8 +41,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 713

-RETR 713

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test714 b/tests/data/test714
index 776d8b2..b405bcd 100644
--- a/tests/data/test714
+++ b/tests/data/test714
@@ -47,7 +47,7 @@
 FTP fetch with --proxy set to http:// and with --connect-to
  </name>
  <command>
-ftp://ftp.example.com.714/714 --connect-to ::connect.example.com.714:%FTPPORT --proxytunnel --proxy http://%HOSTIP:%PROXYPORT 
+ftp://ftp.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%FTPPORT --proxytunnel --proxy http://%HOSTIP:%PROXYPORT 
 </command>
 </client>
 
@@ -60,8 +60,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 714

-RETR 714

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test715 b/tests/data/test715
index 85372ca..1bbceb7 100644
--- a/tests/data/test715
+++ b/tests/data/test715
@@ -49,7 +49,7 @@
 FTP fetch with --preproxy, --proxy and --connect-to
  </name>
  <command>
-ftp://ftp.example.com.715/715 --connect-to ::connect.example.com.715:%FTPPORT --proxytunnel --proxy %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT 
+ftp://ftp.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%FTPPORT --proxytunnel --proxy %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT 
 </command>
 </client>
 
@@ -62,8 +62,8 @@
 PWD

 EPSV

 TYPE I

-SIZE 715

-RETR 715

+SIZE %TESTNUMBER

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test716 b/tests/data/test716
index 531e272..4de1cd9 100644
--- a/tests/data/test716
+++ b/tests/data/test716
@@ -31,7 +31,7 @@
 
 # it should never connect to the target server
  <command>
-http://hohoho.example.com:99/716 -x socks5://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:b@%HOSTIP:%SOCKSPORT
+http://hohoho.example.com:99/%TESTNUMBER -x socks5://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:b@%HOSTIP:%SOCKSPORT
 </command>
 </client>
 
diff --git a/tests/data/test717 b/tests/data/test717
index 5de8fcb..bbbc9ed 100644
--- a/tests/data/test717
+++ b/tests/data/test717
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -45,7 +45,7 @@
 
 # target a port that won't work without the SOCKS magic
  <command>
-http://%HOSTIP:1/717 -x socks5://uz3r:p4ssworm@%HOSTIP:%SOCKSPORT
+http://%HOSTIP:1/%TESTNUMBER -x socks5://uz3r:p4ssworm@%HOSTIP:%SOCKSPORT
 </command>
 <features>
 proxy
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /717 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:1

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test718 b/tests/data/test718
new file mode 100644
index 0000000..6ab6c5a
--- /dev/null
+++ b/tests/data/test718
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+HTTP proxy Digest auth
+</keywords>
+</info>
+
+# Server-side
+<reply>
+
+# this is returned first since we get no proxy-auth
+<connect>
+HTTP/1.1 407 Authorization Required to proxy me swsclose

+Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"

+</connect>
+
+<datacheck>
+HTTP/1.1 407 Authorization Required to proxy me swsclose

+Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"

+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+proxy
+</features>
+ <name>
+HTTP proxy CONNECT (no auth) with proxy returning 407 and closing
+ </name>
+ <command>
+http://test.remote.haxx.se.%TESTNUMBER:8990/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CONNECT test.remote.haxx.se.%TESTNUMBER:8990 HTTP/1.1

+Host: test.remote.haxx.se.%TESTNUMBER:8990

+User-Agent: curl/%VERSION

+Proxy-Connection: Keep-Alive

+

+</protocol>
+<errorcode>
+56
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test72 b/tests/data/test72
index 1160121..00c4c64 100644
--- a/tests/data/test72
+++ b/tests/data/test72
@@ -61,21 +61,21 @@
 HTTP with Digest *OR* Basic authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/72 -u testuser:testpass --anyauth
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /72 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /72 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/72", response="9fcd1330377365a09bbcb33b2cbb25bd"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/%TESTNUMBER", response="9fcd1330377365a09bbcb33b2cbb25bd"

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test73 b/tests/data/test73
index 8933779..e211f21 100644
--- a/tests/data/test73
+++ b/tests/data/test73
@@ -11,7 +11,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose

-Date: Thu, 09 Nov 2010 14:49:00 GMT

+Date: Tue, 09 Nov 2010 14:49:00 GMT

 Content-Type: text/html

 Set-Cookie: IPCZQX01af0fca5c=000010008168c200d25dfc4b; path=/; domain=.NOT_DISCLOSED.se

 Content-Length: 4

@@ -29,22 +29,22 @@
 HTTP, receive cookies when using custom Host:, domain using only two dots
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/73 -c log/jar73.txt -H "Host: host.NOT_DISCLOSED.se"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -c log/jar%TESTNUMBER.txt -H "Host: host.NOT_DISCLOSED.se"
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/73 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: host.NOT_DISCLOSED.se

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/jar73.txt" mode="text">
+<file name="log/jar%TESTNUMBER.txt" mode="text">
 # Netscape HTTP Cookie File
-# https://curl.haxx.se/docs/http-cookies.html
+# https://curl.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .NOT_DISCLOSED.se	TRUE	/	FALSE	0	IPCZQX01af0fca5c	000010008168c200d25dfc4b
diff --git a/tests/data/test74 b/tests/data/test74
index 1a7d73f..524a70e 100644
--- a/tests/data/test74
+++ b/tests/data/test74
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -43,7 +43,7 @@
 HTTP, urlglob {}-retrieval and -o #[num] usage
  </name>
  <command option="no-output">
-"http://%HOSTIP:%HTTPPORT/{74,740001}" -o "log/dumpit#1.dump"
+"http://%HOSTIP:%HTTPPORT/{%TESTNUMBER,%TESTNUMBER0001}" -o "log/dumpit#1.dump"
 </command>
 </client>
 
@@ -51,18 +51,18 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /74 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /740001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
-<file name="log/dumpit740001.dump">
+<file name="log/dumpit%TESTNUMBER0001.dump">
 HTTP/1.0 200 OK
 Content-Type: text/html
 Funny-head: swsclose
diff --git a/tests/data/test76 b/tests/data/test76
index fc4a30d..8aae75a 100644
--- a/tests/data/test76
+++ b/tests/data/test76
@@ -22,7 +22,7 @@
 HTTP, -O with no file name part in the URL
  </name>
  <command option="no-output">
-http://%HOSTIP:%NOLISTENPORT/76/ -O
+http://%HOSTIP:%NOLISTENPORT/%TESTNUMBER/ -O
 </command>
 </client>
 
diff --git a/tests/data/test77 b/tests/data/test77
index 81ea637..d7cce40 100644
--- a/tests/data/test77
+++ b/tests/data/test77
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -35,7 +35,7 @@
 HTTP with -z "older date"
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/77 -z "dec 12 12:00:00 1999 GMT"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "dec 12 12:00:00 1999 GMT"
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /77 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test78 b/tests/data/test78
index d7f7d0f..60c4029 100644
--- a/tests/data/test78
+++ b/tests/data/test78
@@ -47,7 +47,7 @@
 HTTP with -z "newer date"
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/78 -z "dec 12 11:00:00 1999 GMT"
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "dec 12 11:00:00 1999 GMT"
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /78 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test79 b/tests/data/test79
index e967bae..88e9b78 100644
--- a/tests/data/test79
+++ b/tests/data/test79
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -35,7 +35,7 @@
 FTP over HTTP proxy
  </name>
  <command>
-ftp://%HOSTIP:%HTTPPORT/we/want/that/page/79 -x %HOSTIP:%HTTPPORT
+ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/79 HTTP/1.1

+GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test8 b/tests/data/test8
index 02c6c06..a8548e6 100644
--- a/tests/data/test8
+++ b/tests/data/test8
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 </data>
@@ -25,13 +25,13 @@
 HTTP with cookie parsing from header file
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/8 -b log/heads8.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b log/heads%TESTNUMBER.txt
 </command>
 
 # We create this file before the command is invoked!
-<file name="log/heads8.txt">
+<file name="log/heads%TESTNUMBER.txt">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes
@@ -56,7 +56,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /we/want/8 HTTP/1.1

+GET /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test80 b/tests/data/test80
index 26b74f7..ef62f52 100644
--- a/tests/data/test80
+++ b/tests/data/test80
@@ -16,7 +16,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -32,7 +32,7 @@
 HTTP/1.1 200 Mighty fine indeed

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -53,7 +53,7 @@
 HTTP 1.0 CONNECT with proxytunnel and proxy+host Basic authentication
  </name>
  <command>
-http://test.80:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself
+http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself
 </command>
 <features>
 proxy
@@ -64,16 +64,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT test.80:%HTTPPORT HTTP/1.0

-Host: test.80:%HTTPPORT

+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.0

+Host: test.%TESTNUMBER:%HTTPPORT

 Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/80 HTTP/1.1

-Host: test.80:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test800 b/tests/data/test800
index 6b74da9..9f961eb 100644
--- a/tests/data/test800
+++ b/tests/data/test800
@@ -31,7 +31,7 @@
 IMAP FETCH message
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/800/;MAILINDEX=1' -u '"user:sec"ret{'
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u '"user:sec"ret{'
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN "\"user" "sec\"ret{"

-A003 SELECT 800

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test801 b/tests/data/test801
index 90766f7..dcfa18c 100644
--- a/tests/data/test801
+++ b/tests/data/test801
@@ -28,7 +28,7 @@
 IMAP FETCH message by MAILINDEX and SECTION
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/801/;MAILINDEX=123/;SECTION=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=123/;SECTION=1' -u user:secret
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 801

+A003 SELECT %TESTNUMBER

 A004 FETCH 123 BODY[1]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test802 b/tests/data/test802
index 19206a7..76ede9e 100644
--- a/tests/data/test802
+++ b/tests/data/test802
@@ -29,7 +29,7 @@
 IMAP SELECT UIDVALIDITY Success
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/802;UIDVALIDITY=3857529045/;MAILINDEX=123/;SECTION=TEXT' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER;UIDVALIDITY=3857529045/;MAILINDEX=123/;SECTION=TEXT' -u user:secret
 </command>
 </client>
 
@@ -39,7 +39,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 802

+A003 SELECT %TESTNUMBER

 A004 FETCH 123 BODY[TEXT]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test803 b/tests/data/test803
index 834e421..f16a419 100644
--- a/tests/data/test803
+++ b/tests/data/test803
@@ -24,7 +24,7 @@
 IMAP SELECT UIDVALIDITY Failure
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/803;UIDVALIDITY=12345/;MAILINDEX=123' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER;UIDVALIDITY=12345/;MAILINDEX=123' -u user:secret
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 803

+A003 SELECT %TESTNUMBER

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test804 b/tests/data/test804
index 90635c2..1626cf8 100644
--- a/tests/data/test804
+++ b/tests/data/test804
@@ -28,7 +28,7 @@
 IMAP doesn't perform SELECT if re-using the same mailbox
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/804/;MAILINDEX=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/804/;MAILINDEX=456/;SECTION=2.3' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=456/;SECTION=2.3' -u user:secret
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 804

+A003 SELECT %TESTNUMBER

 A004 FETCH 123 BODY[1]

 A005 FETCH 456 BODY[2.3]

 A006 LOGOUT

diff --git a/tests/data/test805 b/tests/data/test805
index e70c1a6..5ce64a7 100644
--- a/tests/data/test805
+++ b/tests/data/test805
@@ -23,9 +23,9 @@
 IMAP APPEND message
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/805 -T log/upload805 -u user:secret
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -T log/upload%TESTNUMBER -u user:secret
 </command>
-<file name="log/upload805">
+<file name="log/upload%TESTNUMBER">
 Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)

 From: Fred Foobar <foobar@example.COM>

 Subject: afternoon meeting

@@ -44,7 +44,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 APPEND 805 (\Seen) {295}

+A003 APPEND %TESTNUMBER (\Seen) {295}

 A004 LOGOUT

 </protocol>
 <upload>
diff --git a/tests/data/test806 b/tests/data/test806
index 37822a4..128ad85 100644
--- a/tests/data/test806
+++ b/tests/data/test806
@@ -11,9 +11,9 @@
 # Server-side
 <reply>
 <data>
-* LIST () "/" /806/blurdybloop

-* LIST (\Noselect) "/" /806/foo

-* LIST () "/" /806/foo/bar

+* LIST () "/" /%TESTNUMBER/blurdybloop

+* LIST (\Noselect) "/" /%TESTNUMBER/foo

+* LIST () "/" /%TESTNUMBER/foo/bar

 </data>
 </reply>
 
@@ -27,7 +27,7 @@
 IMAP LIST mailbox
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/806 -u user:secret
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 LIST "806" *

+A003 LIST "%TESTNUMBER" *

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test807 b/tests/data/test807
index 1271b6d..59c12eb 100644
--- a/tests/data/test807
+++ b/tests/data/test807
@@ -12,9 +12,9 @@
 # Server-side
 <reply>
 <data>
-* LSUB () "/" /807/blurdybloop

-* LSUB (\Noselect) "/" /807/foo

-* LSUB () "/" /807/foo/bar

+* LSUB () "/" /%TESTNUMBER/blurdybloop

+* LSUB (\Noselect) "/" /%TESTNUMBER/foo

+* LSUB () "/" /%TESTNUMBER/foo/bar

 </data>
 </reply>
 
@@ -28,7 +28,7 @@
 IMAP LSUB mailbox
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'LSUB "807" *'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'LSUB "%TESTNUMBER" *'
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 LSUB "807" *

+A003 LSUB "%TESTNUMBER" *

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test808 b/tests/data/test808
index 30c8bdf..a77589a 100644
--- a/tests/data/test808
+++ b/tests/data/test808
@@ -32,7 +32,7 @@
 IMAP EXAMINE mailbox (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'EXAMINE 808'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'EXAMINE %TESTNUMBER'
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 EXAMINE 808

+A003 EXAMINE %TESTNUMBER

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test809 b/tests/data/test809
index 4283179..8122eaf 100644
--- a/tests/data/test809
+++ b/tests/data/test809
@@ -12,7 +12,7 @@
 # Server-side
 <reply>
 <data>
-* STATUS 809 (MESSAGES 231 UIDNEXT 44292)

+* STATUS %TESTNUMBER (MESSAGES 231 UIDNEXT 44292)

 </data>
 </reply>
 
@@ -26,7 +26,7 @@
 IMAP mailbox STATUS (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'STATUS 809 (UIDNEXT MESSAGES)'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'STATUS %TESTNUMBER (UIDNEXT MESSAGES)'
 </command>
 </client>
 
@@ -36,7 +36,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 STATUS 809 (UIDNEXT MESSAGES)

+A003 STATUS %TESTNUMBER (UIDNEXT MESSAGES)

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test81 b/tests/data/test81
index 6a49125..1808bab 100644
--- a/tests/data/test81
+++ b/tests/data/test81
@@ -73,7 +73,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/81 --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT --proxy-ntlm
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT --proxy-ntlm
 </command>
 <precheck>
 chkhostname curlhost
@@ -83,16 +83,16 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/81 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

 

-GET http://%HOSTIP:%HTTPPORT/81 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 Proxy-Connection: Keep-Alive

diff --git a/tests/data/test810 b/tests/data/test810
index 6b4d243..80aac56 100644
--- a/tests/data/test810
+++ b/tests/data/test810
@@ -11,7 +11,7 @@
 # Server-side
 <reply>
 <data>
-* SEARCH 1 123 456 810

+* SEARCH 1 123 456 %TESTNUMBER

 </data>
 </reply>
 
@@ -25,7 +25,7 @@
 IMAP SEARCH for NEW messages
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/810?NEW -u user:secret
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER?NEW -u user:secret
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 810

+A003 SELECT %TESTNUMBER

 A004 SEARCH NEW

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test811 b/tests/data/test811
index 8fb3aa7..f0938be 100644
--- a/tests/data/test811
+++ b/tests/data/test811
@@ -23,7 +23,7 @@
 IMAP CREATE mailbox (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'CREATE 811'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'CREATE %TESTNUMBER'
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 CREATE 811

+A003 CREATE %TESTNUMBER

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test812 b/tests/data/test812
index 6d1b42d..8374ea0 100644
--- a/tests/data/test812
+++ b/tests/data/test812
@@ -23,7 +23,7 @@
 IMAP DELETE mailbox (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'DELETE 812'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'DELETE %TESTNUMBER'
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 DELETE 812

+A003 DELETE %TESTNUMBER

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test813 b/tests/data/test813
index 3544da6..2e8c42d 100644
--- a/tests/data/test813
+++ b/tests/data/test813
@@ -23,7 +23,7 @@
 IMAP RENAME mailbox (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'RENAME 666 813'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'RENAME 666 %TESTNUMBER'
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 RENAME 666 813

+A003 RENAME 666 %TESTNUMBER

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test814 b/tests/data/test814
index 0b90e5b..c673c43 100644
--- a/tests/data/test814
+++ b/tests/data/test814
@@ -23,7 +23,7 @@
 IMAP CHECK mailbox (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/814 -u user:secret -X 'CHECK'
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -u user:secret -X 'CHECK'
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 814

+A003 SELECT %TESTNUMBER

 A004 CHECK

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test815 b/tests/data/test815
index 6ebe5bf..4ac24f3 100644
--- a/tests/data/test815
+++ b/tests/data/test815
@@ -27,7 +27,7 @@
 IMAP STORE - delete message (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/815 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/815 -X CLOSE -u user:secret
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -X CLOSE -u user:secret
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 815

+A003 SELECT %TESTNUMBER

 A004 STORE 123 +Flags \Deleted

 A005 CLOSE

 A006 LOGOUT

diff --git a/tests/data/test816 b/tests/data/test816
index 6df9b7d..cf4702d 100644
--- a/tests/data/test816
+++ b/tests/data/test816
@@ -30,7 +30,7 @@
 IMAP STORE - delete message with confirmation (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/816 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/816 -X EXPUNGE -u user:secret
+imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/%TESTNUMBER -X EXPUNGE -u user:secret
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 816

+A003 SELECT %TESTNUMBER

 A004 STORE 123 +Flags \Deleted

 A005 EXPUNGE

 A006 LOGOUT

diff --git a/tests/data/test817 b/tests/data/test817
index 9b44ae9..9efa06d 100644
--- a/tests/data/test817
+++ b/tests/data/test817
@@ -23,7 +23,7 @@
 IMAP COPY message to mailbox (CUSTOMREQUEST)
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT -u user:secret -X 'COPY 123 817'
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'COPY 123 %TESTNUMBER'
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 COPY 123 817

+A003 COPY 123 %TESTNUMBER

 A004 LOGOUT

 </protocol>
 </verify>
diff --git a/tests/data/test819 b/tests/data/test819
index 4213e3e..d2f0db2 100644
--- a/tests/data/test819
+++ b/tests/data/test819
@@ -37,7 +37,7 @@
 IMAP plain authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/819/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE PLAIN

 AHVzZXIAc2VjcmV0

-A003 SELECT 819

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test82 b/tests/data/test82
index 138c8ee..9139833 100644
--- a/tests/data/test82
+++ b/tests/data/test82
@@ -35,14 +35,14 @@
 HTTP with proxy requiring NTLM, but we send Basic
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/82 --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/82 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=

 User-Agent: curl/%VERSION

diff --git a/tests/data/test820 b/tests/data/test820
index 0fe9bf2..8b684ac 100644
--- a/tests/data/test820
+++ b/tests/data/test820
@@ -37,7 +37,7 @@
 IMAP login authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/820/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 A002 AUTHENTICATE LOGIN

 dXNlcg==

 c2VjcmV0

-A003 SELECT 820

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test821 b/tests/data/test821
index 6c511c1..179574b 100644
--- a/tests/data/test821
+++ b/tests/data/test821
@@ -40,7 +40,7 @@
 IMAP CRAM-MD5 authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/821/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE CRAM-MD5

 dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg==

-A003 SELECT 821

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test822 b/tests/data/test822
index aa264ed..257115b 100644
--- a/tests/data/test822
+++ b/tests/data/test822
@@ -14,7 +14,7 @@
 AUTH NTLM
 REPLY AUTHENTICATE +
 REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= A002 OK AUTHENTICATE completed
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= A002 OK AUTHENTICATE completed
 </servercmd>
 <data>
 From: me@somewhere

@@ -49,7 +49,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-'imap://%HOSTIP:%IMAPPORT/822/;MAILINDEX=1' -u testuser:testpass
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
@@ -63,8 +63,8 @@
 A001 CAPABILITY

 A002 AUTHENTICATE NTLM

 TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

-A003 SELECT 822

+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test823 b/tests/data/test823
index 32bd9d1..b179a18 100644
--- a/tests/data/test823
+++ b/tests/data/test823
@@ -43,7 +43,7 @@
 IMAP DIGEST-MD5 authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/823/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -55,7 +55,7 @@
 A002 AUTHENTICATE DIGEST-MD5

 dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPTVlNzk5N2ZhZDZjMzNiZWJmZjk3OWJkY2I4ZmU3MTZiLHFvcD1hdXRo

 

-A003 SELECT 823

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test824 b/tests/data/test824
index 96c8e87..28630e4 100644
--- a/tests/data/test824
+++ b/tests/data/test824
@@ -37,7 +37,7 @@
 IMAP OAuth 2.0 (XOAUTH2) authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/824/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE XOAUTH2

 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB

-A003 SELECT 824

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test825 b/tests/data/test825
index d28b6a5..fd4e047 100644
--- a/tests/data/test825
+++ b/tests/data/test825
@@ -38,7 +38,7 @@
 IMAP plain authentication with initial response
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/825/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 <protocol>
 A001 CAPABILITY

 A002 AUTHENTICATE PLAIN AHVzZXIAc2VjcmV0

-A003 SELECT 825

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test826 b/tests/data/test826
index a1125e2..19247f0 100644
--- a/tests/data/test826
+++ b/tests/data/test826
@@ -38,7 +38,7 @@
 IMAP login authentication with initial response
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/826/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE LOGIN dXNlcg==

 c2VjcmV0

-A003 SELECT 826

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test827 b/tests/data/test827
index 9cefb50..79e449b 100644
--- a/tests/data/test827
+++ b/tests/data/test827
@@ -15,7 +15,7 @@
 AUTH NTLM
 CAPA SASL-IR
 REPLY AUTHENTICATE + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= A002 OK AUTHENTICATE completed
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= A002 OK AUTHENTICATE completed
 </servercmd>
 <data>
 From: me@somewhere

@@ -50,7 +50,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-'imap://%HOSTIP:%IMAPPORT/827/;MAILINDEX=1' -u testuser:testpass
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
@@ -63,8 +63,8 @@
 <protocol>
 A001 CAPABILITY

 A002 AUTHENTICATE NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

-A003 SELECT 827

+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test828 b/tests/data/test828
index 912aeff..40f2b12 100644
--- a/tests/data/test828
+++ b/tests/data/test828
@@ -38,7 +38,7 @@
 IMAP OAuth 2.0 (XOAUTH2) authentication with initial response
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/828/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 <protocol>
 A001 CAPABILITY

 A002 AUTHENTICATE XOAUTH2 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB

-A003 SELECT 828

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test829 b/tests/data/test829
index cefba0d..46ff4e1 100644
--- a/tests/data/test829
+++ b/tests/data/test829
@@ -15,7 +15,7 @@
 IMAP with URL-encoded CR LF in the URL
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/%0d%0a/829
+imap://%HOSTIP:%IMAPPORT/%0d%0a/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test83 b/tests/data/test83
index 6d7446d..dffdb92 100644
--- a/tests/data/test83
+++ b/tests/data/test83
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,7 +29,7 @@
 HTTP/1.1 200 Mighty fine indeed

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -50,7 +50,7 @@
 HTTP over proxy-tunnel with site authentication
  </name>
  <command>
-http://test.83:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self'
+http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self'
 </command>
 <features>
 proxy
@@ -61,15 +61,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT test.83:%HTTPPORT HTTP/1.1

-Host: test.83:%HTTPPORT

+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol>
-GET /we/want/that/page/83 HTTP/1.1

-Host: test.83:%HTTPPORT

+GET /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 Authorization: Basic aWFtOm15OjtzZWxm

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test830 b/tests/data/test830
index c7812b7..d02ed6b 100644
--- a/tests/data/test830
+++ b/tests/data/test830
@@ -33,7 +33,7 @@
 IMAP CRAM-MD5 graceful cancellation
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/830/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
diff --git a/tests/data/test831 b/tests/data/test831
index eae10f0..99e0fa4 100644
--- a/tests/data/test831
+++ b/tests/data/test831
@@ -41,7 +41,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-'imap://%HOSTIP:%IMAPPORT/831/;MAILINDEX=1' -u testuser:testpass
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
diff --git a/tests/data/test832 b/tests/data/test832
index 360654a..dc15aa7 100644
--- a/tests/data/test832
+++ b/tests/data/test832
@@ -35,7 +35,7 @@
 IMAP DIGEST-MD5 graceful cancellation
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/832/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
diff --git a/tests/data/test833 b/tests/data/test833
index 2c694ad..5784c41 100644
--- a/tests/data/test833
+++ b/tests/data/test833
@@ -44,7 +44,7 @@
 IMAP CRAM-MD5 authentication with SASL downgrade
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/833/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -57,7 +57,7 @@
 *

 A003 AUTHENTICATE PLAIN

 AHVzZXIAc2VjcmV0

-A004 SELECT 833

+A004 SELECT %TESTNUMBER

 A005 FETCH 1 BODY[]

 A006 LOGOUT

 </protocol>
diff --git a/tests/data/test834 b/tests/data/test834
index 8ecc223..f99d9dd 100644
--- a/tests/data/test834
+++ b/tests/data/test834
@@ -52,7 +52,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-'imap://%HOSTIP:%IMAPPORT/834/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 <precheck>
 chkhostname curlhost
@@ -69,7 +69,7 @@
 *

 A003 AUTHENTICATE PLAIN

 AHVzZXIAc2VjcmV0

-A004 SELECT 834

+A004 SELECT %TESTNUMBER

 A005 FETCH 1 BODY[]

 A006 LOGOUT

 </protocol>
diff --git a/tests/data/test835 b/tests/data/test835
index b44e877..fd6badd 100644
--- a/tests/data/test835
+++ b/tests/data/test835
@@ -46,7 +46,7 @@
 IMAP DIGEST-MD5 authentication with SASL downgrade
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/835/;MAILINDEX=1' -u user:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret
 </command>
 </client>
 
@@ -59,7 +59,7 @@
 *

 A003 AUTHENTICATE PLAIN

 AHVzZXIAc2VjcmV0

-A004 SELECT 835

+A004 SELECT %TESTNUMBER

 A005 FETCH 1 BODY[]

 A006 LOGOUT

 </protocol>
diff --git a/tests/data/test836 b/tests/data/test836
index 9478042..36c5166 100644
--- a/tests/data/test836
+++ b/tests/data/test836
@@ -36,7 +36,7 @@
 IMAP multiple connection authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/836/;MAILINDEX=1' -u user.one:secret -: 'imap://%HOSTIP:%IMAPPORT/836/;UID=2' -u user.two:secret
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user.one:secret -: 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;UID=2' -u user.two:secret
 </command>
 </client>
 
@@ -46,12 +46,12 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user.one secret

-A003 SELECT 836

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 B001 CAPABILITY

 B002 LOGIN user.two secret

-B003 SELECT 836

+B003 SELECT %TESTNUMBER

 B004 FETCH 2 BODY[]

 B005 LOGOUT

 </protocol>
diff --git a/tests/data/test837 b/tests/data/test837
index 0327266..2e46be6 100644
--- a/tests/data/test837
+++ b/tests/data/test837
@@ -37,7 +37,7 @@
 IMAP external authentication
  </name>
  <command>
-'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/837/;MAILINDEX=1'
+'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1'
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE EXTERNAL

 dXNlcg==

-A003 SELECT 837

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test838 b/tests/data/test838
index f5378fb..11ed7aa 100644
--- a/tests/data/test838
+++ b/tests/data/test838
@@ -37,7 +37,7 @@
 IMAP external authentication without credentials
  </name>
  <command>
-'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/838/;MAILINDEX=1'
+'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1'
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE EXTERNAL

 =

-A003 SELECT 838

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test839 b/tests/data/test839
index 508fb8e..8240bf3 100644
--- a/tests/data/test839
+++ b/tests/data/test839
@@ -38,7 +38,7 @@
 IMAP external authentication with initial response
  </name>
  <command>
-'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/839/;MAILINDEX=1'
+'imap://user;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1'
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 <protocol>
 A001 CAPABILITY

 A002 AUTHENTICATE EXTERNAL dXNlcg==

-A003 SELECT 839

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test84 b/tests/data/test84
index 37533e0..cc76262 100644
--- a/tests/data/test84
+++ b/tests/data/test84
@@ -12,7 +12,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -31,7 +31,7 @@
 HTTP over proxy with site authentication
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/84 -x %HOSTIP:%HTTPPORT --user iam:myself
+http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT --user iam:myself
 </command>
 <features>
 proxy
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/we/want/that/page/84 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: Basic aWFtOm15c2VsZg==

 User-Agent: curl/%VERSION

diff --git a/tests/data/test840 b/tests/data/test840
index 1e85af3..5510053 100644
--- a/tests/data/test840
+++ b/tests/data/test840
@@ -38,7 +38,7 @@
 IMAP external authentication with initial response without credentials
  </name>
  <command>
-'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/840/;MAILINDEX=1'
+'imap://;AUTH=EXTERNAL@%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1'
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 <protocol>
 A001 CAPABILITY

 A002 AUTHENTICATE EXTERNAL =

-A003 SELECT 840

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test841 b/tests/data/test841
index 839bfe3..c5258c9 100644
--- a/tests/data/test841
+++ b/tests/data/test841
@@ -33,7 +33,7 @@
 IMAP custom request doesn't check continuation data
  </name>
  <command>
- imap://%HOSTIP:%IMAPPORT/841/ -u user:secret -X 'FETCH 123 BODY[1]'
+ imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/ -u user:secret -X 'FETCH 123 BODY[1]'
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN user secret

-A003 SELECT 841

+A003 SELECT %TESTNUMBER

 A004 FETCH 123 BODY[1]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test842 b/tests/data/test842
index 2b5ae1c..42148d0 100644
--- a/tests/data/test842
+++ b/tests/data/test842
@@ -38,7 +38,7 @@
 IMAP OAuth 2.0 (OAUTHBEARER) authentication
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/842/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 # The protocol section doesn't support ways of specifying the raw data in the
 # base64 encoded message so we must assert this
@@ -51,7 +51,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE OAUTHBEARER

 %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

-A003 SELECT 842

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test843 b/tests/data/test843
index 1311889..dcf5c1b 100644
--- a/tests/data/test843
+++ b/tests/data/test843
@@ -39,7 +39,7 @@
 IMAP OAuth 2.0 (OAUTHBEARER) authentication with initial response
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/843/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 <protocol>
 A001 CAPABILITY

 A002 AUTHENTICATE OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

-A003 SELECT 843

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test844 b/tests/data/test844
index 8573bc2..83dff8e 100644
--- a/tests/data/test844
+++ b/tests/data/test844
@@ -29,7 +29,7 @@
 IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/844/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
diff --git a/tests/data/test845 b/tests/data/test845
index 449eef3..d622f0c 100644
--- a/tests/data/test845
+++ b/tests/data/test845
@@ -31,7 +31,7 @@
 IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/845/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
diff --git a/tests/data/test846 b/tests/data/test846
index 8d4d3c5..b04561b 100644
--- a/tests/data/test846
+++ b/tests/data/test846
@@ -33,7 +33,7 @@
 IMAP PREAUTH response
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/846/;MAILINDEX=1' -u notused:still-provided
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u notused:still-provided
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 <verify>
 <protocol>
 A001 CAPABILITY

-A002 SELECT 846

+A002 SELECT %TESTNUMBER

 A003 FETCH 1 BODY[]

 A004 LOGOUT

 </protocol>
diff --git a/tests/data/test847 b/tests/data/test847
index d4c1043..5a68f1c 100644
--- a/tests/data/test847
+++ b/tests/data/test847
@@ -31,7 +31,7 @@
 IMAP FETCH message
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/847/;UID=1' -u '"user:sec"ret{'
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;UID=1' -u '"user:sec"ret{'
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN "\"user" "sec\"ret{"

-A003 SELECT 847

+A003 SELECT %TESTNUMBER

 A004 UID FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test848 b/tests/data/test848
index 2b4a30b..27efe8a 100644
--- a/tests/data/test848
+++ b/tests/data/test848
@@ -37,7 +37,7 @@
 IMAP plain authentication with alternative authorization identity
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/848/;MAILINDEX=1' -u user:secret --sasl-authzid shared-mailbox
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret --sasl-authzid shared-mailbox
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 A001 CAPABILITY

 A002 AUTHENTICATE PLAIN

 c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ=

-A003 SELECT 848

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test849 b/tests/data/test849
index 8a4b39c..20fca6b 100644
--- a/tests/data/test849
+++ b/tests/data/test849
@@ -28,7 +28,7 @@
 IMAP plain authentication with alternative authorization identity (Not authorized)
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/849/;MAILINDEX=1' -u kurt:xipj3plmq --sasl-authzid ursel
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u kurt:xipj3plmq --sasl-authzid ursel
 </command>
 </client>
 
diff --git a/tests/data/test85 b/tests/data/test85
index ebdc370..afddd9c 100644
--- a/tests/data/test85
+++ b/tests/data/test85
@@ -14,7 +14,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -34,7 +34,7 @@
 HTTP over proxy with site and proxy authentication
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/85 -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this
+http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this
 </command>
 <features>
 proxy
@@ -45,7 +45,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/we/want/that/page/85 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/we/want/that/page/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Proxy-Authorization: Basic dGVzdGluZzp0aGlz

 Authorization: Basic aWFtOm15c2VsZg==

diff --git a/tests/data/test850 b/tests/data/test850
index 6176101..5b6a20f 100644
--- a/tests/data/test850
+++ b/tests/data/test850
@@ -31,7 +31,7 @@
 POP3 RETR message
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/850 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 CAPA

 USER user

 PASS secret

-RETR 850

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test851 b/tests/data/test851
index 6269dd7..e47517f 100644
--- a/tests/data/test851
+++ b/tests/data/test851
@@ -12,7 +12,7 @@
 <reply>
 <servercmd>
 # include the '.\r\n' 3-byte trailer to end the transfer properly!
-REPLY LIST +OK 851 100\r\n.
+REPLY LIST +OK %TESTNUMBER 100\r\n.
 </servercmd>
 </reply>
 
@@ -26,7 +26,7 @@
 POP3 LIST one message
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/851 -l -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 CAPA

 USER user

 PASS secret

-LIST 851

+LIST %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test852 b/tests/data/test852
index de9fbe2..8e608eb 100644
--- a/tests/data/test852
+++ b/tests/data/test852
@@ -26,7 +26,7 @@
 POP3 LIST invalid message
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/852 -l -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 CAPA

 USER user

 PASS secret

-LIST 852

+LIST %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test855 b/tests/data/test855
index 87fe744..24b1166 100644
--- a/tests/data/test855
+++ b/tests/data/test855
@@ -26,7 +26,7 @@
 POP3 RETR invalid message
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/855 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 CAPA

 USER user

 PASS secret

-RETR 855

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test856 b/tests/data/test856
index dcb07c5..efff9d0 100644
--- a/tests/data/test856
+++ b/tests/data/test856
@@ -25,7 +25,7 @@
 POP3 invalid login
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/856 -u user:wrong
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:wrong
 </command>
 </client>
 
diff --git a/tests/data/test857 b/tests/data/test857
index 055e35c..15cc4c8 100644
--- a/tests/data/test857
+++ b/tests/data/test857
@@ -42,7 +42,7 @@
 POP3 RETR message with dot-prefixed line
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/857 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 CAPA

 USER user

 PASS secret

-RETR 857

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test858 b/tests/data/test858
index 926dcd9..c4af2f7 100644
--- a/tests/data/test858
+++ b/tests/data/test858
@@ -23,7 +23,7 @@
 POP3 DELE message (CUSTOMREQUEST)
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/858 -u user:secret -X DELE -I
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret -X DELE -I
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 CAPA

 USER user

 PASS secret

-DELE 858

+DELE %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test86 b/tests/data/test86
index 26b66c4..5d4399c 100644
--- a/tests/data/test86
+++ b/tests/data/test86
@@ -12,7 +12,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -57,7 +57,7 @@
 HTTP, urlglob []-retrieval and -o #[num] usage
  </name>
  <command option="no-output">
-"http://%HOSTIP:%HTTPPORT/[860001-860003]" -o "log/dumpit#1.dump"
+"http://%HOSTIP:%HTTPPORT/[%TESTNUMBER0001-%TESTNUMBER0003]" -o "log/dumpit#1.dump"
 </command>
 </client>
 
@@ -65,17 +65,17 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /860001 HTTP/1.1

+GET /%TESTNUMBER0001 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /860002 HTTP/1.1

+GET /%TESTNUMBER0002 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /860003 HTTP/1.1

+GET /%TESTNUMBER0003 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

@@ -83,7 +83,7 @@
 </protocol>
 
 # we check the second file
-<file name="log/dumpit860002.dump">
+<file name="log/dumpit%TESTNUMBER0002.dump">
 HTTP/1.0 200 OK
 Content-Type: text/html
 Funny-head: swsclose
diff --git a/tests/data/test862 b/tests/data/test862
index a21b514..47b37bb 100644
--- a/tests/data/test862
+++ b/tests/data/test862
@@ -32,7 +32,7 @@
 POP3 retrieve message header (CUSTOMREQUEST)
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT -u user:secret -X 'TOP 862 0'
+pop3://%HOSTIP:%POP3PORT -u user:secret -X 'TOP %TESTNUMBER 0'
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 CAPA

 USER user

 PASS secret

-TOP 862 0

+TOP %TESTNUMBER 0

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test864 b/tests/data/test864
index ebdebd6..9f2ba12 100644
--- a/tests/data/test864
+++ b/tests/data/test864
@@ -37,7 +37,7 @@
 POP3 APOP authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/864 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 <protocol>
 CAPA

 APOP user 7501b4cdc224d469940e65e7b5e4d6eb

-RETR 864

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test865 b/tests/data/test865
index 8a262fc..9d931b5 100644
--- a/tests/data/test865
+++ b/tests/data/test865
@@ -39,7 +39,7 @@
 POP3 plain authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/865 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 CAPA

 AUTH PLAIN

 AHVzZXIAc2VjcmV0

-RETR 865

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test866 b/tests/data/test866
index 8fee23a..72e5c03 100644
--- a/tests/data/test866
+++ b/tests/data/test866
@@ -39,7 +39,7 @@
 POP3 login authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/866 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 AUTH LOGIN

 dXNlcg==

 c2VjcmV0

-RETR 866

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test867 b/tests/data/test867
index 139b467..5d59aa9 100644
--- a/tests/data/test867
+++ b/tests/data/test867
@@ -42,7 +42,7 @@
 POP3 CRAM-MD5 authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/867 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -53,7 +53,7 @@
 CAPA

 AUTH CRAM-MD5

 dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg==

-RETR 867

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test868 b/tests/data/test868
index 2fa2405..9216608 100644
--- a/tests/data/test868
+++ b/tests/data/test868
@@ -16,7 +16,7 @@
 AUTH NTLM
 REPLY AUTH +
 REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==

-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= +OK Login successful
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= +OK Login successful
 </servercmd>
 <data>
 From: me@somewhere

@@ -51,7 +51,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-pop3://%HOSTIP:%POP3PORT/868 -u testuser:testpass
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
@@ -65,8 +65,8 @@
 CAPA

 AUTH NTLM

 TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

-RETR 868

+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test869 b/tests/data/test869
index ecc422c..96d8c83 100644
--- a/tests/data/test869
+++ b/tests/data/test869
@@ -45,7 +45,7 @@
 POP3 DIGEST-MD5 authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/869 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -57,7 +57,7 @@
 AUTH DIGEST-MD5

 dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9YzNhMGFiZTc5NDYyNTIyNGY5Njg3YTYzMTc3ZmRhNWIscW9wPWF1dGg=

 

-RETR 869

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test87 b/tests/data/test87
index ee5be78..ff702dc 100644
--- a/tests/data/test87
+++ b/tests/data/test87
@@ -40,7 +40,7 @@
 urlglob with out of range -o #[num] usage
  </name>
  <command option="no-output">
-"http://%HOSTIP:%HTTPPORT/[870001-870002]" -o "log/dumpit87-#2.dump"
+"http://%HOSTIP:%HTTPPORT/[%TESTNUMBER0001-%TESTNUMBER0002]" -o "log/dumpit%TESTNUMBER-#2.dump"
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 # survives
 #
 <verify>
-<file name="log/dumpit87-#2.dump">
+<file name="log/dumpit%TESTNUMBER-#2.dump">
 HTTP/1.1 200 OK

 Funny-head: yesyes

 Content-Length: 16

diff --git a/tests/data/test870 b/tests/data/test870
index f6333f7..30f3586 100644
--- a/tests/data/test870
+++ b/tests/data/test870
@@ -39,7 +39,7 @@
 POP3 OAuth 2.0 (XOAUTH2) authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/870 -u user --oauth2-bearer mF_9.B5f-4.1JqM
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 CAPA

 AUTH XOAUTH2

 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB

-RETR 870

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test871 b/tests/data/test871
index 27cc2a4..00adefd 100644
--- a/tests/data/test871
+++ b/tests/data/test871
@@ -39,7 +39,7 @@
 POP3 plain authentication with initial response
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/871 -u user:secret --sasl-ir
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret --sasl-ir
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 <protocol>
 CAPA

 AUTH PLAIN AHVzZXIAc2VjcmV0

-RETR 871

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test872 b/tests/data/test872
index 05cb2a2..19cd49a 100644
--- a/tests/data/test872
+++ b/tests/data/test872
@@ -39,7 +39,7 @@
 POP3 login authentication with initial response
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/872 -u user:secret --sasl-ir
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret --sasl-ir
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 CAPA

 AUTH LOGIN dXNlcg==

 c2VjcmV0

-RETR 872

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test873 b/tests/data/test873
index 2cabf1f..67c8107 100644
--- a/tests/data/test873
+++ b/tests/data/test873
@@ -16,7 +16,7 @@
 <servercmd>
 AUTH NTLM
 REPLY AUTH + TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= +OK Login successful
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= +OK Login successful
 </servercmd>
 <data>
 From: me@somewhere

@@ -51,7 +51,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-pop3://%HOSTIP:%POP3PORT/873 -u testuser:testpass --sasl-ir
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass --sasl-ir
 </command>
 <precheck>
 chkhostname curlhost
@@ -64,8 +64,8 @@
 <protocol>
 CAPA

 AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

-RETR 873

+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test874 b/tests/data/test874
index d1030da..1f19c5c 100644
--- a/tests/data/test874
+++ b/tests/data/test874
@@ -39,7 +39,7 @@
 POP3 OAuth 2.0 (XOAUTH2) authentication with initial response
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/874 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 <protocol>
 CAPA

 AUTH XOAUTH2 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB

-RETR 874

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test875 b/tests/data/test875
index 53e9940..8850fab 100644
--- a/tests/data/test875
+++ b/tests/data/test875
@@ -15,7 +15,7 @@
 POP3 with URL-encoded CR LF in the URL
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/%0d%0a/875
+pop3://%HOSTIP:%POP3PORT/%0d%0a/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test876 b/tests/data/test876
index 6d30e53..ae5ea07 100644
--- a/tests/data/test876
+++ b/tests/data/test876
@@ -34,7 +34,7 @@
 POP3 CRAM-MD5 graceful cancellation
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/876 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
diff --git a/tests/data/test877 b/tests/data/test877
index 114707a..65070d0 100644
--- a/tests/data/test877
+++ b/tests/data/test877
@@ -42,7 +42,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-pop3://%HOSTIP:%POP3PORT/877 -u testuser:testpass
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass
 </command>
 <precheck>
 chkhostname curlhost
diff --git a/tests/data/test878 b/tests/data/test878
index 98961fb..28bd44a 100644
--- a/tests/data/test878
+++ b/tests/data/test878
@@ -36,7 +36,7 @@
 POP3 DIGEST-MD5 graceful cancellation
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/878 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
diff --git a/tests/data/test879 b/tests/data/test879
index 0d45aaa..1b7ca56 100644
--- a/tests/data/test879
+++ b/tests/data/test879
@@ -46,7 +46,7 @@
 POP3 CRAM-MD5 authentication with SASL downgrade
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/879 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -59,7 +59,7 @@
 *

 AUTH PLAIN

 AHVzZXIAc2VjcmV0

-RETR 879

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test88 b/tests/data/test88
index 40b0e8f..b7c6207 100644
--- a/tests/data/test88
+++ b/tests/data/test88
@@ -63,9 +63,9 @@
 HTTP PUT with Digest authorization
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/88 -T log/put88 -u testuser:testpass --digest
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --digest
 </command>
-<file name="log/put88">
+<file name="log/put%TESTNUMBER">
 This is data we upload with PUT
 a second line
 line three
@@ -76,15 +76,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /88 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 0

 

-PUT /88 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71"

+Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="78a49fa53d0c228778297687d4168e71"

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 85

diff --git a/tests/data/test880 b/tests/data/test880
index e0609bb..9dc00c0 100644
--- a/tests/data/test880
+++ b/tests/data/test880
@@ -54,7 +54,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-pop3://%HOSTIP:%POP3PORT/880 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 <precheck>
 chkhostname curlhost
@@ -71,7 +71,7 @@
 *

 AUTH PLAIN

 AHVzZXIAc2VjcmV0

-RETR 880

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test881 b/tests/data/test881
index ccb906d..69e31a4 100644
--- a/tests/data/test881
+++ b/tests/data/test881
@@ -48,7 +48,7 @@
 POP3 DIGEST-MD5 authentication with SASL downgrade
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/881 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
@@ -61,7 +61,7 @@
 *

 AUTH PLAIN

 AHVzZXIAc2VjcmV0

-RETR 881

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test882 b/tests/data/test882
index 1e321ff..77a57c8 100644
--- a/tests/data/test882
+++ b/tests/data/test882
@@ -35,7 +35,7 @@
 POP3 multiple connection authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/882001 -u user.one:secret -: pop3://%HOSTIP:%POP3PORT/882002 -u user.two:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER001 -u user.one:secret -: pop3://%HOSTIP:%POP3PORT/%TESTNUMBER002 -u user.two:secret
 </command>
 </client>
 
@@ -46,12 +46,12 @@
 CAPA

 USER user.one

 PASS secret

-RETR 882001

+RETR %TESTNUMBER001

 QUIT

 CAPA

 USER user.two

 PASS secret

-RETR 882002

+RETR %TESTNUMBER002

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test883 b/tests/data/test883
index 5d5a756..6d5900c 100644
--- a/tests/data/test883
+++ b/tests/data/test883
@@ -39,7 +39,7 @@
 POP3 external authentication
  </name>
  <command>
-'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/883'
+'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/%TESTNUMBER'
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 CAPA

 AUTH EXTERNAL

 dXNlcg==

-RETR 883

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test884 b/tests/data/test884
index 34fd94d..f0744bf 100644
--- a/tests/data/test884
+++ b/tests/data/test884
@@ -39,7 +39,7 @@
 POP3 external authentication without credentials
  </name>
  <command>
-'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/884'
+'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/%TESTNUMBER'
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 CAPA

 AUTH EXTERNAL

 =

-RETR 884

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test885 b/tests/data/test885
index 581e9b2..7131f16 100644
--- a/tests/data/test885
+++ b/tests/data/test885
@@ -39,7 +39,7 @@
 POP3 external authentication with initial response
  </name>
  <command>
-'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/885' --sasl-ir
+'pop3://user;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/%TESTNUMBER' --sasl-ir
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 <protocol>
 CAPA

 AUTH EXTERNAL dXNlcg==

-RETR 885

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test886 b/tests/data/test886
index 3aca2f1..f777abb 100644
--- a/tests/data/test886
+++ b/tests/data/test886
@@ -39,7 +39,7 @@
 POP3 external authentication with initial response without credentials
  </name>
  <command>
-'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/886' --sasl-ir
+'pop3://;AUTH=EXTERNAL@%HOSTIP:%POP3PORT/%TESTNUMBER' --sasl-ir
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 <protocol>
 CAPA

 AUTH EXTERNAL =

-RETR 886

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test887 b/tests/data/test887
index ccf3649..2d0f535 100644
--- a/tests/data/test887
+++ b/tests/data/test887
@@ -40,7 +40,7 @@
 POP3 OAuth 2.0 (OAUTHBEARER) authentication
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/887 -u user --oauth2-bearer mF_9.B5f-4.1JqM
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 CAPA

 AUTH OAUTHBEARER

 %b64[n,a=user,%01host=127.0.0.1%01port=%POP3PORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

-RETR 887

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test888 b/tests/data/test888
index 465a2d0..b35b9d6 100644
--- a/tests/data/test888
+++ b/tests/data/test888
@@ -40,7 +40,7 @@
 POP3 OAuth 2.0 (OAUTHBEARER) authentication with initial response
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/888 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 <protocol>
 CAPA

 AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%POP3PORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

-RETR 888

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test889 b/tests/data/test889
index 9658d38..155268b 100644
--- a/tests/data/test889
+++ b/tests/data/test889
@@ -32,7 +32,7 @@
 POP3 OAuth 2.0 (OAUTHBEARER) failure as continuation
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/889 -u user --oauth2-bearer mF_9.B5f-4.1JqM
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM
 </command>
 </client>
 
diff --git a/tests/data/test89 b/tests/data/test89
index 0537fa5..6781e04 100644
--- a/tests/data/test89
+++ b/tests/data/test89
@@ -31,7 +31,7 @@
 HTTP/1.1 301 Things are fine in server land swsclose

 Server: Microsoft-IIS/5.0

 Connection: close

-Location: /you/890010

+Location: /you/%TESTNUMBER0010

 

 </data1002>
 
@@ -67,7 +67,7 @@
 HTTP/1.1 301 Things are fine in server land swsclose

 Server: Microsoft-IIS/5.0

 Connection: close

-Location: /you/890010

+Location: /you/%TESTNUMBER0010

 

 HTTP/1.1 401 Now gimme that second round of crap

 Server: Microsoft-IIS/5.0

@@ -106,7 +106,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L
 </command>
 <precheck>
 chkhostname curlhost
@@ -116,27 +116,27 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /89 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /89 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /you/890010 HTTP/1.1

+GET /you/%TESTNUMBER0010 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /you/890010 HTTP/1.1

+GET /you/%TESTNUMBER0010 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADYzMjE3MzIxAAAAAAAAAAAAAAAAAAAAAEcJ4YHOeb5ga2TCPwDhkyUIuHjBUHcLaHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test890 b/tests/data/test890
index 4d6701a..e625fca 100644
--- a/tests/data/test890
+++ b/tests/data/test890
@@ -32,7 +32,7 @@
 POP3 OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/890 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
 </command>
 </client>
 
diff --git a/tests/data/test891 b/tests/data/test891
index 61eae10..b2496f8 100644
--- a/tests/data/test891
+++ b/tests/data/test891
@@ -27,7 +27,7 @@
 POP3 with short authentication response
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/891 -u user:secret
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret
 </command>
 </client>
 
diff --git a/tests/data/test892 b/tests/data/test892
index 4b83182..5a6a7fd 100644
--- a/tests/data/test892
+++ b/tests/data/test892
@@ -39,7 +39,7 @@
 POP3 plain authentication with alternative authorization identity
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/892 -u user:secret --sasl-authzid shared-mailbox
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret --sasl-authzid shared-mailbox
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 CAPA

 AUTH PLAIN

 c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ=

-RETR 892

+RETR %TESTNUMBER

 QUIT

 </protocol>
 </verify>
diff --git a/tests/data/test893 b/tests/data/test893
index 2a762fc..ca68dd0 100644
--- a/tests/data/test893
+++ b/tests/data/test893
@@ -30,7 +30,7 @@
 POP3 plain authentication with alternative authorization identity (Not authorized)
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/893 -u kurt:xipj3plmq --sasl-authzid ursel
+pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u kurt:xipj3plmq --sasl-authzid ursel
 </command>
 </client>
 
diff --git a/tests/data/test894 b/tests/data/test894
index db79830..f986658 100644
--- a/tests/data/test894
+++ b/tests/data/test894
@@ -22,7 +22,7 @@
 POP3 with CR in username
  </name>
  <command>
-pop3://user%0dFRIGGING_cmd:secret@%HOSTIP:%POP3PORT/894
+pop3://user%0dFRIGGING_cmd:secret@%HOSTIP:%POP3PORT/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test895 b/tests/data/test895
index 78d48c4..520e094 100644
--- a/tests/data/test895
+++ b/tests/data/test895
@@ -32,7 +32,7 @@
 IMAP with --login-options 'AUTH=*'
  </name>
  <command>
-'imap://%HOSTIP:%IMAPPORT/895/;MAILINDEX=1' -u '"user:sec"ret{' --login-options 'AUTH=*'
+'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u '"user:sec"ret{' --login-options 'AUTH=*'
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 <protocol>
 A001 CAPABILITY

 A002 LOGIN "\"user" "sec\"ret{"

-A003 SELECT 895

+A003 SELECT %TESTNUMBER

 A004 FETCH 1 BODY[]

 A005 LOGOUT

 </protocol>
diff --git a/tests/data/test9 b/tests/data/test9
index adef694..e3aa2b6 100644
--- a/tests/data/test9
+++ b/tests/data/test9
@@ -10,7 +10,7 @@
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 
 blablabla
@@ -27,10 +27,10 @@
 HTTP RFC1867-type formposting
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/9 -F name=daniel -F tool=curl -F file=@log/test9.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt
 </command>
 # We create this file before the command is invoked!
-<file name="log/test9.txt">
+<file name="log/test%TESTNUMBER.txt">
 foo-
 This is a moo-
 bar
@@ -43,7 +43,7 @@
 ^(Content-Type: multipart/form-data;|------------).*
 </strip>
 <protocol>
-POST /we/want/9 HTTP/1.1

+POST /we/want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test90 b/tests/data/test90
index 91d569d..9ca9972 100644
--- a/tests/data/test90
+++ b/tests/data/test90
@@ -41,7 +41,7 @@
 HTTP/1.1 301 Things are fine in server land swsclose

 Server: Microsoft-IIS/5.0

 Connection: close

-Location: /you/900010

+Location: /you/%TESTNUMBER0010

 

 </data1002>
 
@@ -97,7 +97,7 @@
 HTTP/1.1 301 Things are fine in server land swsclose

 Server: Microsoft-IIS/5.0

 Connection: close

-Location: /you/900010

+Location: /you/%TESTNUMBER0010

 

 HTTP/1.1 401 Authorization Required swsclose

 Server: Apache/1.3.27 (Darwin) PHP/4.1.2

@@ -144,7 +144,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth -L
 </command>
 <precheck>
 chkhostname curlhost
@@ -154,37 +154,37 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /90 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /90 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /90 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /you/900010 HTTP/1.1

+GET /you/%TESTNUMBER0010 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /you/900010 HTTP/1.1

+GET /you/%TESTNUMBER0010 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /you/900010 HTTP/1.1

+GET /you/%TESTNUMBER0010 HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADYzMjE3MzIxAAAAAAAAAAAAAAAAAAAAAEcJ4YHOeb5ga2TCPwDhkyUIuHjBUHcLaHRlc3R1c2VyY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test900 b/tests/data/test900
index 0dd7f52..a4fc8aa 100644
--- a/tests/data/test900
+++ b/tests/data/test900
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/900 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 900

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test901 b/tests/data/test901
index 8148b29..787365b 100644
--- a/tests/data/test901
+++ b/tests/data/test901
@@ -32,7 +32,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/901 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 901

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test902 b/tests/data/test902
index 8ee105f..4f651a8 100644
--- a/tests/data/test902
+++ b/tests/data/test902
@@ -31,7 +31,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/902 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -39,8 +39,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 902

-HELO 902

+EHLO %TESTNUMBER

+HELO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test903 b/tests/data/test903
index 8a766e5..8fe3174 100644
--- a/tests/data/test903
+++ b/tests/data/test903
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/903 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 903

+EHLO %TESTNUMBER

 AUTH PLAIN

 AHVzZXIAc2VjcmV0

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test904 b/tests/data/test904
index dd3dad0..0791497 100644
--- a/tests/data/test904
+++ b/tests/data/test904
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/904 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 904

+EHLO %TESTNUMBER

 AUTH LOGIN

 dXNlcg==

 c2VjcmV0

diff --git a/tests/data/test905 b/tests/data/test905
index 565b041..d29e9a8 100644
--- a/tests/data/test905
+++ b/tests/data/test905
@@ -35,7 +35,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/905 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 905

+EHLO %TESTNUMBER

 AUTH CRAM-MD5

 dXNlciA3MDMxNzI1NTk5ZmRiYjVkNDEyNjg5YWEzMjNlM2UwYg==

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test906 b/tests/data/test906
index 6ec59c7..9330d0a 100644
--- a/tests/data/test906
+++ b/tests/data/test906
@@ -15,7 +15,7 @@
 AUTH NTLM
 REPLY AUTH 334 NTLM supported
 REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 334 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==

-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= 235 Authenticated
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 235 Authenticated
 </servercmd>
 </reply>
 
@@ -44,7 +44,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/906 --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T -
 </command>
 <precheck>
 chkhostname curlhost
@@ -55,10 +55,10 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 906

+EHLO %TESTNUMBER

 AUTH NTLM

 TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test907 b/tests/data/test907
index c19e1e1..b2af26b 100644
--- a/tests/data/test907
+++ b/tests/data/test907
@@ -38,7 +38,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/907 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 907

+EHLO %TESTNUMBER

 AUTH DIGEST-MD5

 dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPTk0M2YxNjk1OWYxY2M2ZjA3ZTZmMDk0ZjVkYmQ0NzNlLHFvcD1hdXRo

 

diff --git a/tests/data/test908 b/tests/data/test908
index bf0b45a..b87c438 100644
--- a/tests/data/test908
+++ b/tests/data/test908
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/908 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 908

+EHLO %TESTNUMBER

 AUTH XOAUTH2

 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test909 b/tests/data/test909
index e3e907a..d50ab81 100644
--- a/tests/data/test909
+++ b/tests/data/test909
@@ -19,14 +19,14 @@
  <name>
 SMTP without SIZE support
  </name>
-<file name="log/test909.eml">
+<file name="log/test%TESTNUMBER.eml">
 From: different

 To: another

 

 body

 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/909 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test909.eml
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test%TESTNUMBER.eml
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 909

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test91 b/tests/data/test91
index 314a655..5f8f585 100644
--- a/tests/data/test91
+++ b/tests/data/test91
@@ -90,7 +90,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --anyauth -u mydomain\\myself:secret
 </command>
 <precheck>
 chkhostname curlhost
@@ -100,20 +100,20 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /91 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /91 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 User-Agent: curl/%VERSION

 Accept: */*

 

-GET /91 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAAKBS3rdGYZEGsqW8otYHWXWBxC5mCuFmYm15ZG9tYWlubXlzZWxmY3VybGhvc3Q=

+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAAIAAgAfgAAAAAAAAAAAAAAhoIBAMIyJpR5mHpg2FZha5kRaFZ9436GAxPu0C5llxexSQ5QzVkiLSfkcpVyRgCXXqR+Am15ZG9tYWlubXlzZWxmY3VybGhvc3Q=

 User-Agent: curl/%VERSION

 Accept: */*

 

diff --git a/tests/data/test910 b/tests/data/test910
index c1b84ac..8787cc0 100644
--- a/tests/data/test910
+++ b/tests/data/test910
@@ -26,7 +26,7 @@
 body
 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/910 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 910

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test911 b/tests/data/test911
index f4c5458..88631cd 100644
--- a/tests/data/test911
+++ b/tests/data/test911
@@ -25,7 +25,7 @@
 </stdin>
 
  <command>
-smtp://%HOSTIP:%SMTPPORT/911 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 911

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test912 b/tests/data/test912
index 8970c3f..4a3f6d1 100644
--- a/tests/data/test912
+++ b/tests/data/test912
@@ -23,14 +23,14 @@
  <name>
 SMTP with SIZE support
  </name>
-<file name="log/test912.eml">
+<file name="log/test%TESTNUMBER.eml">
 From: different

 To: another

 

 body

 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/912 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test912.eml
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test%TESTNUMBER.eml
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 912

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com> SIZE=38

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test913 b/tests/data/test913
index d13a11a..9c19eb2 100644
--- a/tests/data/test913
+++ b/tests/data/test913
@@ -23,14 +23,14 @@
  <name>
 SMTP with large message SIZE
  </name>
-<file name="log/test913.eml">
+<file name="log/test%TESTNUMBER.eml">
 From: different

 To: another

 

 body

 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/913 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test913.eml
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/test%TESTNUMBER.eml
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 913

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com> SIZE=38

 QUIT

 </protocol>
diff --git a/tests/data/test914 b/tests/data/test914
index 0124b76..ab895d2 100644
--- a/tests/data/test914
+++ b/tests/data/test914
@@ -22,14 +22,14 @@
  <name>
 SMTP invalid --mail-from
  </name>
-<file name="log/test914.eml">
+<file name="log/test%TESTNUMBER.eml">
 From: different

 To: another

 

 body

 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/914 --mail-rcpt recipient@example.com --mail-from invalid -T log/test914.eml
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from invalid -T log/test%TESTNUMBER.eml
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 914

+EHLO %TESTNUMBER

 MAIL FROM:<invalid>

 QUIT

 </protocol>
diff --git a/tests/data/test915 b/tests/data/test915
index 4d31db3..5d89442 100644
--- a/tests/data/test915
+++ b/tests/data/test915
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/915 --mail-rcpt recipient@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 915

+EHLO %TESTNUMBER

 MAIL FROM:<>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test916 b/tests/data/test916
index 0021155..2c375ee 100644
--- a/tests/data/test916
+++ b/tests/data/test916
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/916 --mail-rcpt invalid --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt invalid --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 916

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<invalid>

 QUIT

diff --git a/tests/data/test917 b/tests/data/test917
index cc75da3..fcf21dd 100644
--- a/tests/data/test917
+++ b/tests/data/test917
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/917 --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient.one@example.com --mail-rcpt recipient.two@example.com --mail-rcpt recipient.three@example.com --mail-rcpt recipient.four@example.com --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -34,7 +34,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 917

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient.one@example.com>

 RCPT TO:<recipient.two@example.com>

diff --git a/tests/data/test918 b/tests/data/test918
index 3756edd..817674f 100644
--- a/tests/data/test918
+++ b/tests/data/test918
@@ -26,7 +26,7 @@
 body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/918 --mail-rcpt recipient.one@example.com --mail-rcpt invalid --mail-rcpt recipient.three@example.com --mail-rcpt sTrAnGe --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient.one@example.com --mail-rcpt invalid --mail-rcpt recipient.three@example.com --mail-rcpt sTrAnGe --mail-rcpt recipient.five@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -38,7 +38,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 918

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient.one@example.com>

 RCPT TO:<invalid>

diff --git a/tests/data/test919 b/tests/data/test919
index 39794e3..8c49abd 100644
--- a/tests/data/test919
+++ b/tests/data/test919
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/919 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret --sasl-ir -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret --sasl-ir -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 919

+EHLO %TESTNUMBER

 AUTH PLAIN AHVzZXIAc2VjcmV0

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

diff --git a/tests/data/test92 b/tests/data/test92
index 7e03f0a..1c09e97 100644
--- a/tests/data/test92
+++ b/tests/data/test92
@@ -48,14 +48,14 @@
 HTTP resume transfer with the whole file already downloaded
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/want/92 -C 87
+http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -C 87
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /want/92 HTTP/1.1

+GET /want/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=87-

 User-Agent: curl/%VERSION

diff --git a/tests/data/test920 b/tests/data/test920
index 82f6c56..2625518 100644
--- a/tests/data/test920
+++ b/tests/data/test920
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/920 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret --sasl-ir -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret --sasl-ir -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 920

+EHLO %TESTNUMBER

 AUTH LOGIN dXNlcg==

 c2VjcmV0

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test921 b/tests/data/test921
index f9e5673..57c4a78 100644
--- a/tests/data/test921
+++ b/tests/data/test921
@@ -15,7 +15,7 @@
 <servercmd>
 AUTH NTLM
 REPLY AUTH 334 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==

-REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= 235 Authenticated
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q= 235 Authenticated
 </servercmd>
 </reply>
 
@@ -44,7 +44,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/921 --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass --sasl-ir -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass --sasl-ir -T -
 </command>
 <precheck>
 chkhostname curlhost
@@ -55,9 +55,9 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>

-EHLO 921

+EHLO %TESTNUMBER

 AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

-TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=

+TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test922 b/tests/data/test922
index aacd684..8c16e43 100644
--- a/tests/data/test922
+++ b/tests/data/test922
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/922 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 922

+EHLO %TESTNUMBER

 AUTH XOAUTH2 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

diff --git a/tests/data/test923 b/tests/data/test923
index 9d9722f..68a0138 100644
--- a/tests/data/test923
+++ b/tests/data/test923
@@ -21,7 +21,7 @@
 SMTP VRFY
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/923 --mail-rcpt recipient
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient
 </command>
 </client>
 
@@ -29,7 +29,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 923

+EHLO %TESTNUMBER

 VRFY recipient

 QUIT

 </protocol>
diff --git a/tests/data/test924 b/tests/data/test924
index 51e373c..c87b2a9 100644
--- a/tests/data/test924
+++ b/tests/data/test924
@@ -27,7 +27,7 @@
 SMTP ambiguous VRFY
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/924 --mail-rcpt smith
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt smith
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 924

+EHLO %TESTNUMBER

 VRFY smith

 QUIT

 </protocol>
diff --git a/tests/data/test925 b/tests/data/test925
index 2d53100..3b1801b 100644
--- a/tests/data/test925
+++ b/tests/data/test925
@@ -24,7 +24,7 @@
 SMTP external VRFY
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/925 --mail-rcpt user@example.net
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt user@example.net
 </command>
 </client>
 
@@ -32,7 +32,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 925

+EHLO %TESTNUMBER

 VRFY user@example.net

 QUIT

 </protocol>
diff --git a/tests/data/test926 b/tests/data/test926
index 4c4576c..aed6f4b 100644
--- a/tests/data/test926
+++ b/tests/data/test926
@@ -24,7 +24,7 @@
 SMTP unknown user VRFY
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/926 --mail-rcpt recipient
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient
 </command>
 </client>
 
@@ -36,7 +36,7 @@
 56
 </errorcode>
 <protocol>
-EHLO 926

+EHLO %TESTNUMBER

 VRFY recipient

 QUIT

 </protocol>
diff --git a/tests/data/test927 b/tests/data/test927
index b199710..a982d14 100644
--- a/tests/data/test927
+++ b/tests/data/test927
@@ -27,7 +27,7 @@
 SMTP mailing list EXPN (CUSTOMREQUEST)
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/927 --mail-rcpt Friends -X EXPN
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Friends -X EXPN
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 927

+EHLO %TESTNUMBER

 EXPN Friends

 QUIT

 </protocol>
diff --git a/tests/data/test928 b/tests/data/test928
index 81bbdc2..3ed0979 100644
--- a/tests/data/test928
+++ b/tests/data/test928
@@ -25,7 +25,7 @@
 SMTP HELP
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/928
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -33,7 +33,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 928

+EHLO %TESTNUMBER

 HELP

 QUIT

 </protocol>
diff --git a/tests/data/test929 b/tests/data/test929
index 3761ab5..be26328 100644
--- a/tests/data/test929
+++ b/tests/data/test929
@@ -22,7 +22,7 @@
 SMTP NOOP (CUSTOMREQUEST)
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/929 -X NOOP -I
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER -X NOOP -I
 </command>
 </client>
 
@@ -30,7 +30,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 929

+EHLO %TESTNUMBER

 NOOP

 QUIT

 </protocol>
diff --git a/tests/data/test93 b/tests/data/test93
index 684e56c..e0266e6 100644
--- a/tests/data/test93
+++ b/tests/data/test93
@@ -29,7 +29,7 @@
 HTTP GET with failed proxy auth
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/93 -x %HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -x %HOSTIP:%HTTPPORT
 </command>
 <features>
 proxy
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET http://%HOSTIP:%HTTPPORT/93 HTTP/1.1

+GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test930 b/tests/data/test930
index be633c1..ebde938 100644
--- a/tests/data/test930
+++ b/tests/data/test930
@@ -22,7 +22,7 @@
 SMTP RSET (CUSTOMREQUEST)
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/930 -X RSET -I
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER -X RSET -I
 </command>
 </client>
 
@@ -30,7 +30,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 930

+EHLO %TESTNUMBER

 RSET

 QUIT

 </protocol>
diff --git a/tests/data/test931 b/tests/data/test931
index 722aa02..226f2dd 100644
--- a/tests/data/test931
+++ b/tests/data/test931
@@ -15,7 +15,7 @@
 SMTP with URL-encoded CR LF in the URL
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/%0d%0a/931
+smtp://%HOSTIP:%SMTPPORT/%0d%0a/%TESTNUMBER
 </command>
 </client>
 
diff --git a/tests/data/test932 b/tests/data/test932
index 13ab790..b6f828c 100644
--- a/tests/data/test932
+++ b/tests/data/test932
@@ -33,7 +33,7 @@
 SMTP CRAM-MD5 graceful cancellation
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/932 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 # The multi interface considers a broken "CONNECT" as a prematurely broken
 # transfer and such a connection will not get a "QUIT"
 <protocol>
-EHLO 932

+EHLO %TESTNUMBER

 AUTH CRAM-MD5

 *

 </protocol>
diff --git a/tests/data/test933 b/tests/data/test933
index e091de3..518a9b1 100644
--- a/tests/data/test933
+++ b/tests/data/test933
@@ -41,7 +41,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-smtp://%HOSTIP:%SMTPPORT/933 --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u testuser:testpass -T -
 </command>
 <precheck>
 chkhostname curlhost
@@ -59,7 +59,7 @@
 # The multi interface considers a broken "CONNECT" as a prematurely broken
 # transfer and such a connection will not get a "QUIT"
 <protocol>
-EHLO 933

+EHLO %TESTNUMBER

 AUTH NTLM

 TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 *

diff --git a/tests/data/test934 b/tests/data/test934
index 1794d81..87b8571 100644
--- a/tests/data/test934
+++ b/tests/data/test934
@@ -35,7 +35,7 @@
 SMTP DIGEST-MD5 graceful cancellation
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/934 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -50,7 +50,7 @@
 # The multi interface considers a broken "CONNECT" as a prematurely broken
 # transfer and such a connection will not get a "QUIT"
 <protocol>
-EHLO 934

+EHLO %TESTNUMBER

 AUTH DIGEST-MD5

 *

 </protocol>
diff --git a/tests/data/test935 b/tests/data/test935
index 9466114..fe106f8 100644
--- a/tests/data/test935
+++ b/tests/data/test935
@@ -39,7 +39,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/935 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 935

+EHLO %TESTNUMBER

 AUTH CRAM-MD5

 *

 AUTH PLAIN

diff --git a/tests/data/test936 b/tests/data/test936
index b123499..6d8074f 100644
--- a/tests/data/test936
+++ b/tests/data/test936
@@ -47,7 +47,7 @@
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-smtp://%HOSTIP:%SMTPPORT/936 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 <precheck>
 chkhostname curlhost
@@ -58,7 +58,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 936

+EHLO %TESTNUMBER

 AUTH NTLM

 TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

 *

diff --git a/tests/data/test937 b/tests/data/test937
index 5e729e3..c2a195a 100644
--- a/tests/data/test937
+++ b/tests/data/test937
@@ -41,7 +41,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/937 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 937

+EHLO %TESTNUMBER

 AUTH DIGEST-MD5

 *

 AUTH PLAIN

diff --git a/tests/data/test938 b/tests/data/test938
index 7931d0a..ec19998 100644
--- a/tests/data/test938
+++ b/tests/data/test938
@@ -30,11 +30,11 @@
  <name>
 SMTP multiple connection authentication
  </name>
-<file name="log/upload938">
+<file name="log/upload%TESTNUMBER">
 mail body

 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/938001 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.one:secret -T log/upload938 -: smtp://%HOSTIP:%SMTPPORT/938002 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.two:secret -T log/upload938
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER001 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.one:secret -T log/upload%TESTNUMBER -: smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER002 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user.two:secret -T log/upload%TESTNUMBER
 </command>
 </client>
 
@@ -42,14 +42,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 938001

+EHLO %TESTNUMBER001

 AUTH PLAIN

 dXNlci5vbmUAdXNlci5vbmUAc2VjcmV0

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

 QUIT

-EHLO 938002

+EHLO %TESTNUMBER002

 AUTH PLAIN

 dXNlci50d28AdXNlci50d28Ac2VjcmV0

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test939 b/tests/data/test939
index 34ba8a0..b385798 100644
--- a/tests/data/test939
+++ b/tests/data/test939
@@ -27,7 +27,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/939 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -35,8 +35,8 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 939

-HELO 939

+EHLO %TESTNUMBER

+HELO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test94 b/tests/data/test94
index 6d54e78..87b65d1 100644
--- a/tests/data/test94
+++ b/tests/data/test94
@@ -35,7 +35,7 @@
 HTTPS GET with failed proxy auth (CONNECT 1.0)
  </name>
  <command>
-https://test.anything.really.com:94 --proxy1.0 %HOSTIP:%HTTPPORT
+https://test.anything.really.com:%TESTNUMBER --proxy1.0 %HOSTIP:%HTTPPORT
 </command>
 </client>
 
@@ -46,8 +46,8 @@
 56
 </errorcode>
 <protocol>
-CONNECT test.anything.really.com:94 HTTP/1.0

-Host: test.anything.really.com:94

+CONNECT test.anything.really.com:%TESTNUMBER HTTP/1.0

+Host: test.anything.really.com:%TESTNUMBER

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

diff --git a/tests/data/test940 b/tests/data/test940
index 4dfb72c..baa0c98 100644
--- a/tests/data/test940
+++ b/tests/data/test940
@@ -23,7 +23,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/940 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user:secret -T -
 </command>
 </client>
 
@@ -31,7 +31,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 940

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test941 b/tests/data/test941
index fd69b87..f4dc34f 100644
--- a/tests/data/test941
+++ b/tests/data/test941
@@ -20,7 +20,7 @@
  <name>
 SMTP with --crlf
  </name>
-<file name="log/upload941">
+<file name="log/upload%TESTNUMBER">
 From: different
 To: another
 
@@ -34,7 +34,7 @@
 --crlf option
 </file>
  <command>
-smtp://%HOSTIP:%SMTPPORT/941 --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/upload941 --crlf
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T log/upload%TESTNUMBER --crlf
 </command>
 </client>
 
@@ -42,7 +42,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 941

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test942 b/tests/data/test942
index 26740f7..ae30a9c 100644
--- a/tests/data/test942
+++ b/tests/data/test942
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/942' --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/%TESTNUMBER' --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 942

+EHLO %TESTNUMBER

 AUTH EXTERNAL

 dXNlcg==

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test943 b/tests/data/test943
index aef2c62..4f403cd 100644
--- a/tests/data/test943
+++ b/tests/data/test943
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/943' --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/%TESTNUMBER' --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 943

+EHLO %TESTNUMBER

 AUTH EXTERNAL

 =

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test944 b/tests/data/test944
index 4b60f12..0539a8a 100644
--- a/tests/data/test944
+++ b/tests/data/test944
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/944' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T -
+'smtp://user;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/%TESTNUMBER' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 944

+EHLO %TESTNUMBER

 AUTH EXTERNAL dXNlcg==

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

diff --git a/tests/data/test945 b/tests/data/test945
index 3526408..5a3fb49 100644
--- a/tests/data/test945
+++ b/tests/data/test945
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/945' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T -
+'smtp://;AUTH=EXTERNAL@%HOSTIP:%SMTPPORT/%TESTNUMBER' --mail-rcpt recipient@example.com --mail-from sender@example.com --sasl-ir -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 945

+EHLO %TESTNUMBER

 AUTH EXTERNAL =

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

diff --git a/tests/data/test946 b/tests/data/test946
index aa88364..ea65693 100644
--- a/tests/data/test946
+++ b/tests/data/test946
@@ -33,7 +33,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/946 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 946

+EHLO %TESTNUMBER

 AUTH OAUTHBEARER

 %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test947 b/tests/data/test947
index d2622be..290da71 100644
--- a/tests/data/test947
+++ b/tests/data/test947
@@ -33,7 +33,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/947 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 947

+EHLO %TESTNUMBER

 AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

diff --git a/tests/data/test948 b/tests/data/test948
index a6eadf5..59a492f 100644
--- a/tests/data/test948
+++ b/tests/data/test948
@@ -34,7 +34,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/948 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 # The multi interface considers a broken "CONNECT" as a prematurely broken
 # transfer and such a connection will not get a "QUIT"
 <protocol>
-EHLO 948

+EHLO %TESTNUMBER

 AUTH OAUTHBEARER

 %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

 AQ==

diff --git a/tests/data/test949 b/tests/data/test949
index 82064f1..0c90074 100644
--- a/tests/data/test949
+++ b/tests/data/test949
@@ -34,7 +34,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/949 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 # The multi interface considers a broken "CONNECT" as a prematurely broken
 # transfer and such a connection will not get a "QUIT"
 <protocol>
-EHLO 949

+EHLO %TESTNUMBER

 AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%

 AQ==

 </protocol>
diff --git a/tests/data/test95 b/tests/data/test95
index 0b16c3c..bc82f16 100644
--- a/tests/data/test95
+++ b/tests/data/test95
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -29,7 +29,7 @@
 HTTP/1.1 200 Mighty fine indeed

 

 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake swsclose
 Content-Type: text/html
 Funny-head: yesyes
@@ -50,7 +50,7 @@
 HTTP over proxytunnel using POST
  </name>
  <command>
-http://test.95:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
+http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
 </command>
 <features>
 proxy
@@ -61,15 +61,15 @@
 # Verify data after the test has been "shot"
 <verify>
 <proxy>
-CONNECT test.95:%HTTPPORT HTTP/1.1

-Host: test.95:%HTTPPORT

+CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Proxy-Connection: Keep-Alive

 

 </proxy>
 <protocol nonewline="yes">
-POST /we/want/that/page/95 HTTP/1.1

-Host: test.95:%HTTPPORT

+POST /we/want/that/page/%TESTNUMBER HTTP/1.1

+Host: test.%TESTNUMBER:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 Content-Length: 27

diff --git a/tests/data/test950 b/tests/data/test950
index 295f8b8..3198ab2 100644
--- a/tests/data/test950
+++ b/tests/data/test950
@@ -27,7 +27,7 @@
 
 # the custom request just does it lowercase to remain the same command
 <command>
-smtp://%HOSTIP:%SMTPPORT/950 --mail-rcpt recipient --request "vrfy"
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient --request "vrfy"
 </command>
 </client>
 
@@ -35,7 +35,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 950

+EHLO %TESTNUMBER

 vrfy recipient

 QUIT

 </protocol>
diff --git a/tests/data/test951 b/tests/data/test951
index 7d2e17b..3a3626f 100644
--- a/tests/data/test951
+++ b/tests/data/test951
@@ -23,7 +23,7 @@
 .This first line starts with a dot

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/951 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -31,7 +31,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 951

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test952 b/tests/data/test952
index 54334b2..39b9f76 100644
--- a/tests/data/test952
+++ b/tests/data/test952
@@ -23,7 +23,7 @@
 .

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/952 --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -31,7 +31,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 952

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test953 b/tests/data/test953
index 4a70e1f..e4d0328 100644
--- a/tests/data/test953
+++ b/tests/data/test953
@@ -32,7 +32,7 @@
 mail body

 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/953 --mail-rcpt recipient@example.com --mail-from sender@example.com -u kurt:xipj3plmq --sasl-authzid ursel -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u kurt:xipj3plmq --sasl-authzid ursel -T -
 </command>
 </client>
 
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 953

+EHLO %TESTNUMBER

 AUTH PLAIN

 dXJzZWwAa3VydAB4aXBqM3BsbXE=

 MAIL FROM:<sender@example.com>

diff --git a/tests/data/test954 b/tests/data/test954
index a5e6bb0..fa2d591 100644
--- a/tests/data/test954
+++ b/tests/data/test954
@@ -5,7 +5,7 @@
 SASL
 SASL AUTH PLAIN
 RFC4616
-RFC4954
+RFC4%TESTNUMBER
 </keywords>
 </info>
 
@@ -32,7 +32,7 @@
 mail body
 </stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/954 --mail-rcpt recipient@example.com --mail-from sender@example.com -u kurt:xipj3plmq --sasl-authzid ursel -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u kurt:xipj3plmq --sasl-authzid ursel -T -
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 # The multi interface considers a broken "CONNECT" as a prematurely broken
 # transfer and such a connection will not get a "QUIT"
 <protocol>
-EHLO 954

+EHLO %TESTNUMBER

 AUTH PLAIN

 dXJzZWwAa3VydAB4aXBqM3BsbXE=

 </protocol>
diff --git a/tests/data/test955 b/tests/data/test955
index 97ef295..6525baa 100644
--- a/tests/data/test955
+++ b/tests/data/test955
@@ -39,7 +39,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/955 --mail-rcpt recipient@example.com --mail-from Avsändaren@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from Avsändaren@example.com -T -
 </command>
 </client>
 
@@ -51,7 +51,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 955

+EHLO %TESTNUMBER

 MAIL FROM:<Avsändaren@example.com>

 QUIT

 </protocol>
diff --git a/tests/data/test956 b/tests/data/test956
index 7fc9bc9..52d2454 100644
--- a/tests/data/test956
+++ b/tests/data/test956
@@ -36,7 +36,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/956 --mail-rcpt Stödmottagaren@example.com --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Stödmottagaren@example.com --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -48,7 +48,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 956

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<Stödmottagaren@example.com>

 QUIT

diff --git a/tests/data/test957 b/tests/data/test957
index 28c9c47..5859f92 100644
--- a/tests/data/test957
+++ b/tests/data/test957
@@ -31,7 +31,7 @@
 SMTP VRFY without SMTPUTF8 support - UTF-8 based recipient (local part only)
  </name>
 <command>
-smtp://%HOSTIP:%SMTPPORT/957 --mail-rcpt Användaren
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Användaren
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 56
 </errorcode>
 <protocol>
-EHLO 957

+EHLO %TESTNUMBER

 VRFY Användaren

 QUIT

 </protocol>
diff --git a/tests/data/test958 b/tests/data/test958
index 66ba414..ce3de33 100644
--- a/tests/data/test958
+++ b/tests/data/test958
@@ -31,7 +31,7 @@
 SMTP external VRFY without SMTPUTF8 support - UTF-8 based recipient (local part only)
  </name>
 <command>
-smtp://%HOSTIP:%SMTPPORT/958 --mail-rcpt Användaren@example.com
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Användaren@example.com
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 56
 </errorcode>
 <protocol>
-EHLO 958

+EHLO %TESTNUMBER

 VRFY Användaren@example.com

 QUIT

 </protocol>
diff --git a/tests/data/test959 b/tests/data/test959
index 1b2d658..8bebe40 100644
--- a/tests/data/test959
+++ b/tests/data/test959
@@ -40,7 +40,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/959 --mail-rcpt recipient@example.com --mail-from sender@åäö.se -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@åäö.se -T -
 </command>
 </client>
 
@@ -52,7 +52,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 959

+EHLO %TESTNUMBER

 MAIL FROM:<sender@åäö.se>

 QUIT

 </protocol>
diff --git a/tests/data/test960 b/tests/data/test960
index 32834cd..68d8eda 100644
--- a/tests/data/test960
+++ b/tests/data/test960
@@ -37,7 +37,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/960 --mail-rcpt recipient@åäö.se --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@åäö.se --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 55
 </errorcode>
 <protocol>
-EHLO 960

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@åäö.se>

 QUIT

diff --git a/tests/data/test961 b/tests/data/test961
index 2148a0c..02e2653 100644
--- a/tests/data/test961
+++ b/tests/data/test961
@@ -32,7 +32,7 @@
 SMTP external VRFY without SMTPUTF8 support - UTF-8 based recipient (host part only)
  </name>
 <command>
-smtp://%HOSTIP:%SMTPPORT/961 --mail-rcpt user@åäö.se
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt user@åäö.se
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 56
 </errorcode>
 <protocol>
-EHLO 961

+EHLO %TESTNUMBER

 VRFY user@åäö.se

 QUIT

 </protocol>
diff --git a/tests/data/test962 b/tests/data/test962
index 35b368c..0977ab3 100644
--- a/tests/data/test962
+++ b/tests/data/test962
@@ -38,7 +38,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/962 --mail-rcpt recipient@example.com --mail-from sender@åäö.se -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@åäö.se -T -
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 962

+EHLO %TESTNUMBER

 MAIL FROM:<sender@xn--4cab6c.se>

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test963 b/tests/data/test963
index 7ea1215..22b252a 100644
--- a/tests/data/test963
+++ b/tests/data/test963
@@ -38,7 +38,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/963 --mail-rcpt recipient@åäö.se --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@åäö.se --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -46,7 +46,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 963

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com>

 RCPT TO:<recipient@xn--4cab6c.se>

 DATA

diff --git a/tests/data/test964 b/tests/data/test964
index 5448d0f..7901e0a 100644
--- a/tests/data/test964
+++ b/tests/data/test964
@@ -33,7 +33,7 @@
 SMTP external VRFY without SMTPUTF8 support (IDN Enabled) - UTF-8 based recipient (host part only)
  </name>
 <command>
-smtp://%HOSTIP:%SMTPPORT/964 --mail-rcpt user@åäö.se
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt user@åäö.se
 </command>
 </client>
 
@@ -41,7 +41,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 964

+EHLO %TESTNUMBER

 VRFY user@xn--4cab6c.se

 QUIT

 </protocol>
diff --git a/tests/data/test965 b/tests/data/test965
index 8c93bc0..ada2d8e 100644
--- a/tests/data/test965
+++ b/tests/data/test965
@@ -41,7 +41,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/965 --mail-rcpt recipient@example.com --mail-from Avsändaren@åäö.se -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from Avsändaren@åäö.se -T -
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 965

+EHLO %TESTNUMBER

 MAIL FROM:<Avsändaren@xn--4cab6c.se> SMTPUTF8

 RCPT TO:<recipient@example.com>

 DATA

diff --git a/tests/data/test966 b/tests/data/test966
index 499fdda..d2eb7c1 100644
--- a/tests/data/test966
+++ b/tests/data/test966
@@ -41,7 +41,7 @@
 body

 </stdin>
 <command>
-smtp://%HOSTIP:%SMTPPORT/966 --mail-rcpt Stödmottagaren@åäö.se --mail-from sender@example.com -T -
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Stödmottagaren@åäö.se --mail-from sender@example.com -T -
 </command>
 </client>
 
@@ -49,7 +49,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 966

+EHLO %TESTNUMBER

 MAIL FROM:<sender@example.com> SMTPUTF8

 RCPT TO:<Stödmottagaren@xn--4cab6c.se>

 DATA

diff --git a/tests/data/test967 b/tests/data/test967
index 2813f50..87a37ae 100644
--- a/tests/data/test967
+++ b/tests/data/test967
@@ -39,7 +39,7 @@
 SMTP external VRFY with SMTPUTF8 support
  </name>
 <command>
-smtp://%HOSTIP:%SMTPPORT/967 --mail-rcpt Användaren@åäö.se
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Användaren@åäö.se
 </command>
 </client>
 
@@ -47,7 +47,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 967

+EHLO %TESTNUMBER

 VRFY Användaren@xn--4cab6c.se SMTPUTF8

 QUIT

 </protocol>
diff --git a/tests/data/test968 b/tests/data/test968
index ca58970..89b543a 100644
--- a/tests/data/test968
+++ b/tests/data/test968
@@ -36,7 +36,7 @@
 SMTP VRFY with SMTPUTF8 support
  </name>
 <command>
-smtp://%HOSTIP:%SMTPPORT/968 --mail-rcpt Användaren
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Användaren
 </command>
 </client>
 
@@ -44,7 +44,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 968

+EHLO %TESTNUMBER

 VRFY Användaren SMTPUTF8

 QUIT

 </protocol>
diff --git a/tests/data/test969 b/tests/data/test969
index 9d3fa93..860c9d4 100644
--- a/tests/data/test969
+++ b/tests/data/test969
@@ -35,7 +35,7 @@
 SMTP mailing list EXPN (CUSTOMREQUEST) with SMTPUTF8 support
  </name>
  <command>
-smtp://%HOSTIP:%SMTPPORT/969 --mail-rcpt Friends -X EXPN
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt Friends -X EXPN
 </command>
 </client>
 
@@ -43,7 +43,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO 969

+EHLO %TESTNUMBER

 EXPN Friends SMTPUTF8

 QUIT

 </protocol>
diff --git a/tests/data/test97 b/tests/data/test97
index d769411..db36eeb 100644
--- a/tests/data/test97
+++ b/tests/data/test97
@@ -29,7 +29,7 @@
 HTTP POST with custom content-type
  </name>
  <command>
- -d "hejsanallabarn" -H "Content-Type: silly/type" http://%HOSTIP:%HTTPPORT/97
+ -d "hejsanallabarn" -H "Content-Type: silly/type" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 </client>
 
@@ -37,7 +37,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol nonewline="yes">
-POST /97 HTTP/1.1

+POST /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test970 b/tests/data/test970
index ab1fc53..ee0a3e9 100644
--- a/tests/data/test970
+++ b/tests/data/test970
@@ -11,7 +11,7 @@
 <reply>
 <data nocheck="yes">
 HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
 ETag: "21025-dc7-39462498"
@@ -44,7 +44,7 @@
 HTTP GET with JSON output
 </name>
 <command option="no-include">
-http://%HOSTIP:%HTTPPORT/970 --write-out '%{json}' -o log/out970
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER --write-out '%{json}' -o log/out%TESTNUMBER
 </command>
 </client>
 
@@ -52,14 +52,14 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-GET /970 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

 

 </protocol>
 <stdout nonewline="yes">
-{"url_effective":"http://%HOSTIP:%HTTPPORT/970","method":"GET","http_code":200,"response_code":200,"num_headers":9,"http_connect":0,"time_total":0.000013,"time_namelookup":0.000013,"time_connect":0.000013,"time_appconnect":0.000013,"time_pretransfer":0.000013,"time_starttransfer":0.000013,"size_header":4019,"size_request":4019,"size_download":445,"size_upload":0,"speed_download":13,"speed_upload":13,"content_type":"text/html","num_connects":1,"time_redirect":0.000013,"num_redirects":0,"ssl_verify_result":0,"proxy_ssl_verify_result":0,"filename_effective":"log/out970","remote_ip":"%HOSTIP","remote_port":%HTTPPORT,"local_ip":"127.0.0.1","local_port":13,"http_version":"1.1","scheme":"HTTP","curl_version":"curl-unit-test-fake-version"}
+{"content_type":"text/html","errormsg":null,"exitcode":0,"filename_effective":"log/out%TESTNUMBER","ftp_entry_path":null,"http_code":200,"http_connect":0,"http_version":"1.1","local_ip":"127.0.0.1","local_port":13,"method":"GET","num_connects":1,"num_headers":9,"num_redirects":0,"proxy_ssl_verify_result":0,"redirect_url":null,"referer":null,"remote_ip":"%HOSTIP","remote_port":%HTTPPORT,"response_code":200,"scheme":"HTTP","size_download":445,"size_header":4019,"size_request":4019,"size_upload":0,"speed_download":13,"speed_upload":13,"ssl_verify_result":0,"time_appconnect":0.000013,"time_connect":0.000013,"time_namelookup":0.000013,"time_pretransfer":0.000013,"time_redirect":0.000013,"time_starttransfer":0.000013,"time_total":0.000013,"url":"http://%HOSTIP:%HTTPPORT/%TESTNUMBER","url_effective":"http://%HOSTIP:%HTTPPORT/%TESTNUMBER","urlnum":0,"curl_version":"curl-unit-test-fake-version"}
 </stdout>
 </verify>
 </testcase>
diff --git a/tests/data/test972 b/tests/data/test972
new file mode 100644
index 0000000..971f1fa
--- /dev/null
+++ b/tests/data/test972
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 445
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<precheck>
+/usr/bin/which jsonlint-php >log/%TESTNUMBER-check
+</precheck>
+<server>
+http
+</server>
+<features>
+debug
+proxy
+</features>
+<setenv>
+CURL_TIME=13
+CURL_DEBUG_SIZE=4019
+CURL_VERSION=curl-unit-test-fake-version
+</setenv>
+<name>
+Verify JSON output
+</name>
+<command option="no-include">
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -s --write-out '%{json}' -o log/out972 | jsonlint-php -q
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /%TESTNUMBER HTTP/1.1

+Host: %HOSTIP:%HTTPPORT

+User-Agent: curl/%VERSION

+Accept: */*

+

+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test98 b/tests/data/test98
index ef0cded..1d89c34 100644
--- a/tests/data/test98
+++ b/tests/data/test98
@@ -29,7 +29,7 @@
 HTTP PUT from stdin with set size, disabling chunked transfer-encoding
  </name>
  <command>
- -T - -H "Transfer-Encoding:" -H "Content-Length: 14" http://%HOSTIP:%HTTPPORT/98
+ -T - -H "Transfer-Encoding:" -H "Content-Length: 14" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
 <stdin>
 data on stdin
@@ -40,7 +40,7 @@
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-PUT /98 HTTP/1.1

+PUT /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 User-Agent: curl/%VERSION

 Accept: */*

diff --git a/tests/data/test99 b/tests/data/test99
index 2bbee78..1ed74b0 100644
--- a/tests/data/test99
+++ b/tests/data/test99
@@ -13,7 +13,7 @@
 <reply>
 <data>
 HTTP/1.1 404 Nah
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 Content-Length: 13
 Funny-head: yesyes
@@ -23,7 +23,7 @@
 
 <datacheck>
 HTTP/1.1 404 Nah
-Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Tue, 09 Nov 2010 14:49:00 GMT
 Connection: close
 Content-Length: 13
 Funny-head: yesyes
@@ -44,7 +44,7 @@
 HTTP GET with large-file resume point and failed resume
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/99 -C 9999999999
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 9999999999
 </command>
 </client>
 
@@ -56,7 +56,7 @@
 33
 </errorcode>
 <protocol>
-GET /99 HTTP/1.1

+GET /%TESTNUMBER HTTP/1.1

 Host: %HOSTIP:%HTTPPORT

 Range: bytes=9999999999-

 User-Agent: curl/%VERSION

diff --git a/tests/dictserver.py b/tests/dictserver.py
index 5641692..1874328 100755
--- a/tests/dictserver.py
+++ b/tests/dictserver.py
@@ -11,7 +11,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -26,16 +26,19 @@
 
 from __future__ import (absolute_import, division, print_function,
                         unicode_literals)
+
 import argparse
+import logging
 import os
 import sys
-import logging
+
+from util import ClosingFileHandler
+
 try:  # Python 2
     import SocketServer as socketserver
 except ImportError:  # Python 3
     import socketserver
 
-
 log = logging.getLogger(__name__)
 HOST = "localhost"
 
@@ -138,7 +141,7 @@
 
     # Write out to a logfile
     if options.logfile:
-        handler = logging.FileHandler(options.logfile, mode="w")
+        handler = ClosingFileHandler(options.logfile)
         handler.setFormatter(formatter)
         handler.setLevel(logging.DEBUG)
         root_logger.addHandler(handler)
diff --git a/tests/directories.pm b/tests/directories.pm
index da6c767..a55d818 100644
--- a/tests/directories.pm
+++ b/tests/directories.pm
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/disable-scan.pl b/tests/disable-scan.pl
index 45373ca..65f5b03 100755
--- a/tests/disable-scan.pl
+++ b/tests/disable-scan.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010-2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -36,8 +36,9 @@
 my $root=$ARGV[0] || ".";
 my $DOCS="CURL-DISABLE.md";
 
-sub scan_configure {
-    open S, "<$root/configure.ac";
+sub scanconf {
+    my ($f)=@_;
+    open S, "<$f";
     while(<S>) {
         if(/(CURL_DISABLE_[A-Z_]+)/g) {
             my ($sym)=($1);
@@ -47,6 +48,17 @@
     close S;
 }
 
+sub scan_configure {
+    opendir(my $m, "$root/m4") || die "Can't opendir $root/m4: $!";
+    my @m4 = grep { /\.m4$/ } readdir($m);
+    closedir $m;
+    scanconf("$root/configure.ac");
+    # scan all m4 files too
+    for my $e (@m4) {
+        scanconf("$root/m4/$e");
+    }
+}
+
 sub scan_file {
     my ($source)=@_;
     open F, "<$source";
@@ -62,7 +74,7 @@
 sub scan_dir {
     my ($dir)=@_;
     opendir(my $dh, $dir) || die "Can't opendir $dir: $!";
-    my @cfiles = grep { /\.c\z/ && -f "$dir/$_" } readdir($dh);
+    my @cfiles = grep { /\.[ch]\z/ && -f "$dir/$_" } readdir($dh);
     closedir $dh;
     for my $f (sort @cfiles) {
         scan_file("$dir/$f");
diff --git a/tests/error-codes.pl b/tests/error-codes.pl
index 0d555f6..e626f7c 100644
--- a/tests/error-codes.pl
+++ b/tests/error-codes.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010-2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/extern-scan.pl b/tests/extern-scan.pl
index 8956d4b..4eaff3a 100755
--- a/tests/extern-scan.pl
+++ b/tests/extern-scan.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/ftp.pm b/tests/ftp.pm
index 971be19..50c82b8 100644
--- a/tests/ftp.pm
+++ b/tests/ftp.pm
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 198ccd7..a381950 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -643,6 +643,7 @@
             'STATUS'     => \&STATUS_imap,
             'STORE'      => \&STORE_imap,
             'UID'        => \&UID_imap,
+            'IDLE'       => \&IDLE_imap,
         );
         %displaytext = (
             'welcome' => join("",
@@ -1587,6 +1588,13 @@
     return 0;
 }
 
+sub IDLE_imap {
+    logmsg "IDLE received\n";
+
+    sendcontrol "+ entering idle mode\r\n";
+    return 0;
+}
+
 sub UID_imap {
     my ($args) = @_;
     my ($command) = split(/ /, $args, 1);
@@ -2092,8 +2100,7 @@
     logmsg "pass LIST data on data connection\n";
 
     if($cwd_testno) {
-        loadtest("$logdir/test$cwd_testno") ||
-            loadtest("$srcdir/data/test$cwd_testno");
+        loadtest("$logdir/test$cwd_testno");
 
         my @data = getpart("reply", "data");
         for(@data) {
@@ -2156,8 +2163,7 @@
         $testno = int($testno / 10000);
     }
 
-    loadtest("$logdir/test$testno") ||
-        loadtest("$srcdir/data/test$testno");
+    loadtest("$logdir/test$testno");
 
     my @data = getpart("reply", "mdtm");
 
@@ -2210,9 +2216,7 @@
         $testno = int($testno / 10000);
     }
 
-    loadtest("$logdir/test$testno") ||
-        loadtest("$srcdir/data/test$testno");
-
+    loadtest("$logdir/test$testno");
     my @data = getpart("reply", "size");
 
     my $size = $data[0];
@@ -2300,8 +2304,7 @@
         $testno = int($testno / 10000);
     }
 
-    loadtest("$logdir/test$testno") ||
-        loadtest("$srcdir/data/test$testno");
+    loadtest("$logdir/test$testno");
 
     my @data = getpart("reply", "data$testpart");
 
@@ -3090,8 +3093,7 @@
     $| = 1;
 
     &customize(); # read test control instructions
-    loadtest("$logdir/test$testno") ||
-        loadtest("$srcdir/data/test$testno");
+    loadtest("$logdir/test$testno");
 
     my $welcome = $commandreply{"welcome"};
     if(!$welcome) {
diff --git a/tests/getpart.pm b/tests/getpart.pm
index 2162129..348bdd4 100644
--- a/tests/getpart.pm
+++ b/tests/getpart.pm
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -313,6 +313,7 @@
         my $l = $_;
         $l =~ s/\r/[CR]/g;
         $l =~ s/\n/[LF]/g;
+        $l =~ s/([^\x20-\x7f])/sprintf "%%%02x", ord $1/eg;
         print TEMP $l;
         print TEMP "\n";
     }
@@ -323,6 +324,7 @@
         my $l = $_;
         $l =~ s/\r/[CR]/g;
         $l =~ s/\n/[LF]/g;
+        $l =~ s/([^\x20-\x7f])/sprintf "%%%02x", ord $1/eg;
         print TEMP $l;
         print TEMP "\n";
     }
diff --git a/tests/http2-server.pl b/tests/http2-server.pl
index 4dbb0d8..9708c89 100755
--- a/tests/http2-server.pl
+++ b/tests/http2-server.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/httpserver.pl b/tests/httpserver.pl
index 58ab5d4..fbdb675 100755
--- a/tests/httpserver.pl
+++ b/tests/httpserver.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/.checksrc b/tests/libtest/.checksrc
new file mode 100644
index 0000000..37f7909
--- /dev/null
+++ b/tests/libtest/.checksrc
@@ -0,0 +1,2 @@
+disable TYPEDEFSTRUCT
+disable BANNEDFUNC
diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt
index cc38a97..6d5bd6a 100644
--- a/tests/libtest/CMakeLists.txt
+++ b/tests/libtest/CMakeLists.txt
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 7f68aba..82c3ade 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -44,8 +44,8 @@
               -I$(top_srcdir)/lib
 endif
 
-EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl \
-  test1022.pl Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl
+EXTRA_DIST = test307.pl test610.pl test613.pl test1013.pl test1022.pl   \
+  Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl .checksrc
 
 CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 98fd2ee..c2d0a6e 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -44,10 +44,11 @@
  lib547 lib548 lib549 lib552 lib553 lib554 lib555 lib556 lib557 lib558   \
  lib559 lib560 lib562 lib564 lib565 lib566 lib567 lib568 lib569 lib570   \
  lib571 lib572 lib573 lib574 lib575 lib576        lib578 lib579 lib582   \
- lib583 lib585 lib586 lib587 lib589 lib590 lib591 lib597 lib598 lib599   \
- lib643 lib644 lib645 lib650 lib651 lib652 lib653 lib654 lib655 lib658   \
+ lib583 lib584 lib585 lib586 lib587 lib589 lib590 lib591 lib597 lib598   \
+ lib599 \
+ lib643        lib645 lib650 lib651 lib652 lib653 lib654 lib655 lib658   \
  lib659 lib661 lib666 lib667 lib668 \
- lib670 lib671 lib672 lib673 lib674 \
+ lib670 lib671 lib672 lib673 lib674 lib676 lib677 lib678 \
  lib1156 \
  lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \
  lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515         lib1517 \
@@ -56,9 +57,10 @@
  lib1534 lib1535 lib1536 lib1537 lib1538 lib1539 \
  lib1540         \
  lib1550 lib1551 lib1552 lib1553 lib1554 lib1555 lib1556 lib1557 \
- lib1558 lib1559 lib1560 lib1564 lib1565 lib1567 \
+ lib1558 lib1559 lib1560 lib1564 lib1565 lib1567 lib1568 lib1569 \
  lib1591 lib1592 lib1593 lib1594 lib1596 \
          lib1905 lib1906 lib1907 lib1908 lib1910 lib1911 lib1912 lib1913 \
+         lib1915 lib1916 lib1917 lib1918 lib1933 lib1934 lib1935 lib1936 \
          lib3010
 
 chkdecimalpoint_SOURCES = chkdecimalpoint.c ../../lib/mprintf.c \
@@ -301,6 +303,9 @@
 lib583_SOURCES = lib583.c $(SUPPORTFILES)
 lib583_CPPFLAGS = $(AM_CPPFLAGS)
 
+lib584_SOURCES = lib589.c $(SUPPORTFILES)
+lib584_CPPFLAGS = $(AM_CPPFLAGS) -DLIB584
+
 lib585_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) $(MULTIBYTE)
 lib585_LDADD = $(TESTUTIL_LIBS)
 lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
@@ -334,9 +339,6 @@
 lib643_SOURCES = lib643.c $(SUPPORTFILES)
 lib643_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib644_SOURCES = lib643.c $(SUPPORTFILES)
-lib644_CPPFLAGS = $(AM_CPPFLAGS) -DLIB644
-
 lib645_SOURCES = lib643.c $(SUPPORTFILES)
 lib645_CPPFLAGS = $(AM_CPPFLAGS) -DLIB645
 
@@ -400,6 +402,18 @@
 lib674_LDADD = $(TESTUTIL_LIBS)
 lib674_CPPFLAGS = $(AM_CPPFLAGS)
 
+lib676_SOURCES = lib676.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib676_LDADD = $(TESTUTIL_LIBS)
+lib676_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib677_SOURCES = lib677.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE)
+lib677_LDADD = $(TESTUTIL_LIBS)
+lib677_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib678_SOURCES = lib678.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(MULTIBYTE)
+lib678_LDADD = $(TESTUTIL_LIBS)
+lib678_CPPFLAGS = $(AM_CPPFLAGS)
+
 lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL)
 lib1500_LDADD = $(TESTUTIL_LIBS)
 lib1500_CPPFLAGS = $(AM_CPPFLAGS)
@@ -480,7 +494,8 @@
 nodist_lib1521_SOURCES = lib1521.c $(SUPPORTFILES)
 lib1521_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)
 
-lib1522_SOURCES = lib1522.c $(SUPPORTFILES)
+lib1522_SOURCES = lib1522.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE) 
+lib1522_LDADD = $(TESTUTIL_LIBS)
 lib1522_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib1523_SOURCES = lib1523.c $(SUPPORTFILES)
@@ -599,6 +614,12 @@
 lib1567_SOURCES = lib1567.c $(SUPPORTFILES)
 lib1567_CPPFLAGS = $(AM_CPPFLAGS)
 
+lib1568_SOURCES = lib1568.c $(SUPPORTFILES)
+lib1568_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1569_SOURCES = lib1569.c $(SUPPORTFILES)
+lib1569_CPPFLAGS = $(AM_CPPFLAGS)
+
 lib1591_SOURCES = lib1591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
 lib1591_LDADD = $(TESTUTIL_LIBS)
 lib1591_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1591
@@ -649,6 +670,35 @@
 lib1913_LDADD = $(TESTUTIL_LIBS)
 lib1913_CPPFLAGS = $(AM_CPPFLAGS)
 
+lib1915_SOURCES = lib1915.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1915_LDADD = $(TESTUTIL_LIBS)
+lib1915_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1916_SOURCES = lib1916.c $(SUPPORTFILES) $(WARNLESS)
+lib1916_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1917_SOURCES = lib1916.c $(SUPPORTFILES) $(WARNLESS)
+lib1917_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1917
+
+lib1918_SOURCES = lib1918.c $(SUPPORTFILES) $(WARNLESS)
+lib1918_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1933_SOURCES = lib1933.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1933_LDADD = $(TESTUTIL_LIBS)
+lib1933_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1934_SOURCES = lib1934.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1934_LDADD = $(TESTUTIL_LIBS)
+lib1934_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1935_SOURCES = lib1935.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1935_LDADD = $(TESTUTIL_LIBS)
+lib1935_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1936_SOURCES = lib1936.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1936_LDADD = $(TESTUTIL_LIBS)
+lib1936_CPPFLAGS = $(AM_CPPFLAGS)
+
 lib3010_SOURCES = lib3010.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
 lib3010_LDADD = $(TESTUTIL_LIBS)
 lib3010_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/libtest/chkdecimalpoint.c b/tests/libtest/chkdecimalpoint.c
index 7bb7715..4ab98cf 100644
--- a/tests/libtest/chkdecimalpoint.c
+++ b/tests/libtest/chkdecimalpoint.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/chkhostname.c b/tests/libtest/chkhostname.c
index 79e382b..d36e837 100644
--- a/tests/libtest/chkhostname.c
+++ b/tests/libtest/chkhostname.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 2731ef8..ffb211f 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -146,7 +146,7 @@
 
   /*
    * Setup proper locale from environment. This is needed to enable locale-
-   * specific behaviour by the C library in order to test for undesired side
+   * specific behavior by the C library in order to test for undesired side
    * effects that could cause in libcurl.
    */
 #ifdef HAVE_SETLOCALE
diff --git a/tests/libtest/lib1156.c b/tests/libtest/lib1156.c
index ff94d9c..d8da643 100644
--- a/tests/libtest/lib1156.c
+++ b/tests/libtest/lib1156.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -64,8 +64,7 @@
   { F_RESUME |             F_FAIL | F_CONTENTRANGE,                CURLE_OK },
   { F_RESUME | F_HTTP416 |                           F_IGNOREBODY, CURLE_OK },
   { F_RESUME | F_HTTP416 |          F_CONTENTRANGE | F_IGNOREBODY, CURLE_OK },
-  { F_RESUME | F_HTTP416 | F_FAIL |                  F_IGNOREBODY,
-                                                  CURLE_HTTP_RETURNED_ERROR },
+  { F_RESUME | F_HTTP416 | F_FAIL |                  F_IGNOREBODY, CURLE_OK },
   { F_RESUME | F_HTTP416 | F_FAIL | F_CONTENTRANGE | F_IGNOREBODY,
                                                   CURLE_HTTP_RETURNED_ERROR }
 };
@@ -82,7 +81,8 @@
   return size * nmemb;
 }
 
-static int onetest(CURL *curl, const char *url, const struct testparams *p)
+static int onetest(CURL *curl, const char *url, const struct testparams *p,
+                   size_t num)
 {
   CURLcode res;
   unsigned int replyselector;
@@ -100,22 +100,22 @@
   hasbody = 0;
   res = curl_easy_perform(curl);
   if(res != p->result) {
-    fprintf(stderr, "bad error code (%d): resume=%s, fail=%s, http416=%s, "
-                    "content-range=%s, expected=%d\n", res,
-                    (p->flags & F_RESUME)? "yes": "no",
-                    (p->flags & F_FAIL)? "yes": "no",
-                    (p->flags & F_HTTP416)? "yes": "no",
-                    (p->flags & F_CONTENTRANGE)? "yes": "no",
-                    p->result);
+    fprintf(stderr, "%d: bad error code (%d): resume=%s, fail=%s, http416=%s, "
+            "content-range=%s, expected=%d\n", num, res,
+            (p->flags & F_RESUME)? "yes": "no",
+            (p->flags & F_FAIL)? "yes": "no",
+            (p->flags & F_HTTP416)? "yes": "no",
+            (p->flags & F_CONTENTRANGE)? "yes": "no",
+            p->result);
     return 1;
   }
   if(hasbody && (p->flags & F_IGNOREBODY)) {
     fprintf(stderr, "body should be ignored and is not: resume=%s, fail=%s, "
-                    "http416=%s, content-range=%s\n",
-                    (p->flags & F_RESUME)? "yes": "no",
-                    (p->flags & F_FAIL)? "yes": "no",
-                    (p->flags & F_HTTP416)? "yes": "no",
-                    (p->flags & F_CONTENTRANGE)? "yes": "no");
+            "http416=%s, content-range=%s\n",
+            (p->flags & F_RESUME)? "yes": "no",
+            (p->flags & F_FAIL)? "yes": "no",
+            (p->flags & F_HTTP416)? "yes": "no",
+            (p->flags & F_CONTENTRANGE)? "yes": "no");
     return 1;
   }
   return 0;
@@ -147,10 +147,11 @@
   test_setopt(curl, CURLOPT_WRITEFUNCTION, writedata);
 
   for(i = 0; i < sizeof(params) / sizeof(params[0]); i++)
-    status |= onetest(curl, URL, params + i);
+    status |= onetest(curl, URL, params + i, i);
 
   curl_easy_cleanup(curl);
   curl_global_cleanup();
+  fprintf(stderr, "%d\n", status);
   return status;
 
   test_cleanup:
diff --git a/tests/libtest/lib1500.c b/tests/libtest/lib1500.c
index 73d23a1..ed944a2 100644
--- a/tests/libtest/lib1500.c
+++ b/tests/libtest/lib1500.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c
index 96094d6..a847c70 100644
--- a/tests/libtest/lib1501.c
+++ b/tests/libtest/lib1501.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
index 6bde00a..32d4cb2 100644
--- a/tests/libtest/lib1502.c
+++ b/tests/libtest/lib1502.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -50,6 +50,11 @@
   /* DNS cache injection */
   struct curl_slist *dns_cache_list;
 
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
+    return res;
+  }
+
   msnprintf(redirect, sizeof(redirect), "google.com:%s:%s", libtest_arg2,
             libtest_arg3);
 
@@ -58,15 +63,10 @@
   dns_cache_list = curl_slist_append(NULL, redirect);
   if(!dns_cache_list) {
     fprintf(stderr, "curl_slist_append() failed\n");
+    curl_global_cleanup();
     return TEST_ERR_MAJOR_BAD;
   }
 
-  res_global_init(CURL_GLOBAL_ALL);
-  if(res) {
-    curl_slist_free_all(dns_cache_list);
-    return res;
-  }
-
   easy_init(easy);
 
   easy_setopt(easy, CURLOPT_URL, URL);
@@ -81,6 +81,7 @@
   else {
     curl_slist_free_all(dns_cache_list);
     curl_easy_cleanup(easy);
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
   }
 
diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c
index 1d5e8de..a49e5b4 100644
--- a/tests/libtest/lib1506.c
+++ b/tests/libtest/lib1506.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2013 - 2018, Linus Nielsen Feltzing <linus@haxx.se>
+ * Copyright (C) 2013 - 2020, Linus Nielsen Feltzing <linus@haxx.se>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
index 20cc5f0..dd83fc0 100644
--- a/tests/libtest/lib1507.c
+++ b/tests/libtest/lib1507.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,7 +35,7 @@
 
 #define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   (void)ptr;
   (void)size;
diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c
index 09d24d8..bbd200b 100644
--- a/tests/libtest/lib1508.c
+++ b/tests/libtest/lib1508.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c
index 2bc8c9f..02e84f5 100644
--- a/tests/libtest/lib1509.c
+++ b/tests/libtest/lib1509.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1510.c b/tests/libtest/lib1510.c
index 4c7b670..af01c4d 100644
--- a/tests/libtest/lib1510.c
+++ b/tests/libtest/lib1510.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2013 - 2018, Linus Nielsen Feltzing <linus@haxx.se>
+ * Copyright (C) 2013 - 2020, Linus Nielsen Feltzing <linus@haxx.se>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1511.c b/tests/libtest/lib1511.c
index e1840e7..82cb629 100644
--- a/tests/libtest/lib1511.c
+++ b/tests/libtest/lib1511.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -58,7 +58,7 @@
     goto test_cleanup;
 
   curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
-  if(unmet != 0L) {
+  if(unmet) {
     res = TEST_ERR_FAILURE; /* not correct */
     goto test_cleanup;
   }
diff --git a/tests/libtest/lib1512.c b/tests/libtest/lib1512.c
index 0b71ad3..6879c4d 100644
--- a/tests/libtest/lib1512.c
+++ b/tests/libtest/lib1512.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2013 - 2018, Linus Nielsen Feltzing <linus@haxx.se>
+ * Copyright (C) 2013 - 2020, Linus Nielsen Feltzing <linus@haxx.se>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1513.c b/tests/libtest/lib1513.c
index 932ca72..f75ca08 100644
--- a/tests/libtest/lib1513.c
+++ b/tests/libtest/lib1513.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1514.c b/tests/libtest/lib1514.c
index dd84d10..51302ad 100644
--- a/tests/libtest/lib1514.c
+++ b/tests/libtest/lib1514.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,7 +35,7 @@
   size_t sizeleft;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *pooh = (struct WriteThis *)userp;
 
@@ -43,7 +43,7 @@
     return 0;
 
   if(pooh->sizeleft) {
-    *(char *)ptr = pooh->readptr[0]; /* copy one single byte */
+    *ptr = pooh->readptr[0]; /* copy one single byte */
     pooh->readptr++;                 /* advance pointer */
     pooh->sizeleft--;                /* less data left */
     return 1;                        /* we return 1 byte at a time! */
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
index 4e578a4..4aede60 100644
--- a/tests/libtest/lib1515.c
+++ b/tests/libtest/lib1515.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1517.c b/tests/libtest/lib1517.c
index ea622b0..c3a4986 100644
--- a/tests/libtest/lib1517.c
+++ b/tests/libtest/lib1517.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,7 @@
   size_t sizeleft;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *pooh = (struct WriteThis *)userp;
   size_t tocopy = size * nmemb;
diff --git a/tests/libtest/lib1518.c b/tests/libtest/lib1518.c
index 1751b58..8c46878 100644
--- a/tests/libtest/lib1518.c
+++ b/tests/libtest/lib1518.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -53,11 +53,11 @@
   curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effectiveUrl);
   curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &redirectUrl);
 
-  printf("res: %d\n"
-         "status: %d\n"
-         "redirects: %d\n"
-         "effectiveurl: %s\n"
-         "redirecturl: %s\n",
+  printf("res %d\n"
+         "status %d\n"
+         "redirects %d\n"
+         "effectiveurl %s\n"
+         "redirecturl %s\n",
          (int)res,
          (int)curlResponseCode,
          (int)curlRedirectCount,
diff --git a/tests/libtest/lib1520.c b/tests/libtest/lib1520.c
index 779aeaf..b0ff08a 100644
--- a/tests/libtest/lib1520.c
+++ b/tests/libtest/lib1520.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -47,7 +47,7 @@
   int lines_read;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct upload_status *upload_ctx = (struct upload_status *)userp;
   const char *data;
diff --git a/tests/libtest/lib1522.c b/tests/libtest/lib1522.c
index 6df152f..2532a6c 100644
--- a/tests/libtest/lib1522.c
+++ b/tests/libtest/lib1522.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,6 +23,7 @@
 
 /* test case and code based on https://github.com/curl/curl/issues/2847 */
 
+#include "testtrace.h"
 #include "testutil.h"
 #include "warnless.h"
 #include "memdebug.h"
@@ -49,25 +50,32 @@
 int test(char *URL)
 {
   CURLcode code;
+  CURLcode res;
   struct curl_slist *pHeaderList = NULL;
-  CURL *pCurl = curl_easy_init();
+  CURL *curl = curl_easy_init();
   memset(g_Data, 'A', sizeof(g_Data)); /* send As! */
 
-  curl_easy_setopt(pCurl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
-  curl_easy_setopt(pCurl, CURLOPT_URL, URL);
-  curl_easy_setopt(pCurl, CURLOPT_POSTFIELDS, g_Data);
-  curl_easy_setopt(pCurl, CURLOPT_POSTFIELDSIZE, (long)sizeof(g_Data));
+  curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+  curl_easy_setopt(curl, CURLOPT_URL, URL);
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, g_Data);
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)sizeof(g_Data));
+
+  libtest_debug_config.nohex = 1;
+  libtest_debug_config.tracetime = 1;
+  test_setopt(curl, CURLOPT_DEBUGDATA, &libtest_debug_config);
+  test_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* Remove "Expect: 100-continue" */
   pHeaderList = curl_slist_append(pHeaderList, "Expect:");
 
-  curl_easy_setopt(pCurl, CURLOPT_HTTPHEADER, pHeaderList);
+  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, pHeaderList);
 
-  code = curl_easy_perform(pCurl);
+  code = curl_easy_perform(curl);
 
   if(code == CURLE_OK) {
     curl_off_t uploadSize;
-    curl_easy_getinfo(pCurl, CURLINFO_SIZE_UPLOAD_T, &uploadSize);
+    curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &uploadSize);
 
     printf("uploadSize = %ld\n", (long)uploadSize);
 
@@ -75,15 +83,16 @@
       printf("!!!!!!!!!! PASS\n");
     }
     else {
-      printf("!!!!!!!!!! FAIL\n");
+      printf("sent %d, libcurl says %d\n",
+             (int)sizeof(g_Data), (int)uploadSize);
     }
   }
   else {
     printf("curl_easy_perform() failed. e = %d\n", code);
   }
-
+  test_cleanup:
   curl_slist_free_all(pHeaderList);
-  curl_easy_cleanup(pCurl);
+  curl_easy_cleanup(curl);
   curl_global_cleanup();
 
   return 0;
diff --git a/tests/libtest/lib1523.c b/tests/libtest/lib1523.c
index 170527d..bd45b84 100644
--- a/tests/libtest/lib1523.c
+++ b/tests/libtest/lib1523.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -56,8 +56,10 @@
 int test(char *URL)
 {
   CURLcode ret;
-  CURL *hnd = curl_easy_init();
+  CURL *hnd;
   char buffer[CURL_ERROR_SIZE];
+  curl_global_init(CURL_GLOBAL_ALL);
+  hnd = curl_easy_init();
   curl_easy_setopt(hnd, CURLOPT_URL, URL);
   curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, write_cb);
   curl_easy_setopt(hnd, CURLOPT_ERRORBUFFER, buffer);
@@ -77,6 +79,7 @@
 
   printf("End: %d\n", time(NULL));
   curl_easy_cleanup(hnd);
+  curl_global_cleanup();
 
   return (int)ret;
 }
diff --git a/tests/libtest/lib1525.c b/tests/libtest/lib1525.c
index 551d04e..a2a4db2 100644
--- a/tests/libtest/lib1525.c
+++ b/tests/libtest/lib1525.c
@@ -10,7 +10,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,7 +32,7 @@
 
 static char data [] = "Hello Cloud!\n";
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t  amount = nmemb * size; /* Total bytes curl wants */
   if(amount < strlen(data)) {
diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c
index d94c03c..37abc61 100644
--- a/tests/libtest/lib1526.c
+++ b/tests/libtest/lib1526.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,7 @@
 
 static char data [] = "Hello Cloud!\n";
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t  amount = nmemb * size; /* Total bytes curl wants */
   if(amount < strlen(data)) {
diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c
index c50c2fa..9e0e452 100644
--- a/tests/libtest/lib1527.c
+++ b/tests/libtest/lib1527.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,7 +31,7 @@
 
 static char data [] = "Hello Cloud!\n";
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t  amount = nmemb * size; /* Total bytes curl wants */
   if(amount < strlen(data)) {
diff --git a/tests/libtest/lib1528.c b/tests/libtest/lib1528.c
index a130c49..98a332c 100644
--- a/tests/libtest/lib1528.c
+++ b/tests/libtest/lib1528.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1529.c b/tests/libtest/lib1529.c
index 8d2210e..0063552 100644
--- a/tests/libtest/lib1529.c
+++ b/tests/libtest/lib1529.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1530.c b/tests/libtest/lib1530.c
index 6fc69f2..778dd38 100644
--- a/tests/libtest/lib1530.c
+++ b/tests/libtest/lib1530.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c
index 73b3f0a..6d7ea6a 100644
--- a/tests/libtest/lib1531.c
+++ b/tests/libtest/lib1531.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1532.c b/tests/libtest/lib1532.c
index 4a3ff32..3957321 100644
--- a/tests/libtest/lib1532.c
+++ b/tests/libtest/lib1532.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -66,7 +66,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(httpcode != 0) {
+  if(httpcode) {
     fprintf(stderr, "%s:%d curl_easy_reset failed to zero the response code\n"
             "possible regression of github bug 1017\n", __FILE__, __LINE__);
     res = CURLE_HTTP_RETURNED_ERROR;
diff --git a/tests/libtest/lib1533.c b/tests/libtest/lib1533.c
index 7a4aafc..7d978b1 100644
--- a/tests/libtest/lib1533.c
+++ b/tests/libtest/lib1533.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,7 +48,7 @@
 }
 
 
-static size_t read_callback(void *ptr, size_t size, size_t nitems,
+static size_t read_callback(char *ptr, size_t size, size_t nitems,
                             void *userdata)
 {
   struct cb_data *data = (struct cb_data *)userdata;
@@ -137,7 +137,7 @@
   }
 
   curl = curl_easy_init();
-  if(curl == NULL) {
+  if(!curl) {
     fprintf(stderr, "curl_easy_init() failed\n");
     curl_global_cleanup();
     return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib1534.c b/tests/libtest/lib1534.c
index 61e72ab..738d5dd 100644
--- a/tests/libtest/lib1534.c
+++ b/tests/libtest/lib1534.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1535.c b/tests/libtest/lib1535.c
index b448466..2a64242 100644
--- a/tests/libtest/lib1535.c
+++ b/tests/libtest/lib1535.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(protocol != 0) {
+  if(protocol) {
     fprintf(stderr, "%s:%d protocol init failed; expected 0 but is %ld\n",
             __FILE__, __LINE__, protocol);
     res = CURLE_FAILED_INIT;
@@ -94,7 +94,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(protocol != 0) {
+  if(protocol) {
     fprintf(stderr, "%s:%d protocol init failed; expected 0 but is %ld\n",
             __FILE__, __LINE__, protocol);
     res = CURLE_FAILED_INIT;
@@ -113,7 +113,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(protocol != 0) {
+  if(protocol) {
     fprintf(stderr, "%s:%d protocol init failed; expected 0 but is %ld\n",
             __FILE__, __LINE__, protocol);
     res = CURLE_FAILED_INIT;
diff --git a/tests/libtest/lib1536.c b/tests/libtest/lib1536.c
index 5bee299..b047c9d 100644
--- a/tests/libtest/lib1536.c
+++ b/tests/libtest/lib1536.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -69,7 +69,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(memcmp(scheme, "HTTP", 5) != 0) {
+  if(!scheme || memcmp(scheme, "HTTP", 5) != 0) {
     fprintf(stderr, "%s:%d scheme of http resource is incorrect; "
             "expected 'HTTP' but is %s\n",
             __FILE__, __LINE__,
@@ -95,7 +95,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(scheme != 0) {
+  if(scheme) {
     fprintf(stderr, "%s:%d scheme init failed; expected NULL\n",
             __FILE__, __LINE__);
     res = CURLE_FAILED_INIT;
@@ -114,7 +114,7 @@
             __FILE__, __LINE__, res, curl_easy_strerror(res));
     goto test_cleanup;
   }
-  if(scheme != 0) {
+  if(scheme) {
     fprintf(stderr, "%s:%d scheme init failed; expected NULL\n",
             __FILE__, __LINE__);
     res = CURLE_FAILED_INIT;
diff --git a/tests/libtest/lib1537.c b/tests/libtest/lib1537.c
index 7c5dde0..cfed339 100644
--- a/tests/libtest/lib1537.c
+++ b/tests/libtest/lib1537.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -47,11 +47,11 @@
 
   /* deprecated API */
   ptr = curl_escape((char *)a, asize);
-  printf("%s\n", ptr);
   if(!ptr) {
     res = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
   }
+  printf("%s\n", ptr);
 
   raw = curl_easy_unescape(NULL, ptr, (int)strlen(ptr), &outlen);
   printf("outlen == %d\n", outlen);
diff --git a/tests/libtest/lib1538.c b/tests/libtest/lib1538.c
index 0f91e2f..a439a06 100644
--- a/tests/libtest/lib1538.c
+++ b/tests/libtest/lib1538.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1540.c b/tests/libtest/lib1540.c
index d0e4ca9..8c4304e 100644
--- a/tests/libtest/lib1540.c
+++ b/tests/libtest/lib1540.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1550.c b/tests/libtest/lib1550.c
index d3e17e4..0139cf2 100644
--- a/tests/libtest/lib1550.c
+++ b/tests/libtest/lib1550.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,7 +32,7 @@
   static const char * const bl_servers[] =
      {"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
   static const char * const bl_sites[] =
-     {"curl.haxx.se:443", "example.com:80", NULL};
+     {"curl.se:443", "example.com:80", NULL};
 
   global_init(CURL_GLOBAL_ALL);
   handle = curl_multi_init();
diff --git a/tests/libtest/lib1551.c b/tests/libtest/lib1551.c
index 36ba757..58305ae 100644
--- a/tests/libtest/lib1551.c
+++ b/tests/libtest/lib1551.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1552.c b/tests/libtest/lib1552.c
index 02c4ea8..ce783d7 100644
--- a/tests/libtest/lib1552.c
+++ b/tests/libtest/lib1552.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1553.c b/tests/libtest/lib1553.c
index 60be7c1..65292a7 100644
--- a/tests/libtest/lib1553.c
+++ b/tests/libtest/lib1553.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1554.c b/tests/libtest/lib1554.c
index a819880..a18d548 100644
--- a/tests/libtest/lib1554.c
+++ b/tests/libtest/lib1554.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1555.c b/tests/libtest/lib1555.c
index f7193b5..0c00574 100644
--- a/tests/libtest/lib1555.c
+++ b/tests/libtest/lib1555.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1556.c b/tests/libtest/lib1556.c
index fa0e60e..38de9ef 100644
--- a/tests/libtest/lib1556.c
+++ b/tests/libtest/lib1556.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1557.c b/tests/libtest/lib1557.c
index d7132ad..1f0ceed 100644
--- a/tests/libtest/lib1557.c
+++ b/tests/libtest/lib1557.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1558.c b/tests/libtest/lib1558.c
index 2305f4d..610339b 100644
--- a/tests/libtest/lib1558.c
+++ b/tests/libtest/lib1558.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -49,7 +49,7 @@
     goto test_cleanup;
   }
 
-  printf("Protocol: %x\n", protocol);
+  printf("Protocol: %lx\n", protocol);
 
   curl_easy_cleanup(curl);
   curl_global_cleanup();
diff --git a/tests/libtest/lib1559.c b/tests/libtest/lib1559.c
index e1b4175..28328e4 100644
--- a/tests/libtest/lib1559.c
+++ b/tests/libtest/lib1559.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c
index cc61199..b822004 100644
--- a/tests/libtest/lib1560.c
+++ b/tests/libtest/lib1560.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -129,6 +129,37 @@
 };
 
 static struct testcase get_parts_list[] ={
+  {"https://user:password@example.net/get?this=and what", "",
+   CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
+  {"https://user:password@example.net/ge t?this=and-what", "",
+   CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
+  {"https://user:pass word@example.net/get?this=and-what", "",
+   CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
+  {"https://u ser:password@example.net/get?this=and-what", "",
+   CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
+  /* no space allowed in scheme */
+  {"htt ps://user:password@example.net/get?this=and-what", "",
+   CURLU_NON_SUPPORT_SCHEME|CURLU_ALLOW_SPACE, 0, CURLUE_MALFORMED_INPUT},
+  {"https://user:password@example.net/get?this=and what",
+   "https | user | password | [13] | example.net | [15] | /get | "
+   "this=and what | [17]",
+   CURLU_ALLOW_SPACE, 0, CURLUE_OK},
+  {"https://user:password@example.net/ge t?this=and-what",
+   "https | user | password | [13] | example.net | [15] | /ge t | "
+   "this=and-what | [17]",
+   CURLU_ALLOW_SPACE, 0, CURLUE_OK},
+  {"https://user:pass word@example.net/get?this=and-what",
+   "https | user | pass word | [13] | example.net | [15] | /get | "
+   "this=and-what | [17]",
+   CURLU_ALLOW_SPACE, 0, CURLUE_OK},
+  {"https://u ser:password@example.net/get?this=and-what",
+   "https | u ser | password | [13] | example.net | [15] | /get | "
+   "this=and-what | [17]",
+   CURLU_ALLOW_SPACE, 0, CURLUE_OK},
+  {"https://user:password@example.net/ge t?this=and-what",
+   "https | user | password | [13] | example.net | [15] | /ge%20t | "
+   "this=and-what | [17]",
+   CURLU_ALLOW_SPACE | CURLU_URLENCODE, 0, CURLUE_OK},
   {"[::1]",
    "http | [11] | [12] | [13] | [::1] | [15] | / | [16] | [17]",
    CURLU_GUESS_SCHEME, 0, CURLUE_OK },
@@ -253,11 +284,9 @@
   {"https://127abc.com",
    "https | [11] | [12] | [13] | 127abc.com | [15] | / | [16] | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
-  {"https:// example.com?check",
-   "",
+  {"https:// example.com?check", "",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
-  {"https://e x a m p l e.com?check",
-   "",
+  {"https://e x a m p l e.com?check", "",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
   {"https://example.com?check",
    "https | [11] | [12] | [13] | example.com | [15] | / | check | [17]",
@@ -323,6 +352,22 @@
 };
 
 static struct urltestcase get_url_list[] = {
+  /* IPv4 trickeries */
+  {"https://16843009", "https://1.1.1.1/", 0, 0, CURLUE_OK},
+  {"https://0x7f.1", "https://127.0.0.1/", 0, 0, CURLUE_OK},
+  {"https://0177.1", "https://127.0.0.1/", 0, 0, CURLUE_OK},
+  {"https://0111.02.0x3", "https://73.2.0.3/", 0, 0, CURLUE_OK},
+  {"https://0xff.0xff.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK},
+  {"https://1.0xffffff", "https://1.255.255.255/", 0, 0, CURLUE_OK},
+  /* IPv4 numerical overflows or syntax errors will not normalize */
+  {"https://+127.0.0.1", "https://+127.0.0.1/", 0, 0, CURLUE_OK},
+  {"https://127.-0.0.1", "https://127.-0.0.1/", 0, 0, CURLUE_OK},
+  {"https://127.0. 1", "https://127.0.0.1/", 0, 0, CURLUE_MALFORMED_INPUT},
+  {"https://1.0x1000000", "https://1.0x1000000/", 0, 0, CURLUE_OK},
+  {"https://1.2.3.256", "https://1.2.3.256/", 0, 0, CURLUE_OK},
+  {"https://1.2.3.4.5", "https://1.2.3.4.5/", 0, 0, CURLUE_OK},
+  {"https://1.2.0x100.3", "https://1.2.0x100.3/", 0, 0, CURLUE_OK},
+  {"https://4294967296", "https://4294967296/", 0, 0, CURLUE_OK},
   /* 40 bytes scheme is the max allowed */
   {"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA://hostname/path",
    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa://hostname/path",
@@ -369,8 +414,8 @@
    CURLU_GUESS_SCHEME, 0, CURLUE_OK},
   {"HTTP://test/", "http://test/", 0, 0, CURLUE_OK},
   {"http://HO0_-st..~./", "http://HO0_-st..~./", 0, 0, CURLUE_OK},
-  {"http:/@example.com: 123/", "", 0, 0, CURLUE_BAD_PORT_NUMBER},
-  {"http:/@example.com:123 /", "", 0, 0, CURLUE_BAD_PORT_NUMBER},
+  {"http:/@example.com: 123/", "", 0, 0, CURLUE_MALFORMED_INPUT},
+  {"http:/@example.com:123 /", "", 0, 0, CURLUE_MALFORMED_INPUT},
   {"http:/@example.com:123a/", "", 0, 0, CURLUE_BAD_PORT_NUMBER},
   {"http://host/file\r", "", 0, 0, CURLUE_MALFORMED_INPUT},
   {"http://host/file\n\x03", "", 0, 0, CURLUE_MALFORMED_INPUT},
@@ -479,6 +524,13 @@
 /* !checksrc! disable SPACEBEFORECOMMA 1 */
 static struct setcase set_parts_list[] = {
   {"https://example.com/",
+   "query=Al2cO3tDkcDZ3EWE5Lh+LX8TPHs,", /* contains '+' */
+   "https://example.com/?Al2cO3tDkcDZ3EWE5Lh%2bLX8TPHs",
+   CURLU_URLDECODE, /* decode on get */
+   CURLU_URLENCODE, /* encode on set */
+   CURLUE_OK, CURLUE_OK},
+
+  {"https://example.com/",
    /* Set a 41 bytes scheme. That's too long so the old scheme remains set. */
    "scheme=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc,",
    "https://example.com/",
diff --git a/tests/libtest/lib1564.c b/tests/libtest/lib1564.c
index 13ac5b0..ee19b91 100644
--- a/tests/libtest/lib1564.c
+++ b/tests/libtest/lib1564.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -61,7 +61,7 @@
 
   /* try a single wakeup */
 
-  multi_wakeup(multi);
+  res_multi_wakeup(multi);
 
   time_before_wait = tutil_tvnow();
   multi_poll(multi, NULL, 0, 1000, &numfds);
@@ -94,7 +94,7 @@
   /* try lots of wakeup */
 
   for(i = 0; i < WAKEUP_NUM; ++i)
-    multi_wakeup(multi);
+    res_multi_wakeup(multi);
 
   time_before_wait = tutil_tvnow();
   multi_poll(multi, NULL, 0, 1000, &numfds);
@@ -109,15 +109,7 @@
 
   abort_on_test_timeout();
 
-#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) \
-    && !defined(__CYGWIN__)
-  /* Even lots of previous wakeups should not wake up this.
-
-     On Windows (particularly when using MinGW), the socketpair
-     used for curl_multi_wakeup() is really asynchronous,
-     meaning when it's called a lot, it can take some time
-     before all of the data can be read. Sometimes it can wake
-     up more than one curl_multi_poll() call. */
+  /* Even lots of previous wakeups should not wake up this. */
 
   time_before_wait = tutil_tvnow();
   multi_poll(multi, NULL, 0, 1000, &numfds);
@@ -131,7 +123,6 @@
   }
 
   abort_on_test_timeout();
-#endif
 
 test_cleanup:
 
diff --git a/tests/libtest/lib1565.c b/tests/libtest/lib1565.c
index b2fa40a..6ea7d4e 100644
--- a/tests/libtest/lib1565.c
+++ b/tests/libtest/lib1565.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -70,7 +70,7 @@
 
     pthread_mutex_unlock(&lock);
 
-    multi_wakeup(multi);
+    res_multi_wakeup(multi);
   }
 
 test_cleanup:
diff --git a/tests/libtest/lib1567.c b/tests/libtest/lib1567.c
index 48e6ea9..a1c4a24 100644
--- a/tests/libtest/lib1567.c
+++ b/tests/libtest/lib1567.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1568.c b/tests/libtest/lib1568.c
new file mode 100644
index 0000000..87251d9
--- /dev/null
+++ b/tests/libtest/lib1568.c
@@ -0,0 +1,51 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testtrace.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURLcode ret;
+  CURL *hnd;
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, URL);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_USERPWD, "testuser:testpass");
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "lib1568");
+  curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_PORT, (long)atoi(libtest_arg2));
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+
+  curl_global_cleanup();
+  return (int)ret;
+}
+
diff --git a/tests/libtest/lib1569.c b/tests/libtest/lib1569.c
new file mode 100644
index 0000000..0aaba39
--- /dev/null
+++ b/tests/libtest/lib1569.c
@@ -0,0 +1,46 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testtrace.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURLcode ret;
+  CURL *hnd;
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, URL);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_setopt(hnd, CURLOPT_URL, libtest_arg2);
+  ret = curl_easy_perform(hnd);
+  curl_easy_cleanup(hnd);
+
+  curl_global_cleanup();
+  return (int)ret;
+}
diff --git a/tests/libtest/lib1591.c b/tests/libtest/lib1591.c
index cc1c5b2..8349b1d 100644
--- a/tests/libtest/lib1591.c
+++ b/tests/libtest/lib1591.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,7 +32,7 @@
 static char data [] = "Hello Cloud!\r\n";
 static size_t consumed = 0;
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t  amount = nmemb * size; /* Total bytes curl wants */
 
diff --git a/tests/libtest/lib1592.c b/tests/libtest/lib1592.c
index 34901d2..808aff6 100644
--- a/tests/libtest/lib1592.c
+++ b/tests/libtest/lib1592.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1593.c b/tests/libtest/lib1593.c
index 5408c72..e3b838e 100644
--- a/tests/libtest/lib1593.c
+++ b/tests/libtest/lib1593.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1594.c b/tests/libtest/lib1594.c
index a769715..102e0a7 100644
--- a/tests/libtest/lib1594.c
+++ b/tests/libtest/lib1594.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -53,7 +53,7 @@
   retry += time(NULL);
   retry /= 10000;
 #endif
-  printf("Retry-After: %" CURL_FORMAT_CURL_OFF_T "\n", retry);
+  printf("Retry-After %" CURL_FORMAT_CURL_OFF_T "\n", retry);
 
 test_cleanup:
 
diff --git a/tests/libtest/lib1905.c b/tests/libtest/lib1905.c
index 7556d45..bc1acf8 100644
--- a/tests/libtest/lib1905.c
+++ b/tests/libtest/lib1905.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,10 +30,15 @@
   CURLSH *sh = NULL;
   CURL *ch = NULL;
   int unfinished;
+  CURLM *cm;
 
-  CURLM *cm = curl_multi_init();
-  if(!cm)
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  cm = curl_multi_init();
+  if(!cm) {
+    curl_global_cleanup();
     return 1;
+  }
   sh = curl_share_init();
   if(!sh)
     goto cleanup;
diff --git a/tests/libtest/lib1906.c b/tests/libtest/lib1906.c
index 6c7a4bf..fdcc86d 100644
--- a/tests/libtest/lib1906.c
+++ b/tests/libtest/lib1906.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1907.c b/tests/libtest/lib1907.c
index 2d9465a..c4f8ff0 100644
--- a/tests/libtest/lib1907.c
+++ b/tests/libtest/lib1907.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1908.c b/tests/libtest/lib1908.c
index 30e7d80..81267ac 100644
--- a/tests/libtest/lib1908.c
+++ b/tests/libtest/lib1908.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1910.c b/tests/libtest/lib1910.c
index 1e25db5..7f2e299 100644
--- a/tests/libtest/lib1910.c
+++ b/tests/libtest/lib1910.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1911.c b/tests/libtest/lib1911.c
index 3fafd28..09757fb 100644
--- a/tests/libtest/lib1911.c
+++ b/tests/libtest/lib1911.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -38,9 +38,12 @@
   int error = 0;
   (void)URL;
 
+  curl_global_init(CURL_GLOBAL_ALL);
   easy = curl_easy_init();
-  if(!easy)
+  if(!easy) {
+    curl_global_cleanup();
     return 1;
+  }
 
   /* make it a zero terminated C string with just As */
   memset(buffer, 'A', MAX_INPUT_LENGTH + 1);
@@ -83,5 +86,6 @@
     }
   }
   curl_easy_cleanup(easy);
+  curl_global_cleanup();
   return error;
 }
diff --git a/tests/libtest/lib1912.c b/tests/libtest/lib1912.c
index 44d09ba..32e5a30 100644
--- a/tests/libtest/lib1912.c
+++ b/tests/libtest/lib1912.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1913.c b/tests/libtest/lib1913.c
index b8ef96e..043a532 100644
--- a/tests/libtest/lib1913.c
+++ b/tests/libtest/lib1913.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1915.c b/tests/libtest/lib1915.c
new file mode 100644
index 0000000..4e632d3
--- /dev/null
+++ b/tests/libtest/lib1915.c
@@ -0,0 +1,95 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+static const char *preload_hosts[] = {
+  "1.example.com",
+  "2.example.com",
+  "3.example.com",
+  "4.example.com",
+  NULL /* end of list marker */
+};
+
+struct state {
+  int index;
+};
+
+/* "read" is from the point of the library, it wants data from us */
+static CURLSTScode hstsread(CURL *easy, struct curl_hstsentry *e,
+                            void *userp)
+{
+  const char *host;
+  struct state *s = (struct state *)userp;
+  (void)easy;
+  host = preload_hosts[s->index++];
+
+  if(host && (strlen(host) < e->namelen)) {
+    strcpy(e->name, host);
+    e->includeSubDomains = FALSE;
+    strcpy(e->expire, "20300320 01:02:03"); /* curl turns 32 that day */
+    fprintf(stderr, "add '%s'\n", host);
+  }
+  else
+    return CURLSTS_DONE;
+  return CURLSTS_OK;
+}
+
+/* check that we get the hosts back in the save */
+static CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *e,
+                             struct curl_index *i, void *userp)
+{
+  (void)easy;
+  (void)userp;
+  printf("[%zu/%zu] %s %s\n", i->index, i->total, e->name, e->expire);
+  return CURLSTS_OK;
+}
+
+/*
+ * Read/write HSTS cache entries via callback.
+ */
+
+int test(char *URL)
+{
+  CURLcode ret = CURLE_OK;
+  CURL *hnd;
+  struct state st = {0};
+
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  hnd = curl_easy_init();
+  if(hnd) {
+    curl_easy_setopt(hnd, CURLOPT_URL, URL);
+    curl_easy_setopt(hnd, CURLOPT_HSTSREADFUNCTION, hstsread);
+    curl_easy_setopt(hnd, CURLOPT_HSTSREADDATA, &st);
+    curl_easy_setopt(hnd, CURLOPT_HSTSWRITEFUNCTION, hstswrite);
+    curl_easy_setopt(hnd, CURLOPT_HSTSWRITEDATA, &st);
+    curl_easy_setopt(hnd, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
+    ret = curl_easy_perform(hnd);
+    curl_easy_cleanup(hnd);
+  }
+  curl_global_cleanup();
+  return (int)ret;
+}
diff --git a/tests/libtest/lib1916.c b/tests/libtest/lib1916.c
new file mode 100644
index 0000000..0d5fa78
--- /dev/null
+++ b/tests/libtest/lib1916.c
@@ -0,0 +1,54 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "warnless.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res = CURLE_OK;
+
+  if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  curl = curl_easy_init();
+  if(curl) {
+    curl_easy_setopt(curl, CURLOPT_URL, URL);
+#ifdef LIB1917
+    /* without any postfields set! */
+    curl_easy_setopt(curl, CURLOPT_POST, 1L);
+#else
+    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "");
+#endif
+    res = curl_easy_perform(curl);
+    if(res) {
+      printf("res: %d\n", res);
+    }
+    curl_easy_cleanup(curl);
+  }
+  curl_global_cleanup();
+  return (int)res;
+}
diff --git a/tests/libtest/lib1918.c b/tests/libtest/lib1918.c
new file mode 100644
index 0000000..189c371
--- /dev/null
+++ b/tests/libtest/lib1918.c
@@ -0,0 +1,55 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  const struct curl_easyoption *o;
+  int error = 0;
+  (void)URL;
+
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  for(o = curl_easy_option_next(NULL);
+      o;
+      o = curl_easy_option_next(o)) {
+    const struct curl_easyoption *ename =
+      curl_easy_option_by_name(o->name);
+    const struct curl_easyoption *eid =
+      curl_easy_option_by_id(o->id);
+
+    if(ename->id != o->id) {
+      printf("name lookup id %d doesn't match %d\n",
+             ename->id, o->id);
+    }
+    else if(eid->id != o->id) {
+      printf("ID lookup %d doesn't match %d\n",
+             ename->id, o->id);
+    }
+  }
+  curl_global_cleanup();
+  return error;
+}
diff --git a/tests/libtest/lib1933.c b/tests/libtest/lib1933.c
new file mode 100644
index 0000000..c489879
--- /dev/null
+++ b/tests/libtest/lib1933.c
@@ -0,0 +1,60 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res = TEST_ERR_MAJOR_BAD;
+  struct curl_slist *list = NULL;
+
+  if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  curl = curl_easy_init();
+  if(!curl) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+  test_setopt(curl, CURLOPT_AWS_SIGV4, "xxx");
+  test_setopt(curl, CURLOPT_HEADER, 0L);
+  test_setopt(curl, CURLOPT_URL, URL);
+  list = curl_slist_append(list, "Content-Type: application/json");
+  test_setopt(curl, CURLOPT_HTTPHEADER, list);
+
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+
+  curl_slist_free_all(list);
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1934.c b/tests/libtest/lib1934.c
new file mode 100644
index 0000000..f4e9eec
--- /dev/null
+++ b/tests/libtest/lib1934.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res = TEST_ERR_MAJOR_BAD;
+  struct curl_slist *list = NULL;
+
+  if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  curl = curl_easy_init();
+  if(!curl) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+  test_setopt(curl, CURLOPT_AWS_SIGV4, "xxx:yyy");
+  test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
+  test_setopt(curl, CURLOPT_HEADER, 0L);
+  test_setopt(curl, CURLOPT_URL, URL);
+  list = curl_slist_append(list, "Content-Type: application/json");
+  test_setopt(curl, CURLOPT_HTTPHEADER, list);
+
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+
+  curl_slist_free_all(list);
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1935.c b/tests/libtest/lib1935.c
new file mode 100644
index 0000000..1ef4372
--- /dev/null
+++ b/tests/libtest/lib1935.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res = TEST_ERR_MAJOR_BAD;
+  struct curl_slist *list = NULL;
+
+  if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  curl = curl_easy_init();
+  if(!curl) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+  test_setopt(curl, CURLOPT_AWS_SIGV4, "xxx:yyy:rrr");
+  test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
+  test_setopt(curl, CURLOPT_HEADER, 0L);
+  test_setopt(curl, CURLOPT_URL, URL);
+  list = curl_slist_append(list, "Content-Type: application/json");
+  test_setopt(curl, CURLOPT_HTTPHEADER, list);
+
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+
+  curl_slist_free_all(list);
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1936.c b/tests/libtest/lib1936.c
new file mode 100644
index 0000000..75d92a7
--- /dev/null
+++ b/tests/libtest/lib1936.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res = TEST_ERR_MAJOR_BAD;
+  struct curl_slist *list = NULL;
+
+  if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  curl = curl_easy_init();
+  if(!curl) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+  test_setopt(curl, CURLOPT_AWS_SIGV4, "xxx:yyy:rrr:sss");
+  test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
+  test_setopt(curl, CURLOPT_HEADER, 0L);
+  test_setopt(curl, CURLOPT_URL, URL);
+  list = curl_slist_append(list, "Content-Type: application/json");
+  test_setopt(curl, CURLOPT_HTTPHEADER, list);
+
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+
+  curl_slist_free_all(list);
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib3010.c b/tests/libtest/lib3010.c
index 9c24b2f..199d53c 100644
--- a/tests/libtest/lib3010.c
+++ b/tests/libtest/lib3010.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2020 - 2020, Nicolas Sterchele, <nicolas@sterchelen.net>
+ * Copyright (C) 2020 - 2021, Nicolas Sterchele, <nicolas@sterchelen.net>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -43,7 +43,7 @@
     }
     curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &follow_url);
     curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &retry_after);
-    printf("Retry-After: %" CURL_FORMAT_CURL_OFF_T "\n", retry_after);
+    printf("Retry-After %" CURL_FORMAT_CURL_OFF_T "\n", retry_after);
     curl_easy_setopt(curl, CURLOPT_URL, follow_url);
     ret = curl_easy_perform(curl);
     if(ret) {
@@ -54,7 +54,7 @@
 
     curl_easy_reset(curl);
     curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &retry_after);
-    printf("Retry-After: %" CURL_FORMAT_CURL_OFF_T "\n", retry_after);
+    printf("Retry-After %" CURL_FORMAT_CURL_OFF_T "\n", retry_after);
   }
 
 test_cleanup:
diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c
index 96dde32..5bb0cff 100644
--- a/tests/libtest/lib500.c
+++ b/tests/libtest/lib500.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -101,7 +101,7 @@
         curl_off_t time_pretransfer;
         curl_off_t time_starttransfer;
         curl_off_t time_total;
-        fprintf(moo, "IP: %s\n", ipstr);
+        fprintf(moo, "IP %s\n", ipstr);
         curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &time_namelookup);
         curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &time_connect);
         curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T,
diff --git a/tests/libtest/lib501.c b/tests/libtest/lib501.c
index 95ffc0a..798ff61 100644
--- a/tests/libtest/lib501.c
+++ b/tests/libtest/lib501.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c
index bfd4591..e62b260 100644
--- a/tests/libtest/lib502.c
+++ b/tests/libtest/lib502.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c
index a1c851f..4cb930c 100644
--- a/tests/libtest/lib503.c
+++ b/tests/libtest/lib503.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c
index 9843393..efac42c 100644
--- a/tests/libtest/lib504.c
+++ b/tests/libtest/lib504.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c
index 42e0eec..6a101d7 100644
--- a/tests/libtest/lib505.c
+++ b/tests/libtest/lib505.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index e0325ee..559e731 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c
index 9cd47cc..25b4e6e 100644
--- a/tests/libtest/lib507.c
+++ b/tests/libtest/lib507.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c
index 30705e4..b5391fb 100644
--- a/tests/libtest/lib508.c
+++ b/tests/libtest/lib508.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,7 @@
   size_t sizeleft;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *pooh = (struct WriteThis *)userp;
 
@@ -38,7 +38,7 @@
     return 0;
 
   if(pooh->sizeleft) {
-    *(char *)ptr = pooh->readptr[0]; /* copy one single byte */
+    *ptr = pooh->readptr[0]; /* copy one single byte */
     pooh->readptr++;                 /* advance pointer */
     pooh->sizeleft--;                /* less data left */
     return 1;                        /* we return 1 byte at a time! */
diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c
index 1fb2d34..20cadda 100644
--- a/tests/libtest/lib509.c
+++ b/tests/libtest/lib509.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c
index 4d568df..b3dd0ab 100644
--- a/tests/libtest/lib510.c
+++ b/tests/libtest/lib510.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,7 +36,7 @@
   int counter;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *pooh = (struct WriteThis *)userp;
   const char *data;
@@ -80,7 +80,7 @@
   }
 
   slist = curl_slist_append(slist, "Transfer-Encoding: chunked");
-  if(slist == NULL) {
+  if(!slist) {
     fprintf(stderr, "curl_slist_append() failed\n");
     curl_easy_cleanup(curl);
     curl_global_cleanup();
diff --git a/tests/libtest/lib511.c b/tests/libtest/lib511.c
index 2467bf0..55d8fd2 100644
--- a/tests/libtest/lib511.c
+++ b/tests/libtest/lib511.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib512.c b/tests/libtest/lib512.c
index 84e2a97..7b2af61 100644
--- a/tests/libtest/lib512.c
+++ b/tests/libtest/lib512.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib513.c b/tests/libtest/lib513.c
index c6a98cc..80fc57b 100644
--- a/tests/libtest/lib513.c
+++ b/tests/libtest/lib513.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,7 +23,7 @@
 
 #include "memdebug.h"
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   (void)ptr;
   (void)size;
diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c
index 702058b..a1c58f7 100644
--- a/tests/libtest/lib514.c
+++ b/tests/libtest/lib514.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib515.c b/tests/libtest/lib515.c
index 9f29d43..ae30d5e 100644
--- a/tests/libtest/lib515.c
+++ b/tests/libtest/lib515.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib516.c b/tests/libtest/lib516.c
index 6d83e21..e54c541 100644
--- a/tests/libtest/lib516.c
+++ b/tests/libtest/lib516.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c
index 2f7d9a0..0f4b128 100644
--- a/tests/libtest/lib517.c
+++ b/tests/libtest/lib517.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c
index 1a3091f..71b7dc2 100644
--- a/tests/libtest/lib518.c
+++ b/tests/libtest/lib518.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -83,7 +83,7 @@
   }
   for(i = 0; i < 3; i++) {
     fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
-    if(fpa[i] == NULL) {
+    if(!fpa[i]) {
       store_errmsg("fopen failed", errno);
       fprintf(stderr, "%s\n", msgbuff);
       ret = 0;
diff --git a/tests/libtest/lib519.c b/tests/libtest/lib519.c
index f6b3679..8ed8d5c 100644
--- a/tests/libtest/lib519.c
+++ b/tests/libtest/lib519.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib520.c b/tests/libtest/lib520.c
index 72b0875..bf26ec5 100644
--- a/tests/libtest/lib520.c
+++ b/tests/libtest/lib520.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c
index 3281911..43156b2 100644
--- a/tests/libtest/lib521.c
+++ b/tests/libtest/lib521.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib523.c b/tests/libtest/lib523.c
index 1708e14..441fcec 100644
--- a/tests/libtest/lib523.c
+++ b/tests/libtest/lib523.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib524.c b/tests/libtest/lib524.c
index fe195fd..bb74402 100644
--- a/tests/libtest/lib524.c
+++ b/tests/libtest/lib524.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index c179960..0826de3 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index 42eb7cb..a015699 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c
index 7dd0fb5..c6c014a 100644
--- a/tests/libtest/lib533.c
+++ b/tests/libtest/lib533.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c
index e8fb16a..7302785 100644
--- a/tests/libtest/lib537.c
+++ b/tests/libtest/lib537.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -84,7 +84,7 @@
   }
   for(i = 0; i < 3; i++) {
     fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
-    if(fpa[i] == NULL) {
+    if(!fpa[i]) {
       store_errmsg("fopen failed", errno);
       fprintf(stderr, "%s\n", msgbuff);
       ret = 0;
diff --git a/tests/libtest/lib539.c b/tests/libtest/lib539.c
index 7c03dd2..0b2e97f 100644
--- a/tests/libtest/lib539.c
+++ b/tests/libtest/lib539.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -60,14 +60,14 @@
     * call to freedirs).
     */
    newURL = aprintf("%s./", URL);
-   if(newURL == NULL) {
+   if(!newURL) {
      curl_easy_cleanup(curl);
      curl_global_cleanup();
      return TEST_ERR_MAJOR_BAD;
    }
 
    slist = curl_slist_append(NULL, "SYST");
-   if(slist == NULL) {
+   if(!slist) {
      free(newURL);
      curl_easy_cleanup(curl);
      curl_global_cleanup();
diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c
index a52d8c5..94ee58e 100644
--- a/tests/libtest/lib540.c
+++ b/tests/libtest/lib540.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c
index 57d7204..81939aa 100644
--- a/tests/libtest/lib541.c
+++ b/tests/libtest/lib541.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib542.c b/tests/libtest/lib542.c
index 4016874..9b54bcf 100644
--- a/tests/libtest/lib542.c
+++ b/tests/libtest/lib542.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib543.c b/tests/libtest/lib543.c
index c494d3d..c79295d 100644
--- a/tests/libtest/lib543.c
+++ b/tests/libtest/lib543.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,8 +33,6 @@
       0x1d, 0x57, 0xe1};
 
   CURL *easy;
-  int asize;
-  char *s;
   CURLcode res = CURLE_OK;
   (void)URL;
 
@@ -42,31 +40,31 @@
   easy = curl_easy_init();
   if(!easy) {
     fprintf(stderr, "curl_easy_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
+    res = TEST_ERR_MAJOR_BAD;
   }
+  else {
+    int asize = (int)sizeof(a);
+    char *s = curl_easy_escape(easy, (const char *)a, asize);
 
-  asize = (int)sizeof(a);
+    if(s) {
+      printf("%s\n", s);
+      curl_free(s);
+    }
 
-  s = curl_easy_escape(easy, (const char *)a, asize);
+    s = curl_easy_escape(easy, "", 0);
+    if(s) {
+      printf("IN: '' OUT: '%s'\n", s);
+      curl_free(s);
+    }
+    s = curl_easy_escape(easy, " 123", 3);
+    if(s) {
+      printf("IN: ' 12' OUT: '%s'\n", s);
+      curl_free(s);
+    }
 
-  if(s) {
-    printf("%s\n", s);
-    curl_free(s);
+    curl_easy_cleanup(easy);
   }
-
-  s = curl_easy_escape(easy, "", 0);
-  if(s) {
-    printf("IN: '' OUT: '%s'\n", s);
-    curl_free(s);
-  }
-  s = curl_easy_escape(easy, " 123", 3);
-  if(s) {
-    printf("IN: ' 12' OUT: '%s'\n", s);
-    curl_free(s);
-  }
-
-  curl_easy_cleanup(easy);
   curl_global_cleanup();
 
-  return 0;
+  return (int)res;
 }
diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c
index 60de7fc..5b57112 100644
--- a/tests/libtest/lib544.c
+++ b/tests/libtest/lib544.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib547.c b/tests/libtest/lib547.c
index 1416f89..57a9d84 100644
--- a/tests/libtest/lib547.c
+++ b/tests/libtest/lib547.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -38,7 +38,7 @@
 #endif
 
 #ifndef LIB548
-static size_t readcallback(void  *ptr,
+static size_t readcallback(char  *ptr,
                            size_t size,
                            size_t nmemb,
                            void *clientp)
diff --git a/tests/libtest/lib549.c b/tests/libtest/lib549.c
index 8866254..f593f2d 100644
--- a/tests/libtest/lib549.c
+++ b/tests/libtest/lib549.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index 7a96041..6e70e75 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -127,7 +127,7 @@
 static char databuf[70000]; /* MUST be more than 64k OR
                                MAX_INITIAL_POST_SIZE */
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t  amount = nmemb * size; /* Total bytes curl wants */
   size_t  available = sizeof(databuf) - current_offset; /* What we have to
diff --git a/tests/libtest/lib553.c b/tests/libtest/lib553.c
index 015bf29..31b2bdb 100644
--- a/tests/libtest/lib553.c
+++ b/tests/libtest/lib553.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,7 +30,7 @@
 
 #define POSTLEN 40960
 
-static size_t myreadfunc(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t myreadfunc(char *ptr, size_t size, size_t nmemb, void *stream)
 {
   static size_t total = POSTLEN;
   static char buf[1024];
diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c
index cc21d24..aebbb1b 100644
--- a/tests/libtest/lib554.c
+++ b/tests/libtest/lib554.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -38,7 +38,7 @@
   size_t sizeleft;
 };
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
 #ifdef LIB587
   (void)ptr;
@@ -54,7 +54,7 @@
     return 0;
 
   if(pooh->sizeleft) {
-    *(char *)ptr = pooh->readptr[0]; /* copy one single byte */
+    *ptr = pooh->readptr[0]; /* copy one single byte */
     pooh->readptr++;                 /* advance pointer */
     pooh->sizeleft--;                /* less data left */
     return 1;                        /* we return 1 byte at a time! */
diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c
index 42c89d8..5b38530 100644
--- a/tests/libtest/lib555.c
+++ b/tests/libtest/lib555.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -45,7 +45,7 @@
   "this is the blurb we want to upload\n";
 #endif
 
-static size_t readcallback(void  *ptr,
+static size_t readcallback(char  *ptr,
                            size_t size,
                            size_t nmemb,
                            void *clientp)
diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c
index 82e8b71..3a9a795 100644
--- a/tests/libtest/lib556.c
+++ b/tests/libtest/lib556.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -64,10 +64,10 @@
 #ifdef CURL_DOES_CONVERSIONS
       /* ASCII representation with escape sequences for non-ASCII platforms */
       "\x47\x45\x54\x20\x2f\x35\x35\x36\x20\x48\x54\x54\x50\x2f\x31\x2e"
-      "\x32\x0d\x0a\x48\x6f\x73\x74\x3a\x20\x6e\x69\x6e\x6a\x61\x0d\x0a"
+      "\x31\x0d\x0a\x48\x6f\x73\x74\x3a\x20\x6e\x69\x6e\x6a\x61\x0d\x0a"
       "\x0d\x0a";
 #else
-      "GET /556 HTTP/1.2\r\n"
+      "GET /556 HTTP/1.1\r\n"
       "Host: ninja\r\n\r\n";
 #endif
     size_t iolen = 0;
@@ -92,10 +92,10 @@
             break;
         }
 
-      } while((res == CURLE_OK && iolen != 0) || (res == CURLE_AGAIN));
+      } while((res == CURLE_OK && iolen) || (res == CURLE_AGAIN));
     }
 
-    if(iolen != 0)
+    if(iolen)
       res = (CURLcode)TEST_ERR_FAILURE;
   }
 
diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c
index b34a0c2..b6b8bec 100644
--- a/tests/libtest/lib557.c
+++ b/tests/libtest/lib557.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -1541,8 +1541,9 @@
   buf[0] = 0;
   rc = curl_msnprintf(buf, sizeof(buf), "%d, %.*1$d", 500, 1);
 
-  if(rc != 256) {
-    printf("curl_mprintf() returned %d and not 256!\n", rc);
+  if(rc != sizeof(buf) - 1) {
+    printf("curl_mprintf() returned %d and not %d!\n", rc,
+           sizeof(buf) - 1);
     errors++;
   }
 
@@ -1669,6 +1670,36 @@
 }
 /* !checksrc! enable LONGLINE */
 
+static int test_return_codes(void)
+{
+  char buf[128];
+  int rc;
+
+  rc = curl_msnprintf(buf, 100, "%d", 9999);
+  if(rc != 4)
+    return 1;
+
+  rc = curl_msnprintf(buf, 100, "%d", 99999);
+  if(rc != 5)
+    return 1;
+
+  /* returns the length excluding the nul byte */
+  rc = curl_msnprintf(buf, 5, "%d", 99999);
+  if(rc != 4)
+    return 1;
+
+  /* returns the length excluding the nul byte */
+  rc = curl_msnprintf(buf, 5, "%s", "helloooooooo");
+  if(rc != 4)
+    return 1;
+
+  /* returns the length excluding the nul byte */
+  rc = curl_msnprintf(buf, 6, "%s", "helloooooooo");
+  if(rc != 5)
+    return 1;
+
+  return 0;
+}
 int test(char *URL)
 {
   int errors = 0;
@@ -1702,6 +1733,8 @@
 
   errors += test_float_formatting();
 
+  errors += test_return_codes();
+
   if(errors)
     return TEST_ERR_MAJOR_BAD;
   else
diff --git a/tests/libtest/lib558.c b/tests/libtest/lib558.c
index 52340d7..1134a4d 100644
--- a/tests/libtest/lib558.c
+++ b/tests/libtest/lib558.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib559.c b/tests/libtest/lib559.c
index 2203cff..bcc9a8f 100644
--- a/tests/libtest/lib559.c
+++ b/tests/libtest/lib559.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c
index 56ee200..74a25cd 100644
--- a/tests/libtest/lib560.c
+++ b/tests/libtest/lib560.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib562.c b/tests/libtest/lib562.c
index 285b9f5..000fa30 100644
--- a/tests/libtest/lib562.c
+++ b/tests/libtest/lib562.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c
index f959f20..9c2b271 100644
--- a/tests/libtest/lib564.c
+++ b/tests/libtest/lib564.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib566.c b/tests/libtest/lib566.c
index 04e3032..a619be7 100644
--- a/tests/libtest/lib566.c
+++ b/tests/libtest/lib566.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -53,7 +53,7 @@
                             &content_length);
     moo = fopen(libtest_arg2, "wb");
     if(moo) {
-      fprintf(moo, "CL: %.0f\n", content_length);
+      fprintf(moo, "CL %.0f\n", content_length);
       fclose(moo);
     }
   }
diff --git a/tests/libtest/lib567.c b/tests/libtest/lib567.c
index f6af061..a0ebead 100644
--- a/tests/libtest/lib567.c
+++ b/tests/libtest/lib567.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c
index 128e6d2..59e9dec 100644
--- a/tests/libtest/lib568.c
+++ b/tests/libtest/lib568.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -81,7 +81,7 @@
   close(sdp);
 
   sdpf = fopen("log/file568.txt", "rb");
-  if(sdpf == NULL) {
+  if(!sdpf) {
     fprintf(stderr, "can't open log/file568.txt\n");
     res = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c
index 80116da..e5605d3 100644
--- a/tests/libtest/lib569.c
+++ b/tests/libtest/lib569.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,7 +41,7 @@
   int i;
 
   FILE *idfile = fopen(libtest_arg2, "wb");
-  if(idfile == NULL) {
+  if(!idfile) {
     fprintf(stderr, "couldn't open the Session ID File\n");
     return TEST_ERR_MAJOR_BAD;
   }
diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c
index 016ed10..5d2f5b5 100644
--- a/tests/libtest/lib570.c
+++ b/tests/libtest/lib570.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -101,8 +101,12 @@
   stream_uri = NULL;
 
   res = curl_easy_perform(curl);
-  if(res != CURLE_RTSP_SESSION_ERROR) {
+  if(res == CURLE_RTSP_SESSION_ERROR) {
+    res = 0;
+  }
+  else {
     fprintf(stderr, "Failed to detect a Session ID mismatch");
+    res = 1;
   }
 
 test_cleanup:
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index 0026178..ec9dce9 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -106,7 +106,7 @@
   int request = 1;
 
   FILE *protofile = fopen(libtest_arg2, "wb");
-  if(protofile == NULL) {
+  if(!protofile) {
     fprintf(stderr, "Couldn't open the protocol dump file\n");
     return TEST_ERR_MAJOR_BAD;
   }
diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c
index 0352fdb..a9cf341 100644
--- a/tests/libtest/lib572.c
+++ b/tests/libtest/lib572.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -100,7 +100,7 @@
   close(params);
 
   paramsf = fopen("log/file572.txt", "rb");
-  if(paramsf == NULL) {
+  if(!paramsf) {
     fprintf(stderr, "can't open log/file572.txt\n");
     res = TEST_ERR_MAJOR_BAD;
     goto test_cleanup;
diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
index f512e2d..7126dfa 100644
--- a/tests/libtest/lib573.c
+++ b/tests/libtest/lib573.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib574.c b/tests/libtest/lib574.c
index f4fb850..d27f151 100644
--- a/tests/libtest/lib574.c
+++ b/tests/libtest/lib574.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c
index 6baa122..f511835 100644
--- a/tests/libtest/lib575.c
+++ b/tests/libtest/lib575.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c
index f668258..fa75e78 100644
--- a/tests/libtest/lib576.c
+++ b/tests/libtest/lib576.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c
index 1b4ee52..ec3bc01 100644
--- a/tests/libtest/lib578.c
+++ b/tests/libtest/lib578.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c
index 64ef160..46894fa 100644
--- a/tests/libtest/lib579.c
+++ b/tests/libtest/lib579.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -64,7 +64,7 @@
   return 0;
 }
 
-static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
 {
   struct WriteThis *pooh = (struct WriteThis *)userp;
   const char *data;
@@ -104,7 +104,7 @@
   }
 
   slist = curl_slist_append(slist, "Transfer-Encoding: chunked");
-  if(slist == NULL) {
+  if(!slist) {
     fprintf(stderr, "curl_slist_append() failed\n");
     curl_easy_cleanup(curl);
     curl_global_cleanup();
diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c
index 9684105..caaefe0 100644
--- a/tests/libtest/lib582.c
+++ b/tests/libtest/lib582.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c
index 9091533..0ff0c09 100644
--- a/tests/libtest/lib583.c
+++ b/tests/libtest/lib583.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -21,7 +21,7 @@
  ***************************************************************************/
 /*
  * This test case is based on the sample code provided by Saqib Ali
- * https://curl.haxx.se/mail/lib-2011-03/0066.html
+ * https://curl.se/mail/lib-2011-03/0066.html
  */
 
 #include "test.h"
diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c
index 3b77ef7..da63e7c 100644
--- a/tests/libtest/lib586.c
+++ b/tests/libtest/lib586.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib589.c b/tests/libtest/lib589.c
index 667459d..06cc375 100644
--- a/tests/libtest/lib589.c
+++ b/tests/libtest/lib589.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -42,10 +42,23 @@
 
   /* First set the URL that is about to receive our POST. */
   test_setopt(curl, CURLOPT_URL, URL);
-  test_setopt(curl, CURLOPT_MIMEPOST, NULL);
   test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
   test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
+#ifdef LIB584
+  {
+    curl_mime *mime = curl_mime_init(curl);
+    curl_mimepart *part = curl_mime_addpart(mime);
+    curl_mime_name(part, "fake");
+    curl_mime_data(part, "party", 5);
+    test_setopt(curl, CURLOPT_MIMEPOST, mime);
+    res = curl_easy_perform(curl);
+    curl_mime_free(mime);
+  }
+#endif
+
+  test_setopt(curl, CURLOPT_MIMEPOST, NULL);
+
   /* Now, we should be making a zero byte POST request */
   res = curl_easy_perform(curl);
 
diff --git a/tests/libtest/lib590.c b/tests/libtest/lib590.c
index ca54e30..4414ae7 100644
--- a/tests/libtest/lib590.c
+++ b/tests/libtest/lib590.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -23,7 +23,7 @@
 
 /*
   Based on a bug report recipe by Rene Bernhardt in
-  https://curl.haxx.se/mail/lib-2011-10/0323.html
+  https://curl.se/mail/lib-2011-10/0323.html
 
   It is reproducible by the following steps:
 
diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c
index 9c5edd8..318cc07 100644
--- a/tests/libtest/lib591.c
+++ b/tests/libtest/lib591.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c
index e34505c..3f99647 100644
--- a/tests/libtest/lib597.c
+++ b/tests/libtest/lib597.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib598.c b/tests/libtest/lib598.c
index 002f041..8c1c3e0 100644
--- a/tests/libtest/lib598.c
+++ b/tests/libtest/lib598.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c
index 0e05977..3f2b61c 100644
--- a/tests/libtest/lib599.c
+++ b/tests/libtest/lib599.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -82,7 +82,7 @@
                             &content_length);
     moo = fopen(libtest_arg2, "wb");
     if(moo) {
-      fprintf(moo, "CL: %.0f\n", content_length);
+      fprintf(moo, "CL %.0f\n", content_length);
       fclose(moo);
     }
   }
diff --git a/tests/libtest/lib643.c b/tests/libtest/lib643.c
index 5af0f4a..3c75108 100644
--- a/tests/libtest/lib643.c
+++ b/tests/libtest/lib643.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib650.c b/tests/libtest/lib650.c
index 79d60b6..f0e6b81 100644
--- a/tests/libtest/lib650.c
+++ b/tests/libtest/lib650.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib651.c b/tests/libtest/lib651.c
index 777f6f5..489331a 100644
--- a/tests/libtest/lib651.c
+++ b/tests/libtest/lib651.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib652.c b/tests/libtest/lib652.c
index 3d247d2..4e23dfa 100644
--- a/tests/libtest/lib652.c
+++ b/tests/libtest/lib652.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib653.c b/tests/libtest/lib653.c
index 6d78ee0..878ed77 100644
--- a/tests/libtest/lib653.c
+++ b/tests/libtest/lib653.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib654.c b/tests/libtest/lib654.c
index f9c8b91..e7e957c 100644
--- a/tests/libtest/lib654.c
+++ b/tests/libtest/lib654.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib655.c b/tests/libtest/lib655.c
index 8777b99..751eccd 100644
--- a/tests/libtest/lib655.c
+++ b/tests/libtest/lib655.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib658.c b/tests/libtest/lib658.c
index 98e0db4..85738d0 100644
--- a/tests/libtest/lib658.c
+++ b/tests/libtest/lib658.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib659.c b/tests/libtest/lib659.c
index b37e8e9..d06986c 100644
--- a/tests/libtest/lib659.c
+++ b/tests/libtest/lib659.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib661.c b/tests/libtest/lib661.c
index 454d8f3..7d2b69c 100644
--- a/tests/libtest/lib661.c
+++ b/tests/libtest/lib661.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -97,7 +97,7 @@
    }
 
    slist = curl_slist_append(NULL, "SYST");
-   if(slist == NULL) {
+   if(!slist) {
      fprintf(stderr, "curl_slist_append() failed\n");
      res = TEST_ERR_MAJOR_BAD;
      goto test_cleanup;
diff --git a/tests/libtest/lib666.c b/tests/libtest/lib666.c
index c75936e..3c9cfe0 100644
--- a/tests/libtest/lib666.c
+++ b/tests/libtest/lib666.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib667.c b/tests/libtest/lib667.c
index 8bf7be4..d30b953 100644
--- a/tests/libtest/lib667.c
+++ b/tests/libtest/lib667.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib668.c b/tests/libtest/lib668.c
index c0b608a..bd8ae3b 100644
--- a/tests/libtest/lib668.c
+++ b/tests/libtest/lib668.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib670.c b/tests/libtest/lib670.c
index aecb1c0..e00a139 100644
--- a/tests/libtest/lib670.c
+++ b/tests/libtest/lib670.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib674.c b/tests/libtest/lib674.c
index 828e52c..336cf77 100644
--- a/tests/libtest/lib674.c
+++ b/tests/libtest/lib674.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib676.c b/tests/libtest/lib676.c
new file mode 100644
index 0000000..2d0b31c
--- /dev/null
+++ b/tests/libtest/lib676.c
@@ -0,0 +1,68 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURLcode res;
+  CURL *curl;
+
+  if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  curl = curl_easy_init();
+  if(!curl) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_URL, URL);
+  test_setopt(curl, CURLOPT_HEADER, 1L);
+  test_setopt(curl, CURLOPT_USERAGENT, "the-moo agent next generation");
+  test_setopt(curl, CURLOPT_COOKIEFILE, "log/cookies676");
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  res = curl_easy_perform(curl);
+  if(res) {
+    fprintf(stderr, "retrieve 1 failed\n");
+    goto test_cleanup;
+  }
+
+  /* now clear the cookies */
+  test_setopt(curl, CURLOPT_COOKIEFILE, NULL);
+
+  res = curl_easy_perform(curl);
+  if(res)
+    fprintf(stderr, "retrieve 2 failed\n");
+
+test_cleanup:
+
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return (int)res;
+}
diff --git a/tests/libtest/lib677.c b/tests/libtest/lib677.c
new file mode 100644
index 0000000..a4ec667
--- /dev/null
+++ b/tests/libtest/lib677.c
@@ -0,0 +1,120 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+static const char cmd[] = "A1 IDLE\r\n";
+static char buf[1024];
+
+int test(char *URL)
+{
+  CURLM *mcurl;
+  CURL *curl = NULL;
+  int mrun;
+  curl_socket_t sock = CURL_SOCKET_BAD;
+  time_t start = time(NULL);
+  int state = 0;
+  ssize_t pos = 0;
+
+  curl_global_init(CURL_GLOBAL_DEFAULT);
+  mcurl = curl_multi_init();
+  if(!mcurl)
+    goto fail;
+  curl = curl_easy_init();
+  if(!curl)
+    goto fail;
+
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  if(curl_easy_setopt(curl, CURLOPT_URL, URL))
+    goto fail;
+  curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
+  if(curl_multi_add_handle(mcurl, curl))
+    goto fail;
+
+  while(time(NULL) - start < 5) {
+    struct curl_waitfd waitfd;
+
+    if(curl_multi_perform(mcurl, &mrun))
+      goto fail;
+    for(;;) {
+      int i;
+      struct CURLMsg *m = curl_multi_info_read(mcurl, &i);
+
+      if(!m)
+        break;
+      if(m->msg == CURLMSG_DONE && m->easy_handle == curl) {
+        curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sock);
+        if(sock == CURL_SOCKET_BAD)
+          goto fail;
+        printf("Connected fine, extracted socket. Moving on\n");
+      }
+    }
+
+    if(sock != CURL_SOCKET_BAD) {
+      waitfd.events = state ? CURL_WAIT_POLLIN : CURL_WAIT_POLLOUT;
+      waitfd.revents = 0;
+      curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sock);
+      waitfd.fd = sock;
+    }
+    curl_multi_wait(mcurl, &waitfd, sock == CURL_SOCKET_BAD ? 0 : 1, 500,
+                    &mrun);
+    if((sock != CURL_SOCKET_BAD) && (waitfd.revents & waitfd.events)) {
+      size_t len = 0;
+
+      if(!state) {
+        curl_easy_send(curl, cmd + pos, sizeof(cmd) - 1 - pos, &len);
+        if(len > 0)
+          pos += len;
+        else
+          pos = 0;
+        if(pos == sizeof(cmd) - 1) {
+          state++;
+          pos = 0;
+        }
+      }
+      else if(pos < (ssize_t)sizeof(buf)) {
+        curl_easy_recv(curl, buf + pos, sizeof(buf) - pos, &len);
+        if(len > 0)
+          pos += len;
+      }
+      if(len <= 0)
+        sock = CURL_SOCKET_BAD;
+    }
+  }
+
+  if(state) {
+    fwrite(buf, pos, 1, stdout);
+    putchar('\n');
+  }
+
+  curl_multi_remove_handle(mcurl, curl);
+  fail:
+  curl_easy_cleanup(curl);
+  curl_multi_cleanup(mcurl);
+
+  curl_global_cleanup();
+  return 0;
+}
+
diff --git a/tests/libtest/lib678.c b/tests/libtest/lib678.c
new file mode 100644
index 0000000..89ceb85
--- /dev/null
+++ b/tests/libtest/lib678.c
@@ -0,0 +1,120 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+static int loadfile(const char *filename, void **filedata, size_t *filesize)
+{
+  size_t datasize = 0;
+  void *data = NULL;
+  if(filename) {
+    FILE *fInCert = fopen(filename, "rb");
+
+    if(fInCert) {
+      long cert_tell = 0;
+      bool continue_reading = fseek(fInCert, 0, SEEK_END) == 0;
+      if(continue_reading)
+        cert_tell = ftell(fInCert);
+      if(cert_tell < 0)
+        continue_reading = FALSE;
+      else
+        datasize = (size_t)cert_tell;
+      if(continue_reading)
+         continue_reading = fseek(fInCert, 0, SEEK_SET) == 0;
+      if(continue_reading)
+          data = malloc(datasize + 1);
+      if((!data) ||
+          ((int)fread(data, datasize, 1, fInCert) != 1))
+          continue_reading = FALSE;
+      fclose(fInCert);
+      if(!continue_reading) {
+        free(data);
+        datasize = 0;
+        data = NULL;
+      }
+   }
+  }
+  *filesize = datasize;
+  *filedata = data;
+  return data ? 1 : 0;
+}
+
+static int test_cert_blob(const char *url, const char *cafile)
+{
+  CURLcode code = CURLE_OUT_OF_MEMORY;
+  CURL *curl;
+  struct curl_blob blob;
+  size_t certsize;
+  void *certdata;
+
+  curl = curl_easy_init();
+  if(!curl) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    return CURLE_FAILED_INIT;
+  }
+
+  if(loadfile(cafile, &certdata, &certsize)) {
+    curl_easy_setopt(curl, CURLOPT_VERBOSE,     1L);
+    curl_easy_setopt(curl, CURLOPT_HEADER,      1L);
+    curl_easy_setopt(curl, CURLOPT_URL,         url);
+    curl_easy_setopt(curl, CURLOPT_USERAGENT,   "CURLOPT_CAINFO_BLOB");
+    curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
+                     CURLSSLOPT_REVOKE_BEST_EFFORT);
+
+    blob.data = certdata;
+    blob.len = certsize;
+    blob.flags = CURL_BLOB_COPY;
+    curl_easy_setopt(curl, CURLOPT_CAINFO_BLOB, &blob);
+    free(certdata);
+    code = curl_easy_perform(curl);
+  }
+  curl_easy_cleanup(curl);
+
+  return (int)code;
+}
+
+int test(char *URL)
+{
+  int res = 0;
+  curl_global_init(CURL_GLOBAL_DEFAULT);
+  if(!strcmp("check", URL)) {
+    CURL *e;
+    CURLcode w = CURLE_OK;
+    struct curl_blob blob = {0};
+    e = curl_easy_init();
+    if(e) {
+      w = curl_easy_setopt(e, CURLOPT_CAINFO_BLOB, &blob);
+      if(w)
+        printf("CURLOPT_CAINFO_BLOB is not supported\n");
+      curl_easy_cleanup(e);
+    }
+    res = (int)w;
+  }
+  else
+    res = test_cert_blob(URL, libtest_arg2);
+
+  curl_global_cleanup();
+  return res;
+}
diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c
index cfad6f3..a198010 100644
--- a/tests/libtest/libauthretry.c
+++ b/tests/libtest/libauthretry.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
index 426f6f2..11da56f 100644
--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl
index 9b57b64..0a4ff3d 100755
--- a/tests/libtest/mk-lib1521.pl
+++ b/tests/libtest/mk-lib1521.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -42,7 +42,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -133,6 +133,8 @@
 static curl_fnmatch_callback fnmatch_cb;
 static curl_closesocket_callback closesocketcb;
 static curl_xferinfo_callback xferinfocb;
+static curl_hstsread_callback hstsreadcb;
+static curl_hstswrite_callback hstswritecb;
 static curl_resolver_start_callback resolver_start_cb;
 
 int test(char *URL)
diff --git a/tests/libtest/notexists.pl b/tests/libtest/notexists.pl
index ed08141..8f09598 100755
--- a/tests/libtest/notexists.pl
+++ b/tests/libtest/notexists.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/sethostname.c b/tests/libtest/sethostname.c
index 6929793..1a1fdfd 100644
--- a/tests/libtest/sethostname.c
+++ b/tests/libtest/sethostname.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h
index c61e410..7b2f2ed 100644
--- a/tests/libtest/sethostname.h
+++ b/tests/libtest/sethostname.h
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/stub_gssapi.c b/tests/libtest/stub_gssapi.c
index 873e263..6cc1697 100644
--- a/tests/libtest/stub_gssapi.c
+++ b/tests/libtest/stub_gssapi.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2017-2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2017 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/stub_gssapi.h b/tests/libtest/stub_gssapi.h
index aab3449..5a89102 100644
--- a/tests/libtest/stub_gssapi.h
+++ b/tests/libtest/stub_gssapi.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index 3e92598..ffa78d0 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl
index 70c74c0..58f7c96 100755
--- a/tests/libtest/test1013.pl
+++ b/tests/libtest/test1013.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,7 @@
 @curl = split / /,$1;
 
 # These features are not supported by curl-config
-@curl = grep(!/^(Debug|TrackMemory|Metalink|Largefile|CharConv)$/i, @curl);
+@curl = grep(!/^(Debug|TrackMemory|CharConv)$/i, @curl);
 @curl = sort @curl;
 
 # Read the output of curl-config
diff --git a/tests/libtest/test1022.pl b/tests/libtest/test1022.pl
index 20e875c..573834b 100755
--- a/tests/libtest/test1022.pl
+++ b/tests/libtest/test1022.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/test307.pl b/tests/libtest/test307.pl
index c7e989f..b5da4ff 100755
--- a/tests/libtest/test307.pl
+++ b/tests/libtest/test307.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/test610.pl b/tests/libtest/test610.pl
index c3df29b..a3ac8c6 100755
--- a/tests/libtest/test610.pl
+++ b/tests/libtest/test610.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl
index 8efc05c..368d7be 100755
--- a/tests/libtest/test613.pl
+++ b/tests/libtest/test613.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index 2718ef9..d171365 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/testtrace.h b/tests/libtest/testtrace.h
index 54df28b..f715ef5 100644
--- a/tests/libtest/testtrace.h
+++ b/tests/libtest/testtrace.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c
index d40603d..5c0dd9e 100644
--- a/tests/libtest/testutil.c
+++ b/tests/libtest/testutil.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/testutil.h b/tests/libtest/testutil.h
index ccf84df..e766ad4 100644
--- a/tests/libtest/testutil.h
+++ b/tests/libtest/testutil.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/manpage-scan.pl b/tests/manpage-scan.pl
index 41dfdec..ec2e725 100755
--- a/tests/manpage-scan.pl
+++ b/tests/manpage-scan.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2016 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2016 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -66,12 +66,19 @@
     my ($file, @words) = @_;
 
     open(M, "<$file");
-    my @m = <M>;
+    my @m;
+    while(<M>) {
+        if($_ =~ /^\.IP (.*)/) {
+            my $w = $1;
+            # "unquote" minuses
+            $w =~ s/\\-/-/g;
+            push @m, $w;
+        }
+    }
     close(M);
 
     foreach my $m (@words) {
-
-        my @g = grep(/^\.IP $m/, @m);
+        my @g = grep(/$m/, @m);
         if(!$g[0]) {
             print STDERR "Missing mention of $m in $file\n";
             $errors++;
@@ -206,7 +213,8 @@
 while(<R>) {
     chomp;
     my $l= $_;
-    if(/^\.IP \"(-[^\"]*)\"/) {
+    $l =~ s/\\-/-/g;
+    if($l =~ /^\.IP \"(-[^\"]*)\"/) {
         my $str = $1;
         my $combo;
         if($str =~ /^-(.), --([a-z0-9.-]*)/) {
diff --git a/tests/manpage-syntax.pl b/tests/manpage-syntax.pl
index 7a7137a..184df6b 100644
--- a/tests/manpage-syntax.pl
+++ b/tests/manpage-syntax.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/mem-include-scan.pl b/tests/mem-include-scan.pl
index 4667f04..44c261b 100755
--- a/tests/mem-include-scan.pl
+++ b/tests/mem-include-scan.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -43,7 +43,7 @@
 
     open(F, "<$file");
     while(<F>) {
-        if($_ =~ /(free|alloc|strdup)\(/) {
+        if($_ =~ /\W(free|alloc|strdup)\(/) {
             $memfunc++;
         }
         elsif($_ =~ /^ *# *include \"memdebug.h\"/) {
diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl
index 8ba3f6d..714594a 100755
--- a/tests/memanalyze.pl
+++ b/tests/memanalyze.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
index 7171092..207a641 100755
--- a/tests/negtelnetserver.py
+++ b/tests/negtelnetserver.py
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -23,10 +23,14 @@
 
 from __future__ import (absolute_import, division, print_function,
                         unicode_literals)
+
 import argparse
+import logging
 import os
 import sys
-import logging
+
+from util import ClosingFileHandler
+
 if sys.version_info.major >= 3:
     import socketserver
 else:
@@ -313,7 +317,7 @@
 
     # Write out to a logfile
     if options.logfile:
-        handler = logging.FileHandler(options.logfile, mode="w")
+        handler = ClosingFileHandler(options.logfile)
         handler.setFormatter(formatter)
         handler.setLevel(logging.DEBUG)
         root_logger.addHandler(handler)
diff --git a/tests/nroff-scan.pl b/tests/nroff-scan.pl
index 15a59c9..1112783 100755
--- a/tests/nroff-scan.pl
+++ b/tests/nroff-scan.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/objnames-test08.sh b/tests/objnames-test08.sh
deleted file mode 100755
index 0e4a252..0000000
--- a/tests/objnames-test08.sh
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/bin/sh
-# ***************************************************************************
-# *                                  _   _ ____  _
-# *  Project                     ___| | | |  _ \| |
-# *                             / __| | | | |_) | |
-# *                            | (__| |_| |  _ <| |___
-# *                             \___|\___/|_| \_\_____|
-# *
-# * Copyright (C) 2013 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
-# *
-# * This software is licensed as described in the file COPYING, which
-# * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
-# *
-# * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# * copies of the Software, and permit persons to whom the Software is
-# * furnished to do so, under the terms of the COPYING file.
-# *
-# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# * KIND, either express or implied.
-# *
-# ***************************************************************************
-
-#
-# This Bourne shell script file is used by test case 1222 to do
-# unit testing of curl_8char_object_name() shell function which
-# is defined in file objnames.inc and sourced by this file and
-# any other shell script that may use it.
-#
-
-#
-# argument validation
-#
-
-if test $# -eq 1; then
-  :
-else
-  echo "Usage: ${0} srcdir"
-  exit 1
-fi
-
-if test -f "${1}/runtests.pl"; then
-  :
-else
-  echo "${0}: Wrong srcdir"
-  exit 1
-fi
-
-srcdir=${1}
-
-if test -f "$srcdir/objnames.inc"; then
-  :
-else
-  echo "$0: Missing objnames.inc"
-  exit 1
-fi
-
-#
-# Some variables
-#
-
-logdir=log
-tstnum=1222
-
-list_c=$logdir/${tstnum}_list_c
-list_obj=$logdir/${tstnum}_list_obj
-list_obj_c=$logdir/${tstnum}_list_obj_c
-list_obj_uniq=$logdir/${tstnum}_list_obj_uniq
-
-
-#
-# Source curl_8char_object_name() function definition
-#
-
-. $srcdir/objnames.inc
-
-#
-# Some curl_8char_object_name() unit tests
-#
-
-echo 'Testing curl_8char_object_name...'
-echo ""
-
-argstr=123__678__ABC__FGH__KLM__PQRSTUV
-expect=16AFKPQR
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123__678__ABC__FGH__KLM__PQ.S.UV
-expect=16AFKPQ
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123__678__ABC..FGH..KLM..PQRSTUV
-expect=16ABC
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123__678_.ABC._FGH__KLM__PQRSTUV
-expect=16
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV
-expect=123
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV
-expect=1234567
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV
-expect=12345678
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
-expect=1470AB
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
-expect=12345678
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV
-expect=159CGHIJ
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV
-expect=159CDEFG
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV
-expect=1590ABCD
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV
-expect=1567890A
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
-expect=12345678
-outstr=`curl_8char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-#
-# Verify that generated object name is distinct for
-# all *.c source files in lib and src subdirectories.
-#
-
-ls $srcdir/../lib/*.c > $list_c
-ls $srcdir/../src/*.c >> $list_c
-
-rm -f $list_obj
-
-for c_fname in `cat $list_c`; do
-  obj_name=`curl_8char_object_name $c_fname`
-  echo "$obj_name" >> $list_obj
-done
-
-sort -u $list_obj > $list_obj_uniq
-
-cnt_c=`cat $list_c | wc -l`
-cnt_u=`cat $list_obj_uniq | wc -l`
-
-echo ""
-echo ""
-echo ""
-if test $cnt_c -eq $cnt_u; then
-  echo "8-characters-or-less generated object names are unique."
-  obj_name_clash="no"
-else
-  echo "8-characters-or-less generated object names are clashing..."
-  obj_name_clash="yes"
-fi
-
-if test $obj_name_clash = "yes"; then
-  #
-  # Show clashing object names and respective source file names
-  #
-  echo ""
-  paste $list_obj $list_c | sort > $list_obj_c
-  prev_match="no"
-  prev_line="unknown"
-  prev_obj_name="unknown"
-  while read this_line; do
-    obj_name=`echo "$this_line" | cut -f1`
-    if test "x$obj_name" = "x$prev_obj_name"; then
-      if test "x$prev_match" != "xyes"; then
-        echo "$prev_line"
-        echo "$this_line"
-        prev_match="yes"
-      else
-        echo "$this_line"
-      fi
-    else
-      prev_match="no"
-    fi
-    prev_line=$this_line
-    prev_obj_name=$obj_name
-  done < $list_obj_c
-fi
-
-rm -f $list_c
-rm -f $list_obj
-rm -f $list_obj_c
-rm -f $list_obj_uniq
-
-# end of objnames-test.sh
diff --git a/tests/objnames-test10.sh b/tests/objnames-test10.sh
deleted file mode 100755
index 3d101dc..0000000
--- a/tests/objnames-test10.sh
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/bin/sh
-# ***************************************************************************
-# *                                  _   _ ____  _
-# *  Project                     ___| | | |  _ \| |
-# *                             / __| | | | |_) | |
-# *                            | (__| |_| |  _ <| |___
-# *                             \___|\___/|_| \_\_____|
-# *
-# * Copyright (C) 2013 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
-# *
-# * This software is licensed as described in the file COPYING, which
-# * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
-# *
-# * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# * copies of the Software, and permit persons to whom the Software is
-# * furnished to do so, under the terms of the COPYING file.
-# *
-# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# * KIND, either express or implied.
-# *
-# ***************************************************************************
-
-#
-# This Bourne shell script file is used by test case 1221 to do
-# unit testing of curl_10char_object_name() shell function which
-# is defined in file objnames.inc and sourced by this file and
-# any other shell script that may use it.
-#
-
-#
-# argument validation
-#
-
-if test $# -eq 1; then
-  :
-else
-  echo "Usage: ${0} srcdir"
-  exit 1
-fi
-
-if test -f "${1}/runtests.pl"; then
-  :
-else
-  echo "${0}: Wrong srcdir"
-  exit 1
-fi
-
-srcdir=${1}
-
-if test -f "$srcdir/objnames.inc"; then
-  :
-else
-  echo "$0: Missing objnames.inc"
-  exit 1
-fi
-
-#
-# Some variables
-#
-
-logdir=log
-tstnum=1221
-
-list_c=$logdir/${tstnum}_list_c
-list_obj=$logdir/${tstnum}_list_obj
-list_obj_c=$logdir/${tstnum}_list_obj_c
-list_obj_uniq=$logdir/${tstnum}_list_obj_uniq
-
-
-#
-# Source curl_10char_object_name() function definition
-#
-
-. $srcdir/objnames.inc
-
-#
-# Some curl_10char_object_name() unit tests
-#
-
-echo 'Testing curl_10char_object_name...'
-echo ""
-
-argstr=123__678__ABC__FGH__KLM__PQRSTUV
-expect=16AFKPQRST
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123__678__ABC__FGH__KLM__PQ.S.UV
-expect=16AFKPQ
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123__678__ABC..FGH..KLM..PQRSTUV
-expect=16ABC
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123__678_.ABC._FGH__KLM__PQRSTUV
-expect=16
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV
-expect=123
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV
-expect=1234567
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV
-expect=1234567890
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
-expect=1470AB
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
-expect=1234567890
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV
-expect=159CGHIJKL
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV
-expect=159CDEFGHI
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV
-expect=1590ABCDEF
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV
-expect=1567890ABC
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
-expect=1234567890
-outstr=`curl_10char_object_name $argstr`
-echo "result: $outstr expected: $expect input: $argstr"
-
-#
-# Verify that generated object name is distinct for
-# all *.c source files in lib and src subdirectories.
-#
-
-ls $srcdir/../lib/*.c > $list_c
-ls $srcdir/../src/*.c >> $list_c
-
-rm -f $list_obj
-
-for c_fname in `cat $list_c`; do
-  obj_name=`curl_10char_object_name $c_fname`
-  echo "$obj_name" >> $list_obj
-done
-
-sort -u $list_obj > $list_obj_uniq
-
-cnt_c=`cat $list_c | wc -l`
-cnt_u=`cat $list_obj_uniq | wc -l`
-
-echo ""
-echo ""
-echo ""
-if test $cnt_c -eq $cnt_u; then
-  echo "10-characters-or-less generated object names are unique."
-  obj_name_clash="no"
-else
-  echo "10-characters-or-less generated object names are clashing..."
-  obj_name_clash="yes"
-fi
-
-if test $obj_name_clash = "yes"; then
-  #
-  # Show clashing object names and respective source file names
-  #
-  echo ""
-  paste $list_obj $list_c | sort > $list_obj_c
-  prev_match="no"
-  prev_line="unknown"
-  prev_obj_name="unknown"
-  while read this_line; do
-    obj_name=`echo "$this_line" | cut -f1`
-    if test "x$obj_name" = "x$prev_obj_name"; then
-      if test "x$prev_match" != "xyes"; then
-        echo "$prev_line"
-        echo "$this_line"
-        prev_match="yes"
-      else
-        echo "$this_line"
-      fi
-    else
-      prev_match="no"
-    fi
-    prev_line=$this_line
-    prev_obj_name=$obj_name
-  done < $list_obj_c
-fi
-
-rm -f $list_c
-rm -f $list_obj
-rm -f $list_obj_c
-rm -f $list_obj_uniq
-
-# end of objnames-test10.sh
diff --git a/tests/objnames.inc b/tests/objnames.inc
deleted file mode 100644
index 158f801..0000000
--- a/tests/objnames.inc
+++ /dev/null
@@ -1,107 +0,0 @@
-# ***************************************************************************
-# *                                  _   _ ____  _
-# *  Project                     ___| | | |  _ \| |
-# *                             / __| | | | |_) | |
-# *                            | (__| |_| |  _ <| |___
-# *                             \___|\___/|_| \_\_____|
-# *
-# * Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
-# *
-# * This software is licensed as described in the file COPYING, which
-# * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
-# *
-# * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-# * copies of the Software, and permit persons to whom the Software is
-# * furnished to do so, under the terms of the COPYING file.
-# *
-# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# * KIND, either express or implied.
-# *
-# ***************************************************************************
-
-#
-# This file is sourced from curl/packages/OS400/initscript.sh and
-# other Bourne shell scripts. Keep it as portable as possible.
-#
-
-#
-# curl_10char_object_name
-#
-# This shell function accepts a single string argument with unspecified
-# length representing a (*.c) source file name and returns a string which
-# is a transformation of given argument.
-#
-# The intended purpose of this function is to transliterate a (*.c) source
-# file name that may be longer than 10 characters, or not, into a string
-# with at most 10 characters which may be used as an OS/400 object name.
-#
-# This function might not be universally useful, nor we care about it.
-#
-# It is intended to be used with libcurl's (*.c) source file names, so
-# dependency on libcurl's source file naming scheme is acceptable and
-# good enough for its intended use. Specifically it makes use of the fact
-# that libcurl's (*.c) source file names which may be longer than 10 chars
-# are conformed with underscore '_' separated substrings, or separated by
-# other character which does not belong to the [0-9], [a-z] or [A-Z] sets.
-#
-# This allows repeatable and automatic short object name generation with
-# no need for a hardcoded mapping table.
-#
-# Transformation is done in the following way:
-#
-# 1) Leading directory components are removed.
-# 2) Leftmost dot character and any other char following it are removed.
-# 3) Lowercase characters are transliterated to uppercase.
-# 4) Characters not in [A-Z] or [0-9] are transliterated to underscore '_'.
-# 5) Every sequence of one or more underscores is replaced with a single one.
-# 6) Five leftmost substrings which end in an underscore character are
-#    replaced by the first character of each substring, while retaining
-#    the rest of the string.
-# 7) Finally the result is truncated to 10 characters.
-#
-# Resulting object name may be shorter than 10 characters.
-#
-# Test case 1221 does unit testng of this function and also verifies
-# that it is possible to generate distinct short object names for all
-# curl and libcurl *.c source file names.
-#
-
-curl_10char_object_name() {
-  echo "${1}" | \
-  sed -e 's:.*/::' \
-   -e 's:[.].*::' \
-   -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \
-   -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \
-   -e 's:__*:_:g' \
-   -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \
-   -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \
-   -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \
-   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \
-   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \
-   -e 's:^\(..........\).*:\1:'
-}
-
-#
-# curl_8char_object_name
-#
-# Same as curl_10char_object_name() description and details above, except
-# that object name is limited to 8 characters maximum.
-#
-
-curl_8char_object_name() {
-  echo "${1}" | \
-  sed -e 's:.*/::' \
-   -e 's:[.].*::' \
-   -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \
-   -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \
-   -e 's:__*:_:g' \
-   -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \
-   -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \
-   -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \
-   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \
-   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \
-   -e 's:^\(........\).*:\1:'
-}
-
-# end of objectname.inc
diff --git a/tests/options-scan.pl b/tests/options-scan.pl
index 22cf454..1a644a7 100644
--- a/tests/options-scan.pl
+++ b/tests/options-scan.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/pathhelp.pm b/tests/pathhelp.pm
index f495306..e1908d0 100644
--- a/tests/pathhelp.pm
+++ b/tests/pathhelp.pm
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2016 - 2020, Evgeny Grin (Karlson2k), <k2k@narod.ru>.
+# Copyright (C) 2016 - 2021, Evgeny Grin (Karlson2k), <k2k@narod.ru>.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -372,7 +372,15 @@
         # Path is in relative form. Resolve relative directories in Unix form
         # *BEFORE* converting to Win32 form otherwise paths like
         # '../../../cygdrive/c/windows' will not be resolved.
-        my $cur_dir = `pwd -L`;
+
+        my $cur_dir;
+        # MSys shell has built-in command.
+        if($^O eq 'msys') {
+            $cur_dir = `bash -c 'pwd -L'`;
+        }
+        else {
+            $cur_dir = `pwd -L`;
+        }
         if($? != 0) {
             warn "Can't determine current working directory.\n";
             return undef;
@@ -440,7 +448,13 @@
         # Path is empty string. Return current directory.
         # Empty string processed correctly by 'cygpath'.
 
-        chomp($path = `pwd -L`);
+        # MSys shell has built-in command.
+        if($^O eq 'msys') {
+            chomp($path = `bash -c 'pwd -L'`);
+        }
+        else {
+            chomp($path = `pwd -L`);
+        }
         if($? != 0) {
             warn "Can't determine Unix-style current working directory.\n";
             return undef;
@@ -510,7 +524,15 @@
         # Path in relative form. Resolve relative directories in Unix form
         # *BEFORE* converting to Win32 form otherwise paths like
         # '../../../cygdrive/c/windows' will not be resolved.
-        my $cur_dir = `pwd -L`;
+
+        my $cur_dir;
+        # MSys shell has built-in command.
+        if($^O eq 'msys') {
+            $cur_dir = `bash -c 'pwd -L'`;
+        }
+        else {
+            $cur_dir = `pwd -L`;
+        }
         if($? != 0) {
             warn "Can't determine current working directory.\n";
             return undef;
diff --git a/tests/rtspserver.pl b/tests/rtspserver.pl
index 315526a..bb4bef4 100755
--- a/tests/rtspserver.pl
+++ b/tests/rtspserver.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/runtests.1 b/tests/runtests.1
index cc06d28..475254e 100644
--- a/tests/runtests.1
+++ b/tests/runtests.1
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH runtests.pl 1 "August 05, 2020" "Curl 7.73.0" "runtests"
+.TH runtests.pl 1 "June 08, 2021" "Curl 7.78.0" "runtests"
 
 .SH NAME
 runtests.pl \- run one or more test cases
@@ -61,10 +61,20 @@
 curl executable in the build tree.
 .IP "-d"
 Enable protocol debug: have the servers display protocol output.
+.IP "-E <exclude_file>"
+Load the \fBexclude_file\fP with additional reasons why certain tests
+should be skipped. Useful when testing with external HTTP proxies in
+which case some of the tests aren't appropriate.
+The file contains colon-delimited lines. The first field contains the
+type of exclusion, the second field contains a pattern and the final
+field contains the reason why matching tests should be skipped.
+The exclusion types are \fkeyword\fP, \ftest\fP, and \ftool\fP.
 .IP "-e"
 Run the test event-based (if possible). This will make runtests invoke curl
 with --test-event option. This option only works if both curl and libcurl were
 built debug-enabled.
+.IP "-f"
+Force the test to run even if mentioned in DISABLED.
 .IP "-g"
 Run the given test(s) with gdb. This is best used on a single test case and
 curl built --disable-shared. This then fires up gdb with command line set to
@@ -75,10 +85,23 @@
 .IP "-k"
 Keep output and log files in log/ after a test run, even if no error was
 detected. Useful for debugging.
+.IP "-L <file>"
+Load and execute the specified file which should contain perl code.
+This option allows to change \fIruntests.pl\fP behaviour by overwriting
+functions and variables and is useful when testing external proxies
+using curl's regression test suite.
 .IP "-l"
 Lists all test case names.
 .IP "-n"
 Disable the check for and use of valgrind.
+.IP "-o <variablename=value>"
+Overwrite the specified internal \fBvariable\fP with \fBvalue\fP.
+Useful to change variables that didn't get a dedicated flag to change them.
+Check the source to see which variables are available.
+.IP "-P <proxy>"
+Use the specified HTTP proxy when executing tests, even if the tests
+themselves don't specify a proxy. This option allows to test external
+proxies using curl's regression test suite.
 .IP "-p"
 Prints out all files in "log/" to stdout when a test case fails. Very
 practical when used in the automated and distributed tests since then the
@@ -93,6 +116,9 @@
 Display run time statistics. (Requires Perl Time::HiRes module)
 .IP "-rf"
 Display full run time statistics. (Requires Perl Time::HiRes module)
+.IP "-rm"
+Force removal of files by killing locking processes. (Windows only,
+requires Sysinternals handle[64].exe to be on PATH)
 .IP "--repeat=[num]"
 This will repeat the given set of test numbers this many times. If no test
 numbers are given, it will repeat ALL tests this many times. It iteratively
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 84feb73..9afc97d 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -151,6 +151,7 @@
 my $RTSPPORT=$noport;    # RTSP
 my $RTSP6PORT=$noport;   # RTSP IPv6 server port
 my $GOPHERPORT=$noport;  # Gopher
+my $GOPHERSPORT=$noport; # Gophers
 my $GOPHER6PORT=$noport; # Gopher IPv6 server port
 my $HTTPTLSPORT=$noport; # HTTP TLS (non-stunnel) server port
 my $HTTPTLS6PORT=$noport; # HTTP TLS (non-stunnel) IPv6 server port
@@ -162,12 +163,16 @@
 my $TELNETPORT=$noport;  # TELNET server port with negotiation
 my $HTTPUNIXPATH;        # HTTP server Unix domain socket path
 
+my $use_external_proxy = 0;
+my $proxy_address;
+my %custom_skip_reasons;
+
 my $SSHSRVMD5 = "[uninitialized]"; # MD5 of ssh server public key
-my $VERSION;             # curl's reported version number
+my $VERSION="";          # curl's reported version number
 
 my $srcdir = $ENV{'srcdir'} || '.';
 my $CURL="../src/curl".exe_ext('TOOL'); # what curl executable to run on the tests
-my $VCURL="curl";   # what curl binary to use to verify the servers with
+my $VCURL=$CURL;   # what curl binary to use to verify the servers with
                    # VCURL is handy to set to the system one when the one you
                    # just built hangs or crashes and thus prevent verification
 my $DBGCURL=$CURL; #"../src/.libs/curl";  # alternative for debugging
@@ -248,7 +253,6 @@
 my $has_spnego;     # set if libcurl is built with SPNEGO support
 my $has_charconv;   # set if libcurl is built with CharConv support
 my $has_tls_srp;    # set if libcurl is built with TLS-SRP support
-my $has_metalink;   # set if curl is built with Metalink support
 my $has_http2;      # set if libcurl is built with HTTP2 support
 my $has_httpsproxy; # set if libcurl is built with HTTPS-proxy support
 my $has_crypto;     # set if libcurl is built with cryptographic support
@@ -256,11 +260,14 @@
 my $has_threadedres;# set if built with threaded resolver
 my $has_psl;        # set if libcurl is built with PSL support
 my $has_altsvc;     # set if libcurl is built with alt-svc support
-my $has_ldpreload;  # set if curl is built for systems supporting LD_PRELOAD
-my $has_multissl;   # set if curl is build with MultiSSL support
-my $has_manual;     # set if curl is built with built-in manual
-my $has_win32;      # set if curl is built for Windows
-my $has_mingw;      # set if curl is built with MinGW (as opposed to MinGW-w64)
+my $has_hsts;       # set if libcurl is built with HSTS support
+my $has_ldpreload;  # set if built for systems supporting LD_PRELOAD
+my $has_multissl;   # set if build with MultiSSL support
+my $has_manual;     # set if built with built-in manual
+my $has_win32;      # set if built for Windows
+my $has_mingw;      # set if built with MinGW (as opposed to MinGW-w64)
+my $has_hyper = 0;  # set if built with Hyper
+my $has_unicode;    # set if libcurl is built with Unicode support
 
 # this version is decided by the particular nghttp2 library that is being used
 my $h2cver = "h2c";
@@ -330,9 +337,11 @@
 my $gdbthis;      # run test case with gdb debugger
 my $gdbxwin;      # use windowed gdb when using gdb
 my $keepoutfiles; # keep stdout and stderr files after tests
+my $clearlocks;   # force removal of files by killing locking processes
 my $listonly;     # only list the tests
 my $postmortem;   # display detailed info about failed tests
 my $run_event_based; # run curl with --test-event to test the event API
+my $run_disabeled; # run the specific tests even if listed in DISABLED
 
 my %run;          # running server
 my %doesntrun;    # servers that don't work, identified by pidfile
@@ -378,7 +387,10 @@
 $ENV{'CURL_MEMDEBUG'} = $memdump;
 $ENV{'CURL_ENTROPY'}="12345678";
 $ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic
+$ENV{'CURL_GLOBAL_INIT'}=1; # debug curl_global_init/cleanup use
 $ENV{'HOME'}=$pwd;
+$ENV{'CURL_HOME'}=$ENV{'HOME'};
+$ENV{'XDG_CONFIG_HOME'}=$ENV{'HOME'};
 $ENV{'COLUMNS'}=79; # screen width!
 
 sub catch_zap {
@@ -404,7 +416,7 @@
 }
 
 # make sure we don't get affected by other variables that control our
-# behaviour
+# behavior
 
 delete $ENV{'SSL_CERT_DIR'} if($ENV{'SSL_CERT_DIR'});
 delete $ENV{'SSL_CERT_PATH'} if($ENV{'SSL_CERT_PATH'});
@@ -415,7 +427,7 @@
 # possible servers.
 #
 sub init_serverpidfile_hash {
-  for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp', 'http/2')) {
+  for my $proto (('ftp', 'gopher', 'http', 'imap', 'pop3', 'smtp', 'http/2')) {
     for my $ssl (('', 's')) {
       for my $ipvnum ((4, 6)) {
         for my $idnum ((1, 2, 3)) {
@@ -428,7 +440,7 @@
       }
     }
   }
-  for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher', 'httptls',
+  for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'httptls',
                   'dict', 'smb', 'smbs', 'telnet', 'mqtt')) {
     for my $ipvnum ((4, 6)) {
       for my $idnum ((1, 2)) {
@@ -566,12 +578,15 @@
 #
 my $disttests;
 sub get_disttests {
-    my $makeCmd = 'make';
-    if(-f "../CMakeCache.txt") {
-        $makeCmd = 'cmake --build ../.. --target';
+    open(D, "<$TESTDIR/Makefile.inc");
+    while(<D>) {
+        chomp $_;
+        if(($_ =~ /^#/) ||($_ !~ /test/)) {
+            next;
+        }
+        $disttests .= $_;
     }
-    my @dist = `cd data && $makeCmd show`;
-    $disttests = join("", @dist);
+    close(D);
 }
 
 #######################################################################
@@ -837,6 +852,13 @@
 }
 
 #######################################################################
+# Return flags to let curl use an external HTTP proxy
+#
+sub getexternalproxyflags {
+    return " --proxy $proxy_address ";
+}
+
+#######################################################################
 # Verify that the server that runs on $ip, $port is our server.  This also
 # implies that we can speak with it, as there might be occasions when the
 # server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
@@ -870,6 +892,9 @@
     $flags .= "--globoff ";
     $flags .= "--unix-socket '$port_or_path' " if $ipvnum eq "unix";
     $flags .= "--insecure " if($proto eq 'https');
+    if($use_external_proxy) {
+        $flags .= getexternalproxyflags();
+    }
     $flags .= "\"$proto://$ip:$port/${bonus}verifiedserver\"";
 
     my $cmd = "$VCURL $flags 2>$verifylog";
@@ -944,6 +969,9 @@
     $flags .= "--verbose ";
     $flags .= "--globoff ";
     $flags .= $extra;
+    if($use_external_proxy) {
+        $flags .= getexternalproxyflags();
+    }
     $flags .= "\"$proto://$ip:$port/verifiedserver\"";
 
     my $cmd = "$VCURL $flags 2>$verifylog";
@@ -1006,6 +1034,9 @@
     $flags .= "--silent ";
     $flags .= "--verbose ";
     $flags .= "--globoff ";
+    if($use_external_proxy) {
+        $flags .= getexternalproxyflags();
+    }
     # currently verification is done using http
     $flags .= "\"http://$ip:$port/verifiedserver\"";
 
@@ -1147,6 +1178,9 @@
     $flags .= "--tlsauthtype SRP ";
     $flags .= "--tlsuser jsmith ";
     $flags .= "--tlspassword abc ";
+    if($use_external_proxy) {
+        $flags .= getexternalproxyflags();
+    }
     $flags .= "\"https://$ip:$port/verifiedserver\"";
 
     my $cmd = "$VCURL $flags 2>$verifylog";
@@ -1556,7 +1590,7 @@
     } else {
         $flags .= "--ipv$ipvnum --port 0 ";
     }
-    $flags .= "--srcdir \"$srcdir\"";
+    $flags .= "--srcdir \"$TESTDIR/..\"";
 
     my $cmd = "$exe $flags";
     my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
@@ -1599,10 +1633,9 @@
 # start the https stunnel based server
 #
 sub runhttpsserver {
-    my ($verbose, $ipv6, $proxy, $certfile) = @_;
-    my $proto = 'https';
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
-    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+    my ($verbose, $proto, $proxy, $certfile) = @_;
+    my $ip = $HOSTIP;
+    my $ipvnum = 4;
     my $idnum = 1;
     my $server;
     my $srvrname;
@@ -1646,7 +1679,10 @@
     $flags .= "--ipv$ipvnum --proto $proto ";
     $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
     $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
-    if(!$proxy) {
+    if($proto eq "gophers") {
+        $flags .= "--connect $GOPHERPORT";
+    }
+    elsif(!$proxy) {
         $flags .= "--connect $HTTPPORT";
     }
     else {
@@ -2246,7 +2282,7 @@
 }
 
 #######################################################################
-# Start the socks server
+# Start the MQTT server
 #
 sub runmqttserver {
     my ($id, $verbose, $ipv6) = @_;
@@ -2706,11 +2742,41 @@
 }
 
 #######################################################################
+# Kill the processes that still lock files in a directory
+#
+sub clearlocks {
+    my $dir = $_[0];
+    my $done = 0;
+
+    if(pathhelp::os_is_win()) {
+        $dir = pathhelp::sys_native_abs_path($dir);
+        $dir =~ s/\//\\\\/g;
+        my $handle = "handle.exe";
+        if($ENV{"PROCESSOR_ARCHITECTURE"} =~ /64$/) {
+            $handle = "handle64.exe";
+        }
+        my @handles = `$handle $dir -accepteula -nobanner`;
+        for $handle (@handles) {
+            if($handle =~ /^(\S+)\s+pid:\s+(\d+)\s+type:\s+(\w+)\s+([0-9A-F]+):\s+(.+)\r\r/) {
+                logmsg "Found $3 lock of '$5' ($4) by $1 ($2)\n";
+                # Ignore stunnel since we cannot do anything about its locks
+                if("$3" eq "File" && "$1" ne "tstunnel.exe") {
+                    logmsg "Killing IMAGENAME eq $1 and PID eq $2\n";
+                    system("taskkill.exe -f -fi \"IMAGENAME eq $1\" -fi \"PID eq $2\" >nul 2>&1");
+                    $done = 1;
+                }
+            }
+        }
+    }
+    return $done;
+}
+
+#######################################################################
 # Remove all files in the specified directory
 #
 sub cleardir {
     my $dir = $_[0];
-    my $count;
+    my $done = 1;
     my $file;
 
     # Get all files
@@ -2719,17 +2785,23 @@
     while($file = readdir($dh)) {
         if(($file !~ /^(\.|\.\.)\z/)) {
             if(-d "$dir/$file") {
-                cleardir("$dir/$file");
-                rmdir("$dir/$file");
+                if(!cleardir("$dir/$file")) {
+                    $done = 0;
+                }
+                if(!rmdir("$dir/$file")) {
+                    $done = 0;
+                }
             }
             else {
-                unlink("$dir/$file");
+                # Ignore stunnel since we cannot do anything about its locks
+                if(!unlink("$dir/$file") && "$file" !~ /_stunnel\.log$/) {
+                    $done = 0;
+                }
             }
-            $count++;
         }
     }
     closedir $dh;
-    return $count;
+    return $done;
 }
 
 #######################################################################
@@ -2761,7 +2833,10 @@
 }
 
 sub setupfeatures {
+    $feature{"hyper"} = $has_hyper;
+    $feature{"c-ares"} = $has_cares;
     $feature{"alt-svc"} = $has_altsvc;
+    $feature{"HSTS"} = $has_hsts;
     $feature{"brotli"} = $has_brotli;
     $feature{"crypto"} = $has_crypto;
     $feature{"debug"} = $debug_build;
@@ -2777,7 +2852,6 @@
     $feature{"ld_preload"} = ($has_ldpreload && !$debug_build);
     $feature{"libz"} = $has_libz;
     $feature{"manual"} = $has_manual;
-    $feature{"Metalink"} = $has_metalink;
     $feature{"MinGW"} = $has_mingw;
     $feature{"MultiSSL"} = $has_multissl;
     $feature{"NSS"} = $has_nss;
@@ -2794,6 +2868,7 @@
     $feature{"threaded-resolver"} = $has_threadedres;
     $feature{"TLS-SRP"} = $has_tls_srp;
     $feature{"TrackMemory"} = $has_memory_tracking;
+    $feature{"Unicode"} = $has_unicode;
     $feature{"unittest"} = $debug_build;
     $feature{"unix-sockets"} = $has_unix;
     $feature{"win32"} = $has_win32;
@@ -2818,6 +2893,7 @@
     $feature{"shuffle-dns"} = 1;
     $feature{"typecheck"} = 1;
     $feature{"verbose-strings"} = 1;
+    $feature{"wakeup"} = 1;
 
 }
 
@@ -2924,6 +3000,9 @@
            if ($libcurl =~ /mesalink/i) {
                $has_mesalink=1;
            }
+           if ($libcurl =~ /Hyper/i) {
+               $has_hyper=1;
+           }
         }
         elsif($_ =~ /^Protocols: (.*)/i) {
             # these are the protocols compiled in to this libcurl
@@ -3023,10 +3102,6 @@
                 # TLS-SRP enabled
                 $has_tls_srp=1;
             }
-            if($feat =~ /Metalink/i) {
-                # Metalink enabled
-                $has_metalink=1;
-            }
             if($feat =~ /PSL/i) {
                 # PSL enabled
                 $has_psl=1;
@@ -3035,6 +3110,9 @@
                 # alt-svc enabled
                 $has_altsvc=1;
             }
+            if($feat =~ /HSTS/i) {
+                $has_hsts=1;
+            }
             if($feat =~ /AsynchDNS/i) {
                 if(!$has_cares) {
                     # this means threaded resolver
@@ -3054,6 +3132,9 @@
                 # 'https-proxy' is used as "server" so consider it a protocol
                 push @protocols, 'https-proxy';
             }
+            if($feat =~ /Unicode/i) {
+                $has_unicode = 1;
+            }
         }
         #
         # Test harness currently uses a non-stunnel server in order to
@@ -3209,7 +3290,7 @@
 # a command, in either case passed by reference
 #
 sub subVariables {
-    my ($thing, $prefix) = @_;
+    my ($thing, $testnum, $prefix) = @_;
 
     if(!$prefix) {
         $prefix = "%";
@@ -3221,6 +3302,7 @@
     $$thing =~ s/${prefix}FTPPORT/$FTPPORT/g;
     $$thing =~ s/${prefix}GOPHER6PORT/$GOPHER6PORT/g;
     $$thing =~ s/${prefix}GOPHERPORT/$GOPHERPORT/g;
+    $$thing =~ s/${prefix}GOPHERSPORT/$GOPHERSPORT/g;
     $$thing =~ s/${prefix}HTTPTLS6PORT/$HTTPTLS6PORT/g;
     $$thing =~ s/${prefix}HTTPTLSPORT/$HTTPTLSPORT/g;
     $$thing =~ s/${prefix}HTTP6PORT/$HTTP6PORT/g;
@@ -3264,6 +3346,7 @@
     $$thing =~ s/${prefix}PWD/$pwd/g;
     $$thing =~ s/${prefix}POSIX_PWD/$posix_pwd/g;
     $$thing =~ s/${prefix}VERSION/$VERSION/g;
+    $$thing =~ s/${prefix}TESTNUMBER/$testnum/g;
 
     my $file_pwd = $pwd;
     if($file_pwd !~ /^\//) {
@@ -3323,13 +3406,33 @@
     }
 }
 
-sub fixarray {
-    my @in = @_;
+my $prevupdate;
+sub subNewlines {
+    my ($thing) = @_;
 
-    for(@in) {
-        subVariables(\$_);
+    # When curl is built with Hyper, it gets all response headers delivered as
+    # name/value pairs and curl "invents" the newlines when it saves the
+    # headers. Therefore, curl will always save headers with CRLF newlines
+    # when built to use Hyper. By making sure we deliver all tests using CRLF
+    # as well, all test comparisons will survive without knowing about this
+    # little quirk.
+
+    if(($$thing =~ /^HTTP\/(1.1|1.0|2) [1-5][^\x0d]*\z/) ||
+       (($$thing =~ /^[a-z0-9_-]+: [^\x0d]*\z/i) &&
+        # skip curl error messages
+        ($$thing !~ /^curl: \(\d+\) /))) {
+        # enforce CRLF newline
+        $$thing =~ s/\x0a/\x0d\x0a/;
+        $prevupdate = 1;
     }
-    return @in;
+    else {
+        if(($$thing =~ /^\n\z/) && $prevupdate) {
+            # if there's a blank link after a line we update, we hope it is
+            # the empty line following headers
+            $$thing =~ s/\x0a/\x0d\x0a/;
+        }
+        $prevupdate = 0;
+    }
 }
 
 #######################################################################
@@ -3382,6 +3485,48 @@
     }
 }
 
+#
+# 'prepro' processes the input array and replaces %-variables in the array
+# etc. Returns the processed version of the array
+
+sub prepro {
+    my $testnum = shift;
+    my (@entiretest) = @_;
+    my $show = 1;
+    my @out;
+    for my $s (@entiretest) {
+        my $f = $s;
+        if($s =~ /^ *%if (.*)/) {
+            my $cond = $1;
+            my $rev = 0;
+
+            if($cond =~ /^!(.*)/) {
+                $cond = $1;
+                $rev = 1;
+            }
+            $rev ^= $feature{$cond} ? 1 : 0;
+            $show = $rev;
+            next;
+        }
+        elsif($s =~ /^ *%else/) {
+            $show ^= 1;
+            next;
+        }
+        elsif($s =~ /^ *%endif/) {
+            $show = 1;
+            next;
+        }
+        if($show) {
+            subVariables(\$s, $testnum, "%");
+            subBase64(\$s);
+            subNewlines(\$s) if($has_hyper && ($keywords{"HTTP"} ||
+                                               $keywords{"HTTPS"}));
+            push @out, $s;
+        }
+    }
+    return @out;
+}
+
 #######################################################################
 # Run a single specified test case
 #
@@ -3399,7 +3544,10 @@
     my $errorreturncode = 1; # 1 means normal error, 2 means ignored error
 
     # fist, remove all lingering log files
-    cleardir($LOGDIR);
+    if(!cleardir($LOGDIR) && $clearlocks) {
+        clearlocks($LOGDIR);
+        cleardir($LOGDIR);
+    }
 
     # copy test number to a global scope var, this allows
     # testnum checking when starting test harness servers.
@@ -3408,11 +3556,16 @@
     # timestamp test preparation start
     $timeprepini{$testnum} = Time::HiRes::time();
 
-    if($disttests !~ /test$testnum\W/ ) {
+    if($disttests !~ /test$testnum(\W|\z)/ ) {
         logmsg "Warning: test$testnum not present in tests/data/Makefile.inc\n";
     }
     if($disabled{$testnum}) {
-        logmsg "Warning: test$testnum is explicitly disabled\n";
+        if(!$run_disabeled) {
+            $why = "listed in DISABLED";
+        }
+        else {
+            logmsg "Warning: test$testnum is explicitly disabled\n";
+        }
     }
     if($ignored{$testnum}) {
         logmsg "Warning: test$testnum result is ignored\n";
@@ -3498,6 +3651,31 @@
         }
     }
 
+    if (!$why && defined $custom_skip_reasons{test}{$testnum}) {
+        $why = $custom_skip_reasons{test}{$testnum};
+    }
+
+    if (!$why && defined $custom_skip_reasons{tool}) {
+        foreach my $tool (getpart("client", "tool")) {
+            foreach my $tool_skip_pattern (keys %{$custom_skip_reasons{tool}}) {
+                if ($tool =~ /$tool_skip_pattern/i) {
+                    $why = $custom_skip_reasons{tool}{$tool_skip_pattern};
+                }
+            }
+        }
+    }
+
+    if (!$why && defined $custom_skip_reasons{keyword}) {
+        foreach my $keyword (getpart("info", "keywords")) {
+            foreach my $keyword_skip_pattern (keys %{$custom_skip_reasons{keyword}}) {
+                if ($keyword =~ /$keyword_skip_pattern/i) {
+                    $why = $custom_skip_reasons{keyword}{$keyword_skip_pattern};
+                }
+            }
+        }
+    }
+
+
     # test definition may instruct to (un)set environment vars
     # this is done this early, so that the precheck can use environment
     # variables and still bail out fine on errors
@@ -3540,25 +3718,16 @@
     # "basic" test case readers to enjoy variable replacements.
     my @entiretest = fulltest();
     my $otest = "log/test$testnum";
+
+    @entiretest = prepro($testnum, @entiretest);
+
+    # save the new version
     open(D, ">$otest");
-    my $diff;
-    for my $s (@entiretest) {
-        my $f = $s;
-        subVariables(\$s, "%");
-        subBase64(\$s);
-        if($f ne $s) {
-            $diff++;
-        }
-        print D $s;
-    }
+    print D @entiretest;
     close(D);
 
-    # remove the separate test file again if nothing was updated to keep
-    # things simpler
-    unlink($otest) if(!$diff);
-
     # in case the process changed the file, reload it
-    loadtest("log/test${testnum}") if($diff);
+    loadtest("log/test${testnum}");
 
     # timestamp required servers verification end
     $timesrvrend{$testnum} = Time::HiRes::time();
@@ -3567,7 +3736,6 @@
     if(@setenv) {
         foreach my $s (@setenv) {
             chomp $s;
-            subVariables(\$s);
             if($s =~ /([^=]*)=(.*)/) {
                 my ($var, $content) = ($1, $2);
                 # remember current setting, to restore it once test runs
@@ -3593,13 +3761,16 @@
             }
         }
     }
+    if($use_external_proxy) {
+        $ENV{http_proxy} = $proxy_address;
+        $ENV{HTTPS_PROXY} = $proxy_address;
+    }
 
     if(!$why) {
         my @precheck = getpart("client", "precheck");
         if(@precheck) {
             $cmd = $precheck[0];
             chomp $cmd;
-            subVariables(\$cmd);
             if($cmd) {
                 my @p = split(/ /, $cmd);
                 if($p[0] !~ /\//) {
@@ -3614,7 +3785,7 @@
                     $cmd = join(" ", @p);
                 }
 
-                my @o = `$cmd 2>/dev/null`;
+                my @o = `$cmd 2>log/precheck-$testnum`;
                 if($o[0]) {
                     $why = $o[0];
                     chomp $why;
@@ -3678,23 +3849,20 @@
             map s/\n/\r\n/g, @reply;
         }
     }
-    for my $r (@reply) {
-        subVariables(\$r);
-    }
 
     # this is the valid protocol blurb curl should generate
-    my @protocol= fixarray ( getpart("verify", "protocol") );
+    my @protocol= getpart("verify", "protocol");
 
     # this is the valid protocol blurb curl should generate to a proxy
-    my @proxyprot = fixarray ( getpart("verify", "proxy") );
+    my @proxyprot = getpart("verify", "proxy");
 
     # redirected stdout/stderr to these files
     $STDOUT="$LOGDIR/stdout$testnum";
     $STDERR="$LOGDIR/stderr$testnum";
 
     # if this section exists, we verify that the stdout contained this:
-    my @validstdout = fixarray ( getpart("verify", "stdout") );
-    my @validstderr = fixarray ( getpart("verify", "stderr") );
+    my @validstdout = getpart("verify", "stdout");
+    my @validstderr = getpart("verify", "stderr");
 
     # if this section exists, we verify upload
     my @upload = getpart("verify", "upload");
@@ -3707,7 +3875,7 @@
     }
 
     # if this section exists, it might be FTP server instructions:
-    my @ftpservercmd = fixarray ( getpart("reply", "servercmd") );
+    my @ftpservercmd = getpart("reply", "servercmd");
 
     my $CURLOUT="$LOGDIR/curl$testnum.out"; # curl output if not stdout
 
@@ -3745,7 +3913,6 @@
         # make some nice replace operations
         $cmd =~ s/\n//g; # no newlines please
         # substitute variables in the command line
-        subVariables(\$cmd);
     }
     else {
         # there was no command given, use something silly
@@ -3767,7 +3934,6 @@
                 return -1;
             }
             my $fileContent = join('', @inputfile);
-            subVariables(\$fileContent);
             open(OUTFILE, ">$filename");
             binmode OUTFILE; # for crapage systems, use binary
             if($fileattr{'nonewline'}) {
@@ -3845,6 +4011,9 @@
             $fail_due_event_based--;
         }
         $cmdargs .= $cmd;
+        if ($use_external_proxy) {
+            $cmdargs .= " --proxy $proxy_address ";
+        }
     }
     else {
         $cmdargs = " $cmd"; # $cmd is the command line for the test file
@@ -4039,7 +4208,6 @@
     if(@postcheck) {
         $cmd = join("", @postcheck);
         chomp $cmd;
-        subVariables(\$cmd);
         if($cmd) {
             logmsg "postcheck $cmd\n" if($verbose);
             my $rc = runclient("$cmd");
@@ -4099,9 +4267,6 @@
             @actual = @newgen;
         }
 
-        # variable-replace in the stdout we have from the test case file
-        @validstdout = fixarray(@validstdout);
-
         # get all attributes
         my %hash = getpartattr("verify", "stdout");
 
@@ -4150,9 +4315,6 @@
             @actual = @newgen;
         }
 
-        # variable-replace in the stderr we have from the test case file
-        @validstderr = fixarray(@validstderr);
-
         # get all attributes
         my %hash = getpartattr("verify", "stderr");
 
@@ -4208,7 +4370,7 @@
         # what parts to cut off from the protocol
         my @strippart = getpart("verify", "strippart");
         my $strip;
-        @strippart = fixarray(@strippart);
+
         for $strip (@strippart) {
             chomp $strip;
             for(@out) {
@@ -4363,8 +4525,6 @@
                 @generated = @newgen;
             }
 
-            @outfile = fixarray(@outfile);
-
             $res = compare($testnum, $testname, "output ($filename)",
                            \@generated, \@outfile);
             if($res) {
@@ -4572,7 +4732,7 @@
         $what =~ s/[^a-z0-9\/-]//g;
 
         my $certfile;
-        if($what =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
+        if($what =~ /^(ftp|gopher|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
             $certfile = ($whatlist[1]) ? $whatlist[1] : 'stunnel.pem';
         }
 
@@ -4789,7 +4949,7 @@
             }
             if(!$run{'https'}) {
                 ($pid, $pid2, $HTTPSPORT) =
-                    runhttpsserver($verbose, "", "", $certfile);
+                    runhttpsserver($verbose, "https", "", $certfile);
                 if($pid <= 0) {
                     return "failed starting HTTPS server (stunnel)";
                 }
@@ -4798,6 +4958,41 @@
                 $run{'https'}="$pid $pid2";
             }
         }
+        elsif($what eq "gophers") {
+            if(!$stunnel) {
+                # we can't run TLS tests without stunnel
+                return "no stunnel";
+            }
+            if($runcert{'gophers'} && ($runcert{'gophers'} ne $certfile)) {
+                # stop server when running and using a different cert
+                stopserver('gophers');
+            }
+            if($torture && $run{'gopher'} &&
+               !responsive_http_server("gopher", $verbose, 0, $GOPHERPORT)) {
+                stopserver('gopher');
+            }
+            if(!$run{'gopher'}) {
+                ($pid, $pid2, $GOPHERPORT) =
+                    runhttpserver("gopher", $verbose, 0);
+                if($pid <= 0) {
+                    return "failed starting GOPHER server";
+                }
+                printf ("* pid gopher => %d %d\n", $pid, $pid2) if($verbose);
+                print "GOPHERPORT => $GOPHERPORT\n" if($verbose);
+                $run{'gopher'}="$pid $pid2";
+            }
+            if(!$run{'gophers'}) {
+                ($pid, $pid2, $GOPHERSPORT) =
+                    runhttpsserver($verbose, "gophers", "", $certfile);
+                if($pid <= 0) {
+                    return "failed starting GOPHERS server (stunnel)";
+                }
+                logmsg sprintf("* pid gophers => %d %d\n", $pid, $pid2)
+                    if($verbose);
+                print "GOPHERSPORT => $GOPHERSPORT\n" if($verbose);
+                $run{'gophers'}="$pid $pid2";
+            }
+        }
         elsif($what eq "https-proxy") {
             if(!$stunnel) {
                 # we can't run https-proxy tests without stunnel
@@ -4818,7 +5013,7 @@
 
             if(!$run{'https-proxy'}) {
                 ($pid, $pid2, $HTTPSPROXYPORT) =
-                    runhttpsserver($verbose, "", "proxy", $certfile);
+                    runhttpsserver($verbose, "https", "proxy", $certfile);
                 if($pid <= 0) {
                     return "failed starting HTTPS-proxy (stunnel)";
                 }
@@ -5170,12 +5365,6 @@
     logmsg "\n";
 }
 
-# globally disabled tests
-disabledtests("$TESTDIR/DISABLED");
-
-# locally disabled tests, ignored by git etc
-disabledtests("$TESTDIR/DISABLED.local");
-
 #######################################################################
 # Check options to this test program
 #
@@ -5218,6 +5407,32 @@
         # run the tests cases event based if possible
         $run_event_based=1;
     }
+    elsif($ARGV[0] eq "-f") {
+        # force - run the test case even if listed in DISABLED
+        $run_disabeled=1;
+    }
+    elsif($ARGV[0] eq "-E") {
+        # load additional reasons to skip tests
+        shift @ARGV;
+        my $exclude_file = $ARGV[0];
+        open(my $fd, "<", $exclude_file) or die "Couldn't open '$exclude_file': $!";
+        while(my $line = <$fd>) {
+            next if ($line =~ /^#/);
+            chomp $line;
+            my ($type, $patterns, $skip_reason) = split(/\s*:\s*/, $line, 3);
+
+            die "Unsupported type: $type\n" if($type !~ /^keyword|test|tool$/);
+
+            foreach my $pattern (split(/,/, $patterns)) {
+                if($type =~ /^test$/) {
+                    # Strip leading zeros in the test number
+                    $pattern = int($pattern);
+                }
+                $custom_skip_reasons{$type}{$pattern} = $skip_reason;
+            }
+        }
+        close($fd);
+    }
     elsif ($ARGV[0] eq "-g") {
         # run this test with gdb
         $gdbthis=1;
@@ -5271,9 +5486,28 @@
         # continue anyway, even if a test fail
         $anyway=1;
     }
+    elsif($ARGV[0] eq "-o") {
+        shift @ARGV;
+        if ($ARGV[0] =~ /^(\w+)=([\w.:\/\[\]-]+)$/) {
+            my ($variable, $value) = ($1, $2);
+            eval "\$$variable='$value'" or die "Failed to set \$$variable to $value: $@";
+        } else {
+            die "Failed to parse '-o $ARGV[0]'. May contain unexpected characters.\n";
+        }
+    }
     elsif($ARGV[0] eq "-p") {
         $postmortem=1;
     }
+    elsif($ARGV[0] eq "-P") {
+        shift @ARGV;
+        $use_external_proxy=1;
+        $proxy_address=$ARGV[0];
+    }
+    elsif($ARGV[0] eq "-L") {
+        # require additional library file
+        shift @ARGV;
+        require $ARGV[0];
+    }
     elsif($ARGV[0] eq "-l") {
         # lists the test case names only
         $listonly=1;
@@ -5310,6 +5544,10 @@
             $fullstats=1;
         }
     }
+    elsif($ARGV[0] eq "-rm") {
+        # force removal of files by killing locking processes
+        $clearlocks=1;
+    }
     elsif(($ARGV[0] eq "-h") || ($ARGV[0] eq "--help")) {
         # show help text
         print <<EOHELP
@@ -5319,16 +5557,22 @@
   -c path  use this curl executable
   -d       display server debug info
   -e       event-based execution
+  -E file  load the specified file to exclude certain tests
+  -f       forcibly run even if disabled
   -g       run the test case with gdb
   -gw      run the test case with gdb as a windowed application
   -h       this help text
   -k       keep stdout and stderr files present after tests
+  -L path  require an additional perl library file to replace certain functions
   -l       list all test case names/descriptions
   -n       no valgrind
+  -o variable=value set internal variable to the specified value
+  -P proxy use the specified proxy
   -p       print log file contents when a test fails
   -R       scrambled order (uses the random seed, see --seed)
   -r       run time statistics
   -rf      full run time statistics
+  -rm      force removal of files by killing locking processes (Windows only)
   -s       short output
   --seed=[num] set the random seed to a fixed number
   --shallow=[num] randomly makes the torture tests "thinner"
@@ -5349,16 +5593,7 @@
         $number = $1;
         if($fromnum >= 0) {
             for my $n ($fromnum .. $number) {
-                if($disabled{$n}) {
-                    # skip disabled test cases
-                    my $why = "configured as DISABLED";
-                    $skipped++;
-                    $skipped{$why}++;
-                    $teststat[$n]=$why; # store reason for this test case
-                }
-                else {
-                    push @testthis, $n;
-                }
+                push @testthis, $n;
             }
             $fromnum = -1;
         }
@@ -5487,12 +5722,16 @@
     checksystem();
 }
 
+# globally disabled tests
+disabledtests("$TESTDIR/DISABLED");
+
 #######################################################################
 # Fetch all disabled tests, if there are any
 #
 
 sub disabledtests {
     my ($file) = @_;
+    my @input;
 
     if(open(D, "<$file")) {
         while(<D>) {
@@ -5500,17 +5739,29 @@
                 # allow comments
                 next;
             }
-            if($_ =~ /(\d+)/) {
+            push @input, $_;
+        }
+        close(D);
+
+        # preprocess the input to make conditionally disabled tests depending
+        # on variables
+        my @pp = prepro(0, @input);
+        for my $t (@pp) {
+            if($t =~ /(\d+)/) {
                 my ($n) = $1;
                 $disabled{$n}=$n; # disable this test number
                 if(! -f "$srcdir/data/test$n") {
-                    print STDERR "WARNING! Non-existing test $n in DISABLED!\n";
+                    print STDERR "WARNING! Non-existing test $n in $file!\n";
                     # fail hard to make user notice
                     exit 1;
                 }
+                logmsg "DISABLED: test $n\n" if ($verbose);
+            }
+            else {
+                print STDERR "$file: rubbish content: $t\n";
+                exit 2;
             }
         }
-        close(D);
     }
 }
 
@@ -5770,18 +6021,6 @@
 
 runtimestats($lasttest);
 
-if($total) {
-    logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
-                   $ok/$total*100);
-
-    if($ok != $total) {
-        logmsg "TESTFAIL: These test cases failed: $failed\n";
-    }
-}
-else {
-    logmsg "TESTFAIL: No tests were performed\n";
-}
-
 if($all) {
     logmsg "TESTDONE: $all tests were considered during ".
         sprintf("%.0f", $sofar) ." seconds.\n";
@@ -5789,33 +6028,61 @@
 
 if($skipped && !$short) {
     my $s=0;
+    # Temporary hash to print the restraints sorted by the number
+    # of their occurences
+    my %restraints;
     logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n";
 
     for(keys %skipped) {
         my $r = $_;
-        printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$_};
+        my $skip_count = $skipped{$r};
+        my $log_line = sprintf("TESTINFO: \"%s\" %d time%s (", $r, $skip_count,
+                           ($skip_count == 1) ? "" : "s");
 
-        # now show all test case numbers that had this reason for being
+        # now gather all test case numbers that had this reason for being
         # skipped
         my $c=0;
         my $max = 9;
         for(0 .. scalar @teststat) {
             my $t = $_;
-            if($teststat[$_] && ($teststat[$_] eq $r)) {
+            if($teststat[$t] && ($teststat[$t] eq $r)) {
                 if($c < $max) {
-                    logmsg ", " if($c);
-                    logmsg $_;
+                    $log_line .= ", " if($c);
+                    $log_line .= $t;
                 }
                 $c++;
             }
         }
         if($c > $max) {
-            logmsg " and ".($c-$max)." more";
+            $log_line .= " and ".($c-$max)." more";
         }
-        logmsg ")\n";
+        $log_line .= ")\n";
+        $restraints{$log_line} = $skip_count;
+    }
+    foreach my $log_line (sort {$restraints{$b} <=> $restraints{$a}} keys %restraints) {
+        logmsg $log_line;
     }
 }
 
-if($total && (($ok+$ign) != $total)) {
+if($total) {
+    logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
+                   $ok/$total*100);
+
+    if($ok != $total) {
+        logmsg "\nTESTFAIL: These test cases failed: $failed\n\n";
+    }
+}
+else {
+    logmsg "\nTESTFAIL: No tests were performed\n\n";
+    if(scalar(keys %enabled_keywords)) {
+        logmsg "TESTFAIL: Nothing matched these keywords: ";
+        for(keys %enabled_keywords) {
+            logmsg "$_ ";
+        }
+        logmsg "\n";
+    }
+}
+
+if(($total && (($ok+$ign) != $total)) || !$total) {
     exit 1;
 }
diff --git a/tests/secureserver.pl b/tests/secureserver.pl
index ac279cb..be1de05 100755
--- a/tests/secureserver.pl
+++ b/tests/secureserver.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt
index 3bfa649..8e4806b 100644
--- a/tests/server/CMakeLists.txt
+++ b/tests/server/CMakeLists.txt
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am
index ca306e2..944cd02 100644
--- a/tests/server/Makefile.am
+++ b/tests/server/Makefile.am
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/Makefile.inc b/tests/server/Makefile.inc
index 55bc3a7..35d4dba 100644
--- a/tests/server/Makefile.inc
+++ b/tests/server/Makefile.inc
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/base64.pl b/tests/server/base64.pl
index d00673e..e1b88cf 100755
--- a/tests/server/base64.pl
+++ b/tests/server/base64.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/disabled.c b/tests/server/disabled.c
index c82847d..6f7c10f 100644
--- a/tests/server/disabled.c
+++ b/tests/server/disabled.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -30,6 +30,7 @@
  */
 
 #include "curl_setup.h"
+#include "multihandle.h" /* for ENABLE_WAKEUP */
 #include <stdio.h>
 
 static const char *disabled[]={
@@ -66,6 +67,9 @@
 #ifdef CURL_DISABLE_VERBOSE_STRINGS
   "verbose-strings",
 #endif
+#ifndef ENABLE_WAKEUP
+  "wakeup",
+#endif
   NULL
 };
 
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
index c9211f7..ae281ca 100644
--- a/tests/server/fake_ntlm.c
+++ b/tests/server/fake_ntlm.c
@@ -10,7 +10,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index 664d815..32b55bc 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -278,7 +278,7 @@
 int getpart(char **outbuf, size_t *outlen,
             const char *main, const char *sub, FILE *stream)
 {
-# define MAX_TAG_LEN 79
+# define MAX_TAG_LEN 200
   char couter[MAX_TAG_LEN + 1]; /* current outermost section */
   char cmain[MAX_TAG_LEN + 1];  /* current main section */
   char csub[MAX_TAG_LEN + 1];   /* current sub section */
diff --git a/tests/server/getpart.h b/tests/server/getpart.h
index e8ddd22..2111392 100644
--- a/tests/server/getpart.h
+++ b/tests/server/getpart.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c
index 6785b00..a1b0624 100644
--- a/tests/server/mqttd.c
+++ b/tests/server/mqttd.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -106,6 +106,7 @@
                             this */
   bool publish_before_suback;
   bool short_publish;
+  bool excessive_remaining;
   unsigned char error_connack;
   int testnum;
 };
@@ -130,6 +131,7 @@
   config.version = CONFIG_VERSION;
   config.publish_before_suback = FALSE;
   config.short_publish = FALSE;
+  config.excessive_remaining = FALSE;
   config.error_connack = 0;
   config.testnum = 0;
 }
@@ -171,6 +173,10 @@
           config.testnum = atoi(value);
           logmsg("testnum = %d", config.testnum);
         }
+        else if(!strcmp(key, "excessive-remaining")) {
+          logmsg("excessive-remaining set");
+          config.excessive_remaining = TRUE;
+        }
       }
     }
     fclose(fp);
@@ -213,12 +219,10 @@
   ssize_t i;
   unsigned char *ptr = buffer;
   char *optr = data;
-  ssize_t width = 0;
   int left = sizeof(data);
 
   for(i = 0; i<len && (left >= 0); i++) {
     msnprintf(optr, left, "%02x", ptr[i]);
-    width += 2;
     optr += 2;
     left -= 2;
   }
@@ -339,7 +343,8 @@
 */
 
 /* return number of bytes used */
-static int encode_length(size_t packetlen, char *remlength) /* 4 bytes */
+static int encode_length(size_t packetlen,
+                         unsigned char *remlength) /* 4 bytes */
 {
   int bytes = 0;
   unsigned char encode;
@@ -395,10 +400,19 @@
   ssize_t packetlen;
   ssize_t sendamount;
   ssize_t rc;
-  char rembuffer[4];
+  unsigned char rembuffer[4];
   int encodedlen;
 
-  encodedlen = encode_length(remaininglength, rembuffer);
+  if(config.excessive_remaining) {
+    /* manually set illegal remaining length */
+    rembuffer[0] = 0xff;
+    rembuffer[1] = 0xff;
+    rembuffer[2] = 0xff;
+    rembuffer[3] = 0x80; /* maximum allowed here by spec is 0x7f */
+    encodedlen = 4;
+  }
+  else
+    encodedlen = encode_length(remaininglength, rembuffer);
 
   /* one packet type byte (possibly two more for packetid) */
   packetlen = remaininglength + encodedlen + 1;
@@ -476,16 +490,20 @@
 
 static curl_socket_t mqttit(curl_socket_t fd)
 {
-  unsigned char buffer[10*1024];
+  size_t buff_size = 10*1024;
+  unsigned char *buffer = NULL;
   ssize_t rc;
   unsigned char byte;
   unsigned short packet_id;
   size_t payload_len;
+  size_t client_id_length;
   unsigned int topic_len;
   size_t remaining_length = 0;
   size_t bytes = 0; /* remaining length field size in bytes */
   char client_id[MAX_CLIENT_ID_LENGTH];
   long testno;
+  FILE *stream = NULL;
+
 
   static const char protocol[7] = {
     0x00, 0x04,       /* protocol length */
@@ -503,12 +521,36 @@
   if(testno)
     logmsg("Found test number %ld", testno);
 
+  buffer = malloc(buff_size);
+  if(!buffer) {
+    logmsg("Out of memory, unable to allocate buffer");
+    goto end;
+  }
+
   do {
+    unsigned char usr_flag = 0x80;
+    unsigned char passwd_flag = 0x40;
+    unsigned char conn_flags;
+    const size_t client_id_offset = 12;
+    size_t start_usr;
+    size_t start_passwd;
+
     /* get the fixed header */
     rc = fixedheader(fd, &byte, &remaining_length, &bytes);
     if(rc)
       break;
+
+    if(remaining_length >= buff_size) {
+      buff_size = remaining_length;
+      buffer = realloc(buffer, buff_size);
+      if(!buffer) {
+        logmsg("Failed realloc of size %lu", buff_size);
+        goto end;
+      }
+    }
+
     if(remaining_length) {
+      /* reading variable header and payload into buffer */
       rc = sread(fd, (char *)buffer, remaining_length);
       if(rc > 0) {
         logmsg("READ %d bytes", rc);
@@ -525,19 +567,40 @@
         goto end;
       }
       /* ignore the connect flag byte and two keepalive bytes */
-
       payload_len = (buffer[10] << 8) | buffer[11];
+      /* first part of the payload is the client ID */
+      client_id_length = payload_len;
+
+      /* checking if user and password flags were set */
+      conn_flags = buffer[7];
+
+      start_usr = client_id_offset + payload_len;
+      if(usr_flag == (unsigned char)(conn_flags & usr_flag)) {
+        logmsg("User flag is present in CONN flag");
+        payload_len += (buffer[start_usr] << 8) | buffer[start_usr + 1];
+        payload_len += 2; /* MSB and LSB for user length */
+      }
+
+      start_passwd = client_id_offset + payload_len;
+      if(passwd_flag == (char)(conn_flags & passwd_flag)) {
+        logmsg("Password flag is present in CONN flags");
+        payload_len += (buffer[start_passwd] << 8) | buffer[start_passwd + 1];
+        payload_len += 2; /* MSB and LSB for password length */
+      }
+
+      /* check the length of the payload */
       if((ssize_t)payload_len != (rc - 12)) {
         logmsg("Payload length mismatch, expected %x got %x",
                rc - 12, payload_len);
         goto end;
       }
-      else if((payload_len + 1) > MAX_CLIENT_ID_LENGTH) {
+      /* check the length of the client ID */
+      else if((client_id_length + 1) > MAX_CLIENT_ID_LENGTH) {
         logmsg("Too large client id");
         goto end;
       }
-      memcpy(client_id, &buffer[14], payload_len);
-      client_id[payload_len] = 0;
+      memcpy(client_id, &buffer[12], client_id_length);
+      client_id[client_id_length] = 0;
 
       logmsg("MQTT client connect accepted: %s", client_id);
 
@@ -550,7 +613,6 @@
       }
     }
     else if(byte == MQTT_MSG_SUBSCRIBE) {
-      FILE *stream;
       int error;
       char *data;
       size_t datalen;
@@ -636,7 +698,12 @@
   } while(1);
 
   end:
-  fclose(dump);
+  if(buffer)
+    free(buffer);
+  if(dump)
+    fclose(dump);
+  if(stream)
+    fclose(stream);
   return CURL_SOCKET_BAD;
 }
 
diff --git a/tests/server/resolve.c b/tests/server/resolve.c
index f725618..6905b7e 100644
--- a/tests/server/resolve.c
+++ b/tests/server/resolve.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c
index 6ee7787..97aad7a 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -369,7 +369,7 @@
                   memcpy(rtp_scratch + 4 + i, RTP_DATA, RTP_DATA_SIZE);
                 }
 
-                if(req->rtp_buffer == NULL) {
+                if(!req->rtp_buffer) {
                   req->rtp_buffer = rtp_scratch;
                   req->rtp_buffersize = rtp_size + 4;
                 }
@@ -552,7 +552,6 @@
   if(!req->pipe &&
      req->open &&
      req->prot_version >= 11 &&
-     end &&
      req->reqbuf + req->offset > end + strlen(END_OF_HEADERS) &&
      (!strncmp(req->reqbuf, "GET", strlen("GET")) ||
       !strncmp(req->reqbuf, "HEAD", strlen("HEAD")))) {
@@ -600,15 +599,15 @@
   size_t writeleft;
   FILE *dump;
 
-  if(reqbuf == NULL)
+  if(!reqbuf)
     return;
   if(totalsize == 0)
     return;
 
   do {
     dump = fopen(REQUEST_DUMP, "ab");
-  } while((dump == NULL) && ((error = errno) == EINTR));
-  if(dump == NULL) {
+  } while(!dump && ((error = errno) == EINTR));
+  if(!dump) {
     logmsg("Error opening file %s error: %d %s",
            REQUEST_DUMP, error, strerror(error));
     logmsg("Failed to write request input to " REQUEST_DUMP);
diff --git a/tests/server/server_setup.h b/tests/server/server_setup.h
index 1f2cef1..e406a3d 100644
--- a/tests/server/server_setup.h
+++ b/tests/server/server_setup.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/server_sockaddr.h b/tests/server/server_sockaddr.h
index c3602e1..e725311 100644
--- a/tests/server/server_sockaddr.h
+++ b/tests/server/server_sockaddr.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index f528181..d109d69 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -668,7 +668,7 @@
 
   /* allocate internal array for the internal data */
   data = calloc(nfds, sizeof(struct select_ws_data));
-  if(data == NULL) {
+  if(!data) {
     CloseHandle(abort);
     CloseHandle(mutex);
     errno = ENOMEM;
@@ -677,7 +677,7 @@
 
   /* allocate internal array for the internal event handles */
   handles = calloc(nfds + 1, sizeof(HANDLE));
-  if(handles == NULL) {
+  if(!handles) {
     CloseHandle(abort);
     CloseHandle(mutex);
     free(data);
@@ -725,6 +725,7 @@
             handles[nfd] = signal;
             data[nth].signal = signal;
             data[nth].thread = handle;
+            nfd++;
             nth++;
           }
           else {
@@ -734,13 +735,18 @@
       }
       else if(fd == fileno(stdout)) {
         handles[nfd] = GetStdHandle(STD_OUTPUT_HANDLE);
+        nfd++;
       }
       else if(fd == fileno(stderr)) {
         handles[nfd] = GetStdHandle(STD_ERROR_HANDLE);
+        nfd++;
       }
       else {
         wsaevent = WSACreateEvent();
         if(wsaevent != WSA_INVALID_EVENT) {
+          if(wsaevents.lNetworkEvents & FD_WRITE) {
+            send(wsasock, NULL, 0, 0); /* reset FD_WRITE */
+          }
           error = WSAEventSelect(wsasock, wsaevent, wsaevents.lNetworkEvents);
           if(error != SOCKET_ERROR) {
             handles[nfd] = (HANDLE)wsaevent;
@@ -760,6 +766,7 @@
               if(FD_ISSET(wsasock, &exceptsock))
                 data[nfd].wsastate |= FD_OOB;
             }
+            nfd++;
             nws++;
           }
           else {
@@ -772,6 +779,7 @@
                 handles[nfd] = signal;
                 data[nth].signal = signal;
                 data[nth].thread = handle;
+                nfd++;
                 nth++;
               }
               else {
@@ -781,7 +789,6 @@
           }
         }
       }
-      nfd++;
     }
   }
 
diff --git a/tests/server/socksd.c b/tests/server/socksd.c
index e6e9c12..7b1abfa 100644
--- a/tests/server/socksd.c
+++ b/tests/server/socksd.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,7 +48,7 @@
  *                        0 - no auth
  *                        1 - GSSAPI (not supported)
  *                        2 - user + password
- * "response [number]" - the decimal number to repsond to a connect
+ * "response [number]" - the decimal number to respond to a connect
  *                       SOCKS5: 0 is OK, SOCKS4: 90 is ok
  *
  */
@@ -479,7 +479,7 @@
     return CURL_SOCKET_BAD;
   }
   /* reserved, should be zero */
-  if(buffer[SOCKS5_RESERVED] != 0) {
+  if(buffer[SOCKS5_RESERVED]) {
     logmsg("Request COMMAND byte not %d", config.reqcmd);
     return CURL_SOCKET_BAD;
   }
diff --git a/tests/server/sws.c b/tests/server/sws.c
index b0f2a83..010e5ae 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -81,8 +81,7 @@
 static int serverlogslocked = 0;
 static bool is_proxy = FALSE;
 
-#define REQBUFSIZ 150000
-#define REQBUFSIZ_TXT "149999"
+#define REQBUFSIZ (2*1024*1024)
 
 static long prevtestno = -1;    /* previous test number we served */
 static long prevpartno = -1;    /* previous part number we served */
@@ -238,10 +237,10 @@
 /* parse the file on disk that might have a test number for us */
 static int parse_cmdfile(struct httprequest *req)
 {
-  int testnum = DOCNUMBER_NOTHING;
-  char buf[256];
   FILE *f = fopen(cmdfile, FOPEN_READTEXT);
   if(f) {
+    int testnum = DOCNUMBER_NOTHING;
+    char buf[256];
     while(fgets(buf, sizeof(buf), f)) {
       if(1 == sscanf(buf, "Testnum %d", &testnum)) {
         logmsg("[%s] cmdfile says testnum %d", cmdfile, testnum);
@@ -748,7 +747,6 @@
 
   if(req->open &&
      req->prot_version >= 11 &&
-     end &&
      req->reqbuf + req->offset > end + strlen(end_of_headers) &&
      !req->cl &&
      (!strncmp(req->reqbuf, "GET", strlen("GET")) ||
@@ -793,15 +791,15 @@
   FILE *dump;
   const char *dumpfile = is_proxy?REQUEST_PROXY_DUMP:REQUEST_DUMP;
 
-  if(reqbuf == NULL)
+  if(!reqbuf)
     return;
   if(totalsize == 0)
     return;
 
   do {
     dump = fopen(dumpfile, "ab");
-  } while((dump == NULL) && ((error = errno) == EINTR));
-  if(dump == NULL) {
+  } while(!dump && ((error = errno) == EINTR));
+  if(!dump) {
     logmsg("[2] Error opening file %s error: %d %s",
            dumpfile, error, strerror(error));
     logmsg("Failed to write request input ");
@@ -1443,9 +1441,14 @@
         /* a new connection on listener socket (most likely from client) */
         curl_socket_t datafd = accept(rootfd, NULL, NULL);
         if(datafd != CURL_SOCKET_BAD) {
-          struct httprequest req2;
+          static struct httprequest *req2;
           int err = 0;
-          memset(&req2, 0, sizeof(req2));
+          if(!req2) {
+            req2 = malloc(sizeof(*req2));
+            if(!req2)
+              exit(1);
+          }
+          memset(req2, 0, sizeof(*req2));
           logmsg("====> Client connect DATA");
 #ifdef TCP_NODELAY
           if(socket_domain_is_ip()) {
@@ -1456,9 +1459,9 @@
               logmsg("====> TCP_NODELAY for client DATA connection failed");
           }
 #endif
-          init_httprequest(&req2);
-          while(!req2.done_processing) {
-            err = get_request(datafd, &req2);
+          init_httprequest(req2);
+          while(!req2->done_processing) {
+            err = get_request(datafd, req2);
             if(err < 0) {
               /* this socket must be closed, done or not */
               break;
@@ -1467,14 +1470,14 @@
 
           /* skip this and close the socket if err < 0 */
           if(err >= 0) {
-            err = send_doc(datafd, &req2);
-            if(!err && req2.connect_request) {
+            err = send_doc(datafd, req2);
+            if(!err && req2->connect_request) {
               /* sleep to prevent triggering libcurl known bug #39. */
               for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
                 wait_ms(250);
               if(!got_exit_signal) {
                 /* connect to the server */
-                serverfd[DATA] = connect_to(ipaddr, req2.connect_port);
+                serverfd[DATA] = connect_to(ipaddr, req2->connect_port);
                 if(serverfd[DATA] != CURL_SOCKET_BAD) {
                   /* secondary tunnel established, now we have two
                      connections */
@@ -1873,7 +1876,7 @@
 #endif
   const char *pidname = ".http.pid";
   const char *portname = ".http.port";
-  struct httprequest req;
+  struct httprequest *req;
   int rc = 0;
   int error;
   int arg = 1;
@@ -1886,7 +1889,9 @@
   /* a default CONNECT port is basically pointless but still ... */
   size_t socket_idx;
 
-  memset(&req, 0, sizeof(req));
+  req = calloc(1, sizeof(*req));
+  if(!req)
+    return 0;
 
   while(argc>arg) {
     if(!strcmp("--version", argv[arg])) {
@@ -2067,9 +2072,9 @@
     strncpy(me.sau.sun_path, unix_socket, sizeof(me.sau.sun_path) - 1);
     rc = bind(sock, &me.sa, sizeof(me.sau));
     if(0 != rc && errno == EADDRINUSE) {
-      struct stat statbuf;
+      struct_stat statbuf;
       /* socket already exists. Perhaps it is stale? */
-      int unixfd = socket(AF_UNIX, SOCK_STREAM, 0);
+      curl_socket_t unixfd = socket(AF_UNIX, SOCK_STREAM, 0);
       if(CURL_SOCKET_BAD == unixfd) {
         error = SOCKERRNO;
         logmsg("Error binding socket, failed to create socket at %s: (%d) %s",
@@ -2079,25 +2084,31 @@
       /* check whether the server is alive */
       rc = connect(unixfd, &me.sa, sizeof(me.sau));
       error = errno;
-      close(unixfd);
+      sclose(unixfd);
       if(ECONNREFUSED != error) {
         logmsg("Error binding socket, failed to connect to %s: (%d) %s",
                unix_socket, error, strerror(error));
         goto sws_cleanup;
       }
-      /* socket server is not alive, now check if it was actually a socket.
-       * Systems which have Unix sockets will also have lstat */
+      /* socket server is not alive, now check if it was actually a socket. */
+#ifdef WIN32
+      /* Windows does not have lstat function. */
+      rc = curlx_win32_stat(unix_socket, &statbuf);
+#else
       rc = lstat(unix_socket, &statbuf);
+#endif
       if(0 != rc) {
         logmsg("Error binding socket, failed to stat %s: (%d) %s",
                unix_socket, errno, strerror(errno));
         goto sws_cleanup;
       }
+#ifdef S_IFSOCK
       if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) {
         logmsg("Error binding socket, failed to stat %s: (%d) %s",
                unix_socket, error, strerror(error));
         goto sws_cleanup;
       }
+#endif
       /* dead socket, cleanup and retry bind */
       rc = unlink(unix_socket);
       if(0 != rc) {
@@ -2199,7 +2210,7 @@
      the pipelining struct field must be initialized previously to FALSE
      every time a new connection arrives. */
 
-  init_httprequest(&req);
+  init_httprequest(req);
 
   for(;;) {
     fd_set input;
@@ -2278,20 +2289,20 @@
 
         /* Service this connection until it has nothing available */
         do {
-          rc = service_connection(all_sockets[socket_idx], &req, sock,
+          rc = service_connection(all_sockets[socket_idx], req, sock,
                                   connecthost);
           if(got_exit_signal)
             goto sws_cleanup;
 
           if(rc < 0) {
-            logmsg("====> Client disconnect %d", req.connmon);
+            logmsg("====> Client disconnect %d", req->connmon);
 
-            if(req.connmon) {
+            if(req->connmon) {
               const char *keepopen = "[DISCONNECT]\n";
               storerequest(keepopen, strlen(keepopen));
             }
 
-            if(!req.open)
+            if(!req->open)
               /* When instructed to close connection after server-reply we
                  wait a very small amount of time before doing so. If this
                  is not done client might get an ECONNRESET before reading
@@ -2307,13 +2318,13 @@
             if(!serverlogslocked)
               clear_advisor_read_lock(SERVERLOGS_LOCK);
 
-            if(req.testno == DOCNUMBER_QUIT)
+            if(req->testno == DOCNUMBER_QUIT)
               goto sws_cleanup;
           }
 
           /* Reset the request, unless we're still in the middle of reading */
-          if(rc != 0)
-            init_httprequest(&req);
+          if(rc)
+            init_httprequest(req);
         } while(rc > 0);
       }
     }
diff --git a/tests/server/testpart.c b/tests/server/testpart.c
index 9c295e0..1ea9c20 100644
--- a/tests/server/testpart.c
+++ b/tests/server/testpart.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/tftp.h b/tests/server/tftp.h
index 62a0cc3..5699672 100644
--- a/tests/server/tftp.h
+++ b/tests/server/tftp.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 4215bfe..92d5849 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -821,11 +821,6 @@
     sclose(peer);
     peer = CURL_SOCKET_BAD;
 
-    if(test.ofile > 0) {
-      close(test.ofile);
-      test.ofile = 0;
-    }
-
     if(got_exit_signal)
       break;
 
@@ -1304,6 +1299,11 @@
     }
   } while(size == SEGSIZE);
   write_behind(test, pf->f_convert);
+  /* close the output file as early as possible after upload completion */
+  if(test->ofile > 0) {
+    close(test->ofile);
+    test->ofile = 0;
+  }
 
   rap->th_opcode = htons((unsigned short)opcode_ACK);  /* send the "final"
                                                           ack */
@@ -1326,6 +1326,11 @@
     (void) swrite(peer, &ackbuf.storage[0], 4);  /* resend final ack */
   }
 abort:
+  /* make sure the output file is closed in case of abort */
+  if(test->ofile > 0) {
+    close(test->ofile);
+    test->ofile = 0;
+  }
   return;
 }
 
diff --git a/tests/server/util.c b/tests/server/util.c
index 7dac532..38d6395 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -171,7 +171,7 @@
   wVersionRequested = MAKEWORD(2, 2);
   err = WSAStartup(wVersionRequested, &wsaData);
 
-  if(err != 0) {
+  if(err) {
     perror("Winsock init failed");
     logmsg("Error initialising winsock -- aborting");
     exit(1);
@@ -317,8 +317,8 @@
 
   do {
     lockfile = fopen(filename, "wb");
-  } while((lockfile == NULL) && ((error = errno) == EINTR));
-  if(lockfile == NULL) {
+  } while(!lockfile && ((error = errno) == EINTR));
+  if(!lockfile) {
     logmsg("Error creating lock file %s error: %d %s",
            filename, error, strerror(error));
     return;
@@ -535,15 +535,9 @@
     (long)(newer.tv_usec-older.tv_usec)/1000;
 }
 
-/* do-nothing macro replacement for systems which lack siginterrupt() */
-
-#ifndef HAVE_SIGINTERRUPT
-#define siginterrupt(x,y) do {} while(0)
-#endif
-
 /* vars used to keep around previous signal handlers */
 
-typedef RETSIGTYPE (*SIGHANDLER_T)(int);
+typedef void (*SIGHANDLER_T)(int);
 
 #ifdef SIGHUP
 static SIGHANDLER_T old_sighup_handler  = SIG_ERR;
@@ -591,7 +585,7 @@
  * The first time this is called it will set got_exit_signal to one and
  * store in exit_signal the signal that triggered its execution.
  */
-static RETSIGTYPE exit_signal_handler(int signum)
+static void exit_signal_handler(int signum)
 {
   int old_errno = errno;
   logmsg("exit_signal_handler: %d", signum);
@@ -721,6 +715,36 @@
 }
 #endif
 
+static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler,
+                               bool restartable)
+{
+#if defined(HAVE_SIGACTION) && defined(SA_RESTART)
+  struct sigaction sa, oldsa;
+
+  memset(&sa, 0, sizeof(sa));
+  sa.sa_handler = handler;
+  sigemptyset(&sa.sa_mask);
+  sigaddset(&sa.sa_mask, signum);
+  sa.sa_flags = restartable? SA_RESTART: 0;
+
+  if(sigaction(signum, &sa, &oldsa))
+    return SIG_ERR;
+
+  return oldsa.sa_handler;
+#else
+  SIGHANDLER_T oldhdlr = signal(signum, handler);
+
+#ifdef HAVE_SIGINTERRUPT
+  if(oldhdlr != SIG_ERR)
+    siginterrupt(signum, (int) restartable);
+#else
+  (void) restartable;
+#endif
+
+  return oldhdlr;
+#endif
+}
+
 void install_signal_handlers(bool keep_sigalrm)
 {
 #ifdef WIN32
@@ -731,20 +755,20 @@
 #endif
 #ifdef SIGHUP
   /* ignore SIGHUP signal */
-  old_sighup_handler = signal(SIGHUP, SIG_IGN);
+  old_sighup_handler = set_signal(SIGHUP, SIG_IGN, FALSE);
   if(old_sighup_handler == SIG_ERR)
     logmsg("cannot install SIGHUP handler: %s", strerror(errno));
 #endif
 #ifdef SIGPIPE
   /* ignore SIGPIPE signal */
-  old_sigpipe_handler = signal(SIGPIPE, SIG_IGN);
+  old_sigpipe_handler = set_signal(SIGPIPE, SIG_IGN, FALSE);
   if(old_sigpipe_handler == SIG_ERR)
     logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
 #endif
 #ifdef SIGALRM
   if(!keep_sigalrm) {
     /* ignore SIGALRM signal */
-    old_sigalrm_handler = signal(SIGALRM, SIG_IGN);
+    old_sigalrm_handler = set_signal(SIGALRM, SIG_IGN, FALSE);
     if(old_sigalrm_handler == SIG_ERR)
       logmsg("cannot install SIGALRM handler: %s", strerror(errno));
   }
@@ -753,27 +777,21 @@
 #endif
 #ifdef SIGINT
   /* handle SIGINT signal with our exit_signal_handler */
-  old_sigint_handler = signal(SIGINT, exit_signal_handler);
+  old_sigint_handler = set_signal(SIGINT, exit_signal_handler, TRUE);
   if(old_sigint_handler == SIG_ERR)
     logmsg("cannot install SIGINT handler: %s", strerror(errno));
-  else
-    siginterrupt(SIGINT, 1);
 #endif
 #ifdef SIGTERM
   /* handle SIGTERM signal with our exit_signal_handler */
-  old_sigterm_handler = signal(SIGTERM, exit_signal_handler);
+  old_sigterm_handler = set_signal(SIGTERM, exit_signal_handler, TRUE);
   if(old_sigterm_handler == SIG_ERR)
     logmsg("cannot install SIGTERM handler: %s", strerror(errno));
-  else
-    siginterrupt(SIGTERM, 1);
 #endif
 #if defined(SIGBREAK) && defined(WIN32)
   /* handle SIGBREAK signal with our exit_signal_handler */
-  old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler);
+  old_sigbreak_handler = set_signal(SIGBREAK, exit_signal_handler, TRUE);
   if(old_sigbreak_handler == SIG_ERR)
     logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
-  else
-    siginterrupt(SIGBREAK, 1);
 #endif
 #ifdef WIN32
   if(!SetConsoleCtrlHandler(ctrl_event_handler, TRUE))
@@ -791,31 +809,31 @@
 {
 #ifdef SIGHUP
   if(SIG_ERR != old_sighup_handler)
-    (void)signal(SIGHUP, old_sighup_handler);
+    (void) set_signal(SIGHUP, old_sighup_handler, FALSE);
 #endif
 #ifdef SIGPIPE
   if(SIG_ERR != old_sigpipe_handler)
-    (void)signal(SIGPIPE, old_sigpipe_handler);
+    (void) set_signal(SIGPIPE, old_sigpipe_handler, FALSE);
 #endif
 #ifdef SIGALRM
   if(!keep_sigalrm) {
     if(SIG_ERR != old_sigalrm_handler)
-      (void)signal(SIGALRM, old_sigalrm_handler);
+      (void) set_signal(SIGALRM, old_sigalrm_handler, FALSE);
   }
 #else
   (void)keep_sigalrm;
 #endif
 #ifdef SIGINT
   if(SIG_ERR != old_sigint_handler)
-    (void)signal(SIGINT, old_sigint_handler);
+    (void) set_signal(SIGINT, old_sigint_handler, FALSE);
 #endif
 #ifdef SIGTERM
   if(SIG_ERR != old_sigterm_handler)
-    (void)signal(SIGTERM, old_sigterm_handler);
+    (void) set_signal(SIGTERM, old_sigterm_handler, FALSE);
 #endif
 #if defined(SIGBREAK) && defined(WIN32)
   if(SIG_ERR != old_sigbreak_handler)
-    (void)signal(SIGBREAK, old_sigbreak_handler);
+    (void) set_signal(SIGBREAK, old_sigbreak_handler, FALSE);
 #endif
 #ifdef WIN32
   (void)SetConsoleCtrlHandler(ctrl_event_handler, FALSE);
diff --git a/tests/server/util.h b/tests/server/util.h
index 6295392..68473f2 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -11,7 +11,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/serverhelp.pm b/tests/serverhelp.pm
index 466091f..77eceec 100644
--- a/tests/serverhelp.pm
+++ b/tests/serverhelp.pm
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -106,7 +106,7 @@
 
     $proto = uc($proto) if($proto);
     die "unsupported protocol: '$proto'" unless($proto &&
-        ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS|DICT|SMB|SMBS|TELNET|MQTT))$/));
+        ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|GOPHER|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|HTTPTLS|DICT|SMB|SMBS|TELNET|MQTT))$/));
 
     $ipver = (not $ipver) ? 'ipv4' : lc($ipver);
     die "unsupported IP version: '$ipver'" unless($ipver &&
diff --git a/tests/smbserver.py b/tests/smbserver.py
index 30caa04..a49023b 100755
--- a/tests/smbserver.py
+++ b/tests/smbserver.py
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -21,21 +21,23 @@
 #
 """Server for testing SMB"""
 
-from __future__ import (absolute_import, division, print_function)
+from __future__ import absolute_import, division, print_function
 # NOTE: the impacket configuration is not unicode_literals compatible!
+
 import argparse
+import logging
 import os
 import sys
-import logging
 import tempfile
+
+# Import our curl test data helper
+from util import ClosingFileHandler, TestData
+
 if sys.version_info.major >= 3:
     import configparser
 else:
     import ConfigParser as configparser
 
-# Import our curl test data helper
-import curl_test_data
-
 # impacket needs to be installed in the Python environment
 try:
     import impacket
@@ -43,10 +45,10 @@
     sys.stderr.write('Python package impacket needs to be installed!\n')
     sys.stderr.write('Use pip or your package manager to install it.\n')
     sys.exit(1)
-from impacket import smbserver as imp_smbserver
 from impacket import smb as imp_smb
-from impacket.nt_errors import (STATUS_ACCESS_DENIED, STATUS_SUCCESS,
-                                STATUS_NO_SUCH_FILE)
+from impacket import smbserver as imp_smbserver
+from impacket.nt_errors import (STATUS_ACCESS_DENIED, STATUS_NO_SUCH_FILE,
+                                STATUS_SUCCESS)
 
 log = logging.getLogger(__name__)
 SERVER_MAGIC = "SERVER_MAGIC"
@@ -120,7 +122,7 @@
                                          config_parser=config_parser)
 
         # Set up a test data object so we can get test data later.
-        self.ctd = curl_test_data.TestData(test_data_directory)
+        self.ctd = TestData(test_data_directory)
 
         # Override smbComNtCreateAndX so we can pretend to have files which
         # don't exist.
@@ -353,7 +355,7 @@
 
     # Write out to a logfile
     if options.logfile:
-        handler = logging.FileHandler(options.logfile, mode="w")
+        handler = ClosingFileHandler(options.logfile)
         handler.setFormatter(formatter)
         handler.setLevel(logging.DEBUG)
         root_logger.addHandler(handler)
diff --git a/tests/sshhelp.pm b/tests/sshhelp.pm
index cd7f58f..0f71b30 100644
--- a/tests/sshhelp.pm
+++ b/tests/sshhelp.pm
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/sshserver.pl b/tests/sshserver.pl
index 5cff897..9441939 100644
--- a/tests/sshserver.pl
+++ b/tests/sshserver.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/symbol-scan.pl b/tests/symbol-scan.pl
index 2b2d627..d3058b1 100755
--- a/tests/symbol-scan.pl
+++ b/tests/symbol-scan.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -22,7 +22,7 @@
 ###########################################################################
 #
 # This script grew out of help from Przemyslaw Iskra and Balint Szilakszi
-# a late evening in the #curl IRC channel on freenode.
+# a late evening in the #curl IRC channel.
 #
 
 use strict;
diff --git a/tests/testcurl.1 b/tests/testcurl.1
index a15bc04..795975d 100644
--- a/tests/testcurl.1
+++ b/tests/testcurl.1
@@ -5,11 +5,11 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
-.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" * are also available at https://curl.se/docs/copyright.html.
 .\" *
 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 .\" * copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH testcurl.pl 1 "October 22, 2016" "Curl 7.73.0" "testcurl"
+.TH testcurl.pl 1 "November 05, 2020" "Curl 7.78.0" "testcurl"
 
 .SH NAME
 testcurl.pl \- (automatically) test curl
@@ -33,7 +33,7 @@
 mailed to curl-autocompile@haxx.se to be dealt with automatically (make sure
 the subject includes the word "autobuild" as the mail gets silently discarded
 otherwise).  The most current build status (with a reasonable backlog) will be
-published on the curl site, at https://curl.haxx.se/dev/builds.html
+published on the curl site, at https://curl.se/dev/builds.html
 
 \fIoptions\fP may be omitted. See \fI--setup\fP for what happens then.
 
@@ -80,7 +80,7 @@
 .SH "INITIAL SETUP"
 First you make a checkout from git (or you write a script that downloads daily
 snapshots automatically, find inspiration in
-https://curl.haxx.se/dev/autocurl.txt ):
+https://curl.se/dev/autocurl.txt ):
 
 .nf
   $ mkdir daily-curl
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index 1606831..541ff9d 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -6,11 +6,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -32,7 +32,7 @@
 # curl-autocompile@haxx.se to be dealt with automatically (make sure the
 # subject includes the word "autobuild" as the mail gets silently discarded
 # otherwise).  The most current build status (with a reasonable backlog) will
-# be published on the curl site, at https://curl.haxx.se/auto/
+# be published on the curl site, at https://curl.se/auto/
 
 # USAGE:
 # testcurl.pl [options] [curl-daily-name] > output
@@ -306,7 +306,7 @@
 if (!$confopts) {
   if ($infixed < 4) {
     print "please enter your additional arguments to configure\n";
-    print "examples: --with-ssl --enable-debug --enable-ipv6 --with-krb4\n";
+    print "examples: --with-openssl --enable-debug --enable-ipv6\n";
     $confopts = <>;
     chomp $confopts;
   }
diff --git a/tests/tftpserver.pl b/tests/tftpserver.pl
index a7b9b39..f9fbbe9 100755
--- a/tests/tftpserver.pl
+++ b/tests/tftpserver.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt
index e5c4127..cc4b7bf 100644
--- a/tests/unit/CMakeLists.txt
+++ b/tests/unit/CMakeLists.txt
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 63e11b1..e2fdd87 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
index f63724f..3354f45 100644
--- a/tests/unit/Makefile.inc
+++ b/tests/unit/Makefile.inc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -34,7 +34,8 @@
  unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607 \
  unit1608 unit1609 unit1610 unit1611 unit1612 \
  unit1620 unit1621 \
- unit1650 unit1651 unit1652 unit1653 unit1654 unit1655
+ unit1650 unit1651 unit1652 unit1653 unit1654 unit1655 \
+ unit1660 unit1661
 
 unit1300_SOURCES = unit1300.c $(UNITFILES)
 unit1300_CPPFLAGS = $(AM_CPPFLAGS)
@@ -70,9 +71,9 @@
 unit1330_CPPFLAGS = $(AM_CPPFLAGS)
 
 unit1394_SOURCES = unit1394.c $(UNITFILES)
-unit1394_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
-unit1394_LDADD = @LIBMETALINK_LIBS@ $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
-unit1394_LDFLAGS = @LIBMETALINK_LDFLAGS@ $(top_builddir)/src/libcurltool.la
+unit1394_CPPFLAGS = $(AM_CPPFLAGS)
+unit1394_LDADD = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+unit1394_LDFLAGS = $(top_builddir)/src/libcurltool.la
 unit1394_LIBS =
 
 unit1395_SOURCES = unit1395.c $(UNITFILES)
@@ -103,7 +104,7 @@
 unit1603_CPPFLAGS = $(AM_CPPFLAGS)
 
 unit1604_SOURCES = unit1604.c $(UNITFILES)
-unit1604_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
+unit1604_CPPFLAGS = $(AM_CPPFLAGS)
 
 unit1605_SOURCES = unit1605.c $(UNITFILES)
 unit1605_CPPFLAGS = $(AM_CPPFLAGS)
@@ -154,3 +155,8 @@
 unit1655_SOURCES = unit1655.c $(UNITFILES)
 unit1655_CPPFLAGS = $(AM_CPPFLAGS)
 
+unit1660_SOURCES = unit1660.c $(UNITFILES)
+unit1660_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1661_SOURCES = unit1661.c $(UNITFILES)
+unit1661_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h
index 016119a..3651551 100644
--- a/tests/unit/curlcheck.h
+++ b/tests/unit/curlcheck.h
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -22,29 +22,35 @@
 #include "test.h"
 
 /* The fail macros mark the current test step as failed, and continue */
-#define fail_if(expr, msg)                              \
-  if(expr) {                                            \
-    fprintf(stderr, "%s:%d Assertion '%s' met: %s\n",   \
-            __FILE__, __LINE__, #expr, msg);            \
-    unitfail++;                                         \
-  }
+#define fail_if(expr, msg)                                \
+  do {                                                    \
+    if(expr) {                                            \
+      fprintf(stderr, "%s:%d Assertion '%s' met: %s\n",   \
+              __FILE__, __LINE__, #expr, msg);            \
+      unitfail++;                                         \
+    }                                                     \
+  } while(0)
 
-#define fail_unless(expr, msg)                           \
-  if(!(expr)) {                                          \
-    fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
-            __FILE__, __LINE__, #expr, msg);             \
-    unitfail++;                                          \
-  }
+#define fail_unless(expr, msg)                             \
+  do {                                                     \
+    if(!(expr)) {                                          \
+      fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
+              __FILE__, __LINE__, #expr, msg);             \
+      unitfail++;                                          \
+    }                                                      \
+  } while(0)
 
-#define verify_memory(dynamic, check, len)                                  \
-  if(dynamic && memcmp(dynamic, check, len)) {                              \
-    fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n",  \
-            __FILE__, __LINE__, len,                                        \
-            hexdump((const unsigned char *)check, len));                    \
-    fprintf(stderr, "%s:%d the same as '%s'\n", __FILE__, __LINE__,         \
-            hexdump((const unsigned char *)dynamic, len));                  \
-    unitfail++;                                                             \
-  }
+#define verify_memory(dynamic, check, len)                              \
+  do {                                                                  \
+    if(dynamic && memcmp(dynamic, check, len)) {                             \
+      fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n", \
+              __FILE__, __LINE__, len,                                  \
+              hexdump((const unsigned char *)check, len));              \
+      fprintf(stderr, "%s:%d the same as '%s'\n", __FILE__, __LINE__,   \
+              hexdump((const unsigned char *)dynamic, len));            \
+      unitfail++;                                                       \
+    }                                                                   \
+  } while(0)
 
 /* fail() is for when the test case figured out by itself that a check
    proved a failure */
@@ -56,23 +62,28 @@
 
 
 /* The abort macros mark the current test step as failed, and exit the test */
-#define abort_if(expr, msg)                                   \
-  if(expr) {                                                  \
-    fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n",   \
-            __FILE__, __LINE__, #expr, msg);                  \
-    unitfail++;                                               \
-    goto unit_test_abort;                                     \
-  }
+#define abort_if(expr, msg)                                     \
+  do {                                                          \
+    if(expr) {                                                  \
+      fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n",   \
+              __FILE__, __LINE__, #expr, msg);                  \
+      unitfail++;                                               \
+      goto unit_test_abort;                                     \
+    }                                                           \
+  } while(0)
 
-#define abort_unless(expr, msg)                                \
-  if(!(expr)) {                                                \
-    fprintf(stderr, "%s:%d Abort assertion '%s' failed: %s\n", \
-            __FILE__, __LINE__, #expr, msg);                   \
-    unitfail++;                                                \
-    goto unit_test_abort;                                      \
-  }
+#define abort_unless(expr, msg)                                         \
+  do {                                                                  \
+    if(!(expr)) {                                                       \
+      fprintf(stderr, "%s:%d Abort assertion '%s' failed: %s\n",        \
+              __FILE__, __LINE__, #expr, msg);                          \
+      unitfail++;                                                       \
+      goto unit_test_abort;                                             \
+    }                                                                   \
+  } while(0)
 
-#define abort_test(msg) do {                                  \
+#define abort_test(msg)                                       \
+  do {                                                        \
     fprintf(stderr, "%s:%d test aborted: '%s'\n",             \
             __FILE__, __LINE__, msg);                         \
     unitfail++;                                               \
@@ -80,7 +91,6 @@
   } while(0)
 
 
-
 extern int unitfail;
 
 #define UNITTEST_START                          \
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
index 3c23ab8..aba068a 100644
--- a/tests/unit/unit1300.c
+++ b/tests/unit/unit1300.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1301.c b/tests/unit/unit1301.c
index 2af60be..ec57874 100644
--- a/tests/unit/unit1301.c
+++ b/tests/unit/unit1301.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1302.c b/tests/unit/unit1302.c
index bd240d5..af337ce 100644
--- a/tests/unit/unit1302.c
+++ b/tests/unit/unit1302.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -34,8 +34,10 @@
 
   global_init(CURL_GLOBAL_ALL);
   data = curl_easy_init();
-  if(!data)
+  if(!data) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
   return res;
 }
 
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c
index 945b82b..4c25fb9 100644
--- a/tests/unit/unit1303.c
+++ b/tests/unit/unit1303.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -33,8 +33,10 @@
 
   global_init(CURL_GLOBAL_ALL);
   data = curl_easy_init();
-  if(!data)
+  if(!data) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
   return res;
 }
 
diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c
index c1d36e8..a6dc64d 100644
--- a/tests/unit/unit1304.c
+++ b/tests/unit/unit1304.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
index e53b8fd..b0e8eda 100644
--- a/tests/unit/unit1305.c
+++ b/tests/unit/unit1305.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -48,8 +48,10 @@
 {
   int rc;
   data = curl_easy_init();
-  if(!data)
+  if(!data) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
 
   rc = Curl_mk_dnscache(&hp);
   if(rc) {
diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c
index 7e88ea4..a657b61 100644
--- a/tests/unit/unit1307.c
+++ b/tests/unit/unit1307.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1308.c b/tests/unit/unit1308.c
index ac41c9d..b19555b 100644
--- a/tests/unit/unit1308.c
+++ b/tests/unit/unit1308.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
index 8805303..91eb040 100644
--- a/tests/unit/unit1309.c
+++ b/tests/unit/unit1309.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -40,7 +40,7 @@
   struct Curl_tree *node;
   int i;
   int count;
-  if(t == NULL)
+  if(!t)
     return;
 
   splayprint(t->larger, d + 1, output);
@@ -99,7 +99,7 @@
     splayprint(root, 0, 1);
     printf("remove pointer %d, payload %zu\n", rem,
            *(size_t *)nodes[rem].payload);
-    rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
+    rc = Curl_splayremove(root, &nodes[rem], &root);
     if(rc) {
       /* failed! */
       printf("remove %d failed!\n", rem);
diff --git a/tests/unit/unit1323.c b/tests/unit/unit1323.c
index 1adb274..1658253 100644
--- a/tests/unit/unit1323.c
+++ b/tests/unit/unit1323.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1330.c b/tests/unit/unit1330.c
index c9f19cc..b365798 100644
--- a/tests/unit/unit1330.c
+++ b/tests/unit/unit1330.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1394.c b/tests/unit/unit1394.c
index d6644f8..035ccf5 100644
--- a/tests/unit/unit1394.c
+++ b/tests/unit/unit1394.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c
index b8440b4..c362cc3 100644
--- a/tests/unit/unit1395.c
+++ b/tests/unit/unit1395.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1396.c b/tests/unit/unit1396.c
index 4dd25b4..66f8fc1 100644
--- a/tests/unit/unit1396.c
+++ b/tests/unit/unit1396.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1397.c b/tests/unit/unit1397.c
index 432b909..508f41a 100644
--- a/tests/unit/unit1397.c
+++ b/tests/unit/unit1397.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1398.c b/tests/unit/unit1398.c
index 8b132a0..e73ce24 100644
--- a/tests/unit/unit1398.c
+++ b/tests/unit/unit1398.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -64,27 +64,27 @@
 
 /* negative width */
 rc = curl_msnprintf(output, 8, "%-8s", str);
-fail_unless(rc == 8, "return code should be 8");
+fail_unless(rc == 7, "return code should be 7");
 fail_unless(!strcmp(output, "bug    "), "wrong output");
 
 /* larger width that string length */
 rc = curl_msnprintf(output, 8, "%8s", str);
-fail_unless(rc == 8, "return code should be 8");
+fail_unless(rc == 7, "return code should be 7");
 fail_unless(!strcmp(output, "     bu"), "wrong output");
 
 /* output a number in a limited output */
 rc = curl_msnprintf(output, 4, "%d", 10240);
-fail_unless(rc == 4, "return code should be 4");
+fail_unless(rc == 3, "return code should be 3");
 fail_unless(!strcmp(output, "102"), "wrong output");
 
 /* padded strings */
 rc = curl_msnprintf(output, 16, "%8s%8s", str, str);
-fail_unless(rc == 16, "return code should be 16");
+fail_unless(rc == 15, "return code should be 15");
 fail_unless(!strcmp(output, "     bug     bu"), "wrong output");
 
 /* padded numbers */
 rc = curl_msnprintf(output, 16, "%8d%8d", 1234, 5678);
-fail_unless(rc == 16, "return code should be 16");
+fail_unless(rc == 15, "return code should be 15");
 fail_unless(!strcmp(output, "    1234    567"), "wrong output");
 
 UNITTEST_STOP
diff --git a/tests/unit/unit1399.c b/tests/unit/unit1399.c
index 3b52989..261e0b1 100644
--- a/tests/unit/unit1399.c
+++ b/tests/unit/unit1399.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1600.c b/tests/unit/unit1600.c
index 4e774aa..506a120 100644
--- a/tests/unit/unit1600.c
+++ b/tests/unit/unit1600.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,8 +32,10 @@
 
   global_init(CURL_GLOBAL_ALL);
   easy = curl_easy_init();
-  if(!easy)
+  if(!easy) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
   return res;
 }
 
diff --git a/tests/unit/unit1601.c b/tests/unit/unit1601.c
index bf00bc7..4bee3f0 100644
--- a/tests/unit/unit1601.c
+++ b/tests/unit/unit1601.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1602.c b/tests/unit/unit1602.c
index 1898b72..ee6acac 100644
--- a/tests/unit/unit1602.c
+++ b/tests/unit/unit1602.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1603.c b/tests/unit/unit1603.c
index 771ffc0..f9170ef 100644
--- a/tests/unit/unit1603.c
+++ b/tests/unit/unit1603.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1604.c b/tests/unit/unit1604.c
index 9c4f776..d811858 100644
--- a/tests/unit/unit1604.c
+++ b/tests/unit/unit1604.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -82,7 +82,6 @@
 };
 
 UNITTEST_START
-
 { /* START sanitize_file_name */
   struct data data[] = {
     { "", 0,
@@ -349,7 +348,6 @@
 
 #else
 UNITTEST_START
-
 {
   fprintf(stderr, "Skipped test not for this platform\n");
 }
diff --git a/tests/unit/unit1605.c b/tests/unit/unit1605.c
index 0ec726a..26115a8 100644
--- a/tests/unit/unit1605.c
+++ b/tests/unit/unit1605.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -31,8 +31,10 @@
 
   global_init(CURL_GLOBAL_ALL);
   easy = curl_easy_init();
-  if(!easy)
+  if(!easy) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
   return res;
 }
 
diff --git a/tests/unit/unit1606.c b/tests/unit/unit1606.c
index 9da0b70..8dee3b4 100644
--- a/tests/unit/unit1606.c
+++ b/tests/unit/unit1606.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -32,8 +32,10 @@
 
   global_init(CURL_GLOBAL_ALL);
   easy = curl_easy_init();
-  if(!easy)
+  if(!easy) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
   return res;
 }
 
diff --git a/tests/unit/unit1607.c b/tests/unit/unit1607.c
index e8d4120..8da06f1 100644
--- a/tests/unit/unit1607.c
+++ b/tests/unit/unit1607.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -49,6 +49,9 @@
   const char *host;
   int port;
 
+  /* whether we expect a permanent or non-permanent cache entry */
+  bool permanent;
+
   /* 0 to 9 addresses expected from hostcache */
   const char *address[10];
 };
@@ -67,34 +70,37 @@
 static const struct testcase tests[] = {
   /* spaces aren't allowed, for now */
   { "test.com:80:127.0.0.1, 127.0.0.2",
-    "test.com", 80, { NULL, }
+    "test.com", 80, TRUE, { NULL, }
   },
   { "TEST.com:80:,,127.0.0.1,,,127.0.0.2,,,,::1,,,",
-    "test.com", 80, { "127.0.0.1", "127.0.0.2", IPV6ONLY("::1"), }
+    "test.com", 80, TRUE, { "127.0.0.1", "127.0.0.2", IPV6ONLY("::1"), }
   },
   { "test.com:80:::1,127.0.0.1",
-    "test.com", 80, { IPV6ONLY("::1"), "127.0.0.1", }
+    "test.com", 80, TRUE, { IPV6ONLY("::1"), "127.0.0.1", }
   },
   { "test.com:80:[::1],127.0.0.1",
-    "test.com", 80, { IPV6ONLY("::1"), "127.0.0.1", }
+    "test.com", 80, TRUE, { IPV6ONLY("::1"), "127.0.0.1", }
   },
   { "test.com:80:::1",
-    "test.com", 80, { IPV6ONLY("::1"), }
+    "test.com", 80, TRUE, { IPV6ONLY("::1"), }
   },
   { "test.com:80:[::1]",
-    "test.com", 80, { IPV6ONLY("::1"), }
+    "test.com", 80, TRUE, { IPV6ONLY("::1"), }
   },
   { "test.com:80:127.0.0.1",
-    "test.com", 80, { "127.0.0.1", }
+    "test.com", 80, TRUE, { "127.0.0.1", }
   },
   { "test.com:80:,127.0.0.1",
-    "test.com", 80, { "127.0.0.1", }
+    "test.com", 80, TRUE, { "127.0.0.1", }
   },
   { "test.com:80:127.0.0.1,",
-    "test.com", 80, { "127.0.0.1", }
+    "test.com", 80, TRUE, { "127.0.0.1", }
   },
   { "test.com:0:127.0.0.1",
-    "test.com", 0, { "127.0.0.1", }
+    "test.com", 0, TRUE, { "127.0.0.1", }
+  },
+  { "+test.com:80:127.0.0.1,",
+    "test.com", 80, FALSE, { "127.0.0.1", }
   },
 };
 
@@ -139,7 +145,7 @@
     addr = dns ? dns->addr : NULL;
 
     for(j = 0; j < addressnum; ++j) {
-      long port = 0;
+      int port = 0;
       char ipaddress[MAX_IPADR_LEN] = {0};
 
       if(!addr && !tests[i].address[j])
@@ -188,10 +194,18 @@
         break;
       }
 
-      if(dns->timestamp != 0) {
-        fprintf(stderr, "%s:%d tests[%d] failed. the timestamp is not zero. "
-                "for tests[%d].address[%d\n",
-                __FILE__, __LINE__, i, i, j);
+      if(dns->timestamp && tests[i].permanent) {
+        fprintf(stderr, "%s:%d tests[%d] failed. the timestamp is not zero "
+                "but tests[%d].permanent is TRUE\n",
+                __FILE__, __LINE__, i, i);
+        problem = true;
+        break;
+      }
+
+      if(dns->timestamp == 0 && !tests[i].permanent) {
+        fprintf(stderr, "%s:%d tests[%d] failed. the timestamp is zero "
+                "but tests[%d].permanent is FALSE\n",
+                __FILE__, __LINE__, i, i);
         problem = true;
         break;
       }
diff --git a/tests/unit/unit1608.c b/tests/unit/unit1608.c
index fc767d1..45ca7a3 100644
--- a/tests/unit/unit1608.c
+++ b/tests/unit/unit1608.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -41,7 +41,7 @@
 
 static void unit_stop(void)
 {
-
+  curl_global_cleanup();
 }
 
 UNITTEST_START
diff --git a/tests/unit/unit1609.c b/tests/unit/unit1609.c
index ce3ddf9..a845832 100644
--- a/tests/unit/unit1609.c
+++ b/tests/unit/unit1609.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -147,7 +147,7 @@
     addr = dns ? dns->addr : NULL;
 
     for(j = 0; j < addressnum; ++j) {
-      long port = 0;
+      int port = 0;
       char ipaddress[MAX_IPADR_LEN] = {0};
 
       if(!addr && !tests[i].address[j])
diff --git a/tests/unit/unit1610.c b/tests/unit/unit1610.c
index bb9c937..2a18f5c 100644
--- a/tests/unit/unit1610.c
+++ b/tests/unit/unit1610.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1611.c b/tests/unit/unit1611.c
index bc19f8a..948484b 100644
--- a/tests/unit/unit1611.c
+++ b/tests/unit/unit1611.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1612.c b/tests/unit/unit1612.c
index 3fb2de0..caddd02 100644
--- a/tests/unit/unit1612.c
+++ b/tests/unit/unit1612.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1620.c b/tests/unit/unit1620.c
index b23e5b9..4f1aaaf 100644
--- a/tests/unit/unit1620.c
+++ b/tests/unit/unit1620.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1621.c b/tests/unit/unit1621.c
index 618abed..ec361df 100644
--- a/tests/unit/unit1621.c
+++ b/tests/unit/unit1621.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1650.c b/tests/unit/unit1650.c
index b2fc89e..de54c08 100644
--- a/tests/unit/unit1650.c
+++ b/tests/unit/unit1650.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1651.c b/tests/unit/unit1651.c
index 44dbf4b..fb013b4 100644
--- a/tests/unit/unit1651.c
+++ b/tests/unit/unit1651.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -35,7 +35,7 @@
 #if defined(USE_GSKIT) || defined(USE_NSS) || defined(USE_GNUTLS) || \
     defined(USE_WOLFSSL) || defined(USE_SCHANNEL)
 
-/* cert captured from gdb when connecting to curl.haxx.se on October 26
+/* cert captured from gdb when connecting to curl.se on October 26
    2018 */
 static unsigned char cert[] = {
   0x30, 0x82, 0x0F, 0x5B, 0x30, 0x82, 0x0E, 0x43, 0xA0, 0x03, 0x02, 0x01, 0x02,
@@ -346,7 +346,6 @@
 UNITTEST_START
 {
   CURLcode result;
-  struct connectdata conn;
   const char *beg = (const char *)&cert[0];
   const char *end = (const char *)&cert[sizeof(cert)];
   struct Curl_easy *data = curl_easy_init();
@@ -355,11 +354,7 @@
   if(!data)
     return 2;
 
-  memset(&conn, 0, sizeof(struct connectdata));
-  /* this is a lot of assuming, but we expect the parsing function to only
-     really need the easy handle pointer */
-  conn.data = data;
-  result = Curl_extract_certinfo(&conn, 0, beg, end);
+  result = Curl_extract_certinfo(data, 0, beg, end);
 
   fail_unless(result == CURLE_OK, "Curl_extract_certinfo returned error");
 
@@ -369,7 +364,7 @@
     for(i = 0; i < 45; i++) {
       char backup = cert[i];
       cert[i] = (unsigned char) (byte & 0xff);
-      (void) Curl_extract_certinfo(&conn, 0, beg, end);
+      (void) Curl_extract_certinfo(data, 0, beg, end);
       cert[i] = backup;
     }
   }
diff --git a/tests/unit/unit1652.c b/tests/unit/unit1652.c
index 9693fe6..56dad0c 100644
--- a/tests/unit/unit1652.c
+++ b/tests/unit/unit1652.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -63,8 +63,10 @@
 
   global_init(CURL_GLOBAL_ALL);
   data = curl_easy_init();
-  if(!data)
+  if(!data) {
+    curl_global_cleanup();
     return CURLE_OUT_OF_MEMORY;
+  }
   curl_easy_setopt(data, CURLOPT_DEBUGFUNCTION, debugf_cb);
   curl_easy_setopt(data, CURLOPT_VERBOSE, 1L);
   return CURLE_OK;
@@ -77,30 +79,39 @@
   curl_global_cleanup();
 }
 
+static int verify(const char *info, const char *two)
+{
+  /* the 'info' one has a newline appended */
+  char *nl = strchr(info, '\n');
+  if(!nl)
+    return 1; /* nope */
+  return strncmp(info, two, nl - info);
+}
+
 UNITTEST_START
 
 /* Injecting a simple short string via a format */
 msnprintf(input, sizeof(input), "Simple Test");
 Curl_infof(data, "%s", input);
-fail_unless(strcmp(result, input) == 0, "Simple string test");
+fail_unless(verify(result, input) == 0, "Simple string test");
 
 /* Injecting a few different variables with a format */
-Curl_infof(data, "%s %u testing %lu\n", input, 42, 43L);
-fail_unless(strcmp(result, "Simple Test 42 testing 43\n") == 0,
+Curl_infof(data, "%s %u testing %lu", input, 42, 43L);
+fail_unless(verify(result, "Simple Test 42 testing 43\n") == 0,
             "Format string");
 
 /* Variations of empty strings */
 Curl_infof(data, "");
-fail_unless(strlen(result) == 0, "Empty string");
+fail_unless(strlen(result) == 1, "Empty string");
 Curl_infof(data, "%s", NULL);
-fail_unless(strcmp(result, "(nil)") == 0, "Passing NULL as string");
+fail_unless(verify(result, "(nil)") == 0, "Passing NULL as string");
 
 /* A string just long enough to not be truncated */
 memset(input, '\0', sizeof(input));
-memset(input, 'A', 2048);
+memset(input, 'A', 2047);
 Curl_infof(data, "%s", input);
 fail_unless(strlen(result) == 2048, "No truncation of infof input");
-fail_unless(strcmp(result, input) == 0, "No truncation of infof input");
+fail_unless(verify(result, input) == 0, "No truncation of infof input");
 fail_unless(result[sizeof(result) - 1] == '\0',
             "No truncation of infof input");
 
@@ -109,25 +120,20 @@
 Curl_infof(data, "%s", input);
 fail_unless(strlen(result) == 2048, "Truncation of infof input 1");
 fail_unless(result[sizeof(result) - 1] == '\0', "Truncation of infof input 1");
-fail_unless(strncmp(result + 2045, "...", 3) == 0,
-            "Truncation of infof input 1");
 
 /* Just over the limit for truncation with newline */
 memset(input + 2047, 'A', 4);
 memset(input + 2047 + 4, '\n', 1);
-Curl_infof(data, "%s\n", input);
+Curl_infof(data, "%s", input);
 fail_unless(strlen(result) == 2048, "Truncation of infof input 2");
 fail_unless(result[sizeof(result) - 1] == '\0', "Truncation of infof input 2");
-fail_unless(strncmp(result + 2044, "...", 3) == 0,
-            "Truncation of infof input 2");
 
 /* Way over the limit for truncation with newline */
 memset(input, '\0', sizeof(input));
 memset(input, 'A', sizeof(input) - 1);
-Curl_infof(data, "%s\n", input);
+Curl_infof(data, "%s", input);
 fail_unless(strlen(result) == 2048, "Truncation of infof input 3");
 fail_unless(result[sizeof(result) - 1] == '\0', "Truncation of infof input 3");
-fail_unless(strncmp(result + 2044, "...", 3) == 0,
-            "Truncation of infof input 3");
+
 
 UNITTEST_STOP
diff --git a/tests/unit/unit1653.c b/tests/unit/unit1653.c
index c5d8f3b..7d02ae6 100644
--- a/tests/unit/unit1653.c
+++ b/tests/unit/unit1653.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -55,7 +55,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15]");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
   ret = curl_url_get(u, CURLUPART_PORT, &portnum, CURLU_NO_DEFAULT_PORT);
   fail_unless(ret != CURLUE_OK, "curl_url_get portnum returned something");
@@ -69,7 +69,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15|");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret != CURLUE_OK, "Curl_parse_port true on error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
@@ -80,7 +80,7 @@
   ipv6port = strdup("[fe80::250:56ff;fea7:da15]:80");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret != CURLUE_OK, "Curl_parse_port true on error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
@@ -92,7 +92,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15%25eth3]:80");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
   ret = curl_url_get(u, CURLUPART_PORT, &portnum, 0);
   fail_unless(ret == CURLUE_OK, "curl_url_get portnum returned error");
@@ -108,7 +108,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15%25eth3]");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
@@ -120,7 +120,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15]:81");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
   ret = curl_url_get(u, CURLUPART_PORT, &portnum, 0);
   fail_unless(ret == CURLUE_OK, "curl_url_get portnum returned error");
@@ -136,7 +136,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15];81");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret != CURLUE_OK, "Curl_parse_port true on error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
@@ -147,19 +147,20 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15]80");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret != CURLUE_OK, "Curl_parse_port true on error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
 
-  /* Valid IPv6 with no port after the colon, should use default */
+  /* Valid IPv6 with no port after the colon, should use default if a scheme
+     was used in the URL */
   u = curl_url();
   if(!u)
     goto fail;
   ipv6port = strdup("[fe80::250:56ff:fea7:da15]:");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, TRUE);
   fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
@@ -171,7 +172,7 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15!25eth3]:80");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret != CURLUE_OK, "Curl_parse_port returned non-error");
   free_and_clear(ipv6port);
   curl_url_cleanup(u);
@@ -183,10 +184,25 @@
   ipv6port = strdup("[fe80::250:56ff:fea7:da15%eth3]:80");
   if(!ipv6port)
     goto fail;
-  ret = Curl_parse_port(u, ipv6port);
+  ret = Curl_parse_port(u, ipv6port, FALSE);
   fail_unless(ret == CURLUE_OK, "Curl_parse_port returned error");
+  free_and_clear(ipv6port);
+  curl_url_cleanup(u);
+
+  /* No scheme and no digits following the colon - not accepted. Because that
+     makes (a*50):// that looks like a scheme be an acceptable input. */
+  u = curl_url();
+  if(!u)
+    goto fail;
+  ipv6port = strdup("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                    "aaaaaaaaaaaaaaaaaaaaaa:");
+  if(!ipv6port)
+    goto fail;
+  ret = Curl_parse_port(u, ipv6port, FALSE);
+  fail_unless(ret == CURLUE_BAD_PORT_NUMBER, "Curl_parse_port did wrong");
   fail:
   free(ipv6port);
   curl_url_cleanup(u);
+
 }
 UNITTEST_STOP
diff --git a/tests/unit/unit1654.c b/tests/unit/unit1654.c
index 6274d0a..acd2cd6 100644
--- a/tests/unit/unit1654.c
+++ b/tests/unit/unit1654.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
@@ -36,11 +36,10 @@
   curl_global_cleanup();
 }
 
-#if defined(CURL_DISABLE_HTTP) || !defined(USE_ALTSVC)
+#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_ALTSVC)
 UNITTEST_START
 {
-  return 0; /* nothing to do when HTTP is disabled or alt-svc support is
-               missing */
+  return 0; /* nothing to do when HTTP or alt-svc is disabled */
 }
 UNITTEST_STOP
 #else
@@ -57,6 +56,7 @@
     Curl_altsvc_cleanup(&asi);
     return result;
   }
+  curl_global_init(CURL_GLOBAL_ALL);
   curl = curl_easy_init();
   if(!curl)
     goto fail;
@@ -111,7 +111,7 @@
   result =
     Curl_altsvc_parse(curl, asi,
                       "h2=\":443\", h3=\":443\"; ma = 120; persist = 1\r\n",
-                      ALPN_h1, "curl.haxx.se", 80);
+                      ALPN_h1, "curl.se", 80);
   if(result) {
     fprintf(stderr, "Curl_altsvc_parse(5) failed!\n");
     unitfail++;
@@ -120,7 +120,7 @@
 
   /* clear that one again and decrease the counter */
   result = Curl_altsvc_parse(curl, asi, "clear;\r\n",
-                             ALPN_h1, "curl.haxx.se", 80);
+                             ALPN_h1, "curl.se", 80);
   if(result) {
     fprintf(stderr, "Curl_altsvc_parse(6) failed!\n");
     unitfail++;
@@ -130,8 +130,10 @@
   Curl_altsvc_save(curl, asi, outname);
 
   curl_easy_cleanup(curl);
+  curl_global_cleanup();
   fail:
   Curl_altsvc_cleanup(&asi);
+  curl_global_cleanup();
   return unitfail;
 }
 UNITTEST_STOP
diff --git a/tests/unit/unit1655.c b/tests/unit/unit1655.c
index 1b910ed..1d7880d 100644
--- a/tests/unit/unit1655.c
+++ b/tests/unit/unit1655.c
@@ -9,7 +9,7 @@
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
  *
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
diff --git a/tests/unit/unit1660.c b/tests/unit/unit1660.c
new file mode 100644
index 0000000..43efa24
--- /dev/null
+++ b/tests/unit/unit1660.c
@@ -0,0 +1,177 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2020 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curlcheck.h"
+
+#include "urldata.h"
+#include "hsts.h"
+
+static CURLcode
+unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void
+unit_stop(void)
+{
+  curl_global_cleanup();
+}
+
+#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_HSTS)
+UNITTEST_START
+{
+  return 0; /* nothing to do when HTTP or HSTS are disabled */
+}
+UNITTEST_STOP
+#else
+
+struct testit {
+  const char *host;
+  const char *chost; /* if non-NULL, use to lookup with */
+  const char *hdr; /* if NULL, just do the lookup */
+  const CURLcode result; /* parse result */
+};
+
+static const struct testit headers[] = {
+  /* two entries read from disk cache, verify first */
+  { "-", "readfrom.example", NULL, CURLE_OK},
+  { "-", "old.example", NULL, CURLE_OK},
+  /* delete the remaining one read from disk */
+  { "readfrom.example", NULL, "max-age=\"0\"", CURLE_OK},
+
+  { "example.com", NULL, "max-age=\"31536000\"\r\n", CURLE_OK },
+  { "example.com", NULL, "max-age=\"21536000\"\r\n", CURLE_OK },
+  { "example.com", NULL, "max-age=\"21536000\"; \r\n", CURLE_OK },
+  { "example.com", NULL, "max-age=\"21536000\"; includeSubDomains\r\n",
+    CURLE_OK },
+  { "example.org", NULL, "max-age=\"31536000\"\r\n", CURLE_OK },
+  { "this.example", NULL, "max=\"31536\";", CURLE_BAD_FUNCTION_ARGUMENT },
+  { "this.example", NULL, "max-age=\"31536", CURLE_BAD_FUNCTION_ARGUMENT },
+  { "this.example", NULL, "max-age=31536\"", CURLE_OK },
+  /* max-age=0 removes the entry */
+  { "this.example", NULL, "max-age=0", CURLE_OK },
+  { "another.example", NULL, "includeSubDomains; ",
+    CURLE_BAD_FUNCTION_ARGUMENT },
+
+  /* Two max-age is illegal */
+  { "example.com", NULL,
+    "max-age=\"21536000\"; includeSubDomains; max-age=\"3\";",
+    CURLE_BAD_FUNCTION_ARGUMENT },
+  /* Two includeSubDomains is illegal */
+  { "2.example.com", NULL,
+    "max-age=\"21536000\"; includeSubDomains; includeSubDomains;",
+    CURLE_BAD_FUNCTION_ARGUMENT },
+  /* use a unknown directive "include" that should be ignored */
+  { "3.example.com", NULL, "max-age=\"21536000\"; include; includeSubDomains;",
+    CURLE_OK },
+  /* remove the "3.example.com" one, should still match the example.com */
+  { "3.example.com", NULL, "max-age=\"0\"; includeSubDomains;",
+    CURLE_OK },
+  { "-", "foo.example.com", NULL, CURLE_OK},
+  { "-", "foo.xample.com", NULL, CURLE_OK},
+
+  /* should not match */
+  { "example.net", "forexample.net", "max-age=\"31536000\"\r\n", CURLE_OK },
+
+  /* should not match either, since forexample.net is not in the example.net
+     domain */
+  { "example.net", "forexample.net",
+    "max-age=\"31536000\"; includeSubDomains\r\n", CURLE_OK },
+  /* remove example.net again */
+  { "example.net", NULL, "max-age=\"0\"; includeSubDomains\r\n", CURLE_OK },
+
+  /* make this live for 7 seconds */
+  { "expire.example", NULL, "max-age=\"7\"\r\n", CURLE_OK },
+  { NULL, NULL, NULL, 0 }
+};
+
+static void showsts(struct stsentry *e, const char *chost)
+{
+  if(!e)
+    printf("'%s' is not HSTS\n", chost);
+  else {
+    printf("%s [%s]: %" CURL_FORMAT_CURL_OFF_T "%s\n",
+           chost, e->host, e->expires,
+           e->includeSubDomains ? " includeSubDomains" : "");
+  }
+}
+
+UNITTEST_START
+{
+  CURLcode result;
+  struct stsentry *e;
+  struct hsts *h = Curl_hsts_init();
+  int i;
+  const char *chost;
+  CURL *easy;
+  if(!h)
+    return 1;
+
+  curl_global_init(CURL_GLOBAL_ALL);
+  easy = curl_easy_init();
+  if(!easy) {
+    Curl_hsts_cleanup(&h);
+    curl_global_cleanup();
+    return 1;
+  }
+
+  Curl_hsts_loadfile(easy, h, "log/input1660");
+
+  for(i = 0; headers[i].host ; i++) {
+    if(headers[i].hdr) {
+      result = Curl_hsts_parse(h, headers[i].host, headers[i].hdr);
+
+      if(result != headers[i].result) {
+        fprintf(stderr, "Curl_hsts_parse(%s) failed: %d\n",
+                headers[i].hdr, result);
+        unitfail++;
+        continue;
+      }
+      else if(result) {
+        printf("Input %u: error %d\n", i, (int) result);
+        continue;
+      }
+    }
+
+    chost = headers[i].chost ? headers[i].chost : headers[i].host;
+    e = Curl_hsts(h, chost, TRUE);
+    showsts(e, chost);
+  }
+
+  printf("Number of entries: %zu\n", h->list.size);
+
+  /* verify that it is exists for 7 seconds */
+  chost = "expire.example";
+  for(i = 100; i < 110; i++) {
+    e = Curl_hsts(h, chost, TRUE);
+    showsts(e, chost);
+    deltatime++; /* another second passed */
+  }
+
+  (void)Curl_hsts_save(easy, h, "log/hsts1660");
+  Curl_hsts_cleanup(&h);
+  curl_easy_cleanup(easy);
+  curl_global_cleanup();
+  return unitfail;
+}
+UNITTEST_STOP
+#endif
diff --git a/tests/unit/unit1661.c b/tests/unit/unit1661.c
new file mode 100644
index 0000000..c32d6f1
--- /dev/null
+++ b/tests/unit/unit1661.c
@@ -0,0 +1,113 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curlcheck.h"
+
+#include "bufref.h"
+
+static struct bufref bufref;
+
+static int freecount = 0;
+
+static void test_free(void *p)
+{
+  fail_unless(p, "pointer to free may not be NULL");
+  freecount++;
+  free(p);
+}
+
+static CURLcode unit_setup(void)
+{
+  Curl_bufref_init(&bufref);
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
+
+UNITTEST_START
+{
+  char *buffer = NULL;
+  CURLcode result = CURLE_OK;
+
+  /**
+   * testing Curl_bufref_init.
+   * @assumptions:
+   * 1: data size will be 0
+   * 2: reference will be NULL
+   * 3: destructor will be NULL
+   */
+
+  fail_unless(!bufref.ptr, "Initial reference must be NULL");
+  fail_unless(!bufref.len, "Initial length must be NULL");
+  fail_unless(!bufref.dtor, "Destructor must be NULL");
+
+  /**
+   * testing Curl_bufref_set
+   */
+
+  buffer = malloc(13);
+  abort_unless(buffer, "Out of memory");
+  Curl_bufref_set(&bufref, buffer, 13, test_free);
+
+  fail_unless((char *) bufref.ptr == buffer, "Referenced data badly set");
+  fail_unless(bufref.len == 13, "Data size badly set");
+  fail_unless(bufref.dtor == test_free, "Destructor badly set");
+
+  /**
+   * testing Curl_bufref_ptr
+   */
+
+  fail_unless((char *) Curl_bufref_ptr(&bufref) == buffer,
+              "Wrong pointer value returned");
+
+  /**
+   * testing Curl_bufref_len
+   */
+
+  fail_unless(Curl_bufref_len(&bufref) == 13, "Wrong data size returned");
+
+  /**
+   * testing Curl_bufref_memdup
+   */
+
+  result = Curl_bufref_memdup(&bufref, "1661", 3);
+  abort_unless(result == CURLE_OK, curl_easy_strerror(result));
+  fail_unless(freecount == 1, "Destructor not called");
+  fail_unless((char *) bufref.ptr != buffer, "Returned pointer not set");
+  buffer = (char *) Curl_bufref_ptr(&bufref);
+  fail_unless(buffer, "Allocated pointer is NULL");
+  fail_unless(bufref.len == 3, "Wrong data size stored");
+  fail_unless(!buffer[3], "Duplicated data should have been truncated");
+  fail_unless(!strcmp(buffer, "166"), "Bad duplicated data");
+
+  /**
+   * testing Curl_bufref_free
+   */
+
+  Curl_bufref_free(&bufref);
+  fail_unless(freecount == 1, "Wrong destructor called");
+  fail_unless(!bufref.ptr, "Initial reference must be NULL");
+  fail_unless(!bufref.len, "Initial length must be NULL");
+  fail_unless(!bufref.dtor, "Destructor must be NULL");
+}
+UNITTEST_STOP
diff --git a/tests/curl_test_data.py b/tests/util.py
similarity index 64%
rename from tests/curl_test_data.py
rename to tests/util.py
index a46cb73..70f6b43 100755
--- a/tests/curl_test_data.py
+++ b/tests/util.py
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -19,13 +19,14 @@
 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 # KIND, either express or implied.
 #
-"""Module for extracting test data from the test data folder"""
+"""Module for extracting test data from the test data folder and other utils"""
 
 from __future__ import (absolute_import, division, print_function,
                         unicode_literals)
+
+import logging
 import os
 import re
-import logging
 
 log = logging.getLogger(__name__)
 
@@ -33,6 +34,34 @@
 REPLY_DATA = re.compile("<reply>[ \t\n\r]*<data[^<]*>(.*?)</data>", re.MULTILINE | re.DOTALL)
 
 
+class ClosingFileHandler(logging.StreamHandler):
+    def __init__(self, filename):
+        super(ClosingFileHandler, self).__init__()
+        self.filename = os.path.abspath(filename)
+        self.setStream(None)
+
+    def emit(self, record):
+        with open(self.filename, "a") as fp:
+            self.setStream(fp)
+            super(ClosingFileHandler, self).emit(record)
+            self.setStream(None)
+
+    def setStream(self, stream):
+        setStream = getattr(super(ClosingFileHandler, self), 'setStream', None)
+        if callable(setStream):
+            return setStream(stream)
+        if stream is self.stream:
+            result = None
+        else:
+            result = self.stream
+            self.acquire()
+            try:
+                self.flush()
+                self.stream = stream
+            finally:
+                self.release()
+        return result
+
 class TestData(object):
     def __init__(self, data_folder):
         self.data_folder = data_folder
diff --git a/tests/valgrind.pm b/tests/valgrind.pm
index 43163bf..6d45725 100644
--- a/tests/valgrind.pm
+++ b/tests/valgrind.pm
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
index 10b0731..6e570b1 100644
--- a/tests/valgrind.supp
+++ b/tests/valgrind.supp
@@ -1,4 +1,45 @@
 {
+   zstd_decompression-1.3.3-on-Ubuntu-18.04_with_hyper
+   Memcheck:Cond
+   fun:ZSTD_decompressStream
+   fun:zstd_unencode_write
+   fun:Curl_unencode_write
+   fun:hyper_body_chunk
+}
+
+{
+   zstd_decompression-1.3.3-on-Ubuntu-18.04
+   Memcheck:Cond
+   fun:ZSTD_decompressStream
+   fun:zstd_unencode_write
+   fun:Curl_unencode_write
+   fun:readwrite_data
+   fun:Curl_readwrite
+   fun:multi_runsingle
+   fun:curl_multi_perform
+   fun:easy_transfer
+   fun:easy_perform
+   fun:curl_easy_perform
+   fun:serial_transfers
+   fun:run_all_transfers
+   fun:operate
+   fun:main
+}
+
+{
+   zstd_decompression-1.3.3-on-Ubuntu-18.04-nondebug
+   Memcheck:Cond
+   fun:ZSTD_decompressStream
+   fun:zstd_unencode_write
+   fun:Curl_readwrite
+   fun:multi_runsingle
+   fun:curl_multi_perform
+   fun:curl_easy_perform
+   fun:operate
+   fun:main
+}
+
+{
    libidn-idna_to_ascii-error
    Memcheck:Addr4
    fun:idna_to_ascii_4z
diff --git a/tests/version-scan.pl b/tests/version-scan.pl
index 788ba0f..5664365 100755
--- a/tests/version-scan.pl
+++ b/tests/version-scan.pl
@@ -10,7 +10,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index 54cbf0c..0985613 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -9,7 +9,7 @@
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
-# are also available at https://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.se/docs/copyright.html.
 #
 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
 # copies of the Software, and permit persons to whom the Software is
@@ -35,40 +35,7 @@
 # Usage
 #
 
-!MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
-!MESSAGE where <options> is one or many of:
-!MESSAGE   VC=<6,7,8,9,10,11,12,14,15>    - VC versions
-!MESSAGE   WITH_DEVEL=<path>              - Paths for the development files (SSL, zlib, etc.)
-!MESSAGE                                    Defaults to curl's sibling directory deps: ../deps
-!MESSAGE                                    Libraries can be fetched at https://windows.php.net/downloads/php-sdk/deps/
-!MESSAGE                                    Uncompress them into the deps folder.
-!MESSAGE   WITH_PREFIX=<path>             - Installation directory path
-!MESSAGE                                    Defaults to a configuration dependent (SSL, zlib, etc.)
-!MESSAGE                                    directory inside curl's subdirectory builds: ./builds
-!MESSAGE                                    Use backslashes as path separator
-!MESSAGE   WITH_SSL=<dll or static>       - Enable OpenSSL support, DLL or static
-!MESSAGE   WITH_NGHTTP2=<dll or static>   - Enable HTTP/2 support, DLL or static
-!MESSAGE   WITH_CARES=<dll or static>     - Enable c-ares support, DLL or static
-!MESSAGE   WITH_ZLIB=<dll or static>      - Enable zlib support, DLL or static
-!MESSAGE   WITH_SSH2=<dll or static>      - Enable libSSH2 support, DLL or static
-!MESSAGE   WITH_MBEDTLS=<dll or static>   - Enable mbedTLS support, DLL or static
-!MESSAGE   ENABLE_IDN=<yes or no>         - Enable use of Windows IDN APIs, defaults to yes
-!MESSAGE                                    Requires Windows Vista or later
-!MESSAGE   ENABLE_IPV6=<yes or no>        - Enable IPv6, defaults to yes
-!MESSAGE   ENABLE_SSPI=<yes or no>        - Enable SSPI support, defaults to yes
-!MESSAGE   ENABLE_SCHANNEL=<yes or no>      - Enable native Windows SSL support, defaults to yes
-!MESSAGE   ENABLE_OPENSSL_AUTO_LOAD_CONFIG=<yes or no>
-!MESSAGE                                  - Whether the OpenSSL configuration will be loaded automatically, defaults to yes
-!MESSAGE   ENABLE_UNICODE=<yes or no>     - Enable UNICODE support, defaults to no
-!MESSAGE   GEN_PDB=<yes or no>            - Generate Program Database (debug symbols for release build)
-!MESSAGE   DEBUG=<yes or no>              - Debug builds
-!MESSAGE   MACHINE=<x86 or x64>           - Target architecture (default x64 on AMD64, x86 on others)
-!MESSAGE   CARES_PATH=<path to cares>     - Custom path for c-ares
-!MESSAGE   MBEDTLS_PATH=<path to mbedTLS> - Custom path for mbedTLS
-!MESSAGE   NGHTTP2_PATH=<path to HTTP/2>  - Custom path for nghttp2
-!MESSAGE   SSH2_PATH=<path to libSSH2>    - Custom path for libSSH2
-!MESSAGE   SSL_PATH=<path to OpenSSL>     - Custom path for OpenSSL
-!MESSAGE   ZLIB_PATH=<path to zlib>       - Custom path for zlib
+!MESSAGE See winbuild/README.md for usage
 !ERROR please choose a valid mode
 
 !ENDIF
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
index 6460e18..fa26d7f16 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -5,11 +5,11 @@
 #                            | (__| |_| |  _ <| |___

 #                             \___|\___/|_| \_\_____|

 #

-# Copyright (C) 1999 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.

+# Copyright (C) 1999 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.

 #

 # This software is licensed as described in the file COPYING, which

 # you should have received as part of this distribution. The terms

-# are also available at https://curl.haxx.se/docs/copyright.html.

+# are also available at https://curl.se/docs/copyright.html.

 #

 # You may opt to use, copy, modify, merge, publish, distribute and/or sell

 # copies of the Software, and permit persons to whom the Software is

@@ -22,24 +22,9 @@
 

 ###########################################################################

 #

-# Makefile for building libcurl with MSVC 6 through to 15

+# Makefile for building libcurl with MSVC

 #

-# Usage: see usage message below

-#        Should be invoked from winbuild directory

-#        Edit the paths and desired library name

-#        SSL path is only required if you intend compiling

-#        with SSL.

-#

-# This make file leaves the result either a .lib or .dll file

-# in the \lib directory. It should be called from the \lib

-# directory.

-#

-# An option would have been to allow the source directory to

-# be specified, but I saw no requirement.

-#

-# Another option would have been to leave the .lib and .dll

-# files in the "cfg" directory, but then the make file

-# in \src would need to be changed.

+# Usage: see README.md

 #

 ##############################################################

 

@@ -72,7 +57,7 @@
 LNKDLL     = link.exe /DLL

 # Use lib.exe instead of link.exe as link.exe /lib has the following bad habits:

 # - optimizing options like /opt:ref raises warnings (at least in Visual Studio 2015)

-# - all (including Windows) dependencies are aggregated (as static parts) 

+# - all (including Windows) dependencies are aggregated (as static parts)

 # - link.exe /lib is not documented (anymore) at MSDN

 # Instead of id: just create an archive, that contains all objects

 LNKLIB     = lib.exe

@@ -172,7 +157,11 @@
 NGHTTP2_LIBS     = nghttp2.lib

 !ELSEIF "$(WITH_NGHTTP2)"=="static"

 NGHTTP2_CFLAGS   = /DUSE_NGHTTP2 /DNGHTTP2_STATICLIB /I"$(NGHTTP2_INC_DIR)"

+!IF EXISTS("$(NGHTTP2_LIB_DIR)\nghttp2_static.lib")

 NGHTTP2_LIBS     = nghttp2_static.lib

+!ELSE

+NGHTTP2_LIBS     = nghttp2.lib

+!ENDIF

 !ENDIF

 

 

@@ -237,8 +226,8 @@
 ZLIB_LIB_DIR = $(DEVEL_LIB)

 !ENDIF

 

-# Depending on how zlib is built the libraries have different names, we 

-# try to handle them all. 

+# Depending on how zlib is built the libraries have different names, we

+# try to handle them all.

 !IF "$(WITH_ZLIB)"=="dll"

 !IF EXISTS("$(ZLIB_LIB_DIR)\zlibwapi.lib")

 ZLIB_LIBS = zlibwapi.lib

@@ -622,7 +611,7 @@
  $(CURL_DIROBJ)\curl_multibyte.obj \

  $(CURL_DIROBJ)\version_win32.obj \

  $(CURL_DIROBJ)\dynbuf.obj

- 

+

 $(PROGRAM_NAME): $(CURL_DIROBJ) $(CURL_FROM_LIBCURL) $(EXE_OBJS)

 	$(CURL_LINK) $(CURL_LFLAGS) $(CURL_LIBCURL_LIBNAME) $(WIN_LIBS) $(CURL_FROM_LIBCURL) $(EXE_OBJS)

 	$(MANIFESTTOOL)

diff --git a/winbuild/README.md b/winbuild/README.md
index 49b0b6c..2aa0c60 100644
--- a/winbuild/README.md
+++ b/winbuild/README.md
@@ -73,7 +73,7 @@
 

 where `<options>` is one or many of:

 

- - `VC=<6,7,8,9,10,11,12,14,15>` - VC version

+ - `VC=<num>`                    - VC version. 6 or later.

  - `WITH_DEVEL=<path>`           - Paths for the development files (SSL, zlib, etc.)

                                    Defaults to sibbling directory deps: ../deps

                                    Libraries can be fetched at https://windows.php.net/downloads/php-sdk/deps/

@@ -89,7 +89,12 @@
  - `ENABLE_IPV6=<yes/no>`        - Enable IPv6, defaults to yes

  - `ENABLE_IDN=<yes or no>`      - Enable use of Windows IDN APIs, defaults to yes

                                    Requires Windows Vista or later

- - `ENABLE_SCHANNEL=<yes/no>`    - Enable native Windows SSL support, defaults to yes

+ - `ENABLE_SCHANNEL=<yes/no>`    - Enable native Windows SSL support, defaults

+                                   to yes if SSPI and no other SSL library

+ - `ENABLE_OPENSSL_AUTO_LOAD_CONFIG=<yes/no>`

+                                 - Enable loading OpenSSL configuration

+                                   automatically, defaults to yes

+ - `ENABLE_UNICODE=<yes/no>`     - Enable UNICODE support, defaults to no

  - `GEN_PDB=<yes/no>`            - Generate Program Database (debug symbols for release build)

  - `DEBUG=<yes/no>`              - Debug builds

  - `MACHINE=<x86/x64>`           - Target architecture (default is x86)

diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat
index 79a27ac..e19e14b 100755
--- a/winbuild/gen_resp_file.bat
+++ b/winbuild/gen_resp_file.bat
@@ -6,11 +6,11 @@
 rem *                            | (__| |_| |  _ <| |___
 rem *                             \___|\___/|_| \_\_____|
 rem *
-rem * Copyright (C) 2011 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+rem * Copyright (C) 2011 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
 rem *
 rem * This software is licensed as described in the file COPYING, which
 rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
+rem * are also available at https://curl.se/docs/copyright.html.
 rem *
 rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 rem * copies of the Software, and permit persons to whom the Software is